]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix second bug where --icf=safe triggers segfault when linking ARM.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b319b098
AH
12018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * configure.srv (aarch64*-*-linux*): Don't include xml.
4 (i[34567]86-*-cygwin*): Likewise.
5 (i[34567]86-*-linux*): Likewise.
6 (i[34567]86-*-lynxos*): Likewise.
7 (i[34567]86-*-mingw32ce*): Likewise.
8 (i[34567]86-*-mingw*): Likewise.
9 (i[34567]86-*-nto*): Likewise.
10 (tic6x-*-uclinux): Likewise.
11 (x86_64-*-linux*): Likewise.
12 (x86_64-*-mingw*): Likewise.
13 (x86_64-*-cygwin*): Likewise.
14
3b74854b
AH
152018-04-18 Alan Hayward <alan.hayward@arm.com>
16
17 * tdesc.c: Remove xml parameter.
18
e98577a9
AH
192018-04-18 Alan Hayward <alan.hayward@arm.com>
20
21 * server.c (get_features_xml): Remove cast.
22 * tdesc.c (void target_desc::accept): Fill in function.
23 (tdesc_get_features_xml): Remove old xml creation.
24 (print_xml_feature::visit_pre): Add xml vistor.
25 * tdesc.h (struct target_desc): Make xmltarget mutable.
26 (tdesc_get_features_xml): Remove declaration.
27
d278f585
AH
282018-04-18 Alan Hayward <alan.hayward@arm.com>
29
30 * tdesc.c (tdesc_architecture_name): Add new function.
31 (tdesc_osabi_name): Likewise.
32 (tdesc_get_features_xml): Use new functions.
33
eee8a18d
AH
342018-04-18 Alan Hayward <alan.hayward@arm.com>
35
36 * tdesc.c (tdesc_create_flags): Remove.
37 (tdesc_add_flag): Likewise.
38 (tdesc_named_type): Likewise.
39 (tdesc_create_union): Likewise.
40 (tdesc_create_struct): Likewise.
41 (tdesc_create_vector): Likewise.
42 (tdesc_add_bitfield): Likewise.
43 (tdesc_add_field): Likewise.
44 (tdesc_set_struct_size): Likewise.
45
82ec9bc7
AH
462018-04-18 Alan Hayward <alan.hayward@arm.com>
47
48 * tdesc.c (~target_desc): Remove implictly deleted items.
49 (init_target_desc): Iterate all features.
50 (tdesc_get_features_xml): Use vector.
51 (tdesc_create_feature): Create feature.
52 * tdesc.h (tdesc_feature) Remove
53 (target_desc): Add features.
54
ea3e7d71
AH
552018-04-18 Alan Hayward <alan.hayward@arm.com>
56
57 * Makefile.in: Add common/tdesc.c
58 * tdesc.c (init_target_desc): init all reg_defs from register
59 vector.
60 (tdesc_create_reg): Create tdesc_reg.
61 * tdesc.h (tdesc_feature): Add register vector.
62
17d08cd4
SM
632018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
64
65 * tdesc.h (struct target_desc) <features>: Change type to
66 std::vector<std::string>.
67 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
68 changes.
69 (tdesc_get_features_xml): Likewise.
70 (tdesc_create_feature): Likewise.
71
5cd3e386
AH
722018-03-26 Alan Hayward <alan.hayward@arm.com>
73
74 * regcache.c (find_register_by_number): Return a ref.
75 (find_regno): Use references.
76 (register_size): Likewise.
77 (register_data): Likewise.
78 * tdesc.c (target_desc::~target_desc): Remove free calls.
79 (target_desc::operator==): Use std::vector compare.
80 (init_target_desc): Use reference.
81 (tdesc_create_reg): Use reg constructors.
82 * tdesc.h (struct target_desc): Replace pointer with object.
83
dff7492c
AH
842018-03-23 Alan Hayward <alan.hayward@arm.com>
85
86 * regcache.c (find_register_by_number): Make static.
87 (find_regno): Use find_register_by_number
88 * regcache.h (struct reg): Remove declaration.
89
d80e5242
AH
902018-03-23 Alan Hayward <alan.hayward@arm.com>
91
92 * tdesc.c (target_desc::~target_desc): Move to here.
93 (target_desc::operator==): Likewise.
94 * tdesc.h (target_desc::~target_desc): Move from here.
95 (target_desc::operator==): Likewise.
96
f69c5afb
AA
972018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
98
99 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
100
ce29f843
AA
1012018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
102
103 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
104 S390_TDESC_GS.
105 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
106 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
107 and init_registers_s390_gs_linux64.
108
c49bd90b
AA
1092018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
110
111 * linux-s390-low.c (s390_fill_gs): Remove function.
112 (s390_fill_gsbc): Remove function.
113 (s390_regsets): Set fill functions for the guarded storage regsets
114 to NULL.
115
7edb9bd3
AA
1162018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
117
118 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
119 the word size. Add comment.
120 (s390_get_wordsize): New function.
121 (s390_arch_setup): No longer select a temporary tdesc to fetch the
122 pswm with it. Instead, use s390_get_wordsize to determine the
123 word size first and derive the correct tdesc from that directly.
124
39be3c7e
SM
1252018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * Makefile.in: Include silent-rules.mk.
128 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
129 (COMPILE): Add ECHO_CXX.
130 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
131 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
132 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
133 (version-generated.c): Add ECHO_GEN.
134 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
135 (IPAGENT_COMPILE): Add ECHO_CXX.
136 (%-generated.c): Add ECHO_REGDAT.
137
3ae9ce5d
TT
1382018-03-14 Tom Tromey <tom@tromey.com>
139
140 PR cli/14977:
141 * ax.c (ax_printf): Special case for NULL.
142
e6a58aa8
SM
1432018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
144
145 * linux-low.c (linux_qxfer_libraries_svr4): Use
146 xml_escape_text_append.
147
f6e8a41e
SM
1482018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
151
b9671caf
SM
1522018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * server.c (handle_general_set): Remove unnecessary xstrdup.
155
e80aaf61
SM
1562018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
157
158 * server.c (parse_debug_format_options): Adjust to
159 delim_string_to_char_ptr_vec changes.
160 * thread-db.c (thread_db_load_search): Adjust to
161 dirnames_to_char_ptr_vec changes.
162
b1223e78
MM
1632018-03-01 Markus Metzger <markus.t.metzger@intel.com>
164
165 * target.h (target_enable_btrace, target_disable_btrace)
166 (target_read_btrace, target_read_btrace_conf): Turn macro into
167 inline function. Throw error if target method is not defined.
168 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
169 check for btrace target method. Be prepared to handle exceptions
170 from btrace target methods.
171
81561546
SDJ
1722018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * server.c (captured_main): Change order of error message printed
175 when the current working directory cannot be found.
176
25e3c82c
SDJ
1772018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
178
179 * server.c: Include "filenames.h" and "pathstuff.h".
180 (program_name): Delete variable.
181 (program_path): New anonymous class.
182 (get_exec_wrapper): Use "program_path" instead of
183 "program_name".
184 (handle_v_run): Likewise.
185 (captured_main): Likewise.
186 (process_serial_event): Likewise.
187
b4987c95
SDJ
1882018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
189
190 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
191 (OBJS): Add "pathstuff.o".
192 * server.c (current_directory): New global variable.
193 (captured_main): Initialize "current_directory".
194
f46cd62a
AH
1952018-02-26 Alan Hayward <alan.hayward@arm.com>
196
197 * tdesc.c: Use common/tdesc.h.
198 * tdesc.h: Likewise.
199
a543c5ca
AH
2002018-02-20 Alan Hayward <alan.hayward@arm.com>
201 Simon Marchi <simon.marchi@ericsson.com>
202
203 * Makefile.in: Switch order of make rules.
204
b5884fa7
AH
2052018-02-19 Alan Hayward <alan.hayward@arm.com>
206
207 * Makefile.in: Add common directory in build.
208 * configure.ac: Add common reference.
209 * configure: Regenerate.
210
de6242d3
MM
2112018-02-09 Markus Metzger <markus.t.metzger@intel.com>
212
213 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
214 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
215 * spu-low.c (spu_target_ops): Likewise.
216 * win32-low.c (win32_target_ops): Likewise.
217 * server.c (supported_btrace_packets): Report packets unconditionally.
218 * target.h (target_ops) <supports_btrace>: Remove.
219 (target_supports_btrace): Remove.
220
9ee23a85
MM
2212018-02-09 Markus Metzger <markus.t.metzger@intel.com>
222
223 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
224 (handle_btrace_disable): Change return type to void. Use exceptions
225 to report errors.
226 (handle_btrace_general_set): Catch exception and copy message to
227 return message.
228
8ce47547
TT
2292018-02-08 Tom Tromey <tom@tromey.com>
230
231 * linux-low.c (install_software_single_step_breakpoints): Use
232 make_scoped_restore.
233 * inferiors.c (make_cleanup_restore_current_thread): Remove.
234 (do_restore_current_thread_cleanup): Remove.
235 * gdbthread.h (make_cleanup_restore_current_thread): Don't
236 declare.
237
45dd3607
TT
2382018-02-08 Tom Tromey <tom@tromey.com>
239
240 * mem-break.c (set_raw_breakpoint_at): Use
241 gdb::unique_xmalloc_ptr.
242
e671cd59
PA
2432018-01-30 Pedro Alves <palves@redhat.com>
244
245 PR gdb/13211
246 * target.c (target_terminal::terminal_state): Rename to ...
247 (target_terminal::m_terminal_state): ... this.
248
a0aad537
JC
2492018-01-19 James Clarke <jrtc27@jrtc27.com>
250
251 * linux-low.c (handle_extended_wait): Surround call to
252 thread_db_notice_clone with #ifdef USE_THREAD_DB.
253
4d9b86e1
SM
2542018-01-17 Simon Marchi <simon.marchi@ericsson.com>
255
256 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
257 linux_ptrace_attach_fail_reason_string now returning an
258 std::string.
259 (linux_attach): Likewise.
260 * thread-db.c (attach_thread): Likewise.
261
f517c180
EA
2622018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
263
264 PR gdb/21559
265 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
266 checking for fs_base/gs_base fields in struct user_regs_struct.
267 * configure: Regenerate.
268
9a70f35c
YQ
2692018-01-16 Yao Qi <yao.qi@linaro.org>
270
271 PR gdb/18749
272 * linux-low.c (fetch_register): Call supply_register instead of
273 error.
274
605fd3c6
YQ
2752018-01-08 Yao Qi <yao.qi@linaro.org>
276 Simon Marchi <simon.marchi@ericsson.com>
277
278 * Makefile.in (OBS): Remove selftest.o.
279 * configure.ac: Set srv_selftest_objs if $development is true.
280 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
281 * configure: Re-generated.
282 * server.c (captured_main): Wrap variable selftest_filter with
283 GDB_SELF_TEST.
284
2cc05030
SM
2852018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * server.c (parse_debug_format_options): Return std::string.
288 (handle_monitor_command, captured_main): Adjust.
289
e379cee6
PA
2902018-01-05 Pedro Alves <palves@redhat.com>
291
292 PR gdb/18653
293 * server.c (captured_main): Pass quiet=false to
294 save_original_signals_state.
295
82e1e79a
JB
2962018-01-01 Joel Brobecker <brobecker@adacore.com>
297
298 * gdbreplay.c (gdbreplay_version): Update copyright year in
299 version message.
300 * server.c (gdbserver_version): Likewise.
301
8e481c3b
TT
3022017-12-08 Tom Tromey <tom@tromey.com>
303
304 * ax.c (ax_printf): Update.
305
a8806230
YQ
3062017-12-07 Yao Qi <yao.qi@linaro.org>
307
308 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
309 aarch64_linux_read_description.
310 * linux-amd64-ipa.c (idx2mask): New array.
311 (get_ipa_tdesc): Move idx2mask out.
312 (initialize_low_tracepoint): Initialize target descriptions.
313 * linux-i386-ipa.c (idx2mask): New array.
314 (get_ipa_tdesc): Move idx2mask out.
315 (initialize_low_tracepoint): Initialize target descriptions.
316
d4a0e8b5
SM
3172017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
318
319 * tdesc.c (struct tdesc_type): Change return type.
320 (tdesc_add_flag): Change parameter type.
321 (tdesc_add_bitfield): Likewise.
322 (tdesc_add_field): Likewise.
323 (tdesc_set_struct_size): Likewise.
324
798a7429
SM
3252017-12-05 Simon Marchi <simon.marchi@ericsson.com>
326
327 * regcache.c (registers_to_string): Remove unused variable.
328
c0e15c9b
SM
3292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * inferiors.c (for_each_inferior_with_data): Remove.
332 * inferiors.h (for_each_inferior_with_data): Remove.
333 * server.c (handle_qxfer_threads_worker): Change parameter type.
334 (handle_qxfer_threads_proper): Use for_each_thread.
335
f0045347
SM
3362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
337
338 * inferiors.c (for_each_inferior): Remove.
339 (clear_inferiors): Use for_each_thread.
340 * inferiors.h (for_each_inferior): Remove.
341 * linux-low.c (linux_wait_for_event_filtered): Use
342 for_each_thread.
343 (linux_stabilize_threads): Likewise.
344 * regcache.c (regcache_release): Likewise.
345 * server.c (gdb_wants_all_threads_stopped): Likewise.
346 (clear_pending_status_callback): Remove.
347 (handle_status): Use for_each_thread.
348 (captured_main): Likewise.
349 * win32-low.c (child_init_thread_list): Likewise.
350 (win32_clear_inferiors): Likewise.
351 (fake_breakpoint_event): Likewise.
352
9521758b
SM
3532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * inferiors.h (find_inferior): Remove.
356 * inferiors.c (find_inferior): Remove.
357
8f86d7aa
SM
3582017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
359
360 * linux-low.c (resume_status_pending_p): Update comment.
361 (need_step_over_p): Update comment.
362
e2b44075
SM
3632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
364
365 * linux-low.c (proceed_one_lwp): Return void, change parameter
366 type.
367 (unsuspend_and_proceed_one_lwp): Likewise.
368 (proceed_all_lwps): Use for_each_thread.
369 (unstop_all_lwps): Likewise.
370
c80825ff
SM
3712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * linux-low.c (linux_resume_one_thread): Return void, take
374 parameter directly.
375 (linux_resume): Use for_each_thread.
376
df3e4dbe
SM
3772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
378
379 * linux-low.c (send_sigstop_callback): Return void, change
380 parameter type. Rename to...
381 (send_sigstop): ... this.
382 (suspend_and_send_sigstop_callback): Return void, change parameter
383 type. Rename to...
384 (suspend_and_send_sigstop): ... this.
385 (stop_all_lwps): Use for_each_thread.
386
5a6b0a41
SM
3872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
388
389 * linux-low.c (lwp_running): Return bool, remove unused
390 argument.
391 (linux_stabilize_threads): Use find_thread.
392
39a64da5
SM
3932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * linux-low.c (select_singlestep_lwp_callback): Remove.
396 (count_events_callback): Remove.
397 (select_event_lwp_callback): Remove.
398 (select_event_lwp): Use find_thread/for_each_thread.
399
a1385b7b
SM
4002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
401
402 * linux-low.c (not_stopped_callback): Return bool, take filter
403 argument directly.
404 (linux_wait_for_event_filtered): Use find_thread.
405 (linux_wait_1): Likewise.
406
454296a2
SM
4072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
408
409 * linux-low.c (same_lwp): Remove.
410 (find_lwp_pid): Use find_thread.
411
6b2a85da
SM
4122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
413
414 * linux-low.c (delete_lwp_callback): Remove.
415 (linux_mourn): Use for_each_thread.
416
798a38e8
SM
4172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
418
419 * linux-low.c (linux_detach_lwp_callback): Return void, remove
420 args parameter, don't check for pid.
421 (linux_detach): Use for_each_thread.
422
e4eb0dec
SM
4232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
424
425 * linux-low.c (struct counter): Remove.
426 (second_thread_of_pid_p): Remove.
427 (last_thread_of_process_p): Use find_thread.
428
83e1b6c1
SM
4292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
430
431 * inferiors.c (find_inferior_in_random): Remove.
432 * inferiors.h (find_inferior_in_random): Remove.
433 * linux-low.c (status_pending_p_callback): Return bool, accept
434 parameter ptid directly.
435 (linux_wait_for_event_filtered): Use find_thread_in_random.
436 (linux_wait_1): Likewise.
437
8dc7b443
SM
4382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
439
440 * inferiors.c (find_inferior_id): Remove.
441 (find_thread_ptid): Move implemention from find_inferior_id to
442 here.
443 * inferiors.h (find_inferior_id): Remove.
444 * server.c (handle_status): Use find_thread_ptid.
445 (process_serial_event): Likewise.
446 * thread-db.c (find_one_thread): Likewise.
447 (thread_db_thread_handle): Likewise.
448 * win32-low.c (thread_rec): Likewise.
449 (child_delete_thread): Likewise.
450 (win32_thread_alive): Likewise.
451 (get_child_debug_event): Likewise.
452
da25033c
SM
4532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
454
455 * linux-mips-low.c (update_watch_registers_callback): Return
456 void, remove pid_p parameter, don't check for pid.
457 (mips_insert_point, mips_remove_point): Use for_each_thread.
458
c91bb56b
SM
4592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * lynx.low (lynx_delete_thread_callback): Remove.
462 (lynx_mourn): Use for_each_thread.
463
634a3254
SM
4642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
465
466 * regcache.c (regcache_invalidate_one): Remove.
467 (regcache_invalidate_pid): use for_each_thread.
468
41272101
TT
4692017-11-26 Tom Tromey <tom@tromey.com>
470
471 * linux-low.c (linux_create_inferior): Update.
472
f5291a6f
UW
4732017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
474
475 * spu-low.c (spu_create_inferior): Fix typo in argument name.
476
6654d750
AH
4772017-11-24 Alan Hayward <alan.hayward@arm.com>
478
479 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
480 * linux-aarch64-low.c (initialize_low_arch): Call init func.
481 * linux-aarch64-tdesc-selftest.c: New file.
482 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
483
4842017-11-24 Alan Hayward <alan.hayward@arm.com>
485
486 * configure.srv: Add new file.
487 * linux-aarch64-low.c (initialize_low_arch): Call init func.
488 * linux-aarch64-tdesc-selftest.c: New file.
489 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
490
49bdb7ee
AH
4912017-11-24 Alan Hayward <alan.hayward@arm.com>
492
493 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
494 * linux-aarch64-low.c (initialize_low_arch): Remove init.
495 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
496
d6d7ce56
AH
4972017-11-24 Alan Hayward <alan.hayward@arm.com>
498
499 * configure.srv: Add new files.
500 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
501 aarch64_linux_read_description.
502 * linux-aarch64-low.c (aarch64_linux_read_description):
503 Merge with aarch64_arch_setup.
504 (aarch64_arch_setup): Call aarch64_linux_read_description.
505 * linux-aarch64-tdesc.c: New file.
506 * linux-aarch64-tdesc.h: New file.
507
506fe5f4
YQ
5082017-11-24 Yao Qi <yao.qi@linaro.org>
509
510 * configure.srv: Set $srv_regobj for tic6x-linux.
511 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
512 (tic6x_read_description): Move some code to tic6x_arch_setup.
513 (tic6x_tdesc_test): New function.
514 (initialize_low_arch): Call selftests::register_test.
515
29f9a567
YQ
5162017-11-22 Yao Qi <yao.qi@linaro.org>
517
518 * remote-utils.c (prepare_resume_reply): Use memcpy.
519
578290ec
SM
5202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
521
522 * linux-low.c (kill_one_lwp_callback): Return void, take
523 argument directly, don't filter on pid.
524 (linux_kill): Use for_each_thread.
525
eca55aec
SM
5262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
527
528 * linux-low.c (need_step_over_p): Return bool, remove dummy
529 argument.
530 (linux_resume, proceed_all_lwps): Use find_thread.
531
25c28b4d
SM
5322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
533
534 * linux-low.c (resume_status_pending_p): Return bool, remove
535 flag_p argument.
536 (linux_resume): Use find_thread.
537
5fdda392
SM
5382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
539
540 * linux-low.c (struct thread_resume_array): Remove.
541 (linux_set_resume_request): Return void, take arguments
542 directly.
543 (linux_resume): Use for_each_thread.
544
fcb056a5
SM
5452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
546
547 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
548 return bool, remove data argument.
549 (linux_stabilize_threads): Use find_thread.
550
139720c5
SM
5512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
552
553 * linux-low.c (unsuspend_one_lwp): Remove.
554 (unsuspend_all_lwps): Use for_each_thread, inline code from
555 unsuspend_one_lwp.
556
6d1e5673
SM
5572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
558
559 * gdbthread.h (find_thread): Add overload with ptid_t filter.
560 * linux-low.c (struct iterate_over_lwps_args): Remove.
561 (iterate_over_lwps_filter): Remove.
562 (iterate_over_lwps): Use find_thread.
563
bbf550d5
SM
5642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
565
566 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
567 (linux_handle_new_gdb_connection): Use for_each_thread, inline
568 code from reset_lwp_ptrace_options_callback.
569
00192f77
SM
5702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
571
572 * linux-arm-low.c (struct update_registers_data): Remove.
573 (update_registers_callback): Return void, take arguments
574 directly, don't check thread's pid.
575 (arm_insert_point, arm_remove_point): Use for_each_thread.
576
2bee2b6c
SM
5772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
578
579 * win32-low.c (continue_one_thread): Return void, take argument
580 directly.
581 (child_continue): Use for_each_thread.
582
0b360f19
SM
5832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
584
585 * win32-i386-low.c (update_debug_registers_callback): Rename
586 to ...
587 (update_debug_registers): ... this, return void, remove pid_p arg.
588 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
589
f27866ba
SM
5902017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
591
592 * inferiors.h (struct process_info): Add constructor, initialize
593 fields..
594 <syscalls_to_catch>: Change type to std::vector<int>.
595 * inferiors.c (add_process): Allocate process_info with new.
596 (remove_process): Free process_info with delete.
597 * linux-low.c (handle_extended_wait): Adjust.
598 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
599 * server.c (handle_general_set): Adjust.
600
e849ea89
PA
6012017-11-16 Pedro Alves <palves@redhat.com>
602
603 * remote-utils.c (remote_close): Block SIGIO signals instead of
604 uninstalling the SIGIO handler.
605
1d0aa65c
AH
6062017-11-16 Alan Hayward <alan.hayward@arm.com>
607
608 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
609
3491a34c
YQ
6102017-11-16 Yao Qi <yao.qi@linaro.org>
611
612 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
613 (tic6x_store_gregset): Likewise.
614 (tic6x_usrregs_info): Move it up.
615
a602f924
AH
6162017-11-15 Alan Hayward <alan.hayward@arm.com>
617
618 * Makefile.in: Update arch rules.
619 * configure.srv: Explicitly mark arch/ files.
620
5616b6c3
AS
6212017-11-13 Andreas Schwab <schwab@suse.de>
622
623 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
624 function.
625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
626
d1928160
PA
6272017-11-06 Pedro Alves <palves@redhat.com>
628
629 * config.in, configure: Regenerate.
630
bac608e7
SM
6312017-10-27 Simon Marchi <simon.marchi@ericsson.com>
632
633 * target.c (struct thread_search): Remove.
634 (thread_search_callback): Remove.
635 (prepare_to_access_memory): Use for_each_thread instead of
636 find_inferior. Inline code from thread_search_callback.
637
eaddb425
SM
6382017-10-27 Simon Marchi <simon.marchi@ericsson.com>
639
640 * server.c (struct visit_actioned_threads_data): Remove.
641 (visit_actioned_threads): Change prototype to take arguments
642 directly.
643 (resume): Use find_thread instead of find_inferior.
644
99078d34
SM
6452017-10-27 Simon Marchi <simon.marchi@ericsson.com>
646
647 * server.c (queue_stop_reply_callback): Change prototype, return
648 void.
649 (find_status_pending_thread_callback): Remove.
650 (handle_status): Replace find_inferior with find_thread and
651 for_each_thread.
652
cc628f3d
AH
6532017-10-25 Alan Hayward <alan.hayward@arm.com>
654
655 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
656 with REGNO.
657 (aarch64_store_gregset): Likewise.
658 (aarch64_fill_fpregset): Likewise.
659 (aarch64_store_fpregset): Likewise.
660
4d3bb80e
SM
6612017-10-21 Simon Marchi <simon.marchi@ericsson.com>
662
663 * gdbthread.h (find_thread, for_each_thread): New functions.
664 * inferiors.c (thread_of_pid): Remove.
665 (find_any_thread_of_pid): Use find_thread.
666 * linux-low.c (num_lwps): Use for_each_thread.
667
7a7cdfa0
YQ
6682017-10-17 Yao Qi <yao.qi@linaro.org>
669
670 * Makefile.in: Remove one rule.
671 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
672
e675d170
YQ
6732017-10-17 Yao Qi <yao.qi@linaro.org>
674
675 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
676 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
677
7eb4e0f9
YQ
6782017-10-17 Yao Qi <yao.qi@linaro.org>
679
680 * configure.srv: Rename arm.o with arch/arm.o.
681
60d6cfc9
YQ
6822017-10-17 Yao Qi <yao.qi@linaro.org>
683
684 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
685 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
686 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
687 (arch-i386.o, arch-amd64.o): Remove rules.
688 (arch/%.o): New rule.
689 Update POSTCOMPILE and COMPILE.pre.
690 * configure.ac: Invoke AC_CONFIG_COMMANDS.
691 * configure: Re-generated.
692 * configure.srv: Replace arch-i386.o with arch/i386.o.
693 Replace arch-amd64.o with arch/amd64.o.
694
5bfda255
YQ
6952017-10-16 Yao Qi <yao.qi@linaro.org>
696
697 * configure: Regenerated.
698
9c80ecd6
SM
6992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * inferiors.h: (struct inferior_list): Remove.
702 (struct inferior_list_entry); Remove.
703 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
704 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
705 get_first_inferior): Remove.
706 (for_each_inferior, for_each_inferior_with_data, find_inferior,
707 find_inferior_id, find_inferior_in_random): Change signature.
708 * inferiors.c (all_threads): Change type to
709 std::list<thread_info *>.
710 (get_thread): Remove macro.
711 (find_inferior, find_inferior_id): Change signature, implement
712 using find_thread.
713 (find_inferior_in_random): Change signature, implement using
714 find_thread_in_random.
715 (for_each_inferior, for_each_inferior_with_data): Change
716 signature, implement using for_each_thread.
717 (add_inferior_to_list, remove_inferior): Remove.
718 (add_thread, get_first_thread, thread_of_pid,
719 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
720 (get_first_inferior, one_inferior_p, clear_inferior_list):
721 Remove.
722 (clear_inferiors, get_thread_process): Update.
723 * gdbthread.h: Include <list>.
724 (struct thread_info) <entry>: Remove field.
725 <id>: New field.
726 (all_threads): Change type to std::list<thread_info *>.
727 (get_first_inferior): Add doc.
728 (find_thread, for_each_thread, find_thread_in_random): New
729 functions.
730 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
731 * linux-arm-low.c (update_registers_callback): Update.
732 * linux-low.c (second_thread_of_pid_p): Update.
733 (kill_one_lwp_callback, linux_detach_lwp_callback,
734 delete_lwp_callback, status_pending_p_callback, same_lwp,
735 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
736 iterate_over_lwps, not_stopped_callback,
737 resume_stopped_resumed_lwps, count_events_callback,
738 select_singlestep_lwp_callback, select_event_lwp_callback,
739 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
740 suspend_and_send_sigstop_callback, wait_for_sigstop,
741 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
742 lwp_running, linux_set_resume_request, resume_status_pending_p,
743 need_step_over_p, start_step_over, linux_resume_one_thread,
744 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
745 reset_lwp_ptrace_options_callback): Update.
746 * linux-mips-low.c (update_watch_registers_callback): Update.
747 * regcache.c (regcache_invalidate_one, regcache_invalidate):
748 Update.
749 (free_register_cache_thread_one): Remove.
750 (regcache_release): Update.
751 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
752 handle_qxfer_threads_worker): Update.
753 (handle_query): Update, use list iterator.
754 (visit_actioned_threads, handle_pending_status,
755 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
756 clear_pending_status_callback, set_pending_status_callback,
757 find_status_pending_thread_callback, handle_status,
758 process_serial_event): Update.
759 * target.c (thread_search_callback): Update.
760 * thread-db.c (thread_db_get_tls_address): Update.
761 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
762 Update.
763 * win32-i386-low.c (update_debug_registers_callback): Update.
764 * win32-low.c (delete_thread_info, child_delete_thread,
765 continue_one_thread, suspend_one_thread,
766 get_child_debug_event): Adjust.
767
9179355e
SM
7682017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
769
770 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
771 * inferiors.h: Include <list>.
772 (struct process_info) <entry>: Remove field.
773 <pid>: New field.
774 (pid_of): Change macro to function.
775 (ptid_of, lwpid_of): Remove macro.
776 (all_processes): Change type to std::list<process_info *>.
777 (ALL_PROCESSES): Remove macro.
778 (for_each_process, find_process): New function.
779 * inferiors.c (all_processes): Change type to
780 std::list<process_info *>.
781 (find_thread_process): Adjust.
782 (add_process): Likewise.
783 (remove_process): Likewise.
784 (find_process_pid): Likewise.
785 (get_first_process): Likewise.
786 (started_inferior_callback): Remove.
787 (have_started_inferiors_p): Adjust.
788 (attached_inferior_callback): Remove.
789 (have_attached_inferiors_p): Adjust.
790 * linux-low.c (check_zombie_leaders): Likewise.
791 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
792 (x86_linux_update_xmltarget): Adjust.
793 * server.c (handle_query): Likewise.
794 (gdb_reattached_process): Remove.
795 (handle_status): Adjust.
796 (kill_inferior_callback): Likewise.
797 (detach_or_kill_inferior): Remove.
798 (print_started_pid): Likewise.
799 (print_attached_pid): Likewise.
800 (detach_or_kill_for_exit): Update.
801 (process_serial_event): Likewise.
802 * linux-arm-low.c (arm_new_fork): Likewise.
803
c9cb8905
SM
8042017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * dll.h: Include <list>.
807 (struct dll_info): Add constructor.
808 <entry>: Remove field.
809 (all_dlls): Change type to std::list<dll_info>.
810 * dll.c: Include <algorithm>.
811 (get_dll): Remove macro.
812 (all_dlls): Change type to std::list<dll_info *>.
813 (free_one_dll): Remove.
814 (match_dll): Likewise.
815 (loaded_dll): Adjust.
816 (unloaded_dll): Adjust to all_dlls type change, use
817 std::find_if. Inline code from match_dll.
818 (clear_dlls): Adjust to all_dlls type change.
819 * server.c (emit_dll_description): Remove.
820 (handle_qxfer_libraries): Adjust to all_dlls type change,
821 integrate emit_dll_description's functionality.
822
04ec7890
SM
8232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
824
825 * linux-low.h (struct linux_target_ops) <delete_process>: New
826 field.
827 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
828 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
829 (struct linux_target_ops): Add delete_process callback.
830 * linux-arm-low.c (arm_delete_process): New.
831 (struct linux_target_ops): Add delete_process callback.
832 * linux-bfin-low.c (struct linux_target_ops): Likewise.
833 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
834 * linux-m32r-low.c (struct linux_target_ops): Likewise.
835 * linux-mips-low.c (mips_linux_delete_process): New.
836 (struct linux_target_ops): Add delete_process callback.
837 * linux-ppc-low.c (struct linux_target_ops): Likewise.
838 * linux-s390-low.c (struct linux_target_ops): Likewise.
839 * linux-sh-low.c (struct linux_target_ops): Likewise.
840 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
841 * linux-tile-low.c (struct linux_target_ops): Likewise.
842 * linux-x86-low.c (x86_linux_delete_process): New.
843 (struct linux_target_ops): Add delete_process callback.
844 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
845
466eecee
SM
8462017-10-12 Simon Marchi <simon.marchi@ericsson.com>
847
848 * linux-aarch64-low.c (the_low_target): Add thread delete
849 callback.
850 * linux-arm-low.c (arm_delete_thread): New function.
851 (the_low_target): Add thread delete callback.
852 * linux-bfin-low.c (the_low_target): Likewise.
853 * linux-crisv32-low.c (the_low_target): Likewise.
854 * linux-low.c (delete_lwp): Invoke delete_thread callback if
855 set.
856 * linux-low.h (struct linux_target_ops) <delete_thread>: New
857 field.
858 * linux-m32r-low.c (the_low_target): Add thread delete callback.
859 * linux-mips-low.c (mips_linux_delete_thread): New function.
860 (the_low_target): Add thread delete callback.
861 * linux-ppc-low.c (the_low_target): Likewise.
862 * linux-s390-low.c (the_low_target): Likewise.
863 * linux-sh-low.c (the_low_target): Likewise.
864 * linux-tic6x-low.c (the_low_target): Likewise.
865 * linux-tile-low.c (the_low_target): Likewise.
866 * linux-x86-low.c (the_low_target): Likewise.
867 * linux-xtensa-low.c (the_low_target): Likewise.
868
b79f7801
YZ
8692017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
870
871 * win32-low.c: Include "common-inferior.h".
872
bc3b087d
SDJ
8732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
874
875 * inferiors.c (set_inferior_cwd): New function.
876 * server.c (handle_general_set): Handle QSetWorkingDir packet.
877 (handle_query): Inform that QSetWorkingDir is supported.
878 * win32-low.c (create_process): Pass the inferior's cwd to
879 CreateProcess.
880
d092c5a2
SDJ
8812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
882
883 * inferiors.c (current_inferior_cwd): New global variable.
884 (get_inferior_cwd): New function.
885 * inferiors.h (struct process_info) <cwd>: New field.
886
7da0a886
SDJ
8872017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
888
889 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
890 (OBS): Add gdb_tilde_expand.o.
891
289a6840
SM
8922017-10-02 Simon Marchi <simon.marchi@ericsson.com>
893
894 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
895 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
896
256642e8
PA
8972017-09-29 Pedro Alves <palves@redhat.com>
898
899 * ax.c (gdb_parse_agent_expr): Constify.
900 * ax.h (gdb_parse_agent_expr): Constify.
901 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
902 Constify.
903 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
904 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
905 * remote-utils.h (read_ptid): Constify.
906 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
907 (process_point_options, process_serial_event): Constify.
908 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
909 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
910 (cmd_qtbuffer): Constify.
911
5b9ca4d4
PA
9122017-09-29 Pedro Alves <palves@redhat.com>
913
914 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
915 fails.
916
94c207e0
PA
9172017-09-29 Pedro Alves <palves@redhat.com>
918
919 * linux-low.c (handle_extended_wait): Pass parent thread instead
920 of process to thread_db_notice_clone.
921 * linux-low.h (thread_db_notice_clone): Replace parent process
922 parameter with parent thread parameter.
923 * thread-db.c (find_one_thread): Add comment.
924 (thread_db_notice_clone): Replace parent process parameter with
925 parent thread parameter. Temporarily switch to the parent thread.
926
75352e28
SDJ
9272017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
928
929 * gdbthread.h: Include "common-gdbthread.h".
930 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
931 "if" when validating the ptid.
932 * remote-utils.c: Include "gdbthread.h".
933 (prepare_resume_reply): Use "switch_to_thread".
934 * target.c (done_accessing_memory): Likewise.
935
ad339634
AA
9362017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
937
938 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
939 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
940 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
941 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
942 s390x-gs-linux64-ipa.o to ipa_obj.
943 * linux-s390-low.c (HWCAP_S390_GS): New define.
944 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
945 New functions.
946 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
947 (s390_arch_setup): Check for guarded-storage support and choose
948 appropriate tdesc.
949 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
950 init_registers_s390x_gs_linux64.
951 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
952 enum value.
953 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
954 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
955
cc4d742f
SM
9562017-09-22 Simon Marchi <simon.marchi@ericsson.com>
957
958 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
959
f6327dcb
KB
9602017-09-21 Kevin Buettner <kevinb@redhat.com>
961
962 * linux-low.h (struct lwp_info): Add new field, thread_handle.
963 (thread_db_thread_handle): Declare.
964 * linux-low.c (linux_target_ops): Initialize thread_handle.
965 * server.c (handle_qxfer_threads_worker): Add support for
966 "handle" attribute.
967 * target.h (struct target_ops): Add new function pointer,
968 thread_handle.
969 (target_thread_handle): Define.
970 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
971 field in lwp.
972 (thread_db_thread_handle): New function.
973
86299109
KB
9742017-09-21 Kevin Buettner <kevinb@redhat.com>
975
976 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
977 * linux-low.h (thread_db_notice_clone): Declare.
978 * thread-db.c (thread_db_notice_clone): New function.
979
f557a88a
PA
9802017-09-21 Pedro Alves <palves@redhat.com>
981
982 * server.c (gdb_read_memory, handle_status, process_serial_event)
983 (handle_serial_event, handle_target_event): Adjust to
984 set_desired_thread prototype change.
985 * target.c (set_desired_thread): Remove 'use_general' parameter
986 and adjust.
987 * target.h (set_desired_thread): Remove 'use_general' parameter.
988
223ffa71
TT
9892017-09-20 Tom Tromey <tom@tromey.com>
990
991 * target.c (target_terminal::terminal_state): Define.
992 (target_terminal::init): Rename from target_terminal_init.
993 (target_terminal::inferior): Rename from
994 target_terminal_inferior.
995 (target_terminal::ours): Rename from target_terminal_ours.
996 (target_terminal::ours_for_output, target_terminal::info): New.
997
04fd3ba9
SM
9982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
999
1000 * server.c (accumulate_file_name_length): Remove.
1001 (emit_dll_description): Adjust to std::string change.
1002 (handle_qxfer_libraries): Use std::string to hold document.
1003
5e187554
SM
10042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1005
1006 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1007 return type of xml_escape_text.
1008 * server.c (emit_dll_description): Likewise.
1009
1526853e
SM
10102017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1011
1012 * server.c (captured_main): Accept argument for --selftest.
1013 Update run_tests call.
1014 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1015 when registering selftests.
1016
c4dfafab
SDJ
10172017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1018
1019 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1020 instead of "VEC" for "target_desc.reg_defs".
1021 (regcache_cpy): Likewise.
1022 (registers_to_string): Likewise.
1023 (registers_from_string): Likewise.
1024 (find_regno): Likewise.
1025 (supply_regblock): Likewise.
1026 (regcache_raw_read_unsigned): Likewise.
1027 * tdesc.c (init_target_desc): Likewise.
1028 (tdesc_create_reg): Likewise.
1029 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1030 (struct target_desc) <reg_defs>: Convert to "std::vector".
1031 (target_desc): Do not initialize "reg_defs".
1032 (~target_desc): Update code to use "std::vector" instead of "VEC"
1033 for "target_desc.reg_defs".
1034 (operator==): Likewise.
1035
124aceb4
SM
10362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1037
1038 * inferiors.h (thread_to_gdb_id): Remove.
1039 * inferiors.c (thread_to_gdb_id): Remove.
1040 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1041 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1042 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1043 Likewise.
1044 * nto-low.c (nto_fetch_registers, nto_store_registers,
1045 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1046
96cde54f
SM
10472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1048
1049 * inferiors.h (gdb_id_to_thread_id): Remove.
1050 * inferiors.c (gdb_id_to_thread_id): Remove.
1051 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1052 removal. Move pid declaration closer to where it's used.
1053
e8ca139e
SM
10542017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 * server.c (handle_detach): New function.
1057 (process_serial_event): Move code out, call handle_detach.
1058
f8a4e119
SM
10592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1060
1061 * server.c (require_running): Rename to ...
1062 (require_running_or_return): ... this ...
1063 (require_running_or_break): ... and this.
1064 (handle_query, process_serial_event): Adjust.
1065
0eb0a407
SM
10662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1067
1068 * linux-low.c (linux_set_resume_request): Remove unused
1069 variables.
1070
785922a5
SM
10712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1072
1073 * server.c (first_thread_of): Remove.
1074 (process_serial_event): Replace usage of first_thread_of with
1075 find_any_thread_of_pid.
1076 * tracepoint.c (same_process_p): Remove.
1077 (gdb_agent_about_to_close): Replace usage of same_process_p with
1078 find_any_thread_of_pid.
1079 * linux-x86-low.c (same_process_callback): Remove.
1080 (x86_arch_setup_process_callback): Replace usage of
1081 same_process_callback with find_any_thread_of_pid.
1082 * thread-db.c (any_thread_of): Remove.
1083 (switch_to_process): Replace usage of any_thread_of with
1084 find_any_thread_of_pid.
1085 * inferiors.c (thread_pid_matches_callback): Remove.
1086 (find_thread_process): Adjust to use find_any_thread_of_pid.
1087
a059f00c
SDJ
10882017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1089
1090 * regcache.c (get_thread_regcache): Guard calls to "memset"
1091 with "!VEC_empty".
1092
cc397f3a
SDJ
10932017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1094
1095 * linux-low.c (handle_extended_wait): Use
1096 "allocate_target_description" instead of "XNEW".
1097 * linux-x86-low.c (initialize_low_arch): Likewise.
1098
22916b07
YQ
10992017-09-05 Yao Qi <yao.qi@linaro.org>
1100
1101 * configure.srv (srv_i386_regobj): Remove.
1102 (srv_amd64_regobj): Remove.
1103 (srv_regobj): Set it to "" for x86 non-linux targets.
1104 * linux-x86-tdesc.c (i386_linux_read_description):
1105 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1106 (init_registers_i386): Remove the declaration.
1107 (tdesc_i386): Remove the declaration.
1108 (lynx_i386_arch_setup): Call i386_create_target_description.
1109 * nto-x86-low.c: Likewise.
1110 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1111 [!__x86_64__]: include arch/i386.h.
1112 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1113
38602d55
YQ
11142017-09-05 Yao Qi <yao.qi@linaro.org>
1115
1116 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1117 i386/amd64-XXX-linux from it.
1118
44b886ff
YQ
11192017-09-05 Yao Qi <yao.qi@linaro.org>
1120
1121 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1122 false.
1123 (ipa_amd64_linux_regobj): Remove.
1124 (ipa_x32_linux_regobj): Remove.
1125
b4570e4b
YQ
11262017-09-05 Yao Qi <yao.qi@linaro.org>
1127
1128 * Makefile.in (arch-amd64.o): New rule.
1129 * configure.srv: Append arch-amd64.o.
1130 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1131 (get_ipa_tdesc): Call amd64_linux_read_description.
1132 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1133 and init_registers_amd64_XXX.
1134 * linux-x86-low.c (x86_linux_read_description): Call
1135 amd64_linux_read_description.
1136 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1137 (initialize_low_arch): Don't call init_registers_x32_XXX and
1138 init_registers_amd64_XXX.
1139 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1140 and tdesc_amd64_XXX.
1141 [__x86_64__] (amd64_tdesc_test): New function.
1142 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1143 and init_registers_amd64_XXX.
1144 * linux-x86-tdesc.c: Include arch/amd64.h.
1145 (xcr0_to_tdesc_idx): New function.
1146 (i386_linux_read_description): New function.
1147 (amd64_get_ipa_tdesc_idx): New function.
1148 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1149 (amd64_get_ipa_tdesc): Declare.
1150
d1f28ea2
YQ
11512017-09-05 Yao Qi <yao.qi@linaro.org>
1152
1153 * configure.srv (srv_i386_linux_xmlfiles): Remove
1154 i386/i386-XXX-linux.xml from it.
1155
25a93583
YQ
11562017-09-05 Yao Qi <yao.qi@linaro.org>
1157
1158 * configure.srv: Set srv_i386_linux_regobj empty if $development
1159 is false.
1160 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1161 initialize_low_tdesc.
1162 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1163 with #if initialize_low_tdesc.
1164 * linux-x86-tdesc-selftest.c: New file.
1165 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1166
5f035c07
YQ
11672017-09-05 Yao Qi <yao.qi@linaro.org>
1168
1169 * Makefile.in (arch-i386.o): New rule.
1170 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1171 (x86_64-*-linux*): Likewise.
1172 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1173 include arch/i386.h.
1174 (i386_linux_read_description): Remove code and call
1175 i386_create_target_description.
1176 * tdesc.c (allocate_target_description): New function.
1177 * tdesc.h (set_tdesc_architecture): Remove declaration.
1178 (set_tdesc_osabi): Likewise.
1179
0abe8a89
YQ
11802017-09-05 Yao Qi <yao.qi@linaro.org>
1181
1182 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1183 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1184 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1185 .xmltarget.
1186 * server.c (get_features_xml): Call tdesc_get_features_xml.
1187 * tdesc.c (set_tdesc_architecture): New function.
1188 (set_tdesc_osabi): New function.
1189 (tdesc_get_features_xml): New function.
1190 (tdesc_create_feature): Add an argument.
1191 * tdesc.h (struct target_desc) <features>: New field.
1192 <arch, osabi>: New field.
1193 (~target_desc): xfree features, arch, and osabi.
1194 (target_desc::oerator==): Don't compare .xmltarget.
1195 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1196 (set_tdesc_osabi): Likewise.
1197 (tdesc_get_features_xml): Likewise.
1198
0a188386
YQ
11992017-09-05 Yao Qi <yao.qi@linaro.org>
1200
1201 * linux-x86-tdesc.c: Include selftest.h.
1202 (i386_tdesc_test): New function.
1203 (initialize_low_tdesc): Call selftests::register_test.
1204 * tdesc.h: Include regdef.h.
1205 (target_desc): Override operator == and !=.
1206
f49ff000
YQ
12072017-09-05 Yao Qi <yao.qi@linaro.org>
1208
1209 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1210 (ipa_obj): Likewise.
1211 * linux-i386-ipa.c: Include common/x86-xstate.h
1212 (get_ipa_tdesc): Call i386_linux_read_description.
1213 (initialize_low_tracepoint): Don't call init_registers_XXX
1214 functions, call initialize_low_tdesc instead.
1215 * linux-x86-low.c (x86_linux_read_description): Call
1216 i386_linux_read_description.
1217 (initialize_low_arch): Don't call init_registers_i386_XXX
1218 functions, call initialize_low_tdesc.
1219 * linux-x86-tdesc.c: New file.
1220 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1221 (i386_get_ipa_tdesc_idx): Declare.
1222 (i386_get_ipa_tdesc): Declare.
1223 (initialize_low_tdesc): Declare.
1224
2b68ef2f
YQ
12252017-09-05 Yao Qi <yao.qi@linaro.org>
1226
1227 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1228 instead of 0.
1229
f7000548
YQ
12302017-09-05 Yao Qi <yao.qi@linaro.org>
1231
1232 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1233 * regcache.c (get_thread_regcache): Use VEC_length.
1234 (init_register_cache): Likewise.
1235 (regcache_cpy): Likewise.
1236 (registers_to_string): Iterate reg_defs via VEC_iterate.
1237 (find_regno): Likewise.
1238 (find_register_by_number): Use VEC_index.
1239 (register_size): Call find_register_by_number.
1240 (register_data): Call find_register_by_number.
1241 (supply_regblock): Use VEC_length.
1242 (regcache_raw_read_unsigned): Likewise.
1243 * tdesc.c (init_target_desc): Iterate reg_defs via
1244 VEC_iterate.
1245 (default_description): Update initializer.
1246 (copy_target_description): Don't update field num_registers.
1247 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1248 <num_registers>: Remove.
1249
50a421ac
SM
12502017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1251
1252 * Makefile.in (.SECONDARY): Define target.
1253
23fdd69e
SM
12542017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1255
1256 * linux-low.c (linux_wait_1): Adjust.
1257 * server.c (queue_stop_reply_callback): Adjust.
1258
0a2dde4a
SDJ
12592017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1260
1261 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1262 QEnvironmentUnset and QEnvironmentReset packets.
1263 (handle_query): Inform remote that QEnvironmentHexEncoded,
1264 QEnvironmentUnset and QEnvironmentReset are supported.
1265
6afd337d
SM
12662017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * inferiors.h (inferior_target_data): Rename to ...
1269 (thread_target_data): ... this.
1270 (inferior_regcache_data): Rename to ...
1271 (thread_regcache_data): ... this.
1272 (set_inferior_regcache_data): Rename to ...
1273 (set_thread_regcache_data): ... this.
1274 * inferiors.c (inferior_target_data): Rename to ...
1275 (thread_target_data): ... this.
1276 (inferior_regcache_data): Rename to ...
1277 (thread_regcache_data): ... this.
1278 (set_inferior_regcache_data): Rename to ...
1279 (set_thread_regcache_data): ... this.
1280 (free_one_thread): Update.
1281 * linux-low.h (get_thread_lwp): Update.
1282 * regcache.c (get_thread_regcache): Update.
1283 (regcache_invalidate_thread): Update.
1284 (free_register_cache_thread): Update.
1285 * win32-i386-low.c (update_debug_registers_callback): Update.
1286 (win32_get_current_dr): Update.
1287 * win32-low.c (thread_rec): Update.
1288 (delete_thread_info): Update.
1289 (continue_one_thread): Update.
1290 (suspend_one_thread): Update.
1291
a160cc46
SM
12922017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * inferiors.c (set_inferior_target_data): Remove.
1295 * inferiors.h (set_inferior_target_data): Remove.
1296
6d580b63
YQ
12972017-08-18 Yao Qi <yao.qi@linaro.org>
1298
1299 * Makefile.in (OBS): Add selftest.o.
1300 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1301 * configure, config.in: Re-generated.
1302 * server.c: Include common/sefltest.h.
1303 (captured_main): Handle option --selftest.
1304
f5a29eb0
YQ
13052017-08-09 Yao Qi <yao.qi@linaro.org>
1306
1307 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1308 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1309 i386-avx-mpx.o and i386-mmx.o.
1310 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1311 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1312 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1313 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1314 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1315 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1316 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1317 i386/amd64-avx-mpx.xml.
1318
57757c2f
YQ
13192017-08-09 Yao Qi <yao.qi@linaro.org>
1320
1321 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1322 and x32-avx-avx512.o.
1323 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1324 i386/x32-avx-avx512.xml.
1325
229d26fc
SM
13262017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1327
1328 * tracepoint.h (enum class fast_tpoint_collect_result): New
1329 enumeration.
1330 (fast_tracepoint_collecting): Change return type to
1331 fast_tpoint_collect_result.
1332 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1333 * linux-low.h: Include tracepoint.h.
1334 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1335 fast_tpoint_collect_result.
1336 * linux-low.c (handle_tracepoints): Adjust.
1337 (linux_fast_tracepoint_collecting): Change return type to
1338 fast_tpoint_collect_result.
1339 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1340 linux_wait_1, stuck_in_jump_pad_callback,
1341 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1342 proceed_one_lwp): Adjust to type change.
1343
2e1e43e1
YQ
13442017-07-10 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1347
adc764e7
YQ
13482017-06-29 Yao Qi <yao.qi@linaro.org>
1349
1350 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1351 Remove.
1352 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1353
a206891a
SM
13542017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1355
1356 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1357
9a6c7d9c
SDJ
13582017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1359
1360 * linux-low.c (linux_create_inferior): Adjust code to access the
1361 environment information via 'gdb_environ' class.
1362 * lynx-low.c (lynx_create_inferior): Likewise.
1363 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1364 (get_environ): Return a pointer to 'our_environ'.
1365 (captured_main): Initialize 'our_environ'.
1366 * server.h (get_environ): Adjust prototype.
1367 * spu-low.c (spu_create_inferior): Adjust code to access the
1368 environment information via 'gdb_environ' class.
1369
ae3e2ccf
SM
13702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1371
1372 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1373 usage of "register" keyword.
1374
3e019bdc
SM
13752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * configure: Re-generate.
1378
8465943a
SM
13792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * configure: Re-generate.
1382
cf0dd6f0
SM
13832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1384
1385 * Makefile.in (COMPILE.pre): Add "-x c++".
1386
9845682b
SDJ
13872017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1388
1389 * fork-child.c: Conditionally include <signal.h>.
1390
aefd8b33
SDJ
13912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1392
1393 * server.c (handle_general_set): Handle new packet
1394 "QStartupWithShell".
1395 (handle_query): Add "QStartupWithShell" to the list of supported
1396 packets.
1397 (gdbserver_usage): Add help text explaining the
1398 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1399 options.
1400 (captured_main): Recognize and act upon the presence of the new
1401 CLI options.
1402
2090129c
SDJ
14032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1404 Pedro Alves <palves@redhat.com>
1405
1406 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1407 * configure: Regenerate.
1408 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1409 "fork-inferior.o".
1410 (i[34567]86-*-lynxos*): Likewise.
1411 (spu*-*-*): Likewise.
1412 * fork-child.c: New file.
1413 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1414 and "environ.h".
1415 (linux_ptrace_fun): New function.
1416 (linux_create_inferior): Adjust function prototype to reflect
1417 change on "target.h". Adjust function code to use
1418 "fork_inferior".
1419 (linux_request_interrupt): Delete "signal_pid".
1420 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1421 (lynx_ptrace_fun): New function.
1422 (lynx_create_inferior): Adjust function prototype to reflect
1423 change on "target.h". Adjust function code to use
1424 "fork_inferior".
1425 * nto-low.c (nto_create_inferior): Adjust function prototype and
1426 code to reflect change on "target.h". Update comments.
1427 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1428 "common-terminal.h" and "environ.h".
1429 (terminal_fd): Moved to fork-child.c.
1430 (old_foreground_pgrp): Likewise.
1431 (restore_old_foreground_pgrp): Likewise.
1432 (last_status): Make it global.
1433 (last_ptid): Likewise.
1434 (our_environ): New variable.
1435 (startup_with_shell): Likewise.
1436 (program_name): Likewise.
1437 (program_argv): Rename to...
1438 (program_args): ...this.
1439 (wrapper_argv): New variable.
1440 (start_inferior): Delete function.
1441 (get_exec_wrapper): New function.
1442 (get_exec_file): Likewise.
1443 (get_environ): Likewise.
1444 (prefork_hook): Likewise.
1445 (post_fork_inferior): Likewise.
1446 (postfork_hook): Likewise.
1447 (postfork_child_hook): Likewise.
1448 (handle_v_run): Update code to deal with arguments coming from the
1449 remote host. Update calls from "start_inferior" to
1450 "create_inferior".
1451 (captured_main): Likewise. Initialize environment variable. Call
1452 "have_job_control".
1453 * server.h (post_fork_inferior): New prototype.
1454 (get_environ): Likewise.
1455 (last_status): Declare.
1456 (last_ptid): Likewise.
1457 (signal_pid): Likewise.
1458 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1459 (spu_ptrace_fun): New function.
1460 (spu_create_inferior): Adjust function prototype to reflect change
1461 on "target.h". Adjust function code to use "fork_inferior".
1462 * target.c (target_terminal_init): New function.
1463 (target_terminal_inferior): Likewise.
1464 (target_terminal_ours): Likewise.
1465 * target.h: Include <vector>.
1466 (struct target_ops) <create_inferior>: Update prototype.
1467 (create_inferior): Update macro.
1468 * utils.c (gdb_flush_out_err): New function.
1469 * win32-low.c (win32_create_inferior): Adjust function prototype
1470 and code to reflect change on "target.h".
1471
043a4934
SDJ
14722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1473
1474 * inferiors.c (switch_to_thread): New function.
1475
15652511
SDJ
14762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1477
1478 * Makefile.in (SFILE): Add "common/job-control.c".
1479 (OBS): Add "job-control.o".
1480
21ea5acd
SDJ
14812017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1482
1483 * Makefile: Remove "@host_makefile_frag@".
1484
e13cb306
PA
14852017-05-05 Pedro Alves <palves@redhat.com>
1486
1487 * configure: Regenerate.
1488
c94fee56
SDJ
14892017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1490
1491 * configure: Regenerate.
1492
a0ff9e1a
SM
14932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1494
1495 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1496 software_single_step change of return type to
1497 std::vector<CORE_ADDR>.
1498 * linux-low.c (install_software_single_step_breakpoints):
1499 Likewise.
1500 * linux-low.h (install_software_single_step_breakpoints):
1501 Likewise.
1502
be628ab8
SDJ
15032017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1504
1505 * remote-utils.c: Include "gdb_termios.h" instead of
1506 "terminal.h".
1507 * terminal.h: Delete file.
1508
7c5ded6a
SDJ
15092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1510
1511 * server.c: Include <vector>.
1512 <program_argv, wrapper_argv>: Convert to std::vector.
1513 (start_inferior): Rewrite function to use C++.
1514 (handle_v_run): Likewise. Update code that calculates the argv
1515 based on the vRun packet; use C++.
1516 (captured_main): Likewise.
1517
436252de
SM
15182017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * server.c (handle_v_cont): Initialize thread_resume::thread
1521 with null_ptid.
1522
9bf2a700
PA
15232017-04-05 Pedro Alves <palves@redhat.com>
1524
1525 * configure: Regenerate.
1526
a121b7c1
PA
15272017-04-05 Pedro Alves <palves@redhat.com>
1528
1529 * gdbreplay.c (sync_error): Constify.
1530 * linux-x86-low.c (push_opcode): Constify.
1531
21c8a587
PA
15322017-04-05 Pedro Alves <palves@redhat.com>
1533
1534 * win32-low.c (get_child_debug_event)
1535 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1536 Report TARGET_WAITKIND_SPURIOUS instead.
1537
fb32b4f7
PA
15382017-04-05 Pedro Alves <palves@redhat.com>
1539
1540 * remote-utils.c (remote_prepare, remote_open): Constify.
1541 * remote-utils.h (remote_prepare, remote_open): Constify.
1542 * server.c (captured_main): Constify 'port' handling.
1543
65dd1e59
SM
15442017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * Makefile.in (clean): Clear .deps.
1547
8fa5b777
SM
15482017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1549
1550 * .gitignore: Remove generated files, replace with wildcard.
1551 * (clean): Replace removal of generated files with wildcard.
1552 (version.c): Replace with...
1553 (version-generated.c): ...this.
1554 (xml-builtin.c): Replace with...
1555 (xml-builtin-generated.c): ...this.
1556 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1557 (%.c: *regformats*): Replace with...
1558 (%-generated.c: *regformats*): ...this.
1559
a12e714b
MF
15602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1561
1562 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1563 (xtensa_fill_gregset): Call collect_register_by_name for
1564 threadptr register.
1565 (xtensa_store_gregset): Call supply_register_by_name for
1566 threadptr register.
1567
1a09b50a
MF
15682017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1569
1570 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1571 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1572 (xtensa_store_gregset): Call supply_register for all registers in
1573 a0_regnum..a0_regnum + C0_NREGS range.
1574
1a01e7c6
SM
15752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1578 (ax-ipa.o: ax.c): Remove.
1579 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1580 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1581 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1582 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1583 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1584
36bc18a8
SM
15852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1586
1587 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1588 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1589 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1590 (errors-ipa.o: ../common/errors.c): Remove.
1591 (format-ipa.o: ../common/format.c): Remove.
1592 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1593
a8ebe3d5
SM
15942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * Makefile.in (%-ipa.o: %.c): New rule.
1597 (tracepoint-ipa.o: tracepoint.c): Remove.
1598 (utils-ipa.o: utils.c): Remove.
1599 (remote-utils-ipa.o: remote-utils.c): Remove.
1600 (regcache-ipa.o: regcache.c): Remove.
1601 (i386-linux-ipa.o: i386-linux.c): Remove.
1602 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1603 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1604 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1605 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1606 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1607 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1608 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1609 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1610 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1611 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1612 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1613 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1614 (aarch64-ipa.o: aarch64.c): Remove.
1615 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1616 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1617 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1618 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1619 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1620 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1621 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1622 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1623 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1624 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1625 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1626 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1627 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1628 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1629 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1630 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1631 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1632 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1633 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1634 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1635 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1636 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1637 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1638 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1639 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1640 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1641 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1642 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1643 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1644 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1645 (tdesc-ipa.o: tdesc.c): Remove.
1646 (x32-linux-ipa.o: x32-linux.c): Remove.
1647 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1648 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1649
50cfacb7
SM
16502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1651
1652 * Makefile.in (%.o: ../arch/%.c): New rule.
1653 (arm.o: ../arch/arm.c): Remove.
1654 (arm-linux.o: ../arch/arm-linux.c): Remove.
1655 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1656 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1657
c5a22423
SM
16582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1659
1660 * Makefile.in (%.o: ../nat/%.c): New rule.
1661 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1662 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1663 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1664 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1665 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1666 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1667 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1668 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1669 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1670 (linux-personality.o: ../nat/linux-personality.c): Remove.
1671 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1672 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1673 (x86-linux.o: ../nat/x86-linux.c): Remove.
1674 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1675 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1676
6bda016b
SM
16772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * Makefile.in (%.o: ../common/%.c): New rule.
1680 (signals.o: ../common/signals.c): Remove.
1681 (print-utils.o: ../common/print-utils.c): Remove.
1682 (rsp-low.o: ../common/rsp-low.c): Remove.
1683 (common-utils.o: ../common/common-utils.c): Remove.
1684 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1685 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1686 (vec.o: ../common/vec.c): Remove.
1687 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1688 (xml-utils.o: ../common/xml-utils.c): Remove.
1689 (ptid.o: ../common/ptid.c): Remove.
1690 (buffer.o: ../common/buffer.c): Remove.
1691 (format.o: ../common/format.c): Remove.
1692 (filestuff.o: ../common/filestuff.c): Remove.
1693 (agent.o: ../common/agent.c): Remove.
1694 (errors.o: ../common/errors.c): Remove.
1695 (environ.o: ../common/environ.c): Remove.
1696 (common-debug.o: ../common/common-debug.c): Remove.
1697 (cleanups.o: ../common/cleanups.c): Remove.
1698 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1699 (fileio.o: ../common/fileio.c): Remove.
1700 (common-regcache.o: ../common/common-regcache.c): Remove.
1701 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1702 (new-op.o: ../common/new-op.c): Remove.
1703 (btrace-common.o: ../common/btrace-common.c): Remove.
1704
21122961
SM
17052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1706
1707 * Makefile.in (%.o: ../target/%.c): New rule.
1708 (waitstatus.o: ../target/waitstatus.c): Remove.
1709
c362e621
SM
17102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1711
1712 * Makefile.in
1713 (%.c: ../regformats/%.dat,
1714 (%.c: ../regformats/arm/%.dat,
1715 (%.c: ../regformats/i386/%.dat,
1716 (%.c: ../regformats/rs6000/%.dat): New rules.
1717 (aarch64.c): Remove.
1718 (reg-arm.c): Remove.
1719 (arm-with-iwmmxt.c): Remove.
1720 (arm-with-vfpv2.c): Remove.
1721 (arm-with-vfpv3.c): Remove.
1722 (arm-with-neon.c): Remove.
1723 (reg-bfin.c): Remove.
1724 (reg-cris.c): Remove.
1725 (reg-crisv32.c): Remove.
1726 (i386.c): Remove.
1727 (i386-linux.c): Remove.
1728 (i386-avx.c): Remove.
1729 (i386-avx-linux.c): Remove.
1730 (i386-avx-avx512.c): Remove.
1731 (i386-avx-avx512-linux.c): Remove.
1732 (i386-mpx.c): Remove.
1733 (i386-mpx-linux.c): Remove.
1734 (i386-avx-mpx-avx512-pku.c): Remove.
1735 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1736 (i386-avx-mpx.c): Remove.
1737 (i386-avx-mpx-linux.c): Remove.
1738 (i386-mmx.c): Remove.
1739 (i386-mmx-linux.c): Remove.
1740 (reg-ia64.c): Remove.
1741 (reg-m32r.c): Remove.
1742 (reg-m68k.c): Remove.
1743 (reg-cf.c): Remove.
1744 (mips-linux.c): Remove.
1745 (mips-dsp-linux.c): Remove.
1746 (mips64-linux.c): Remove.
1747 (mips64-dsp-linux.c): Remove.
1748 (nios2-linux.c): Remove.
1749 (powerpc-32.c): Remove.
1750 (powerpc-32l.c): Remove.
1751 (powerpc-altivec32l.c): Remove.
1752 (powerpc-cell32l.c): Remove.
1753 (powerpc-vsx32l.c): Remove.
1754 (powerpc-isa205-32l.c): Remove.
1755 (powerpc-isa205-altivec32l.c): Remove.
1756 (powerpc-isa205-vsx32l.c): Remove.
1757 (powerpc-e500l.c): Remove.
1758 (powerpc-64l.c): Remove.
1759 (powerpc-altivec64l.c): Remove.
1760 (powerpc-cell64l.c): Remove.
1761 (powerpc-vsx64l.c): Remove.
1762 (powerpc-isa205-64l.c): Remove.
1763 (powerpc-isa205-altivec64l.c): Remove.
1764 (powerpc-isa205-vsx64l.c): Remove.
1765 (s390-linux32.c): Remove.
1766 (s390-linux32v1.c): Remove.
1767 (s390-linux32v2.c): Remove.
1768 (s390-linux64.c): Remove.
1769 (s390-linux64v1.c): Remove.
1770 (s390-linux64v2.c): Remove.
1771 (s390-te-linux64.c): Remove.
1772 (s390-vx-linux64.c): Remove.
1773 (s390-tevx-linux64.c): Remove.
1774 (s390x-linux64.c): Remove.
1775 (s390x-linux64v1.c): Remove.
1776 (s390x-linux64v2.c): Remove.
1777 (s390x-te-linux64.c): Remove.
1778 (s390x-vx-linux64.c): Remove.
1779 (s390x-tevx-linux64.c): Remove.
1780 (tic6x-c64xp-linux.c): Remove.
1781 (tic6x-c64x-linux.c): Remove.
1782 (tic6x-c62x-linux.c): Remove.
1783 (reg-sh.c): Remove.
1784 (reg-sparc64.c): Remove.
1785 (reg-spu.c): Remove.
1786 (amd64.c): Remove.
1787 (amd64-linux.c): Remove.
1788 (amd64-avx.c): Remove.
1789 (amd64-avx-linux.c): Remove.
1790 (amd64-avx-avx512.c): Remove.
1791 (amd64-avx-avx512-linux.c): Remove.
1792 (amd64-mpx.c): Remove.
1793 (amd64-mpx-linux.c): Remove.
1794 (amd64-avx-mpx-avx512-pku.c): Remove.
1795 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1796 (amd64-avx-mpx.c): Remove.
1797 (amd64-avx-mpx-linux.c): Remove.
1798 (x32.c): Remove.
1799 (x32-linux.c): Remove.
1800 (x32-avx.c): Remove.
1801 (x32-avx-linux.c): Remove.
1802 (x32-avx-avx512.c): Remove.
1803 (x32-avx-avx512-linux.c): Remove.
1804 (reg-xtensa.c): Remove.
1805 (reg-tilegx.c): Remove.
1806 (reg-tilegx32.c): Remove.
1807
1672e0d9
SDJ
18082017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1809
1810 * Makefile.in (SFILES): Add "common/environ.c".
1811 (OBJS): Add "common/environ.h".
1812
239b6d10
WT
18132017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1814
1815 * configure.ac: Check if the fs_base and gs_base members of
1816 `struct user_regs_struct' exist.
1817 * config.in: Regenerated.
1818 * configure: Likewise.
1819
694b382c
AT
18202017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1821
1822 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1823 target_read_memory.
1824 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1825 (get_next_pcs_syscall_next_pc): Likewise.
1826
7dc53023
LM
18272016-12-23 Luis Machado <lgustavo@codesourcery.com>
1828
1829 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1830 * nto-x86-low.c: Likewise.
1831
ad02e4fe
SM
18322016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1833
1834 * Makefile.in: Include disable-implicit-rules.mk.
1835
dcb07cfa
PA
18362016-11-23 Pedro Alves <palves@redhat.com>
1837
1838 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1839 (debug_vprintf): Use std::chrono::steady_clock instead of
1840 gettimeofday. Use '.' instead of ':'.
1841 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1842 (get_timestamp): Use std::chrono::steady_clock instead of
1843 gettimeofday.
1844
8629c02c
SM
18452016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1846
1847 * Makefile.in: Fix whitespace formatting.
1848
b593ecca
SM
18492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * Makefile.in (SFILES, OBS): Flatten list and order
1852 alphabetically.
1853
9986ba08
PA
18542016-11-23 Pedro Alves <palves@redhat.com>
1855
1856 * event-loop.c (handle_file_event): Use warning.
1857 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1858 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1859 Use warning.
1860
4eefa7bc
PA
18612016-11-23 Pedro Alves <palves@redhat.com>
1862
1863 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1864 output.
1865 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1866 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1867 debug_printf and debug_flush for debug output.
1868 * server.c (handle_general_set): Likewise.
1869 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1870 output.
1871
5443506e
SM
18722016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1873
1874 * Makefile.in (.c.o): Replace rule with ...
1875 (%.o: %.c): ... this one.
1876
3b165252
SM
18772016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1880 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1881 make.
1882 * configure.ac: Remove checks for the make program.
1883 * configure: Re-generate.
1884
0bcda685
PA
18852016-10-28 Pedro Alves <palves@redhat.com>
1886
1887 * Makefile.in (CXX_DIALECT): Get from configure.
1888 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1889 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1890 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1891 * config.in: Regenerate.
1892 * configure: Regenerate.
1893
c3805894
YQ
18942016-10-27 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c (linux_supports_range_stepping): Return true if
1897 can_software_single_step return true.
1898
89342618
YQ
18992016-10-27 Yao Qi <yao.qi@linaro.org>
1900
1901 * inferiors.c (find_inferior_in_random): New function.
1902 * inferiors.h (find_inferior_in_random): Declare.
1903 * linux-low.c (linux_wait_for_event_filtered): Call
1904 find_inferior_in_random instead of find_inferior.
1905
e3652c84
YQ
19062016-10-27 Yao Qi <yao.qi@linaro.org>
1907
1908 * linux-low.c (linux_wait_1): If single-step breakpoints are
1909 inserted, remove them.
1910
5a04c4cf
PA
19112016-10-26 Pedro Alves <palves@redhat.com>
1912
1913 * linux-low.c (handle_extended_wait): Link parent/child fork
1914 threads.
1915 (linux_wait_1): Unlink them.
1916 (linux_set_resume_request): Ignore resume requests for
1917 already-resumed and unhandled fork child threads.
1918 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1919 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1920 New functions.
1921 (handle_v_requests) <vCont>: Don't call require_running.
1922 * server.h (in_queued_stop_replies): New declaration.
1923
cb93dc7f
YQ
19242016-10-24 Yao Qi <yao.qi@linaro.org>
1925
1926 PR server/20733
1927 * linux-aarch64-low.c (append_insns): Cast the return value to
1928 'uint32_t *'.
1929
a1078bea
YQ
19302016-10-10 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1933
1fb77080
SDJ
19342016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1935
1936 * target.c (target_supports_multi_process): New function, moved
1937 from...
1938 * target.h (target_supports_multi_process): ... here. Remove
1939 macro.
1940
39b5a3b9
TT
19412016-10-05 Tom Tromey <tom@tromey.com>
1942
1943 PR remote/20655:
1944 * tracepoint.c (handle_tracepoint_bkpts): Check
1945 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1946
c1d0b70a
YQ
19472016-10-05 Yao Qi <yao.qi@linaro.org>
1948
1949 * configure.srv: Update the path of arm-*.xml files.
1950
0a69eedb
YQ
19512016-10-05 Terry Guo <terry.guo@arm.com>
1952 Yao Qi <yao.qi@linaro.org>
1953
1954 * Makefile.in: Adjust the path of rules.
1955 * configure.srv: Update the path of xml files.
1956 * regformats/arm-with-iwmmxt.dat: Regenerated.
1957 * regformats/arm-with-neon.dat: Likewise.
1958 * regformats/arm-with-vfpv2.dat: Likewise.
1959 * regformats/arm-with-vfpv3.dat Likewise.
1960
17e16485
YQ
19612016-09-30 Yao Qi <yao.qi@linaro.org>
1962
1963 PR gdbserver/20627
1964 * target.c (target_stop_and_wait): Don't call
1965 target_continue_no_signal, use resume_stop instead.
1966
edeeb602
YQ
19672016-09-26 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-low.c (linux_wait_1): Call debug_exit.
1970
503b1c39
PA
19712016-09-23 Pedro Alves <palves@redhat.com>
1972
1973 * Makefile.in (SFILES): Add common/new-op.c.
1974 (OBS): Add common/new-op.o.
1975 (new-op.o): New rule.
1976
74172ecf
SM
19772016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1978
1979 * .gitinore: Ignore more files.
1980
fc6cda2e
YQ
19812016-09-21 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1984 23.
1985
bc1e6c81
SDJ
19862016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1987
1988 * server.c (start_inferior): Call target_mourn_inferior instead of
1989 mourn_inferior; pass ptid_t argument to it.
1990 (resume): Likewise.
1991 (handle_target_event): Likewise.
1992 * target.c (target_mourn_inferior): New function.
1993 * target.h (mourn_inferior): Delete macro.
1994
0e00e962
AA
19952016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1996
1997 * linux-low.c (lwp_is_stepping): New function.
1998
1d8cb77d
CL
19992016-09-06 Carl Love <cel@us.ibm.com>
2000
2001 * server.c (start_inferior): Fixed comment, requested comment change
2002 didn't get updated correctly. Removed reference to ptrace () call as
2003 it is only true on Linux systems.
2004
7313bced
CL
20052016-09-06 Carl Love <cel@us.ibm.com>
2006
2007 * server.c (start_inferior): Do not call
2008 function target_post_create_inferior () if the
2009 inferior process has already exited.
2010
cf6de44d
PA
20112016-09-05 Pedro Alves <palves@redhat.com>
2012
2013 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2014 (COMPILE.pre, CC_LD): Use CXX directly.
2015 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2016 * acinclude.m4: Don't include build-with-cxx.m4.
2017 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2018 * configure: Regenerate.
2019
c1da6748
AT
20202016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2021
2022 PR gdb/19495
2023 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2024 call writing data to own_buf.
2025
f2b9e3df
SDJ
20262016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2027
2028 * target.c (mywait): Call target_wait instead of
2029 the_target->wait.
2030 (target_wait): New function.
2031
049a8570
SDJ
20322016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2033
2034 * server.c (start_inferior): New variable 'ptid'. Replace calls
2035 to the_target->resume by target_continue{,_no_signal}, depending
2036 on the case.
2037 * target.c (target_stop_and_wait): Call target_continue_no_signal
2038 instead of the_target->resume.
2039 (target_continue): New function.
2040
3aa5cfa0
AT
20412016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2042
2043 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2044
754653a7
AZ
20452016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2046
2047 PR server/20491
2048 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2049 ps_prochandle.
2050 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2051 * linux-arm-low.c (ps_get_thread_area): Likewise.
2052 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2053 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2054 * linux-mips-low.c (ps_get_thread_area): Likewise.
2055 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2056 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2057 * linux-x86-low.c (ps_get_thread_area): Likewise.
2058 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2059
ed036b40
PA
20602016-08-19 Pedro Alves <palves@redhat.com>
2061
2062 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2063
c8ef42ee
PA
20642016-08-19 Pedro Alves <palves@redhat.com>
2065
2066 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2067 comment. Use memcpy instead of casting through unsigned long.
2068
9c235a72
PA
20692016-08-19 Pedro Alves <palves@redhat.com>
2070
2071 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2072 allocating around 0x80000000.
2073
201506da
PA
20742016-08-19 Pedro Alves <palves@redhat.com>
2075
2076 PR gdb/20415
2077 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2078 (x32-avx512-linux-ipa.o): New rules.
2079 * configure.ac (x86_64-*-linux*): New x32 check.
2080 * configure.srv (ipa_x32_linux_regobj): New.
2081 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2082 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2083 descriptions.
2084 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2085 descriptions.
2086 * configure: Regenerate.
2087
f348d89a
PA
20882016-08-09 Pedro Alves <palves@redhat.com>
2089
2090 PR gdb/18653
2091 * Makefile.in (OBS): Add signals-state-save-restore.o.
2092 (signals-state-save-restore.o): New rule.
2093 * config.in: Regenerate.
2094 * configure: Regenerate.
2095 * linux-low.c: Include "signals-state-save-restore.h".
2096 (linux_create_inferior): Call
2097 restore_original_signals_state.
2098 * server.c: Include "dispositions-save-restore.h".
2099 (captured_main): Call save_original_signals_state.
2100
1baf5149
PA
21012016-08-05 Pedro Alves <palves@redhat.com>
2102
2103 * configure: Regenerate.
2104
fcd4a73d
YQ
21052016-08-04 Yao Qi <yao.qi@linaro.org>
2106
2107 * linux-low.c (regsets_fetch_inferior_registers): Check
2108 errno is ESRCH or not.
2109
979659d0
YQ
21102016-08-02 Yao Qi <yao.qi@linaro.org>
2111
2112 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2113 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2114 (thread_db_load_search): Update.
2115 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2116 td_ta_set_event and td_ta_event_getmsg.
2117
6598661d
PA
21182016-07-26 Pedro Alves <palves@redhat.com>
2119
2120 PR server/20414
2121 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2122 of unsigned long for 64-bit registers and use uint32_t instead of
2123 unsigned int for 32-bit registers.
2124
9cf12d57
PA
21252016-07-26 Pedro Alves <palves@redhat.com>
2126
2127 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2128 to 'ptrace'.
2129
305450ed
TT
21302016-07-21 Tom Tromey <tom@tromey.com>
2131
2132 * configure: Rebuild.
2133
2583da7c
YQ
21342016-07-21 Yao Qi <yao.qi@linaro.org>
2135
2136 * mem-break.c (find_gdb_breakpoint): Cast bp to
2137 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2138
21536b36
YQ
21392016-07-21 Yao Qi <yao.qi@linaro.org>
2140
2141 * server.c (handle_v_requests): Support s and S actions
2142 if target_supports_software_single_step return true.
2143
8901d193
YQ
21442016-07-21 Yao Qi <yao.qi@linaro.org>
2145
2146 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2147 is resume_step, call maybe_hw_step.
2148 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2149 and unstop them.
2150 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2151 breakpoints or not.
2152 (proceed_one_lwp): If resume request is resume_step, install
2153 reinsert breakpoints and call maybe_hw_step.
2154
0e9a339e
YQ
21552016-07-21 Yao Qi <yao.qi@linaro.org>
2156
2157 * linux-low.c (proceed_one_lwp): Declare.
2158 (linux_resume_one_thread): Remove local variable 'step'.
2159 Lift code enqueue signal. Call proceed_one_lwp instead of
2160 linux_resume_one_lwp.
2161
4281b351
YQ
21622016-07-21 Yao Qi <yao.qi@linaro.org>
2163
2164 * linux-low.c (linux_resume_one_thread): Call
2165 enqueue_pending_signal.
2166
984a2c04
YQ
21672016-07-21 Yao Qi <yao.qi@linaro.org>
2168
2169 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2170 * inferiors.c (do_restore_current_thread_cleanup): New function.
2171 (make_cleanup_restore_current_thread): Likewise.
2172 * linux-low.c (install_software_single_step_breakpoints): Call
2173 make_cleanup_restore_current_thread. Switch current_thread to
2174 thread.
2175
bec903c9
YQ
21762016-07-21 Yao Qi <yao.qi@linaro.org>
2177
2178 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2179 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2180 (clone_one_breakpoint): Likewise.
2181 (delete_reinsert_breakpoints): Change parameter to thread.
2182 Callers updated.
2183 (has_reinsert_breakpoints): Likewise.
2184 (uninsert_reinsert_breakpoints): Likewise.
2185 (reinsert_reinsert_breakpoints): Likewise.
2186 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2187 (delete_reinsert_breakpoints): Likewise.
2188 (reinsert_reinsert_breakpoints): Likewise.
2189 (uninsert_reinsert_breakpoints): Likewise.
2190 (has_reinsert_breakpoints): Likewise.
2191
63c40ec7
YQ
21922016-07-21 Yao Qi <yao.qi@linaro.org>
2193
2194 * inferiors.c (get_thread_process): Make parameter const.
2195 * inferiors.h (get_thread_process): Update declaration.
2196 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2197 Add new parameters child_thread and parent_thread. Callers
2198 updated.
2199 * mem-break.h (clone_all_breakpoints): Update declaration.
2200
9aa76cd0
YQ
22012016-07-21 Yao Qi <yao.qi@linaro.org>
2202
2203 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2204 <command_list, handler>: Remove.
2205 (struct gdb_breakpoint): New.
2206 (struct other_breakpoint): New.
2207 (struct reinsert_breakpoint): New.
2208 (is_gdb_breakpoint): New function.
2209 (any_persistent_commands): Update command_list if
2210 is_gdb_breakpoint returns true.
2211 (set_breakpoint): Create breakpoints according to their types.
2212 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2213 (set_gdb_breakpoint_1): Likewise.
2214 (set_gdb_breakpoint): Likewise.
2215 (clear_breakpoint_conditions): Change parameter type to
2216 'struct gdb_breakpoint *'.
2217 (clear_breakpoint_commands): Likewise.
2218 (clear_breakpoint_conditions_and_commands): Likewise.
2219 (add_condition_to_breakpoint): Likewise.
2220 (add_breakpoint_condition): Likewise.
2221 (add_commands_to_breakpoint): Likewise.
2222 (check_breakpoints): Check other_breakpoint.
2223 (clone_one_breakpoint): Clone breakpopint according to its type.
2224 * mem-break.h (struct gdb_breakpoint): Declare.
2225 (set_gdb_breakpoint): Update declaration.
2226 (clear_breakpoint_conditions_and_commands): Likewise.
2227 (add_breakpoint_condition): Likewise.
2228 (add_breakpoint_commands): Likewise.
2229 * server.c (process_point_options): Change parameter type to
2230 'struct gdb_breakpoint *'.
2231
811f8301
YQ
22322016-07-21 Yao Qi <yao.qi@linaro.org>
2233
2234 * mem-break.c (set_breakpoint_at): Rename it to ...
2235 (set_breakpoint_type_at): ... it.
2236 (set_breakpoint_at): Call set_breakpoint_type_at.
2237 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2238 * mem-break.h (set_breakpoint_at): Update comments.
2239
b1c51e36
CLT
22402016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2241
2242 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2243 to buf parameter.
2244 (nios2_store_gregset): Likewise.
2245
ced2dffb
PA
22462016-07-01 Pedro Alves <palves@redhat.com>
2247 Antoine Tremblay <antoine.tremblay@ericsson.com>
2248
2249 * linux-low.c: Change interface to take the target lwp_info
2250 pointer directly and return void. Handle detaching from a zombie
2251 thread.
2252 (linux_detach_lwp_callback): New function.
2253 (linux_detach): Detach from the leader thread after detaching from
2254 the clone threads.
2255
2ac09a5b
YQ
22562016-06-28 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2259 for variable new_offset.
2260 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2261 (aarch64_ftrace_insn_reloc_cb): Likewise.
2262 (aarch64_ftrace_insn_reloc_tb): Likewise.
2263 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2264 PRIx64 instead of PRIx32.
2265
79e7fd4f
YQ
22662016-06-28 Yao Qi <yao.qi@linaro.org>
2267
2268 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2269 (the_low_target): Install arm_get_syscall_trapinfo.
2270
061fc021
YQ
22712016-06-28 Yao Qi <yao.qi@linaro.org>
2272
2273 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2274 function.
2275 (the_low_target): Install aarch64_get_syscall_trapinfo.
2276
4cc32bec
YQ
22772016-06-28 Yao Qi <yao.qi@linaro.org>
2278
2279 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2280 Callers updated.
2281 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2282 Remove parameter sysno.
2283 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2284 sysret.
2285
782c1122
AA
22862016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2287
2288 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2289 (s390_emit_ne_goto): Likewise.
2290 (s390_emit_lt_goto): Likewise.
2291 (s390_emit_le_goto): Likewise.
2292 (s390_emit_gt_goto): Likewise.
2293 (s390_emit_ge_goto): Likewise.
2294 (s390x_emit_eq_goto): Likewise.
2295 (s390x_emit_ne_goto): Likewise.
2296 (s390x_emit_lt_goto): Likewise.
2297 (s390x_emit_le_goto): Likewise.
2298 (s390x_emit_gt_goto): Likewise.
2299 (s390x_emit_ge_goto): Likewise.
2300 (s390_emit_ops_impl): Mark variable static.
2301 (s390x_emit_ops): Likewise.
2302
2e7b624b
YQ
23032016-06-17 Yao Qi <yao.qi@linaro.org>
2304
2305 * linux-low.c (handle_extended_wait): Call
2306 uninsert_reinsert_breakpoints for the parent process. Remove
2307 reinsert breakpoints from the child process. Reinsert them to
2308 the parent process when vfork is done.
2309 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2310 (reinsert_reinsert_breakpoints): New function.
2311 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2312 (reinsert_reinsert_breakpoints): Declare.
2313
8a81c5d7
YQ
23142016-06-17 Yao Qi <yao.qi@linaro.org>
2315
2316 * linux-low.c (handle_extended_wait): If the parent is doing
2317 step-over, remove the reinsert breakpoints from the forked child.
2318
f50bf8e5
YQ
23192016-06-17 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-low.c (unsuspend_all_lwps): Declare.
2322 (linux_low_filter_event): If thread exited, call finish_step_over.
2323 If step-over is finished, unsuspend other threads.
2324
8376a3cb
YQ
23252016-06-17 Yao Qi <yao.qi@linaro.org>
2326
2327 * linux-low.c (linux_resume_one_lwp_throw): Assert
2328 has_reinsert_breakpoints returns false.
2329 * mem-break.c (delete_disabled_breakpoints): Assert
2330 bp type isn't reinsert_breakpoint.
2331
f79b145d
YQ
23322016-06-17 Yao Qi <yao.qi@linaro.org>
2333
2334 * linux-low.c (maybe_hw_step): New function.
2335 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2336 (finish_step_over): Switch current_thread to lwp temporarily,
2337 and assert has_reinsert_breakpoints returns true.
2338 (proceed_one_lwp): Call maybe_hw_step.
2339 * mem-break.c (has_reinsert_breakpoints): New function.
2340 * mem-break.h (has_reinsert_breakpoints): Declare.
2341
0ae534d2
JT
23422016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2343
2344 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2345
fcdad592
YQ
23462016-05-17 Yao Qi <yao.qi@linaro.org>
2347
2348 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2349 instead of find_inferior.
2350
9e784964
YQ
23512016-05-05 Yao Qi <yao.qi@linaro.org>
2352
2353 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2354 Initialize res to zero.
2355
cf2ebb6e
YQ
23562016-05-05 Yao Qi <yao.qi@linaro.org>
2357
2358 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2359 to uint32_t.
2360
c1aebf87
UW
23612016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2362
2363 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2364 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2365 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2366
35fd2deb 23672016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2368 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2369
2370 * tracepoint.c (write_inferior_int8): New function.
2371 (cmd_qtenable_disable): Write enable flag using
2372 write_inferior_int8.
2373
484b3c32
YQ
23742016-04-25 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2377 (need_step_over_p): Return zero if the LWP has pending signals
2378 can be delivered on software single step target.
2379
85ba7d86
YQ
23802016-04-25 Yao Qi <yao.qi@linaro.org>
2381
2382 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2383 return instead of error.
2384
3539aa13
YQ
23852016-04-22 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2388 to 23.
2389
5b061e98
YQ
23902016-04-22 Yao Qi <yao.qi@linaro.org>
2391
2392 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2393 signal when stepping over breakpoint with software single
2394 step.
2395
3451269c
PA
23962016-04-21 Pedro Alves <palves@redhat.com>
2397
2398 * linux-s390-low.c (s390_collect_ptrace_register)
2399 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2400 add casts.
2401 (s390_check_regset): Use void * instead of gdb_byte *.
2402
a2358508
PA
24032016-04-20 Pedro Alves <palves@redhat.com>
2404
2405 * configure: Renegerate.
2406
6885166d
YQ
24072016-04-20 Yao Qi <yao.qi@linaro.org>
2408
2409 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2410 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2411 number 16.
2412 (arm_store_gregset): Likewise.
2413
2b863f51
WT
24142016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2415
2416 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2417 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2418 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2419 (amd64-avx-mpx-linux.c): New rules.
2420 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2421 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2422 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2423 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2424 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2425 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2426 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2427 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2428 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2429 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2430 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2431 * linux-x86-low.c (x86_linux_read_description): Add case for
2432 X86_XSTATE_AVX_MPX_MASK.
2433 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2434 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2435 init_registers_i386_avx_mpx_linux.
2436 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2437 (initialize_low_tracepoint): Call
2438 init_registers_i386_avx_mpx_linux.
2439 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2440 (initialize_low_tracepoint): Call
2441 init_registers_amd64_avx_mpx_linux.
2442 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2443 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2444 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2445 declarations.
2446
9b30624b
PA
24472016-04-18 Pedro Alves <palves@redhat.com>
2448
2449 * configure: Regenerate.
2450
45e3745e
AT
24512016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2452
2453 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2454 (aarch64_emit_sub): Likewise.
2455
2afc13ff
PA
24562016-04-12 Pedro Alves <palves@redhat.com>
2457
2458 * utils.c (prepare_to_throw_exception): Delete.
2459
6e774b13
SM
24602016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2463
4dca19f8
MK
24642016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2465
2466 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2467
d0a9981f
MK
24682016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2469
2470 * linux-aarch64-ipa.c: Add <elf.h> include.
2471 * linux-ppc-ipa.c: Add <elf.h> include.
2472 * linux-s390-ipa.c: Add <elf.h> include.
2473
252db07e
MK
24742016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2475
2476 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2477 (get_raw_reg_ptr): Likewise.
2478 (get_trace_state_variable_value_ptr): Likewise.
2479 (set_trace_state_variable_value_ptr): Likewise.
2480 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2481 char *.
2482
14e2b6d9
MK
24832016-03-31 Wei-cheng Wang <cole945@gmail.com>
2484 Marcin Kościelnicki <koriakin@0x04.net>
2485
2486 PR/17221
2487 * linux-ppc-low.c (emit_insns): New function.
2488 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2489 (ppc_emit_prologue): New function.
2490 (ppc_emit_epilogue): New function.
2491 (ppc_emit_add): New function.
2492 (ppc_emit_sub): New function.
2493 (ppc_emit_mul): New function.
2494 (ppc_emit_lsh): New function.
2495 (ppc_emit_rsh_signed): New function.
2496 (ppc_emit_rsh_unsigned): New function.
2497 (ppc_emit_ext): New function.
2498 (ppc_emit_zero_ext): New function.
2499 (ppc_emit_log_not): New function.
2500 (ppc_emit_bit_and): New function.
2501 (ppc_emit_bit_or): New function.
2502 (ppc_emit_bit_xor): New function.
2503 (ppc_emit_bit_not): New function.
2504 (ppc_emit_equal): New function.
2505 (ppc_emit_less_signed): New function.
2506 (ppc_emit_less_unsigned): New function.
2507 (ppc_emit_ref): New function.
2508 (ppc_emit_const): New function.
2509 (ppc_emit_reg): New function.
2510 (ppc_emit_pop): New function.
2511 (ppc_emit_stack_flush): New function.
2512 (ppc_emit_swap): New function.
2513 (ppc_emit_stack_adjust): New function.
2514 (ppc_emit_call): New function.
2515 (ppc_emit_int_call_1): New function.
2516 (ppc_emit_void_call_2): New function.
2517 (ppc_emit_if_goto): New function.
2518 (ppc_emit_goto): New function.
2519 (ppc_emit_eq_goto): New function.
2520 (ppc_emit_ne_goto): New function.
2521 (ppc_emit_lt_goto): New function.
2522 (ppc_emit_le_goto): New function.
2523 (ppc_emit_gt_goto): New function.
2524 (ppc_emit_ge_goto): New function.
2525 (ppc_write_goto_address): New function.
2526 (ppc_emit_ops_impl): New static variable.
2527 (ppc64v1_emit_prologue): New function.
2528 (ppc64v2_emit_prologue): New function.
2529 (ppc64_emit_epilogue): New function.
2530 (ppc64_emit_add): New function.
2531 (ppc64_emit_sub): New function.
2532 (ppc64_emit_mul): New function.
2533 (ppc64_emit_lsh): New function.
2534 (ppc64_emit_rsh_signed): New function.
2535 (ppc64_emit_rsh_unsigned): New function.
2536 (ppc64_emit_ext): New function.
2537 (ppc64_emit_zero_ext): New function.
2538 (ppc64_emit_log_not): New function.
2539 (ppc64_emit_bit_and): New function.
2540 (ppc64_emit_bit_or): New function.
2541 (ppc64_emit_bit_xor): New function.
2542 (ppc64_emit_bit_not): New function.
2543 (ppc64_emit_equal): New function.
2544 (ppc64_emit_less_signed): New function.
2545 (ppc64_emit_less_unsigned): New function.
2546 (ppc64_emit_ref): New function.
2547 (ppc64_emit_const): New function.
2548 (ppc64v1_emit_reg): New function.
2549 (ppc64v2_emit_reg): New function.
2550 (ppc64_emit_pop): New function.
2551 (ppc64_emit_stack_flush): New function.
2552 (ppc64_emit_swap): New function.
2553 (ppc64v1_emit_call): New function.
2554 (ppc64v2_emit_call): New function.
2555 (ppc64v1_emit_int_call_1): New function.
2556 (ppc64v2_emit_int_call_1): New function.
2557 (ppc64v1_emit_void_call_2): New function.
2558 (ppc64v2_emit_void_call_2): New function.
2559 (ppc64_emit_if_goto): New function.
2560 (ppc64_emit_eq_goto): New function.
2561 (ppc64_emit_ne_goto): New function.
2562 (ppc64_emit_lt_goto): New function.
2563 (ppc64_emit_le_goto): New function.
2564 (ppc64_emit_gt_goto): New function.
2565 (ppc64_emit_ge_goto): New function.
2566 (ppc64v1_emit_ops_impl): New static variable.
2567 (ppc64v2_emit_ops_impl): New static variable.
2568 (ppc_emit_ops): New function.
2569 (linux_low_target): Wire in ppc_emit_ops.
2570
a2174ba4
MK
25712016-03-31 Wei-cheng Wang <cole945@gmail.com>
2572 Marcin Kościelnicki <koriakin@0x04.net>
2573
2574 PR/17221
2575 * Makefile.in: Add powerpc-*-ipa.o
2576 * configure.srv: Add ipa_obj for powerpc*-linux.
2577 * linux-ppc-ipa.c: New file.
2578 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2579 includes.
2580 (PPC_FIELD): New macro.
2581 (PPC_SEXT): New macro.
2582 (PPC_OP6): New macro.
2583 (PPC_BO): New macro.
2584 (PPC_LI): New macro.
2585 (PPC_BD): New macro.
2586 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2587 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2588 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2589 (ppc_get_thread_area): New function.
2590 (is_elfv2_inferior): New function.
2591 (gen_ds_form): New function.
2592 (GEN_STD): New macro.
2593 (GEN_STDU): New macro.
2594 (GEN_LD): New macro.
2595 (GEN_LDU): New macro.
2596 (gen_d_form): New function.
2597 (GEN_ADDI): New macro.
2598 (GEN_ADDIS): New macro.
2599 (GEN_LI): New macro.
2600 (GEN_LIS): New macro.
2601 (GEN_ORI): New macro.
2602 (GEN_ORIS): New macro.
2603 (GEN_LWZ): New macro.
2604 (GEN_STW): New macro.
2605 (GEN_STWU): New macro.
2606 (gen_xfx_form): New function.
2607 (GEN_MFSPR): New macro.
2608 (GEN_MTSPR): New macro.
2609 (GEN_MFCR): New macro.
2610 (GEN_MTCR): New macro.
2611 (GEN_SYNC): New macro.
2612 (GEN_LWSYNC): New macro.
2613 (gen_x_form): New function.
2614 (GEN_OR): New macro.
2615 (GEN_MR): New macro.
2616 (GEN_LWARX): New macro.
2617 (GEN_STWCX): New macro.
2618 (GEN_CMPW): New macro.
2619 (gen_md_form): New function.
2620 (GEN_RLDICL): New macro.
2621 (GEN_RLDICR): New macro.
2622 (gen_i_form): New function.
2623 (GEN_B): New macro.
2624 (GEN_BL): New macro.
2625 (gen_b_form): New function.
2626 (GEN_BNE): New macro.
2627 (GEN_LOAD): New macro.
2628 (GEN_STORE): New macro.
2629 (gen_limm): New function.
2630 (gen_atomic_xchg): New function.
2631 (gen_call): New function.
2632 (ppc_relocate_instruction): New function.
2633 (ppc_install_fast_tracepoint_jump_pad): New function.
2634 (ppc_get_min_fast_tracepoint_insn_len): New function.
2635 (ppc_get_ipa_tdesc_idx): New function.
2636 (the_low_target): Wire in the new functions.
2637 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2638 tdescs.
2639 * linux-ppc-tdesc.h: New file.
2640
a13c4696
MK
26412016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2642
2643 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2644 (alloc_jump_pad_buffer): New function.
2645 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2646 (alloc_jump_pad_buffer): New function.
2647 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2648 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2649 (alloc_jump_pad_buffer): New function.
2650 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2651 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2652 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2653 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2654
1cda1512
MK
26552016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2656
2657 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2658 * linux-amd64-ipa.c: Likewise.
2659 * linux-i386-ipa.c: Likewise.
2660 * linux-s390-ipa.c: Likewise.
2661 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2662 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2663 set_trace_state_variable_value_ptr.
2664 (struct ipa_sym_addresses): Likewise.
2665 (symbol_list): Likewise.
2666 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2667 accessing gdb_collect directly.
2668 (gdb_collect_ptr_type): New typedef.
2669 (get_raw_reg_ptr_type): New typedef.
2670 (get_trace_state_variable_value_ptr_type): New typedef.
2671 (set_trace_state_variable_value_ptr_type): New typedef.
2672 (gdb_collect_ptr): New global.
2673 (get_raw_reg_ptr): New global.
2674 (get_trace_state_variable_value_ptr): New global.
2675 (set_trace_state_variable_value_ptr): New global.
2676 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2677 accessing get_raw_reg directly.
2678 (get_get_tsv_func_addr): Likewise for
2679 get_trace_state_variable_value_ptr.
2680 (get_set_tsv_func_addr): Likewise for
2681 set_trace_state_variable_value_ptr.
2682 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2683
72fb5488
SM
26842016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2687
28170b88
MK
26882016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2689
2690 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2691 packets.
2692 (relocate_instruction): Remove own_buf.
2693 * server.c (own_buf): Make global.
2694 (handle_v_requests): Make global.
2695 * server.h (own_buf): New declaration.
2696 (handle_v_requests): New prototype.
2697
f39e8743
MK
26982016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2699
2700 PR 18377
2701 * linux-s390-low.c (add_insns): New function.
2702 (s390_emit_prologue): New function.
2703 (s390_emit_epilogue): New function.
2704 (s390_emit_add): New function.
2705 (s390_emit_sub): New function.
2706 (s390_emit_mul): New function.
2707 (s390_emit_lsh): New function.
2708 (s390_emit_rsh_signed): New function.
2709 (s390_emit_rsh_unsigned): New function.
2710 (s390_emit_ext): New function.
2711 (s390_emit_log_not): New function.
2712 (s390_emit_bit_and): New function.
2713 (s390_emit_bit_or): New function.
2714 (s390_emit_bit_xor): New function.
2715 (s390_emit_bit_not): New function.
2716 (s390_emit_equal): New function.
2717 (s390_emit_less_signed): New function.
2718 (s390_emit_less_unsigned): New function.
2719 (s390_emit_ref): New function.
2720 (s390_emit_if_goto): New function.
2721 (s390_emit_goto): New function.
2722 (s390_write_goto_address): New function.
2723 (s390_emit_litpool): New function.
2724 (s390_emit_const): New function.
2725 (s390_emit_call): New function.
2726 (s390_emit_reg): New function.
2727 (s390_emit_pop): New function.
2728 (s390_emit_stack_flush): New function.
2729 (s390_emit_zero_ext): New function.
2730 (s390_emit_swap): New function.
2731 (s390_emit_stack_adjust): New function.
2732 (s390_emit_set_r2): New function.
2733 (s390_emit_int_call_1): New function.
2734 (s390_emit_void_call_2): New function.
2735 (s390_emit_eq_goto): New function.
2736 (s390_emit_ne_goto): New function.
2737 (s390_emit_lt_goto): New function.
2738 (s390_emit_le_goto): New function.
2739 (s390_emit_gt_goto): New function.
2740 (s390_emit_ge_goto): New function.
2741 (s390x_emit_prologue): New function.
2742 (s390x_emit_epilogue): New function.
2743 (s390x_emit_add): New function.
2744 (s390x_emit_sub): New function.
2745 (s390x_emit_mul): New function.
2746 (s390x_emit_lsh): New function.
2747 (s390x_emit_rsh_signed): New function.
2748 (s390x_emit_rsh_unsigned): New function.
2749 (s390x_emit_ext): New function.
2750 (s390x_emit_log_not): New function.
2751 (s390x_emit_bit_and): New function.
2752 (s390x_emit_bit_or): New function.
2753 (s390x_emit_bit_xor): New function.
2754 (s390x_emit_bit_not): New function.
2755 (s390x_emit_equal): New function.
2756 (s390x_emit_less_signed): New function.
2757 (s390x_emit_less_unsigned): New function.
2758 (s390x_emit_ref): New function.
2759 (s390x_emit_if_goto): New function.
2760 (s390x_emit_const): New function.
2761 (s390x_emit_call): New function.
2762 (s390x_emit_reg): New function.
2763 (s390x_emit_pop): New function.
2764 (s390x_emit_stack_flush): New function.
2765 (s390x_emit_zero_ext): New function.
2766 (s390x_emit_swap): New function.
2767 (s390x_emit_stack_adjust): New function.
2768 (s390x_emit_int_call_1): New function.
2769 (s390x_emit_void_call_2): New function.
2770 (s390x_emit_eq_goto): New function.
2771 (s390x_emit_ne_goto): New function.
2772 (s390x_emit_lt_goto): New function.
2773 (s390x_emit_le_goto): New function.
2774 (s390x_emit_gt_goto): New function.
2775 (s390x_emit_ge_goto): New function.
2776 (s390_emit_ops): New function.
2777 (struct linux_target_ops): Fill in emit_ops hook.
2778
abd9baf9
MK
27792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2780
2781 PR 18377
2782 * Makefile.in: Add s390 IPA files.
2783 * configure.srv: Build IPA for s390.
2784 * linux-s390-ipa.c: New file.
2785 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2786 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2787 (tdesc_s390_linux32): Likewise.
2788 (init_registers_s390_linux32v1): Likewise.
2789 (tdesc_s390_linux32v1): Likewise.
2790 (init_registers_s390_linux32v2): Likewise.
2791 (tdesc_s390_linux32v2): Likewise.
2792 (init_registers_s390_linux64): Likewise.
2793 (tdesc_s390_linux64): Likewise.
2794 (init_registers_s390_linux64v1): Likewise.
2795 (tdesc_s390_linux64v1): Likewise.
2796 (init_registers_s390_linux64v2): Likewise.
2797 (tdesc_s390_linux64v2): Likewise.
2798 (init_registers_s390_te_linux64): Likewise.
2799 (tdesc_s390_te_linux64): Likewise.
2800 (init_registers_s390_vx_linux64): Likewise.
2801 (tdesc_s390_vx_linux64): Likewise.
2802 (init_registers_s390_tevx_linux64): Likewise.
2803 (tdesc_s390_tevx_linux64): Likewise.
2804 (init_registers_s390x_linux64): Likewise.
2805 (tdesc_s390x_linux64): Likewise.
2806 (init_registers_s390x_linux64v1): Likewise.
2807 (tdesc_s390x_linux64v1): Likewise.
2808 (init_registers_s390x_linux64v2): Likewise.
2809 (tdesc_s390x_linux64v2): Likewise.
2810 (init_registers_s390x_te_linux64): Likewise.
2811 (tdesc_s390x_te_linux64): Likewise.
2812 (init_registers_s390x_vx_linux64): Likewise.
2813 (tdesc_s390x_vx_linux64): Likewise.
2814 (init_registers_s390x_tevx_linux64): Likewise.
2815 (tdesc_s390x_tevx_linux64): Likewise.
2816 (have_hwcap_s390_vx): New static variable.
2817 (s390_arch_setup): Fill have_hwcap_s390_vx.
2818 (s390_get_thread_area): New function.
2819 (s390_ft_entry_gpr_esa): New const.
2820 (s390_ft_entry_gpr_zarch): New const.
2821 (s390_ft_entry_misc): New const.
2822 (s390_ft_entry_fr): New const.
2823 (s390_ft_entry_vr): New const.
2824 (s390_ft_main_31): New const.
2825 (s390_ft_main_64): New const.
2826 (s390_ft_exit_fr): New const.
2827 (s390_ft_exit_vr): New const.
2828 (s390_ft_exit_misc): New const.
2829 (s390_ft_exit_gpr_esa): New const.
2830 (s390_ft_exit_gpr_zarch): New const.
2831 (append_insns): New function.
2832 (s390_relocate_instruction): New function.
2833 (s390_install_fast_tracepoint_jump_pad): New function.
2834 (s390_get_min_fast_tracepoint_insn_len): New function.
2835 (s390_get_ipa_tdesc_idx): New function.
2836 (struct linux_target_ops): Wire in the above functions.
2837 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2838 * linux-s390-tdesc.h: New file.
2839
a4105d04
MK
28402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2841
2842 * linux-s390-low.c (s390_supports_tracepoints): New function.
2843 (struct linux_target_ops): Fill supports_tracepoints hook.
2844
35ac8b3e
YQ
28452016-03-18 Yao Qi <yao.qi@linaro.org>
2846
2847 * linux-low.c (lwp_signal_can_be_delivered): New function.
2848 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2849
94610ec4
YQ
28502016-03-18 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2853 0 if signal is enqueued. Remove 'signal' from one debugging
2854 message. Move one debugging message to some lines below.
2855 Remove code setting 'signal' to 0.
2856
80aea927
YQ
28572016-03-18 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-low.c (linux_low_filter_event): Remove redundant
2860 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2861
b04fd3be
MK
28622016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2863
2864 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2865 (struct linux_target_ops): Wire in the above.
2866
c40c8d4b
YQ
28672016-03-03 Yao Qi <yao.qi@linaro.org>
2868
2869 * linux-low.c: Update comments to start_step_over.
2870
0f8288ae
YQ
28712016-03-03 Yao Qi <yao.qi@linaro.org>
2872
2873 PR server/19736
2874 * linux-low.c (handle_extended_wait): Set child suspended
2875 if event_lwp->bp_reinsert isn't zero.
2876
fdbd04a8
YQ
28772016-03-02 Yao Qi <yao.qi@linaro.org>
2878
2879 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2880 enqueue_pending_signal.
2881
6896a8fa
MK
28822016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2883
2884 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2885 is actually loaded.
2886
ab503087
MK
28872016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2888
2889 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2890 (s390_regmap_3264) [!__s390x__]: New global.
2891 (s390_collect_ptrace_register): Skip map entries containing -1.
2892 (s390_supply_ptrace_register): Ditto.
2893 (s390_fill_gprs_high): New function.
2894 (s390_store_gprs_high): New function.
2895 (s390_regsets): Add NT_S390_HIGH_GPRS.
2896 (s390_get_hwcap): Enable on 31-bit.
2897 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2898 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2899 Detect NT_S390_HIGH_GPRS.
2900 (s390_usrregs_info_3264): Enable on 31-bit.
2901 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2902 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2903
ae91f625
MK
29042016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2905
2906 PR gdb/13808
2907 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2908 * configure.srv: Ditto.
2909 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2910 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2911 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2912 (init_registers_amd64_linux): Remove prototype.
2913 (tdesc_amd64_linux): Remove declaration.
2914 (get_ipa_tdesc): New function.
2915 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2916 initialize remaining tdescs.
2917 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2918 (init_registers_i386_linux): Remove prototype.
2919 (tdesc_i386_linux): Remove declaration.
2920 (get_ipa_tdesc): New function.
2921 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2922 initialize remaining tdescs.
2923 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2924 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2925 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2926 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2927 (x86_get_ipa_tdesc_idx): New function.
2928 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2929 * linux-x86-tdesc.h: New file.
2930 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2931 (target_get_ipa_tdesc_idx): New macro.
2932 * tracepoint.c (ipa_tdesc_idx): New macro.
2933 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2934 (symbol_list): Add ipa_tdesc_idx.
2935 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2936 (ipa_tdesc): Remove.
2937 (ipa_tdesc_idx): New variable.
2938 (get_context_regcache): Use get_ipa_tdesc.
2939 (gdb_collect): Ditto.
2940 (gdb_probe): Ditto.
2941 * tracepoint.h (get_ipa_tdesc): New prototype.
2942 (ipa_tdesc): Remove.
2943
e7ad2f14
PA
29442016-02-24 Pedro Alves <palves@redhat.com>
2945
2946 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2947 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2948 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2949 Factor out common code between the USE_SIGTRAP_SIGINFO and
2950 !USE_SIGTRAP_SIGINFO blocks.
2951 (linux_low_filter_event): Call save_stop_reason instead of
2952 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2953 Update comments.
2954 (linux_wait_1): Update comments.
2955
657f9cde
WW
29562016-02-24 Wei-cheng Wang <cole945@gmail.com>
2957
2958 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2959 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2960 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2961 ppc_insert_point, ppc_remove_point.
2962
b00b61e1
MK
29632016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2964
2965 * linux-s390-low.c (s390_supports_z_point_type): New function.
2966 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2967
553cb527
YQ
29682016-02-16 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2971 PC. Get pc from regcache_read_pc.
2972
a5652c21
YQ
29732016-02-12 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2976 or linux_get_pc_32bit.
2977 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2978
ed443b61
YQ
29792016-02-12 Yao Qi <yao.qi@linaro.org>
2980
2981 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2982 arm_linux_get_next_pcs_fixup.
2983
020ecd38
MK
29842016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2985
2986 * tracepoint.c (x_tracepoint_action_download): Change
2987 write_inferior_data_ptr to write_inferior_data_pointer.
2988 (cmd_qtstart): Likewise.
2989 (write_inferior_data_ptr): Remove.
2990 (download_agent_expr): Change write_inferior_data_ptr to
2991 write_inferior_data_pointer.
2992 (download_tracepoint_1): Likewise.
2993 (download_tracepoint): Likewise.
2994 (download_trace_state_variables): Likewise.
2995
7cae9051
WW
29962016-02-11 Wei-cheng Wang <cole945@gmail.com>
2997 Marcin Kościelnicki <koriakin@0x04.net>
2998
2999 * tracepoint.c (struct tracepoint_action_ops): Remove.
3000 (struct tracepoint_action): Remove ops.
3001 (m_tracepoint_action_download, r_tracepoint_action_download)
3002 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3003 size and offset accordingly.
3004 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3005 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3006 (tracepoint_action_send, tracepoint_action_download): New functions.
3007 Helpers for trace action handlers.
3008 (add_tracepoint_action): Remove setup actions ops.
3009 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3010
9f6a71b4
YQ
30112016-02-10 Yao Qi <yao.qi@linaro.org>
3012
3013 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3014
1e94266c
SM
30152016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3018 to AC_OUTPUT.
3019 * configure: Regenerate.
3020
8adce034
SM
30212016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3024 void * to gdb_byte *.
3025 * linux-low.c (siginfo_fixup): Likewise.
3026 (linux_xfer_siginfo): Likewise.
3027 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3028 Likewise.
3029 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3030
93813b37
WT
30312016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3032
3033 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3034 to srv_tgtobj.
3035 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3036 to srv_tgtobj.
3037 * linux-x86-low.c [__x86_64__]: Include
3038 "nat/amd64-linux-siginfo.h".
3039 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3040 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3041 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3042 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3043 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3044 (cpt_si_fd, si_timerid, si_overrun): Move from
3045 nat/amd64-linux-siginfo.c.
3046 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3047
8424cc97
SM
30482016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3049
3050 * server.c (skip_to_semicolon): Remove.
3051 (process_point_options): Use strchrnul instead of
3052 skip_to_semicolon.
3053
4d18591b
YQ
30542016-01-26 Yao Qi <yao.qi@linaro.org>
3055
3056 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3057 * linux-low.c (install_software_single_step_breakpoints): Don't
3058 call regcache_read_pc.
3059 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3060 argument pc.
3061
d8020970
YQ
30622016-01-26 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-low.c (install_software_single_step_breakpoints): Call
3065 regcache_read_pc instead of get_pc.
3066
8b207339
YQ
30672016-01-26 Yao Qi <yao.qi@linaro.org>
3068
3069 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3070 (unblock_async_io): Rename to ...
3071 (block_unblock_async_io): ... it. New function.
3072 (enable_async_io): Don't install SIGIO handler. Unblock it
3073 instead.
3074 (disable_async_io): Don't ignore SIGIO. Block it instead.
3075 (initialize_async_io): Install SIGIO handler. Don't call
3076 unblock_async_io.
3077
18879fef
YQ
30782016-01-26 Yao Qi <yao.qi@linaro.org>
3079
3080 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3081 first character is '\003', call *the_target->request_interrupt.
3082
a0f8e08a
YQ
30832016-01-25 Yao Qi <yao.qi@linaro.org>
3084
3085 * remote-utils.c (new_thread_notify): Remove.
3086 (dead_thread_notify): Likewise.
3087 * remote-utils.h (new_thread_notify): Remove declaration.
3088 (dead_thread_notify): Likewise.
3089
cc5fd9ab
MK
30902016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3091
3092 * gdb.trace/pending.exp: Fix expected message on continue.
3093
99e8eb11
MK
30942016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3095
3096 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3097 it works properly on big-endian machines where sizeof (CORE_ADDR)
3098 != sizeof (void *).
3099
a994041d
PA
31002016-01-21 Pedro Alves <palves@redhat.com>
3101
3102 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3103 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3104 * configure: Regenerate.
3105
f7a6a40d
YQ
31062016-01-21 Yao Qi <yao.qi@linaro.org>
3107
3108 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3109 is_thumb and set it according to CPSR saved on the stack.
3110 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3111 arm_sigreturn_next_pc.
3112
6f69e520
YQ
31132016-01-18 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-low.c (linux_set_pc_64bit): New function.
3116 (linux_get_pc_64bit): New function.
3117 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3118 Declare.
3119 * linux-sparc-low.c (debug_threads): Remove declaration.
3120 (sparc_get_pc): Remove.
3121 (the_low_target): Use linux_get_pc_64bit instead of
3122 sparc_get_pc.
3123 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3124 (the_low_target): Use linux_get_pc_64bit and
3125 linux_set_pc_64bit.
3126
276d4552
YQ
31272016-01-18 Yao Qi <yao.qi@linaro.org>
3128
3129 * linux-arm-low.c (debug_threads): Remove declaration.
3130 (arm_get_pc, arm_set_pc): Remove.
3131 (the_low_target): Use linux_get_pc_32bit and
3132 linux_set_pc_32bit.
3133 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3134 (the_low_target): Use linux_get_pc_32bit and
3135 linux_set_pc_32bit.
3136 * linux-cris-low.c (debug_threads): Remove declaration.
3137 (cris_get_pc, cris_set_pc,): Remove.
3138 (the_low_target): Use linux_get_pc_32bit and
3139 linux_set_pc_32bit.
3140 * linux-crisv32-low.c (debug_threads): Remove declaration.
3141 (cris_get_pc, cris_set_pc): Remove.
3142 (the_low_target): Use linux_get_pc_32bit and
3143 linux_set_pc_32bit.
3144 * linux-low.c: Include inttypes.h.
3145 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3146 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3147 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3148 (the_low_target): Use linux_get_pc_32bit and
3149 linux_set_pc_32bit.
3150 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3151 (the_low_target): Use linux_get_pc_32bit and
3152 linux_set_pc_32bit.
3153 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3154 (the_low_target): Use linux_get_pc_32bit and
3155 linux_set_pc_32bit.
3156 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3157 (the_low_target): Use linux_get_pc_32bit and
3158 linux_set_pc_32bit.
3159 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3160 (the_low_target): Use linux_get_pc_32bit and
3161 linux_set_pc_32bit.
3162
eb0edac8
GB
31632016-01-18 Gary Benson <gbenson@redhat.com>
3164
3165 * configure.ac (AC_FUNC_FORK): New check.
3166 * config.in: Regenerate.
3167 * configure: Likewise.
3168
1b451dda
YQ
31692016-01-14 Yao Qi <yao.qi@linaro.org>
3170
3171 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3172 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3173 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3174 arm_get_next_pcs_ctor.
3175
82075af2
JS
31762016-01-12 Josh Stone <jistone@redhat.com>
3177 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3178
3179 * inferiors.h: Include "gdb_vecs.h".
3180 (struct process_info): Add syscalls_to_catch.
3181 * inferiors.c (remove_process): Free syscalls_to_catch.
3182 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3183 syscall_return stops.
3184 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3185 * server.c (handle_general_set): Handle QCatchSyscalls.
3186 (handle_query): Report support for QCatchSyscalls.
3187 * target.h (struct target_ops): Add supports_catch_syscall.
3188 (target_supports_catch_syscall): New macro.
3189 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3190 (struct lwp_info): Add syscall_state.
3191 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3192 Maintain syscall_state and syscalls_to_catch across exec.
3193 (get_syscall_trapinfo): New function, proxy to the_low_target.
3194 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3195 (linux_low_filter_event): Toggle syscall_state entry/return for
3196 syscall traps, and set it ignored for all others.
3197 (gdb_catching_syscalls_p): New function.
3198 (gdb_catch_this_syscall_p): New function.
3199 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3200 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3201 (linux_supports_catch_syscall): New function.
3202 (linux_target_ops): Install it.
3203 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3204 (the_low_target): Install it.
3205
8f13a3ce
MF
32062016-01-12 Mike Frysinger <vapier@gentoo.org>
3207
3208 * acinclude.m4: Include new ../warning.m4 file.
3209 * configure: Regenerated.
3210 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3211
5b3da067
MF
32122016-01-12 Mike Frysinger <vapier@gentoo.org>
3213
3214 * ax.c (is_goto_target): Mark static.
3215 * linux-low.c (register_addr): Likewise.
3216 (linux_fetch_registers, linux_store_registers): Likewise.
3217 * mem-break.c (any_persistent_commands): Fix old prototype.
3218 (add_commands_to_breakpoint): Mark static.
3219 * regcache.c (find_register_by_name): Delete unused func.
3220 * remote-utils.c (hex_or_minus_one): Mark static.
3221 * server.c (monitor_show_help): Mark static.
3222 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3223 handle_v_requests): Likewise.
3224
bc504a31
PA
32252016-01-12 Pedro Alves <palves@redhat.com>
3226
3227 Remove use of the registered trademark symbol throughout.
3228
5a0dd67a
YQ
32292016-01-08 Yao Qi <yao.qi@linaro.org>
3230
3231 * remote-utils.c (getpkt): If c is '\003', call target hook
3232 request_interrupt.
3233
b2ca446f
YQ
32342016-01-06 Yao Qi <yao.qi@linaro.org>
3235
3236 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3237 linux-aarch32-low.c.
3238 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3239 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3240 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3241 (thumb2_breakpoint): Declare.
3242 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3243 linux-aarch32-low.h.
3244 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3245 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3246 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3247
edd88788
JB
32482016-01-01 Joel Brobecker <brobecker@adacore.com>
3249
3250 * gdbreplay.c (gdbreplay_version): Change copyright year in
3251 version message.
3252 * server.c (gdbserver_version): Likewise.
3253
65da7f14
PP
32542015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3255
3256 * server.c (crc32_table): Delete.
3257 (crc32): Use libiberty's xcrc32 function.
3258
4abd5ed2
JB
32592015-12-22 Joel Brobecker <brobecker@adacore.com>
3260
3261 * lynx-low.c (lynx_delete_thread_callback): New function.
3262 (lynx_mourn): Properly delete our process and all of its
3263 threads. Remove call to clear_inferiors.
3264
0e50fe5c
JB
32652015-12-22 Joel Brobecker <brobecker@adacore.com>
3266
3267 * target.c (thread_search_callback): Add check that
3268 the thread_stopped target callback is not NULL before
3269 calling it.
3270
35adc03f
YQ
32712015-12-21 Yao Qi <yao.qi@linaro.org>
3272
3273 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3274 arm breakpoint.
3275
bd2b2909
AT
32762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3277
3278 * server.c (handle_query): Call target_supports_software_single_step.
3279
7fe5e27e
AT
32802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3281
3282 * linux-low.c (single_step): New function.
3283 (linux_resume_one_lwp_throw): Call single_step.
3284 (start_step_over): Likewise.
3285
d9311bfa
AT
32862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3287
3288 * Makefile.in (SFILES): Append arch/arm-linux.c,
3289 arch/arm-get-next-pcs.c.
3290 (arm-linux.o): New rule.
3291 (arm-get-next-pcs.o): New rule.
3292 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3293 arm-linux.o.
3294 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3295 to linux-aarch32-low.c.
3296 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3297 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3298 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3299 (thumb2_breakpoint_len): Likewise.
3300 (arm_is_thumb_mode): Make non-static.
3301 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3302 from linux-aarch32-low.c.
3303 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3304 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3305 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3306 (thumb2_breakpoint_len): Likewise.
3307 (arm_is_thumb_mode): New declaration.
3308 * linux-arm-low.c: Include arch/arm-linux.h
3309 aarch/arm-get-next-pcs.h, sys/syscall.h.
3310 (get_next_pcs_ops): New struct.
3311 (get_next_pcs_addr_bits_remove): New function.
3312 (get_next_pcs_is_thumb): New function.
3313 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3314 (arm_sigreturn_next_pc): Likewise.
3315 (get_next_pcs_syscall_next_pc): Likewise.
3316 (arm_gdbserver_get_next_pcs): Likewise.
3317 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3318 Initialize.
3319 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3320 * server.h: Include gdb_vecs.h.
3321
68ce2059
AT
33222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3323
3324 * Makefile.in (SFILES): Append common/common-regcache.c.
3325 (OBS): Append common-regcache.o.
3326 (common-regcache.o): New rule.
3327 * regcache.c (init_register_cache): Initialize cache to
3328 REG_UNAVAILABLE.
3329 (regcache_raw_read_unsigned): New function.
3330 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3331 register_status enum.
3332
fa5308bd
AT
33332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3334
3335 * linux-aarch64-low.c (the_low_targets): Rename
3336 breakpoint_reinsert_addr to get_next_pcs.
3337 * linux-arm-low.c (the_low_targets): Likewise.
3338 * linux-bfin-low.c (the_low_targets): Likewise.
3339 * linux-cris-low.c (the_low_targets): Likewise.
3340 * linux-crisv32-low.c (the_low_targets): Likewise.
3341 * linux-low.c (can_software_single_step): Likewise.
3342 (install_software_single_step_breakpoints): New function.
3343 (start_step_over): Use install_software_single_step_breakpoints.
3344 * linux-low.h: New CORE_ADDR vector.
3345 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3346 get_next_pcs.
3347 * linux-mips-low.c (the_low_targets): Likewise.
3348 * linux-nios2-low.c (the_low_targets): Likewise.
3349 * linux-sparc-low.c (the_low_targets): Likewise.
3350
4a6ed09b
PA
33512015-12-17 Pedro Alves <palves@redhat.com>
3352
3353 * linux-low.c (linux_kill_one_lwp): Remove references to
3354 LinuxThreads.
3355 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3356 to 'kill'.
3357 (linux_init_signals): Delete.
3358 (initialize_low): Adjust.
3359 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3360
7544db95
PA
33612015-12-16 Pedro Alves <palves@redhat.com>
3362
3363 * configure.ac (compiler warning flags): When testing a
3364 -Wno-foo option, check whether -Wfoo works instead.
3365 * configure: Regenerate.
3366
8020350c
DB
33672015-12-11 Don Breazeal <donb@codesourcery.com>
3368
3369 * server.c (process_serial_event): Don't exit from gdbserver
3370 in remote mode if there are still active inferiors.
3371
db91f502
YQ
33722015-12-11 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3375 arm_breakpoint_at if the process is 32-bit.
3376
b37a6290
YQ
33772015-12-11 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3380 arm breakpoint.
3381
17b1509a
YQ
33822015-12-07 Yao Qi <yao.qi@linaro.org>
3383
3384 * configure.srv: Append arm.o to srv_tgtobj for
3385 aarch64*-*-linux* target.
3386 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3387 from linux-arm-low.c.
3388 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3389 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3390 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3391 (thumb2_breakpoint_len): Likewise.
3392 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3393 (arm_breakpoint_kinds): Likewise.
3394 (arm_breakpoint_kind_from_pc): Likewise.
3395 (arm_sw_breakpoint_from_kind): Likewise.
3396 (arm_breakpoint_kind_from_current_state): Likewise.
3397 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3398 (arm_sw_breakpoint_from_kind): Declare.
3399 (arm_breakpoint_kind_from_current_state): Declare.
3400 (arm_breakpoint_at): Declare.
3401 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3402 arm_sw_breakpoint_from_kind if process is 32-bit.
3403 (aarch64_breakpoint_kind_from_pc): New function.
3404 (aarch64_breakpoint_kind_from_current_state): New function.
3405 (the_low_target): Initialize fields breakpoint_kind_from_pc
3406 and breakpoint_kind_from_current_state.
3407 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3408 linux-aarch32-low.c.
3409 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3410 (arm_breakpoint, arm_breakpoint_len): Likewise.
3411 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3412 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3413 (arm_is_thumb_mode): Likewise.
3414 (arm_breakpoint_at): Likewise.
3415 (arm_breakpoint_kind_from_pc): Likewise.
3416 (arm_sw_breakpoint_from_kind): Likewise.
3417 (arm_breakpoint_kind_from_current_state): Likewise.
3418
3419 Revert:
3420 2015-08-04 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3423 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3424 * server.c (extended_protocol): Remove "static".
3425 * server.h (extended_protocol): Declare it.
3426
ece66d65
JS
34272015-12-04 Josh Stone <jistone@redhat.com>
3428
3429 * target.h (struct target_ops) <arch_setup>: Rename to ...
3430 (struct target_ops) <post_create_inferior>: ... this.
3431 (target_arch_setup): Rename to ...
3432 (target_post_create_inferior): ... this, calling post_create_inferior.
3433 * server.c (start_inferior): Update target_arch_setup calls to
3434 target_post_create_inferior.
3435 * linux-low.c (linux_low_ptrace_options): Forward declare.
3436 (linux_arch_setup): Update its comment for general use.
3437 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3438 (struct linux_target_ops): Use linux_post_create_inferior.
3439 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3440 to post_create_inferior.
3441 * nto-low.c (struct nto_target_ops): Likewise.
3442 * spu-low.c (struct spu_target_ops): Likewise.
3443 * win32-low.c (struct win32_target_ops): Likewise.
3444
e58c48b4
AT
34452015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3446
3447 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3448
fbec8956
AT
34492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3450
3451 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3452 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3453 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3454 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3455 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3456 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3457 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3458 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3459 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3460 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3461 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3462 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3463
9b4c5f87
AT
34642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3465
3466 * linux-low.c (linux_look_up_symbols): Don't call
3467 linux_supports_traceclone.
3468 * linux-low.h (thread_db_init): Remove use_events argument.
3469 * thread-db.c (thread_db_use_event): Remove global variable.
3470 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3471 (struct thread_db) <td_create_bp>: Remove field.
3472 (thread_db_create_event): Remove function.
3473 (thread_db_enable_reporting): Likewise.
3474 (find_one_thread): Don't check for thread_db_use_events.
3475 (attach_thread): Likewise.
3476 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3477 (try_thread_db_load_1): Don't check for thread_db_use_events.
3478 (thread_db_init): Remove use_events argument and thread events
3479 handling.
3480 (remove_thread_event_breakpoints): Remove function.
3481 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3482
7d00775e
AT
34832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3484
3485 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3486 New function.
3487 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3488 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3490 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3491 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3492 Initialize.
3493 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3494 New function.
3495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3496 * linux-low.c (can_hardware_single_step): Use
3497 supports_hardware_single_step.
3498 (can_software_single_step): New function.
3499 (start_step_over): Call can_software_single_step.
3500 (linux_supports_hardware_single_step): New function.
3501 (struct target_ops) <supports_software_single_step>: Initialize.
3502 * linux-low.h (struct linux_target_ops)
3503 <supports_hardware_single_step>: Initialize.
3504 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3506 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3507 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3508 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3509 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3510 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3512 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3513 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3514 Initialize.
3515 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3516 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3517 Initialize.
3518 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3520 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3521 New function.
3522 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3523 * target.h (struct target_ops): <supports_software_single_step>:
3524 New field.
3525 (target_supports_software_single_step): New macro.
3526
2d97cd35
AT
35272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3528
3529 * linux-low.c (linux_wait_1): Fix pc advance condition.
3530 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3531 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3532
769ef81f
AT
35332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3534
3535 * linux-arm-low.c (arm_is_thumb_mode): New function.
3536 (arm_breakpoint_at): Use arm_is_thumb_mode.
3537 (arm_breakpoint_kind_from_current_state): New function.
3538 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3539 Initialize.
3540 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3541 (linux_breakpoint_kind_from_current_state): New function.
3542 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3543 * linux-low.h (struct linux_target_ops)
3544 <breakpoint_kind_from_current_state>: New field.
3545 * target.h (struct target_ops): Likewise.
3546 (target_breakpoint_kind_from_current_state): New macro.
3547
1bebeeca
PA
35482015-11-30 Pedro Alves <palves@redhat.com>
3549
3550 * linux-low.c (linux_resume): Wake up the event loop before
3551 returning.
3552
a67a9fae
PA
35532015-11-30 Pedro Alves <palves@redhat.com>
3554
3555 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3556 check.
3557 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3558 to -1.
3559 * target.c (struct thread_search): New structure.
3560 (thread_search_callback): New function.
3561 (prev_general_thread): New global.
3562 (prepare_to_access_memory, done_accessing_memory): New functions.
3563 * target.h (prepare_to_access_memory, done_accessing_memory):
3564 Replace macros with function declarations.
3565
f2faf941
PA
35662015-11-30 Pedro Alves <palves@redhat.com>
3567
3568 PR 14618
3569 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3570 report TARGET_WAITKIND_NO_RESUMED.
3571 * remote-utils.c (prepare_resume_reply): Handle
3572 TARGET_WAITKIND_NO_RESUMED.
3573 * server.c (report_no_resumed): New global.
3574 (handle_query) <qSupported>: Handle "no-resumed+". Report
3575 "no-resumed+" support.
3576 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3577 return error if the client doesn't support no-resumed events.
3578 (push_stop_notification): New function.
3579 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3580 events if the client supports them.
3581
a681f9c9
PA
35822015-11-30 Pedro Alves <palves@redhat.com>
3583
3584 * linux-low.c (thread_still_has_status_pending_p): Don't check
3585 vCont;t here.
3586 (lwp_resumed): New function.
3587 (status_pending_p_callback): Return early if the LWP is not
3588 supposed to be resumed.
3589
65706a29
PA
35902015-11-30 Pedro Alves <palves@redhat.com>
3591
3592 * linux-low.c (handle_extended_wait): Assert that the LWP's
3593 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3594 thread create events, leave the new child's status pending.
3595 (linux_low_filter_event): If GDB wants to hear about thread exit
3596 events, leave the LWP marked dead and don't delete it.
3597 (linux_wait_for_event_filtered): Don't check for thread exit.
3598 (filter_exit_event): New function.
3599 (linux_wait_1): Use it, when returning an exit event.
3600 (linux_resume_one_lwp_throw): Assert that the LWP's
3601 waitstatus is TARGET_WAITKIND_IGNORE.
3602 * remote-utils.c (prepare_resume_reply): Handle
3603 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3604 * server.c (report_thread_events): New global.
3605 (handle_general_set): Handle QThreadEvents.
3606 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3607 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3608 TARGET_WAITKIND_THREAD_EXITED.
3609 * server.h (report_thread_events): Declare.
3610
56cf4bed
PA
36112015-11-30 Pedro Alves <palves@redhat.com>
3612
3613 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3614 the thread's last_resume_kind was resume_stop.
3615
500c1d85
PA
36162015-11-30 Pedro Alves <palves@redhat.com>
3617
3618 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3619 before returning.
3620
de979965
PA
36212015-11-30 Pedro Alves <palves@redhat.com>
3622
3623 * server.c (handle_v_requests): Handle vCtrlC.
3624
34c65914
PA
36252015-11-30 Pedro Alves <palves@redhat.com>
3626
3627 * gdbthread.h (find_any_thread_of_pid): Declare.
3628 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3629 functions.
3630 * server.c (handle_query): If current_thread is NULL, look for
3631 another thread of the selected process.
3632
79efa585 36332015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3634 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3635
3636 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3637 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3638 name in reply.
3639 * target.h (struct target_ops) <thread_name>: New field.
3640 (target_thread_name): New macro.
3641
80d82c19
JB
36422015-11-23 Joel Brobecker <brobecker@adacore.com>
3643
3644 * regcache.h (regcache_invalidate_pid): Add declaration.
3645 * regcache.c (regcache_invalidate_pid): New function, extracted
3646 from regcache_invalidate.
3647 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3648 Add trivial documentation comment.
3649 * lynx-low.c: Use regcache_invalidate_pid instead of
3650 regcache_invalidate.
3651
64da5dd5
JB
36522015-11-23 Joel Brobecker <brobecker@adacore.com>
3653
3654 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3655 and Elf64_auxv_t if the target is Android.
3656
37ce4055
DE
36572015-11-22 Doug Evans <xdje42@gmail.com>
3658
3659 * target.h: #include <sys/types.h>.
3660
06e03fff
PA
36612015-11-19 Pedro Alves <palves@redhat.com>
3662
3663 * linux-low.c (linux_process_qsupported): Change prototype.
3664 Adjust.
3665 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3666 Change prototype.
3667 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3668 and adjust to loop over all features.
3669 * server.c (handle_query) <qSupported>: Adjust to call
3670 target_process_qsupported once, passing it a vector of unprocessed
3671 features.
3672 * target.h (struct target_ops) <process_qsupported>: Change
3673 prototype.
3674 (target_process_qsupported): Adjust.
3675
9a084706
PA
36762015-11-19 Pedro Alves <palves@redhat.com>
3677
3678 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3679 mode.
3680 * configure: Regenerate.
3681
dad44a1f
PA
36822015-11-19 Pedro Alves <palves@redhat.com>
3683
3684 * configure: Regenerate.
3685
231c0592
YQ
36862015-11-19 Yao Qi <yao.qi@linaro.org>
3687
3688 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3689 type to uint32_t.
3690
6c1c9a8b
YQ
36912015-11-19 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3694 (struct aarch64_operand): Move enum out.
3695
9caa3311
YQ
36962015-11-19 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3699 struct user_fpsimd_state *.
3700 (aarch64_store_fpregset): Likewise.
3701
6a69a054
YQ
37022015-11-19 Yao Qi <yao.qi@linaro.org>
3703
3704 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3705 struct user_pt_regs *.
3706 (aarch64_store_gregset): Likewise.
3707
1798301e
PA
37082015-11-18 Pedro Alves <palves@redhat.com>
3709
3710 * Makefile.in (all_object_files): Add $IPA_OBJS.
3711
ce7715e2
PA
37122015-11-17 Pedro Alves <palves@redhat.com>
3713
3714 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3715 GDB_SIGNAL_0 and gdb_signal_to_string.
3716
c0879059
PA
37172015-11-17 Pedro Alves <palves@redhat.com>
3718
3719 * win32-low.c (handle_output_debug_string): Remove parameter.
3720 (win32_kill): Remove our_status local and adjust call to
3721 handle_output_debug_string.
3722 (get_child_debug_event): Adjust call to
3723 handle_output_debug_string.
3724
1996e237
SM
37252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3726
3727 * linux-mips-low.c (mips_fill_gregset): Add cast.
3728 (mips_store_gregset): Likewise.
3729 (mips_fill_fpregset): Likewise.
3730 (mips_store_fpregset): Likewise.
3731
cbec665b
SM
37322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3733
3734 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3735 priv.
3736
eb3e3c67
SM
37372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3738
3739 * linux-mips-low.c (mips_linux_new_thread): Change type of
3740 watch_type to enum target_hw_bp_type.
3741
171de4b8
SM
37422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3743
3744 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3745 Change return type to arm_hwbp_type.
3746
04248ead
SM
37472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3748
3749 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3750 (arm_store_gregset): Likewise.
3751 * linux-arm-low.c (arm_get_hwcap): Likewise.
3752 (arm_read_description): Likewise.
3753
04b3479c
SM
37542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3755
3756 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3757
2bc84e8a
SM
37582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3759
3760 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3761 (ppc_fill_vsxregset): Likewise.
3762 (ppc_store_vsxregset): Likewise.
3763 (ppc_fill_vrregset): Likewise.
3764 (ppc_store_vrregset): Likewise.
3765 (ppc_fill_evrregset): Likewise.
3766 (ppc_store_evrregset): Likewise.
3767
e6c5bb05
SM
37682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3769
3770 * linux-ppc-low.c (ppc_usrregs_info): Remove
3771 forward-declaration.
3772 (ppc_arch_setup): Move lower in file.
3773
7ea45d72
SM
37742015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3775
3776 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3777 (ps_pdwrite): Likewise.
3778
69291610
HW
37792015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3780
3781 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3782 to after assert checks.
3783
b42945fd
SM
37842015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3785
3786 * proc-service.c (ps_pdread): Add/adjust casts.
3787 (ps_pdwrite): Add/adjust casts.
3788
d6f85c84
SM
37892015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3790
3791 * server.c (handle_search_memory_1): Cast return value of
3792 memmem.
3793
f98cd059
SM
37942015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3795
3796 * server.c (write_qxfer_response): Change type of data to
3797 gdb_byte *.
3798
d2412fa5
PA
37992015-10-29 Pedro Alves <palves@redhat.com>
3800
3801 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3802
c17414a2
PA
38032015-10-29 Pedro Alves <palves@redhat.com>
3804
3805 * tracepoint.c (clear_installed_tracepoints): Add casts.
3806
e053fbc4
PA
38072015-10-29 Pedro Alves <palves@redhat.com>
3808
3809 * server.c (handle_v_cont, process_serial_event): Add enum
3810 gdb_signal casts to signal parsing code.
3811
add67df8
PA
38122015-10-29 Pedro Alves <palves@redhat.com>
3813
3814 * linux-low.h (NULL_REGSET): Define.
3815 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3816 * linux-arm-low.c (arm_regsets): Likewise.
3817 * linux-crisv32-low.c (cris_regsets): Likewise.
3818 * linux-m68k-low.c (m68k_regsets): Likewise.
3819 * linux-mips-low.c (mips_regsets): Likewise.
3820 * linux-nios2-low.c (nios2_regsets): Likewise.
3821 * linux-ppc-low.c (ppc_regsets): Likewise.
3822 * linux-s390-low.c (s390_regsets): Likewise.
3823 * linux-sh-low.c (sh_regsets): Likewise.
3824 * linux-sparc-low.c (sparc_regsets): Likewise.
3825 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3826 * linux-tile-low.c (tile_regsets): Likewise.
3827 * linux-x86-low.c (x86_regsets): Likewise.
3828 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3829
50bc912a
PA
38302015-10-29 Pedro Alves <palves@redhat.com>
3831
3832 * linux-low.h (NULL_REGSET): Define.
3833 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3834 * linux-arm-low.c (arm_regsets): Likewise.
3835 * linux-crisv32-low.c (cris_regsets): Likewise.
3836 * linux-m68k-low.c (m68k_regsets): Likewise.
3837 * linux-mips-low.c (mips_regsets): Likewise.
3838 * linux-nios2-low.c (nios2_regsets): Likewise.
3839 * linux-ppc-low.c (ppc_regsets): Likewise.
3840 * linux-s390-low.c (s390_regsets): Likewise.
3841 * linux-sh-low.c (sh_regsets): Likewise.
3842 * linux-sparc-low.c (sparc_regsets): Likewise.
3843 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3844 * linux-tile-low.c (tile_regsets): Likewise.
3845 * linux-x86-low.c (x86_regsets): Likewise.
3846 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3847
682b2546
DE
38482015-10-26 Doug Evans <dje@google.com>
3849
3850 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3851
963843d4
DE
38522015-10-26 Doug Evans <dje@google.com>
3853
3854 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3855
d41401ac
DE
38562015-10-26 Doug Evans <dje@google.com>
3857
3858 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3859 for debug_printf.
3860 (attach_thread, find_new_threads_callback): Ditto.
3861
3db28855
AT
38622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3863
3864 * mem-break.h (set_breakpoint_data): Remove.
3865
fb78e89c
AT
38662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3867
3868 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3869 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3870 (initialize_low): Remove set_breakpoint_data call.
3871 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3872 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3873 (initialize_low): Remove set_breakpoint_data call.
3874 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3875 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3876 (initialize_low): Remove set_breakpoint_data call.
3877
2e6ee069
AT
38782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3879
3880 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3881 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3882 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3883 * target.h (target_breakpoint_kind_from_pc): New macro.
3884
1652a986
AT
38852015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3886
3887 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3888 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3889 the default breakpoint kind.
3890
abeead09
AT
38912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3892
3893 * linux-arm-low.c (arm_supports_z_point_type): Add software
3894 breakpoint support.
3895
b0b4b501
AT
38962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3897
3898 * linux-arm-low.c: Refactor breakpoint definitions.
3899 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3900 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3901
8689682c
AT
39022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3903
3904 * Makefile.in: Add arm.c/o.
3905 * configure.srv: Likewise.
3906 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3907 (arm_breakpoint_kind_from_pc): New function.
3908 (arm_sw_breakpoint_from_kind): Return proper kind.
3909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3910
27165294
AT
39112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3912
3913 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3914 removal.
3915 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3916 (struct raw_breakpoint) <size>: Remove.
3917 (struct raw_breakpoint) <kind>: Add.
3918 (bp_size): New function.
3919 (bp_opcode): Likewise.
3920 (find_raw_breakpoint_at): Adjust for kind.
3921 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3922 (remove_memory_breakpoint): Adjust for kind call bp_size.
3923 (set_raw_breakpoint_at): Adjust for kind.
3924 (set_breakpoint): Likewise.
3925 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3926 (delete_raw_breakpoint): Adjust for kind.
3927 (delete_breakpoint): Likewise.
3928 (find_gdb_breakpoint): Likewise.
3929 (set_gdb_breakpoint_1): Likewise.
3930 (set_gdb_breakpoint): Likewise.
3931 (delete_gdb_breakpoint_1): Likewise.
3932 (delete_gdb_breakpoint): Likewise.
3933 (uninsert_raw_breakpoint): Likewise.
3934 (reinsert_raw_breakpoint): Likewise.
3935 (set_breakpoint_data): Remove.
3936 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3937 (check_mem_read): Adjust for kind call bp_size.
3938 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3939 (clone_one_breakpoint): Adjust for kind.
3940 * mem-break.h (set_gdb_breakpoint): Likewise.
3941 (delete_gdb_breakpoint): Likewise.
3942 * server.c (process_serial_event): Likewise.
3943
dd373349
AT
39442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3945
3946 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3947 (struct linux_target_ops) <breakpoint>: Remove.
3948 (struct linux_target_ops) <breakpoint_len>: Remove.
3949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3951 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3952 (arm_sw_breakpoint_from_kind): New function.
3953 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3954 (struct linux_target_ops) <breakpoint>: Remove.
3955 (struct linux_target_ops) <breakpoint_len>: Remove.
3956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3958 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3959 (struct linux_target_ops) <breakpoint>: Remove.
3960 (struct linux_target_ops) <breakpoint_len>: Remove.
3961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3963 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3964 (struct linux_target_ops) <breakpoint>: Remove.
3965 (struct linux_target_ops) <breakpoint_len>: Remove.
3966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3968 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3969 and sw_breakpoint_from_kind to increment the pc.
3970 (linux_breakpoint_kind_from_pc): New function.
3971 (linux_sw_breakpoint_from_kind): New function.
3972 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3973 (initialize_low): Call breakpoint_kind_from_pc and
3974 sw_breakpoint_from_kind to replace breakpoint_data/len.
3975 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3976 New field.
3977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3978 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3979 (struct linux_target_ops) <breakpoint>: Remove.
3980 (struct linux_target_ops) <breakpoint_len>: Remove.
3981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3983 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3984 (struct linux_target_ops) <breakpoint>: Remove.
3985 (struct linux_target_ops) <breakpoint_len>: Remove.
3986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3988 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3989 (struct linux_target_ops) <breakpoint>: Remove.
3990 (struct linux_target_ops) <breakpoint_len>: Remove.
3991 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3992 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3993 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3994 (struct linux_target_ops) <breakpoint>: Remove.
3995 (struct linux_target_ops) <breakpoint_len>: Remove.
3996 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3998 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3999 (struct linux_target_ops) <breakpoint>: Remove.
4000 (struct linux_target_ops) <breakpoint_len>: Remove.
4001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4003 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4004 (struct linux_target_ops) <breakpoint>: Remove.
4005 (struct linux_target_ops) <breakpoint_len>: Remove.
4006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4008 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4009 (struct linux_target_ops) <breakpoint>: Remove.
4010 (struct linux_target_ops) <breakpoint_len>: Remove.
4011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4013 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4014 (struct linux_target_ops) <breakpoint>: Remove.
4015 (struct linux_target_ops) <breakpoint_len>: Remove.
4016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4018 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4019 (struct linux_target_ops) <breakpoint>: Remove.
4020 (struct linux_target_ops) <breakpoint_len>: Remove.
4021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4023 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4024 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4025 (struct linux_target_ops) <breakpoint>: Remove.
4026 (struct linux_target_ops) <breakpoint_len>: Remove.
4027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4029 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4030 (struct linux_target_ops) <breakpoint>: Remove.
4031 (struct linux_target_ops) <breakpoint_len>: Remove.
4032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4034
4cd98a19
AT
40352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4036
4037 * linux-cris-low.c (cris_get_pc): Remove void arg.
4038
774ee6d2
AR
40392015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4040
4041 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4042 variable name.
4043
833dcd29
AR
40442015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4045
4046 * inferiors.c (thread_pid_matches_callback): New function.
4047 (find_thread_process): New function.
4048 (remove_thread): Reset current_thread.
4049 (remove_process): Assert threads have been removed first.
4050
8d689ee5
YQ
40512015-10-15 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4054 if it is 3.
4055 (aarch64_remove_point): Likewise.
4056 * regcache.c (regcache_register_size): New function.
4057
1c2e1515
YQ
40582015-10-12 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-aarch64-low.c: Update all callers as emit_load_store
4061 is renamed to aarch64_emit_load_store.
4062
e1c587c3
YQ
40632015-10-12 Yao Qi <yao.qi@linaro.org>
4064
4065 * linux-aarch64-low.c: Update all callers of function renaming
4066 from emit_insn to aarch64_emit_insn.
4067
b6542f81
YQ
40682015-10-12 Yao Qi <yao.qi@linaro.org>
4069
4070 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4071 arch/aarch64-insn.h.
4072 (struct aarch64_memory_operand): Likewise.
4073 (ENCODE): Likewise.
4074 (emit_insn): Move to arch/aarch64-insn.c.
4075 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4076 (emit_load_store): Move to arch/aarch64-insn.c.
4077 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4078 (can_encode_int32): Remove.
4079
246994ce
YQ
40802015-10-12 Yao Qi <yao.qi@linaro.org>
4081
4082 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4083 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4084 (aarch64_relocate_instruction): Likewise.
4085 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4086 (struct aarch64_insn_visitor): Likewise.
4087
0badd99f
YQ
40882015-10-12 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4091 (struct aarch64_insn_visitor): New.
4092 (struct aarch64_insn_relocation_data): New.
4093 (aarch64_ftrace_insn_reloc_b): New function.
4094 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4095 (aarch64_ftrace_insn_reloc_cb): Likewise.
4096 (aarch64_ftrace_insn_reloc_tb): Likewise.
4097 (aarch64_ftrace_insn_reloc_adr): Likewise.
4098 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4099 (aarch64_ftrace_insn_reloc_others): Likewise.
4100 (visitor): New.
4101 (aarch64_relocate_instruction): Use visitor.
4102
dfaffe9d
YQ
41032015-10-12 Yao Qi <yao.qi@linaro.org>
4104
4105 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4106 int. Add argument buf.
4107 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4108 aarch64_relocate_instruction.
4109
70b439f0
YQ
41102015-10-12 Yao Qi <yao.qi@linaro.org>
4111
4112 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4113 argument insn. Remove local variable insn. Don't call
4114 target_read_uint32.
4115 (aarch64_install_fast_tracepoint_jump_pad): Call
4116 target_read_uint32.
4117
7781c06f
YQ
41182015-09-30 Yao Qi <yao.qi@linaro.org>
4119
4120 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4121 (emit_load_store_pair): Likewise.
4122
9a3c8263
SM
41232015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4124
4125 * dll.c (match_dll): Add cast(s).
4126 (unloaded_dll): Likewise.
4127 * linux-low.c (second_thread_of_pid_p): Likewise.
4128 (delete_lwp_callback): Likewise.
4129 (count_events_callback): Likewise.
4130 (select_event_lwp_callback): Likewise.
4131 (linux_set_resume_request): Likewise.
4132 * server.c (accumulate_file_name_length): Likewise.
4133 (emit_dll_description): Likewise.
4134 (handle_qxfer_threads_worker): Likewise.
4135 (visit_actioned_threads): Likewise.
4136 * thread-db.c (any_thread_of): Likewise.
4137 * tracepoint.c (same_process_p): Likewise.
4138 (match_blocktype): Likewise.
4139 (build_traceframe_info_xml): Likewise.
4140
224c3ddb
SM
41412015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4142
4143 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4144 assignment.
4145 (gdb_unparse_agent_expr): Likewise.
4146 * hostio.c (require_data): Likewise.
4147 (handle_pread): Likewise.
4148 * linux-low.c (disable_regset): Likewise.
4149 (fetch_register): Likewise.
4150 (store_register): Likewise.
4151 (get_dynamic): Likewise.
4152 (linux_qxfer_libraries_svr4): Likewise.
4153 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4154 (set_fast_tracepoint_jump): Likewise.
4155 (uninsert_fast_tracepoint_jumps_at): Likewise.
4156 (reinsert_fast_tracepoint_jumps_at): Likewise.
4157 (validate_inserted_breakpoint): Likewise.
4158 (clone_agent_expr): Likewise.
4159 * regcache.c (init_register_cache): Likewise.
4160 * remote-utils.c (putpkt_binary_1): Likewise.
4161 (decode_M_packet): Likewise.
4162 (decode_X_packet): Likewise.
4163 (look_up_one_symbol): Likewise.
4164 (relocate_instruction): Likewise.
4165 (monitor_output): Likewise.
4166 * server.c (handle_search_memory): Likewise.
4167 (handle_qxfer_exec_file): Likewise.
4168 (handle_qxfer_libraries): Likewise.
4169 (handle_qxfer): Likewise.
4170 (handle_query): Likewise.
4171 (handle_v_cont): Likewise.
4172 (handle_v_run): Likewise.
4173 (captured_main): Likewise.
4174 * target.c (write_inferior_memory): Likewise.
4175 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4176 * tracepoint.c (init_trace_buffer): Likewise.
4177 (add_tracepoint_action): Likewise.
4178 (add_traceframe): Likewise.
4179 (add_traceframe_block): Likewise.
4180 (cmd_qtdpsrc): Likewise.
4181 (cmd_qtdv): Likewise.
4182 (cmd_qtstatus): Likewise.
4183 (response_source): Likewise.
4184 (response_tsv): Likewise.
4185 (cmd_qtnotes): Likewise.
4186 (gdb_collect): Likewise.
4187 (initialize_tracepoint): Likewise.
4188
afbe19f8
PL
41892015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4190
4191 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4192 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4193 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4194 <NOP>: New.
4195 (enum aarch64_condition_codes): New enum.
4196 (w0): New static global.
4197 (fp): Likewise.
4198 (lr): Likewise.
4199 (struct aarch64_memory_operand) <type>: New
4200 MEMORY_OPERAND_POSTINDEX type.
4201 (postindex_memory_operand): New helper function.
4202 (emit_ret): New function.
4203 (emit_load_store_pair): New function, factored out of emit_stp
4204 with support for MEMORY_OPERAND_POSTINDEX.
4205 (emit_stp): Rewrite using emit_load_store_pair.
4206 (emit_ldp): New function.
4207 (emit_load_store): Likewise.
4208 (emit_ldr): Mention post-index instruction in comment.
4209 (emit_ldrh): New function.
4210 (emit_ldrb): New function.
4211 (emit_ldrsw): Mention post-index instruction in comment.
4212 (emit_str): Likewise.
4213 (emit_subs): New function.
4214 (emit_cmp): Likewise.
4215 (emit_and): Likewise.
4216 (emit_orr): Likewise.
4217 (emit_orn): Likewise.
4218 (emit_eor): Likewise.
4219 (emit_mvn): Likewise.
4220 (emit_lslv): Likewise.
4221 (emit_lsrv): Likewise.
4222 (emit_asrv): Likewise.
4223 (emit_mul): Likewise.
4224 (emit_sbfm): Likewise.
4225 (emit_sbfx): Likewise.
4226 (emit_ubfm): Likewise.
4227 (emit_ubfx): Likewise.
4228 (emit_csinc): Likewise.
4229 (emit_cset): Likewise.
4230 (emit_nop): Likewise.
4231 (emit_ops_insns): New helper function.
4232 (emit_pop): Likewise.
4233 (emit_push): Likewise.
4234 (aarch64_emit_prologue): New function.
4235 (aarch64_emit_epilogue): Likewise.
4236 (aarch64_emit_add): Likewise.
4237 (aarch64_emit_sub): Likewise.
4238 (aarch64_emit_mul): Likewise.
4239 (aarch64_emit_lsh): Likewise.
4240 (aarch64_emit_rsh_signed): Likewise.
4241 (aarch64_emit_rsh_unsigned): Likewise.
4242 (aarch64_emit_ext): Likewise.
4243 (aarch64_emit_log_not): Likewise.
4244 (aarch64_emit_bit_and): Likewise.
4245 (aarch64_emit_bit_or): Likewise.
4246 (aarch64_emit_bit_xor): Likewise.
4247 (aarch64_emit_bit_not): Likewise.
4248 (aarch64_emit_equal): Likewise.
4249 (aarch64_emit_less_signed): Likewise.
4250 (aarch64_emit_less_unsigned): Likewise.
4251 (aarch64_emit_ref): Likewise.
4252 (aarch64_emit_if_goto): Likewise.
4253 (aarch64_emit_goto): Likewise.
4254 (aarch64_write_goto_address): Likewise.
4255 (aarch64_emit_const): Likewise.
4256 (aarch64_emit_call): Likewise.
4257 (aarch64_emit_reg): Likewise.
4258 (aarch64_emit_pop): Likewise.
4259 (aarch64_emit_stack_flush): Likewise.
4260 (aarch64_emit_zero_ext): Likewise.
4261 (aarch64_emit_swap): Likewise.
4262 (aarch64_emit_stack_adjust): Likewise.
4263 (aarch64_emit_int_call_1): Likewise.
4264 (aarch64_emit_void_call_2): Likewise.
4265 (aarch64_emit_eq_goto): Likewise.
4266 (aarch64_emit_ne_goto): Likewise.
4267 (aarch64_emit_lt_goto): Likewise.
4268 (aarch64_emit_le_goto): Likewise.
4269 (aarch64_emit_gt_goto): Likewise.
4270 (aarch64_emit_ge_got): Likewise.
4271 (aarch64_emit_ops_impl): New static global variable.
4272 (aarch64_emit_ops): New target function, return
4273 &aarch64_emit_ops_impl.
4274 (struct linux_target_ops): Install it.
4275
bb903df0
PL
42762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4277
4278 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4279 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4280 aarch64-ipa.o.
4281 * linux-aarch64-ipa.c: New file.
4282 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4283 and endian.h.
4284 (aarch64_get_thread_area): New target method.
4285 (extract_signed_bitfield): New helper function.
4286 (aarch64_decode_ldr_literal): New function.
4287 (enum aarch64_opcodes): New enum.
4288 (struct aarch64_register): New struct.
4289 (struct aarch64_operand): New struct.
4290 (x0): New static global.
4291 (x1): Likewise.
4292 (x2): Likewise.
4293 (x3): Likewise.
4294 (x4): Likewise.
4295 (w2): Likewise.
4296 (ip0): Likewise.
4297 (sp): Likewise.
4298 (xzr): Likewise.
4299 (aarch64_register): New helper function.
4300 (register_operand): Likewise.
4301 (immediate_operand): Likewise.
4302 (struct aarch64_memory_operand): New struct.
4303 (offset_memory_operand): New helper function.
4304 (preindex_memory_operand): Likewise.
4305 (enum aarch64_system_control_registers): New enum.
4306 (ENCODE): New macro.
4307 (emit_insn): New helper function.
4308 (emit_b): New function.
4309 (emit_bcond): Likewise.
4310 (emit_cb): Likewise.
4311 (emit_tb): Likewise.
4312 (emit_blr): Likewise.
4313 (emit_stp): Likewise.
4314 (emit_ldp_q_offset): Likewise.
4315 (emit_stp_q_offset): Likewise.
4316 (emit_load_store): Likewise.
4317 (emit_ldr): Likewise.
4318 (emit_ldrsw): Likewise.
4319 (emit_str): Likewise.
4320 (emit_ldaxr): Likewise.
4321 (emit_stxr): Likewise.
4322 (emit_stlr): Likewise.
4323 (emit_data_processing_reg): Likewise.
4324 (emit_data_processing): Likewise.
4325 (emit_add): Likewise.
4326 (emit_sub): Likewise.
4327 (emit_mov): Likewise.
4328 (emit_movk): Likewise.
4329 (emit_mov_addr): Likewise.
4330 (emit_mrs): Likewise.
4331 (emit_msr): Likewise.
4332 (emit_sevl): Likewise.
4333 (emit_wfe): Likewise.
4334 (append_insns): Likewise.
4335 (can_encode_int32_in): New helper function.
4336 (aarch64_relocate_instruction): New function.
4337 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4338 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4339 (struct linux_target_ops): Install aarch64_get_thread_area,
4340 aarch64_install_fast_tracepoint_jump_pad and
4341 aarch64_get_min_fast_tracepoint_insn_len.
4342
787749ea
PL
43432015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4344
4345 * Makefile.in (aarch64-insn.o): New rule.
4346 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4347
9812b2e6
YQ
43482015-09-21 Yao Qi <yao.qi@linaro.org>
4349
4350 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4351
18fe412b
YQ
43522015-09-21 Yao Qi <yao.qi@linaro.org>
4353
4354 * tracepoint.c (max_jump_pad_size): Remove.
4355
a0cc84cd
YQ
43562015-09-18 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch64-low.c: Don't include sys/uio.h.
4359 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4360
d78908cf
WW
43612015-09-16 Wei-cheng Wang <cole945@gmail.com>
4362
4363 * tracepoint.c (eval_result_type): Change prototype.
4364 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4365
d57e0d50
PA
43662015-09-15 Pedro Alves <palves@redhat.com>
4367
4368 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4369 Check whether to report exec events instead of checking whether
4370 multiprocess is enabled.
4371
5a676acc
PA
43722015-09-15 Pedro Alves <palves@redhat.com>
4373
4374 PR remote/18965
4375 * remote-utils.c (prepare_resume_reply): Merge
4376 TARGET_WAITKIND_VFORK_DONE switch case with the
4377 TARGET_WAITKIND_FORKED case.
4378
7c5d0fad
YQ
43792015-09-15 Yao Qi <yao.qi@linaro.org>
4380
4381 * server.c (handle_query): Check string comparison using
4382 "else if" instead of "if".
4383
750ce8d1
YQ
43842015-09-15 Yao Qi <yao.qi@linaro.org>
4385
4386 * server.c (vCont_supported): New global variable.
4387 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4388 matches. Append ";vContSupported+" to own_buf.
4389 (handle_v_requests): Append ";s;S" to own_buf if target supports
4390 hardware single step or vCont_supported is false.
4391 (capture_main): Set vCont_supported to zero.
4392
70b90b91
YQ
43932015-09-15 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4396 it to ...
4397 (linux_supports_hardware_single_step): ... New function.
4398 (linux_target_ops): Update.
4399 * lynx-low.c (lynx_target_ops): Set field
4400 supports_hardware_single_step to target_can_do_hardware_single_step.
4401 * nto-low.c (nto_target_ops): Likewise.
4402 * spu-low.c (spu_target_ops): Likewise.
4403 * win32-low.c (win32_target_ops): Likewise.
4404 * target.c (target_can_do_hardware_single_step): New function.
4405 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4406 Remove. <supports_hardware_single_step>: New field.
4407 (target_supports_conditional_breakpoints): Remove.
4408 (target_supports_hardware_single_step): New macro.
4409 (target_can_do_hardware_single_step): Declare.
4410 * server.c (handle_query): Use target_supports_hardware_single_step
4411 instead of target_supports_conditional_breakpoints.
4412
ade90bde
YQ
44132015-09-15 Yao Qi <yao.qi@linaro.org>
4414
4415 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4416 function.
4417 (struct linux_target_ops the_low_target): Install
4418 aarch64_linux_siginfo_fixup.
4419
94585166
DB
44202015-09-11 Don Breazeal <donb@codesourcery.com>
4421 Luis Machado <lgustavo@codesourcery.com>
4422
4423 * linux-low.c (linux_mourn): Static declaration.
4424 (linux_arch_setup): Move in front of
4425 handle_extended_wait.
4426 (linux_arch_setup_thread): New function.
4427 (handle_extended_wait): Handle exec events. Call
4428 linux_arch_setup_thread. Make event_lwp argument a
4429 pointer-to-a-pointer.
4430 (check_zombie_leaders): Do not check stopped threads.
4431 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4432 (linux_low_filter_event): Add lwp and thread for exec'ing
4433 non-leader thread if leader thread has been deleted.
4434 Refactor code into linux_arch_setup_thread and call it.
4435 Pass child lwp pointer by reference to handle_extended_wait.
4436 (linux_wait_for_event_filtered): Update comment.
4437 (linux_wait_1): Prevent clobbering exec event status.
4438 (linux_supports_exec_events): New function.
4439 (linux_target_ops) <supports_exec_events>: Initialize new member.
4440 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4441 new member.
4442 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4443 * server.c (report_exec_events): New global variable.
4444 (handle_query): Handle qSupported query for exec-events feature.
4445 (captured_main): Initialize report_exec_events.
4446 * server.h (report_exec_events): Declare new global variable.
4447 * target.h (struct target_ops) <supports_exec_events>: New
4448 member.
4449 (target_supports_exec_events): New macro.
4450 * win32-low.c (win32_target_ops) <supports_exec_events>:
4451 Initialize new member.
4452
0568462b
MM
44532015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4454
4455 * linux-low.c (linux_low_enable_btrace): Remove.
4456 (linux_target_ops): Replace linux_low_enable_btrace with
4457 linux_enable_btrace.
4458
39edd165
YQ
44592015-09-03 Yao Qi <yao.qi@linaro.org>
4460
4461 * linux-aarch64-low.c (aarch64_insert_point): Call
4462 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4463 returns true.
4464
1db33b5a
UW
44652015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4466
4467 * linux-low.c (check_stopped_by_breakpoint): Use
4468 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4469
ab290430
PA
44702015-08-27 Pedro Alves <palves@redhat.com>
4471
4472 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4473
8d749320
SM
44742015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4475
6711b7f8
SM
4476 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4477 the XNEW-family equivalent.
8d749320
SM
4478 (compile_bytecodes): Likewise.
4479 * dll.c (loaded_dll): Likewise.
4480 * event-loop.c (append_callback_event): Likewise.
4481 (create_file_handler): Likewise.
4482 (create_file_event): Likewise.
4483 * hostio.c (handle_open): Likewise.
4484 * inferiors.c (add_thread): Likewise.
4485 (add_process): Likewise.
4486 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4487 * linux-arm-low.c (arm_new_process): Likewise.
4488 (arm_new_thread): Likewise.
4489 * linux-low.c (add_to_pid_list): Likewise.
4490 (linux_add_process): Likewise.
4491 (handle_extended_wait): Likewise.
4492 (add_lwp): Likewise.
4493 (enqueue_one_deferred_signal): Likewise.
4494 (enqueue_pending_signal): Likewise.
4495 (linux_resume_one_lwp_throw): Likewise.
4496 (linux_resume_one_thread): Likewise.
4497 (linux_read_memory): Likewise.
4498 (linux_write_memory): Likewise.
4499 * linux-mips-low.c (mips_linux_new_process): Likewise.
4500 (mips_linux_new_thread): Likewise.
4501 (mips_add_watchpoint): Likewise.
4502 * linux-x86-low.c (initialize_low_arch): Likewise.
4503 * lynx-low.c (lynx_add_process): Likewise.
4504 * mem-break.c (set_raw_breakpoint_at): Likewise.
4505 (set_breakpoint): Likewise.
4506 (add_condition_to_breakpoint): Likewise.
4507 (add_commands_to_breakpoint): Likewise.
4508 (clone_agent_expr): Likewise.
4509 (clone_one_breakpoint): Likewise.
4510 * regcache.c (new_register_cache): Likewise.
4511 * remote-utils.c (look_up_one_symbol): Likewise.
4512 * server.c (queue_stop_reply): Likewise.
4513 (start_inferior): Likewise.
4514 (queue_stop_reply_callback): Likewise.
4515 (handle_target_event): Likewise.
4516 * spu-low.c (fetch_ppc_memory): Likewise.
4517 (store_ppc_memory): Likewise.
4518 * target.c (set_target_ops): Likewise.
4519 * thread-db.c (thread_db_load_search): Likewise.
4520 (try_thread_db_load_1): Likewise.
4521 * tracepoint.c (add_tracepoint): Likewise.
4522 (add_tracepoint_action): Likewise.
4523 (create_trace_state_variable): Likewise.
4524 (cmd_qtdpsrc): Likewise.
4525 (cmd_qtro): Likewise.
4526 (add_while_stepping_state): Likewise.
4527 * win32-low.c (child_add_thread): Likewise.
4528 (get_image_name): Likewise.
4529
ed8b7b42
YQ
45302015-08-25 Yao Qi <yao.qi@linaro.org>
4531
4532 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4533
db3cb7cb
YQ
45342015-08-25 Yao Qi <yao.qi@linaro.org>
4535
4536 * Makefile.in (aarch64-linux.o): New rule.
4537 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4538 srv_tgtobj.
4539 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4540 (aarch64_init_debug_reg_state): Make it extern.
4541 (aarch64_linux_prepare_to_resume): Remove.
4542
f6011a1c
YQ
45432015-08-25 Yao Qi <yao.qi@linaro.org>
4544
4545 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4546 lwp_arch_private_info and ptid_of_lwp.
4547
88e2cf7e
YQ
45482015-08-25 Yao Qi <yao.qi@linaro.org>
4549
4550 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4551 Find proc_info by find_process_pid. All callers updated.
4552
5e35436e
YQ
45532015-08-25 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4556 Remove.
4557 (debug_reg_change_callback): Remove.
4558 (aarch64_notify_debug_reg_change): Remove.
4559
4a8a7965
YQ
45602015-08-25 Yao Qi <yao.qi@linaro.org>
4561
4562 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4563 Call current_lwp_ptid.
4564
32a271ee
YQ
45652015-08-25 Yao Qi <yao.qi@linaro.org>
4566
4567 * linux-aarch64-low.c (debug_reg_change_callback): Use
4568 debug_printf.
4569
0d51c8d7
YQ
45702015-08-25 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4573
31a43dd5
YQ
45742015-08-25 Yao Qi <yao.qi@linaro.org>
4575
4576 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4577
8ee52567
YQ
45782015-08-25 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4581 the code.
4582
ff3f0f45
YQ
45832015-08-25 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4586 Remove.
4587 (debug_reg_change_callback): Remove argument entry and add argument
4588 lwp. Remove local variable thread. Don't print thread id in the
4589 debugging output. Don't check whether pid of thread equals to pid.
4590 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4591 iterate_over_lwps instead find_inferior.
4592
3d40fbb5
PA
45932015-08-24 Pedro Alves <palves@redhat.com>
4594
4595 * inferiors.c (get_first_process): New function.
4596 * inferiors.h (get_first_process): New declaration.
4597 * remote-utils.c (read_ptid): Default to the first process in the
4598 list, instead of to the current thread's process.
4599
438e1e42
PA
46002015-08-24 Pedro Alves <palves@redhat.com>
4601
4602 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4603 * event-loop.c: Likewise.
4604 * remote-utils.c: Likewise.
4605 * tracepoint.c: Likewise.
4606
a8c6d4fc
PA
46072015-08-24 Pedro Alves <palves@redhat.com>
4608
4609 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4610 ptid_get_lwp.
4611
99b0bb12
PA
46122015-08-21 Pedro Alves <palves@redhat.com>
4613
4614 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4615 instead of literal 1.
4616
f8904751
PA
46172015-08-21 Pedro Alves <palves@redhat.com>
4618
4619 * tdesc.c (default_description): Explicitly zero-initialize.
4620
465a859e
PA
46212015-08-21 Pedro Alves <palves@redhat.com>
4622
4623 PR gdb/18749
4624 * inferiors.c (remove_thread): Discard any pending stop reply for
4625 this thread.
4626 * server.c (remove_all_on_match_pid): Rename to ...
4627 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4628 instead of a pid.
4629 (discard_queued_stop_replies): Change parameter to a ptid. Now
4630 extern.
4631 (handle_v_kill, kill_inferior_callback, captured_main)
4632 (process_serial_event): Adjust.
4633 * server.h (discard_queued_stop_replies): Declare.
4634
f0db101d
PA
46352015-08-21 Pedro Alves <palves@redhat.com>
4636
4637 * linux-low.c (wait_for_sigstop): Always switch to no thread
4638 selected if the previously current thread dies.
4639 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4640 process instead of the current thread's.
4641 * remote-utils.c (input_interrupt): Don't check if there's no
4642 current thread.
4643 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4644 current thread to the general thread fails, error out.
4645 (handle_qxfer_auxv, handle_qxfer_libraries)
4646 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4647 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4648 (handle_query): Check if there's a thread selected instead of
4649 checking whether there's any thread in the thread list.
4650 (handle_qxfer_threads, handle_qxfer_btrace)
4651 (handle_qxfer_btrace_conf): Don't error out early if there's no
4652 thread in the thread list.
4653 (handle_v_cont, myresume): Don't set the current thread to the
4654 continue thread.
4655 (process_serial_event) <Hg handling>: Also set thread_id if the
4656 previous general thread is still alive.
4657 (process_serial_event) <g/G handling>: If setting the current
4658 thread to the general thread fails, error out.
4659 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4660 thread's lwp instead of the current thread's.
4661 * target.c (set_desired_thread): If the desired thread was not
4662 found, leave the current thread pointing to NULL. Return an int
4663 (boolean) indicating success.
4664 * target.h (set_desired_thread): Change return type to int.
4665
40045d91
MF
46662015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4667
4668 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4669 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4670 #includes.
4671 (ps_get_thread_area): New function.
4672
45face3b
GB
46732015-08-19 Gary Benson <gbenson@redhat.com>
4674
4675 * hostio.c (handle_pread): Do not attempt to read more data
4676 than hostio_reply_with_data can fit in a packet.
4677
16d5f642
JB
46782015-08-18 Joel Brobecker <brobecker@adacore.com>
4679
4680 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4681
a738da3a
MF
46822015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4683
4684 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4685
33ebda9d
PA
46862015-08-06 Pedro Alves <palves@redhat.com>
4687
4688 * tracepoint.c (expr_eval_result): Now an int.
4689
a44892be
PA
46902015-08-06 Pedro Alves <palves@redhat.com>
4691
4692 * gdbthread.h (struct regcache): Forward declare.
4693 (struct thread_info) <regcache_data>: Now a struct regcache
4694 pointer.
4695 * inferiors.c (inferior_regcache_data)
4696 (set_inferior_regcache_data): Now work with struct regcache
4697 pointers.
4698 * inferiors.h (struct regcache): Forward declare.
4699 (inferior_regcache_data, set_inferior_regcache_data): Now work
4700 with struct regcache pointers.
4701 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4702 (free_register_cache_thread): Remove struct regcache pointer
4703 casts.
4704
608a1e46
PA
47052015-08-06 Pedro Alves <palves@redhat.com>
4706
4707 * server.c (captured_main): On error, print the exception message
4708 to stderr, and if run_once is set, throw a quit.
4709
f0ce0d3a
PA
47102015-08-06 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4713 the current thread.
4714
bf47e248
PA
47152015-08-06 Pedro Alves <palves@redhat.com>
4716
4717 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4718 reading beyond the passed in buffer length.
4719
b6b9ffcc
PL
47202015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4721
4722 * tracepoint.c (symbol_list) <required>: Remove.
4723
863d01bd
PA
47242015-08-06 Pedro Alves <palves@redhat.com>
4725
4726 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4727 count if stopping and suspending threads.
4728 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4729 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4730 (linux_detach): Complete an ongoing step-over.
4731 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4732 throughout.
4733 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4734 (linux_wait_1): If passing a signal to the inferior after
4735 finishing a step-over, unsuspend and re-resume all lwps. If we
4736 see a single-step event but the thread should be continuing, don't
4737 pass the trap to gdb.
4738 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4739 internal_error instead of gdb_assert.
4740 (enqueue_pending_signal): New function.
4741 (check_ptrace_stopped_lwp_gone): Add debug output.
4742 (start_step_over): Use internal_error instead of gdb_assert.
4743 (complete_ongoing_step_over): New function.
4744 (linux_resume_one_thread): Don't resume a suspended thread.
4745 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4746 it stepping.
4747
00db26fa
PA
47482015-08-06 Pedro Alves <palves@redhat.com>
4749
4750 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4751 (linux_thread_alive): Use lwp_is_marked_dead.
4752 (extended_event_reported): Delete.
4753 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4754 instead of extended_event_reported.
4755 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4756 as well.
4757 (lwp_is_marked_dead): New function.
4758 (lwp_running): Use lwp_is_marked_dead.
4759 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4760 comment.
4761
ad071a30
PA
47622015-08-06 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.c (linux_wait_1): Move fork event output out of the
4765 !report_to_gdb check. Pass event_child->waitstatus to
4766 target_waitstatus_to_string instead of ourstatus.
4767
524b57e6
YQ
47682015-08-04 Yao Qi <yao.qi@linaro.org>
4769
4770 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4771 if current_thread is 32 bit.
4772
6085d6f6
YQ
47732015-08-04 Yao Qi <yao.qi@linaro.org>
4774
4775 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4776 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4777 * server.c (extended_protocol): Remove "static".
4778 * server.h (extended_protocol): Declare it.
4779
8a7e4587
YQ
47802015-08-04 Yao Qi <yao.qi@linaro.org>
4781
4782 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4783 both aarch64 and aarch32.
4784 (aarch64_set_pc): Likewise.
4785
3b53ae99
YQ
47862015-08-04 Yao Qi <yao.qi@linaro.org>
4787
4788 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4789 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4790 arm-with-neon.xml to srv_xmlfiles.
4791 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4792 (is_64bit_tdesc): New function.
4793 (aarch64_linux_read_description): New function.
4794 (aarch64_arch_setup): Call aarch64_linux_read_description.
4795 (regs_info): Rename to regs_info_aarch64.
4796 (aarch64_regs_info): Return right regs_info.
4797 (initialize_low_arch): Call initialize_low_arch_aarch32.
4798
bd9e6534
YQ
47992015-08-04 Yao Qi <yao.qi@linaro.org>
4800
4801 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4802 * linux-aarch32-low.c: New file.
4803 * linux-aarch32-low.h: New file.
4804 * linux-arm-low.c (arm_fill_gregset): Move it to
4805 linux-aarch32-low.c.
4806 (arm_store_gregset): Likewise.
4807 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4808 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4809 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4810 (regs_info): Rename to regs_info_arm.
4811 (arm_regs_info): Return regs_info_aarch32 if
4812 have_ptrace_getregset is 1 and target description is
4813 arm_with_neon or arm_with_vfpv3.
4814 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4815 Call initialize_low_arch_aarch32 instead.
4816
ded48a5e
YQ
48172015-08-04 Yao Qi <yao.qi@linaro.org>
4818
4819 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4820 * linux-low.c: ... here.
4821 * linux-low.h (have_ptrace_getregset): Declare it.
4822
96e9210f
PA
48232015-08-04 Pedro Alves <palves@redhat.com>
4824
4825 * thread-db.c (struct thread_db): Use new typedefs.
4826 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4827 CHK calls.
4828 (disable_thread_event_reporting): Cast result of dlsym to
4829 destination function pointer type.
4830 (thread_db_mourn): Use td_ta_delete_ftype.
4831
af60a1ef
SL
48322015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4833
4834 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4835 arch variant.
4836 (CDX_BREAKPOINT): Define for R2.
4837 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4838 (the_low_target): Add comments.
4839
e8b41681
YQ
48402015-07-30 Yao Qi <yao.qi@linaro.org>
4841
4842 * linux-arm-low.c (arm_hwcap): Remove it.
4843 (arm_read_description): New local variable arm_hwcap. Don't
4844 set arm_hwcap to zero.
4845
89abb039
YQ
48462015-07-30 Yao Qi <yao.qi@linaro.org>
4847
4848 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4849 Use regcache->tdesc instead.
4850 (arm_store_wmmxregset): Likewise.
4851 (arm_fill_vfpregset): Likewise.
4852 (arm_store_vfpregset): Likewise.
4853
deca266c
YQ
48542015-07-30 Yao Qi <yao.qi@linaro.org>
4855
4856 * linux-arm-low.c: Include arch/arm.h.
4857 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4858 (arm_store_gregset): Likewise.
4859
aa58a496
SM
48602015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4861
4862 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4863 ptrace's 4th parameter.
4864
50904b25
YQ
48652015-07-27 Yao Qi <yao.qi@linaro.org>
4866
4867 * configure.srv (case aarch64*-*-linux*): Don't set
4868 srv_linux_usrregs.
4869
5826e159
PA
48702015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4871
4872 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4873 sys/ptrace.h.
4874 * linux-arm-low.c: Likewise.
4875 * linux-cris-low.c: Likewise.
4876 * linux-crisv32-low.c: Likewise.
4877 * linux-low.c: Likewise.
4878 * linux-m68k-low.c: Likewise.
4879 * linux-mips-low.c: Likewise.
4880 * linux-nios2-low.c: Likewise.
4881 * linux-s390-low.c: Likewise.
4882 * linux-sparc-low.c: Likewise.
4883 * linux-tic6x-low.c: Likewise.
4884 * linux-tile-low.c: Likewise.
4885 * linux-x86-low.c: Likewise.
4886
54019719
PA
48872015-07-24 Pedro Alves <palves@redhat.com>
4888
4889 * config.in: Regenerate.
4890 * configure: Regenerate.
4891
eb7aa561
PA
48922015-07-24 Pedro Alves <palves@redhat.com>
4893
4894 * acinclude.m4: Include ../ptrace.m4.
4895 * configure.ac: Call GDB_AC_PTRACE.
4896 * config.in, configure: Regenerate.
4897
55d7b841
YQ
48982015-07-24 Yao Qi <yao.qi@linaro.org>
4899
4900 * linux-low.c (linux_create_inferior): Remove setting to
4901 proc->priv->new_inferior.
4902 (linux_attach): Likewise.
4903 (linux_low_filter_event): Likewise.
4904 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4905
c06cbd92
YQ
49062015-07-24 Yao Qi <yao.qi@linaro.org>
4907
4908 * linux-low.c (linux_arch_setup): New function.
4909 (linux_low_filter_event): If proc->tdesc is NULL and
4910 proc->attached is true, call the_low_target.arch_setup.
4911 Otherwise, keep status pending, and return.
4912 (linux_resume_one_lwp_throw): Don't call get_pc if
4913 thread->while_stepping isn't NULL. Don't call
4914 get_thread_regcache if proc->tdesc is NULL.
4915 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4916 (linux_target_ops): Install arch_setup.
4917 * server.c (start_inferior): Call the_target->arch_setup.
4918 * target.h (struct target_ops) <arch_setup>: New field.
4919 (target_arch_setup): New marco.
4920 * lynx-low.c (lynx_target_ops): Update.
4921 * nto-low.c (nto_target_ops): Update.
4922 * spu-low.c (spu_target_ops): Update.
4923 * win32-low.c (win32_target_ops): Update.
4924
5ae3ebba
YQ
49252015-07-24 Yao Qi <yao.qi@linaro.org>
4926
4927 * linux-low.c (linux_add_process): Don't set
4928 proc->priv->new_inferior.
4929 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4930 (linux_attach): Likewise.
4931
eb97750b
YQ
49322015-07-24 Yao Qi <yao.qi@linaro.org>
4933
4934 * server.c (start_inferior): Code refactor.
4935
51aee833
YQ
49362015-07-24 Yao Qi <yao.qi@linaro.org>
4937
4938 * server.c (process_serial_event): Set general_thread.
4939
af1b22f3
YQ
49402015-07-21 Yao Qi <yao.qi@linaro.org>
4941
4942 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4943 aarch64_linux_get_debug_reg_capacity.
4944
554717a3
YQ
49452015-07-17 Yao Qi <yao.qi@linaro.org>
4946
4947 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4948 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4949 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4950 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4951 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4952 (AARCH64_HWP_ALIGNMENT): Likewise.
4953 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4954 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4955 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4956 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4957 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4958 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4959 (struct aarch64_debug_reg_state): Likewise.
4960 (struct arch_lwp_info): Likewise.
4961 (aarch64_align_watchpoint): Likewise.
4962 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4963 (aarch64_watchpoint_length): Likewise.
4964 (aarch64_point_encode_ctrl_reg): Likewise
4965 (aarch64_point_is_aligned): Likewise.
4966 (aarch64_align_watchpoint): Likewise.
4967 (aarch64_linux_set_debug_regs):
4968 (aarch64_dr_state_insert_one_point): Likewise.
4969 (aarch64_dr_state_remove_one_point): Likewise.
4970 (aarch64_handle_breakpoint): Likewise.
4971 (aarch64_handle_aligned_watchpoint): Likewise.
4972 (aarch64_handle_unaligned_watchpoint): Likewise.
4973 (aarch64_handle_watchpoint): Likewise.
4974
c67ca4de
YQ
49752015-07-17 Yao Qi <yao.qi@linaro.org>
4976
4977 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4978 and don't aarch64_get_debug_reg_state. All callers update.
4979 (aarch64_handle_aligned_watchpoint): Likewise.
4980 (aarch64_handle_unaligned_watchpoint): Likewise.
4981 (aarch64_handle_watchpoint): Likewise.
4982 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4983 (aarch64_remove_point): Likewise.
4984
25abf979
YQ
49852015-07-17 Yao Qi <yao.qi@linaro.org>
4986
4987 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4988 debug_printf.
4989 (aarch64_handle_unaligned_watchpoint): Likewise.
4990
db1ff28b
JK
49912015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4992
4993 Revert the previous 3 commits:
4994 Move gdb_regex* to common/
4995 Move linux_find_memory_regions_full & co.
4996 gdbserver build-id attribute generator
4997
700ca40f
JK
49982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4999 Jan Kratochvil <jan.kratochvil@redhat.com>
5000
5001 gdbserver build-id attribute generator.
5002 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5003 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5004 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5005 (find_phdr): New.
5006 (get_dynamic): Use find_pdhr to traverse program headers.
5007 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5008 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5009 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5010 (get_hex_build_id): New.
5011 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5012 to reply XML document.
5013
9904185c
JK
50142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5015 Jan Kratochvil <jan.kratochvil@redhat.com>
5016
5017 * target.c: Include target/target-utils.h and fcntl.h.
5018 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5019 (target_fileio_read_stralloc): New functions.
5020
6e5b4429
JK
50212015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5022
5023 * Makefile.in (OBS): Add gdb_regex.o.
5024 (gdb_regex.o): New.
5025 * config.in: Rebuilt.
5026 * configure: Rebuilt.
5027
ddc98fbf
JK
50282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5029 Jan Kratochvil <jan.kratochvil@redhat.com>
5030
5031 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5032 * Makefile.in (OBS): Add target-utils.o.
5033 (linux-maps.o, target-utils.o): New.
5034 * configure.srv (srv_linux_obj): Add linux-maps.o.
5035
e57bb7a0
PL
50362015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5037
5038 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5039 function, return 1.
5040 (the_low_target): Install it.
5041
586b02a9
PA
50422015-07-14 Pedro Alves <palves@redhat.com>
5043
5044 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5045 Instead, ignore ECHILD, and throw an error for other errnos.
5046
58c1b36c
PA
50472015-07-10 Pedro Alves <palves@redhat.com>
5048
5049 * event-loop.c (struct callback_event) <data>: Change type to
5050 gdb_client_data instance instead of gdb_client_data pointer.
5051 (append_callback_event): Adjust.
5052
421530db
PL
50532015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5054
5055 * linux-aarch64-low.c: Add comments for each linux_target_ops
5056 method. Remove comments already covered in target_ops and
5057 linux_target_ops definitions.
5058 (the_low_target): Add comments for each unimplemented method.
5059
c2d65f38
YQ
50602015-07-09 Yao Qi <yao.qi@linaro.org>
5061
5062 * linux-aarch64-low.c (aarch64_regmap): Remove.
5063 (aarch64_usrregs_info): Remove.
5064 (regs_info): Set field usrregs to NULL.
5065
b20a6524
MM
50662015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5067
5068 * linux-low.c: Include "rsp-low.h"
5069 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5070 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5071 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5072 (handle_btrace_enable_pt): New.
5073 (handle_btrace_general_set): Support "pt".
5074 (handle_btrace_conf_general_set): Support "pt:size".
5075
96c97461
PL
50762015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5077
5078 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5079 Z_PACKET_SW_BP.
5080
37d66942
PL
50812015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5082
5083 * linux-aarch64-low.c: Remove comment about endianness.
5084 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5085 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5086 memcmp.
5087
dc06243f
GB
50882015-06-24 Gary Benson <gbenson@redhat.com>
5089
5090 * linux-i386-ipa.c (stdint.h): Do not include.
5091 * lynx-i386-low.c (stdint.h): Likewise.
5092 * lynx-ppc-low.c (stdint.h): Likewise.
5093 * mem-break.c (stdint.h): Likewise.
5094 * thread-db.c (stdint.h): Likewise.
5095 * tracepoint.c (stdint.h): Likewise.
5096 * win32-low.c (stdint.h): Likewise.
5097
124e13d9
SM
50982015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5099
5100 * server.c (write_qxfer_response): Update call to
5101 remote_escape_output.
5102
909c2cda
JK
51032015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5104 Jan Kratochvil <jan.kratochvil@redhat.com>
5105
5106 Merge multiple hex conversions.
5107 * gdbreplay.c (tohex): Rename to 'fromhex'.
5108 (logchar): Use fromhex.
5109
24c05f46
JK
51102015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5111
5112 * server.c (handle_qxfer_libraries): Set `version' attribute for
5113 <library-list>.
5114
14d2069a
GB
51152015-06-10 Gary Benson <gbenson@redhat.com>
5116
5117 * target.h (struct target_ops) <multifs_open>: New field.
5118 <multifs_unlink>: Likewise.
5119 <multifs_readlink>: Likewise.
5120 * linux-low.c (nat/linux-namespaces.h): New include.
5121 (linux_target_ops): Initialize the_target->multifs_open,
5122 the_target->multifs_unlink and the_target->multifs_readlink.
5123 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5124 * hostio.c (hostio_fs_pid): New static variable.
5125 (hostio_handle_new_gdb_connection): New function.
5126 (handle_setfs): Likewise.
5127 (handle_open): Use the_target->multifs_open as appropriate.
5128 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5129 (handle_readlink): Use the_target->multifs_readlink as
5130 appropriate.
5131 (handle_vFile): Handle vFile:setfs packets.
5132 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5133 after target_handle_new_gdb_connection.
5134
4b8b5e72
GB
51352015-06-10 Gary Benson <gbenson@redhat.com>
5136
5137 * configure.ac (AC_CHECK_FUNCS): Add setns.
5138 * config.in: Regenerate.
5139 * configure: Likewise.
5140 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5141 (linux-namespaces.o): New rule.
5142 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5143
3ac2e371
GB
51442015-06-09 Gary Benson <gbenson@redhat.com>
5145
5146 * hostio.c (handle_open): Process mode argument with
5147 fileio_to_host_mode.
5148
ca9b78ce
YQ
51492015-06-01 Yao Qi <yao.qi@linaro.org>
5150
5151 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5152 * linux-x86-low.c: Likewise.
5153
bfacd19d
DB
51542015-05-28 Don Breazeal <donb@codesourcery.com>
5155
5156 * linux-low.c (handle_extended_wait): Initialize
5157 thread_info.last_resume_kind for new fork children.
5158
452003ef
PA
51592015-05-15 Pedro Alves <palves@redhat.com>
5160
5161 * target.h (target_handle_new_gdb_connection): Rewrite using if
5162 wrapped in do/while.
5163
1041a03c
JB
51642015-05-14 Joel Brobecker <brobecker@adacore.com>
5165
5166 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5167 * configure, config.in: Regenerate.
5168 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5169 Declare typedef.
5170
c269dbdb
DB
51712015-05-12 Don Breazeal <donb@codesourcery.com>
5172
5173 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5174 PTRACE_EVENT_VFORK_DONE.
5175 (linux_low_ptrace_options, extended_event_reported): Add vfork
5176 events.
5177 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5178 and "vforkdone" for RSP 'T' Stop Reply Packet.
5179 * server.h (report_vfork_events): Declare
5180 global variable.
5181
3a8a0396
DB
51822015-05-12 Don Breazeal <donb@codesourcery.com>
5183
5184 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5185 (the_low_target) <new_fork>: Initialize new member.
5186 * linux-arm-low.c (arm_new_fork): New function.
5187 (the_low_target) <new_fork>: Initialize new member.
5188 * linux-low.c (handle_extended_wait): Call new target function
5189 new_fork.
5190 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5191 * linux-mips-low.c (mips_add_watchpoint): New function
5192 extracted from mips_insert_point.
5193 (the_low_target) <new_fork>: Initialize new member.
5194 (mips_linux_new_fork): New function.
5195 (mips_insert_point): Call mips_add_watchpoint.
5196 * linux-x86-low.c (x86_linux_new_fork): New function.
5197 (the_low_target) <new_fork>: Initialize new member.
5198
de0d863e
DB
51992015-05-12 Don Breazeal <donb@codesourcery.com>
5200
5201 * linux-low.c (handle_extended_wait): Implement return value,
5202 rename argument 'event_child' to 'event_lwp', handle
5203 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5204 (linux_low_ptrace_options): New function.
5205 (linux_low_filter_event): Call linux_low_ptrace_options,
5206 use different argument fo linux_enable_event_reporting,
5207 use return value from handle_extended_wait.
5208 (extended_event_reported): New function.
5209 (linux_wait_1): Call extended_event_reported and set
5210 status to report fork events.
5211 (linux_write_memory): Add pid to debug message.
5212 (reset_lwp_ptrace_options_callback): New function.
5213 (linux_handle_new_gdb_connection): New function.
5214 (linux_target_ops): Initialize new structure member.
5215 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5216 * lynx-low.c: Initialize new structure member.
5217 * remote-utils.c (prepare_resume_reply): Implement stop reason
5218 "fork" for "T" stop message.
5219 * server.c (handle_query): Call handle_new_gdb_connection.
5220 * server.h (report_fork_events): Declare global flag.
5221 * target.h (struct target_ops) <handle_new_gdb_connection>:
5222 New member.
5223 (target_handle_new_gdb_connection): New macro.
5224 * win32-low.c: Initialize new structure member.
5225
ddcbc397
DB
52262015-05-12 Don Breazeal <donb@codesourcery.com>
5227
5228 * mem-break.c (APPEND_TO_LIST): Define macro.
5229 (clone_agent_expr): New function.
5230 (clone_one_breakpoint): New function.
5231 (clone_all_breakpoints): New function.
5232 * mem-break.h: Declare new functions.
5233
89245bc0
DB
52342015-05-12 Don Breazeal <donb@codesourcery.com>
5235
5236 * linux-low.c (linux_supports_fork_events): New function.
5237 (linux_supports_vfork_events): New function.
5238 (linux_target_ops): Initialize new structure members.
5239 (initialize_low): Call linux_check_ptrace_features.
5240 * lynx-low.c (lynx_target_ops): Initialize new structure
5241 members.
5242 * server.c (report_fork_events, report_vfork_events):
5243 New global flags.
5244 (handle_query): Add new features to qSupported packet and
5245 response.
5246 (captured_main): Initialize new global variables.
5247 * target.h (struct target_ops) <supports_fork_events>:
5248 New member.
5249 <supports_vfork_events>: New member.
5250 (target_supports_fork_events): New macro.
5251 (target_supports_vfork_events): New macro.
5252 * win32-low.c (win32_target_ops): Initialize new structure
5253 members.
5254
835205d0
GB
52552015-05-12 Gary Benson <gbenson@redhat.com>
5256
5257 * server.c (handle_qxfer_exec_file): Use current process
5258 if annex is empty.
5259
21e94bd9
SL
52602015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5261
5262 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5263 Remove HAVE_PTRACE_GETREGS conditionals.
5264 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5265 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5266
45614f15
YQ
52672015-05-08 Yao Qi <yao.qi@linaro.org>
5268
5269 * linux-low.c (linux_supports_conditional_breakpoints): New
5270 function.
5271 (linux_target_ops): Install new target method.
5272 * lynx-low.c (lynx_target_ops): Install NULL hook for
5273 supports_conditional_breakpoints.
5274 * nto-low.c (nto_target_ops): Likewise.
5275 * spu-low.c (spu_target_ops): Likewise.
5276 * win32-low.c (win32_target_ops): Likewise.
5277 * server.c (handle_query): Check
5278 target_supports_conditional_breakpoints.
5279 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5280 New field.
5281 (target_supports_conditional_breakpoints): New macro.
5282
80ad801e
PA
52832015-05-06 Pedro Alves <palves@redhat.com>
5284
5285 PR server/18081
5286 * server.c (start_inferior): If the process exits, mourn it.
5287
819843c7
GB
52882015-04-21 Gary Benson <gbenson@redhat.com>
5289
5290 * hostio.c (fileio_open_flags_to_host): Factored out to
5291 fileio_to_host_openflags in common/fileio.c. Single use
5292 updated.
5293
a2d5a9d7
MF
52942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5295
5296 * linux-xtensa-low.c (xtensa_fill_gregset)
5297 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5298 XCHAL_HAVE_LOOP.
5299
deb44829
MF
53002015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5301
5302 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5303 (regs_info): Replace usrregs pointer with NULL.
5304
e57f1de3
GB
53052015-04-17 Gary Benson <gbenson@redhat.com>
5306
5307 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5308 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5309 * server.c (handle_qxfer_exec_file): New function.
5310 (qxfer_packets): Add exec-file entry.
5311 (handle_query): Report qXfer:exec-file:read as supported packet.
5312
62828379
RN
53132015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5314
5315 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5316
b88bb450
GB
53172015-04-09 Gary Benson <gbenson@redhat.com>
5318
5319 * hostio-errno.c (errno_to_fileio_error): Remove function.
5320 Update caller to use remote_fileio_to_fio_error.
5321
c8f4bfdd
YQ
53222015-04-09 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-low.c (linux_insert_point): Call
5325 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5326 (linux_remove_point): Call remove_memory_breakpoint if type is
5327 raw_bkpt_type_sw.
5328 * linux-x86-low.c (x86_insert_point): Don't call
5329 insert_memory_breakpoint.
5330 (x86_remove_point): Don't call remove_memory_breakpoint.
5331
41f98f02
PA
53322015-04-01 Pedro Alves <palves@redhat.com>
5333 Cleber Rosa <crosa@redhat.com>
5334
5335 * server.c (gdbserver_usage): Reorganize and extend the usage
5336 message.
5337
2bf6fb9d
PA
53382015-03-24 Pedro Alves <palves@redhat.com>
5339
5340 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5341 output. Also dump TRAP_TRACE.
5342 (linux_low_filter_event): In debug output, distinguish a
5343 resume_stop SIGSTOP from a delayed SIGSTOP.
5344
369f6daa
GB
53452015-03-24 Gary Benson <gbenson@redhat.com>
5346
5347 * linux-x86-low.c (x86_linux_new_thread): Moved to
5348 nat/x86-linux.c.
5349 (x86_linux_prepare_to_resume): Likewise.
5350
8e5d4070
GB
53512015-03-24 Gary Benson <gbenson@redhat.com>
5352
5353 * Makefile.in (x86-linux-dregs.o): New rule.
5354 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5355 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5356 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5357 (x86_linux_dr_get): Likewise.
5358 (x86_linux_dr_set): Likewise.
5359 (update_debug_registers_callback): Likewise.
5360 (x86_linux_dr_set_addr): Likewise.
5361 (x86_linux_dr_get_addr): Likewise.
5362 (x86_linux_dr_set_control): Likewise.
5363 (x86_linux_dr_get_control): Likewise.
5364 (x86_linux_dr_get_status): Likewise.
5365 (x86_linux_update_debug_registers): Likewise.
5366
2b95d440
GB
53672015-03-24 Gary Benson <gbenson@redhat.com>
5368
5369 * linux-x86-low.c (x86_linux_update_debug_registers):
5370 New function, factored out from...
5371 (x86_linux_prepare_to_resume): ...this.
5372
14b0bc68
GB
53732015-03-24 Gary Benson <gbenson@redhat.com>
5374
5375 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5376 (x86_linux_dr_set): Likewise.
5377 (update_debug_registers_callback): Likewise.
5378 (x86_linux_dr_set_addr): Likewise.
5379 (x86_linux_dr_get_addr): Likewise.
5380 (x86_linux_dr_set_control): Likewise.
5381 (x86_linux_dr_get_control): Likewise.
5382 (x86_linux_dr_get_status): Likewise.
5383 (x86_linux_prepare_to_resume): Likewise.
5384
5dfe6ca8
GB
53852015-03-24 Gary Benson <gbenson@redhat.com>
5386
5387 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5388 Use perror_with_name. Pass string through gettext.
5389 (x86_linux_dr_set): Likewise.
5390
d33472ad
GB
53912015-03-24 Gary Benson <gbenson@redhat.com>
5392
5393 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5394 (x86_linux_dr_set_addr): ...this.
5395 (x86_dr_low_get_addr): Rename to...
5396 (x86_linux_dr_get_addr): ...this.
5397 (x86_dr_low_set_control): Rename to...
5398 (x86_linux_dr_set_control): ...this.
5399 (x86_dr_low_get_control): Rename to...
5400 (x86_linux_dr_get_control): ...this.
5401 (x86_dr_low_get_status): Rename to...
5402 (x86_linux_dr_get_status): ...this.
5403 (x86_dr_low): Update with new function names.
5404
4b134ca1
GB
54052015-03-24 Gary Benson <gbenson@redhat.com>
5406
5407 * Makefile.in (x86-linux.o): New rule.
5408 * configure.srv: Add x86-linux.o to relevant targets.
5409 * linux-low.c (lwp_set_arch_private_info): New function.
5410 (lwp_arch_private_info): Likewise.
5411 * linux-x86-low.c: Include nat/x86-linux.h.
5412 (arch_lwp_info): Removed structure.
5413 (update_debug_registers_callback):
5414 Use lwp_set_debug_registers_changed.
5415 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5416 and lwp_set_debug_registers_changed.
5417 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5418
34c703da
GB
54192015-03-24 Gary Benson <gbenson@redhat.com>
5420
5421 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5422 * linux-arm-low.c (arm_new_thread): Likewise.
5423 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5424 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5425 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5426 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5427
cff068da
GB
54282015-03-24 Gary Benson <gbenson@redhat.com>
5429
5430 * linux-low.c (ptid_of_lwp): New function.
5431 (lwp_is_stopped): Likewise.
5432 (lwp_stop_reason): Likewise.
5433 * linux-x86-low.c (update_debug_registers_callback):
5434 Use lwp_is_stopped.
5435 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5436 lwp_stop_reason.
5437
b2f7c7e8
GB
54382015-03-24 Gary Benson <gbenson@redhat.com>
5439
5440 * linux-low.h (linux_stop_lwp): Remove declaration.
5441
6d4ee8c6
GB
54422015-03-24 Gary Benson <gbenson@redhat.com>
5443
5444 * linux-low.h: Include nat/linux-nat.h.
5445 * linux-low.c (iterate_over_lwps_args): New structure.
5446 (iterate_over_lwps_filter): New function.
5447 (iterate_over_lwps): Likewise.
5448 * linux-x86-low.c (update_debug_registers_callback):
5449 Update signature to what iterate_over_lwps expects.
5450 Remove PID check that iterate_over_lwps now performs.
5451 (x86_dr_low_set_addr): Use iterate_over_lwps.
5452 (x86_dr_low_set_control): Likewise.
5453
70a0bb6b
GB
54542015-03-24 Gary Benson <gbenson@redhat.com>
5455
5456 * linux-x86-low.c (x86_debug_reg_state): New function.
5457 (x86_linux_prepare_to_resume): Use the above.
5458
7b669087
GB
54592015-03-24 Gary Benson <gbenson@redhat.com>
5460
5461 * linux-low.c (current_lwp_ptid): New function.
5462 * linux-x86-low.c: Include nat/linux-nat.h.
5463 (x86_dr_low_get_addr): Use current_lwp_ptid.
5464 (x86_dr_low_get_control): Likewise.
5465 (x86_dr_low_get_status): Likewise.
5466
eef49a3d
PA
54672015-03-20 Pedro Alves <palves@redhat.com>
5468
5469 * tracepoint.c (cmd_qtstatus): Make "str" const.
5470
b2333d22
PA
54712015-03-20 Pedro Alves <palves@redhat.com>
5472
5473 * server.c (handle_general_set): Make "req_str" const.
5474
23f238d3
PA
54752015-03-19 Pedro Alves <palves@redhat.com>
5476
5477 * linux-low.c (linux_resume_one_lwp): Rename to ...
5478 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5479 instead call perror_with_name.
5480 (check_ptrace_stopped_lwp_gone): New function.
5481 (linux_resume_one_lwp): Reimplement as wrapper around
5482 linux_resume_one_lwp_throw that swallows errors if the LWP is
5483 gone.
5484
91baf43f
PA
54852015-03-19 Pedro Alves <palves@redhat.com>
5486
5487 * linux-low.c (count_events_callback, select_event_lwp_callback):
5488 No longer check whether the thread has resume_stop as last resume
5489 kind.
5490
8bf3b159
PA
54912015-03-19 Pedro Alves <palves@redhat.com>
5492
5493 * linux-low.c (count_events_callback, select_event_lwp_callback):
5494 Use the lwp's status_pending_p field, not the thread's.
5495
b90fc188
PA
54962015-03-19 Pedro Alves <palves@redhat.com>
5497
5498 * linux-low.c (select_event_lwp_callback): Update comments to
5499 no longer mention SIGTRAP.
5500
464b0089
GB
55012015-03-18 Gary Benson <gbenson@redhat.com>
5502
5503 * server.c (handle_query): Do not report vFile:fstat as supported.
5504
aa9e327f
GB
55052015-03-11 Gary Benson <gbenson@redhat.com>
5506
5507 * hostio.c (sys/types.h): New include.
5508 (sys/stat.h): Likewise.
5509 (common-remote-fileio.h): Likewise.
5510 (handle_fstat): New function.
5511 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5512
791c0056
GB
55132015-03-11 Gary Benson <gbenson@redhat.com>
5514
5515 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5516 struct stat.st_blocks and struct stat.st_blksize.
5517 * configure: Regenerate.
5518 * config.in: Likewise.
5519 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5520 (OBS): Add common-remote-fileio.o.
5521 (common-remote-fileio.o): New rule.
5522
9a9df970
PA
55232015-03-09 Pedro Alves <palves@redhat.com>
5524
5525 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5526 'struct sockaddr' pointer in 'accept' call.
5527
9eb1356e
PA
55282015-03-09 Pedro Alves <palves@redhat.com>
5529
5530 Revert:
5531 2015-03-07 Pedro Alves <palves@redhat.com>
5532 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5533 or <winsock2.h> here. Instead include "gdb_socket.h".
5534 (remote_open): Use union gdb_sockaddr_u.
5535 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5536 or <winsock2.h> here. Instead include "gdb_socket.h".
5537 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5538 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5539 or <sys/un.h>.
5540 (init_named_socket, gdb_agent_helper_thread): Use union
5541 gdb_sockaddr_u.
5542
aac331e4
PA
55432015-03-07 Pedro Alves <palves@redhat.com>
5544
5545 * configure.ac (build_warnings): Move
5546 -Wdeclaration-after-statement to the C-specific set.
5547 * configure: Regenerate.
5548
366c75fc
PA
55492015-03-07 Pedro Alves <palves@redhat.com>
5550
5551 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5552 or <winsock2.h> here. Instead include "gdb_socket.h".
5553 (remote_open): Use union gdb_sockaddr_u.
5554 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5555 or <winsock2.h> here. Instead include "gdb_socket.h".
5556 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5557 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5558 or <sys/un.h>.
5559 (init_named_socket, gdb_agent_helper_thread): Use union
5560 gdb_sockaddr_u.
5561
492d29ea
PA
55622015-03-07 Pedro Alves <palves@redhat.com>
5563
5564 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5565 instead.
5566
60a191ed
YQ
55672015-03-06 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-aarch64-low.c (aarch64_insert_point): Use
5570 show_debug_regs as a boolean.
5571 (aarch64_remove_point): Likewise.
5572
f5771b1d
PA
55732015-03-05 Pedro Alves <palves@redhat.com>
5574
5575 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5576 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5577 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5578 * nto-low.c (nto_target_ops): Likewise.
5579 * spu-low.c (spu_target_ops): Likewise.
5580 * win32-low.c (win32_target_ops): Likewise.
5581
3e572f71
PA
55822015-03-04 Pedro Alves <palves@redhat.com>
5583
72f4393d 5584 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5585 Decide whether a breakpoint triggered based on the SIGTRAP's
5586 siginfo.si_code.
72f4393d
L
5587 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5588 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5589 (linux_low_filter_event): Check for breakpoints before checking
5590 watchpoints.
5591 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5592 siginfo.si_code.
72f4393d
L
5593 (linux_stopped_by_sw_breakpoint)
5594 (linux_supports_stopped_by_sw_breakpoint)
5595 (linux_stopped_by_hw_breakpoint)
5596 (linux_supports_stopped_by_hw_breakpoint): New functions.
5597 (linux_target_ops): Install new target methods.
3e572f71 5598
1ec68e26
PA
55992015-03-04 Pedro Alves <palves@redhat.com>
5600
5601 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5602 * server.c (swbreak_feature, hwbreak_feature): New globals.
5603 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5604 (captured_main): Clear swbreak_feature and hwbreak_feature.
5605 * server.h (swbreak_feature, hwbreak_feature): Declare.
5606 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5607 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5608 supports_stopped_by_hw_breakpoint>: New fields.
5609 (target_supports_stopped_by_sw_breakpoint)
5610 (target_stopped_by_sw_breakpoint)
5611 (target_supports_stopped_by_hw_breakpoint)
5612 (target_stopped_by_hw_breakpoint): Declare.
5613
15c66dd6
PA
56142015-03-04 Pedro Alves <palves@redhat.com>
5615
5616 enum lwp_stop_reason -> enum target_stop_reason
5617 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5618 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5619 (linux_wait_1, stuck_in_jump_pad_callback)
5620 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5621 (linux_stopped_by_watchpoint):
5622 * linux-low.h (enum lwp_stop_reason): Delete.
5623 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5624 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5625
98fc70d6
YQ
56262015-03-04 Yao Qi <yao.qi@linaro.org>
5627
5628 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5629
dd2ac174
GB
56302015-03-03 Gary Benson <gbenson@redhat.com>
5631
5632 * hostio.c (handle_vFile): Fix prefix lengths.
5633
d68e53f4
MM
56342015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5635
5636 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5637 ptr_bits.
5638
bf2d68ab
AA
56392015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5640
5641 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5642 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5643 (clean): Add "rm -f" for above C files.
5644 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5645 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5646 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5647 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5648 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5649 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5650 (init_registers_s390x_vx_linux64)
5651 (init_registers_s390x_tevx_linux64)
5652 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5653 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5654 declarations.
5655 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5656 (s390_store_vxrs_high): New functions.
5657 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5658 NT_S390_VXRS_HIGH.
5659 (s390_arch_setup): Add logic for selecting one of the new target
5660 descriptions. Activate the new vector regsets if applicable.
5661 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5662 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5663 and init_registers_s390x_tevx_linux64.
5664
c966a859
PA
56652015-03-01 Pedro Alves <palves@redhat.com>
5666
5667 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5668 parameter.
5669
4180215b
PA
56702015-02-27 Pedro Alves <palves@redhat.com>
5671
5672 * linux-x86-low.c (u_debugreg_offset): New function.
5673 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5674
749bab01
PA
56752015-02-27 Pedro Alves <palves@redhat.com>
5676
5677 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5678 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5679 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5680 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5681 (ps_lsetfpregs, ps_getpid)
5682 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5683 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5684 (ps_lsetxregs, ps_plog): Declare.
5685
3c14e5a3
PA
56862015-02-27 Pedro Alves <palves@redhat.com>
5687
5688 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5689 IP_AGENT_EXPORT_FUNC.
5690 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5691 IP_AGENT_EXPORT_FUNC.
5692 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5693 (IP_AGENT_EXPORT): Delete.
5694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5695 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5696 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5697 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5698 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5699 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5700 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5701 (traceframe_read_count, traceframe_write_count)
5702 (traceframes_created, trace_state_variables, get_raw_reg)
5703 (get_trace_state_variable_value, set_trace_state_variable_value)
5704 (ust_loaded, helper_thread_id, cmd_buf): Use
5705 IPA_SYM_EXPORTED_NAME.
5706 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5707 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5708 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5709 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5710 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5711 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5712 EXTERN_C_PUSH/EXTERN_C_POP.
5713 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5714 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5715 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5716 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5717 (traceframe_write_count, traceframe_read_count)
5718 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5719 (about_to_request_buffer_space, get_trace_state_variable_value)
5720 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5721 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5722 EXTERN_C_PUSH/EXTERN_C_POP.
5723 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5724 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5725 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5726 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5727 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5728 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5729 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5730 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5731 Define.
5732 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5733 (IP_AGENT_EXPORT_VAR_DECL): Define.
5734 (tracing): Declare.
5735 (gdb_agent_get_raw_reg): Declare.
5736
fe978cb0
PA
57372015-02-27 Tom Tromey <tromey@redhat.com>
5738 Pedro Alves <palves@redhat.com>
5739
5740 Rename symbols whose names are reserved C++ keywords throughout.
5741
3bc3d82a
PA
57422015-02-27 Pedro Alves <palves@redhat.com>
5743
5744 * Makefile.in (COMPILER): New, get it from autoconf.
5745 (CXX): Get from autoconf instead.
5746 (COMPILE.pre): Use COMPILER.
5747 (CC-LD): Rename to ...
5748 (CC_LD): ... this. Use COMPILER.
5749 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5750 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5751 * acinclude.m4: Include build-with-cxx.m4.
5752 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5753 Disable -Werror by default if building in C++ mode.
5754 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5755 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5756 the C++ compiler. Save/restore CXXFLAGS too.
5757 * configure: Regenerate.
5758
07697489
PA
57592015-02-27 Pedro Alves <palves@redhat.com>
5760
5761 * acinclude.m4: Include libiberty.m4.
5762 * configure.ac: Call libiberty_INIT.
5763 * config.in, configure: Regenerate.
5764
9beb7c4e
PA
57652015-02-26 Pedro Alves <palves@redhat.com>
5766
5767 * linux-low.c (linux_wait_1): When incrementing the PC past a
5768 program breakpoint always use the_low_target.breakpoint_len as
5769 increment, rather than the maximum between that and
5770 the_low_target.decr_pc_after_break.
5771
8090aef2
PA
57722015-02-23 Pedro Alves <palves@redhat.com>
5773
5774 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5775 thread was doing a step-over; always adjust the PC if
5776 we stepped over a permanent breakpoint.
5777 (linux_wait_1): If we stepped over breakpoint that was on top of a
5778 permanent breakpoint, manually advance the PC past it.
5779
bc9540e8
PA
57802015-02-23 Pedro Alves <palves@redhat.com>
5781
5782 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5783 modes.
5784 (x86_fill_gregset, x86_store_gregset): Use it when handling
5785 $orig_eax.
5786
2db9a427
PA
57872015-02-20 Pedro Alves <palves@redhat.com>
5788
5789 * thread-db.c: Include "nat/linux-procfs.h".
5790 (thread_db_init): Skip listing new threads if the kernel supports
5791 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5792
afa8d396
PA
57932015-02-20 Pedro Alves <palves@redhat.com>
5794
5795 * linux-low.c (status_pending_p_callback): Use ptid_match.
5796
c9587f88
AT
57972015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5798
5799 PR breakpoints/16812
5800 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5801 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5802 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5803
b05ec7a5
AT
58042015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5805
5806 PR breakpoints/15956
5807 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5808
d33501a5
MM
58092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5810
5811 * linux-low.c (linux_low_btrace_conf): Print size.
5812 * server.c (handle_btrace_conf_general_set): New.
5813 (hanle_general_set): Call handle_btrace_conf_general_set.
5814 (handle_query): Report Qbtrace-conf:bts:size as supported.
5815
f4abbc16
MM
58162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5817
5818 * linux-low.c (linux_low_enable_btrace): Update parameters.
5819 (linux_low_btrace_conf): New.
5820 (linux_target_ops)<to_btrace_conf>: Initialize.
5821 * server.c (current_btrace_conf): New.
5822 (handle_btrace_enable): Rename to ...
5823 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5824 to target_enable_btrace. Update comment. Update users.
5825 (handle_qxfer_btrace_conf): New.
5826 (qxfer_packets): Add btrace-conf entry.
5827 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5828 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5829 (target_ops)<read_btrace_conf>: New.
5830 (target_enable_btrace): Update parameters.
5831 (target_read_btrace_conf): New.
5832
043c3577
MM
58332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5834
5835 * server.c (handle_btrace_general_set): Remove call to
5836 target_supports_btrace.
5837 (supported_btrace_packets): New.
5838 (handle_query): Call supported_btrace_packets.
5839 * target.h: include btrace-common.h.
5840 (btrace_target_info): Removed.
5841 (supports_btrace, target_supports_btrace): Update parameters.
5842
734b0e4b
MM
58432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5844
5845 * Makefile.in (SFILES): Add common/btrace-common.c.
5846 (OBS): Add common/btrace-common.o.
5847 (btrace-common.o): Add build rules.
5848 * linux-low: Include btrace-common.h.
5849 (linux_low_read_btrace): Use struct btrace_data. Call
5850 btrace_data_init and btrace_data_fini.
5851
d6c146e9
PA
58522015-02-06 Pedro Alves <palves@redhat.com>
5853
5854 * thread-db.c (find_new_threads_callback): Add debug output.
5855
20ba1ce6
PA
58562015-02-04 Pedro Alves <palves@redhat.com>
5857
5858 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5859 (resume_stopped_resumed_lwps): New function.
5860 (linux_wait_for_event_filtered): Use it.
5861
8cc73a39
SDJ
58622015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5863
5864 * Makefile.in (SFILES): Add linux-personality.c.
5865 (linux-personality.o): New rule.
5866 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5867 list of objects to be built.
5868 * linux-low.c: Include nat/linux-personality.h.
5869 (linux_create_inferior): Remove code to disable address space
5870 randomization (moved to ../nat/linux-personality.c). Create
5871 cleanup to disable address space randomization.
5872
fb23d554
SDJ
58732015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5874
5875 * Makefile.in (posix-strerror.o): New rule.
5876 (mingw-strerror.o): Likewise.
5877 * configure: Regenerated.
5878 * configure.ac: Source file ../common/common.host. Initialize new
5879 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5880
cdf43629
YQ
58812015-01-14 Yao Qi <yao@codesourcery.com>
5882
5883 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5884 (ppc-linux.o): New rule.
5885 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5886 * configure.ac: AC_CHECK_FUNCS(getauxval).
5887 * config.in: Re-generated.
5888 * configure: Re-generated.
5889 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5890 ppc64_64bit_inferior_p
5891
514c5338
YQ
58922015-01-14 Yao Qi <yao@codesourcery.com>
5893
5894 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5895 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5896 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5897 (PT_ORIG_R3, PT_TRAP): Likewise.
5898 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5899 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5900 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5901
3368c1e5
JB
59022015-01-10 Joel Brobecker <brobecker@adacore.com>
5903
5904 * i387-fp.c (i387_cache_to_xsave): In look over
5905 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5906 zmmh_low_space field by use of zmmh_high_space.
5907
582511be
PA
59082015-01-09 Pedro Alves <palves@redhat.com>
5909
5910 * linux-low.c (step_over_bkpt): Move higher up in the file.
5911 (handle_extended_wait): Don't store the stop_pc here.
5912 (get_stop_pc): Adjust comments and rename to ...
5913 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5914 stopped for a software breakpoint or hardware breakpoint.
5915 (thread_still_has_status_pending_p): New function.
5916 (status_pending_p_callback): Use
5917 thread_still_has_status_pending_p. If the event is no longer
5918 interesting, resume the LWP.
5919 (handle_tracepoints): Add assert.
5920 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5921 (wstatus_maybe_breakpoint): New function.
5922 (cancel_breakpoint): Delete function.
5923 (check_stopped_by_watchpoint): New function, factored out from
5924 linux_low_filter_event.
5925 (lp_status_maybe_breakpoint): Delete function.
5926 (linux_low_filter_event): Remove filter_ptid argument.
5927 Leave thread group exits pending here. Store the LWP's stop PC.
5928 Always leave events pending.
5929 (linux_wait_for_event_filtered): Pull all events out of the
5930 kernel, and leave them all pending.
5931 (count_events_callback, select_event_lwp_callback): Consider all
5932 events.
5933 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5934 (select_event_lwp): Only give preference to the stepping LWP in
5935 all-stop mode. Adjust comments.
5936 (ignore_event): New function.
5937 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5938 references to cancel_breakpoints. Adjust to renames. Also give
5939 equal priority to all LWPs that have had events in non-stop mode.
5940 If reporting a software breakpoint event, unadjust the LWP's PC.
5941 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5942 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5943 Adjust.
5944 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5945 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5946 (linux_stopped_by_watchpoint): Adjust.
5947 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5948 * linux-low.h (enum lwp_stop_reason): New.
5949 (struct lwp_info) <stop_pc>: Adjust comment.
5950 <stopped_by_watchpoint>: Delete field.
5951 <stop_reason>: New field.
5952 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5953 * mem-break.c (software_breakpoint_inserted_here)
5954 (hardware_breakpoint_inserted_here): New function.
5955 * mem-break.h (software_breakpoint_inserted_here)
5956 (hardware_breakpoint_inserted_here): Declare.
5957 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5958 (cancel_breakpoints): Delete.
5959 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5960 (upload_fast_traceframes): Remove references to
5961 cancel_breakpoints.
5962
a33e3959
PA
59632015-01-09 Pedro Alves <palves@redhat.com>
5964
5965 * thread-db.c (find_new_threads_callback): Ignore thread if the
5966 kernel thread ID is -1.
5967
8784d563
PA
59682015-01-09 Pedro Alves <palves@redhat.com>
5969
5970 * linux-low.c (linux_attach_fail_reason_string): Move to
5971 nat/linux-ptrace.c, and rename.
5972 (linux_attach_lwp): Update comment.
5973 (attach_proc_task_lwp_callback): New function.
5974 (linux_attach): Adjust to rename and use
5975 linux_proc_attach_tgid_threads.
5976 (linux_attach_fail_reason_string): Delete declaration.
5977
76f2b779
JB
59782015-01-01 Joel Brobecker <brobecker@adacore.com>
5979
5980 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5981 * server.c (gdbserver_version): Likewise.
5982
fafcc06a
SDJ
59832014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5984
5985 * remote-utils.c: Include ctype.h.
5986 (input_interrupt): Explicitly handle the case when the char
5987 received is the NUL byte. Improve the printing of non-ASCII
5988 characters.
5989
beed38b8
JB
59902014-12-16 Joel Brobecker <brobecker@adacore.com>
5991
5992 * linux-low.c (linux_low_filter_event): Update call to
5993 linux_enable_event_reporting following the addition of
5994 a new parameter to that function.
5995
bf330350
CU
59962014-12-16 Catalin Udma <catalin.udma@freescale.com>
5997
5998 PR server/17457
5999 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6000 (AARCH64_FPCR_REGNO): Likewise.
6001 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6002 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6003 (aarch64_store_fpregset): Likewise.
6004
5227d625
JB
60052014-12-15 Joel Brobecker <brobecker@adacore.com>
6006
6007 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6008 Remove FIXME comment about assumption about N.
6009
f93b65a0
JB
60102014-12-13 Joel Brobecker <brobecker@adacore.com>
6011
6012 * configure.ac: If large-file support is disabled in GDBserver,
6013 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6014 * configure: Regenerate.
6015
e5a9158d
AA
60162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6017
6018 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6019 warning upon ENODATA from ptrace.
6020 * linux-s390-low.c (s390_store_tdb): New.
6021 (s390_regsets): Add regset for NT_S390_TDB.
6022
feea5f36
AA
60232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6024
6025 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6026 without a fill_function.
6027 * linux-s390-low.c (s390_fill_last_break): Remove.
6028 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6029 (s390_arch_setup): Use regset's size instead of fill_function for
6030 loop end condition.
6031
098dbe61
AA
60322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6033
6034 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6035 the regset's store function when ptrace returned an error.
6036 * regcache.c (get_thread_regcache): Invalidate register cache
6037 before fetching inferior's registers.
6038
28eef672
AA
60392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6040
6041 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6042 while-loop as for-loop.
6043 (regsets_store_inferior_registers): Likewise.
6044
bdca27a2
YQ
60452014-11-28 Yao Qi <yao@codesourcery.com>
6046
6047 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6048 * config.in, configure: Re-generate.
6049 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6050 is defined.
6051
9c232dda
YQ
60522014-11-21 Yao Qi <yao@codesourcery.com>
6053
6054 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6055 (AC_CHECK_HEADERS): Remove malloc.h.
6056 * configure: Re-generated.
6057 * config.in: Re-generated.
6058 * server.h: Don't include alloca.h and malloc.h.
6059 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6060 Don't include malloc.h.
6061
43968415
JB
60622014-11-17 Joel Brobecker <brobecker@adacore.com>
6063
6064 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6065 corresponding ERRNO check in same block.
6066
40e91bc7
PA
60672014-11-12 Pedro Alves <palves@redhat.com>
6068
6069 * server.c (cont_thread): Update comment.
6070 (start_inferior, attach_inferior): No longer clear cont_thread.
6071 (handle_v_cont): No longer set cont_thread.
6072 (captured_main): Clear cont_thread each time a GDB connects.
6073
c2c118cf
PA
60742014-11-12 Pedro Alves <palves@redhat.com>
6075
6076 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6077 thread, and don't resume all threads if the Hc thread has exited.
6078
78708b7c
PA
60792014-11-12 Pedro Alves <palves@redhat.com>
6080
6081 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6082 the process group instead of to a specific LWP.
6083
a2abc7de
PA
60842014-10-15 Pedro Alves <palves@redhat.com>
6085
6086 PR server/17487
6087 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6088 parameter.
6089 (arm_set_thread_context): Delete.
6090 (the_low_target): Adjust.
6091 * win32-i386-low.c (debug_registers_changed)
6092 (debug_registers_used): Delete.
6093 (update_debug_registers_callback): New function.
6094 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6095 needing to update their debug registers.
6096 (win32_get_current_dr): New function.
6097 (x86_dr_low_get_addr, x86_dr_low_get_control)
6098 (x86_dr_low_get_status): Fetch the debug register from the thread
6099 record's context.
6100 (i386_initial_stuff): Adjust.
6101 (i386_get_thread_context): Remove current_event parameter. Don't
6102 clear debug_registers_changed nor copy DR values to
6103 debug_reg_state.
6104 (i386_set_thread_context): Delete.
6105 (i386_prepare_to_resume): New function.
6106 (i386_thread_added): Mark the thread as needing to update irs
6107 debug registers.
6108 (the_low_target): Remove i386_set_thread_context and install
6109 i386_prepare_to_resume.
6110 * win32-low.c (win32_get_thread_context): Adjust.
6111 (win32_set_thread_context): Use SetThreadContext
6112 directly.
6113 (win32_prepare_to_resume): New function.
6114 (win32_require_context): New function, factored out from ...
6115 (thread_rec): ... this.
6116 (continue_one_thread): Call win32_prepare_to_resume on each thread
6117 we're about to continue.
6118 (win32_resume): Call win32_prepare_to_resume on the event thread.
6119 * win32-low.h (struct win32_thread_info)
6120 <debug_registers_changed>: New field.
6121 (struct win32_target_ops): Change prototype of set_thread_context,
6122 delete set_thread_context and add prepare_to_resume.
6123 (win32_require_context): New declaration.
6124
a442d071
GB
61252014-10-08 Gary Benson <gbenson@redhat.com>
6126
6127 * server.h: Do not include common-exceptions.h.
6128
6f1947e8
GB
61292014-10-08 Gary Benson <gbenson@redhat.com>
6130
6131 * server.h: Do not include cleanups.h.
6132
63b434a4
JH
61332014-09-30 James Hogan <james.hogan@imgtec.com>
6134
6135 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6136 mips64-dsp-linux.c.
6137
c4d9ceb6
YQ
61382014-09-23 Yao Qi <yao@codesourcery.com>
6139
6140 * linux-low.c (lp_status_maybe_breakpoint): New function.
6141 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6142 (count_events_callback): Likewise.
6143 (select_event_lwp_callback): Likewise.
6144 (cancel_breakpoints_callback): Likewise.
6145
89a5711c
DB
61462014-09-19 Don Breazeal <donb@codesourcery.com>
6147
6148 * linux-low.c (handle_extended_wait): Call
6149 linux_ptrace_get_extended_event.
6150 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6151 linux_is_extended_waitstatus.
6152
bffc0964
JB
61532014-09-16 Joel Brobecker <brobecker@adacore.com>
6154
6155 * Makefile.in (CPPFLAGS): Define.
6156 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6157 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6158
0bfdf32f
GB
61592014-09-16 Gary Benson <gbenson@redhat.com>
6160
6161 * inferiors.h (current_inferior): Renamed as...
6162 (current_thread): New variable. All uses updated.
6163 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6164 (maybe_move_out_of_jump_pad): Likewise.
6165 (cancel_breakpoint): Likewise.
6166 (linux_low_filter_event): Likewise.
6167 (wait_for_sigstop): Likewise.
6168 (linux_resume_one_lwp): Likewise.
6169 (need_step_over_p): Likewise.
6170 (start_step_over): Likewise.
6171 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6172 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6173 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6174 and save_inferior as saved_thread.
6175 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6176 saved_thread.
6177 (regcache_invalidate_thread): Likewise.
6178 * remote-utils.c (prepare_resume_reply): Likewise.
6179 * thread-db.c (thread_db_get_tls_address): Likewise.
6180 (disable_thread_event_reporting): Likewise.
6181 (remove_thread_event_breakpoints): Likewise.
6182 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6183 as saved_thread.
6184 * target.h (set_desired_inferior): Renamed as...
6185 (set_desired_thread): New declaration. All uses updated.
6186 * server.c (myresume): Updated comment to reference thread instead
6187 of inferior.
6188 (handle_serial_event): Likewise.
6189 (handle_target_event): Likewise.
6190
361c8ade
GB
61912014-09-12 Tom Tromey <tromey@redhat.com>
6192 Gary Benson <gbenson@redhat.com>
6193
6194 * regcache.h: Include common-regcache.h.
6195 (regcache_read_pc): Don't declare.
6196 * regcache.c (get_thread_regcache_for_ptid): New function.
6197
bd9269f7
GB
61982014-09-11 Tom Tromey <tromey@redhat.com>
6199 Gary Benson <gbenson@redhat.com>
6200
6201 * symbol.c: New file.
6202 * Makefile.in (SFILES): Add symbol.c.
6203 (OBS): Add symbol.o.
6204
f8c1d06b
GB
62052014-09-11 Gary Benson <gbenson@redhat.com>
6206
6207 * target.c (target_stop_ptid, target_continue_ptid): New
6208 functions.
6209
721ec300
GB
62102014-09-11 Tom Tromey <tromey@redhat.com>
6211 Gary Benson <gbenson@redhat.com>
6212
6213 * target.h: Include target/target.h.
6214 * target.c (target_read_memory, target_read_uint32)
6215 (target_write_memory): New functions.
6216
c5e92cca
GB
62172014-09-11 Gary Benson <gbenson@redhat.com>
6218
6219 * server.h (debug_hw_points): Don't declare.
6220 * server.c (debug_hw_points): Don't define. Replace all uses
6221 with show_debug_regs.
6222 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6223 all uses with show_debug_regs.
6224
2e4bb98a
EBM
62252014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6226
6227 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6228 endianness into account.
6229 (ppc_supply_ptrace_register): Likewise.
6230
ac740bc7
JH
62312014-09-03 James Hogan <james.hogan@imgtec.com>
6232
6233 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6234 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6235
97ea6506
GB
62362014-09-03 Gary Benson <gbenson@redhat.com>
6237
6238 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6239 ALL_DEBUG_ADDRESS_REGISTERS.
6240
df7e5265
GB
62412014-09-02 Gary Benson <gbenson@redhat.com>
6242
6243 * i386-low.h: Renamed as...
6244 * x86-low.h: New file. All type, function and variable name
6245 prefixes changed from "i386_" to "x86_". All references updated.
6246 * i386-low.c: Renamed as...
6247 * x86-low.c: New file. All type, function and variable name
6248 prefixes changed from "i386_" to "x86_". All references updated.
6249
ed859da7
GB
62502014-09-02 Gary Benson <gbenson@redhat.com>
6251
6252 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6253 (x86_linux_new_thread): Likewise.
6254
860789c7
GB
62552014-08-29 Gary Benson <gbenson@redhat.com>
6256
6257 * server.h (setjmp.h): Do not include.
6258 (toplevel): Do not declare.
6259 (common-exceptions.h): Include.
6260 (cleanups.h): Likewise.
6261 * server.c (toplevel): Do not define.
6262 (exit_code): New static global.
6263 (detach_or_kill_for_exit_cleanup): New function.
6264 (main): New function. Original main renamed to...
6265 (captured_main): New function.
6266 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6267
ff55e1b5
GB
62682014-08-29 Gary Benson <gbenson@redhat.com>
6269
6270 * Makefile.in (SFILES): Add common/common-exceptions.c.
6271 (OBS): Add common-exceptions.o.
6272 (common-exceptions.o): New rule.
6273 * utils.c (prepare_to_throw_exception): New function.
6274
e9bcb658
GB
62752014-08-29 Gary Benson <gbenson@redhat.com>
6276
6277 * config.in: Regenerate.
6278 * configure: Likewise.
6279
e3180625
GB
62802014-08-29 Gary Benson <gbenson@redhat.com>
6281
6282 * Makefile.in (SFILES): Add common/cleanups.c.
6283 (OBS): cleanups.o.
6284 (cleanups.o): New rule.
6285
e3d6ba5d
GB
62862014-08-29 Gary Benson <gbenson@redhat.com>
6287
6288 * utils.c (internal_vwarning): New function.
6289
7096e886
GB
62902014-08-28 Gary Benson <gbenson@redhat.com>
6291
6292 * utils.h (fatal): Remove declaration.
6293 * utils.c (fatal): Remove function.
6294
14ce3192
GB
62952014-08-28 Gary Benson <gbenson@redhat.com>
6296
6297 * tracepoint.c (gdb_agent_init): Replace fatal with
6298 perror_with_name.
6299 (initialize_tracepoint): Likewise.
6300
50278d59
GB
63012014-08-28 Gary Benson <gbenson@redhat.com>
6302
6303 * remote-utils.c (remote_prepare): Replace fatal with error.
6304
aa96c426
GB
63052014-08-28 Gary Benson <gbenson@redhat.com>
6306
6307 * linux-low.c (linux_async): Replace fatal with warning.
6308 Tidy up and return.
6309 (linux_start_non_stop): Return -1 if linux_async failed.
6310
f7160e97
GB
63112014-08-28 Gary Benson <gbenson@redhat.com>
6312
6313 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6314 gdb_assert.
6315 (i386_dr_low_get_addr): Remove vague comment.
6316 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6317 gdb_assert.
6318
38e08fca
GB
63192014-08-28 Gary Benson <gbenson@redhat.com>
6320
6321 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6322 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6323 internal_error.
6324 (linux_resume_one_lwp): Likewise.
6325 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6326 gdb_assert.
6327 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6328 with internal_error.
6329 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6330 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6331 (find_register_by_name): Replace fatal with internal_error.
6332 (find_regno): Likewise.
6333 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6334 * thread-db.c (thread_db_create_event): Likewise.
6335 (thread_db_load_search): Likewise.
6336 (try_thread_db_load_1): Likewise.
6337 * tracepoint.c (get_jump_space_head): Replace fatal with
6338 internal_error.
6339 (claim_trampoline_space): Likewise.
6340 (have_fast_tracepoint_trampoline_buffer): Likewise.
6341 (cmd_qtstart): Likewise.
6342 (stop_tracing): Likewise.
6343 (fast_tracepoint_collecting): Likewise.
6344 (target_malloc): Likewise.
6345 (download_tracepoint): Likewise.
6346 (download_trace_state_variables): Replace check with gdb_assert.
6347 (upload_fast_traceframes): Replace fatal with internal_error.
6348
34abf635
GB
63492014-08-19 Tom Tromey <tromey@redhat.com>
6350 Gary Benson <gbenson@redhat.com>
6351
6352 * Makefile.in (SFILES): Add common/common-debug.c.
6353 (OBS): Add common-debug.o.
6354 (common-debug.o): New rule.
6355 * debug.h (debug_printf): Don't declare.
6356 * debug.c (debug_printf): Renamed and rewritten as...
6357 (debug_vprintf): New function.
6358
f6e94d78
GB
63592014-08-19 Gary Benson <gbenson@redhat.com>
6360
6361 * utils.h: Do not include print-utils.h.
6362
9239eeab
GB
63632014-08-19 Tom Tromey <tromey@redhat.com>
6364 Gary Benson <gbenson@redhat.com>
6365
6366 * server.h: Add static assertion.
6367 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6368
ef87c8bb
GB
63692014-08-19 Tom Tromey <tromey@redhat.com>
6370 Gary Benson <gbenson@redhat.com>
6371
6372 * Makefile.in (SFILES): Add common/errors.c.
6373 (OBS): Add errors.o.
6374 (IPA_OBS): Add errors-ipa.o.
6375 (errors.o): New rule.
6376 (errors-ipa.o): Likewise.
6377 * utils.h (perror_with_name, error, warning): Don't declare.
6378 * utils.c (warning): Renamed and rewritten as...
6379 (vwarning): New function.
6380 (error): Renamed and rewritten as...
6381 (verror): New function.
6382 (internal_error): Renamed and rewritten as...
6383 (internal_verror): New function.
6384
bb974a24
GB
63852014-08-07 Gary Benson <gbenson@redhat.com>
6386
6387 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6388 * configure: Regenerate.
6389 * config.in: Likewise.
6390 * server.h: Do not include errno.h.
6391 * event-loop.c: Likewise.
6392 * hostio-errno.c: Likewise.
6393 * linux-low.c: Likewise.
6394 * remote-utils.c: Likewise.
6395 * spu-low.c: Likewise.
6396 * utils.c: Likewise.
6397 * gdbreplay.c: Unconditionally include errno.h.
6398
6d3d12eb
GB
63992014-08-07 Gary Benson <gbenson@redhat.com>
6400
6401 * server.h: Do not include string.h.
6402 * event-loop.c: Likewise.
6403 * linux-low.c: Likewise.
6404 * regcache.c: Likewise.
6405 * remote-utils.c: Likewise.
6406 * spu-low.c: Likewise.
6407 * utils.c: Likewise.
6408
dccbb609
GB
64092014-08-07 Gary Benson <gbenson@redhat.com>
6410
6411 * server.h: Do not include gdb_assert.h.
6412
e76df0d0
GB
64132014-08-07 Gary Benson <gbenson@redhat.com>
6414
6415 * server.h: Do not include common-utils.h.
6416
4cb9c816
GB
64172014-08-07 Gary Benson <gbenson@redhat.com>
6418
6419 * server.h: Do not include ptid.h.
6420 * notif.h: Likewise.
6421
3995eeee
GB
64222014-08-07 Gary Benson <gbenson@redhat.com>
6423
6424 * server.h: Do not include gdb_locale.h.
6425
cb9f1a9b
GB
64262014-08-07 Gary Benson <gbenson@redhat.com>
6427
6428 * server.h: Do not include gdb/signals.h.
6429 * win32-low.c: Likewise.
6430
a5fceff8
GB
64312014-08-07 Gary Benson <gbenson@redhat.com>
6432
6433 * server.h: Do not include pathmax.h.
6434
b9391142
GB
64352014-08-07 Gary Benson <gbenson@redhat.com>
6436
6437 * server.h: Do not include libiberty.h.
6438 * linux-bfin-low.c: Likewise.
6439
0e443c87
GB
64402014-08-07 Gary Benson <gbenson@redhat.com>
6441
6442 * server.h: Do not include ansidecl.h.
6443
8ebb3f56
GB
64442014-08-07 Gary Benson <gbenson@redhat.com>
6445
6446 * linux-x86-low.c: Do not include stddef.h.
6447 * lynx-ppc-low.c: Likewise.
6448 * tracepoint.c: Likewise.
6449
8980bdf6
GB
64502014-08-07 Gary Benson <gbenson@redhat.com>
6451
6452 * server.h: Do not include stdarg.h.
6453 * nto-low.c: Likewise.
6454
d7096f71
GB
64552014-08-07 Gary Benson <gbenson@redhat.com>
6456
6457 * server.h: Do not include stdlib.h.
6458 * inferiors.c: Likewise.
6459 * linux-low.c: Likewise.
6460 * regcache.c: Likewise.
6461 * spu-low.c: Likewise.
6462 * tracepoint.c: Likewise.
6463 * utils.c: Likewise.
6464
d02f550d
GB
64652014-08-07 Gary Benson <gbenson@redhat.com>
6466
6467 * server.h: Do not include stdio.h.
6468 * linux-low.c: Likewise.
6469 * remote-utils.c: Likewise.
6470 * spu-low.c: Likewise.
6471 * utils.c: Likewise.
6472 * wincecompat.c: Likewise.
6473
87f6c4e3
GB
64742014-08-06 Gary Benson <gbenson@redhat.com>
6475
6476 * regcache.c (init_register_cache): Move conditionals inside if.
6477
7089dca4
GB
64782014-08-06 Gary Benson <gbenson@redhat.com>
6479
6480 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6481
462f517e
GB
64822014-07-31 Gary Benson <gbenson@redhat.com>
6483
6484 * ax.h: Do not include server.h.
6485 * gdbthread.h: Likewise.
6486 * lynx-low.h: Likewise.
6487 * notif.h: Likewise.
6488
976411d6
GB
64892014-07-30 Gary Benson <gbenson@redhat.com>
6490
6491 * server.h: Include common-defs.h.
6492 Do not include config.h or build-gnulib-gdbserver/config.h.
6493
d41f6d8e
GB
64942014-07-30 Gary Benson <gbenson@redhat.com>
6495
6496 * hostio-errno.c: Move server.h to top of includes list.
6497 * inferiors.c: Likewise.
6498 * linux-x86-low.c: Likewise.
6499 * notif.c: Include server.h.
6500
314c6a35
TT
65012014-07-24 Tom Tromey <tromey@redhat.com>
6502 Gary Benson <gbenson@redhat.com>
6503
6504 * server.h (CORE_ADDR): Now unsigned.
6505
69ff6be5
PA
65062014-07-16 Pedro Alves <palves@redhat.com>
6507
6508 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6509
ce9e3fe7
PA
65102014-07-15 Pedro Alves <palves@redhat.com>
6511
6512 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6513 copy.
6514
e76126e8
PA
65152014-07-11 Pedro Alves <palves@redhat.com>
6516
6517 * linux-low.c (kill_wait_lwp): New function, based on
6518 kill_one_lwp_callback, but use my_waitpid directly.
6519 (kill_one_lwp_callback, linux_kill): Use it.
6520
8e9db26e
PA
65212014-06-23 Pedro Alves <palves@redhat.com>
6522
6523 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6524 before setting DR0..DR3.
6525
698b3e08
GB
65262014-06-20 Gary Benson <gbenson@redhat.com>
6527
6528 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6529 * configure: Regenerated.
6530 * config.in: Likewise.
6531
125f8a3d
GB
65322014-06-20 Gary Benson <gbenson@redhat.com>
6533
6534 * Makefile.in (SFILES): Update locations for files moved
6535 from common to nat.
6536 (object file files): Reordered.
6537
42995dbd
GB
65382014-06-20 Gary Benson <gbenson@redhat.com>
6539
6540 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6541 (i386_dr_low_set_addr): Likewise.
6542 (i386_dr_low_get_addr): Likewise.
6543 (i386_dr_low_can_set_control): Likewise.
6544 (i386_dr_low_set_control): Likewise.
6545 (i386_dr_low_get_control): Likewise.
6546 (i386_dr_low_get_status): Likewise.
6547 (i386_get_debug_register_length): Likewise.
6548 * linux-x86-low.c (i386_dr_low_set_addr):
6549 Changed signature. Made static.
6550 (i386_dr_low_get_addr): Likewise.
6551 (i386_dr_low_set_control): Likewise.
6552 (i386_dr_low_get_control): Likewise.
6553 (i386_dr_low_get_status): Likewise.
6554 (i386_dr_low): New global variable.
6555 * win32-i386-low.c (i386_dr_low_set_addr):
6556 Changed signature. Made static.
6557 (i386_dr_low_get_addr): Likewise.
6558 (i386_dr_low_set_control): Likewise.
6559 (i386_dr_low_get_control): Likewise.
6560 (i386_dr_low_get_status): Likewise.
6561 (i386_dr_low): New global variable.
6562
e1d2394b
MS
65632014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6564
6565 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6566 * Makefile.in (AR, AR_FLAGS): Define.
6567 * configure: Regenerate.
6568
3a8ee006
GB
65692014-06-19 Gary Benson <gbenson@redhat.com>
6570
6571 * Makefile.in (i386-dregs.o): New rule.
6572 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6573 * i386-low.c (target.h): Remove include.
6574 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6575 (DR_CONTROL_SHIFT): Likewise.
6576 (DR_CONTROL_SIZE): Likewise.
6577 (DR_RW_EXECUTE): Likewise.
6578 (DR_RW_WRITE): Likewise.
6579 (DR_RW_READ): Likewise.
6580 (DR_RW_IORW): Likewise.
6581 (DR_LEN_1): Likewise.
6582 (DR_LEN_2): Likewise.
6583 (DR_LEN_4): Likewise.
6584 (DR_LEN_8): Likewise.
6585 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6586 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6587 (DR_ENABLE_SIZE): Likewise.
6588 (DR_LOCAL_SLOWDOWN): Likewise.
6589 (DR_GLOBAL_SLOWDOWN): Likewise.
6590 (DR_CONTROL_RESERVED): Likewise.
6591 (I386_DR_CONTROL_MASK): Likewise.
6592 (I386_DR_VACANT): Likewise.
6593 (I386_DR_LOCAL_ENABLE): Likewise.
6594 (I386_DR_GLOBAL_ENABLE): Likewise.
6595 (I386_DR_DISABLE): Likewise.
6596 (I386_DR_SET_RW_LEN): Likewise.
6597 (I386_DR_GET_RW_LEN): Likewise.
6598 (I386_DR_WATCH_HIT): Likewise.
6599 (i386_wp_op_t): Likewise.
6600 (i386_show_dr): Likewise.
6601 (i386_length_and_rw_bits): Likewise.
6602 (i386_insert_aligned_watchpoint): Likewise.
6603 (i386_remove_aligned_watchpoint): Likewise.
6604 (i386_handle_nonaligned_watchpoint): Likewise.
6605 i386_update_inferior_debug_regs(): Likewise.
6606 (i386_dr_insert_watchpoint): Likewise.
6607 (i386_dr_remove_watchpoint): Likewise.
6608 (i386_dr_region_ok_for_watchpoint): Likewise.
6609 (i386_dr_stopped_data_address): Likewise.
6610 (i386_dr_stopped_by_watchpoint): Likewise.
6611
8f26655c
GB
66122014-06-19 Gary Benson <gbenson@redhat.com>
6613
6614 * i386-low.c (i386_dr_show): Renamed to
6615 i386_show_dr and made static. All uses updated.
6616 (i386_dr_length_and_rw_bits): Renamed to
6617 i386_length_and_rw_bits and made static.
6618 All uses updated.
6619 (i386_dr_insert_aligned_watchpoint): Renamed to
6620 i386_insert_aligned_watchpoint and made static.
6621 All uses updated.
6622 (i386_dr_remove_aligned_watchpoint): Renamed to
6623 i386_remove_aligned_watchpoint and made static.
6624 All uses updated.
6625 (i386_dr_update_inferior_debug_regs): Renamed to
6626 i386_update_inferior_debug_regs and made static.
6627 All uses updated.
6628
b9228891
GB
66292014-06-18 Gary Benson <gbenson@redhat.com>
6630
5171def3
GB
6631 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6632 (i386_dr_low_can_set_control): Likewise.
6633 (i386_get_debug_register_length): Likewise.
6634 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6635 (i386_dr_low_can_set_control): Likewise.
6636 (i386_get_debug_register_length): Likewise.
6637
66382014-06-17 Gary Benson <gbenson@redhat.com>
6639
b9228891
GB
6640 * i386-low.h (i386-dregs.h): New include.
6641 (DR_FIRSTADDR): Now in i386-dregs.h.
6642 (DR_LASTADDR): Likewise.
6643 (DR_NADDR): Likewise.
6644 (DR_STATUS): Likewise.
6645 (DR_CONTROL): Likewise.
6646 (i386_debug_reg_state): Likewise.
6647 (i386_dr_insert_watchpoint): Likewise.
6648 (i386_dr_remove_watchpoint): Likewise.
6649 (i386_dr_region_ok_for_watchpoint): Likewise.
6650 (i386_dr_stopped_data_address): Likewise.
6651 (i386_dr_stopped_by_watchpoint): Likewise.
6652 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6653
4be83cc2
GB
66542014-06-18 Gary Benson <gbenson@redhat.com>
6655
6656 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6657 i386_dr_insert_watchpoint.
6658 (i386_low_remove_watchpoint): Renamed to
6659 i386_dr_remove_watchpoint.
6660 (i386_low_region_ok_for_watchpoint): Renamed to
6661 i386_dr_region_ok_for_watchpoint.
6662 (i386_low_stopped_data_address): Renamed to
6663 i386_dr_stopped_data_address.
6664 (i386_low_stopped_by_watchpoint): Renamed to
6665 i386_dr_stopped_by_watchpoint.
6666 * i386-low.c (i386_show_dr): Renamed to
6667 i386_dr_show and made nonstatic. All uses updated.
6668 (i386_length_and_rw_bits): Renamed to
6669 i386_dr_length_and_rw_bits and made nonstatic.
6670 All uses updated.
6671 (i386_insert_aligned_watchpoint): Renamed to
6672 i386_dr_insert_aligned_watchpoint and made nonstatic.
6673 All uses updated.
6674 (i386_remove_aligned_watchpoint): Renamed to
6675 i386_dr_remove_aligned_watchpoint and made nonstatic.
6676 All uses updated.
6677 (i386_update_inferior_debug_regs): Renamed to
6678 i386_dr_update_inferior_debug_regs and made nonstatic.
6679 All uses updated.
6680 (i386_low_insert_watchpoint): Renamed to
6681 i386_dr_insert_watchpoint. All uses updated.
6682 (i386_low_remove_watchpoint): Renamed to
6683 i386_dr_remove_watchpoint. All uses updated.
6684 (i386_low_region_ok_for_watchpoint): Renamed to
6685 i386_dr_region_ok_for_watchpoint. All uses updated.
6686 (i386_low_stopped_data_address): Renamed to
6687 i386_dr_stopped_data_address. All uses updated.
6688 (i386_low_stopped_by_watchpoint): Renamed to
6689 i386_dr_stopped_by_watchpoint. All uses updated.
6690
131aa0d4
GB
66912014-06-18 Gary Benson <gbenson@redhat.com>
6692
6693 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6694 (i386_dr_low_can_set_control): Likewise.
6695 (i386_insert_aligned_watchpoint): New check.
6696
d9305f7f
GB
66972014-06-18 Gary Benson <gbenson@redhat.com>
6698
6699 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6700 Renamed to state.
6701
e927c9fc
GB
67022014-06-18 Gary Benson <gbenson@redhat.com>
6703
6704 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6705 instead of fatal and error.
6706 (i386_handle_nonaligned_watchpoint): Likewise.
6707
1b6d4134
GB
67082014-06-18 Gary Benson <gbenson@redhat.com>
6709
6710 * i386-low.c (i386_get_debug_register_length): New macro.
6711 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6712 (i386_show_dr): Use debug_printf instead of fprintf. Use
6713 phex to format values.
6714
6e62758f
GB
67152014-06-18 Gary Benson <gbenson@redhat.com>
6716
6717 * i386-low.h: Comment changes.
6718 * i386-low.c: Likewise.
6719
fc6e2f03
GB
67202014-06-18 Gary Benson <gbenson@redhat.com>
6721
6722 * i386-low.c: Whitespace changes.
6723
f9d1eeed
TT
67242014-06-12 Tom Tromey <tromey@redhat.com>
6725
6726 * utils.c (freeargv): Remove.
6727
0b04e523
TT
67282014-06-12 Tom Tromey <tromey@redhat.com>
6729
6730 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6731 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6732 (parse_debug_format_options): Likewise.
6733 (gdbserver_usage): Likewise.
6734 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6735 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6736 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6737 against libiberty.
6738 ($(LIBGNU)): Depend on libiberty.
6739 (all-lib): Recurse into all subdirs.
6740 (install-only): Invoke "install" target in subdirs.
6741 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6742 targets.
6743 * configure: Rebuild.
6744 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6745 for vasprintf, vsnprintf, or gettimeofday.
6746 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6747 srv_tgtobj.
6748
270c9937
JB
67492014-06-05 Joel Brobecker <brobecker@adacore.com>
6750
6751 * development.sh: Delete.
6752 * Makefile.in (config.status): Adjust dependency on development.sh.
6753 * configure.ac: Adjust development.sh source call.
6754 * configure: Regenerate.
6755
0a261ed8
PA
67562014-06-02 Pedro Alves <palves@redhat.com>
6757
6758 * ax.c (gdb_free_agent_expr): New function.
6759 * ax.h (gdb_free_agent_expr): New declaration.
6760 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6761 list.
6762 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6763 static.
6764 (clear_breakpoint_conditions_and_commands): New function.
6765 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6766 (clear_breakpoint_conditions_and_commands): New declaration.
6767
e9dae05e
RR
67682014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6769
6770 * linux-aarch64-low.c (asm/ptrace.h): Include.
6771
5876f503
JK
67722014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6773
6774 Fix TLS access for -static -pthread.
6775 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6776 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6777 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6778
802e8e6d
PA
67792014-05-20 Pedro Alves <palves@redhat.com>
6780
6781 * linux-aarch64-low.c (aarch64_insert_point)
6782 (aarch64_remove_point): No longer check whether the type is
6783 supported here. Adjust to new interface.
6784 (the_low_target): Install aarch64_supports_z_point_type as
6785 supports_z_point_type method.
6786 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6787 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6788 instead of a Z packet char. Adjust.
6789 (arm_supports_z_point_type): New function.
6790 (arm_insert_point, arm_remove_point): Adjust to new interface.
6791 (the_low_target): Install arm_supports_z_point_type.
6792 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6793 (cris_insert_point, cris_remove_point): Adjust to new interface.
6794 Don't check whether the type is supported here.
6795 (the_low_target): Install cris_supports_z_point_type.
6796 * linux-low.c (linux_supports_z_point_type): New function.
6797 (linux_insert_point, linux_remove_point): Adjust to new interface.
6798 * linux-low.h (struct linux_target_ops) <insert_point,
6799 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6800 raw_breakpoint pointer parameter.
6801 <supports_z_point_type>: New method.
6802 * linux-mips-low.c (mips_supports_z_point_type): New function.
6803 (mips_insert_point, mips_remove_point): Adjust to new interface.
6804 Use mips_supports_z_point_type.
6805 (the_low_target): Install mips_supports_z_point_type.
6806 * linux-ppc-low.c (the_low_target): Install NULL as
6807 supports_z_point_type method.
6808 * linux-s390-low.c (the_low_target): Install NULL as
6809 supports_z_point_type method.
6810 * linux-sparc-low.c (the_low_target): Install NULL as
6811 supports_z_point_type method.
6812 * linux-x86-low.c (x86_supports_z_point_type): New function.
6813 (x86_insert_point): Adjust to new insert_point interface. Use
6814 insert_memory_breakpoint. Adjust to new
6815 i386_low_insert_watchpoint interface.
6816 (x86_remove_point): Adjust to remove_point interface. Use
6817 remove_memory_breakpoint. Adjust to new
6818 i386_low_remove_watchpoint interface.
6819 (the_low_target): Install x86_supports_z_point_type.
6820 * lynx-low.c (lynx_target_ops): Install NULL as
6821 supports_z_point_type callback.
6822 * nto-low.c (nto_supports_z_point_type): New.
6823 (nto_insert_point, nto_remove_point): Adjust to new interface.
6824 (nto_target_ops): Install nto_supports_z_point_type.
6825 * mem-break.c: Adjust intro comment.
6826 (struct raw_breakpoint) <raw_type, size>: New fields.
6827 <inserted>: Update comment.
6828 <shlib_disabled>: Delete field.
6829 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6830 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6831 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6832 (raw_bkpt_type_to_target_hw_bp_type): New function.
6833 (find_enabled_raw_code_breakpoint_at): New function.
6834 (find_raw_breakpoint_at): New type and size parameters. Use them.
6835 (insert_memory_breakpoint): New function, based off
6836 set_raw_breakpoint_at.
6837 (remove_memory_breakpoint): New function.
6838 (set_raw_breakpoint_at): Reimplement.
6839 (set_breakpoint): New, based on set_breakpoint_at.
6840 (set_breakpoint_at): Reimplement.
6841 (delete_raw_breakpoint): Go through the_target->remove_point
6842 instead of assuming memory breakpoints.
6843 (find_gdb_breakpoint_at): Delete.
6844 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6845 (find_gdb_breakpoint): New function.
6846 (set_gdb_breakpoint_at): Delete.
6847 (z_type_supported): New function.
6848 (set_gdb_breakpoint_1): New function, loosely based off
6849 set_gdb_breakpoint_at.
6850 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6851 (delete_gdb_breakpoint_at): Delete.
6852 (delete_gdb_breakpoint_1): New function, loosely based off
6853 delete_gdb_breakpoint_at.
6854 (delete_gdb_breakpoint): New function.
6855 (clear_gdb_breakpoint_conditions): Rename to ...
6856 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6857 breakpoint.
6858 (add_condition_to_breakpoint): Make static.
6859 (add_breakpoint_condition): Take a struct breakpoint pointer
6860 instead of an address. Adjust.
6861 (gdb_condition_true_at_breakpoint): Rename to ...
6862 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6863 z_type parameter.
6864 (gdb_condition_true_at_breakpoint): Reimplement.
6865 (add_breakpoint_commands): Take a struct breakpoint pointer
6866 instead of an address. Adjust.
6867 (gdb_no_commands_at_breakpoint): Rename to ...
6868 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6869 parameter. Return true if no breakpoint was found. Change debug
6870 output.
6871 (gdb_no_commands_at_breakpoint): Reimplement.
6872 (run_breakpoint_commands): Rename to ...
6873 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6874 and change return type to boolean.
6875 (run_breakpoint_commands): New function.
6876 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6877 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6878 breakpoint. Go through the_target->remove_point instead of
6879 assuming memory breakpoint.
6880 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6881 software and hardware breakpoints.
6882 (reinsert_raw_breakpoint): Go through the_target->insert_point
6883 instead of assuming memory breakpoint.
6884 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6885 software and hardware breakpoints.
6886 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6887 Check both software and hardware breakpoints.
6888 (validate_inserted_breakpoint): Assert the breakpoint is a
6889 software breakpoint. Set the inserted flag to -1 instead of
6890 setting shlib_disabled.
6891 (delete_disabled_breakpoints): Adjust.
6892 (validate_breakpoints): Only validate software breakpoints.
6893 Adjust to inserted flag change.
6894 (check_mem_read, check_mem_write): Skip breakpoint types other
6895 than software breakpoints. Adjust to inserted flag change.
6896 * mem-break.h (enum raw_bkpt_type): New enum.
6897 (raw_breakpoint, struct process_info): Forward declare.
6898 (Z_packet_to_target_hw_bp_type): Delete declaration.
6899 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6900 (set_gdb_breakpoint, delete_gdb_breakpoint)
6901 (clear_breakpoint_conditions): New declarations.
6902 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6903 (breakpoint_inserted_here): Update comment.
6904 (add_breakpoint_condition, add_breakpoint_commands): Replace
6905 address parameter with a breakpoint pointer parameter.
6906 (gdb_breakpoint_here): Update comment.
6907 (delete_gdb_breakpoint_at): Delete.
6908 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6909 * server.c (process_point_options): Take a struct breakpoint
6910 pointer instead of an address. Adjust.
6911 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6912 delete_gdb_breakpoint.
6913 * spu-low.c (spu_target_ops): Install NULL as
6914 supports_z_point_type method.
6915 * target.h: Include mem-break.h.
6916 (struct target_ops) <prepare_to_access_memory>: Update comment.
6917 <supports_z_point_type>: New field.
6918 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6919 instead of a char. Also take a raw breakpoint pointer.
6920 * win32-arm-low.c (the_low_target): Install NULL as
6921 supports_z_point_type.
6922 * win32-i386-low.c (i386_supports_z_point_type): New function.
6923 (i386_insert_point, i386_remove_point): Adjust to new interface.
6924 (the_low_target): Install i386_supports_z_point_type.
6925 * win32-low.c (win32_supports_z_point_type): New function.
6926 (win32_insert_point, win32_remove_point): Adjust to new interface.
6927 (win32_target_ops): Install win32_supports_z_point_type.
6928 * win32-low.h (struct win32_target_ops):
6929 <supports_z_point_type>: New method.
6930 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6931 instead of a char. Also take a raw breakpoint pointer.
6932
932539e3
PA
69332014-05-20 Pedro Alves <palves@redhat.com>
6934
6935 * mem-break.h: Include break-common.h.
6936 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6937 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6938 (Z_packet_to_target_hw_bp_type): New declaration.
6939 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6940 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6941 (Z_PACKET_ACCESS_WP): Delete macros.
6942 (Z_packet_to_hw_type): Delete function.
6943 * i386-low.h: Don't include break-common.h here.
6944 (Z_packet_to_hw_type): Delete declaration.
6945 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6946 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6947 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6948 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6949 * linux-aarch64-low.c: Don't include break-common.h here.
6950 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6951 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6952 (Z_packet_to_target_hw_bp_type): Delete function.
6953 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6954 function.
6955 (mips_insert_point, mips_remove_point): Use
6956 Z_packet_to_target_hw_bp_type.
6957
4ff0d3d8
PA
69582014-05-20 Pedro Alves <palves@redhat.com>
6959
6960 * linux-aarch64-low.c: Include break-common.h.
6961 (enum target_point_type): Delete.
6962 (Z_packet_to_point_type): Rename to ...
6963 (Z_packet_to_target_hw_bp_type): ... this, and return a
6964 target_hw_bp_type instead.
6965 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6966 instead of an enum target_point_type.
6967 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6968 breakpoint type.
6969 (aarch64_dr_state_insert_one_point)
6970 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6971 (aarch64_handle_aligned_watchpoint)
6972 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6973 Take an enum target_hw_bp_type instead of an enum
6974 target_point_type.
6975 (aarch64_supports_z_point_type): New function.
6976 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6977 use Z_packet_to_target_hw_bp_type.
6978
786dc519
JB
69792014-05-20 Joel Brobecker <brobecker@adacore.com>
6980
6981 * configure.ac: Only use -Werror by default when DEVELOPMENT
6982 is true.
6983 * configure: Regenerate.
6984
9e0aa64f
JK
69852014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6986
6987 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6988 * linux-x86-low.c (X86_64_USER_REGS): New.
6989 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6990
2b577b92
YQ
69912014-04-28 Yao Qi <yao@codesourcery.com>
6992
6993 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6994 name.
6995
94611da2
PA
69962014-04-25 Pedro Alves <palves@redhat.com>
6997
6998 PR server/16255
6999 * linux-low.c (linux_attach_fail_reason_string): New function.
7000 (linux_attach_lwp): Delete.
7001 (linux_attach_lwp_1): Rename to ...
7002 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7003 argument. Remove "initial" parameter. Return int instead of
7004 void. Don't error or warn here.
7005 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7006 failure to attach to the tgid. Call warning when failing to
7007 attach to an lwp.
7008 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7009 argument. Remove "initial" parameter. Return int instead of
7010 void. Don't error or warn here.
7011 (linux_attach_fail_reason_string): New declaration.
7012 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7013 interface change. Use linux_attach_fail_reason_string.
7014
01f9f808
MS
70152014-04-24 Michael Sturm <michael.sturm@mintel.com>
7016 Walfred Tedeschi <walfred.tedeschi@intel.com>
7017
7018 * Makefile.in: Added rules to handle new files
7019 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7020 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7021 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7022 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7023 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7024 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7025 x32-avx512-linux.o.
7026 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7027 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7028 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7029 i386/x32-avx512.xml.
7030 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7031 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7032 i386/x32-avx512-linux.xml.
7033 * i387-fp.c (num_avx512_k_registers): New constant for number
7034 of K registers.
7035 (num_avx512_zmmh_low_registers): New constant for number of
7036 lower ZMM registers (0-15).
7037 (num_avx512_zmmh_high_registers): New constant for number of
7038 higher ZMM registers (16-31).
7039 (num_avx512_ymmh_registers): New contant for number of higher
7040 YMM registers (ymm16-31 added by avx521 on x86_64).
7041 (num_avx512_xmm_registers): New constant for number of higher
7042 XMM registers (xmm16-31 added by AVX512 on x86_64).
7043 (struct i387_xsave): Add space for AVX512 registers.
7044 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7045 Add code to handle AVX512 registers.
7046 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7047 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7048 prototypei from generated file.
7049 (tdesc_amd64_avx512_linux): Likewise.
7050 (init_registers_x32_avx512_linux): Likewise.
7051 (tdesc_x32_avx512_linux): Likewise.
7052 (init_registers_i386_avx512_linux): Likewise.
7053 (tdesc_i386_avx512_linux): Likewise.
7054 (x86_64_regmap): Add AVX512 registers.
7055 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7056 mask.
7057 (initialize_low_arch): Add code to initialize AVX512 registers.
7058
51aa91f9
PA
70592014-04-23 Pedro Alves <palves@redhat.com>
7060
7061 * mem-break.c (find_gdb_breakpoint_at): Make static.
7062 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7063
a4165e94
PA
70642014-04-23 Pedro Alves <palves@redhat.com>
7065
7066 * i386-low.c: Don't include break-common.h here.
7067 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7068 prototype to take target_hw_bp_type as argument instead of a Z
7069 packet char.
7070 * i386-low.h: Include break-common.h here.
7071 (Z_packet_to_hw_type): Declare.
7072 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7073 prototypes.
7074 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7075 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7076 (x86_remove_point): Convert the packet number to a
7077 target_hw_bp_type before calling i386_low_remove_watchpoint.
7078 * win32-i386-low.c (i386_insert_point): Convert the packet number
7079 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7080 (i386_remove_point): Convert the packet number to a
7081 target_hw_bp_type before calling i386_low_remove_watchpoint.
7082
b8acf843
PA
70832014-04-23 Pedro Alves <palves@redhat.com>
7084
7085 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7086
d708bcd1
PA
70872014-04-10 Pedro Alves <palves@redhat.com>
7088
7089 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7090 Check if the condition or command is NULL before checking if the
7091 breakpoint is known. On success, return true.
7092 * mem-break.h (add_breakpoint_condition): Document return.
7093 (add_breakpoint_commands): Add describing comment.
7094 * server.c (skip_to_semicolon): New function.
7095 (process_point_options): Use it.
7096
2eec7d5b
PA
70972014-04-09 Pedro Alves <palves@redhat.com>
7098
7099 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7100 to lwpid_of.
7101
fa96cb38
PA
71022014-02-27 Pedro Alves <palves@redhat.com>
7103
7104 PR 12702
7105 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7106 macros.
7107 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7108 output.
7109 (last_thread_of_process_p): Take a PID argument instead of a
7110 thread pointer.
7111 (linux_wait_for_lwp): Delete.
7112 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7113 functions.
7114 (linux_low_filter_event): New function, party factored out from
7115 linux_wait_for_event.
7116 (linux_wait_for_event): Rename to ...
7117 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7118 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7119 sigsuspend. Check for zombie leaders.
7120 (linux_wait_for_event): Reimplement as wrapper around
7121 linux_wait_for_event_filtered.
7122 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7123 a normal or signal exit is seen, it's the whole process exiting.
7124 (wait_for_sigstop): No longer a for_each_inferior callback.
7125 Rewrite on top of linux_wait_for_event_filtered.
7126 (stop_all_lwps): Call wait_for_sigstop directly.
7127 * server.c (resume, handle_target_event): Handle
7128 TARGET_WAITKIND_NO_RESUMED.
7129
d763de10
JB
71302014-02-26 Joel Brobecker <brobecker@adacore.com>
7131
7132 * win32-low.c (psapi_get_dll_name,
7133 * win32_CreateToolhelp32Snapshot): Delete.
7134 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7135 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7136 Delete.
7137 (handle_load_dll): Add function description.
7138 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7139
850a0f76
JB
71402014-02-26 Joel Brobecker <brobecker@adacore.com>
7141
7142 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7143 Add comment.
7144 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7145 base address when calling win32_add_one_solib.
7146 (handle_load_dll): Delete local variable load_addr.
7147 Remove 0x1000 offset applied to DLL base address when calling
7148 win32_add_one_solib.
7149 (handle_unload_dll): Add comment.
7150
f25b3fc3
JB
71512014-02-26 Joel Brobecker <brobecker@adacore.com>
7152
7153 * win32-low.c (win32_add_all_dlls): Renames
7154 win32_ensure_ntdll_loaded. Rewrite function documentation.
7155 Adjust implementation to always load all DLLs.
7156 Add 0x1000 offset to DLL base address when calling
7157 win32_add_one_solib.
7158 (child_initialization_done): New static global.
7159 (do_initial_child_stuff): Set child_initialization_done to
7160 zero during child initialization, and 1 after. Replace call
7161 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7162 Add comment.
7163 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7164 (handle_unload_dll): Add function documentation.
7165 (get_child_debug_event): Ignore load and unload DLL events
7166 during child initialization.
7167
d86d4aaf
DE
71682014-02-20 Doug Evans <dje@google.com>
7169
3bc32da3 7170 Remove global all_lwps.
d86d4aaf
DE
7171 * inferiors.h (ptid_of): Move here from linux-low.h.
7172 (pid_of, lwpid_of): Ditto.
7173 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7174 parameter is a struct thread_info * now.
7175 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7176 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7177 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7178 directly.
7179 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7180 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7181 * linux-arm-low.c (update_registers_callback): Update, "entry"
7182 parameter is a struct thread_info * now.
7183 Fetch lwpid from current_inferior directly.
7184 (arm_insert_point): Pass &all_threads to find_inferior instead of
7185 &all_lwps.
7186 (arm_remove_point): Ditto.
7187 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7188 (arm_prepare_to_resume): Fetch pid from thread.
7189 (arm_read_description): Fetch lwpid from current_inferior directly.
7190 * linux-low.c (all_lwps): Delete.
7191 (delete_lwp): Delete call to remove_inferior.
7192 (handle_extended_wait): Fetch lwpid from thread.
7193 (add_lwp): Don't set lwp->entry.id. Remove call to
7194 add_inferior_to_list.
7195 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7196 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7197 (kill_one_lwp_callback): Ditto.
7198 (linux_kill): Don't dereference NULL pointer.
7199 Fetch ptid,lwpid from thread.
7200 (get_detach_signal): Fetch ptid from thread.
7201 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7202 Simplify call to regcache_invalidate_thread.
7203 (delete_lwp_callback): Update, "entry" parameter is a
7204 struct thread_info * now. Fetch pid from thread.
7205 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7206 (status_pending_p_callback): Update, "entry" parameter is a
7207 struct thread_info * now. Fetch ptid from thread.
7208 (find_lwp_pid): Update, "entry" parameter is a
7209 struct thread_info * now.
7210 (linux_wait_for_lwp): Fetch pid from thread.
7211 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7212 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7213 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7214 (dequeue_one_deferred_signal): Ditto.
7215 (cancel_breakpoint): Fetch ptid from current_inferior.
7216 (linux_wait_for_event): Pass &all_threads to find_inferior,
7217 not &all_lwps. Fetch ptid, lwpid from thread.
7218 (count_events_callback): Update, "entry" parameter is a
7219 struct thread_info * now.
7220 (select_singlestep_lwp_callback): Ditto.
7221 (select_event_lwp_callback): Ditto.
7222 (cancel_breakpoints_callback): Ditto.
7223 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7224 not &all_lwps.
7225 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7226 (unsuspend_one_lwp): Update, "entry" parameter is a
7227 struct thread_info * now.
7228 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7229 not &all_lwps.
7230 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7231 Fetch lwpid from thread, not lwp.
7232 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7233 Pass &all_threads to find_inferior, not &all_lwps.
7234 (send_sigstop): Fetch lwpid from thread, not lwp.
7235 (send_sigstop_callback): Update, "entry" parameter is a
7236 struct thread_info * now.
7237 (suspend_and_send_sigstop_callback): Ditto.
7238 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7239 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7240 struct thread_info * now.
7241 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7242 from thread, lwp.
7243 (lwp_running): Update, "entry" parameter is a
7244 struct thread_info * now.
7245 (stop_all_lwps): Fetch ptid from thread.
7246 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7247 (linux_resume_one_lwp): Fetch lwpid from thread.
7248 (linux_set_resume_request): Update, "entry" parameter is a
7249 struct thread_info * now. Fetch pid, lwpid from thread.
7250 (resume_status_pending_p): Update, "entry" parameter is a
7251 struct thread_info * now.
7252 (need_step_over_p): Ditto. Fetch lwpid from thread.
7253 (start_step_over): Fetch lwpid from thread.
7254 (linux_resume_one_thread): Update, "entry" parameter is a
7255 struct thread_info * now. Fetch lwpid from thread.
7256 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7257 (proceed_one_lwp): Update, "entry" parameter is a
7258 struct thread_info * now. Fetch lwpid from thread.
7259 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7260 struct thread_info * now.
7261 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7262 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7263 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7264 directly.
7265 (regsets_store_inferior_registers): Ditto.
7266 (fetch_register, store_register): Ditto.
7267 (linux_read_memory, linux_write_memory): Ditto.
7268 (linux_request_interrupt): Ditto.
7269 (linux_read_auxv): Ditto.
7270 (linux_xfer_siginfo): Ditto.
7271 (linux_qxfer_spu): Ditto.
7272 (linux_qxfer_libraries_svr4): Ditto.
7273 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7274 moved to inferiors.h.
7275 (get_lwp): Delete.
7276 (get_thread_lwp): Update.
7277 (struct lwp_info): Delete member "entry". Simplify comment for
7278 member "thread".
7279 (all_lwps): Delete.
7280 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7281 current_inferior directly.
7282 (update_watch_registers_callback): Update, "entry" parameter is a
7283 struct thread_info * now. Fetch pid from thread.
7284 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7285 (mips_insert_point): Fetch lwpid from current_inferior.
7286 Pass &all_threads to find_inferior, not &all_lwps.
7287 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7288 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7289 directly.
7290 (mips_stopped_data_address): Ditto.
7291 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7292 directly.
7293 * linux-tile-low.c (tile_arch_setup): Ditto.
7294 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7295 (update_debug_registers_callback): Update, "entry" parameter is a
7296 struct thread_info * now. Fetch pid from thread.
7297 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7298 Pass &all_threads to find_inferior, not &all_lwps.
7299 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7300 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7301 Pass &all_threads to find_inferior, not &all_lwps.
7302 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7303 (i386_dr_low_get_status): Ditto.
7304 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7305 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7306 (x86_linux_read_description): Ditto.
7307 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7308
3b8361aa
DE
73092014-02-20 Doug Evans <dje@google.com>
7310
7311 * inferiors.c (get_first_inferior): Fix buglet.
7312
f7667f0d
DE
73132014-02-19 Doug Evans <dje@google.com>
7314
7315 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7316 * inferiors.c (add_thread): Change result type to struct thread_info *.
7317 All callers updated.
7318 (add_lwp): Call add_thread here instead of in callers.
7319 All callers updated.
7320 * linux-low.h (get_lwp_thread): Rewrite.
7321 (struct lwp_info): New member "thread".
7322
b3312d80
DE
73232014-02-19 Doug Evans <dje@google.com>
7324
7325 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7326 All callers updated.
7327
ecc6f45c
DE
73282014-02-19 Doug Evans <dje@google.com>
7329
7330 * inferiors.c (add_thread): Fix whitespace.
7331
649ebbca
DE
73322014-02-19 Doug Evans <dje@google.com>
7333
7334 * dll.c (clear_dlls): Replace accessing list implemention details
7335 with API function.
7336 * gdbthread.h (get_first_thread): Declare.
7337 * inferiors.c (for_each_inferior_with_data): New function.
7338 (get_first_thread): New function.
7339 (find_thread_ptid): Simplify.
7340 (get_first_inferior): New function.
7341 (clear_list): Delete.
7342 (one_inferior_p): New function.
7343 (clear_inferior_list): New function.
7344 (clear_inferiors): Update.
7345 * inferiors.h (for_each_inferior_with_data): Declare.
7346 (clear_inferior_list): Declare.
7347 (one_inferior_p): Declare.
7348 (get_first_inferior): Declare.
7349 * linux-low.c (linux_wait_for_event): Replace accessing list
7350 implemention details with API function.
7351 * server.c (target_running): Ditto.
7352 (accumulate_file_name_length): New function.
7353 (emit_dll_description): New function.
7354 (handle_qxfer_libraries): Replace accessing list implemention
7355 details with API function.
7356 (handle_qxfer_threads_worker): New function.
7357 (handle_qxfer_threads_proper): Replace accessing list implemention
7358 details with API function.
7359 (handle_query): Ditto.
7360 (visit_actioned_threads_callback_ftype): New typedef.
7361 (visit_actioned_threads_data): New struct.
7362 (visit_actioned_threads): Rewrite to be find_inferior callback.
7363 (resume): Call find_inferior.
7364 (handle_status): Replace accessing list implemention
7365 details with API function.
7366 (process_serial_event): Replace accessing list implemention details
7367 with API function.
7368 * target.c (set_desired_inferior): Replace accessing list implemention
7369 details with API function.
7370 * tracepoint.c (same_process_p): New function.
7371 (gdb_agent_about_to_close): Replace accessing list implemention
7372 details with API function.
7373 * win32-low.c (child_delete_thread): Replace accessing list
7374 implemention details with API function.
7375 (match_dll_by_basename): New function.
7376 (dll_is_loaded_by_basename): New function.
7377 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7378 details call to dll_is_loaded_by_basename.
7379
80894984
DE
73802014-02-19 Doug Evans <dje@google.com>
7381
7382 * dll.h (struct dll_info): Add comment.
7383 * gdbthread.h (struct thread_info): Add comment.
7384 (current_ptid): Simplify.
7385 * inferiors.c (add_process): Update.
7386 (remove_process): Update.
7387 * inferiors.h (struct process_info): Rename member "head" to "entry".
7388 * linux-low.c (delete_lwp): Update.
7389 (add_lwp): Update.
7390 (last_thread_of_process_p): Update.
7391 (kill_one_lwp_callback, linux_kill): Update.
7392 (status_pending_p_callback): Update.
7393 (wait_for_sigstop): Update. Simplify read of ptid.
7394 (start_step_over): Update.
7395 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7396 (get_lwp_thread): Update.
7397 (struct lwp_info): Rename member "head" to "entry".
7398 * regcache.h (inferior_list_entry): Delete.
7399 * server.c (kill_inferior_callback): Update.
7400 (detach_or_kill_inferior_callback): Update.
7401 (print_started_pid): Update.
7402 (print_attached_pid): Update.
7403 (process_serial_event): Simplify read of ptid.
7404 * thread-db.c (thread_db_create_event): Update.
7405 (thread_db_get_tls_address): Update.
7406 * win32-low.c (current_inferior_ptid): Simplify.
7407
46917d26
TT
74082014-02-19 Tom Tromey <tromey@redhat.com>
7409
7410 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7411 argument.
7412 (target_supports_btrace): Update.
7413
0759a81e
YQ
74142014-02-14 Yao Qi <yao@codesourcery.com>
7415
7416 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7417 (rsp-low-ipa.o): New target.
7418
a7191e8b
TT
74192014-02-12 Tom Tromey <tromey@redhat.com>
7420
7421 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7422 convert_ascii_to_int.
7423 * regcache.c (registers_to_string): Likewise.
7424 * remote-utils.c (decode_M_packet): Likewise.
7425 * server.c (process_serial_event): Likewise.
7426
ff0e980e
TT
74272014-02-12 Tom Tromey <tromey@redhat.com>
7428
7429 * server.c (handle_query, handle_v_run): Use hex2bin, not
7430 unhexify.
7431 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7432
e9371aff
TT
74332014-02-12 Tom Tromey <tromey@redhat.com>
7434
7435 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7436 convert_int_to_ascii.
7437 * regcache.c (registers_to_string, collect_register_as_string):
7438 Likewise.
7439 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7440 Likewise.
7441 * server.c (process_serial_event): Likewise.
7442 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7443 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7444
971dc0b8
TT
74452014-02-12 Tom Tromey <tromey@redhat.com>
7446
7447 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7448 bin2hex, not hexify.
7449 * tracepoint.c (cmd_qtstatus): Likewise.
7450
0a822afb
TT
74512014-02-12 Tom Tromey <tromey@redhat.com>
7452
7453 * remote-utils.c (monitor_output): Pass explicit length to
7454 hexify.
7455
9c3d6531
TT
74562014-02-12 Tom Tromey <tromey@redhat.com>
7457
7458 * tracepoint.c: Include rsp-low.h.
7459 * server.c: Include rsp-low.h.
7460 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7461 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7462 declare.
7463 * remote-utils.c: Include rsp-low.h.
7464 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7465 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7466 (convert_int_to_ascii, convert_ascii_to_int): Move to
7467 common/rsp-low.c.
7468 * regcache.c: Include rsp-low.h.
7469 * ax.c: Include rsp-low.h.
7470 * Makefile.in (SFILES): Add common/rsp-low.c.
7471 (OBS): Add rsp-low.o.
7472 (rsp-low.o): New target.
7473
01fd3ea5
TT
74742014-02-12 Tom Tromey <tromey@redhat.com>
7475
7476 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7477 Include print-utils.h.
7478 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7479 (plongest, thirty_two, phex_nz): Remove.
7480 * Makefile.in (SFILES): Add common/print-utils.c.
7481 (OBS): Add print-utils.o.
7482 (print-utils-ipa.o): New target.
7483 (print-utils.o): New target.
7484 (IPA_OBJS): Add print-utils-ipa.o.
7485
e99dc820
TT
74862014-02-06 Tom Tromey <tromey@redhat.com>
7487
7488 * Makefile.in (SFILES): Fix indentation.
7489
ee1e2d4f
DE
74902014-02-05 Doug Evans <dje@google.com>
7491
7492 * linux-low.c (linux_wait_for_event): Improve comment.
7493 (linux_wait_1): Keep current_inferior in sync with event_child.
7494
f5a02773
DE
74952014-01-22 Doug Evans <dje@google.com>
7496
7497 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7498
87ce2a04
DE
74992014-01-22 Doug Evans <dje@google.com>
7500
7501 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7502 * configure: Regenerate.
7503 * config.in: Regenerate.
7504 * Makefile.in (SFILES): Add debug.c.
7505 (OBS): Add debug.o.
7506 * debug.c: New file.
7507 * debug.h: New file.
7508 * linux-aarch64-low.c (*): Update all debugging printfs to use
7509 debug_printf instead of fprintf.
7510 * linux-arm-low.c (*): Ditto.
7511 * linux-cris-low.c (*): Ditto.
7512 * linux-crisv32-low.c (*): Ditto.
7513 * linux-m32r-low.c (*): Ditto.
7514 * linux-sparc-low.c (*): Ditto.
7515 * linux-x86.c (*): Ditto.
7516 * linux-low.c (*): Ditto.
7517 (linux_wait_1): Add calls to debug_enter, debug_exit.
7518 (linux_wait): Remove redundant debugging printf.
7519 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7520 (linux_resume, unstop_all_lwps): Ditto.
7521 * mem-break.c (*): Update all debugging printfs to use
7522 debug_printf instead of fprintf.
7523 * remote-utils.c (*): Ditto.
7524 * thread-db.c (*): Ditto.
7525 * server.c #include <ctype.h>, "gdb_vecs.h".
7526 (debug_threads): Moved to debug.c.
7527 (*): Update all debugging printfs to use debug_printf instead of
7528 fprintf.
7529 (start_inferior): Replace call to fflush with call to debug_flush.
7530 (monitor_show_help): Mention set debug-format.
7531 (parse_debug_format_options): New function.
7532 (handle_monitor_command): Handle "monitor set debug-format".
7533 (gdbserver_usage): Mention --debug-format.
7534 (main): Parse --debug-format.
7535 * server.h (debug_threads): Declaration moved to debug.h.
7536 #include "debug.h".
7537 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7538 trace_debug_1 that uses debug_printf.
7539 (tracepoint_look_up_symbols): Update all debugging printfs to use
7540 debug_printf instead of fprintf.
7541
e671835b
BS
75422014-01-20 Baruch Siach <baruch@tkos.co.il>
7543
7544 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7545 sys/ptrace.h.
7546
b5737fa9
PA
75472014-01-17 Pedro Alves <palves@redhat.com>
7548
ea38d2a9 7549 PR build/16445
c7faa97a
PA
7550 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7551 defined after including gdb_proc_service.h.
b5737fa9 7552
40ed484e
DE
75532014-01-16 Doug Evans <dje@google.com>
7554
7555 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7556 (match_dll): Use it.
7557
969c39fb
MM
75582014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7559
7560 * target.h (target_ops) <read_btrace>: Change parameters and
7561 return type to allow error reporting.
7562 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7563 trace reading errors on.
7564 * linux-low.c (linux_low_read_btrace): Pass trace reading
7565 errors on.
7566 (linux_low_disable_btrace): New.
7567
ab7f45ba
DE
75682014-01-15 Doug Evans <dje@google.com>
7569
7570 * inferiors.c (thread_id_to_gdb_id): Delete.
7571 * inferiors.h (thread_id_to_gdb_id): Delete.
7572
66af0f44
EZ
75732014-01-13 Eli Zaretskii <eliz@gnu.org>
7574
7575 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7576 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7577 versions.
7578
9939e131
PA
75792014-01-08 Pedro Alves <palves@redhat.com>
7580
7581 * server.c (handle_status): Don't discard previous queued stop
7582 replies or thread's pending status here.
7583 (main) <disconnection>: Do it here instead.
7584
b7ea362b
PA
75852014-01-08 Pedro Alves <palves@redhat.com>
7586
7587 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7588 * server.c (visit_actioned_threads, handle_pending_status): New
7589 function.
7590 (handle_v_cont): Factor out parts to ...
7591 (resume): ... this new function. If in all-stop, and a thread
7592 being resumed has a pending status, report it without actually
7593 resuming.
7594 (myresume): Adjust to use the new 'resume' function.
7595 (clear_pending_status_callback, set_pending_status_callback)
7596 (find_status_pending_thread_callback): New functions.
7597 (handle_status): Handle the case of multiple threads having
7598 interesting statuses to report. Report threads' real last signal
7599 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7600 with an interesting thread to report the status for, instead of
7601 always reporting the status of the first thread.
7602
28498c42
JB
76032014-01-01 Joel Brobecker <brobecker@adacore.com>
7604
7605 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7606 * gdbreplay.c (gdbreplay_version): Likewise.
7607
f45c82da
YZ
76082013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7609
7610 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7611 iov.iov_len with the real length in use.
7612
379a5e2d
JB
76132013-12-13 Joel Brobecker <brobecker@adacore.com>
7614
7615 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7616 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7617 for all targets that use win32-low.c.
7618 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7619 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7620
4210d83e
PA
76212013-12-13 Pedro Alves <palves@redhat.com>
7622
7623 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7624 if equal to TARGET_WAITKIND_LOADED.
7625 * win32-low.c (cached_status): New static global.
7626 (win32_wait): Add declaration.
7627 (do_initial_child_stuff): Flush all initial pending debug events
7628 up to the initial breakpoint.
7629 (win32_wait): If CACHED_STATUS was set, return that instead
7630 of doing a real wait. Remove the code resuming the execution
7631 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7632 during the initial phase. Also remove the code changing
7633 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7634 TARGET_WAITKIND_STOPPED.
7635
e7f0d979
YQ
76362013-12-11 Yao Qi <yao@codesourcery.com>
7637
7638 * notif.c (handle_notif_ack): Return 0 if no notification
7639 matches.
7640
ebcf782c
DE
76412013-11-20 Doug Evans <dje@google.com>
7642
7643 * linux-low.c (linux_set_resume_request): Fix comment.
7644
20ad9378
DE
76452013-11-20 Doug Evans <dje@google.com>
7646
7647 * linux-low.c (resume_status_pending_p): Tweak comment.
7648
a196ebeb
WT
76492013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7650
7651 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7652 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7653 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7654 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7655 (srv_amd64_regobj): Add amd64-mpx.o.
7656 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7657 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7658 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7659 * i387-fp.c (num_pl_bnd_register) Added constant.
7660 (num_pl_bnd_cfg_registers) Added constant.
7661 (struct i387_xsave) Added reserved area and MPX fields.
7662 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7663 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7664 function.
7665 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7666 (init_registers_amd64_mpx_linux): Declare new function.
7667 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7668 (x86_64_regmap): Add MPX registers.
7669 (x86_linux_read_description): Add MPX case.
7670 (initialize_low_arch): Initialize MPX targets.
7671
0080a2f6
TT
76722013-11-18 Tom Tromey <tromey@redhat.com>
7673
7674 * configure: Rebuild.
7675 * configure.ac: Don't check for stdlib.h.
7676 * gdbreplay.c: Unconditionally include stdlib.h.
7677
2978b111
TT
76782013-11-18 Tom Tromey <tromey@redhat.com>
7679
7680 * config.in: Rebuild.
7681 * configure: Rebuild.
7682 * configure.ac: Don't use AC_HEADER_DIRENT.
7683
a3d08894
TT
76842013-11-18 Tom Tromey <tromey@redhat.com>
7685
7686 * server.h: Don't check HAVE_STRING_H.
7687 * gdbreplay.c: Don't check HAVE_STRING_H.
7688 * configure: Rebuild.
7689
0a5dd17d
TT
76902013-11-18 Tom Tromey <tromey@redhat.com>
7691
7692 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7693 LIBGNU.
7694
1bd2f0ba
TT
76952013-11-08 Tom Tromey <tromey@redhat.com>
7696
7697 * configure, config.in: Rebuild.
7698 * configure.ac: Remove unused configury.
7699
3266f10b
TT
77002013-11-08 Tom Tromey <tromey@redhat.com>
7701
7702 * acinclude.m4: Include common.m4, codeset.m4.
7703 * configure, config.in: Rebuild.
7704 * configure.ac: Use GDB_AC_COMMON.
7705
6682d959
AA
77062013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7707
7708 * linux-s390-low.c (HWCAP_S390_TE): New define.
7709 (s390_arch_setup): Consider the TE field in the HWCAP for
7710 determining 'have_regset_tdb'.
7711
fd0a4d76
SDJ
77122013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7713
7714 PR gdb/16014
7715 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7716 call to sizeof.
7717
1a3d890b
PA
77182013-10-02 Pedro Alves <palves@redhat.com>
7719
7720 * server.c (process_serial_event): Don't output "GDBserver
7721 exiting" if GDB is connected through stdio.
7722 * target.c (mywait): Likewise, be silent if GDB is connected
7723 through stdio.
7724
97ad4581
JB
77252013-10-01 Joel Brobecker <brobecker@adacore.com>
7726
7727 * lynx-low.c (lynx_add_threads_after_attach): New function.
7728 (lynx_attach): Remove call to add_thread. Add call to
7729 lynx_add_threads_after_attach instead.
7730
5b4e221c
MF
77312013-09-28 Mike Frysinger <vapier@gentoo.org>
7732
7733 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7734 * config.in, configure: Regenerated.
7735
ee47b2f8
YQ
77362013-09-18 Yao Qi <yao@codesourcery.com>
7737
7738 PR server/15959
7739 * server.c (start_inferior): Clear 'resume_info'.
7740
d6707650 77412013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7742
d6707650
JW
7743 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7744 for each register.
7745
9243dd0e 77462013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7747
9243dd0e
JW
7748 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7749 linux-tile-low.o to srv_tgtobj.
7750
c623a6ef
WN
77512013-09-16 Will Newton <will.newton@linaro.org>
7752
7753 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7754 out regs.
7755
fb71d39e
PA
77562013-09-06 Pedro Alves <palves@redhat.com>
7757
7758 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7759 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7760 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7761 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7762 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7763 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7764
8e7e9910
PA
77652013-09-06 Pedro Alves <palves@redhat.com>
7766
7767 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7768 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7769
7c3a12ca
PA
77702013-09-06 Pedro Alves <palves@redhat.com>
7771
7772 * linux-amd64-ipa.c: Include tracepoint.h.
7773 * linux-i386-ipa.c: Include tracepoint.h.
7774
8eb3d7b6
RW
77752013-09-06 Ricard Wanderlof <ricardw@axis.com>
7776
7777 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7778 (ps_get_thread_area): New function.
7779
eddddb9d
RW
77802013-09-06 Ricard Wanderlof <ricardw@axis.com>
7781
7782 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7783 (initialize_low_arch): Call init_registers_crisv32 rather than
7784 init_register_crisv32.
7785
533b0600
PA
77862013-09-05 Pedro Alves <palves@redhat.com>
7787
7788 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7789 to ...
7790 * hostio.h: ... this new file.
7791 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7792 win32-low.c: Include hostio.h.
7793
0ce3d3b5
PA
77942013-09-05 Pedro Alves <palves@redhat.com>
7795
7796 * server.h (gdb_client_data, handler_func, callback_handler_func)
7797 (delete_file_handler, add_file_handler, append_callback_event)
7798 (delete_callback_event, start_event_loop, initialize_event_loop):
7799 Move to event-loop.h and include it.
7800 * event-loop.h: New file.
7801
799cdc37
PA
78022013-09-05 Pedro Alves <palves@redhat.com>
7803
7804 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7805 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7806 (loaded_dll, unloaded_dll): Move to ...
7807 * dll.h: ... this new file.
7808 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7809
6a6bbd9d
PA
78102013-09-05 Pedro Alves <palves@redhat.com>
7811
7812 * server.h (current_process, get_thread_process, all_processes)
7813 (add_inferior_to_list, for_each_inferior, current_inferior)
7814 (remove_inferior, add_process, remove_process, find_process_pid)
7815 (have_started_inferiors_p, have_attached_inferiors_p)
7816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7817 (clear_inferiors, find_inferior, find_inferior_id)
7818 (inferior_target_data, set_inferior_target_data)
7819 (inferior_regcache_data, set_inferior_regcache_data): Move to
7820 inferiors.h, and include it.
7821 * inferiors.h: New file.
7822
f699aaba
PA
78232013-09-05 Pedro Alves <palves@redhat.com>
7824
7825 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7826 Move ...
72f4393d 7827 * ax.h: ... here.
f699aaba 7828
c144c7a0
PA
78292013-09-05 Pedro Alves <palves@redhat.com>
7830
7831 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7832 tracepoint.h.
7833 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7834 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7835 (handle_tracepoint_general_set, handle_tracepoint_query)
7836 (tracepoint_finished_step, tracepoint_was_hit)
7837 (release_while_stepping_state_list, current_traceframe)
7838 (in_readonly_region, traceframe_read_mem)
7839 (fetch_traceframe_registers, traceframe_read_sdata)
7840 (traceframe_read_info, struct fast_tpoint_collect_status)
7841 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7842 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7843 (supply_fast_tracepoint_registers)
7844 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7845 (ipa_tdesc, claim_trampoline_space)
7846 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7847 (agent_mem_read, agent_get_trace_state_variable_value)
7848 (agent_set_trace_state_variable_value, agent_tsv_read)
7849 (agent_mem_read_string, get_raw_reg_func_addr)
7850 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7851 * tracepoint.h: ... this new file.
7852
ff42e6ab
PA
78532013-09-05 Pedro Alves <palves@redhat.com>
7854
7855 * server.h (perror_with_name, error, fatal, warning, paddress)
7856 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7857 include it.
7858 * utils.h: New file.
7859
541af0f4
PA
78602013-09-05 Pedro Alves <palves@redhat.com>
7861
7862 * server.h (remote_debug, noack_mode, transport_is_reliable)
7863 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7864 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7865 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7866 (write_enn, initialize_async_io, enable_async_io)
7867 (disable_async_io, check_remote_input_interrupt_request)
7868 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7869 (dead_thread_notify, prepare_resume_reply)
7870 (decode_address_to_semicolon, decode_address, decode_m_packet)
7871 (decode_M_packet, decode_X_packet, decode_xfer_write)
7872 (decode_search_memory_packet, unhexify, hexify)
7873 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7874 (look_up_one_symbol, relocate_instruction)
7875 (monitor_output): Move to remote-utils.h, and include it.
7876 * remote-utils.h: New file.
7877
eebdf26b
PA
78782013-09-05 Pedro Alves <palves@redhat.com>
7879
7880 * server.h (_): Delete.
7881
3aafd2ff
PA
78822013-09-02 Pedro Alves <palves@redhat.com>
7883
7884 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7885 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7886 allocated.
7887 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7888
cee83bcb
PM
78892013-09-02 Pierre Muller <muller@sourceware.org>
7890
7891 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7892 or WriteProcessMemory complete successfully and handle
7893 ERROR_PARTIAL_COPY error.
7894
9a13b2fa
PA
78952013-09-02 Pedro Alves <palves@redhat.com>
7896
7897 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7898 error instead of EIO.
7899
602e3198
JK
79002013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7901
7902 PR server/15604
7903 * linux-low.c: Include filestuff.h.
7904 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7905 * lynx-low.c: Include filestuff.h.
7906 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7907 * server.c: Include filestuff.h.
7908 (main): Call notice_open_fds.
7909 * spu-low.c: Include filestuff.h.
7910 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7911
96d7229d
LM
79122013-08-22 Luis Machado <lgustavo@codesourcery.com>
7913
7914 * Makefile.in: Explain why ../target and ../nat are not
7915 listed as include file search paths.
7916 (linux-waitpid.o): New object file rule.
7917 * configure.srv (srv_native_linux_obj): New variable.
7918 Replace all occurrences of linux native object files with
7919 $srv_native_linux_obj.
7920 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7921 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7922 (linux_enable_event_reporting): Remove declaration.
7923 (my_waitpid): Moved to common/linux-waitpid.c.
7924 (linux_wait_for_event): Pass ptid when calling
7925 linux_enable_event_reporting.
7926 (linux_supports_tracefork_flag): Remove.
7927 (linux_enable_event_reporting): Likewise.
7928 (linux_tracefork_grandchild): Remove.
7929 (STACK_SIZE): Moved to common/linux-ptrace.c.
7930 (linux_tracefork_child): Remove.
7931 (linux_test_for_tracefork): Remove.
7932 (linux_look_up_symbols): Call linux_supports_traceclone.
7933 (initialize_low): Remove call to linux_test_for_tracefork.
7934 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7935 common/linux-ptrace.h.
7936 (PTRACE_TYPE_ARG4): Likewise.
7937 Include linux-ptrace.h.
7938
32940073
PA
79392013-08-21 Pedro Alves <palves@redhat.com>
7940
7941 * config.in: Renegerate.
7942
33b60d58 79432013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7944
33b60d58
LM
7945 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7946 (SFILES): Remove $(srcdir)/common/target-common.c and
7947 add $(srcdir)/target/waitstatus.c.
7948 (OBS): Remove target-common.o and add waitstatus.o.
7949 (server_h): Remove $(srcdir)/../common/target-common.h and
7950 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7951 and $(srcdir)/../target/waitstatus.h.
7952 (target-common.o): Remove.
7953 (waitstatus.o): New target object file.
7954 * target.h: Do not include target-common.h and
7955 include target/resume.h, target/wait.h and
7956 target/waitstatus.h.
7957
b8e1b30e
LM
79582013-08-13 Luis Machado <lgustavo@codesourcery.com>
7959
7960 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7961 to PTRACE_TYPE_ARG3.
7962 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7963 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7964 PTRACE_TYPE_ARG4.
7965 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7966 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7967
7a60ad40
YQ
79682013-07-27 Jie Zhang <jie@codesourcery.com>
7969 Daniel Jacobowitz <dan@codesourcery.com>
7970 Yao Qi <yao@codesourcery.com>
7971
7972 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7973 (mips-linux-watch.o): New rule.
7974 (mips_linux_watch_h): New variable.
7975 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7976 srv_tgtobj.
7977 * linux-mips-low.c: Include mips-linux-watch.h.
7978 (struct arch_process_info, struct arch_lwp_info): New.
7979 (update_watch_registers_callback): New function.
7980 (mips_linux_new_process, mips_linux_new_thread) New functions.
7981 (mips_linux_prepare_to_resume, mips_insert_point): New
7982 functions.
7983 (mips_remove_point, mips_stopped_by_watchpoint): New
7984 functions.
7985 (rsp_bp_type_to_target_hw_bp_type): New function.
7986 (mips_stopped_data_address): New function.
7987 (the_low_target): Add watchpoint support functions.
7988
de6f69ad
YQ
79892013-07-27 Yao Qi <yao@codesourcery.com>
7990
7991 * i386-low.c: Include break-common.h.
7992 (enum target_hw_bp_type): Remove.
7993
3360c0bf
LM
79942013-07-24 Luis Machado <lgustavo@codesourcery.com>
7995
7996 * Makefile.in (SFILES): /common/target-common.c.
7997 (OBS): Add target-common.o.
7998 (server_h): Add $(srcdir)/../common/target-common.h.
7999 (target-common.o): New target.
8000 * server.c (queue_stop_reply_callback): Free
8001 status string after use.
8002 * target.c (target_waitstatus_to_string): Remove.
8003 * target.h: Include target-common.h.
8004 (resume_kind): Likewise.
8005 (target_waitkind): Likewise.
8006 (target_waitstatus): Likewise.
8007 (TARGET_WNOHANG): Likewise.
8008
bd885420
YQ
80092013-07-04 Yao Qi <yao@codesourcery.com>
8010
8011 * Makefile.in (host_alias): Use @host_noncanonical@.
8012 (target_alias): Use @target_noncanonical@.
8013 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8014 ACX_NONCANONICAL_HOST.
8015 * configure: Regenerated.
8016
8017 Revert:
8018 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8019
8020 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8021 * configure: Rebuild.
8022 * Makefile.in (version_host, version_target): Get from configure.
8023 (version.c): Use $(version_host) and $(version_target).
8024
17ef446e
PA
80252013-07-03 Pedro Alves <palves@redhat.com>
8026
8027 * Makefile.in (config.status): Depend on development.sh.
8028 * acinclude.m4: Include libmcheck.m4.
8029 * configure: Regenerate.
8030
7a9a7487
MG
80312013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8032
8033 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8034 attribute inside the parentheses.
8035 (winapi_DebugSetProcessKillOnExit): Ditto.
8036 (winapi_DebugBreakProcess): Ditto.
8037 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8038
49b64de6
MG
80392013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8040
8041 * notif.h (notif_event): Add a dummy member to avoid compiler
8042 errors.
8043
d5749ee7
PA
80442013-07-01 Pedro Alves <palves@redhat.com>
8045
8046 * hostio.c (HOSTIO_PATH_MAX): Define.
8047 (require_filename, handle_open, handle_unlink, handle_readlink):
8048 Use it.
8049
d8d2a3ee
PA
80502013-07-01 Pedro Alves <palves@redhat.com>
8051
8052 * server.h: Include "pathmax.h".
8053 * linux-low.c: Don't include sys/param.h.
8054 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8055 MAXPATHLEN.
8056 * win32-low.c: Don't include sys/param.h.
8057 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8058
bc7dea8d
PA
80592013-07-01 Pedro Alves <palves@redhat.com>
8060
8061 * event-loop.c: Don't check HAVE_UNISTD_H before including
8062 <unistd.h>.
8063 * gdbreplay.c: Likewise.
8064 * remote-utils.c: Likewise.
8065 * server.c: Likewise.
8066 * configure.ac: Don't check for unistd.h.
8067 * configure: Regenerate.
8068
d6c2da54
TT
80692013-06-28 Tom Tromey <tromey@redhat.com>
8070
8071 * Makefile.in (version.c): Use version.in, not
8072 common/version.in.
8073
257b6bec
MG
80742013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8075
8076 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8077 * configure: Rebuild.
8078 * Makefile.in (version_host, version_target): Get from configure.
8079 (version.c): Use $(version_host) and $(version_target).
8080
86ebe149
DK
80812013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8082
8083 Fix trace-status to output user name without trailing colon.
8084 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8085
f30aa5af
DK
80862013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8087
8088 Fix trace-status to output proper start-time and stop-time.
8089 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8090 output start time and stop time in hex as gdb expects.
8091
28a93511
YQ
80922013-06-26 Pedro Alves <pedro@codesourcery.com>
8093
8094 * tracepoint.c (build_traceframe_info_xml): Output trace state
8095 variables present in the trace buffer.
8096
01208463
TT
80972013-06-24 Tom Tromey <tromey@redhat.com>
8098
8099 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8100 create-version.sh.
8101 (version.o): Remove.
8102 * gdbreplay.c: Include version.h.
8103 (version, host_name): Don't declare.
8104 * server.h: Include version.h.
8105 (version, host_name): Don't declare.
8106
760256f9
PA
81072013-06-12 Pedro Alves <palves@redhat.com>
8108
8109 * linux-x86-low.c (linux_is_elf64): Delete global.
8110 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8111 with local linux_pid_exe_is_elf_64_file use.
8112
030031ee
PA
81132013-06-11 Pedro Alves <palves@redhat.com>
8114
8115 * linux-low.c (regset_disabled, disable_regset): New functions.
8116 (regsets_fetch_inferior_registers)
8117 (regsets_store_inferior_registers): Use them.
8118 (initialize_regsets_info); Don't allocate the disabled_regsets
8119 array here.
8120 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8121 comment.
8122
5da6eb0a
PA
81232013-06-11 Pedro Alves <palves@redhat.com>
8124
8125 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8126 xmalloc.
8127
7e5aaa09
PA
81282013-06-11 Pedro Alves <palves@redhat.com>
8129
8130 * linux-x86-low.c (initialize_low_arch): Call
8131 init_registers_x32_avx_linux.
8132
d878444c
JK
81332013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8134
8135 Fix compatibility with Android Bionic.
8136 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8137 it is not empty.
8138
3aee8918
PA
81392013-06-07 Pedro Alves <palves@redhat.com>
8140
5f2b57b5 8141 PR server/14823
3aee8918
PA
8142 * Makefile.in (OBS): Add tdesc.o.
8143 (IPA_OBJS): Add tdesc-ipa.o.
8144 (tdesc-ipa.o): New rule.
8145 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8146 interface.
8147 * linux-low.c (new_inferior): Delete.
8148 (disabled_regsets, num_regsets): Delete.
8149 (linux_add_process): Adjust to set the new per-process
8150 new_inferior flag.
8151 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8152 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8153 was a stop. When calling arch_setup, switch the current inferior
8154 to the thread that got an event.
8155 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8156 (regsets_fetch_inferior_registers)
8157 (regsets_store_inferior_registers): New regsets_info parameter.
8158 Adjust to use it.
8159 (linux_register_in_regsets): New regs_info parameter. Adjust to
8160 use it.
8161 (register_addr, fetch_register, store_register): New usrregs_info
8162 parameter. Adjust to use it.
8163 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8164 parameter regs_info. Adjust to use it.
8165 (linux_fetch_registers): Get the current inferior's regs_info, and
8166 adjust to use it.
8167 (linux_store_registers): Ditto.
8168 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8169 (initialize_low): Don't initialize the target_regsets here. Call
8170 initialize_low_arch.
8171 * linux-low.h (target_regsets): Delete declaration.
8172 (struct regsets_info): New.
8173 (struct usrregs_info): New.
8174 (struct regs_info): New.
8175 (struct process_info_private) <new_inferior>: New field.
8176 (struct linux_target_ops): Delete the num_regs, regmap, and
8177 regset_bitmap fields. New field regs_info.
8178 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8179 * i387-fp.c (num_xmm_registers): Delete.
8180 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8181 calls to new interface.
8182 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8183 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8184 Infer the number of xmm registers from the regcache's target
8185 description.
8186 * i387-fp.h (num_xmm_registers): Delete.
8187 * inferiors.c (add_thread): Don't install the thread's regcache
8188 here.
8189 * proc-service.c (gregset_info): Fetch the current inferior's
8190 regs_info. Adjust to use it.
8191 * regcache.c: Include tdesc.h.
8192 (register_bytes, reg_defs, num_registers)
8193 (gdbserver_expedite_regs): Delete.
8194 (get_thread_regcache): If the thread doesn't have a regcache yet,
8195 create one, instead of aborting gdbserver.
8196 (regcache_invalidate_one): Rename to ...
8197 (regcache_invalidate_thread): ... this.
8198 (regcache_invalidate_one): New.
8199 (regcache_invalidate): Only invalidate registers of the current
8200 process.
8201 (init_register_cache): Add target_desc parameter, and use it.
8202 (new_register_cache): Ditto. Assert the target description has a
8203 non zero registers_size.
8204 (regcache_cpy): Add assertions. Adjust.
8205 (realloc_register_cache, set_register_cache): Delete.
8206 (registers_to_string, registers_from_string): Adjust.
8207 (find_register_by_name, find_regno, find_register_by_number)
8208 (register_cache_size): Add target_desc parameter, and use it.
8209 (free_register_cache_thread, free_register_cache_thread_one)
8210 (regcache_release, register_cache_size): New.
8211 (register_size): Add target_desc parameter, and use it.
8212 (register_data, supply_register, supply_register_zeroed)
8213 (supply_regblock, supply_register_by_name, collect_register)
8214 (collect_register_as_string, collect_register_by_name): Adjust.
8215 * regcache.h (struct target_desc): Forward declare.
8216 (struct regcache) <tdesc>: New field.
8217 (init_register_cache, new_register_cache): Add target_desc
8218 parameter.
8219 (regcache_invalidate_thread): Declare.
8220 (regcache_invalidate_one): Delete declaration.
8221 (regcache_release): Declare.
8222 (find_register_by_number, register_cache_size, register_size)
8223 (find_regno): Add target_desc parameter.
8224 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8225 declarations.
8226 * remote-utils.c: Include tdesc.h.
8227 (outreg, prepare_resume_reply): Adjust.
8228 * server.c: Include tdesc.h.
8229 (gdbserver_xmltarget): Delete declaration.
8230 (get_features_xml, process_serial_event): Adjust.
8231 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8232 declare.
8233 (struct process_info) <tdesc>: New field.
8234 (ipa_tdesc): Declare.
8235 * tdesc.c: New file.
8236 * tdesc.h: New file.
8237 * tracepoint.c: Include tdesc.h.
8238 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8239 (get_context_regcache): Adjust to pass ipa_tdesc down.
8240 (do_action_at_tracepoint): Adjust to get the register cache size
8241 from the context regcache's description.
8242 (traceframe_walk_blocks): Adjust to get the register cache size
8243 from the current trace frame's description.
8244 (traceframe_get_pc): Adjust to get current trace frame's
8245 description and pass it down.
8246 (gdb_collect): Adjust to get the register cache size from the
8247 IPA's description.
8248 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8249 (gdbserver_xmltarget): Delete.
8250 (initialize_low_tracepoint): Set the ipa's target description.
8251 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8252 (initialize_low_tracepoint): Set the ipa's target description.
8253 * linux-x86-low.c: Include tdesc.h.
8254 [__x86_64__] (is_64bit_tdesc): New.
8255 (ps_get_thread_area, x86_get_thread_area): Use it.
8256 (i386_cannot_store_register): Rename to ...
8257 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8258 (i386_cannot_fetch_register): Rename to ...
8259 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8260 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8261 to new interface.
8262 (target_regsets): Rename to ...
8263 (x86_regsets): ... this.
8264 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8265 interface.
8266 (x86_siginfo_fixup): Use is_64bit_tdesc.
8267 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8268 (tdesc_x32_avx_linux, tdesc_x32_linux)
8269 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8270 Declare.
8271 (x86_linux_update_xmltarget): Delete.
8272 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8273 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8274 (AMD64_LINUX_USER64_CS): New.
8275 (x86_linux_read_description): New, based on
8276 x86_linux_update_xmltarget.
8277 (same_process_callback): New.
8278 (x86_arch_setup_process_callback): New.
8279 (x86_linux_update_xmltarget): New.
8280 (x86_regsets_info): New.
8281 (amd64_linux_regs_info): New.
8282 (i386_linux_usrregs_info): New.
8283 (i386_linux_regs_info): New.
8284 (x86_linux_regs_info): New.
8285 (x86_arch_setup): Reimplement.
8286 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8287 (x86_emit_ops): Ditto.
8288 (the_low_target): Adjust. Install x86_linux_regs_info,
8289 x86_cannot_fetch_register, and x86_cannot_store_register.
8290 (initialize_low_arch): New.
8291 * linux-ia64-low.c (tdesc_ia64): Declare.
8292 (ia64_fetch_register): Adjust.
8293 (ia64_usrregs_info, regs_info): New globals.
8294 (ia64_regs_info): New function.
8295 (the_low_target): Adjust.
8296 (initialize_low_arch): New function.
8297 * linux-sparc-low.c (tdesc_sparc64): Declare.
8298 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8299 Adjust.
8300 (sparc_arch_setup): New function.
8301 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8305 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8306 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8307 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8308 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8309 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8310 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8311 (tdesc_powerpc_isa205_vsx64l): Declare.
8312 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8313 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8314 (ppc_set_pc, ppc_get_hwcap): Adjust.
8315 (ppc_usrregs_info): Forward declare.
8316 (!__powerpc64__) ppc_regmap_adjusted: New global.
8317 (ppc_arch_setup): Adjust to the current process'es target
8318 description.
8319 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8320 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8321 (ppc_store_evrregset): Adjust.
8322 (target_regsets): Rename to ...
8323 (ppc_regsets): ... this, and make static.
8324 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8325 (ppc_regs_info): New function.
8326 (the_low_target): Adjust.
8327 (initialize_low_arch): New function.
8328 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8329 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8330 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8331 (tdesc_s390x_linux64v2): Declare.
8332 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8333 (s390_fill_gregset, s390_store_last_break): Adjust.
8334 (target_regsets): Rename to ...
8335 (s390_regsets): ... this, and make static.
8336 (s390_get_pc, s390_set_pc): Adjust.
8337 (s390_get_hwcap): New target_desc parameter, and use it.
8338 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8339 (s390_arch_setup): Adjust to set the current process'es target
8340 description. Don't adjust the regmap.
8341 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8342 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8343 (regs_info_3264): New globals.
8344 (s390_regs_info): New function.
8345 (the_low_target): Adjust.
8346 (initialize_low_arch): New function.
8347 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8348 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8349 [__mips64] (init_registers_mips_linux)
8350 (init_registers_mips_dsp_linux): Delete defines.
8351 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8352 (have_dsp): New global.
8353 (mips_read_description): New, based on mips_arch_setup.
8354 (mips_arch_setup): Reimplement.
8355 (get_usrregs_info): New function.
8356 (mips_cannot_fetch_register, mips_cannot_store_register)
8357 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8358 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8359 (target_regsets): Rename to ...
8360 (mips_regsets): ... this, and make static.
8361 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8362 (dsp_regs_info, regs_info): New globals.
8363 (mips_regs_info): New function.
8364 (the_low_target): Adjust.
8365 (initialize_low_arch): New function.
8366 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8367 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8368 Declare.
8369 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8370 (arm_read_description): New, with bits factored from
8371 arm_arch_setup.
8372 (arm_arch_setup): Reimplement.
8373 (target_regsets): Rename to ...
8374 (arm_regsets): ... this, and make static.
8375 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8376 (arm_regs_info): New function.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * linux-m68k-low.c (tdesc_m68k): Declare.
8380 (target_regsets): Rename to ...
8381 (m68k_regsets): ... this, and make static.
8382 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8383 (m68k_regs_info): New function.
8384 (m68k_arch_setup): New function.
8385 (the_low_target): Adjust.
8386 (initialize_low_arch): New function.
8387 * linux-sh-low.c (tdesc_sharch): Declare.
8388 (target_regsets): Rename to ...
8389 (sh_regsets): ... this, and make static.
8390 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8391 (sh_regs_info, sh_arch_setup): New functions.
8392 (the_low_target): Adjust.
8393 (initialize_low_arch): New function.
8394 * linux-bfin-low.c (tdesc_bfin): Declare.
8395 (bfin_arch_setup): New function.
8396 (bfin_usrregs_info, regs_info): New globals.
8397 (bfin_regs_info): New function.
8398 (the_low_target): Adjust.
8399 (initialize_low_arch): New function.
8400 * linux-cris-low.c (tdesc_cris): Declare.
8401 (cris_arch_setup): New function.
8402 (cris_usrregs_info, regs_info): New globals.
8403 (cris_regs_info): New function.
8404 (the_low_target): Adjust.
8405 (initialize_low_arch): New function.
8406 * linux-cris-low.c (tdesc_crisv32): Declare.
8407 (cris_arch_setup): New function.
8408 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8409 (cris_regs_info): New function.
8410 (the_low_target): Adjust.
8411 (initialize_low_arch): New function.
8412 * linux-m32r-low.c (tdesc_m32r): Declare.
8413 (m32r_arch_setup): New function.
8414 (m32r_usrregs_info, regs_info): New globals.
8415 (m32r_regs_info): Adjust.
8416 (initialize_low_arch): New function.
8417 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8418 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8419 (tic6x_usrregs_info): Forward declare.
8420 (tic6x_read_description): New function, based on ...
8421 (tic6x_arch_setup): ... this. Reimplement.
8422 (target_regsets): Rename to ...
8423 (tic6x_regsets): ... this, and make static.
8424 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8425 (tic6x_regs_info): New function.
8426 (the_low_target): Adjust.
8427 (initialize_low_arch): New function.
8428 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8429 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8430 (target_regsets): Rename to ...
8431 (xtensa_regsets): ... this, and make static.
8432 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8433 globals.
8434 (xtensa_arch_setup, xtensa_regs_info): New functions.
8435 (the_low_target): Adjust.
8436 (initialize_low_arch): New function.
8437 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8438 (nios2_arch_setup): Set the current process'es tdesc.
8439 (target_regsets): Rename to ...
8440 (nios2_regsets): ... this.
8441 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8442 (nios2_regs_info): New function.
8443 (the_low_target): Adjust.
8444 (initialize_low_arch): New function.
a261b8f5
PA
8445 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8446 (aarch64_arch_setup): Set the current process'es tdesc.
8447 (target_regsets): Rename to ...
8448 (aarch64_regsets): ... this.
8449 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8450 (aarch64_regs_info): New function.
8451 (the_low_target): Adjust.
8452 (initialize_low_arch): New function.
3aee8918
PA
8453 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8454 globals.
8455 (target_regsets): Rename to ...
8456 (tile_regsets): ... this.
8457 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8458 (tile_regs_info): New function.
8459 (tile_arch_setup): Set the current process'es tdesc.
8460 (the_low_target): Adjust.
8461 (initialize_low_arch): New function.
8462 * spu-low.c (tdesc_spu): Declare.
8463 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8464 * win32-arm-low.c (tdesc_arm): Declare.
8465 (arm_arch_setup): New function.
8466 (the_low_target): Install arm_arch_setup instead of
8467 init_registers_arm.
8468 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8469 (init_windows_x86): Rename to ...
8470 (i386_arch_setup): ... this. Set `win32_tdesc'.
8471 (the_low_target): Adjust.
8472 * win32-low.c (win32_tdesc): New global.
8473 (child_add_thread): Don't create the thread cache here.
8474 (do_initial_child_stuff): Set the new process'es tdesc.
8475 * win32-low.h (struct target_desc): Forward declare.
8476 (win32_tdesc): Declare.
8477 * lynx-i386-low.c (tdesc_i386): Declare global.
8478 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8479 * lynx-low.c (lynx_tdesc): New global.
8480 (lynx_add_process): Set the new process'es tdesc.
8481 * lynx-low.h (struct target_desc): Forward declare.
8482 (lynx_tdesc): Declare global.
8483 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8484 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8485 * nto-low.c (nto_tdesc): New global.
8486 (do_attach): Set the new process'es tdesc.
8487 * nto-low.h (struct target_desc): Forward declare.
8488 (nto_tdesc): Declare.
8489 * nto-x86-low.c (tdesc_i386): Declare.
8490 (nto_x86_arch_setup): Set `nto_tdesc'.
8491
b1fbec62
GB
84922013-06-04 Gary Benson <gbenson@redhat.com>
8493
8494 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8495 to qSupported response when appropriate.
8496 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8497 with nonzero-length annex.
8498 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8499 arguments supplied in annex.
8500
d1ec4ce7
DE
85012013-05-31 Doug Evans <dje@google.com>
8502
ac44adcb 8503 PR server/15594
d1ec4ce7
DE
8504 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8505 64 bits in 64-cross-32 environment.
8506
9b25f2d3
PA
85072013-05-28 Pedro Alves <palves@redhat.com>
8508
8509 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8510 (aarch64-without-fpu.c): Delete rule.
8511 * configure.srv (aarch64*-*-linux*): Remove references to
8512 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8513 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8514 declaration.
8515
6740dc9c
PA
85162013-05-24 Pedro Alves <palves@redhat.com>
8517
8518 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8519 instead of strchr/decode_address. Error if the range isn't split
8520 with a ','. Don't assume there's be a ':' in the action.
8521
c2d6af84
PA
85222013-05-23 Yao Qi <yao@codesourcery.com>
8523 Pedro Alves <palves@redhat.com>
8524
8525 * linux-low.c (lwp_in_step_range): New function.
8526 (linux_wait_1): If the thread was range stepping and stopped
8527 outside the stepping range, report the stop to GDB. Otherwise,
8528 continue stepping. Add range stepping debug output.
8529 (linux_set_resume_request): Copy the step range from the resume
8530 request to the lwp.
8531 (linux_supports_range_stepping): New.
8532 (linux_target_ops) <supports_range_stepping>: Set to
8533 linux_supports_range_stepping.
8534 * linux-low.h (struct linux_target_ops)
8535 <supports_range_stepping>: New field.
8536 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8537 * linux-x86-low.c (x86_supports_range_stepping): New.
8538 (the_low_target) <supports_range_stepping>: Set to
8539 x86_supports_range_stepping.
8540 * server.c (handle_v_cont): Handle 'r' action.
8541 (handle_v_requests): Append ";r" if the target supports range
8542 stepping.
8543 * target.h (struct thread_resume) <step_range_start,
8544 step_range_end>: New fields.
8545 (struct target_ops) <supports_range_stepping>:
8546 New field.
8547 (target_supports_range_stepping): New macro.
8548
58794e1a
JB
85492013-05-17 Joel Brobecker <brobecker@adacore.com>
8550
8551 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8552 confusion in comment.
8553
d631c5a7
JB
85542013-05-17 Joel Brobecker <brobecker@adacore.com>
8555
8556 * lynx-low.c (struct process_info_private): New type.
8557 (lynx_add_process): New function.
8558 (lynx_create_inferior, lynx_attach): Replace calls to
8559 add_process by calls to lynx_add_process.
8560 (lynx_resume): If PTID is null, then try using
8561 current_process()->private->last_wait_event_ptid.
8562 Add comments.
8563 (lynx_clear_inferiors): Delete. The contents of that function
8564 has been inlined in lynx_mourn;
8565 (lynx_wait_1): Save the ptid in the process's private data.
8566 (lynx_mourn): Free the process' private data. Replace call
8567 to lynx_clear_inferiors by call to clear_inferiors.
8568
96f7a20f
YQ
85692013-05-17 Yao Qi <yao@codesourcery.com>
8570
8571 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8572 the right place.
8573
db0dfaa0
LM
85742013-05-16 Luis Machado <lgustavo@codesourcery.com>
8575
8576 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8577 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8578 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8579 PT_TEXT_END_ADDR guards. Update comments.
8580 (linux_target_op) <read_offsets>: Conditionally define to
8581 linux_read_offsets if the target is UCLIBC and if it defines
8582 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8583
68f5f838
SL
85842013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8585 Andrew Jenner <andrew@codesourcery.com>
8586
8587 * Makefile.in (SFILES): Add linux-nios2-low.c.
8588 (clean): Add action to delete nios2-linux.c.
8589 (nios2-linux.c): New rule.
8590 * configure.srv: Add nios2*-*-linux*.
8591 * linux-nios2-low.c: New.
8592
1ebff1fd
HAQ
85932013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8594
8595 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8596
f6150862
HZ
85972013-04-25 Hui Zhu <hui@codesourcery.com>
8598
8599 PR gdb/15186
f6150862
HZ
8600 * ax.c (ax_printf): Add fflush.
8601
614c279d
TT
86022013-04-22 Tom Tromey <tromey@redhat.com>
8603
8604 * Makefile.in (SFILES): Add filestuff.c.
8605 (OBS): Add filestuff.o.
8606 (filestuff.o): New target.
8607 * config.in, configure: Rebuild.
8608 * configure.ac: Check for fdwalk, pipe2.
8609
7d4e5717
PA
86102013-04-17 Pedro Alves <palves@redhat.com>
8611
8612 * configure.ac (USE_THREAD_DB): Delete variable.
8613 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8614 Don't AC_SUBST USE_THREAD_DB.
8615 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8616 * config.in, configure: Regenerate.
8617
d5c93e41
PA
86182013-04-16 Pedro Alves <palves@redhat.com>
8619
8620 * linux-low.h (struct lwp_info) <thread_known>: Move under
8621 the USE_THREAD_DB #ifdef.
8622
04f5fe89
PA
86232013-04-16 Pedro Alves <palves@redhat.com>
8624
8625 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8626 (linux-low.o): Delete rule.
8627 * linux-low.h: Always include "gdb_thread_db.h" instead of
8628 conditionally including thread_db.h.
8629 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8630 HAVE_THREAD_DB_H.
8631
480b27bf
JK
86322013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8633
8634 * Makefile.in (install-only): Fix make install regression.
8635
43662968
JK
86362013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8637
8638 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8639 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8640 installation.
8641 * gdbserver.1: Remove.
8642
3e74e146
PA
86432013-03-22 Pedro Alves <palves@redhat.com>
8644
8645 * linux-low.c (handle_extended_wait): Don't call
8646 linux_enable_event_reporting.
8647
a8347a2a
TT
86482013-03-15 Tony Theodore <tonyt@logyst.com>
8649
8650 PR build/9098:
8651 * Makefile.in (SHELL): Use @SHELL@.
8652
eeb56fa7
SDJ
86532013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8654
8655 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8656 compiler warning.
8657
4fa7e2ff
JB
86582013-03-13 Joel Brobecker <brobecker@adacore.com>
8659
8660 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8661 Remove extraneous NULL element.
8662
8ddb1965
YQ
86632013-03-13 Yao Qi <yao@codesourcery.com>
8664
8665 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8666 'V' block in trace frame.
8667
9accd112
MM
86682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8669
8670 * target.h (struct target_ops): Add btrace ops.
8671 (target_supports_btrace): New macro.
8672 (target_enable_btrace): New macro.
8673 (target_disable_btrace): New macro.
8674 (target_read_btrace): New macro.
8675 * gdbthread.h (struct thread_info): Add btrace field.
8676 * server.c: Include btrace-common.h.
8677 (handle_btrace_general_set): New function.
8678 (handle_btrace_enable): New function.
8679 (handle_btrace_disable): New function.
8680 (handle_general_set): Call handle_btrace_general_set.
8681 (handle_qxfer_btrace): New function.
8682 (struct qxfer qxfer_packets[]): Add btrace entry.
8683 * inferiors.c (remove_thread): Disable btrace.
8684 * linux-low: Include linux-btrace.h.
8685 (linux_low_enable_btrace): New function.
8686 (linux_low_read_btrace): New function.
8687 (linux_target_ops): Add btrace ops.
8688 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8689 Add srv_linux_btrace=yes.
8690 (x86_64-*-linux*): Add linux-btrace.o.
8691 Add srv_linux_btrace=yes.
8692 * configure.ac: Define HAVE_LINUX_BTRACE.
8693 * config.in: Regenerated.
8694 * configure: Regenerated.
8695
5cc22e4c
MM
86962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8697
8698 * server.c (handle_qxfer): Preserve error message if -3 is
8699 returned.
8700 (qxfer): Document the -3 return value.
8701
7c97f91e
MM
87022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8703
8704 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8705 (linux_btrace_h): New variable.
8706 (linux-btrace.o): New rule.
8707
be9a119c 87082013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8709 Hafiz Abid Qadeer <abidh@codesourcery.com>
8710
8711 * tracepoint.c (trace_buffer_size): New global.
8712 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8713 (init_trace_buffer): Change to one-argument function. Allocate
8714 trace buffer memory.
8715 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8716 handle QTBuffer:size packet.
8717 (cmd_bigqtbuffer_size): New function.
8718 (initialize_tracepoint): Call init_trace_buffer with
8719 DEFAULT_TRACE_BUFFER_SIZE.
8720 * server.c (handle_query): Add QTBuffer:size in the
8721 supported packets.
8722
e64f7499
YQ
87232013-03-07 Yao Qi <yao@codesourcery.com>
8724
8725 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8726 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8727 of -1.
8728 (cmd_qtsp): Adjust condition. Do post increment.
8729 Set cur_action and cur_step_action back to 0.
8730
f0ae6fc3
PA
87312013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8732
8733 PR server/15236
8734 * linux-low.c (linux_write_memory): Return early success if LEN is
8735 zero.
8736
b5b0b0af
CV
87372013-03-05 Corinna Vinschen <vinschen@redhat.de>
8738
334ad4a8 8739 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8740
589bc927
TT
87412013-02-28 Tom Tromey <tromey@redhat.com>
8742
8743 * configure.ac: Invoke AC_SYS_LARGEFILE.
8744 * configure, config.in: Rebuild.
8745
dfe07582
CV
87462013-02-28 Corinna Vinschen <vinschen@redhat.com>
8747
8748 * win32-low.c: Throughout, fix format strings and casts of
8749 printf-like functions to avoid type related warnings on all
8750 platforms.
8751 (get_child_debug_event): Print dwDebugEventCode as hex since
8752 that's how it's usually documented.
8753
736cd585
YQ
87542013-02-28 Yao Qi <yao@codesourcery.com>
8755
8756 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8757 pulongest.
8758
e1f58301
JW
87592013-02-27 Jiong Wang <jiwang@tilera.com>
8760
8761 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8762 (reg-tilegx32.c): New rule.
8763 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8764 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8765 different register info initializer according to elf class.
8766 (init_registers_tilgx32): New function. The tilegx32 register info
8767 initializer.
8768 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8769 (tile_store_gregset): Likewise.
8770
d171ca78
YQ
87712013-02-27 Yao Qi <yao@codesourcery.com>
8772
8773 * server.c (process_point_options): Print debug message when
8774 debug_threads is true.
8775
282bbdf3
YQ
87762013-02-26 Yao Qi <yao@codesourcery.com>
8777
8778 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8779
aca22551
PA
87802013-02-19 Pedro Alves <palves@redhat.com>
8781 Kai Tietz <ktietz@redhat.com>
8782
8783 PR gdb/15161
8784
8785 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8786 instead of strtoul to extract address from packet.
8787 (process_serial_event) <'z'>: Likewise.
8788
4f3cee1c
YQ
87892013-02-18 Yao Qi <yao@codesourcery.com>
8790
8791 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8792
8e1d55a3
PA
87932013-02-14 Pedro Alves <palves@redhat.com>
8794
8795 Plug memory leak.
8796
8797 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8798 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8799
458820da
PA
88002013-02-14 Pedro Alves <palves@redhat.com>
8801
8802 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8803
baea0dae
PA
88042013-02-14 Pedro Alves <palves@redhat.com>
8805
8806 * tracepoint.c (save_string): Delete.
8807 (add_tracepoint_action): Use savestring instead of save_string.
8808
0b1afbb3
PA
88092013-02-12 Pedro Alves <palves@redhat.com>
8810
8811 * linux-xtensa-low.c: Ditto.
8812 * xtensa-xtregs.c: Ditto.
8813
8a4ac37e
PA
88142013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8815
8816 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8817 thread_db.
8818
148de6bb
MS
88192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8820
8821 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8822 aarch64_num_wp_regs and aarch64_num_bp_regs to
8823 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8824
55fac6e0
MS
88252013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8826
8827 * linux-aarch64-low.c (ps_get_thread_area): Replace
8828 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8829
176eb98c
MS
88302013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8831 Marcus Shawcroft <marcus.shawcroft@arm.com>
8832 Nigel Stephens <nigel.stephens@arm.com>
8833 Yufeng Zhang <yufeng.zhang@arm.com>
8834
8835 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8836 (aarch64.c, aarch64-without-fpu.c): New targets.
8837 * configure.srv (aarch64*-*-linux*): New.
8838 * linux-aarch64-low.c: New file.
8839
56f7af9c
MS
88402013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8841
43aaf8b6 8842 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8843 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8844 (dequeue_one_deferred_signal, linux_resume_one_thread)
8845 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8846 (linux_tracefork_grandchild, linux_test_for_tracefork)
8847 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8848 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8849 where the argument is 0.
8850
60f662b0
YQ
88512013-01-25 Yao Qi <yao@codesourcery.com>
8852
8853 * event-loop.c: Include "queue.h".
8854 (gdb_event_p): New typedef.
8855 (struct gdb_event) <next_event>: Remove.
8856 (event_queue): Change to QUEUE(gdb_event_p).
8857 (async_queue_event): Remove.
8858 (gdb_event_xfree): New.
8859 (initialize_event_loop): New.
8860 (process_event): Use API from QUEUE.
8861 (wait_for_event): Likewise.
8862 * server.c (main): Call initialize_event_loop.
8863 * server.h (initialize_event_loop): Declare.
8864
5ae4861a
YQ
88652013-01-18 Yao Qi <yao@codesourcery.com>
8866
8867 * ax.h (struct eval_agent_expr_context): New.
8868 (gdb_eval_agent_expr): Update declaration.
8869 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8870 TFRAME. Add new argument CTX.
8871 * server.h (struct eval_agent_expr_context): Declare.
8872 (agent_mem_read, agent_tsv_read): Update declaration.
8873 (agent_mem_read_string): Likewise.
8874 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8875 (add_traceframe_block): Add new argument TPOINT.
8876 Increase TPOINT->traceframe_usage.
8877 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8878 eval_tracepoint_agent_expr.
8879 (condition_true_at_tracepoint): Likewise.
8880 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8881 (agent_mem_read_string, agent_tsv_read): Likewise.
8882
85e00e85
YQ
88832013-01-16 Yao Qi <yao@codesourcery.com>
8884
8885 * linux-low.c (linux_resume_one_lwp): Don't check
8886 'lwp->bp_reinsert != 0'.
8887
4039cf45
JB
88882013-01-07 Joel Brobecker <brobecker@adacore.com>
8889 Pedro Alves <palves@redhat.com>
8890
8891 * lynx-low.c (ptrace_request_to_str): Define a temporary
8892 macro and use it to simplify this function's implementation.
8893
9044dee2
JB
88942013-01-07 Joel Brobecker <brobecker@adacore.com>
8895
8896 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8897 sets errno.
8898
e6352c8f
JB
88992013-01-07 Joel Brobecker <brobecker@adacore.com>
8900
8901 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8902
50681a27
JB
89032013-01-07 Joel Brobecker <brobecker@adacore.com>
8904
8905 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8906
3f6e77ef
JB
89072013-01-07 Joel Brobecker <brobecker@adacore.com>
8908
8909 * lynx-low.c (lynx_resume): Use the resume_info parameter
8910 to determine the ptid for the lynx_ptrace call, unless
8911 it is equal to minus_one_ptid, in which case we use the
8912 ptid of the current_inferior.
8913 (lynx_wait_1): After having received a thread create/exit
8914 event, resume the inferior's execution using the signaling
8915 thread's ptid, rather than the old ptid.
8916
7fda33ae
JB
89172013-01-07 Joel Brobecker <brobecker@adacore.com>
8918
8919 * lynx-low.c (lynx_resume): Delete variable ret.
8920
b9786c74
JB
89212013-01-01 Joel Brobecker <brobecker@adacore.com>
8922
8923 * gdbreplay.c (gdbreplay_version): Update copyright year.
8924 * server.c (gdbserver_version): Likewise.
8925
8b93d60f
JB
89262012-12-17 Joel Brobecker <brobecker@adacore.com>
8927
8928 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8929 new thread.
8930
037335a7
JB
89312012-12-17 Joel Brobecker <brobecker@adacore.com>
8932
8933 * lynx-low.c (ptrace_request_to_str): Add handling for
8934 PTRACE_GETTRACESIG.
8935
52d4cbd8
JB
89362012-12-17 Joel Brobecker <brobecker@adacore.com>
8937
8938 * lynx-low.c (lynx_attach): Delete variable new_process.
8939
ab8f6ca9
JB
89402012-12-17 Joel Brobecker <brobecker@adacore.com>
8941
8942 * lynx-low.c (lynx_create_inferior): Delete variable
8943 new_process.
8944
78cbc024
JB
89452012-12-17 Joel Brobecker <brobecker@adacore.com>
8946
8947 * lynx-low.c (ptrace_request_to_str): Do not handle
8948 PTRACE_GETTHREADLIST if this macro does not exist.
8949
14a00470
YQ
89502012-12-15 Yao Qi <yao@codesourcery.com>
8951
8952 * Makefile.in (OBS): Add notif.o.
8953 * notif.c, notif.h: New.
8954 * server.c: Include "notif.h".
8955 (struct vstop_notif) <next>: Remove.
8956 <base>: New field.
8957 (queue_stop_reply): Update.
8958 (push_event, send_next_stop_reply): Remove.
8959 (discard_queued_stop_replies): Update.
8960 (notif_stop): New variable.
8961 (handle_v_stopped): Remove.
8962 (handle_v_requests): Don't call handle_v_stopped. Call
8963 handle_ack_notif instead.
8964 (queue_stop_reply_callback): Call notif_event_enque instead
8965 of queue_stop_reply.
8966 (handle_status): Don't call send_next_stop_reply, call
8967 notif_write_event instead.
8968 (kill_inferior_callback): Likewise.
8969 (detach_or_kill_inferior_callback): Likewise.
8970 (main): Call initialize_notif.
8971 (process_serial_event): Call QUEUE_is_empty.
8972 (handle_target_event): Call notif_push instead of push event.
8973 * server.h (push_event): Remove declaration.
8974
61c125b9
TT
89752012-12-10 Tom Tromey <tromey@redhat.com>
8976
8977 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8978 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8979 macros.
8980 (.c.o): Rewrite.
8981 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8982 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8983 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8984 (amd64-linux-ipa.o, ax.o): Rewrite.
8985 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8986 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8987 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8988 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8989 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8990 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8991 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8992 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8993 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8994 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8995 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8996 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8997 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8998 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8999 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9000 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9001 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9002 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9003 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9004 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9005 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9006 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9007 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9008 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9009 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9010 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9011 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9012 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9013 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9014 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9015 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9016 (reg-tilegx.o): Remove.
9017 (all_object_files): New macro.
9018 Include .deps files.
9019 * aclocal.m4, configure: Rebuild.
9020 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9021 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9022 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9023
e90e9ad9
TT
90242012-12-05 Tom Tromey <tromey@redhat.com>
9025
9026 PR gdb/14917:
9027 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9028
02d403bf 90292012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9030
9031 * configure.ac: Check for linux/perf_event.h.
9032 * config.in: Regenerated.
9033 * configure: Regenerated.
9034
0270a750
PA
90352012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9036
9037 * hostio.c (handle_readlink): Decrease buffer size
9038 parameter passed to readlink by one byte.
9039
8c29b58e
YQ
90402012-11-26 Yao Qi <yao@codesourcery.com>
9041
9042 * configure.ac (build_warnings): Append '-Wempty-body'.
9043 * configure: Regenerated.
9044 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9045 body.
9046
8bdce1ff
PM
90472012-11-15 Pierre Muller <muller@sourceware.org>
9048
9049 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9050 * config.in: Regenerate.
9051 * configure: Regenerate.
9052 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9053 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9054 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9055 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9056 header.
9057 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9058 instead of <sys/wait.h> header.
9059 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9060
02d403bf 90612012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9062
9063 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9064 (various make rules): Remove -DGDBSERVER
9065
fbd5db48
YQ
90662012-11-09 Yao Qi <yao@codesourcery.com>
9067
9068 * spu-low.c (current_ptid): Move it to ..
9069 * gdbthread.h: ... here. New.
9070 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9071 * server.c (myresume, process_serial_event): Likewise.
9072 * thread-db.c (thread_db_find_new_threads): Likewise.
9073 * tracepoint.c (run_inferior_command): Likewise.
9074
b3dc46ff
AB
90752012-10-01 Andrew Burgess <aburgess@broadcom.com>
9076
9077 * server.c (handle_search_memory_1): Include access length in
9078 warning message.
9079
07c04788
HPN
90802012-09-05 Michael Brandt <michael.brandt@axis.com>
9081
9082 * linux-crisv32-low.c: Fix compile errors.
9083
918d227b
YQ
90842012-09-04 Yao Qi <yao@codesourcery.com>
9085
9086 * tracepoint.c (cmd_qtsv): Adjust debug message.
9087 Don't check CUR_TPOINT.
9088
18c1b81a
YQ
90892012-08-28 Yao Qi <yao@codesourcery.com>
9090
9091 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9092 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9093 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9094 Remove declarations of xmalloc, xreallloc, xstrdup and
9095 freeargv.
9096 * Makefile.in (libiberty_h): New.
9097 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9098 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9099
dc82f37b
YQ
91002012-08-23 Yao Qi <yao@codesourcery.com>
9101
9102 * server.h: Remove declaration of 'xsnprintf'.
9103
406b1477
KS
91042012-08-22 Keith Seitz <keiths@redhat.com>
9105
9106 * server.h: Include build-gnulib-gbserver/config.h.
9107 * gdbreplay.c: Likewise.
9108
e6712ff1
DE
91092012-08-08 Doug Evans <dje@google.com>
9110
9111 * Makefile.in (SFILES): Add gdb_vecs.c.
9112 (OBS): Add gdb_vecs.o.
9113 (gdb_vecs_h, host_defs_h): New variables.
9114 (thread-db.o): Add $(gdb_vecs_h) dependency.
9115 (gdb_vecs.o): New rule.
9116 * thread-db.c: #include "gdb_vecs.h".
9117 (thread_db_load_search): Use a vector to iterate over path elements.
9118 Handle text appearing after "$pdir".
9119
9120 * configure.ac: Add check for strstr.
9121 * config.in: Regenerate.
9122 * configure: Regenerate.
9123
7c3270ae
UW
91242012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9125
9126 * hostio.c (handle_pread): If pread fails, fall back to attempting
9127 lseek/read.
9128 (handle_pwrite): Likewise for pwrite.
9129
b62e2b27
UW
91302012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9131
9132 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9133 between unsupported TYPE and unimplementable ADDR/LEN combination.
9134 (arm_insert_point): Act on new return value.
9135
78a99e91
PA
91362012-07-31 Pedro Alves <palves@redhat.com>
9137
9138 * server.c (process_point_options): Only skip tokens if we find
9139 one that is unrecognized. Don't treat 'X' specially while
9140 skipping unrecognized tokens.
9141
fcf303ab
UW
91422012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9143
9144 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9145 to 4-byte-align HW breakpoint addresses for Thumb.
9146
7255706c
YQ
91472012-07-27 Yao Qi <yao@codesourcery.com>
9148
9149 PR remote/14161.
9150
9151 * server.h: Declare gdb_agent_about_to_close.
9152 * target.c (kill_inferior): Include "agent.h".
9153 New. Send command 'kill'.
9154 * target.h (kill_inferior): Removed macro.
9155 * tracepoint.c (gdb_agent_about_to_close): New.
9156 (gdb_agent_helper_thread): Handle command 'close'.
9157 Wait endlessly until the inferior stops.
9158 Install gdb_agent_remove_socket to atexit hook.
9159 (agent_socket_name): New static variable.
9160 (gdb_agent_socket_init): Replace local variable 'name' with
9161 'agent_socket_name'.
9162 (gdb_agent_remove_socket): New.
9163
5a3f286f
YQ
91642012-07-27 Yao Qi <yao@codesourcery.com>
9165
9166 * server.c (process_point_options): Stop at 'X' when parsing.
9167
961bd387
ME
91682012-07-19 Michael Eager <eager@eagercon.com>
9169
a261b8f5 9170 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9171 to hw_execute.
9172 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9173 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9174 hardware breakpoint.
9175
aa7c7447
JK
91762012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9177
9178 * gdbserver/linux-low.c (initialize_low): Call
9179 linux_ptrace_init_warnings.
9180
7f216e7c
DE
91812012-07-02 Doug Evans <dje@google.com>
9182
9183 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9184 pointer to int.
9185
d3ce09f5
SS
91862012-07-02 Stan Shebs <stan@codesourcery.com>
9187
9188 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9189 (ax.o): Add it to build rule.
9190 (ax-ipa.o): Ditto.
9191 (OBS): Add format.o.
9192 (IPA_OBS): Add format.o.
9193 * server.c (handle_query): Claim support for breakpoint commands.
9194 (process_point_options): Add command case.
9195 (process_serial_event): Leave running if there are printfs in
9196 effect.
9197 * mem-break.h (any_persistent_commands): Declare.
9198 (add_breakpoint_commands): Declare.
9199 (gdb_no_commands_at_breakpoint): Declare.
9200 (run_breakpoint_commands): Declare.
9201 * mem-break.c (struct point_command_list): New struct.
9202 (struct breakpoint): New field command_list.
9203 (any_persistent_commands): New function.
9204 (add_commands_to_breakpoint): New function.
9205 (add_breakpoint_commands): New function.
9206 (gdb_no_commands_at_breakpoint): New function.
9207 (run_breakpoint_commands): New function.
9208 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9209 locally.
9210 * ax.c: Include format.h.
9211 (ax_printf): New function.
9212 (gdb_eval_agent_expr): Add printf opcode.
9213
2f8f6aed
YQ
92142012-06-13 Yao Qi <yao@codesourcery.com>
9215
9216 * server.c (start_inferior): Remove duplicated writes to fields
9217 'last_resume_kind' and 'last_status' of 'current_inferior'.
9218
0c9070b3
YQ
92192012-06-12 Yao Qi <yao@codesourcery.com>
9220 Pedro Alves <palves@redhat.com>
9221
9222 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9223 comment.
9224 * server.c (handle_v_cont): Extend comment.
9225
c52daf70
YQ
92262012-06-11 Yao Qi <yao@codesourcery.com>
9227
9228 * linux-low.c (linux_attach): Add 'static'.
9229
d38bbb0a
YQ
92302012-06-06 Yao Qi <yao@codesourcery.com>
9231
9232 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9233
89dc0afd
JK
92342012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9235
9236 Fix gcc -flto compilation warning.
9237 * server.c (main): Make variable multi_mode and attach volatile.
9238
75f62ce7
TJB
92392012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9240
9241 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9242 if the platform doesn't know about it.
9243
65f479b6
PA
92442012-05-30 Jeff Kenton <jkenton@tilera.com>
9245
9246 * Makefile.in (SFILES): Add linux-tile-low.c.
9247 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9248 * configure.srv: Handle tilegx-*-linux*.
9249 * linux-tile-low.c: New file.
9250
0c5bf5a9
JK
92512012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9252
9253 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9254
a493e3e2
PA
92552012-05-24 Pedro Alves <palves@redhat.com>
9256
9257 PR gdb/7205
9258
43aaf8b6 9259 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9260
2ea28649
PA
92612012-05-24 Pedro Alves <palves@redhat.com>
9262
9263 PR gdb/7205
9264
9265 Replace target_signal with gdb_signal throughout.
9266
8d409d16
MR
92672012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9268
9269 * linux-low.c (linux_store_registers): Avoid the copying sequence
9270 when no data has been retrieved by ptrace.
9271
23512c01
MGD
92722012-05-22 Will Deacon <will.deacon@arm.com>
9273
9274 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9275 Include asm/ptrace.h.
9276 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9277 already defined.
9278
4934b29e
MR
92792012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9280
9281 * linux-low.c (linux_store_registers): Don't re-retrieve data
9282 with ptrace that has already been obtained from /proc. Always
9283 copy any data retrieved with ptrace to the buffer supplied.
9284
bde24c0a
PA
92852012-05-11 Yao Qi <yao@codesourcery.com>
9286 Pedro Alves <palves@redhat.com>
9287
9288 * linux-low.c (enum stopping_threads_kind): New.
9289 (stopping_threads): Change type to `enum stopping_threads_kind'.
9290 (handle_extended_wait): If stopping and suspending threads, leave
9291 the new_lwp suspended too.
9292 (linux_wait_for_event): Adjust.
9293 (stop_all_lwps): Set `stopping_threads' to
9294 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9295 whether we're suspending threads or just stopping them. Assert no
9296 recursion happens.
9297
623b6bdf
YQ
92982012-04-29 Yao Qi <yao@codesourcery.com>
9299
9300 * server.h: Move some code to ...
9301 * gdbthread.h: ... here. New.
9302 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9303 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9304 (nto-low.o, win32-low.o): Likewise.
9305 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9306 * regcache.c, remote-utils.c, server.c: Likewise.
9307 * target.c, tracepoint.c, win32-low.c: Likewise.
9308
f15f9948
TJB
93092012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9310
9311 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9312 (PTRACE_ARG4_TYPE): Likewise.
9313 (PTRACE_XFER_TYPE): Likewise.
9314 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9315 ptrace to PTRACE_ARG3_TYPE.
9316 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9317 (PTRACE_ARG4_TYPE): Likewise.
9318 (PTRACE_XFER_TYPE): Likewise.
9319 (linux_detach_one_lwp): Cast fourth argument of
9320 ptrace to long then PTRACE_ARG4_TYPE.
9321 (regsets_fetch_inferior_registers): Cast third argument of
9322 ptrace to long then PTRACE_ARG3_TYPE.
9323 (regsets_store_inferior_registers): Likewise.
9324
38ea300a
PA
93252012-04-20 Pedro Alves <palves@redhat.com>
9326
9327 * configure: Regenerate.
9328
c971b7fa
PA
93292012-04-19 Pedro Alves <palves@redhat.com>
9330
43aaf8b6 9331 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9332 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9333 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9334 (all, install-only, uninstall, clean-info, all-lib, clean): No
9335 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9336 (maintainer-clean realclean distclean): Use subdir_do.
9337 (subdir_do): New.
9338 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9339 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9340 * acinclude.m4: Include acx_configure_dir.m4.
9341 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9342 calls. Call AC_PROG_RANLIB. Configure gnulib using
9343 ACX_CONFIGURE_DIR.
9344 (GNULIB): New.
9345 (GNULIB_STDINT_H): Adjust.
9346 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9347 * gdbreplay.c: Include build-gnulib/config.h.
9348 * server.h: Likewise.
9349 * aclocal.m4: Regenerate.
9350 * config.in: Regenerate.
9351 * configure: Regenerate.
c971b7fa 9352
809277f8
PA
93532012-04-19 Pedro Alves <palves@redhat.com>
9354
9355 * Makefile.in (LIBGNU, INCGNU): Adjust.
9356 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9357 (all, install-only, uninstall, clean-info, all-lib, clean)
9358 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9359 * configure.ac: Adjust AC_OUTPUT output.
9360 * aclocal.m4: Regenerate.
9361 * configure: Regenerate.
9362
fd9bb8b8
PA
93632012-04-19 Pedro Alves <palves@redhat.com>
9364
9365 * Makefile.in (generated_files): New.
9366 (server_h): Remove the explicit dependency on config.h, and depend
9367 on $generated_files.
9368
1c298c66
PA
93692012-04-19 Pedro Alves <palves@redhat.com>
9370
9371 * Makefile.in (INCGNU): Add -Ignulib.
9372
57c4b50b
PA
93732012-04-19 Pedro Alves <palves@redhat.com>
9374
9375 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9376 (INCGNU): ... this, and spell out -I here.
9377 (GNULIB_LIB): Rename to ...
9378 (LIBGNU): ... this.
9379 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9380
1030e047
PA
93812012-04-19 Pedro Alves <palves@redhat.com>
9382
9383 * config.in: Regenerate.
9384
447d4319
PA
93852012-04-19 Pedro Alves <palves@redhat.com>
9386
9387 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9388 * server.h (memmem): Remove declaration.
9389 * config.in: Regenerate.
9390 * configure: Regenerate.
9391
aad9eab9
YQ
93922012-04-19 Yao Qi <yao@codesourcery.com>
9393
9394 * Makefile.in (SFILES): Add common/vec.c.
9395 (OBS): Add vec.o.
9396 (vec.o): New rule.
9397
3e10640f
YQ
93982012-04-19 Yao Qi <yao@codesourcery.com>
9399
9400 * remote-utils.c (prepare_resume_reply): Replace with macro
9401 target_core_of_thread.
9402 * server.c (handle_qxfer_threads_proper): Likewise.
9403 * target.h (traget_core_of_thread): New macro.
9404
71622373
PA
94052012-04-18 Pedro Alves <palves@redhat.com>
9406
9407 * aclocal.m4: Regenerate.
9408 * configure: Regenerate.
9409
80d26939
YQ
94102012-04-16 Yao Qi <yao@codesourcery.com>
9411
9412 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9413 duplicated on address.
9414
42476b70
YQ
94152012-04-16 Yao Qi <yao@codesourcery.com>
9416
9417 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9418 (struct tracepoint_action_ops) <send>: New field.
9419 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9420 (agent_expr_send, x_tracepoint_action_send): New.
9421 (l_tracepoint_action_send): New.
9422 (cmd_qtdp): Download and install tracepoint
9423 according to `use_agent'.
9424 (run_inferior_command): Add one more parameter `len'.
9425 Update callers.
9426 (tracepoint_send_agent): New.
9427 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9428
7bc83639
YQ
94292012-04-16 Yao Qi <yao@codesourcery.com>
9430
9431 * tracepoint.c (download_tracepoints): Moved to ...
9432 (cmd_qtstart): ... here.
9433
5f18041e
YQ
94342012-04-14 Yao Qi <yao@codesourcery.com>
9435
9436 * tracepoint.c: Include inttypes.h.
9437 (struct collect_memory_action): Use sized types.
9438 (struct tracepoint): Likewise.
9439 (cmd_qtdp, stop_tracing): Update print specifiers.
9440 (cmd_qtp, response_tracepoint): Likewise.
9441 (collect_data_at_tracepoint): Likewise.
9442 (collect_data_at_step): Likewise.
9443
55a8c076
YQ
94442012-04-14 Yao Qi <yao@codesourcery.com>
9445
9446 Import gnulib module inttypes.
9447 * aclocal.m4, config.in, configure: Regenerated.
9448
dc750257
YQ
94492012-04-14 Yao Qi <yao@codesourcery.com>
9450
9451 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9452 Makefile and config.status at last.
9453
0ab5faf9
YQ
94542012-04-13 Yao Qi <yao@codesourcery.com>
9455
9456 * tracepoint.c: Include stdint.h unconditionally.
9457
18f5fd81
TJB
94582012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9459
9460 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9461 on BFD_HAVE_SYS_PROCFS_TYPE.
9462 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9463 * configure: Regenerate.
9464 * config.in: Likewise.
9465
4d47af5c
L
94662012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9467
9468 * Makefile.in (clean): Also remove x32.c x32-linux.c
9469 x32-avx.c x32-avx-linux.c.
9470 (x32.o): New target.
9471 (x32.c): Likewise.
9472 (x32-linux.o): Likewise.
9473 (x32-linux.c): Likewise.
9474 (x32-avx.o): Likewise.
9475 (x32-avx.c): Likewise.
9476 (x32-avx-linux.o): Likewise.
9477 (x32-avx-linux.c): Likewise.
9478
9479 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9480 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9481 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9482 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9483 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9484 i386/x32-avx-linux.xml.
9485
9486 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9487 (init_registers_x32_avx_linux): Likwise.
9488 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9489 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9490
ecedbe58
PA
94912012-04-13 Pedro Alves <palves@redhat.com>
9492
9493 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9494 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9495 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9496 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9497 the sub-make.
9498
c92b5177
L
94992012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9500
9501 * linux-x86-low.c (compat_x32_clock_t): New.
9502 (compat_x32_siginfo_t): Likewise.
9503 (compat_x32_siginfo_from_siginfo): Likewise.
9504 (siginfo_from_compat_x32_siginfo): Likewise.
9505 (linux_is_elf64): Likewise.
9506 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9507 and siginfo_from_compat_x32_siginfo for x32.
9508 (x86_arch_setup): Set linux_is_elf64.
9509
214d508e
L
95102012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9511
9512 PR gdb/13969
9513 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9514 e_machine field.
9515 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9516 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9517 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9518 compatible with process.
9519
c9a1864a
YQ
95202012-04-12 Yao Qi <yao@codesourcery.com>
9521
9522 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9523 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9524 (install-only, install-info, clean): Handle sub dir gnulib.
9525 (all-lib, am--refresh): New targets.
9526 (memmem.o): Remove target.
9527 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9528 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9529 (AC_REPLACE_FUNCS): Remove memmem.
9530 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9531 (AC_OUTPUT): Generate Makefile in gnulib/.
9532 * aclocal.m4, config.in, configure: Regenerated.
9533
367ba2c2
MR
95342012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9535
9536 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9537
9d236627
PA
95382012-04-05 Pedro Alves <palves@redhat.com>
9539
9540 -Werror=strict-aliasing
9541
9542 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9543 pointer.
9544
111217b3
PA
95452012-04-04 Pedro Alves <palves@redhat.com>
9546
9547 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9548 (sparc_store_gregset_from_stack, sparc_store_gregset)
9549 (sparc_breakpoint_at): Fix formatting.
9550
8365dcf5
TJB
95512012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9552
9553 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9554 are available.
9555 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9556 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9557 * config.in: Regenerate.
9558 * configure: Likewise.
9559
689cc2ae
PA
95602012-03-29 Pedro Alves <palves@redhat.com>
9561
9562 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9563 Correct ptrace arguments.
9564
c14dfd32
PA
95652012-03-28 Pedro Alves <palves@redhat.com>
9566
9567 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9568 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9569 (IA64_FR1_REGNUM): New defines.
9570 (ia64_fetch_register): New.
9571 (the_low_target): Install it.
9572 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9573 field.
9574 * linux-low.c (linux_fetch_registers): Try the
9575 the_low_target.fetch_register hook first.
9576
9577 * linux-arm-low.c (the_low_target): Adjust.
9578 * linux-bfin-low.c (the_low_target): Adjust.
9579 * linux-cris-low.c (the_low_target): Adjust.
9580 * linux-crisv32-low.c (the_low_target): Adjust.
9581 * linux-m32r-low.c (the_low_target): Adjust.
9582 * linux-m68k-low.c (the_low_target): Adjust.
9583 * linux-mips-low.c (the_low_target): Adjust.
9584 * linux-ppc-low.c (the_low_target): Adjust.
9585 * linux-s390-low.c (the_low_target): Adjust.
9586 * linux-sh-low.c (the_low_target): Adjust.
9587 * linux-sparc-low.c (the_low_target): Adjust.
9588 * linux-tic6x-low.c (the_low_target): Adjust.
9589 * linux-x86-low.c (the_low_target): Adjust.
9590 * linux-xtensa-low.c (the_low_target): Adjust.
9591
63c88e13
PA
95922012-03-26 Pedro Alves <palves@redhat.com>
9593
9594 * server.c (handle_qxfer_libraries): Don't bail early if
9595 the_target->qxfer_libraries_svr4 is not NULL.
9596
fb723180
PA
95972012-03-26 Pedro Alves <palves@redhat.com>
9598
9599 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9600
0afae3cf
PA
96012012-03-23 Pedro Alves <palves@redhat.com>
9602
9603 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9604 "library-list-svr4" element's start tag when the the DSO list is
9605 empty.
9606
485f1ee4
PA
96072012-03-23 Pedro Alves <palves@redhat.com>
9608
9609 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9610 a variable whose type size is the same as the inferior's pointer
9611 size.
9612
a5362b9a
TS
96132012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9614
9615 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9616 struct siginfo.
9617 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9618 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9619 * linux-low.h: Include <signal.h>.
9620 (struct siginfo): Remove forward declaration.
9621 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9622 struct siginfo.
9623
d226c142
MF
96242012-03-21 Mike Frysinger <vapier@gentoo.org>
9625
9626 * .gitignore: Ignore more files.
9627
122f36ef
PA
96282012-03-19 Pedro Alves <palves@redhat.com>
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9630
9631 * server.c (cont_thread, general_thread): Add describing comments.
9632 (start_inferior): Clear `cont_thread'.
9633 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9634 of a process.
9635
fc3e5175
YQ
96362012-03-15 Yao Qi <yao@codesourcery.com>
9637
9638 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9639 handling to ...
9640 (cmd_qtdp): ... here.
9641
8d0d92cd
YQ
96422012-03-15 Yao Qi <yao@codesourcery.com>
9643
9644 * tracepoint.c (struct tracepoint_action_ops): New.
9645 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9646 (m_tracepoint_action_download): New.
9647 (r_tracepoint_action_download): New.
9648 (x_tracepoint_action_download): New.
9649 (l_tracepoint_action_download): New.
9650 (add_tracepoint_action): Install `action->ops' according type.
9651 (download_tracepoint_1): Move code `download' function pointer
9652 of various tracepoint_action_ops.
9653
87b0bb13
JK
96542012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9657 linux_ptrace_attach_warnings.
9658
5f572dec
JK
96592012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9660
9661 * Makefile.in (linux-ptrace.o): New.
9662 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9663 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9664 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9665 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9666 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9667 of these targets.
9668 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9669
f4647387
YQ
96702012-03-08 Yao Qi <yao@codesourcery.com>
9671 Pedro Alves <palves@redhat.com>
9672
9673 Fix PR server/13392.
9674 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9675 offset of JMP insn.
9676 * tracepoint.c (remove_tracepoint): New.
9677 (cmd_qtdp): Call remove_tracepoint when failed to install.
9678
9b224c5e
PA
96792012-03-07 Pedro Alves <palves@redhat.com>
9680
9681 * linux-low.c (get_detach_signal): New.
9682 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9683 Pass on pending signals to PTRACE_DETACH. Check the result of the
9684 ptrace call.
9685 * server.c (program_signals, program_signals_p): New.
9686 (handle_general_set): Handle QProgramSignals.
9687 * server.h (program_signals, program_signals_p): Declare.
9688
e237a7e2
JK
96892012-03-05 Pedro Alves <palves@redhat.com>
9690 Jan Kratochvil <jan.kratochvil@redhat.com>
9691
9692 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9693 New comment why.
9694
5808517f
YQ
96952012-03-03 Yao Qi <yao@codesourcery.com>
9696
9697 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9698 agent_look_up_symbols.
9699
58b4daa5
YQ
97002012-03-03 Yao Qi <yao@codesourcery.com>
9701
9702 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9703 (linux-x86-low.o): Likewise.
9704 * server.h: Remove in_process_agent_loaded.
9705 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9706 common/agent.c.
9707 Update callers.
9708
8ffcbaaf
YQ
97092012-03-03 Yao Qi <yao@codesourcery.com>
9710
9711 * tracepoint.c (gdb_agent_capability): New global.
9712 (in_process_agent_loaded_ust): Renamed to
9713 `in_process_agent_supports_ust'.
9714 Update callers.
9715 (in_process_agent_supports_ust): Call agent_capability_check.
9716 (clear_installed_tracepoints): Assert that agent supports
9717 agent.
9718
d1feda86
YQ
97192012-03-03 Yao Qi <yao@codesourcery.com>
9720
9721 * linux-low.c (linux_supports_agent): New.
9722 (linux_target_ops): Initialize field `supports_agent' with
9723 linux_supports_agent.
9724 * target.h (struct target_ops) <supports_agent>: New.
9725 (target_supports_agent): New macro.
9726 * server.c (handle_general_set): Handle packet 'QAgent'.
9727 (handle_query): Send `QAgent+'.
9728 * Makefile.in (server.o): Depends on agent.h.
9729
2fa291ac
YQ
97302012-03-03 Yao Qi <yao@codesourcery.com>
9731
9732 * Makefile.in (OBS): Add agent.o.
9733 Add new rule for agent.o.
9734 Track dependence of tracepoint.c on agent.h.
9735 * tracepoint.c (run_inferior_command_1):
9736 (run_inferior_command): Call agent_run_command.
9737 (gdb_ust_connect_sync_socket): Deleted. Move it to
9738 common/agent.c.
9739 (resume_thread, stop_thread): Likewise.
9740 (gdb_ust_socket_init): Renamed to ...
9741 (gdb_agent_socket_init): ... New.
9742 (gdb_ust_thread): Renamed to ...
9743 (gdb_agent_helper_thread): ... New.
9744 (gdb_ust_init): Move some code to ...
9745 (gdb_agent_init): ... here. New.
9746 [HAVE_UST]: Call gdb_ust_init.
9747 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9748 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9749 * config.in, configure: Regenerated.
9750
05044653
PA
97512012-03-02 Pedro Alves <palves@redhat.com>
9752
9753 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9754 * linux-low.c (struct simple_pid_list): New.
9755 (stopped_pids): New a struct simple_pid_list pointer.
9756 (add_to_pid_list, pull_pid_from_list): New.
9757 (handle_extended_wait): Don't assume the first signal new children
9758 report is SIGSTOP. Adjust call to pull_pid_from_list.
9759 (linux_wait_for_lwp): Adjust.
9760
8d00225b
YQ
97612012-03-02 Yao Qi <yao@codesourcery.com>
9762
9763 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9764 debug log.
9765
19560ba5
YQ
97662012-03-02 Yao Qi <yao@codesourcery.com>
9767
9768 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9769 `stop_pc' and `tpoint'. Update caller.
9770
1faeff08
MR
97712012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9772
9773 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9774 * linux-low.c (use_linux_regsets): New macro.
9775 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9776 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9777 (linux_register_in_regsets): New function.
9778 (usr_fetch_inferior_registers): Skip registers covered by
9779 regsets.
9780 (usr_store_inferior_registers): Likewise.
9781 (usr_fetch_inferior_registers): New macro.
9782 (usr_store_inferior_registers): Likewise.
9783 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9784 (linux_store_registers): Likewise.
9785 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9786 prototype.
9787 (init_registers_mips64_dsp_linux): Likewise.
9788 (init_registers_mips_linux): New macro.
9789 (init_registers_mips_dsp_linux): Likewise.
9790 (mips_dsp_num_regs): Likewise.
9791 (DSP_BASE, DSP_CONTROL): New fallback macros.
9792 (mips_base_regs): New macro.
9793 (mips_regmap): Use it. Fix the size.
9794 (mips_dsp_regmap): New variable.
9795 (mips_dsp_regset_bitmap): Likewise.
9796 (mips_arch_setup): New function.
9797 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9798 than mips_regmap.
9799 (mips_cannot_store_register): Likewise.
9800 (the_low_target): Update .arch_setup, .num_regs and .regmap
9801 initializers. Add .regset_bitmap initializer.
9802 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9803 initializer.
9804 * linux-bfin-low.c (the_low_target): Likewise.
9805 * linux-cris-low.c (the_low_target): Likewise.
9806 * linux-crisv32-low.c (the_low_target): Likewise.
9807 * linux-ia64-low.c (the_low_target): Likewise.
9808 * linux-m32r-low.c (the_low_target): Likewise.
9809 * linux-m68k-low.c (the_low_target): Likewise.
9810 * linux-ppc-low.c (the_low_target): Likewise.
9811 * linux-s390-low.c (the_low_target): Likewise.
9812 * linux-sh-low.c (the_low_target): Likewise.
9813 * linux-sparc-low.c (the_low_target): Likewise.
9814 * linux-tic6x-low.c (the_low_target): Likewise.
9815 * linux-x86-low.c (the_low_target): Likewise.
9816 * linux-xtensa-low.c (the_low_target): Likewise.
9817 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9818 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9819 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9820 srv_xmlfiles.
9821 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9822 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9823
c03e6ccc
YQ
98242012-02-29 Yao Qi <yao@codesourcery.com>
9825 Pedro Alves <palves@redhat.com>
9826
9827 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9828 `step_over_finished' is true.
9829
644cebc9
PA
98302012-02-27 Pedro Alves <palves@redhat.com>
9831
9832 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9833 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9834
c14d7ab2
PA
98352012-02-27 Pedro Alves <palves@redhat.com>
9836
9837 PR server/9684
9838 * linux-low.c (pid_is_stopped): New.
9839 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9840
412c89dd
LM
98412012-02-25 Luis Machado <lgustavo@codesourcery.com>
9842
9843 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9844 of conditions.
9845
b745defe
MR
98462012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9847
9848 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9849
9f3a5c85
LM
98502012-02-24 Luis Machado <lgustavo@codesourcery>
9851
9852 * server.c (handle_query): Advertise support for target-side
9853 breakpoint condition evaluation.
9854 (process_point_options): New function.
9855 (process_serial_event): When inserting a breakpoint, check for
9856 a target-side condition that should be evaluated.
9857
9858 * mem-break.c: Include regcache.h and ax.h.
9859 (point_cond_list_t): New data structure.
9860 (breakpoint) <cond_list>: New field.
9861 (find_gdb_breakpoint_at): Make non-static.
9862 (delete_gdb_breakpoint_at): Clear any target-side
9863 conditions.
9864 (clear_gdb_breakpoint_conditions): New function.
9865 (add_condition_to_breakpoint): Likewise.
9866 (add_breakpoint_condition): Likewise.
9867 (gdb_condition_true_at_breakpoint): Likewise.
9868 (gdb_breakpoint_here): Return result directly instead
9869 of going through a local variable.
9870
9871 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9872 (clear_gdb_breakpoint_conditions): Likewise.
9873 (add_breakpoint_condition): Likewise.
9874 (gdb_condition_true_at_breakpoint): Likewise.
9875
9876 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9877 (need_step_over_p): Take target-side breakpoint condition into
9878 consideration.
9879
5e1dc496
LM
98802012-02-24 Luis Machado <lgustavo@codesourcery>
9881
9882 * server.h: Include tracepoint.h.
9883 (agent_mem_read, agent_get_trace_state_variable_value,
9884 agent_set_trace_state_variable_value,
9885 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9886 get_set_tsv_func_addr): New prototypes.
9887
9888 * ax.h: New include file.
9889 * ax.c: New source file.
9890
9891 * tracepoint.c: Include ax.h.
9892 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9893 agent_expr, eval_result_type): Move to ax.h.
9894 (parse_agent_expr): Rename to ...
9895 (gdb_parse_agent_expr): ... this, make it non-static and move
9896 to ax.h.
9897 (unparse_agent_expr) Rename to ...
9898 (gdb_unparse_agent_expr): ... this, make it non-static and move
9899 to ax.h.
9900 (eval_agent_expr): Rename to ...
9901 (eval_tracepoint_agent_expr): ... this.
9902 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9903 forward declarations.
9904 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9905 (agent_get_trace_state_variable_value): New function.
9906 (agent_set_trace_state_variable_value): New function.
9907 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9908 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9909 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9910 (condition_true_at_tracepoint): Likewise.
9911 (parse_agent_expr): Rename to ...
9912 (gdb_parse_agent_expr): ... this and move to ax.c.
9913 (unparse_agent_expr): Rename to ...
9914 (gdb_unparse_agent_expr): ... this and move to ax.c.
9915 (gdb_agent_op_name): Move to ax.c.
9916 (eval_agent_expr): Rename to ...
9917 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9918 and move to ax.c.
9919 (eval_tracepoint_agent_expr): New function.
9920 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9921 non-static.
5e1dc496
LM
9922 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9923 ax.c.
9924 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9925 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9926 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9927 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9928 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9929 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9930 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9931 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9932 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9933 (compile_bytecodes): Remove forward declaration.
9934 (is_goto_target): Move to ax.c.
9935 (compile_bytecodes): Move to ax.c and call
9936 agent_get_trace_state_variable_value (...) and
9937 agent_set_trace_state_variable_value (...).
9938
9939 * Makefile.in: Update ax.c and IPA dependencies.
9940
277e4e52
PA
99412012-02-24 Pedro Alves <palves@redhat.com>
9942
9943 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9944 (cmd_bigqtbuffer_circular): ... this. Only handle
9945 'QTBuffer:circular:'.
9946 (handle_tracepoint_general_set): Adjust.
9947
bf4c19f7
YQ
99482012-02-16 Yao Qi <yao@codesourcery.com>
9949
9950 * inferiors.c: Move code to ...
9951 * dll.c: .... here. New.
9952 * server.h: Declare clear_dlls.
9953 * Makefile.in (SFILES): Add dll.c.
9954 (OBS): Add dll.o
9955 (dll.o): New rule.
9956
d73f2619
YQ
99572012-02-11 Yao Qi <yao@codesourcery.com>
9958
9959 * server.c: (handle_monitor_command): Add a new parameter
9960 `own_buf'.
9961 (handle_query): Update caller.
9962
f8255c2a
JB
99632012-02-09 Joel Brobecker <brobecker@adacore.com>
9964
9965 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9966 * configure, config.in: Regenerate.
9967 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9968 is not defined.
9969
da84f473
PA
99702012-02-02 Pedro Alves <palves@redhat.com>
9971
9972 Try SIGKILL first, then PTRACE_KILL.
9973 * linux-low.c (linux_kill_one_lwp): New.
9974 (linux_kill_one_lwp): Rename to ...
9975 (kill_one_lwp_callback): ... this. Use the new
9976 linux_kill_one_lwp.
9977
e886a173
PA
99782012-02-02 Pedro Alves <palves@redhat.com>
9979
9980 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9981 inferior.
9982
be07f1a2
PA
99832012-01-27 Pedro Alves <palves@redhat.com>
9984
9985 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9986 (elf_64_file_p): Make static.
9987 (linux_pid_exe_is_elf_64_file): New.
9988 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9989 Delete declarations.
9990 (linux_pid_exe_is_elf_64_file): Declare.
9991 * linux-x86-low.c (x86_arch_setup): Use
9992 linux_pid_exe_is_elf_64_file.
9993
d8301ad1
JK
99942012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9995
9996 * linux-low.c (linux_wait_for_event_1): Rename to ...
9997 (linux_wait_for_event): ... here and merge it with former
9998 linux_wait_for_event - new variable wait_ptid, use it.
9999 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10000
01b17894
PA
100012012-01-23 Pedro Alves <palves@redhat.com>
10002
10003 * server.c (main): Avoid yet another case of infinite loop while
10004 detaching/killing after a longjmp.
10005
e825046f
JK
100062012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10007
10008 Code cleanup.
10009 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10010
b9e7b9c3
UW
100112012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10012
10013 * hostio.c (handle_readlink): New function.
10014 (handle_vFile): Call it to handle "vFile:readlink" packets.
10015
901f9912
UW
100162012-01-20 Pedro Alves <palves@redhat.com>
10017 Ulrich Weigand <ulrich.weigand@linaro.org>
10018
10019 * server.c (handle_v_requests): Only support vAttach and vRun to
10020 start multiple processes when in extended protocol mode.
10021
fc1ab1a0
PA
100222012-01-17 Pedro Alves <palves@redhat.com>
10023
10024 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10025 memalign plus mprotect to allocate the scratch buffer.
10026
7d5d4e98
PA
100272012-01-13 Pedro Alves <palves@redhat.com>
10028
10029 * server.c (attach_inferior): Clear `cont_thread'.
10030
f128d5e9
PA
100312012-01-13 Pedro Alves <palves@redhat.com>
10032
10033 * server.c (main): Avoid infinite loop while detaching/killing
10034 after a longjmp.
10035
06db92f0
DE
100362012-01-09 Doug Evans <dje@google.com>
10037
10038 * server.c (start_inferior): Set last_ptid in --wrapper case.
10039
32d92999
YQ
100402012-01-06 Yao Qi <yao@codesourcery.com>
10041
10042 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10043 defined.
10044 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10045
5e0a92a9
YQ
100462012-01-04 Yao Qi <yao@codesourcery.com>
10047
10048 * tracepoint.c (cmd_qtdp): Print debug message
10049 for static tracepoint.
10050
ae639e8c
YQ
100512012-01-04 Yao Qi <yao@codesourcery.com>
10052
10053 * tracepoint.c (trace_vdebug): Differentiate debug message
10054 between gdbserver and IPA.
10055
f72429c5
YQ
100562012-01-03 Yao Qi <yao@codesourcery.com>
10057
10058 * tracepoint.c (tracepoint_was_hit): Don't collect for
10059 static tracepoint.
10060
12c3e59c
JB
100612012-01-02 Joel Brobecker <brobecker@adacore.com>
10062
10063 * terminal.h: Reformat copyright header.
10064
67827812
JB
100652012-01-02 Joel Brobecker <brobecker@adacore.com>
10066
10067 * server.c (gdbserver_version): Update copyright year.
10068 * gdbreplay.c (gdbreplay_version): Likewise.
10069
3e52c33d
JK
100702011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10071
10072 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10073
10074 Revert:
10075 2011-12-18 Hui Zhu <teawater@gmail.com>
10076 * linux-low.c (linux_create_inferior): Save return value to ret.
10077
66f1260e
HZ
100782011-12-18 Hui Zhu <teawater@gmail.com>
10079
10080 * linux-low.c (linux_create_inferior): Save return value to ret.
10081
e77616d7
DE
100822011-12-16 Doug Evans <dje@google.com>
10083
e7b06c57
DE
10084 * linux-low.c (linux_create_inferior): If stdio connection,
10085 redirect stdin from /dev/null, stdout to stderr.
10086 * remote-utils.c (remote_is_stdio): New static global.
10087 (remote_connection_is_stdio): New function.
10088 (remote_prepare): Handle stdio connection.
10089 (remote_open): Ditto.
10090 (remote_close): Don't close stdin for stdio connections.
10091 (read_prim,write_prim): New functions. Replace all calls to
10092 read/write to these.
10093 * server.c (main): Watch for "-" argument. Move call to
10094 remote_prepare before start_inferior.
10095 * server.h (STDIO_CONNECTION_NAME): New macro.
10096 (remote_connection_is_stdio): Declare.
10097
e77616d7
DE
10098 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10099 in debugging output.
10100
82067193
YQ
101012011-12-15 Yao Qi <yao@codesourcery.com>
10102
10103 * tracepoint.c: Include sys/syscall.h.
10104 (gdb_ust_thread): Remove preprocessor conditional.
10105
82bfbe7e
PA
101062011-12-14 Pedro Alves <pedro@codesourcery.com>
10107
10108 * linux-low.c (linux_detach_one_lwp): Call
10109 the_low_target.prepare_to_resume before detaching.
10110
712c6575
YQ
101112011-12-14 Yao Qi <yao@codesourcery.com>
10112
10113 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10114 of write.
10115
d54d1edf
YQ
101162011-12-14 Yao Qi <yao@codesourcery.com>
10117
10118 * i386-low.c (i386_low_stopped_data_address): Initialize local
10119 variable `control'.
10120
6210a125
PA
101212011-12-13 Pedro Alves <pedro@codesourcery.com>
10122
10123 PR remote/13492
10124
10125 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10126 DR_CONTROL unless necessary. Extend comments.
10127 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10128 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10129
2ece8244
YQ
101302011-12-13 Yao Qi <yao@codesourcery.com>
10131
10132 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10133 macros.
10134 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10135
784867a5
JK
101362011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10137
10138 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10139 Print new debug message for such case.
10140
6bf36717
JK
101412011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10142
10143 Fix overlapping memcpy.
10144 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10145 the read_inferior_memory transfer.
10146 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10147 write_inferior_memory transfer.
10148 (set_fast_tracepoint_jump): New variable buf. Use it for the
10149 read_inferior_memory and write_inferior_memory transfers.
10150 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10151 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10152 Use it for the write_inferior_memory transfer.
10153 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10154 buffers.
10155
50275556
MR
101562011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10157
10158 * linux-low.c (fetch_register, store_register): Make code
10159 consistent, fix formatting.
10160
7325beb4
MR
101612011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10162
10163 * linux-low.c (usr_store_inferior_registers): Factor out code
10164 to handle individual registers into...
10165 (store_register): ... this new function.
10166
c642a434
UW
101672011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10168
10169 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10170 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10171 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10172 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10173 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10174 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10175 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10176 (srv_xmlfiles): Add new XML files.
10177
10178 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10179 and <sys/uio.h>.
10180 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10181 (init_registers_s390_linux32v1): Add prototype.
10182 (init_registers_s390_linux32v2): Likewise.
10183 (init_registers_s390_linux64v1): Likewise.
10184 (init_registers_s390_linux64v2): Likewise.
10185 (init_registers_s390x_linux64v1): Likewise.
10186 (init_registers_s390x_linux64v2): Likewise.
10187 (s390_num_regs): Increment to 52.
10188 (s390_regmap): Add orig_r2 register.
10189 (s390_num_regs_3264): Increment to 68.
10190 (s390_regmap_3264): Add orig_r2 register.
10191 (s390_collect_ptrace_register): Handle orig_r2 register.
10192 (s390_supply_ptrace_register): Likewise.
10193 (s390_fill_last_break): New function.
10194 (s390_store_last_break): Likewise.
10195 (s390_fill_system_call): New function.
10196 (s390_store_system_call): Likewise.
10197 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10198 register sets.
10199 (s390_check_regset): New function.
10200 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10201 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10202 Update target_regsets for available register sets.
10203
2268b414
JK
102042011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10205 Jan Kratochvil <jan.kratochvil@redhat.com>
10206
10207 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10208 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10209 New.
10210 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10211 * linux-low.h (struct process_info_private): New member r_debug.
10212 * server.c (handle_qxfer_libraries): Call
10213 the_target->qxfer_libraries_svr4.
10214 (handle_qxfer_libraries_svr4): New function.
10215 (qxfer_packets): New entry "libraries-svr4".
10216 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10217 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10218 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10219 PACKET_qXfer_libraries_svr4.
10220
d6db1fab
UW
102212011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10222
10223 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10224 PSW address/mask between 8-byte and 16-byte formats.
10225 (s390_supply_ptrace_register): Likewise.
10226 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10227 basic addressing mode bit.
10228
242f5f1c
SS
102292011-11-24 Stan Shebs <stan@codesourcery.com>
10230
10231 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10232
f196051f
SS
102332011-11-17 Stan Shebs <stan@codesourcery.com>
10234
10235 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10236 (tracing_start_time): New global.
10237 (tracing_stop_time): New global.
10238 (tracing_user_name): New global.
10239 (tracing_notes): New global.
10240 (tracing_stop_note): New global.
10241 (cmd_qtstart): Set traceframe_usage, start_time.
10242 (stop_tracing): Set stop_time.
10243 (cmd_qtstatus): Report additional status.
10244 (cmd_qtp): New function.
10245 (handle_tracepoint_query): Call it.
10246 (cmd_qtnotes): New function.
10247 (handle_tracepoint_general_set): Call it.
10248 (get_timestamp): Rename from tsv_get_timestamp.
10249
405f8e94
SS
102502011-11-14 Stan Shebs <stan@codesourcery.com>
10251 Kwok Cheung Yeung <kcy@codesourcery.com>
10252
10253 * linux-x86-low.c (small_jump_insn): New.
10254 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10255 trampoline and error message, build a trampoline and issue a small
10256 jump instruction to it.
10257 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10258 trampoline and error message.
10259 (x86_get_min_fast_tracepoint_insn_len): New.
10260 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10261 * linux-low.h (struct linux_target_ops): Add arguments to
10262 install_fast_tracepoint_jump_pad operation, add new operation.
10263 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10264 arguments.
10265 (linux_get_min_fast_tracepoint_insn_len): New function.
10266 (linux_target_op): Add new operation.
10267 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10268 (gdb_trampoline_buffer_end): Ditto.
10269 (gdb_trampoline_buffer_error): Ditto.
10270 (struct ipa_sym_addresses): Add fields for new IPA variables.
10271 (symbol_list): Add entries for new IPA variables.
10272 (struct tracepoint): Add fields to hold the address range of the
10273 trampoline used by the tracepoint.
10274 (trampoline_buffer_head): New static variable.
10275 (trampoline_buffer_tail): Ditto.
10276 (claim_trampoline_space): New function.
10277 (have_fast_tracepoint_trampoline_buffer): New function.
10278 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10279 structure.
10280 (install_fast_tracepoint): Ditto, also add error buffer argument.
10281 (cmd_qtminftpilen): New function.
10282 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10283 (fast_tracepoint_from_trampoline_address): New function.
10284 (fast_tracepoint_collecting): Handle trampoline as part of jump
10285 pad space.
10286 (set_trampoline_buffer_space): New function.
10287 (initialize_tracepoint): Initialize new IPA variables.
10288 * target.h (struct target_ops): Add arguments to
10289 install_fast_tracepoint_jump_pad operation, add new
10290 get_min_fast_tracepoint_insn_len operation.
10291 (target_get_min_fast_tracepoint_insn_len): New.
10292 (install_fast_tracepoint_jump_pad): Add arguments.
10293 * server.h (IPA_BUFSIZ): Define.
10294 * linux-i386-ipa.c: Include extra header files.
10295 (initialize_fast_tracepoint_trampoline_buffer): New function.
10296 (initialize_low_tracepoint): Call it.
10297 * server.h (set_trampoline_buffer_space): Declare.
10298 (claim_trampoline_space): Ditto.
10299 (have_fast_tracepoint_trampoline_buffer): Ditto.
10300
1e4d1764
YQ
103012011-11-14 Yao Qi <yao@codesourcery.com>
10302
10303 * server.c (handle_query): Handle InstallInTrace for qSupported.
10304 * tracepoint.c (add_tracepoint): Sort list.
10305 (install_tracepoint, download_tracepoint): New.
10306 (cmd_qtdp): Call them to install and download tracepoints.
10307 (sort_tracepoints): Removed.
10308 (cmd_qtstart): Update.
10309
5c73ff4e
YQ
103102011-11-14 Yao Qi <yao@codesourcery.com>
10311
10312 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10313 * mem-break.h: Declare.
10314 * tracepoint.c (cmd_qtstart): Move some code to ...
10315 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10316 New.
10317 (download_tracepoints): Move some code to ...
10318 (download_tracepoint_1): ... here. New.
10319
86a30030
YQ
103202011-11-08 Yao Qi <yao@codesourcery.com>
10321
10322 * remote-utils.c (relocate_instruction): A comment fix.
10323
8d26e50c
JB
103242011-11-07 Joel Brobecker <brobecker@adacore.com>
10325
10326 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10327 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10328 dr_status_mirror and dr_control_mirror from debug_reg_state.
10329 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10330 (i386_initial_stuff): Remove use of deleted globals.
10331 (i386_get_thread_context, i386_set_thread_context,
10332 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10333 from debug_reg_state.
10334
a59306a3
YQ
103352011-11-05 Yao Qi <yao@codesourcery.com>
10336
10337 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10338 address as TPOINT's.
10339
3065dfb6
SS
103402011-11-02 Stan Shebs <stan@codesourcery.com>
10341
10342 * tracepoint.c (agent_mem_read_string): New function.
10343 (eval_agent_expr): Call it for tracenz.
10344 * server.c (handle_query): Report support for tracenz.
10345
fd0d8c7c
YQ
103462011-11-02 Yao Qi <yao@codesourcery.com>
10347
10348 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10349
609086b1
YQ
103502011-11-02 Yao Qi <yao@codesourcery.com>
10351
10352 * target.h: Fix a typo in comment.
10353
b9fd1791
PA
103542011-10-31 Pedro Alves <pedro@codesourcery.com>
10355
10356 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10357 clobber the breakpoints' shadows with fast tracepoint jumps.
10358 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10359 * target.c (write_inferior_memory): Also pass MYADDR down to
10360 check_mem_write.
10361
03583c20
UW
103622011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10363
10364 * configure.ac: Check support for personality routine.
10365 * configure: Regenerate.
10366 * config.in: Likewise.
10367 * linux-low.c: Include <sys/personality.h>.
10368 Define ADDR_NO_RANDOMIZE if necessary.
10369 (linux_create_inferior): Disable address space randomization when
10370 forking inferior, if requested.
10371 (linux_supports_disable_randomization): New function.
10372 (linux_target_ops): Install it.
10373 * server.h (disable_randomization): Declare.
10374 * server.c (disable_randomization): New global variable.
10375 (handle_general_set): Handle QDisableRandomization.
10376 (handle_query): Likewise for qSupported.
10377 (main): Support --disable-randomization and --no-disable-randomization
10378 command line arguments.
10379 * target.h (struct target_ops): Add supports_disable_randomization.
10380 (target_supports_disable_randomization): New macro.
10381
723b724b
MF
103822011-09-29 Mike Frysinger <vapier@gentoo.org>
10383
10384 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10385 ifdef check.
10386 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10387 [!PT_GETDSBT] (target_loadmap): New definition.
10388 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10389 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10390 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10391 and PT_GETDSBT to LINUX_LOADMAP.
10392 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10393 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10394
55329a5c 103952011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10396
10397 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10398 (arm_linux_hwbp_cap): New static variable.
10399 (arm_linux_get_hwbp_cap): Replace by ...
10400 (arm_linux_init_hwbp_cap): ... this new function.
10401 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10402 (arm_linux_get_hw_watchpoint_count): Likewise.
10403 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10404 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10405 (arm_prepare_to_resume): Use perror_with_name instead of error.
10406
55329a5c 104072011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10408
10409 * linux-arm-low.c: Include <signal.h>.
10410 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10411 (struct arm_linux_hwbp_cap): New data type.
10412 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10413 (struct arm_linux_hw_breakpoint): New data type.
10414 (MAX_BPTS, MAX_WPTS): Define.
10415 (struct arch_process_info, struct arch_lwp_info): New data types.
10416 (arm_linux_get_hwbp_cap): New function.
10417 (arm_linux_get_hw_breakpoint_count): Likewise.
10418 (arm_linux_get_hw_watchpoint_count): Likewise.
10419 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10420 (arm_hwbp_control_initialize): Likewise.
10421 (arm_hwbp_control_is_enabled): Likewise.
10422 (arm_hwbp_control_is_initialized): Likewise.
10423 (arm_hwbp_control_disable): Likewise.
10424 (arm_linux_hw_breakpoint_equal): Likewise.
10425 (arm_linux_hw_point_initialize): Likewise.
10426 (struct update_registers_data): New data structure.
10427 (update_registers_callback: New function.
10428 (arm_insert_point): Likewise.
10429 (arm_remove_point): Likewise.
10430 (arm_stopped_by_watchpoint): Likewise.
10431 (arm_stopped_data_address): Likewise.
10432 (arm_new_process): Likewise.
10433 (arm_new_thread): Likewise.
10434 (arm_prepare_to_resume): Likewise.
10435 (the_low_target): Register arm_insert_point, arm_remove_point,
10436 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10437 arm_new_thread, and arm_prepare_to_resume.
10438
6b9801d4
SS
104392011-09-15 Stan Shebs <stan@codesourcery.com>
10440
10441 * server.h (struct emit_ops): Add compare-goto fields.
10442 * tracepoint.c (gdb_agent_op_sizes): New table.
10443 (emit_eq_goto): New function.
10444 (emit_ne_goto): New function.
10445 (emit_lt_goto): New function.
10446 (emit_le_goto): New function.
10447 (emit_gt_goto): New function.
10448 (emit_ge_goto): New function.
10449 (is_goto_target): New function.
10450 (compile_bytecodes): Recognize special cases of compare-goto
10451 combinations and call specialized emitters for them.
10452 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10453 (amd64_emit_ne_goto): New function.
10454 (amd64_emit_lt_goto): New function.
10455 (amd64_emit_le_goto): New function.
10456 (amd64_emit_gt_goto): New function.
10457 (amd64_emit_ge_goto): New function.
10458 (amd64_emit_ops): Add the new functions.
10459 (i386_emit_eq_goto): New function.
10460 (i386_emit_ne_goto): New function.
10461 (i386_emit_lt_goto): New function.
10462 (i386_emit_le_goto): New function.
10463 (i386_emit_gt_goto): New function.
10464 (i386_emit_ge_goto): New function.
10465 (i386_emit_ops): Add the new functions.
10466
bf15cbda
SS
104672011-09-08 Stan Shebs <stan@codesourcery.com>
10468
10469 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10470 (i386_emit_epilogue): Restore %ebx.
10471
943ca1dd
JZ
104722011-08-31 Jie Zhang <jzhang918@gmail.com>
10473
10474 * server.c (step_thread): Remove definition.
10475 (process_serial_event): Don't handle Hs.
10476 * server.h (step_thread): Remove declaration.
10477 * target.c (set_desired_inferior): Remove use of step_thread.
10478
e3deef73
LM
104792011-08-24 Luis Machado <lgustavo@codesourcery.com>
10480
10481 * linux-low.c: Include linux-procfs.h.
10482 (linux_attach_lwp_1): Update comments.
10483 (linux_attach): Scan for existing threads when attaching to a
10484 process that is the tgid.
10485 * Makefile.in: Update dependencies.
10486
13da1c97
LM
104872011-08-24 Luis Machado <lgustavo@codesourcery.com>
10488
10489 * configure.srv: Add linux-procfs.o dependencies.
10490
881127c9
YQ
104912011-08-14 Yao Qi <yao@codesourcery.com>
10492
10493 * target.h (struct target_ops): Fix indent.
10494 * win32-low.c (win32_target_ops): Fix comment.
10495
58dbd541
YQ
104962011-08-14 Andrew Jenner <andrew@codesourcery.com>
10497 Yao Qi <yao@codesourcery.com>
10498
10499 * Makefile.in (clean): Remove tic6x-*.c files.
10500 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10501 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10502 (tic6x-c64xp-linux.c): Likewise.
10503 * configure.srv: Add support for tic6x-*-uclinux.
10504 * linux-tic6x-low.c: New.
10505 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10506
78d85199
YQ
105072011-08-14 Andrew Stubbs <ams@codesourcery.com>
10508 Yao Qi <yao@codesourcery.com>
10509
10510 * target.h (struct target_ops): Add read_loadmap.
10511 * linux-low.c (struct target_loadseg): New type.
10512 (struct target_loadmap): New type.
10513 (linux_read_loadmap): New function.
10514 (linux_target_ops): Add linux_read_loadmap.
10515 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10516 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10517 to NULL.
78d85199 10518
a959a88d
EZ
105192011-08-05 Eli Zaretskii <eliz@gnu.org>
10520
10521 * win32-low.c: Include <stdint.h>.
10522
1ced966e
PA
105232011-07-22 Pedro Alves <pedro@codesourcery.com>
10524
10525 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10526 to the inferior here.
10527 (i386_remove_aligned_watchpoint): Ditto.
10528 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10529 fit part of the watchpoint in the debug registers.
10530 (i386_update_inferior_debug_regs): New.
10531 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10532 registers, and only update the inferior on success.
10533 (i386_low_remove_watchpoint): Ditto.
10534
d26e3629
KY
105352011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10536
10537 * linux-low.c (compare_ints, unique, list_threads, show_process,
10538 linux_core_of_thread): Delete.
10539 (linux_target_ops): Change linux_core_of_thread to
10540 linux_common_core_of_thread.
10541 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10542 * utils.c (malloc_failure): Change type of argument.
10543 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10544 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10545 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10546 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10547 (IPA_OBJS): Add common-utils-ipa.o.
10548 (ptid_h, linux_osdata_h): New macros.
10549 (server_h): Add common/common-utils.h, common/xml-utils.h,
10550 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10551 common/ptid.h.
10552 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10553 ptid.o, buffer.o): New rules.
10554 (linux-low.o): Add common/linux-osdata.h as a dependency.
10555 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10556 * configure.ac: Add AC_HEADER_DIRENT check.
10557 * config.in: Regenerate.
10558 * configure: Regenerate.
10559 * remote-utils.c (xml_escape_text): Delete.
10560 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10561 buffer_xml_printf): Move to common/buffer.c.
10562 * server.c (main): Remove call to initialize_inferiors.
10563 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10564 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10565 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10566 internal_error, gdb_assert, gdb_assert_fail): Delete.
10567 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10568 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10569 common/buffer.h.
10570 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10571 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10572 initialize_inferiors): Delete.
10573
2275a1a7
PA
105742011-07-20 Pedro Alves <pedro@codesourcery.com>
10575
10576 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10577 symbol error.
10578
0a5b1e09
PA
105792011-05-31 Pedro Alves <pedro@codesourcery.com>
10580
10581 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10582 assertion.
10583 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10584
6938fd34
YQ
105852011-05-26 Yao Qi <yao@codesourcery.com>
10586
10587 * Makefile.in (thread-db.o): Track dependence to
10588 common/gdb_thread_db.h.
10589 * thread-db.c: include gdb_thread_db.h from right place.
10590
b481f9e0
TT
105912011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10592
10593 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10594 __FILE__ and __LINE__ to internal_error.
10595
98a5dd13
DE
105962011-05-13 Doug Evans <dje@google.com>
10597
10598 * thread-db.c (try_thread_db_load_from_sdir): New function.
10599 (try_thread_db_load_from_dir): New function.
10600 (thread_db_load_search): Handle $sdir, ignore $pdir.
10601 Remove trying of system directories if search of
10602 libthread-db-search-path fails, that is now done via $sdir.
10603
d248b706
KY
106042011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10605
10606 * server.c (handle_query): Add EnableDisableTracepoints to the list
10607 of supported features.
43aaf8b6 10608 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10609 tracepoints.
43aaf8b6
PA
10610 (cmd_qtenable_disable): New.
10611 (cmd_qtstart): Install tracepoints even if disabled.
10612 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10613 receiving a QTEnable or QTDisable packet.
10614 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10615 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10616 tracepoints.
10617 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10618
84e578fb
DE
106192011-05-10 Doug Evans <dje@google.com>
10620
10621 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10622
71f55dd8
DE
106232011-05-04 Doug Evans <dje@google.com>
10624
10625 * linux-low.c (linux_join): Skip process lookup.
10626 * spu-low.c (spu_join): Ditto.
10627 * server.c (join_inferiors_callback): Delete.
10628 (process_serial_event): For 'D' packet (detach) call join_inferior
10629 directly.
10630
4d393d60
JM
106312011-05-04 Joseph Myers <joseph@codesourcery.com>
10632
10633 * README: Don't mention xscale*-*-linux*.
10634 * configure.srv (xscale*-*-linux*): Don't handle target.
10635
b00ad6ff
NF
106362011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10637
10638 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10639 casting pointers.
10640 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10641 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10642 (i386_emit_void_call_2): Likewise.
10643
af96c192
YQ
106442011-04-26 Yao Qi <yao@codesourcery.com>
10645
43aaf8b6
PA
10646 * linux-low.c: Move common macros to linux-ptrace.h.
10647 Include linux-ptrace.h.
af96c192
YQ
10648 * Makefile.in (linux_ptrace_h): New.
10649 (linux-low.o): Depends on linux-ptrace.h.
10650
03f2bd59
JK
106512011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10652
10653 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10654 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10655 (remote_prepare): New function with most of the TCP code from ...
10656 (remote_open): ... here. Detect PORT here unconditionally. Move also
10657 setting transport_is_reliable.
10658 * server.c (run_once): New variable.
10659 (gdbserver_usage): Document it.
10660 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10661 the first run if RUN_ONCE.
10662 * server.h (run_once, remote_prepare): New declarations.
10663
7a9dd1b2
TT
106642011-04-19 Tom Tromey <tromey@redhat.com>
10665
10666 * win32-low.c (handle_load_dll): Remove duplicate "the".
10667
81239425
PM
106682011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10669
10670 Remove support for old Cygwin 1.5 versions.
10671 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10672 function to avoid warning.
10673 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10674 warning.
10675
9e0627f1
PM
106762011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10677
10678 * gdbserver/server.h (Macro _): Define it if not available.
10679
588eebee
MS
106802011-03-14 Michael Snyder <msnyder@vmware.com>
10681
348af9f7 10682 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10683
43f70d4c
JB
106842011-03-10 Joel Brobecker <brobecker@adacore.com>
10685
10686 * Makefile.in (maintainer-clean realclean distclean): Remove
10687 "make ... subdir_do" command.
10688
348af9f7
MS
106892011-03-10 Michael Snyder <msnyder@vmware.com>
10690
10691 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10692
10693 * server.c (handle_v_run): Free alloced buffer on early return.
10694
e637a4f5
YQ
106952011-03-09 Yao Qi <yao@codesourcery.com>
10696
10697 Revert:
10698 2011-03-04 Yao Qi <yao@codesourcery.com>
10699
10700 * Makefile.in: Remove GNU make feature --directory.
10701
10702 2011-03-05 Yao Qi <yao@codesourcery.com>
10703
10704 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10705 (subdir_do): New make target. Copied from gdb/Makefile.
10706 (maintainer-clean, realclean, distclean, clean): Call corresponding
10707 make targets in common/Makefile.
10708
10709 2011-02-11 Yao Qi <yao@codesourcery.com>
10710
10711 * configure.ac: Call AC_PROG_RANLIB.
10712 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10713 * configure: Regenerate.
10714
e6edda56
JK
107152011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10716
10717 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10718
e5141119
JB
107192011-03-06 Yao Qi <yao@codesourcery.com>
10720
10721 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10722
64794aa4
JB
107232011-03-05 Yao Qi <yao@codesourcery.com>
10724
10725 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10726 (subdir_do): New make target. Copied from gdb/Makefile.
10727 (maintainer-clean, realclean, distclean, clean): Call corresponding
10728 make targets in common/Makefile.
10729
7a762829
YQ
107302011-03-04 Yao Qi <yao@codesourcery.com>
10731
10732 * Makefile.in: Remove GNU make feature --directory.
10733
348af9f7
MS
107342011-03-04 Michael Snyder <msnyder@vmware.com>
10735
10736 * server.c (queue_stop_reply): Call xmalloc not malloc.
10737
107382011-03-02 Michael Snyder <msnyder@vmware.com>
10739
10740 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10741
9f72fee2
MS
107422011-02-28 Michael Snyder <msnyder@vmware.com>
10743
588eebee
MS
10744 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10745 (cmd_qtframe): Ditto.
10746 (cmd_qtbuffer): Ditto.
10747 (cmd_bigqtbuffer): Ditto.
10748
9f72fee2
MS
10749 * utils.c (decimal2str): Initialize 'width' to nine, then
10750 don't mess with it.
10751
8040bd49
UW
107522011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10753
10754 * hostio.c (require_data): Free *data, not data.
10755
7e52cbd0
JK
107562011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10757
10758 * hostio.c (require_data): Use free, not xfree.
10759
9130f83e
MS
107602011-02-27 Michael Snyder <msnyder@vmware.com>
10761
4b812f4e
MS
10762 * server.c (handle_query): Discard unused value.
10763
9130f83e
MS
10764 * hostio.c (require_data): Free malloc memory before returning
10765 error.
10766
69d37113
MS
107672011-02-26 Michael Snyder <msnyder@vmware.com>
10768
10769 * linux-low.c (list_threads): Call closedir for dirent.
10770
35f5825a
MS
107712011-02-27 Michael Snyder <msnyder@vmware.com>
10772
2a589cef
MS
10773 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10774 a case statement falls through.
10775
0adea5f7
MS
10776 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10777
35f5825a
MS
10778 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10779 in comparison.
10780
238f1c74
MS
107812011-02-26 Michael Snyder <msnyder@vmware.com>
10782
10783 * utils.c (decimal2str): Eliminate dead code and dead param.
10784 (pulongest): Drop dead param from call to decimal2str.
10785 (plongest): Ditto.
10786
633ff500
JB
107872011-02-24 Joel Brobecker <brobecker@adacore.com>
10788
10789 Revert the following patch (not approved yet):
10790 2011-02-21 Hui Zhu <teawater@gmail.com>
10791 * tracepoint.c (tp_printf): New function.
10792 (eval_agent_expr): Handle gdb_agent_op_printf.
10793
f9c6ff72
HZ
107942011-02-21 Hui Zhu <teawater@gmail.com>
10795
10796 * tracepoint.c (tp_printf): New function.
10797 (eval_agent_expr): Handle gdb_agent_op_printf.
10798
94d5e490
TT
107992011-02-18 Tom Tromey <tromey@redhat.com>
10800
10801 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10802 (tracepoint.o): Likewise.
10803 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10804 (gdb_agent_op_names): Likewise.
10805
c7f96d2b
TT
108062011-02-18 Tom Tromey <tromey@redhat.com>
10807
10808 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10809 gdb_agent_op_rot>: New constants.
10810 (gdb_agent_op_names): Add pick and roll.
10811 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10812 cases.
10813
0feedb2c
JK
108142011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10815
10816 * aclocal.m4: Regenerated with aclocal-1.11.1.
10817
b3b9301e
PA
108182011-02-14 Pedro Alves <pedro@codesourcery.com>
10819
10820 * server.c (handle_qxfer_traceframe_info): New.
10821 (qxfer_packets): Register "traceframe-info".
10822 (handle_query): Report support for qXfer:traceframe-info:read+.
10823 * tracepoint.c (match_blocktype): New.
10824 (traceframe_find_block_type): Rename to ...
10825 (traceframe_walk_blocks): ... this. Add callback filter argument,
10826 and use it.
10827 (traceframe_find_block_type): New, reimplemented on top of
10828 traceframe_walk_blocks.
10829 (build_traceframe_info_xml): New.
10830 (traceframe_read_info): New.
10831 * server.h (traceframe_read_info): Declare.
10832
4f3e6fb7
YQ
108332011-02-11 Yao Qi <yao@codesourcery.com>
10834
10835 * configure.ac: Call AC_PROG_RANLIB.
10836 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10837 * configure: Regenerate.
10838
764880b7
PA
108392011-02-07 Pedro Alves <pedro@codesourcery.com>
10840
10841 * server.c (gdb_read_memory): Change return semantics to allow
10842 partial transfers.
10843 (handle_search_memory_1): Adjust.
10844 (process_serial_event) <'m' packet>: Handle partial transfers.
10845 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10846
1c79eb8a
PA
108472011-01-28 Pedro Alves <pedro@codesourcery.com>
10848
10849 * regcache.c (init_register_cache): Initialize
10850 regcache->register_status.
10851 (free_register_cache): Release regcache->register_status.
10852 (regcache_cpy): Copy register_status.
10853 (registers_to_string): Print 'x's for unavailable registers.
10854 (supply_register): Mark the register's status valid or
10855 unavailable, depending on whether a buffer was passed in or not.
10856 (supply_register_zeroed): New.
10857 (supply_regblock): Mark the registers' status valid or
10858 unavailable, depending on whether a buffer was passed in or not.
10859 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10860 (struct regcache): New `register_status' field.
10861 (supply_register_zeroed): Declare.
10862 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10863 supply_register_zeroed, rather than passing a NULL buffer to
10864 supply_register.
10865 * tracepoint.c (fetch_traceframe_registers): Update comment.
10866
85724a0e
PA
108672011-01-28 Pedro Alves <pedro@codesourcery.com>
10868
10869 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10870 buffer explicit.
10871
d08aafef
PA
108722011-01-25 Pedro Alves <pedro@codesourcery.com>
10873
10874 * server.h (decode_xfer_write): Change prototype.
10875 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10876 and don't extract the annex here.
10877 * server.c (decode_xfer_read): Remove `annex' parameter,
10878 and don't extract the annex here.
10879 (decode_xfer): New.
10880 (struct qxfer): New.
10881 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10882 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10883 (handle_qxfer_statictrace): New functions, abstracted out from
10884 handle_query, and made to use the struct qxfer interface.
10885 (handle_threads_qxfer_proper): Rename to ...
10886 (handle_qxfer_threads_proper): ... this.
10887 (handle_threads_qxfer): Rename to ...
10888 (handle_qxfer_threads): ... this. Adjust.
10889 (qxfer_packets): New array.
10890 (handle_qxfer): New function.
10891 (handle_query): Use handle_qxfer.
10892
493e2a69
MS
108932011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10894
10895 * gdbreplay.c: Shorten lines of >= 80 columns.
10896 * linux-low.c: Ditto.
10897 * linux-ppc-low.c: Ditto.
10898 * linux-s390-low.c: Ditto.
10899 * linux-sparc-low.c: Ditto.
10900 * linux-x86-low.c: Ditto.
10901 * linux-xtensa-low.c: Ditto.
10902 * mem-break.c: Ditto.
10903 * nto-low.c: Ditto.
10904 * regcache.h: Ditto.
10905 * remote-utils.c: Ditto.
10906 * server.c: Ditto.
10907 * server.h: Ditto.
10908 * thread-db.c: Ditto.
10909 * tracepoint.c: Ditto.
10910 * utils.c: Ditto.
10911 * win32-low.h: Ditto.
10912
44944448
JB
109132011-01-05 Joel Brobecker <brobecker@adacore.com>
10914
10915 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10916 update.
10917
71ce852c
JB
109182011-01-01 Joel Brobecker <brobecker@adacore.com>
10919
10920 * server.c (gdbserver_version): Update copyright year in version
10921 output.
10922 * gdbreplay.c (gdbreplay_version): Ditto.
10923
eb826dc6
MF
109242010-12-29 Jie Zhang <jie.zhang@analog.com>
10925
10926 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10927 * linux-bfin-low.c: New file.
10928 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10929 PT_DATA_ADDR for BFIN targets.
10930 * Makefile.in (SFILES): Add linux-bfin-low.c.
10931 (clean): Remove reg-bfin.c.
10932 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10933 * README: Mention supported Blackfin targets.
10934
39ab222a
MF
109352010-12-23 Mike Frysinger <vapier@gentoo.org>
10936
10937 * .gitignore: New file.
10938
a1f2ce7d
MF
109392010-11-16 Mike Frysinger <vapier@gentoo.org>
10940
10941 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10942
f474844c
JZ
109432010-10-22 Jie Zhang <jie@codesourcery.com>
10944
10945 * Makefile.in: Add FLAGS_TO_PASS variable.
10946 (install): Remove dependency of install-only and recursively
10947 invoke make for install-only.
10948
f1048712
DE
109492010-10-04 Doug Evans <dje@google.com>
10950
10951 * Makefile.in (uninstall): Use $(DESTDIR).
10952
b53a1623
PA
109532010-09-24 Pedro Alves <pedro@codesourcery.com>
10954
e6ee044d
PA
10955 PR gdb/11842
10956
b53a1623
PA
10957 * linux-x86-low.c (compat_siginfo_from_siginfo)
10958 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10959 si_code is < 0. Check for si_code == SI_TIMER before checking for
10960 si_code < 0.
10961
fa1bd1e4
JB
109622010-09-13 Joel Brobecker <brobecker@adacore.com>
10963
10964 * lynx-i386-low.c: New file.
10965 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10966
47fac8f8
JB
109672010-09-13 Joel Brobecker <brobecker@adacore.com>
10968
10969 * lynx-low.c (ptrace_request_to_str): Remove handling for
10970 request values that have been removed in LynxOS 5.x.
10971
1adfc54d
JB
109722010-09-13 Joel Brobecker <brobecker@adacore.com>
10973
10974 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10975 <ptrace.h>
10976
c2a66c29
NS
109772010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10978
10979 * configure.ac: Add --enable-inprocess-agent option.
10980 * configure: Rebuilt.
10981
32fcada3
YQ
109822010-09-06 Yao Qi <yao@codesourcery.com>
10983
10984 * linux-low.c (linux_kill): Remove unused variable.
10985 (linux_stabilize_threads): Likewise.
10986 * server.c (start_inferior): Likewise.
10987 (queue_stop_reply_callback): Likewise.
10988 * tracepoint.c (do_action_at_tracepoint): Likewise.
10989
0cccb683
YQ
109902010-09-06 Yao Qi <yao@codesourcery.com>
10991
10992 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10993 on return.
10994
423ec54c
JK
109952010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10996
10997 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10998
12ac6819
PA
109992010-09-06 Pedro Alves <pedro@codesourcery.com>
11000
11001 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11002 "$(IPA_DEPFILES)".
11003
8ed54b31
JB
110042010-09-01 Joel Brobecker <brobecker@adacore.com>
11005
11006 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11007 gdbserver/lynx-ppc-low.c: New files.
11008 * Makefile.in (lynx_low_h): New variable.
11009 (lynx-low.o, lynx-ppc-low.o): New rules.
11010 * configure.ac: On LynxOS, link with -lnetinet.
11011 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11012 * configure: regenerate.
11013
bb0116a4
JB
110142010-09-01 Joel Brobecker <brobecker@adacore.com>
11015
11016 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11017 * configure.ac: Add check for vasprintf and vsnprintf.
11018 * configure, config.in: Regenerate.
11019 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11020
a778ab81 110212010-09-01 Joel Brobecker <brobecker@adacore.com>
11022
11023 * gdbreplay.c: Move include of alloca.h up, next to include of
11024 malloc.h.
11025 * server.h: Add include of malloc.h.
11026 * mem-break.c: Remove include of malloc.h.
11027 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11028
8b034a19 110292010-09-01 Joel Brobecker <brobecker@adacore.com>
11030
11031 * Makefile.in (memmem.o): Build with -Wno-error.
11032
110332010-09-01 Joel Brobecker <brobecker@adacore.com>
11034
11035 * utils.c (xsnprintf): Make non-static.
11036 * server.h: Add xsnprintf declaration.
11037 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11038 replace calls to snprintf by calls to xsnprintf throughout.
11039
110402010-09-01 Joel Brobecker <brobecker@adacore.com>
11041
11042 * configure.ac: Add configure check for alloca.
11043 * configure, config.in: Regenerate.
11044 * server.h: Include alloca.h if it exists.
11045 * gdbreplay.c: Include alloca.h if it exists.
11046
1a981360
PA
110472010-08-28 Pedro Alves <pedro@codesourcery.com>
11048
11049 * linux-low.c (__SIGRTMIN): Define if not already defined.
11050 (linux_create_inferior): Check for __ANDROID__ rather than
11051 __SIGRTMIN.
11052 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11053 are already deferred.
11054 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11055 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11056 stopped and already has a pending signal to report.
11057 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11058 a pending signal to report or is moving out of a jump pad.
11059 (linux_init_signals): Check for __ANDROID__ rather than
11060 __SIGRTMIN.
11061
b4d51a55
PA
110622010-08-28 Pedro Alves <pedro@codesourcery.com>
11063
11064 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11065 debug_threads check. Avoid a linear search when not doing debug
11066 output.
11067
ec48365d
PA
110682010-08-27 Pedro Alves <pedro@codesourcery.com>
11069
11070 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11071 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11072 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11073 (process_event): Change local fd's type to gdb_fildes_t.
11074 (create_file_handler): Adjust prototype.
11075 (delete_file_handler): Adjust prototype.
11076 (handle_file_event): Adjust prototype. Use pfildes.
11077 (create_file_event): Adjsut prototype.
11078 * remote-utils.c (remote_desc, listen_desc): Change type to
11079 gdb_fildes_t.
11080 * server.h: New gdb_fildes_t typedef.
11081 [USE_WIN32API]: Include winsock2.h.
11082 (delete_file_handler, add_file_handler): Adjust prototypes.
11083 (pfildes): Declare.
11084 * utils.c (pfildes): New.
11085
854d88f0
PA
110862010-08-27 Pedro Alves <pedro@codesourcery.com>
11087
11088 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11089 * configure: Regenerate.
11090
0146f85b
PA
110912010-08-27 Pedro Alves <pedro@codesourcery.com>
11092
11093 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11094 (linux_done_accessing_memory): ... this.
11095 (linux_target_ops): Adjust.
11096 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11097 * nto-low.c (nto_target_ops): Adjust comment.
11098 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11099 * spu-low.c (spu_target_ops): Adjust comment.
11100 * target.h (target_ops): Rename unprepare_to_access_memory field
11101 to done_accessing_memory.
11102 (unprepare_to_access_memory): Rename to ...
11103 (done_accessing_memory): ... this.
11104
90d74c30
PA
111052010-08-26 Pedro Alves <pedro@codesourcery.com>
11106
11107 * linux-low.c (linux_prepare_to_access_memory): New.
11108 (linux_unprepare_to_access_memory): New.
11109 (linux_target_ops): Install them.
11110 * server.c (read_memory): Rename to ...
11111 (gdb_read_memory): ... this. Use
11112 prepare_to_access_memory/prepare_to_access_memory.
11113 (write_memory): Rename to ...
11114 (gdb_write_memory): ... this. Use
11115 prepare_to_access_memory/prepare_to_access_memory.
11116 (handle_search_memory_1): Adjust.
11117 (process_serial_event): Adjust.
11118 * target.h (struct target_ops): New fields
11119 prepare_to_access_memory and unprepare_to_access_memory.
11120 (prepare_to_access_memory, unprepare_to_access_memory): New.
11121 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11122 prepare_to_access_memory/prepare_to_access_memory.
11123 * nto-low.c (nto_target_ops): Adjust.
11124 * spu-low.c (spu_target_ops): Adjust.
11125 * win32-low.c (win32_target_ops): Adjust.
11126
fd467969
PA
111272010-08-26 Pedro Alves <pedro@codesourcery.com>
11128
11129 * Makefile.in (WARN_CFLAGS): Get it from configure.
11130 (WERROR_CFLAGS): New.
11131 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11132 * configure.ac: Introduce --enable-werror, which adds -Werror to
11133 the compiler command line. Enabled by default. Disable with
11134 --disable-werror. Add -Wdeclaration-after-statement
11135 Wpointer-arith and -Wformat-nonliteral to warning flags.
11136 * configure: Regenerate.
11137
331e2f5f
PA
111382010-08-26 Pedro Alves <pedro@codesourcery.com>
11139
11140 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11141
e581f2b4
PA
111422010-08-26 Pedro Alves <pedro@codesourcery.com>
11143
11144 * gdbreplay.c (remote_error): New.
11145 (gdbchar): New.
11146 (expect): Use gdbchar. Check for error reading from GDB.
11147 Clarify sync error output.
11148 (play): Check for errors writing to GDB.
11149 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11150 * remote-utils.c (getpkt): Check for errors writing to the remote
11151 descriptor.
11152
3c11dd79
PA
111532010-08-25 Pedro Alves <pedro@codesourcery.com>
11154
11155 * linux-low.c (linux_wait_1): Move non-debugging code out of
11156 `debug_threads' control.
11157
d20a8ad9
PA
111582010-08-25 Pedro Alves <pedro@codesourcery.com>
11159
11160 * linux-low.c (linux_wait_1): Don't set last_status here.
11161 * server.c (push_event, queue_stop_reply_callback): Assert we're
11162 not pushing a TARGET_WAITKIND_IGNORE event.
11163 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11164 (myresume, handle_target_event): Set the thread's last_resume_kind
11165 and last_status from the target returned status.
11166
964e4306
PA
111672010-08-25 Pedro Alves <pedro@codesourcery.com>
11168
11169 PR threads/10729
11170
11171 * linux-x86-low.c (update_debug_registers_callback): New.
11172 (i386_dr_low_set_addr): Use it.
11173 (i386_dr_low_get_addr): New.
11174 (i386_dr_low_set_control): Use update_debug_registers_callback.
11175 (i386_dr_low_get_control): New.
11176 (i386_dr_low_get_status): Adjust.
11177 * linux-low.c (linux_stop_lwp): New.
11178 * linux-low.h (linux_stop_lwp): Declare.
11179
11180 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11181 argument instead of a i386_debug_reg_state.
11182 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11183 a i386_debug_reg_state.
11184 (i386_insert_aligned_watchpoint): Adjust.
11185 (i386_remove_aligned_watchpoint): Adjust.
11186 (i386_low_stopped_data_address): Read the debug registers from the
11187 inferior instead of from the mirrors.
11188 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11189 (i386_dr_low_get_addr): Declare.
11190 (i386_dr_low_get_control): Declare.
11191 (i386_dr_low_get_status): Change prototype.
11192
11193 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11194 (i386_dr_low_get_addr): New.
11195 (i386_dr_low_get_control): New.
11196 (i386_dr_low_get_status): Adjust prototype. Return
11197 dr_status_mirror.
11198 (i386_initial_stuff): Clear dr_status_mirror and
11199 dr_control_mirror.
11200 (i386_get_thread_context): Adjust.
11201 (i386_set_thread_context): Adjust.
11202 (i386_thread_added): Adjust.
11203
5f21a75b
PA
112042010-08-24 Pedro Alves <pedro@codesourcery.com>
11205
11206 * linux-low.h (linux_thread_area): Delete declaration.
11207
3e4c1235
TS
112082010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11209
11210 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11211 after its termination.
11212
1971b033
PA
112132010-08-09 Pedro Alves <pedro@codesourcery.com>
11214
11215 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11216 (gdb_wants_all_stopped): Delete.
11217 (linux_wait_1): Don't call them.
11218 * server.c (handle_v_cont): Tag all threads as want-stopped.
11219 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11220 stopped as "client-wants-stopped".
11221
310444ac
PA
112222010-07-31 Pedro Alves <pedro@codesourcery.com>
11223
11224 * Makefile.in (signals_h): New.
11225 (server_h): Depend on it.
11226 (server.o): Don't depend on $(signals_def).
11227 (signals.o): Depend on $(signals_def).
11228
a19cae16
JK
112292010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11230
11231 * Makefile.in (signals_def): New.
11232 (server_h): Append include/gdb/signals.h and signals_def.
11233 (server.o): Append signals_def.
11234
30d50328
JK
112352010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11236
11237 * server.c (handle_target_event): Use target_signal_to_host for
11238 resume_info.sig initialization.
11239 * target.h (struct thread_resume) <sig>: New comment.
11240
5c3216e2
OS
112412010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11242
c6f46ca0
OS
11243 * server.c (handle_query): strcpy() the returned string from paddress()
11244 instead of sprintf().
5c3216e2
OS
11245 * utils.c (paddress): Return phex_nz().
11246
6bd31874
JB
112472010-07-07 Joel Brobecker <brobecker@adacore.com>
11248
11249 * server.c (handle_v_cont): Call mourn_inferior if process
11250 just exited.
11251 (myresume): Likewise.
11252
0fb4aa4b
PA
112532010-07-01 Pedro Alves <pedro@codesourcery.com>
11254
11255 Static tracepoints, and integration with UST.
11256
11257 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11258 * mem-break.c (uninsert_all_breakpoints)
11259 (reinsert_all_breakpoints): New.
11260 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11261 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11262 (gdb_agent_ust_loaded, helper_thread_id)
11263 (gdb_agent_helper_thread_id): New macros.
11264 (struct ipa_sym_addresses): Add addr_ust_loaded,
11265 addr_helper_thread_id, addr_cmd_buf.
11266 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11267 (in_process_agent_loaded_ust): New.
11268 (write_e_ust_not_loaded): New.
11269 (maybe_write_ipa_ust_not_loaded): New.
11270 (struct collect_static_trace_data_action): New.
11271 (enum tracepoint_type) <static_tracepoint>: New.
11272 (struct tracepoint) <handle>: Mention static tracepoints.
11273 (struct static_tracepoint_ctx): New.
11274 (CMD_BUF_SIZE): New.
11275 (add_tracepoint_action): Handle static tracepoint actions.
11276 (unprobe_marker_at): New.
11277 (clear_installed_tracepoints): Handle static tracepoints.
11278 (cmd_qtdp): Handle static tracepoints.
11279 (probe_marker_at): New.
11280 (cmd_qtstart): Handle static tracepoints.
11281 (response_tracepoint): Handle static tracepoints.
11282 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11283 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11284 (get_context_regcache): Handle static tracepoints.
11285 (do_action_at_tracepoint): Handle static tracepoint actions.
11286 (traceframe_find_block_type): Handle static trace data blocks.
11287 (traceframe_read_sdata): New.
11288 (download_tracepoints): Download static tracepoint actions.
11289 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11290 (GDB_PROBE_NAME): New.
11291 (ust_ops): New.
11292 (GET_UST_SYM): New.
11293 (USTF): New.
11294 (dlsym_ust): New.
11295 (ust_marker_to_static_tracepoint): New.
11296 (gdb_probe): New.
11297 (collect_ust_data_at_tracepoint): New.
11298 (gdb_ust_probe): New.
11299 (UNIX_PATH_MAX, SOCK_DIR): New.
11300 (gdb_ust_connect_sync_socket): New.
11301 (resume_thread, stop_thread): New.
11302 (run_inferior_command): New.
11303 (init_named_socket): New.
11304 (gdb_ust_socket_init): New.
11305 (cstr_to_hexstr): New.
11306 (next_st): New.
11307 (first_marker, next_marker): New.
11308 (response_ust_marker): New.
11309 (cmd_qtfstm, cmd_qtsstm): New.
11310 (unprobe_marker_at, probe_marker_at): New.
11311 (cmd_qtstmat, gdb_ust_thread): New.
11312 (gdb_ust_init): New.
11313 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11314 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11315 (ST_REGENTRY): New.
11316 (x86_64_st_collect_regmap): New.
11317 (X86_64_NUM_ST_COLLECT_GREGS): New.
11318 (AMD64_RIP_REGNUM): New.
11319 (supply_static_tracepoint_registers): New.
11320 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11321 (ST_REGENTRY): New.
11322 (i386_st_collect_regmap): New.
11323 (i386_NUM_ST_COLLECT_GREGS): New.
11324 (supply_static_tracepoint_registers): New.
11325 * server.c (handle_query): Handle qXfer:statictrace:read.
11326 <qSupported>: Report support for StaticTracepoints, and
11327 qXfer:statictrace:read features.
11328 * server.h (traceframe_read_sdata)
11329 (supply_static_tracepoint_registers): Declare.
11330 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11331 (unpack_varlen_hex): Include in IPA build.
11332 * Makefile.in (ustlibs, ustinc): New.
11333 (IPA_OBJS): Add remote-utils-ipa.o.
11334 ($(IPA_LIB)): Link -ldl and -lpthread.
11335 (UST_CFLAGS): New.
11336 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11337 * config.in, configure: Regenerate.
11338
9e4344e5
PA
113392010-06-20 Ian Lance Taylor <iant@google.com>
11340 Pedro Alves <pedro@codesourcery.com>
11341
11342 * linux-x86-low.c (always_true): Delete.
11343 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11344 trying to fool the compiler with always_true.
11345
c6beb2cb
PA
113462010-06-20 Pedro Alves <pedro@codesourcery.com>
11347
11348 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11349 conditions in gdbserver.
11350
d2ed6730
UW
113512010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11352
11353 * spu-low.c (spu_read_memory): Wrap around local store limit.
11354 (spu_write_memory): Likewise.
11355
4e29fb54
PA
113562010-06-15 Pedro Alves <pedro@codesourcery.com>
11357
11358 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11359 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11360 LONGEST uses.
11361 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11362 uses.
11363 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11364 uses with LONGEST uses.
11365
6a271cae
PA
113662010-06-14 Stan Shebs <stan@codesourcery.com>
11367 Pedro Alves <pedro@codesourcery.com>
11368
11369 Bytecode compiler.
11370
11371 * linux-x86-low.c: Include limits.h.
11372 (add_insns): New.
11373 (always_true): New.
11374 (EMIT_ASM): New.
11375 (EMIT_ASM32): New.
11376 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11377 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11378 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11379 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11380 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11381 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11382 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11383 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11384 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11385 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11386 (amd64_emit_void_call_2): New.
11387 (amd64_emit_ops): New.
11388 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11389 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11390 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11391 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11392 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11393 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11394 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11395 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11396 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11397 (i386_emit_stack_adjust, i386_emit_int_call_1)
11398 (i386_emit_void_call_2): New.
11399 (i386_emit_ops): New.
11400 (x86_emit_ops): New.
11401 (the_low_target): Install x86_emit_ops.
11402 * server.h (struct emit_ops): New.
11403 (get_raw_reg_func_addr): Declare.
11404 (current_insn_ptr, emit_error): Declare.
11405 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11406 (set_trace_state_variable_value): New defines.
11407 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11408 addr_get_trace_state_variable_value and
11409 addr_set_trace_state_variable_value.
11410 (symbol_list): New fields for get_raw_reg,
11411 get_trace_state_variable_value and set_trace_state_variable_value.
11412 (condfn): New typedef.
11413 (struct tracepoint): New field `compiled_cond'.
11414 (do_action_at_tracepoint): Clear compiled_cond.
11415 (get_trace_state_variable_value, set_trace_state_variable_value):
11416 Export in the IPA.
11417 (condition_true_at_tracepoint): If there's a compiled condition,
11418 run that.
11419 (current_insn_ptr, emit_error): New globals.
11420 (struct bytecode_address): New.
11421 (get_raw_reg_func_addr): New.
11422 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11423 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11424 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11425 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11426 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11427 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11428 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11429 (compile_tracepoint_condition, compile_bytecodes): New.
11430 * target.h (emit_ops): Forward declare.
11431 (struct target_ops): New field emit_ops.
11432 (target_emit_ops): New.
11433 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11434 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11435 * linux-low.c (linux_emit_ops): New.
11436 (linux_target_ops): Install it.
11437 * linux-low.h (struct linux_target_ops): New field emit_ops.
11438
92b72907
UW
114392010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11440
11441 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11442 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11443
fa593d66
PA
114442010-06-01 Pedro Alves <pedro@codesourcery.com>
11445 Stan Shebs <stan@codesourcery.com>
11446
11447 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11448 (all): Depend on $(extra_libraries).
11449 (install-only): Install the IPA.
11450 (IPA_OBJS, IPA_LIB): New.
11451 (clean): Remove the IPA lib.
11452 (IPAGENT_CFLAGS): New.
11453 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11454 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11455 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11456 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11457 * configure.ac: Check for atomic builtins support in the compiler.
11458 (IPA_DEPFILES, extra_libraries): Define.
11459 * configure.srv (ipa_obj): Add description.
11460 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11461 (i[34567]86-*-linux*): Set ipa_obj.
11462 (x86_64-*-linux*): Set ipa_obj.
11463 * linux-low.c (stabilizing_threads): New.
11464 (supports_fast_tracepoints): New.
11465 (linux_detach): Stabilize threads before detaching.
11466 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11467 the lwp is either not stabilizing, or is moving out of a jump pad.
11468 (linux_fast_tracepoint_collecting): New.
11469 (maybe_move_out_of_jump_pad): New.
11470 (enqueue_one_deferred_signal): New.
11471 (dequeue_one_deferred_signal): New.
11472 (linux_wait_for_event_1): If moving out of a jump pad, defer
11473 pending signals to later.
11474 (linux_stabilize_threads): New.
11475 (linux_wait_1): Check if threads need moving out of jump pads, and
11476 do it if so.
11477 (stuck_in_jump_pad_callback): New.
11478 (move_out_of_jump_pad_callback): New.
11479 (lwp_running): New.
11480 (linux_resume_one_lwp): Handle moving out of jump pads.
11481 (linux_set_resume_request): Dequeue deferred signals.
11482 (need_step_over_p): Also step over fast tracepoint jumps.
11483 (start_step_over): Also uninsert fast tracepoint jumps.
11484 (finish_step_over): Also reinsert fast tracepoint jumps.
11485 (linux_install_fast_tracepoint_jump): New.
11486 (linux_target_ops): Install linux_stabilize_threads and
11487 linux_install_fast_tracepoint_jump_pad.
11488 * linux-low.h (linux_target_ops) <get_thread_area,
11489 install_fast_tracepoint_jump_pad>: New fields.
11490 (struct lwp_info) <collecting_fast_tracepoint,
11491 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11492 (linux_get_thread_area): Declare.
11493 * linux-x86-low.c (jump_insn): New.
11494 (x86_get_thread_area): New.
11495 (append_insns): New.
11496 (push_opcode): New.
11497 (amd64_install_fast_tracepoint_jump_pad): New.
11498 (i386_install_fast_tracepoint_jump_pad): New.
11499 (x86_install_fast_tracepoint_jump_pad): New.
11500 (the_low_target): Install x86_get_thread_area and
11501 x86_install_fast_tracepoint_jump_pad.
11502 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11503 (struct fast_tracepoint_jump): New.
11504 (fast_tracepoint_jump_insn): New.
11505 (fast_tracepoint_jump_shadow): New.
11506 (find_fast_tracepoint_jump_at): New.
11507 (fast_tracepoint_jump_here): New.
11508 (delete_fast_tracepoint_jump): New.
11509 (set_fast_tracepoint_jump): New.
11510 (uninsert_fast_tracepoint_jumps_at): New.
11511 (reinsert_fast_tracepoint_jumps_at): New.
11512 (set_breakpoint_at): Use write_inferior_memory.
11513 (uninsert_raw_breakpoint): Use write_inferior_memory.
11514 (check_mem_read): Mask out fast tracepoint jumps.
11515 (check_mem_write): Mask out fast tracepoint jumps.
11516 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11517 (set_fast_tracepoint_jump): Declare.
11518 (delete_fast_tracepoint_jump)
11519 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11520 (reinsert_fast_tracepoint_jumps_at): Declare.
11521 * regcache.c: Don't compile many functions when building the
11522 in-process agent library.
11523 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11524 the register buffer in the heap.
11525 (free_register_cache): If the register buffer isn't owned by the
11526 regcache, don't free it.
11527 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11528 pre-existing register caches.
11529 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11530 type.
11531 (convert_ascii_to_int): : Constify `from' parameter type.
11532 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11533 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11534 the needed buffer in-place.
11535 (relocate_instruction): New.
11536 * server.c (handle_query) <qSymbols>: If the target supports
11537 tracepoints, give it a chance of looking up symbols. Report
11538 support for fast tracepoints.
11539 (handle_status): Stabilize threads.
11540 (process_serial_event): Adjust.
11541 * server.h (struct fast_tracepoint_jump): Forward declare.
11542 (struct process_info) <fast_tracepoint_jumps>: New field.
11543 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11544 (decode_X_packet, decode_M_packet): Adjust.
11545 (relocate_instruction): Declare.
11546 (in_process_agent_loaded): Declare.
11547 (tracepoint_look_up_symbols): Declare.
11548 (struct fast_tpoint_collect_status): Declare.
11549 (fast_tracepoint_collecting): Declare.
11550 (force_unlock_trace_buffer): Declare.
11551 (handle_tracepoint_bkpts): Declare.
11552 (initialize_low_tracepoint)
11553 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11554 * target.h (struct target_ops) <stabilize_threads,
11555 install_fast_tracepoint_jump_pad>: New fields.
11556 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11557 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11558 [HAVE_STDINT_H]: Include stdint.h.
11559 (trace_debug_1): Rename to ...
11560 (trace_vdebug): ... this.
11561 (trace_debug): Rename to ...
11562 (trace_debug_1): ... this. Add `level' parameter.
11563 (trace_debug): New.
11564 (ATTR_USED, ATTR_NOINLINE): New.
11565 (IP_AGENT_EXPORT): New.
11566 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11567 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11568 (about_to_request_buffer_space, trace_buffer_is_full)
11569 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11570 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11571 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11572 (traceframe_write_count, traceframes_created)
11573 (trace_state_variables)
11574 New renaming defines.
11575 (struct ipa_sym_addresses): New.
11576 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11577 (symbol_list): New.
11578 (ipa_sym_addrs): New.
11579 (all_tracepoint_symbols_looked_up): New.
11580 (in_process_agent_loaded): New.
11581 (write_e_ipa_not_loaded): New.
11582 (maybe_write_ipa_not_loaded): New.
11583 (tracepoint_look_up_symbols): New.
11584 (debug_threads) [IN_PROCESS_AGENT]: New.
11585 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11586 (UNKNOWN_SIDE_EFFECTS): New.
11587 (stop_tracing): New.
11588 (flush_trace_buffer): New.
11589 (stop_tracing_bkpt): New.
11590 (flush_trace_buffer_bkpt): New.
11591 (read_inferior_integer): New.
11592 (read_inferior_uinteger): New.
11593 (read_inferior_data_pointer): New.
11594 (write_inferior_data_pointer): New.
11595 (write_inferior_integer): New.
11596 (write_inferior_uinteger): New.
11597 (struct collect_static_trace_data_action): Delete.
11598 (enum tracepoint_type): New.
11599 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11600 <actions_str, step_actions, step_actions_str>: Only include in
11601 GDBserver.
fa593d66
PA
11602 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11603 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11604 (tracepoints): Use IP_AGENT_EXPORT.
11605 (last_tracepoint): Don't include in the IPA.
11606 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11607 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11608 (alloced_trace_state_variables): New.
11609 (trace_state_variables): Use IP_AGENT_EXPORT.
11610 (traceframe_t): Delete unused variable.
11611 (circular_trace_buffer): Don't include in the IPA.
11612 (trace_buffer_start): Delete.
11613 (struct trace_buffer_control): New.
11614 (trace_buffer_free): Delete.
11615 (struct ipa_trace_buffer_control): New.
11616 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11617 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11618 New.
11619 (trace_buffer_ctrl): New.
11620 (TRACE_BUFFER_CTRL_CURR): New.
11621 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11622 Reimplement as macros.
11623 (trace_buffer_wrap): Delete.
11624 (traceframe_write_count, traceframe_read_count)
11625 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11626 (struct tracepoint_hit_ctx) <type>: New field.
11627 (struct fast_tracepoint_ctx): New.
11628 (memory_barrier): New.
11629 (cmpxchg): New.
11630 (record_tracepoint_error): Update atomically in the IPA.
11631 (clear_inferior_trace_buffer): New.
11632 (about_to_request_buffer_space): New.
11633 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11634 updating the same buffer.
11635 (add_tracepoint): Default the tracepoint's type to trap
11636 tracepoint, and orig_size to -1.
11637 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11638 internal variables.
11639 (create_trace_state_variable): New parameter `gdb'. Handle it.
11640 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11641 (cmd_qtdp): Handle fast tracepoints.
11642 (cmd_qtdv): Adjust.
11643 (max_jump_pad_size): New.
11644 (gdb_jump_pad_head): New.
11645 (get_jump_space_head): New.
11646 (claim_jump_space): New.
11647 (sort_tracepoints): New.
11648 (MAX_JUMP_SIZE): New.
11649 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11650 IPA.
11651 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11652 support. Upload fast traceframes, and delete internal IPA
11653 breakpoints.
11654 (stop_tracing_handler): New.
11655 (flush_trace_buffer_handler): New.
11656 (cmd_qtstop): Upload fast tracepoints.
11657 (response_tracepoint): Handle fast tracepoints.
11658 (tracepoint_finished_step): Upload fast traceframes. Set the
11659 tracepoint hit context's tracepoint type.
11660 (handle_tracepoint_bkpts): New.
11661 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11662 type. Add comment about fast tracepoints.
11663 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11664 non-existing action_str field.
11665 (get_context_regcache): Handle fast tracepoints.
11666 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11667 to the regcache.
11668 (fast_tracepoint_from_jump_pad_address): New.
11669 (fast_tracepoint_from_ipa_tpoint_address): New.
11670 (collecting_t): New.
11671 (force_unlock_trace_buffer): New.
11672 (fast_tracepoint_collecting): New.
11673 (collecting): New.
11674 (gdb_collect): New.
11675 (write_inferior_data_ptr): New.
11676 (target_tp_heap): New.
11677 (target_malloc): New.
11678 (download_agent_expr): New.
11679 (UALIGN): New.
11680 (download_tracepoints): New.
11681 (download_trace_state_variables): New.
11682 (upload_fast_traceframes): New.
11683 (IPA_FIRST_TRACEFRAME): New.
11684 (IPA_NEXT_TRACEFRAME_1): New.
11685 (IPA_NEXT_TRACEFRAME): New.
11686 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11687 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11688 (gdb_jump_pad_buffer_end): New.
11689 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11690 (initialize_tracepoint): Adjust.
11691 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11692 buffer. Initialize the low module.
11693 * utils.c (PREFIX, TOOLNAME): New.
11694 (malloc_failure): Use PREFIX.
11695 (error): In the IPA, an error causes an exit.
11696 (fatal, warning): Use PREFIX.
11697 (internal_error): Use TOOLNAME.
11698 (NUMCELLS): Increase to 10.
11699 * configure, config.in: Regenerate.
11700
d149dd1d
PA
117012010-06-01 Pedro Alves <pedro@codesourcery.com>
11702
11703 * server.c (handle_query) <qSupported>: Do two passes over the
11704 qSupported string to avoid nesting strtok.
11705
f6528abd
JK
117062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11707
11708 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11709 (CDEPS): New.
11710 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11711 -Wl,--dynamic-list.
11712 * configure: Regenerate.
11713 * proc-service.list: New.
11714
ca2a87a0
JK
117152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11716
11717 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11718 New comment.
11719
363a6e9f
OS
117202010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11721
11722 * gdbreplay.c (remote_open): Check error return from socket() call by
11723 its equality to -1 not by it being negative.
11724 * remote-utils.c (remote_open): Likewise.
11725
d23b6cb1
PA
117262010-05-23 Pedro Alves <pedro@codesourcery.com>
11727
11728 * config.h: Regenerate.
11729
28d3cf85
MK
117302010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11731
11732 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11733 doesn't provide PTRACE_GET_THREAD_AREA.
11734
fea36a59
MK
117352010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11736
11737 * linux-m68k-low.c: Include <asm/ptrace.h>
11738 (ps_get_thread_area): Implement.
11739
24b066ba
DE
117402010-05-03 Doug Evans <dje@google.com>
11741
11742 * event-loop.c (struct callback_event): New struct.
11743 (callback_list): New global.
11744 (append_callback_event, delete_callback_event): New functions.
11745 (process_callback): New function.
11746 (start_event_loop): Call it.
11747 * remote-utils.c (NOT_SCHEDULED): Define.
11748 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11749 moved out of readchar.
11750 (readchar): Rewrite. Call reschedule before returning.
11751 (reset_readchar): New function.
11752 (remote_close): Call it.
11753 (process_remaining, reschedule): New functions.
11754 * server.h (callback_handler_func): New typedef.
11755 (append_callback_event, delete_callback_event): Declare.
11756
9836d6ea
PA
117572010-05-03 Pedro Alves <pedro@codesourcery.com>
11758
11759 * proc-service.c (ps_pglobal_lookup): Use
11760 thread_db_look_up_one_symbol.
11761 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11762 parameter. Use it instead of all_symbols_looked_up.
11763 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11764 field.
11765 (all_symbols_looked_up): Don't declare.
11766 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11767 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11768 field.
11769 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11770 Set all_symbols_looked_up here.
11771 (thread_db_look_up_one_symbol): New.
11772 (thread_db_get_tls_address): Adjust.
11773 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11774 thread_db object on the heap, and tentatively set it in the
11775 process structure.
11776 (thread_db_init): Don't set all_symbols_looked_up here.
11777 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11778
7984d532
PA
117792010-05-03 Pedro Alves <pedro@codesourcery.com>
11780
11781 * linux-low.c (linux_kill, linux_detach): Adjust.
11782 (status_pending_p_callback): Remove redundant statement. Check
11783 for !TARGET_WAITIKIND_IGNORE, instead of
11784 TARGET_WAITKIND_STOPPED.
11785 (handle_tracepoints): Make sure LWP is locked. Adjust.
11786 (linux_wait_for_event_1): Adjust.
11787 (linux_cancel_breakpoints): New.
11788 (unsuspend_one_lwp): New.
11789 (unsuspend_all_lwps): New.
11790 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11791 (send_sigstop_callback): Change return type to int, add new
11792 `except' parameter and handle it.
11793 (suspend_and_send_sigstop_callback): New.
11794 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11795 pass them down. If SUSPEND, also increment the lwp's suspend
11796 count.
11797 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11798 (need_step_over_p): Don't consider suspended LWPs.
11799 (start_step_over): Adjust.
11800 (proceed_one_lwp): Change return type to int, add new `except'
11801 parameter and handle it.
11802 (unsuspend_and_proceed_one_lwp): New.
11803 (proceed_all_lwps): Use find_inferior instead of
11804 for_each_inferior.
11805 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11806 also decrement the suspend count of LWPs. Pass `except' down,
11807 instead of hacking its suspend count.
11808 (linux_pause_all): Add `freeze' parameter. Adjust.
11809 (linux_unpause_all): New.
11810 (linux_target_ops): Install linux_unpause_all.
11811 * server.c (handle_status): Adjust.
11812 * target.h (struct target_ops): New fields `unpause_all' and
11813 `cancel_breakpoints'. Add new parameter to `pause_all'.
11814 (pause_all): Add new `freeze' parameter.
11815 (unpause_all): New.
11816 (cancel_breakpoints): New.
11817 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11818 cancel breakpoints.
11819 (cmd_qtstart): Pause threads.
11820 (stop_tracing): Pause threads, and cancel breakpoints.
11821 * win32-low.c (win32_target_ops): Adjust.
11822
e471f25b
PA
118232010-05-03 Pedro Alves <pedro@codesourcery.com>
11824
11825 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11826 the inferior right away from here...
11827 (linux_wait_1): ... to here, and adjust to check the thread's
11828 last_resume_kind instead of the lwp's step or stop_expected flags.
11829
1915ef4f
PA
118302010-05-02 Pedro Alves <pedro@codesourcery.com>
11831
11832 * README: Use consistent `GDB' and `GDBserver' spellings.
11833
f9e39928
PA
118342010-05-02 Pedro Alves <pedro@codesourcery.com>
11835
11836 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11837 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11838 (linux_detach_one_lwp): Assume the lwp is stopped.
11839 (any_thread_of): Delete.
11840 (linux_detach): Stop all lwps here. Don't blindly delete all
11841 breakpoints.
11842 (delete_lwp_callback): New.
11843 (linux_mourn): Delete all lwps of the process that is gone.
11844 (linux_wait_1): Don't delete the last lwp of the process here.
11845 * mem-break.h (mark_breakpoints_out): Declare.
11846 * mem-break.c (mark_breakpoints_out): New.
11847 (free_all_breakpoints): Use it.
11848 * server.c (handle_target_event): If the process is gone, mark
11849 breakpoints out.
11850 * thread-db.c (struct thread_db) <create_bp>: New field.
11851 (thread_db_enable_reporting): Fix prototype. Store a thread event
11852 breakpoint reference in the thread_db struct.
11853 (thread_db_load_search): Clear the thread_db object.
11854 (try_thread_db_load_1): Ditto.
11855 (switch_to_process): New.
11856 (disable_thread_event_reporting): Use it.
11857 (remove_thread_event_breakpoints): New.
11858 (thread_db_detach, thread_db_mourn): Use it.
11859
1e7fc18c
PA
118602010-05-01 Pedro Alves <pedro@codesourcery.com>
11861
11862 * linux-low.c (linux_enable_event_reporting): New.
11863 (linux_wait_for_event_1, handle_extended_wait): Use it.
11864
02fc4de7
PA
118652010-04-30 Pedro Alves <pedro@codesourcery.com>
11866
11867 * linux-low.c (linux_kill_one_lwp, linux_kill)
11868 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11869 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11870 SIGSTOP even if the LWP is stopped.
11871 (send_sigstop_callback): New.
11872 (stop_all_lwps): Use send_sigstop_callback instead.
11873 (linux_resume_one_thread): Adjust.
11874 (proceed_one_lwp): Still proceed an LWP that the client has
11875 requested to stop, if we haven't reported it as stopped yet. Make
11876 sure that LWPs the client want stopped, have a pending SIGSTOP.
11877
bc3b5632
DE
118782010-04-26 Doug Evans <dje@google.com>
11879
ae1ada35
DE
11880 * server.c (handle_general_set): Make static.
11881
bc3b5632
DE
11882 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11883 Print received char after testing for error/eof instead of before.
11884 (input_interrupt): Tweak comment.
11885
65730243
DE
118862010-04-23 Doug Evans <dje@google.com>
11887
11888 * server.c (start_inferior): Print inferior argv if --debug.
11889
a8ae7dc0
AR
118902010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11891
11892 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11893 * nto-x86-low.c: Include server.h
11894
1c07cc19
PM
118952010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11896
11897 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11898 be consistent with other sources of this directory.
11899 (init_registers_amd64): Correct name of source file of this function
11900 in the comment.
11901
e0a61e09
PM
119022010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11903
11904 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11905 64-bit executables.
11906
54709339
PM
119072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11908
11909 * win32-i386-low.c: Add 64-bit support.
11910 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11911 (init_registers_amd64): Declare.
11912 (mappings): Add 64-bit version of array.
11913 (init_windows_x86): New function.
11914 (the_low_target): Change init_arch field to init_windows_x86.
11915
e8f0053d
PM
119162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11917
11918 * win32-low.c: Adapt to support also 64-bit architecture.
11919 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11920 (get_image_name): Use SIZE_T type for local variable `done'.
11921 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11922 (toolhelp_get_dll_name): Idem.
11923 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11924 Use uintptr_t typecast to avoid warning.
11925 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11926 (handle_exception): Use phex_nz to avoid warning.
11927 (win32_wait): Remove unused local variable `process'.
11928
c481e77e
PM
119292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11930
11931 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11932 `amd64-avx.o'.
11933
12ea4b69
PM
119342010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11935
11936 * configure.ac: Use `ws2_32' library for srv_mingw.
11937 * configure: Regenerate.
11938 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11939 * remote-utils.c: Likewise.
11940
f6d1620c
L
119412010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11942
11943 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11944 if __x86_64__ is defined.
11945
8e642873
PM
119462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11947
11948 * configure: Regenerate.
11949
711e434b
PM
119502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11951
11952 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11953 * target.h (target_ops): New get_tib_address field.
11954 * win32-low.h (win32_thread_info): Add thread_local_base field.
11955 * win32-low.c (child_add_thread): Add tlb argument.
11956 Set thread_local_base field to TLB.
11957 (get_child_debug_event): Adapt to child_add_thread change.
11958 (win32_get_tib_address): New function.
11959 (win32_target_ops): Set get_tib_address field to
11960 win32_get_tib_address.
11961 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11962
505106cd
PA
119632010-04-12 Pedro Alves <pedro@codesourcery.com>
11964
505106cd
PA
11965 * linux-low.c (linux_mourn): Also remove the process.
11966 * server.c (handle_target_event): Don't remove the process here.
11967 * nto-low.c (nto_mourn): New.
11968 (nto_target_ops): Install it.
11969 * spu-low.c (spu_mourn): New.
11970 (spu_target_ops): Install it.
11971 * win32-low.c (win32_mourn): New.
11972 (win32_target_ops): Install it.
11973
e8470a06
PA
119742010-04-12 Pedro Alves <pedro@codesourcery.com>
11975
11976 * server.h (buffer_xml_printf): Remove redundant `;'.
11977
45ba0d02
PA
119782010-04-12 Pedro Alves <pedro@codesourcery.com>
11979
11980 * regcache.c (set_register_cache): Invalidate regcaches before
11981 changing the register cache layout.
11982 (regcache_invalidate_one): Allow a NULL regcache.
11983 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11984 regcaches before changing the register cache layout or the target
11985 regsets.
11986
59e04013
L
119872010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11988
11989 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11990 variable warning on Linux/x86-64.
11991
8336d594
PA
119922010-04-11 Pedro Alves <pedro@codesourcery.com>
11993
11994 GDBserver disconnected tracing support.
11995
11996 * linux-low.c (linux_remove_process): Delete.
11997 (add_lwp): Don't set last_resume_kind here.
11998 (linux_kill): Use `mourn'.
11999 (linux_detach): Use `thread_db_detach', and `mourn'.
12000 (linux_mourn): New.
12001 (linux_attach_lwp_1): Adjust comment.
12002 (linux_attach): last_resume_kind moved the thread_info; adjust.
12003 (status_pending_p_callback): Adjust.
12004 (linux_wait_for_event_1): Adjust.
12005 (count_events_callback, select_singlestep_lwp_callback)
12006 (select_event_lwp_callback, cancel_breakpoints_callback)
12007 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12008 (proceed_one_lwp): Adjust.
12009 (linux_async): Add debug output.
12010 (linux_thread_stopped): New.
12011 (linux_pause_all): New.
12012 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12013 linux_pause_all.
12014 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12015 (thread_db_free): Delete declaration.
12016 (thread_db_detach, thread_db_mourn): Declare.
12017 * thread-db.c (thread_db_init): Use thread_db_mourn.
12018 (thread_db_free): Delete, split in two.
12019 (disable_thread_event_reporting): New.
12020 (thread_db_detach): New.
12021 (thread_db_mourn): New.
12022
12023 * server.h (struct thread_info) <last_resume_kind>: New field.
12024 <attached>: Add comment.
12025 <gdb_detached>: New field.
12026 (handler_func): Change return type to int.
12027 (handle_serial_event, handle_target_event): Ditto.
12028 (gdb_connected): Declare.
12029 (tracing): Delete.
12030 (disconnected_tracing): Declare.
12031 (stop_tracing): Declare.
12032
12033 * server.c (handle_query) <qSupported>: Report support for
12034 disconnected tracing.
12035 (queue_stop_reply_callback): Account for running threads.
12036 (gdb_wants_thread_stopped): New.
12037 (gdb_wants_all_threads_stopped): New.
12038 (gdb_reattached_process): New.
12039 (handle_status): Clear the `gdb_detached' flag of all processes.
12040 In all-stop, stop all threads.
12041 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12042 (process_serial_event): If the remote connection breaks, or if an
12043 exit was forced with "monitor exit", force an event loop exit.
12044 Handle disconnected tracing on detach.
12045 (handle_serial_event): Adjust.
12046 (handle_target_event): If GDB isn't connected, forward events back
12047 to the inferior, unless the last process exited, in which case,
12048 exit gdbserver. Adjust interface.
12049
12050 * remote-utils.c (remote_open): Don't block in accept. Instead
12051 register an event loop source on the listen socket file
12052 descriptor. Refactor bits into ...
12053 (listen_desc): ... this new global.
12054 (gdb_connected): ... this new function.
12055 (enable_async_notification): ... this new function.
12056 (handle_accept_event): ... this new function.
12057 (remote_close): Clear remote_desc.
12058
12059 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12060
12061 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12062 New fields.
12063 (mourn_inferior): Define.
12064 (target_process_qsupported): Avoid the dangling else problem.
12065 (thread_stopped): Define.
12066 (pause_all): Define.
12067 (target_waitstatus_to_string): Declare.
12068 * target.c (target_waitstatus_to_string): New.
12069
12070 * tracepoint.c (tracing): Make extern.
12071 (disconnected_tracing): New.
12072 (stop_tracing): Make extern. Handle tracing stops due to GDB
12073 disconnecting.
12074 (cmd_qtdisconnected): New.
12075 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12076 (handle_tracepoint_general_set): Handle QTDisconnected.
12077
12078 * event-loop.c (event_handler_func): Change return type to int.
12079 (process_event): Bail out if the event handler wants the event
12080 loop to stop.
12081 (handle_file_event): Ditto.
12082 (start_event_loop): Bail out if the event handler wants the event
12083 loop to stop.
12084
12085 * nto-low.c (nto_target_ops): Adjust.
12086 * spu-low.c (spu_wait): Don't remove the process here.
12087 (spu_target_ops): Adjust.
12088 * win32-low.c (win32_wait): Don't remove the process here.
12089 (win32_target_ops): Adjust.
12090
5d267c4c
PA
120912010-04-11 Pedro Alves <pedro@codesourcery.com>
12092
12093 * regcache.c (realloc_register_cache): Invalidate inferior's
12094 regcache before recreating it.
12095
623ccd72
PA
120962010-04-09 Pedro Alves <pedro@codesourcery.com>
12097
12098 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12099
219f2f23
PA
121002010-04-09 Stan Shebs <stan@codesourcery.com>
12101 Pedro Alves <pedro@codesourcery.com>
12102
12103 * server.h (LONGEST): New.
12104 (struct thread_info) <while_stepping>: New field.
12105 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12106 Declare.
12107 (initialize_tracepoint, handle_tracepoint_general_set)
12108 (handle_tracepoint_query, tracepoint_finished_step)
12109 (tracepoint_was_hit, release_while_stepping_state_list):
12110 (current_traceframe): Declare.
12111 * server.c (handle_general_set): Handle tracepoint packets.
12112 (read_memory): New.
12113 (write_memory): New.
12114 (handle_search_memory_1): Use read_memory.
12115 (handle_query): Report support for conditional tracepoints, trace
12116 state variables, and tracepoint sources. Handle tracepoint
12117 queries.
12118 (main): Initialize the tracepoints module.
12119 (process_serial_event): Handle traceframe reads/writes.
12120
12121 * linux-low.c (handle_tracepoints): New.
12122 (linux_wait_1): Call it.
12123 (linux_resume_one_lwp): Handle while-stepping.
12124 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12125 (linux_target_ops): Install them.
12126 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12127 New field.
12128 * linux-x86-low.c (x86_supports_tracepoints): New.
12129 (the_low_target). Install it.
12130
12131 * mem-break.h (delete_breakpoint): Declare.
12132 * mem-break.c (delete_breakpoint): Make external.
12133
12134 * target.h (struct target_ops): Add `supports_tracepoints',
12135 `read_pc', and `write_pc' fields.
12136 (target_supports_tracepoints): Define.
12137 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12138 (phex_nz): New.
12139
12140 * regcache.h (struct regcache) <registers_owned>: New field.
12141 (init_register_cache, regcache_cpy): Declare.
12142 (regcache_read_pc, regcache_write_pc): Declare.
12143 (register_cache_size): Declare.
12144 (supply_regblock): Declare.
12145 * regcache.c (init_register_cache): New.
12146 (new_register_cache): Use it.
12147 (regcache_cpy): New.
12148 (register_cache_size): New.
12149 (supply_regblock): New.
12150 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12151
219f2f23
PA
12152 * tracepoint.c: New.
12153
12154 * Makefile.in (OBS): Add tracepoint.o.
12155 (tracepoint.o): New rule.
12156
3a13a53b
L
121572010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12158
12159 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12160 (i386-mmx.o): New.
12161 (i386-mmx.c): Likewise.
12162 (i386-mmx-linux.o): Likewise.
12163 (i386-mmx-linux.c): Likewise.
12164
12165 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12166 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12167 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12168 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12169
12170 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12171 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12172 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12173
1570b33e
L
121742010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12175
12176 * Makefile.in (clean): Updated.
12177 (i386-avx.o): New.
12178 (i386-avx.c): Likewise.
12179 (i386-avx-linux.o): Likewise.
12180 (i386-avx-linux.c): Likewise.
12181 (amd64-avx.o): Likewise.
12182 (amd64-avx.c): Likewise.
12183 (amd64-avx-linux.o): Likewise.
12184 (amd64-avx-linux.c): Likewise.
12185
12186 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12187 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12188 (srv_amd64_regobj): Add amd64-avx.o.
12189 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12190 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12191 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12192 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12193 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12194 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12195 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12196
12197 * i387-fp.c: Include "i386-xstate.h".
12198 (i387_xsave): New.
12199 (i387_cache_to_xsave): Likewise.
12200 (i387_xsave_to_cache): Likewise.
12201 (x86_xcr0): Likewise.
12202
12203 * i387-fp.h (i387_cache_to_xsave): Likewise.
12204 (i387_xsave_to_cache): Likewise.
12205 (x86_xcr0): Likewise.
12206
12207 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12208 * linux-crisv32-low.c (target_regsets): Likewise.
12209 * linux-m68k-low.c (target_regsets): Likewise.
12210 * linux-mips-low.c (target_regsets): Likewise.
12211 * linux-ppc-low.c (target_regsets): Likewise.
12212 * linux-s390-low.c (target_regsets): Likewise.
12213 * linux-sh-low.c (target_regsets): Likewise.
12214 * linux-sparc-low.c (target_regsets): Likewise.
12215 * linux-xtensa-low.c (target_regsets): Likewise.
12216
12217 * linux-low.c: Include <sys/uio.h>.
12218 (regsets_fetch_inferior_registers): Support nt_type.
12219 (regsets_store_inferior_registers): Likewise.
12220 (linux_process_qsupported): New.
12221 (linux_target_ops): Add linux_process_qsupported.
12222
12223 * linux-low.h (regset_info): Add nt_type.
12224 (linux_target_ops): Add process_qsupported.
12225
12226 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12227 and <sys/uio.h>.
12228 (init_registers_i386_avx_linux): New.
12229 (init_registers_amd64_avx_linux): Likewise.
12230 (xmltarget_i386_linux_no_xml): Likewise.
12231 (xmltarget_amd64_linux_no_xml): Likewise.
12232 (PTRACE_GETREGSET): Likewise.
12233 (PTRACE_SETREGSET): Likewise.
12234 (x86_fill_xstateregset): Likewise.
12235 (x86_store_xstateregset): Likewise.
12236 (use_xml): Likewise.
12237 (x86_linux_update_xmltarget): Likewise.
12238 (x86_linux_process_qsupported): Likewise.
12239 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12240 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12241 init_registers_i386_linux here. Call
12242 x86_linux_update_xmltarget.
12243 (the_low_target): Add x86_linux_process_qsupported.
12244
12245 * server.c (handle_query): Call target_process_qsupported.
12246
12247 * target.h (target_ops): Add process_qsupported.
12248 (target_process_qsupported): New.
12249
fc7238bb
PA
122502010-04-03 Pedro Alves <pedro@codesourcery.com>
12251
12252 * inferiors.c (add_thread): Set last_status kind to
12253 TARGET_WAITKIND_IGNORE.
12254 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12255 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12256 (linux_wait_1): Move `thread' local definition to block that uses
12257 it. Don't NULL initialize `event_child'.
12258 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12259 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12260 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12261
bdabb078
PA
122622010-04-01 Pedro Alves <pedro@codesourcery.com>
12263
12264 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12265 an extended waitstatus, or by a watchpoint.
12266 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12267 thread was stepping or has been stopped by a watchpoint.
12268
d3bbe7a0
PA
122692010-04-01 Pedro Alves <pedro@codesourcery.com>
12270
12271 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12272 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12273 of another, then delete the previous, and validate all
12274 breakpoints.
12275 (validate_inserted_breakpoint): New.
12276 (delete_disabled_breakpoints): New.
12277 (validate_breakpoints): New.
12278 (check_mem_read): Validate breakpoints before trusting their
12279 shadow. Delete disabled breakpoints.
12280 (check_mem_write): Validate breakpoints before trusting they
12281 should be inserted. Delete disabled breakpoints.
12282 * mem-break.h (validate_breakpoints):
12283 * server.c (handle_query): Validate breakpoints when we see a
12284 qSymbol query.
12285
8b07ae33
PA
122862010-04-01 Pedro Alves <pedro@codesourcery.com>
12287
12288 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12289 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12290 if we could tell there's a GDB breakpoint at stop_pc.
12291 (need_step_over_p): Don't do a step over if we find a GDB
12292 breakpoint at the resume PC.
12293
12294 * mem-break.c (struct raw_breakpoint): New.
12295 (enum bkpt_type): New type `gdb_breakpoint'.
12296 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12297 fields. New field `raw'.
12298 (find_raw_breakpoint_at): New.
12299 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12300 breakpoint instead.
12301 (set_breakpoint_at): Adjust.
12302 (delete_raw_breakpoint): New.
12303 (release_breakpoint): New.
12304 (delete_breakpoint): Rename to...
12305 (delete_breakpoint_1): ... this. Add proc parameter. Use
12306 release_breakpoint. Return ENOENT.
12307 (delete_breakpoint): Reimplement.
12308 (find_breakpoint_at): Delete.
12309 (find_gdb_breakpoint_at): New.
12310 (delete_breakpoint_at): Delete.
12311 (set_gdb_breakpoint_at): New.
12312 (delete_gdb_breakpoint_at): New.
12313 (gdb_breakpoint_here): New.
12314 (set_reinsert_breakpoint): Use release_breakpoint.
12315 (uninsert_breakpoint): Rename to ...
12316 (uninsert_raw_breakpoint): ... this.
12317 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12318 (reinsert_raw_breakpoint): Change parameter type to
12319 raw_breakpoint.
12320 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12321 instead.
12322 (check_breakpoints): Adjust. Use release_breakpoint.
12323 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12324 (breakpoint_inserted_here): Ditto.
12325 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12326 Don't trust the breakpoint's shadow if it is not inserted.
12327 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12328 (delete_all_breakpoints): Adjust.
12329 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12330 use delete_breakpoint_1.
12331
12332 * mem-break.h (breakpoints_supported): Delete declaration.
12333 (set_gdb_breakpoint_at): Declare.
12334 (gdb_breakpoint_here): Declare.
12335 (delete_breakpoint_at): Delete.
12336 (delete_gdb_breakpoint_at): Declare.
12337
12338 * server.h (struct raw_breakpoint): Forward declare.
12339 (struct process_info): New field `raw_breakpoints'.
12340
12341 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12342 breakpoints.
12343
6bf5e0ba
PA
123442010-03-24 Pedro Alves <pedro@codesourcery.com>
12345
12346 * linux-low.c (status_pending_p_callback): Fix comment.
12347 (linux_wait_for_event_1): Move most of the internal breakpoint
12348 handling from here...
12349 (linux_wait_1): ... to here.
12350 (count_events_callback): New.
12351 (select_singlestep_lwp_callback): New.
12352 (select_event_lwp_callback): New.
12353 (cancel_breakpoints_callback): New.
12354 (select_event_lwp): New.
12355 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12356 priority to all LWPs that have had events that should be reported
12357 to the client. Cancel breakpoints when about to reporting the
12358 event to the client, not while stopping lwps. No longer cancel
12359 finished single-steps here.
12360 (cancel_finished_single_step): Delete.
12361 (cancel_finished_single_steps): Delete.
12362
414a389f
PA
123632010-03-24 Pedro Alves <pedro@codesourcery.com>
12364
12365 * mem-break.c (enum bkpt_type): New.
12366 (struct breakpoint): New field `type'.
12367 (set_breakpoint_at): Change return type to struct breakpoint
12368 pointer. Set type to `other_breakpoint' by default.
12369 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12370 in the breakpoint list.
12371 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12372 (reinsert_breakpoint): Rename to ...
12373 (reinsert_raw_breakpoint): ... this.
12374 (reinsert_breakpoints_at): Adjust.
12375 * mem-break.h (struct breakpoint): Declare.
12376 (set_breakpoint_at): Change return type to struct breakpoint
12377 pointer.
12378
2280c721
PA
123792010-03-24 Pedro Alves <pedro@codesourcery.com>
12380
12381 * server.c (handle_query): Assign, not compare.
12382
d50171e4
PA
123832010-03-24 Pedro Alves <pedro@codesourcery.com>
12384
12385 Teach linux gdbserver to step-over-breakpoints.
12386
12387 * linux-low.c (can_hardware_single_step): New.
12388 (supports_breakpoints): New.
12389 (handle_extended_wait): If stopping threads, read the stop pc of
12390 the new cloned LWP.
12391 (get_pc): New.
12392 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12393 low target doesn't support retrieving the PC.
12394 (add_lwp): Set last_resume_kind to resume_continue.
12395 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12396 (linux_attach): Don't clear stop_expected. Set the lwp's
12397 last_resume_kind to resume_stop.
12398 (linux_detach_one_lwp): Don't check for removed breakpoints.
12399 (check_removed_breakpoint): Delete.
12400 (status_pending_p): Rename to ...
12401 (status_pending_p_callback): ... this. Don't check for removed
12402 breakpoints. Don't consider threads that are stopped from GDB's
12403 perspective.
12404 (linux_wait_for_lwp): Always read the stop_pc here.
12405 (cancel_breakpoint): New.
12406 (step_over_bkpt): New global.
12407 (linux_wait_for_event_1): Implement stepping over breakpoints.
12408 (gdb_wants_lwp_stopped): New.
12409 (gdb_wants_all_stopped): New.
12410 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12411 single-step traps here. Store the thread's last reported target
12412 wait status.
12413 (send_sigstop): Don't clear stop_expected. Always set it,
12414 instead.
12415 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12416 (cancel_finished_single_step): New.
12417 (cancel_finished_single_steps): New.
12418 (wait_for_sigstop): Don't cancel finished single-step traps here.
12419 (linux_resume_one_lwp): Don't check for removed breakpoints.
12420 Don't set `step' on non-hardware step archs.
12421 (linux_set_resume_request): Ignore resume_stop requests if already
12422 stopping or stopped. Set the lwp's last_resume_kind.
12423 (resume_status_pending_p): Don't check for removed breakpoints.
12424 (need_step_over_p): New.
12425 (start_step_over): New.
12426 (finish_step_over): New.
12427 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12428 requests. Clear the thread's last reported target waitstatus.
12429 Don't use the `suspended' flag. Don't consider pending breakpoints.
12430 (linux_resume): Start a step-over if necessary.
12431 (proceed_one_lwp): New.
12432 (proceed_all_lwps): New.
12433 (unstop_all_lwps): New.
12434 * linux-low.h (struct lwp_info): Rewrite comment for the
12435 `suspended' flag. Add the `stop_pc' field. Delete the
12436 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12437 Add `'last_resume_kind' and `need_step_over' fields.
12438 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12439 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12440 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12441 (set_raw_breakpoint_at): New.
12442 (set_breakpoint_at): Rewrite to use it.
12443 (reinsert_breakpoint_handler): Delete.
12444 (set_reinsert_breakpoint): New.
12445 (reinsert_breakpoint_by_bp): Delete.
12446 (delete_reinsert_breakpoints): New.
12447 (uninsert_breakpoint): Rewrite.
12448 (uninsert_breakpoints_at): New.
12449 (reinsert_breakpoint): Rewrite.
12450 (reinsert_breakpoints_at): New.
12451 (check_breakpoints): Rewrite.
12452 (breakpoint_here): New.
12453 (breakpoint_inserted_here): New.
12454 (check_mem_read): Adjust.
12455 * mem-break.h (breakpoints_supported, breakpoint_here)
12456 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12457 (reinsert_breakpoint_by_bp): Delete declaration.
12458 (delete_reinsert_breakpoints): Declare.
12459 (reinsert_breakpoint): Delete declaration.
12460 (reinsert_breakpoints_at): Declare.
12461 (uninsert_breakpoint): Delete declaration.
12462 (uninsert_breakpoints_at): Declare.
12463 (check_breakpoints): Adjust prototype.
12464 * server.h: Adjust include order.
12465 (struct thread_info): Declare here. Add a `last_status' field.
12466
30ba68cb
MS
124672010-03-23 Michael Snyder <msnyder@vmware.com>
12468
12469 * server.c (crc32): New function.
12470 (handle_query): Add handling for 'qCRC:' request.
12471
b9a881c2
PA
124722010-03-23 Pedro Alves <pedro@codesourcery.com>
12473
12474 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12475 lwp had been stopped by a watchpoint.
12476
e92d13d5
PA
124772010-03-16 Pedro Alves <pedro@codesourcery.com>
12478
12479 * server.h (internal_error): Declare.
12480 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12481 * utils.c (internal_error): New function.
12482
64daa791
AS
124832010-03-15 Andreas Schwab <schwab@redhat.com>
12484
12485 * configure.srv: Fix typo setting srv_regobj.
12486
f52cd8cd
PA
124872010-03-15 Pedro Alves <pedro@codesourcery.com>
12488
12489 * linux-low.c (fetch_register): Avoid passing a non string literal
12490 format to `error'.
12491 (usr_store_inferior_registers): Ditto.
12492
93ae6fdc
PA
124932010-03-14 Pedro Alves <pedro@codesourcery.com>
12494
12495 * linux-low.c (linux_write_memory): Bail out early if peeking
12496 memory failed.
12497
c3adc08c
PA
124982010-03-14 Pedro Alves <pedro@codesourcery.com>
12499
12500 * linux-low.h (struct lwp_info): New fields
12501 `stopped_by_watchpoint' and `stopped_data_address'.
12502 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12503 here, and cache them in the lwp object.
12504 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12505 directly.
12506 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12507 field.
12508 (linux_stopped_by_watchpoint): Rewrite.
12509 (linux_stopped_data_address): Rewrite.
12510
bce522a2
PA
125112010-03-06 Simo Melenius <simo.melenius@iki.fi>
12512
12513 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12514 switching the current inferior, not before.
12515
90884b2b
L
125162010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12517
12518 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12519 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12520 i386-linux.c and amd64-linux.c.
12521 (reg-i386.o): Removed.
12522 (reg-i386.c): Likewise.
12523 (reg-i386-linux.o): Likewise.
12524 (reg-i386-linux.c): Likewise.
12525 (reg-x86-64.o): Likewise.
12526 (reg-x86-64.c): Likewise.
12527 (reg-x86-64-linux.o): Likewise.
12528 (reg-x86-64-linux.c): Likewise.
12529 (i386.o): New.
12530 (i386.c): Likewise.
12531 (i386-linux.o): Likewise.
12532 (i386-linux.c): Likewise.
12533 (amd64.o): Likewise.
12534 (amd64.c): Likewise.
12535 (amd64-linux.o): Likewise.
12536 (amd64-linux.c): Likewise.
12537
12538 * configure.srv (srv_i386_regobj): New.
12539 (srv_i386_linux_regobj): Likewise.
12540 (srv_amd64_regobj): Likewise.
12541 (srv_amd64_linux_regobj): Likewise.
12542 (srv_i386_32bit_xmlfiles): Likewise.
12543 (srv_i386_64bit_xmlfiles): Likewise.
12544 (srv_i386_xmlfiles): Likewise.
12545 (srv_amd64_xmlfiles): Likewise.
12546 (srv_i386_linux_xmlfiles): Likewise.
12547 (srv_amd64_linux_xmlfiles): Likewise.
12548 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12549 srv_xmlfiles to $srv_i386_xmlfiles.
12550 (i[34567]86-*-mingw32ce*): Likewise.
12551 (i[34567]86-*-mingw*): Likewise.
12552 (i[34567]86-*-nto*): Likewise.
12553 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12554 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12555 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12556 (x86_64-*-linux*): Likewise.
12557
12558 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12559 (init_registers_amd64_linux): New.
12560 (x86_arch_setup): Replace init_registers_x86_64_linux with
12561 init_registers_amd64_linux.
12562
193f13e6
MK
125632010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12564
12565 * configure.ac: Check for libdl. If it is not available link against
12566 static libthread_db.
12567 * configure: Regenerate.
12568
85d721b8
PA
125692010-02-22 Pedro Alves <pedro@codesourcery.com>
12570
12571 PR9605
12572
12573 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12574 handing a read watchpoint.
12575 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12576
6076632b
DE
125772010-02-12 Doug Evans <dje@google.com>
12578
12579 * linux-low.c (linux_supports_tracefork_flag): Document.
12580 (linux_look_up_symbols): Add comment.
12581
3327ccf7
L
125822010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12583
12584 * regcache.c (supply_register): Clear regcache if buf is NULL.
12585
0718675c 125862010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12587 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12588
12589 * inferiors.c (find_inferior): Add function documentation.
12590 (unloaded_dll): Handle the case where the unloaded dll has not
12591 been previously registered in the dll list.
12592
177321bd
DJ
125932010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12594
12595 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12596 (thumb2_breakpoint): New.
12597 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12598
2b009048
DJ
125992010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12600
12601 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12602 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12603 breakpoints.
12604
3be029c7
PA
126052010-01-21 Pedro Alves <pedro@codesourcery.com>
12606
12607 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12608
18f5de3b
JK
126092010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12610
12611 * linux-s390-low.c (s390_collect_ptrace_register)
12612 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12613
3743bb4f
DE
126142010-01-21 Doug Evans <dje@google.com>
12615
14ce3065
DE
12616 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12617 (PTRACE_ARG4_TYPE): New macro.
12618 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12619 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12620 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12621 (usr_store_inferior_registers): Ditto.
12622 (linux_read_memory, linux_write_memory): Ditto.
12623 (linux_test_for_tracefork): Ditto.
12624
3743bb4f
DE
12625 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12626 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12627
8b315be5
PA
126282010-01-21 Pedro Alves <pedro@codesourcery.com>
12629
12630 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12631 target.
12632
85492558
PA
126332010-01-21 Pedro Alves <pedro@codesourcery.com>
12634
12635 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12636 prototype to take a regcache. Adjust.
12637
442ea881
PA
126382010-01-20 Pedro Alves <pedro@codesourcery.com>
12639
12640 * regcache.h (struct thread_info): Forward declare.
12641 (struct regcache): New.
12642 (new_register_cache): Adjust prototype.
12643 (get_thread_regcache): Declare.
12644 (free_register_cache): Adjust prototype.
12645 (registers_to_string, registers_from_string): Ditto.
12646 (supply_register, supply_register_by_name, collect_register)
12647 (collect_register_as_string, collect_register_by_name): Ditto.
12648 * regcache.c (struct inferior_regcache_data): Delete.
12649 (get_regcache): Rename to ...
12650 (get_thread_regcache): ... this. Adjust. Switch inferior before
12651 fetching registers.
12652 (regcache_invalidate_one): Adjust.
12653 (regcache_invalidate): Fix prototype.
12654 (new_register_cache): Return the new register cache.
12655 (free_register_cache): Change prototype.
12656 (realloc_register_cache): Adjust.
12657 (registers_to_string): Change prototype to take a regcache. Adjust.
12658 (registers_from_string): Ditto.
12659 (register_data): Ditto.
12660 (supply_register): Ditto.
12661 (supply_register_by_name): Ditto.
12662 (collect_register): Ditto.
12663 (collect_register_as_string): Ditto.
12664 (collect_register_by_name): Ditto.
12665 * server.c (process_serial_event): Adjust.
12666 * linux-low.h (regset_fill_func, regset_store_func): Change
12667 prototype.
12668 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12669 Change prototype.
12670 * linux-low.c (get_stop_pc): Adjust.
12671 (check_removed_breakpoint): Adjust.
12672 (linux_wait_for_event): Adjust.
12673 (linux_resume_one_lwp): Adjust.
12674 (fetch_register): Add regcache parameter. Adjust.
12675 (usr_store_inferior_registers): Ditto.
12676 (regsets_fetch_inferior_registers): Ditto.
12677 (regsets_store_inferior_registers): Ditto.
12678 (linux_fetch_registers, linux_store_registers): Ditto.
12679 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12680 regcache. Adjust.
43aaf8b6
PA
12681 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12682 Ditto.
442ea881
PA
12683 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12684 prototype to take a regcache.
12685 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12686 * remote-utils.c (convert_ascii_to_int, outreg)
12687 (prepare_resume_reply): Change prototype to take a regcache.
12688 Adjust.
12689 * target.h (struct target_ops) <fetch_registers, store_registers>:
12690 Change prototype to take a regcache.
12691 (fetch_inferior_registers, store_inferior_registers): Change
12692 prototype to take a regcache. Adjust.
12693 * proc-service.c (ps_lgetregs): Adjust.
12694 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12695 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12696 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12697 take a regcache. Adjust.
12698 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12699 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12700 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12701 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12702 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12703 (cris_cannot_fetch_register):
12704 (cris_breakpoint_at): Change prototype to take a regcache.
12705 Adjust.
12706 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12707 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12708 to take a regcache. Adjust.
12709 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12710 Adjust.
12711 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12712 take a regcache. Adjust.
12713 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12714 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12715 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12716 * linux-mips-low.c (mips_get_pc):
12717 (mips_set_pc): Change prototype to take a regcache. Adjust.
12718 (mips_reinsert_addr): Adjust.
12719 (mips_collect_register): Change prototype to take a regcache.
12720 Adjust.
12721 (mips_supply_register):
12722 (mips_collect_register_32bit, mips_supply_register_32bit)
12723 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12724 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12725 * linux-ppc-low.c (ppc_supply_ptrace_register)
12726 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12727 (parse_spufs_run): Adjust.
12728 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12729 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12730 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12731 take a regcache. Adjust.
12732 * linux-s390-low.c (s390_collect_ptrace_register)
12733 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12734 (s390_set_pc): Change prototype to take a regcache. Adjust.
12735 (s390_arch_setup): Adjust.
12736 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12737 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12738 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12739 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12740 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12741 regcache. Adjust.
12742 (sparc_breakpoint_at): Adjust.
12743 * linux-xtensa-low.c (xtensa_fill_gregset):
12744 (xtensa_store_gregset):
12745 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12746 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12747 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12748 prototype to take a regcache. Adjust.
12749 * win32-arm-low.c (arm_fetch_inferior_register)
12750 (arm_store_inferior_register): Change prototype to take a
12751 regcache. Adjust.
12752 * win32-i386-low.c (i386_fetch_inferior_register)
12753 (i386_store_inferior_register): Change prototype to take a
12754 regcache. Adjust.
12755 * win32-low.c (child_fetch_inferior_registers)
12756 (child_store_inferior_registers): Change prototype to take a
12757 regcache. Adjust.
12758 (win32_wait): Adjust.
12759 (win32_fetch_inferior_registers): Change prototype to take a
12760 regcache. Adjust.
12761 (win32_store_inferior_registers): Adjust.
12762 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12763 store_inferior_register>: Change prototype to take a regcache.
12764
60c3d7b0
DE
127652010-01-20 Doug Evans <dje@google.com>
12766
12767 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12768 #ifdef.
12769 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12770 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12771
dc146f7c
VP
127722010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12773
12774 * linux-low.c (linux_core_of_thread): New.
12775 (compare_ints, show_process, list_threads): New.
12776 (linux_qxfer_osdata): Report threads and cores.
12777 (linux_target_op): Register linux_core_of_thread.
12778 * remote-utils.c (prepare_resume_reply): Report the core.
12779 (buffer_xml_printf): Support %d specifier.
12780 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12781 New.
12782 (handle_query): Handle qXfer:threads. Announce availability
12783 thereof.
12784 * target.h (struct target_ops): New field core_of_thread.
12785
7803799a
UW
127862010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12787
12788 * Makefile.in (clean): Remove new generated files.
12789 (reg-s390.o, reg-s390.c): Remove rules.
12790 (reg-s390x.o, reg-s390x.c): Likewise.
12791 (s390-linux32.o, s390-linux32.c): Add rules.
12792 (s390-linux64.o, s390-linux64.c): Likewise.
12793 (s390x-linux64.o, s390x-linux64.c): Likewise.
12794 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12795 * linux-s390-low.c: Include <elf.h>.
12796 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12797 (init_registers_s390): Remove prototype.
12798 (init_registers_s390x): Likewise.
12799 (init_registers_s390_linux32): Add prototype.
12800 (init_registers_s390_linux64): Likewise.
12801 (init_registers_s390x_linux64): Likewise.
12802 (s390_num_regs_3264): New define.
12803 (s390_regmap_3264): New global variable.
12804 (s390_cannot_fetch_register): Remove obsolete check.
12805 (s390_cannot_store_register): Likewise.
12806 (s390_collect_ptrace_register): Handle upper/lower register halves.
12807 (s390_supply_ptrace_register): Likewise.
12808 (s390_fill_gregset): Update to register number changes.
12809 (s390_get_hwcap): New routine.
12810 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12811 Install appropriate regmap and register set.
12812
6e7ffa39
JB
128132010-01-01 Joel Brobecker <brobecker@adacore.com>
12814
12815 * server.c (gdbserver_version): Update copyright year to 2010.
12816 * gdbreplay.c (gdbreplay_version): Likewise.
12817
957f3f49
DE
128182009-12-28 Doug Evans <dje@google.com>
12819
12820 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12821 elf/external.h. Include <elf.h> instead but only if necessary.
12822
ca5c370d
PA
128232009-12-28 Pedro Alves <pedro@codesourcery.com>
12824
12825 * linux-low.c (linux_remove_process): Remove `detaching'
12826 parameter. Don't release/detach from thread_db here.
12827 (linux_kill): Release/detach from thread_db here, ...
12828 (linux_detach): ... and here, before actually detaching.
12829 (linux_wait_1): ... and here, when a process exits.
12830 * thread-db.c (any_thread_of): New.
12831 (thread_db_free): Switch the current inferior to a thread of the
12832 passed in process.
12833
4ee62156
DE
128342009-12-21 Doug Evans <dje@google.com>
12835
d90e6a88
DE
12836 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12837
c5f62d5f
DE
12838 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12839 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12840 warning ifndef __NR_tkill. Move setting of errno there too.
12841 Delete unnecessary resetting of errno after syscall.
12842 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12843
10e86dd7
DE
12844 * configure.ac: Check for dladdr.
12845 * config.in: Regenerate.
12846 * configure: Regenerate.
12847 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12848 (try_thread_db_load): Update.
12849
4ee62156
DE
12850 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12851
00f515da
DE
128522009-12-18 Doug Evans <dje@google.com>
12853
e9464885
DE
12854 * event-loop.c: Include unistd.h if it exists.
12855
07d4f67e
DE
12856 * linux-low.c (my_waitpid): Move definition away from being in
12857 between linux_tracefork_child/linux_test_for_tracefork.
12858
00f515da
DE
12859 * gdb_proc_service.h (psaddr_t): Fix type.
12860 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12861 signature to match glibc.
12862
1de1badb
DE
128632009-12-16 Doug Evans <dje@google.com>
12864
12865 * linux-low.c (linux_read_memory): Fix argument to read.
12866
aeeb81d1
PA
128672009-11-26 Pedro Alves <pedro@codesourcery.com>
12868
12869 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12870 events, don't leave current_inferior pointing at null.
12871
10357975
PA
128722009-11-26 Pedro Alves <pedro@codesourcery.com>
12873
12874 * win32-low.c (LOG): Delete.
12875 (OUTMSG): Output to stderr.
12876 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12877 on compile time LOG macro.
12878 (win32_wait): Fix debug output.
12879
cf6e3471
PA
128802009-11-26 Pedro Alves <pedro@codesourcery.com>
12881
12882 * win32-low.c (win32_add_one_solib): If the dll name is
12883 "ntdll.dll", prepend the system directory to the dll path.
12884
0c85e18e
MK
128852009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12886
12887 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12888
9ac544ce 128892009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12890 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12891
12892 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12893 * configure.ac: Check for __mcoldfire__ and set
12894 gdb_cv_m68k_is_coldfire.
12895 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12896 reg-cf.o and reg-m68k.o.
12897 * configure: Regenerated.
12898
fd7dd3e6
PA
128992009-11-16 Pedro Alves <pedro@codesourcery.com>
12900
12901 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12902 Pass it to thread_db_free.
12903 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12904 proper `detaching' argument to linux_remove_process.
12905 * linux-low.h (thread_db_free): Add `detaching' parameter.
12906 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12907 to thread_db_free.
12908 (thread_db_free): Add `detaching' parameter. Only
12909 call td_ta_clear_event if detaching from process.
12910
75aa492e
MK
129112009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12912
12913 * thread-db.c (thread_db_free): Fix typo.
12914
21e1bee4
PP
129152009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12916
12917 PR gdb/10838
12918 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12919
8838b45e
NS
129202009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12921
12922 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12923 with an i686 compiler.
12924 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12925 needed.
12926 * configure: Rebuilt.
12927
8a35fb51
SL
129282009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12929
12930 PR gdb/10783
12931
12932 * server.c (handle_search_memory_1): Correct read_addr initialization
12933 in loop for searching subsequent chunks.
12934
96f15937
PP
129352009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12936
12937 * configure.ac: New --with-libthread-db option.
12938 * thread-db.c: Allow direct dependence on libthread_db.
12939 (thread_db_free): Adjust.
12940 * config.in: Regenerate.
12941 * configure: Likewise.
889bf7c5 12942
5f7d1694
PP
129432009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12944
12945 PR gdb/10757
12946 * thread-db.c (attach_thread): New function.
12947 (maybe_attach_thread): Return success/failure.
12948 (find_new_threads_callback): Adjust.
889bf7c5
PA
12949 (thread_db_find_new_threads): Loop until no new threads.
12950
88e3b899
PA
129512009-10-13 Pedro Alves <pedro@codesourcery.com>
12952
12953 * proc-service.c (ps_lgetregs): Formatting.
12954
cdbfd419
PP
129552009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12956
12957 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12958 * configure.ac: Adjust.
12959 * linux-low.h (struct process_info_private): Move members to struct
12960 thread_db.
12961 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12962 * linux-low.c (linux_remove_process): Adjust.
12963 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12964 * server.c (handle_query): Move code ...
12965 (handle_monitor_command): ... here. New function.
12966 * target.h (struct target_ops): New member.
12967 * thread-db.c (struct thread_db): New.
12968 (libthread_db_search_path): New variable.
12969 (thread_db_create_event, thread_db_enable_reporting)
12970 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12971 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12972 (try_thread_db_load_1, dladdr_to_soname): New functions.
12973 (try_thread_db_load, thread_db_load_search): New functions.
12974 (thread_db_init): Search for libthread_db.
12975 (thread_db_free): New function.
12976 (thread_db_handle_monitor_command): Likewise.
12977 * config.in: Regenerate.
12978 * configure: Regenerate.
889bf7c5 12979
4168d2d6
UW
129802009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12981
12982 * spu-low.c (spu_kill): Wait for inferior to terminate.
12983 Call clear_inferiors.
12984 (spu_detach): Call clear_inferiors.
12985
81ecdfbb
RW
129862009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12987
12988 * aclocal.m4: Regenerate.
12989 * config.in: Likewise.
12990 * configure: Likewise.
12991
0b9ff2c0
UW
129922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12993
12994 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12995 (parse_spufs_run): New function.
12996 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12997 (ppc_breakpoint_at): Handle SPU breakpoints.
12998
efcbbd14
UW
129992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13000
13001 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13002 (SPUFS_MAGIC): Define.
13003 (spu_enumerate_spu_ids): New function.
13004 (linux_qxfer_spu): New function.
13005 (linux_target_ops): Install linux_qxfer_spu.
13006
f4d9bade
UW
130072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13008
13009 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13010 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13011 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13012 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13013 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13014 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13015 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13016 (init_registers_powerpc_cell32l): Add prototype.
13017 (init_registers_powerpc_cell64l): Likewise.
13018 (ppc_arch_setup): Detect Cell/B.E. architecture.
13019
96e946ca
RW
130202009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13021
13022 * Makefile.in (datarootdir): New variable.
13023
58d6951d
DJ
130242009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13025
13026 * linux-low.c (linux_write_memory): Update debugging output.
13027 * Makefile.in (clean): Add new descriptions.
13028 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13029 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13030 * configure.srv: Add new files for arm*-*-linux*.
13031 * linux-arm-low.c: Add new declarations.
13032 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13033 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13034 (HWCAP_VFPv3D16): New.
13035 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13036 instead of __IWMMXT__.
13037 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13038 (arm_arch_setup): New.
13039 (target_regsets): Remove #ifdef. Add VFP regset.
13040 (the_low_target): Use arm_arch_setup.
13041
12b42a12
DJ
130422009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13043
13044 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13045 the main thread again.
13046
ac8c974e
AR
130472009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13048
13049 Adding Neutrino gdbserver.
13050 * configure: Regenerated.
13051 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13052 * configure.srv (i[34567]86-*-nto*): New target.
13053 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13054 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13055 (nto_comctrl) [__QNX__]: New function.
13056 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13057
4424e0c3 130582009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13059
13060 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13061 srv_tgtobj.
13062
912cf4ba
PA
130632009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13064 Pedro Alves <pedro@codesourcery.com>
13065
13066 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13067 don't support CONTEXT_EXTENDED_REGISTERS.
13068 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13069 (the_low_target): Install them.
13070 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13071 failing with ERROR_PIPE_NOT_CONNECTED.
13072
aa5ca48f
DE
130732009-06-30 Doug Evans <dje@google.com>
13074 Pierre Muller <muller@ics.u-strasbg.fr>
13075
13076 Add h/w watchpoint support to x86-linux, win32-i386.
13077 * Makefile.in (SFILES): Add i386-low.c
13078 (i386_low_h): Define.
13079 (i386-low.o): Add dependencies.
13080 (linux-x86-low.o): Add i386-low.h dependency.
13081 (win32-i386-low.o): Ditto.
13082 * i386-low.c: New file.
13083 * i386-low.h: New file.
13084 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13085 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13086 * linux-low.c (linux_add_process): Initialize arch_private.
13087 (linux_remove_process): Free arch_private.
13088 (add_lwp): Initialize arch_private.
13089 (delete_lwp): Free arch_private.
13090 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13091 provided.
13092 * linux-low.h (process_info_private): New member arch_private.
13093 (lwp_info): New member arch_private.
13094 (linux_target_ops): New members new_process, new_thread,
13095 prepare_to_resume.
13096 (ptid_of): New macro.
13097 * linux-x86-low.c: Include stddef.h, i386-low.h.
13098 (arch_process_info): New struct.
13099 (arch_lwp_info): New struct.
13100 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13101 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13102 (i386_dr_low_get_status): New function.
13103 (x86_insert_point, x86_remove_point): New functions.
13104 (x86_stopped_by_watchpoint): New function.
13105 (x86_stopped_data_address): New function.
13106 (x86_linux_new_process, x86_linux_new_thread): New functions.
13107 (x86_linux_prepare_to_resume): New function.
13108 (the_low_target): Add entries for insert_point, remove_point,
13109 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13110 prepare_to_resume.
13111 * server.c (debug_hw_points): New global.
13112 (monitor_show_help): Document set debug-hw-points.
13113 (handle_query): Process "set debug-hw-points".
13114 * server.h (debug_hw_points): Declare.
13115 (paddress): Declare.
13116 * utils.c (NUMCELLS, CELLSIZE): New macros.
13117 (get_sell, xsnprintf, paddress): New functions.
13118 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13119 remove_point, stopped_by_watchpoint, stopped_data_address.
13120 * win32-i386-low.c: Include i386-low.h.
13121 (debug_reg_state): Replaces dr.
13122 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13123 (i386_dr_low_get_status): New function.
13124 (i386_insert_point, i386_remove_point): New functions.
13125 (i386_stopped_by_watchpoint): New function.
13126 (i386_stopped_data_address): New function.
13127 (i386_initial_stuff): Update.
13128 (get_thread_context,set_thread_context,i386_thread_added): Update.
13129 (the_low_target): Add entries for insert_point,
13130 remove_point, stopped_by_watchpoint, stopped_data_address.
13131 * win32-low.c (win32_insert_watchpoint): New function.
13132 (win32_remove_watchpoint): New function.
13133 (win32_stopped_by_watchpoint): New function.
13134 (win32_stopped_data_address): New function.
13135 (win32_target_ops): Add entries for insert_watchpoint,
13136 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13137 * win32-low.h (win32_target_ops): New members insert_point,
13138 remove_point, stopped_by_watchpoint, stopped_data_address.
13139
d993e290
PA
131402009-06-25 Pedro Alves <pedro@codesourcery.com>
13141
13142 * server.c (process_serial_event): Re-return unsupported, not
13143 error, if the type isn't recognized. Re-allow supporting only
13144 insert or remove packets. Also call require_running for
13145 breakpoints. Add missing break statement to default case. Tidy.
13146 * target.h (struct target_ops): Rename insert_watchpoint to
13147 insert_point, and remove_watchpoint to remove_point.
13148
13149 * linux-low.h (struct linux_target_ops): Likewise.
13150 * linux-low.c (linux_insert_watchpoint): Rename to ...
13151 (linux_insert_point): ... this. Adjust.
13152 (linux_remove_watchpoint): Rename to ...
13153 (linux_remove_point): ... this. Adjust.
13154 (linux_target_ops): Adjust.
13155 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13156 (cris_insert_point): ... this.
13157 (cris_remove_watchpoint): Rename to ...
13158 (cris_remove_point): ... this.
13159 (the_low_target): Adjust.
13160
0f54c268
PM
131612009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13162
13163 * server.c (handle_v_kill): Pass signal_pid to
13164 kill_inferior if multi_process is zero.
13165
c6314022
AR
131662009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13167
13168 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13169 * target.h (target_ops): Comment for *_watchpoint to make it clear
13170 the functions can get types '0' and '1'.
13171
4463ce24
AR
131722009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13173
13174 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13175 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13176 * regcache.c (get_regcache): Likewise.
13177 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13178 * win32-low.c (child_fetch_inferior_registers): Remove check for
13179 regno 0.
13180
cf8fd78b
PA
131812009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13182 Pedro Alves <pedro@codesourcery.com>
13183
13184 * target.h (struct target_ops) <supports_multi_process>: New
13185 callback.
13186 (target_supports_multi_process): New.
13187 * server.c (handle_query): Even if GDB reports support, only
13188 enable multi-process if the target also supports it. Report
13189 multi-process support only if the target backend supports it.
13190 * linux-low.c (linux_supports_multi_process): New function.
13191 (linux_target_ops): Install it as target_supports_multi_process
13192 callback.
13193
47c0c975
DE
131942009-05-24 Doug Evans <dje@google.com>
13195
e09875d4
DE
13196 Global renaming of find_thread_pid to find_thread_ptid.
13197 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13198 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13199 All callers updated.
13200
e27d73f6
DE
13201 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13202 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13203 directly.
13204
47c0c975
DE
13205 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13206 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13207 (linux_resume_one_lwp): Ditto.
13208
2acc282a
DE
132092009-05-23 Doug Evans <dje@google.com>
13210
13211 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13212 from struct inferior_list_entry * to struct lwp_info *.
13213 All callers updated.
13214
9f1036c1
DE
132152009-05-13 Doug Evans <dje@google.com>
13216
13217 * linux-x86-low.c: Don't include assert.h.
13218 (x86_siginfo_fixup): Use fatal, not assert.
13219 (x86_arch_setup): Fix comment.
13220
d0722149
DE
132212009-05-12 Doug Evans <dje@google.com>
13222
13223 Biarch support for i386/amd64 gdbserver.
13224 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13225 Add linux-x86-low.c.
13226 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13227 (linux-x86-low.o): Add.
13228 * linux-x86-64-low.c: Delete.
13229 * linux-i386-low.c: Delete.
13230 * linux-x86-low.c: New file.
13231 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13232 linux-x86-low.o.
13233 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13234 linux-x86-low.o.
13235 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13236 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13237 (linux_child_pid_to_exec_file): New function.
13238 (elf_64_header_p, elf_64_file_p): New functions.
13239 (siginfo_fixup): New function.
13240 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13241 give target a chance to convert layout.
13242 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13243 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13244
fdeb2a12
DE
132452009-05-07 Doug Evans <dje@google.com>
13246
13247 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13248 (regsets_store_inferior_registers): Ditto.
13249
a6dbe5df
PA
132502009-05-06 Pedro Alves <pedro@codesourcery.com>
13251
13252 PR server/10048
13253
13254 * linux-low.c (must_set_ptrace_flags): Delete.
13255 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13256 of the global.
13257 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13258 `lwp->must_set_ptrace_flags' instead.
ba42693b 13259 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13260 (linux_wait_1): ... not here.
13261
5091eb23
DE
132622009-04-30 Doug Evans <dje@google.com>
13263
9f767825
DE
13264 * inferiors.c (started_inferior_callback): New function.
13265 (attached_inferior_callback): New function.
13266 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13267 * server.c (print_started_pid, print_attached_pid): New functions.
13268 (detach_or_kill_for_exit): New function.
13269 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13270 * server.h (have_started_inferiors_p): Declare.
13271 (have_attached_inferiors_p): Declare.
13272
5091eb23
DE
13273 * inferiors.c (remove_process): Fix memory leak, free process.
13274 * linux-low.c (linux_remove_process): New function.
13275 (linux_kill): Call it instead of remove_process.
13276 (linux_detach, linux_wait_1): Ditto.
13277
155c8968
PA
132782009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13279
13280 * configure.srv: Add x86 Windows CE target.
13281
7fe519cb
UW
132822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13283
13284 * inferiors.c (get_thread_process): Make global.
13285 * server.h (get_thread_process): Add prototype.
13286 * thread-db.c (find_one_thread): Use get_thread_process
13287 instead of current_process.
13288 (thread_db_get_tls_address): Do not crash if called when
13289 thread layer is not yet initialized.
13290
5472f405
UW
132912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13292
13293 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13294 * spu-low.c (current_tid): Rename to ...
13295 (current_ptid): ... this.
13296 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13297 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13298 ptid_get_lwp (current_ptid) instead of current_tid.
13299 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13300 instead of current_tid. Use find_process_pid to verify pid
13301 argument is valid. Pass proper argument to remove_process.
13302 (spu_thread_alive): Compare current_ptid instead of current_tid.
13303 (spu_resume): Likewise.
13304
55ac2b99
PA
133052009-04-02 Pedro Alves <pedro@codesourcery.com>
13306
13307 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13308 variable.
13309
95954743
PA
133102009-04-01 Pedro Alves <pedro@codesourcery.com>
13311
13312 Implement the multiprocess extensions, and add linux multiprocess
13313 support.
13314
13315 * server.h (ULONGEST): Declare.
13316 (struct ptid, ptid_t): New.
13317 (minus_one_ptid, null_ptid): Declare.
13318 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13319 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13320 (struct inferior_list_entry): Change `id' type from unsigned from
13321 to ptid_t.
13322 (struct sym_cache, struct breakpoint, struct
13323 process_info_private): Forward declare.
13324 (struct process_info): Declare.
13325 (current_process): Declare.
13326 (all_processes): Declare.
13327 (initialize_inferiors): Declare.
13328 (add_thread): Adjust to use ptid_t.
13329 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13330 (add_process, remove_process, find_thread_pid): Declare.
13331 (find_inferior_id): Adjust to use ptid_t.
13332 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13333 (multi_process): Declare.
13334 (push_event): Adjust to use ptid_t.
13335 (read_ptid, write_ptid): Declare.
13336 (prepare_resume_reply): Adjust to use ptid_t.
13337 (clear_symbol_cache): Declare.
13338 * inferiors.c (all_processes): New.
13339 (null_ptid, minus_one_ptid): New.
13340 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13341 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13342 (add_thread): Change unsigned long to ptid. Remove gdb_id
13343 parameter. Adjust.
13344 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13345 (gdb_id_to_thread): Rename to ...
13346 (find_thread_pid): ... this. Change unsigned long to ptid.
13347 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13348 (loaded_dll, pull_pid_from_list): Adjust.
13349 (add_process, remove_process, find_process_pid)
13350 (get_thread_process, current_process, initialize_inferiors): New.
13351 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13352 (struct target_waitstatus) <related_pid>: Ditto.
13353 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13354 return type to int.
13355 (struct target_ops) <join>: Add `pid' argument.
13356 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13357 (struct target_ops) <wait>: Add `ptid' field. Change return type
13358 to ptid.
13359 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13360 (mywait): Add `ptid' argument. Change return type to ptid_t.
13361 (target_pid_to_str): Declare.
13362 * target.c (set_desired_inferior): Adjust to use ptids.
13363 (mywait): Add new `ptid' argument. Adjust.
13364 (target_pid_to_str): New.
13365 * mem-break.h (free_all_breakpoints): Declare.
13366 * mem-break.c (breakpoints): Delelete.
13367 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13368 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13369 to use per-process breakpoint list.
13370 (free_all_breakpoints): New.
13371 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13372 (symbol_cache, all_symbols_looked_up): Delete.
13373 (hexchars): New.
13374 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13375 read_ptid): New.
13376 (prepare_resume_reply): Change ptid argument's type from unsigned
13377 long to ptid_t. Adjust. Implement W;process and X;process.
13378 (free_sym_cache, clear_symbol_cache): New.
13379 (look_up_one_symbol): Adjust to per-process symbol cache. *
13380 * server.c (cont_thread, general_thread, step_thread): Change type
13381 to ptid_t.
13382 (attached): Delete.
13383 (multi_process): New.
13384 (last_ptid): Change type to ptid_t.
13385 (struct vstop_notif) <ptid>: Change type to ptid_t.
13386 (queue_stop_reply, push_event): Change `ptid' argument's type to
13387 ptid_t.
13388 (discard_queued_stop_replies): Add `pid' argument.
13389 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13390 changes. Don't reference the `attached' global.
13391 (attach_inferior): Adjust to mywait interface changes.
13392 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13393 features. Handle and report "multiprocess+". Handle
13394 "qAttached:PID".
13395 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13396 changes.
13397 (handle_v_kill): New.
13398 (handle_v_stopped): Adjust to use target_pid_to_str.
13399 (handle_v_requests): Allow multiple attaches and runs when
13400 multiprocess extensions are in effect. Handle "vKill".
13401 (myresume): Adjust to use ptids.
13402 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13403 (handle_status): Adjust to discard_queued_stop_replies interface
13404 change.
13405 (first_thread_of, kill_inferior_callback)
13406 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13407 (main): Call initialize_inferiors. Adjust to use ptids, killing
13408 and detaching from all inferiors. Handle multiprocess packet
13409 variants.
13410 * linux-low.h: Include gdb_proc_service.h.
13411 (struct process_info_private): New.
13412 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13413 <lwpid_of>: Use ptid_get_lwp.
13414 (get_lwp_thread): Adjust.
13415 (struct lwp_info): Add `dead' member.
13416 (find_lwp_pid): Declare.
13417 * linux-low.c (thread_db_active): Delete.
13418 (new_inferior): Adjust comment.
13419 (inferior_pid): Delete.
13420 (linux_add_process): New.
13421 (handle_extended_wait): Adjust.
13422 (add_lwp): Change unsigned long to ptid.
13423 (linux_create_inferior): Add process to processes table. Adjust
13424 to use ptids. Don't set new_inferior here.
13425 (linux_attach_lwp): Rename to ...
13426 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13427 it. Adjust to use ptids.
13428 (linux_attach_lwp): New.
13429 (linux_attach): Add process to processes table. Don't set
13430 new_inferior here.
13431 (struct counter): New.
13432 (second_thread_of_pid_p, last_thread_of_process_p): New.
13433 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13434 multiple processes.
13435 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13436 processes. Remove process from process table.
13437 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13438 to multiple processes.
13439 (any_thread_of): New.
13440 (linux_detach): Add `pid' argument, and handle it. Remove process
13441 from processes table.
13442 (linux_join): Add `pid' argument. Handle it.
13443 (linux_thread_alive): Change unsighed long argument to ptid_t.
13444 Consider dead lwps as not being alive.
13445 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13446 threads we're not interested in.
13447 (same_lwp, find_lwp_pid): New.
13448 (linux_wait_for_lwp): Change `pid' argument's type from int to
13449 ptid_t. Adjust.
13450 (linux_wait_for_event): Rename to ...
13451 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13452 from int to ptid_t. Adjust.
13453 (linux_wait_for_event): New.
13454 (linux_wait_1): Add `ptid' argument. Change return type to
13455 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13456 that exit from the process table.
13457 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13458 Adjust.
13459 (mark_lwp_dead): New.
13460 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13461 stopping all threads, mark its main lwp as dead.
13462 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13463 ptids.
13464 (fetch_register, usr_store_inferior_registers)
13465 (regsets_fetch_inferior_registers)
13466 (regsets_store_inferior_registers, linux_read_memory)
13467 (linux_write_memory): Inline `inferior_pid'.
13468 (linux_look_up_symbols): Adjust to use per-process
13469 `thread_db_active'.
13470 (linux_request_interrupt): Adjust to use ptids.
13471 (linux_read_auxv): Inline `inferior_pid'.
13472 (initialize_low): Don't reference thread_db_active.
13473 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13474 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13475 (ps_getpid): Return the pid of the current inferior.
13476 * thread-db.c (proc_handle, thread_agent): Delete.
13477 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13478 per-process data.
13479 (find_one_thread): Change argument type to ptid_t. Adjust to
13480 per-process data.
13481 (maybe_attach_thread): Adjust to per-process data and ptids.
13482 (thread_db_find_new_threads): Ditto.
13483 (thread_db_init): Ditto.
13484 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13485 processes table. Adjust to use ptids.
13486 (spu_kill, spu_detach): Adjust interface. Remove process from
13487 processes table.
13488 (spu_join, spu_thread_alive): Adjust interface.
13489 (spu_wait): Adjust interface. Remove process from processes
13490 table. Adjust to use ptids.
13491 * win32-low.c (current_inferior_tid): Delete.
13492 (current_inferior_ptid): New.
13493 (debug_event_ptid): New.
13494 (thread_rec): Take a ptid. Adjust.
13495 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13496 (child_delete_thread): Ditto.
13497 (do_initial_child_stuff): Add `attached' argument. Add process to
13498 processes table.
13499 (child_fetch_inferior_registers, child_store_inferior_registers):
13500 Adjust.
13501 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13502 (win32_attach): Pass 1 to do_initial_child_stuff.
13503 (win32_kill): Adjust interface. Remove process from processes
13504 table.
13505 (win32_detach): Ditto.
13506 (win32_join): Adjust interface.
13507 (win32_thread_alive): Take a ptid.
13508 (win32_resume): Adjust to use ptids.
13509 (get_child_debug_event): Ditto.
13510 (win32_wait): Adjust interface. Remove exiting process from
13511 processes table.
13512
bd99dc85
PA
135132009-04-01 Pedro Alves <pedro@codesourcery.com>
13514
13515 Non-stop mode support.
13516
13517 * server.h (non_stop): Declare.
13518 (gdb_client_data, handler_func): Declare.
13519 (delete_file_handler, add_file_handler, start_event_loop):
13520 Declare.
13521 (handle_serial_event, handle_target_event, push_event)
13522 (putpkt_notif): Declare.
13523 * target.h (enum resume_kind): New.
13524 (struct thread_resume): Replace `step' field by `kind' field.
13525 (TARGET_WNOHANG): Define.
13526 (struct target_ops) <wait>: Add `options' argument.
13527 <supports_non_stop, async, start_non_stop>: New fields.
13528 (target_supports_non_stop, target_async): New.
13529 (start_non_stop): Declare.
13530 (mywait): Add `options' argument.
13531 * target.c (mywait): Add `options' argument. Print child exit
13532 notifications here.
13533 (start_non_stop): New.
13534 * server.c (non_stop, own_buf, mem_buf): New globals.
13535 (struct vstop_notif): New.
13536 (notif_queue): New global.
13537 (queue_stop_reply, push_event, discard_queued_stop_replies)
13538 (send_next_stop_reply): New.
13539 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13540 interface changes.
13541 (attach_inferior): In non-stop mode, don't wait for the target
13542 here.
13543 (handle_general_set): Handle QNonStop.
13544 (handle_query): When handling qC, return the current general
13545 thread, instead of the first thread of the list.
13546 (handle_query): If the backend supports non-stop mode, include
13547 QNonStop+ in the qSupported query response.
13548 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13549 and non-stop mode.
13550 (handle_v_attach, handle_v_run): Handle non-stop mode.
13551 (handle_v_stopped): New.
13552 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13553 (myresume): Adjust to use resume_kind. Handle non-stop.
13554 (queue_stop_reply_callback): New.
13555 (handle_status): Handle non-stop mode.
13556 (main): Clear non_stop flag on reconnection. Use the event-loop.
13557 Refactor serial protocol handling from here ...
13558 (process_serial_event): ... to this new function. When GDB
13559 selects any thread, select one here. In non-stop mode, wait until
13560 GDB acks all pending events before exiting.
13561 (handle_serial_event, handle_target_event): New.
13562 * remote-utils.c (remote_open): Install remote_desc in the event
13563 loop.
13564 (remote_close): Remove remote_desc from the event loop.
13565 (putpkt_binary): Rename to...
13566 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13567 (putpkt_binary): New as wrapper around putpkt_binary_1.
13568 (putpkt_notif): New.
13569 (prepare_resume_reply): In non-stop mode, don't change the
13570 general_thread.
13571 * event-loop.c: New.
13572 * Makefile.in (OBJ): Add event-loop.o.
13573 (event-loop.o): New rule.
13574
13575 * linux-low.h (pid_of): Moved here.
13576 (lwpid_of): New.
13577 (get_lwp_thread): Use lwpid_of.
13578 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13579 * linux-low.c (pid_of): Delete.
13580 (inferior_pid): Use lwpid_of.
13581 (linux_event_pipe): New.
13582 (target_is_async_p): New.
13583 (delete_lwp): New.
13584 (handle_extended_wait): Use lwpid_of.
13585 (add_lwp): Don't set lwpid field.
13586 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13587 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13588 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13589 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13590 first. Adjust to linux_wait_for_event interface changes. Use
13591 lwpid_of.
13592 (linux_detach): Don't delete the main lwp here.
13593 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13594 (status_pending_p): Don't consider explicitly suspended lwps.
13595 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13596 pointer. Add OPTIONS argument. Change return type to int. Use
13597 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13598 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13599 pointer. Add status pointer argument. Return a pid instead of a
13600 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13601 changes. In non-stop mode, don't switch to a random thread.
13602 (linux_wait): Rename to...
13603 (linux_wait_1): ... this. Add target_options argument, and handle
13604 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13605 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13606 clean exit and signal exit code. Don't stop all threads in
13607 non-stop mode. In all-stop mode, only stop all threads when
13608 reporting a stop to GDB. Handle explicit thread stop requests.
13609 (async_file_flush, async_file_mark): New.
13610 (linux_wait): New.
13611 (send_sigstop): Use lwpid_of.
13612 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13613 interface changes. In non-stop mode, don't switch to a random
13614 thread.
13615 (linux_resume_one_lwp): Use lwpid_of.
13616 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13617 (linux_resume_one_thread): ... this. Handle resume_stop. In
13618 non-stop mode, don't look for pending flag in all threads.
13619 (resume_status_pending_p): Don't consider explicitly suspended
13620 threads.
13621 (my_waitpid): Reimplement. Emulate __WALL.
13622 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13623 Use lwpid_of.
13624 (sigchld_handler, linux_supports_non_stop, linux_async)
13625 (linux_start_non_stop): New.
13626 (linux_target_ops): Register linux_supports_non_stop, linux_async
13627 and linux_start_non_stop.
13628 (initialize_low): Install SIGCHLD handler.
13629 * thread-db.c (thread_db_create_event, find_one_thread)
13630 (thread_db_get_tls_address): Use lwpid_of.
13631 * win32-low.c (win32_detach): Adjust to use resume_kind.
13632 (win32_wait): Add `options' argument.
13633 * spu-low.c (spu_resume): Adjust to use resume_kind.
13634 (spu_wait): Add `options' argument.
13635
5b1c542e
PA
136362009-04-01 Pedro Alves <pedro@codesourcery.com>
13637
13638 Decouple target code from remote protocol.
13639
13640 * target.h (enum target_waitkind): New.
13641 (struct target_waitstatus): New.
13642 (struct target_ops) <wait>: Return an unsigned long. Take a
13643 target_waitstatus pointer instead of a char pointer.
13644 (mywait): Likewise.
13645 * target.c (mywait): Change prototype to return an unsigned long.
13646 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13647 * server.h (thread_from_wait, old_thread_from_wait): Delete
13648 declarations.
13649 (prepare_resume_reply): Change prototype to take a
13650 target_waitstatus.
13651 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13652 (last_status, last_ptid): New.
13653 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13654 pid instead of a signal.
13655 (attach_inferior): Remove "status" and "signal" parameters.
13656 Adjust.
13657 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13658 not as an address.
13659 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13660 (handle_v_requests, myresume): Remove "status" and "signal"
13661 parameters. Adjust.
13662 (handle_status): New.
13663 (main): Delete local `status'. Adjust.
13664 * remote-utils.c: Include target.h.
13665 (prepare_resume_reply): Change prototype to take a
13666 target_waitstatus. Adjust.
13667
13668 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13669 interface.
13670 * spu-low.c (spu_wait): Adjust.
13671 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13672 Delete.
13673 (win32_wait): Adjust.
13674
2bd7c093
PA
136752009-04-01 Pedro Alves <pedro@codesourcery.com>
13676
13677 * target.h (struct thread_resume): Delete leave_stopped member.
13678 (struct target_ops): Add a `n' argument to the `resume' callback.
13679 * server.c (start_inferior): Adjust.
13680 (handle_v_cont, myresume): Adjust.
13681 * linux-low.c (check_removed_breakpoint): Adjust to resume
13682 interface change, and to removed leave_stopped field.
13683 (resume_ptr): Delete.
13684 (struct thread_resume_array): New.
13685 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13686 resume interface change.
13687 (linux_continue_one_thread, linux_queue_one_thread)
13688 (resume_status_pending_p): Check if the resume field is NULL
13689 instead of checking the leave_stopped member.
13690 (linux_resume): Adjust to the target resume interface change.
13691 * spu-low.c (spu_resume): Adjust to the target resume interface
13692 change.
13693 * win32-low.c (win32_detach, win32_resume): Ditto.
13694
c35fafde
PA
136952009-04-01 Pedro Alves <pedro@codesourcery.com>
13696
13697 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13698 flag.
13699 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13700 pending.
13701 (linux_continue_one_thread): Only preserve the stepping flag if
13702 there's a pending breakpoint.
13703
0a59d50b
PA
137042009-03-31 Pedro Alves <pedro@codesourcery.com>
13705
13706 * server.c (main): After the inferior having exited, call
13707 remote_close before exiting gdbserver.
13708
f04c6d38
TJB
137092009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13710
13711 Fix size of FPSCR in Power 7 processors.
13712 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13713 (PPC_FEATURE_HAS_DFP): New #define.
13714 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13715 size of the FPSCR.
13716
78e5cee6
PA
137172009-03-23 Pedro Alves <pedro@codesourcery.com>
13718
13719 * server.c (handle_query) Whitespace and formatting.
13720
1b3f6016
PA
137212009-03-22 Pedro Alves <pedro@codesourcery.com>
13722
13723 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13724 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13725 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13726 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13727 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13728 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13729 Makefile.in, configure.ac: Fix whitespace throughout.
13730 * configure: Regenerate.
13731
a07b2135
PA
137322009-03-22 Pedro Alves <pedro@codesourcery.com>
13733
13734 * inferiors.c (find_inferior): Make it safe for the callback
13735 function to delete the currently iterated inferior.
13736
67cc2626
PA
137372009-03-22 Pedro Alves <pedro@codesourcery.com>
13738
13739 * Makefile.in (linuw_low_h): Move higher.
13740 (thread-db.o): Depend on $(linux_low_h).
13741
54a0b537
PA
137422009-03-17 Pedro Alves <pedro@codesourcery.com>
13743
13744 Rename "process" to "lwp" throughout.
13745
13746 * linux-low.c (all_processes): Rename to...
13747 (all_lwps): ... this.
13748 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13749 (add_process): Rename to ...
13750 (add_lwp): ... this. Adjust.
13751 (linux_create_inferior): Adjust.
13752 (linux_attach_lwp): Adjust.
13753 (linux_attach): Adjust.
13754 (linux_kill_one_process): Rename to ...
13755 (linux_kill_one_lwp): ... this. Adjust.
13756 (linux_kill): Adjust.
13757 (linux_detach_one_process): Rename to ...
13758 (linux_detach_one_lwp): ... this. Adjust.
13759 (linux_detach): Adjust.
13760 (check_removed_breakpoint): Adjust.
13761 (status_pending_p): Adjust.
13762 (linux_wait_for_process): Rename to ...
13763 (linux_wait_for_lwp): ... this. Adjust.
13764 (linux_wait_for_event): Adjust.
13765 (send_sigstop): Adjust.
13766 (wait_for_sigstop): Adjust.
13767 (stop_all_processes): Rename to ...
13768 (stop_all_lwps): ... this.
13769 (linux_resume_one_process): Rename to ...
13770 (linux_resume_one_lwp): ... this. Adjust.
13771 (linux_set_resume_request, linux_continue_one_thread)
13772 (linux_queue_one_thread, resume_status_pending_p)
13773 (usr_store_inferior_registers, regsets_store_inferior_registers)
13774 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13775 Adjust.
13776 * linux-low.h (get_process): Rename to ...
13777 (get_lwp): ... this. Adjust.
13778 (get_thread_process): Rename to ...
13779 (get_thread_lwp): ... this. Adjust.
13780 (get_process_thread): Rename to ...
13781 (get_lwp_thread): ... this. Adjust.
13782 (struct process_info): Rename to ...
13783 (struct lwp_info): ... this.
13784 (all_processes): Rename to ...
13785 (all_lwps): ... this.
13786 * proc-service.c (ps_lgetregs): Adjust.
13787 * thread-db.c (thread_db_create_event, find_one_thread)
13788 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13789
0b16c5cf
PA
137902009-03-14 Pedro Alves <pedro@codesourcery.com>
13791
13792 * server.c (handle_query): Handle "qAttached".
13793
32de4b9d
NS
137942009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13795
13796 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13797 GPLv3, update license URL.
13798
2aecd87f
DE
137992009-03-01 Doug Evans <dje@google.com>
13800
93efd302 13801 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13802 (server_h): Add gdb_signals.h.
13803 (signals.o): Update.
13804 * server.h (target_signal_from_host,target_signal_to_host_p)
13805 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13806
86b1f9c5
PM
138072009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13808
13809 * remote-utils.c (getpkt): Also generate remote-debug
13810 information if noack_mode is set.
13811
4aa995e1
PA
138122009-02-06 Pedro Alves <pedro@codesourcery.com>
13813
13814 * server.c (handle_query): Report qXfer:siginfo:read and
13815 qXfer:siginfo:write as supported and handle them.
13816 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13817 * linux-low.c (linux_xfer_siginfo): New.
13818 (linux_target_ops): Set it.
13819
62709adf
PA
138202009-01-26 Pedro Alves <pedro@codesourcery.com>
13821
13822 * server.c (gdbserver_usage): Mention --remote-debug.
13823 (main): Accept '--remote-debug' switch.
13824
aef93bd7
DE
138252009-01-18 Doug Evans <dje@google.com>
13826
13827 * regcache.c (new_register_cache): No need to check result of xcalloc.
13828 * server.c (handle_search_memory): Back out calls to xmalloc,
13829 result is checked and error is returned to user upon failure.
13830 (handle_query): Ditto. Add more checks for result of malloc.
13831 (handle_v_cont): Check result of malloc, report error back to
13832 user upon failure.
13833 (handle_v_run): Ditto. Call freeargv.
13834 * server.h (freeargv): Declare.
13835 * utils.c (freeargv): New fn.
13836
54363045
DE
138372009-01-15 Doug Evans <dje@google.com>
13838
f626972c
DE
13839 * gdbreplay.c (perror_with_name): Make arg const char *.
13840 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13841 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13842 * utils.c (perror_with_name): Make arg const char *.
54363045 13843
18aae699
PA
138442009-01-14 Pedro Alves <pedro@codesourcery.com>
13845
13846 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13847 when handling a EXIT_PROCESS_DEBUG_EVENT.
13848
ff703abe
JB
138492009-01-06 Joel Brobecker <brobecker@adacore.com>
13850
13851 * gdbreplay.c (gdbreplay_version): Update copyright year.
13852 * server.c (gdbserver_version): Likewise.
13853
f21cc1a2 138542009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13855
13856 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13857 (handle_extended_wait): Improve comment.
0e21c1ec 13858
bca929d3
DE
138592008-12-13 Doug Evans <dje@google.com>
13860
13861 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13862 * server.h (ATTR_MALLOC): New macro.
13863 (xmalloc,xcalloc,xstrdup): Declare.
13864 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13865 * inferiors.c: Ditto.
13866 * linux-low.c: Ditto.
13867 * mem-break.c: Ditto.
13868 * regcache.c: Ditto.
13869 * remote-utils.c: Ditto.
13870 * server.c: Ditto.
13871 * target.c: Ditto.
13872 * win32-low.c: Ditto.
13873
97438e3f
DE
138742008-12-12 Doug Evans <dje@google.com>
13875
896c7fbb
DE
13876 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13877 in debugging printf.
13878
97438e3f
DE
13879 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13880
e3b886f8
DE
138812008-12-09 Doug Evans <dje@google.com>
13882
13883 * linux-low.h (struct process_info): Delete member tid, unused.
13884 * thread-db.c (find_one_thread): Update.
13885 (maybe_attach_thread): Update.
13886
07e059b5
VP
138872008-12-02 Pedro Alves <pedro@codesourcery.com>
13888
889bf7c5
PA
13889 * target.h (struct target_ops): Add qxfer_osdata member.
13890 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13891 and dirent.h.
13892 (linux_qxfer_osdata): New functions.
13893 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13894 callback.
13895 * server.c (handle_query): Handle "qXfer:osdata:read:".
13896 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13897 (buffer_xml_printf): New functions.
13898 * server.h (struct buffer): New.
13899 (buffer_grow_str, buffer_grow_str0): New macros.
13900 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13901 (buffer_xml_printf): Declare.
07e059b5 13902
4cab47ab
DE
139032008-11-24 Doug Evans <dje@google.com>
13904
13905 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13906
f142445f
DJ
139072008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * server.c (handle_v_run): Always use the supplied argument list.
13910
d0107bb6 139112008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13912
d0107bb6
BW
13913 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13914 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13915
2c4ad781
TJB
139162008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13917
13918 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13919 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13920 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13921 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13922 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13923 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13924 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13925 XML target descriptions.
13926 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13927 when inferior is running on an ISA 2.05 or later processor. Add
13928 special case to return offset for full 64-bit slot of FPSCR when
13929 in 32-bits.
13930
dfb64f85
DJ
139312008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13932
13933 * Makefile.in (SFILES, clean): Added sparc64 files.
13934 (reg-sparc64.o, reg-sparc64.c): New.
13935 * configure.srv (sparc*-*-linux*): New configuration.
13936 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13937 syscall arguments for SPARC.
13938 (regsets_store_inferior_registers): Likewise.
13939 * linux-sparc-low.c: New file.
13940
66b6e1dd
DE
139412008-10-21 Doug Evans <dje@google.com>
13942
13943 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13944 (READLINE_DIR,READLINE_DEP): Delete.
13945 (INTERNAL_CFLAGS): Update.
13946 (LINTFLAGS): Update.
13947
9b710a42
PA
139482008-10-10 Pedro Alves <pedro@codesourcery.com>
13949
13950 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13951 whole argv from the last run, not just argv[0].
13952
5822d809
PA
139532008-09-08 Pedro Alves <pedro@codesourcery.com>
13954
13955 * regcache.c (new_register_cache): Return NULL if the register
13956 cache size isn't known yet.
13957 (free_register_cache): Avoid dereferencing a NULL regcache.
13958
74aac56f
DJ
139592008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * configure.srv: Merge MIPS and MIPS64.
13962
400b20f5
MR
139632008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13964
13965 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13966
677c5bb1
LM
139672008-08-18 Luis Machado <luisgpm@br.ibm.com>
13968
13969 * Makefile.in: Add required vsx dependencies.
13970
13971 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13972 Declare init_registers_powerpc_vsx32l.
13973 Declare init_registers_powerpc_vsx64l.
13974 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13975 (ppc_arch_setup): Check for VSX in hwcap.
13976 (ppc_fill_vsxregset): New function.
13977 (ppc_store_vsxregset): New function.
13978 Add new VSX entry in regset_info target_regsets.
13979
13980 * configure.srv: Add new VSX dependencies.
13981
a6f3e723
SL
139822008-08-12 Pedro Alves <pedro@codesourcery.com>
13983
13984 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13985 (remote_open): Set or clear transport_is_reliable.
13986 (putpkt_binary): Don't expect acks in noack mode.
13987 (getpkt): Don't send ack/nac in noack mode.
13988 * server.c (handle_general_set): Handle QStartNoAckMode.
13989 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13990 qSupported.
13991 (main): Reset noack_mode on every connection.
13992 * server.h (noack_mode): Declare.
13993
a417dc56
RW
139942008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13995
13996 * Makefile.in (GDBREPLAY_OBS): New variable.
13997 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13998
3221518c
UW
139992008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14000 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14003 (usr_store_inferior_registers): Likewise.
14004 (regsets_store_inferior_registers): Likewise.
14005
ec56be1b
PA
140062008-07-31 Rolf Jansen <rj@surtec.com>
14007 Pedro Alves <pedro@codesourcery.com>
14008
14009 * configure.ac: Check for memmem declaration.
14010 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14011 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14012 (disable_packet_qfThreadInfo): Unconditionally compile.
14013 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14014 * configure, config.in: Regenerate.
14015
2fe5e3ff
DE
140162008-07-28 Doug Kwan <dougkwan@google.com>
14017
14018 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14019 (linux_write_memory): Remove declaration of errno.
14020
836acd6d
UW
140212008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14022
14023 * linux-low.c (handle_extended_wait): Do not use "status"
14024 variable uninitialized.
14025
aeba519e
PA
140262008-07-07 Pedro Alves <pedro@codesourcery.com>
14027
14028 * server.c (handle_v_attach): Inhibit reporting dll changes.
14029
db42f210
PA
140302008-06-27 Pedro Alves <pedro@codesourcery.com>
14031
14032 * remote-utils.c (prepare_resume_reply): If requested, don't
14033 output "thread:TID" in the T stop reply.
14034
14035 * server.c (disable_packet_vCont, disable_packet_Tthread)
14036 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14037 (handle_query): If requested, disable support for qC, qfThreadInfo
14038 and qsThreadInfo.
14039 (handle_v_requests): If requested, disable support for vCont.
14040 (gdbserver_show_disableable): New.
14041 (main): Handle --disable-packet and --disable-packet=LIST.
14042
14043 * server.h (disable_packet_vCont, disable_packet_Tthread)
14044 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14045
8e4c5421
CD
140462008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14047
14048 * server.c (gdbserver_usage): Mention --version.
14049
6e23a804
DJ
140502008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14051
14052 * Makefile.in (gdbreplay.o): New rule.
14053
90aa6a40
JM
140542008-06-06 Joseph Myers <joseph@codesourcery.com>
14055
14056 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14057 message, not gdbserver.
14058
c16158bc 140592008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14060 Nathan Sidwell <nathan@codesourcery.com>
14061 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14062
14063 * acinclude.m4: Include ../../config/acx.m4.
14064 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14065 * configure, config.in: Regenerate.
14066 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14067 * server.c (gdbserver_version): Print PKGVERSION.
14068 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14069 (main): Adjust gdbserver_usage calls.
14070 * gdbreplay.c (version, host_name): Add declarations.
14071 (gdbreplay_version, gdbreplay_usage): New.
14072 (main): Accept --version and --help options.
14073
aeb75bf5
DJ
140742008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14077 (arm_breakpoint_at): Handle Thumb.
14078 (the_low_target): Add comment.
14079
76b233dd
UW
140802008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14081
14082 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14083
08388c79
DE
140842008-05-09 Doug Evans <dje@google.com>
14085
a3c83fae
DE
14086 * server.h (decode_search_memory_packet): Declare.
14087 * remote-utils.c (decode_search_memory_packet): New fn.
14088 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14089 (handle_search_memory): New fn.
14090 (handle_query): Process qSearch:memory packets.
14091
bb9c3d36
UW
140922008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14093
14094 * regcache.c (registers_length): Remove.
14095 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14096 full register packet.
14097 * regcache.h (registers_length): Remove prototype.
14098 * server.h (PBUFSIZ): Define to 16384.
14099
7284e1be
UW
141002008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14101
14102 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14103 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14104 powerpc-64l.o, and powerpc-altivec64l.o.
14105 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14106 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14107 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14108 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14109 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14110 to srv_xmlfiles.
14111
14112 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14113 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14114 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14115 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14116 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14117 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14118 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14119 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14120 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14121 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14122 (clean): Update.
14123
14124 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14125 (init_registers_powerpc_32l): ... this new prototype.
14126 (init_registers_powerpc_32): Remove, replace by ...
14127 (init_registers_powerpc_altivec32l): ... this new prototype.
14128 (init_registers_powerpc_e500): Remove, replace by ...
14129 (init_registers_powerpc_e500l): ... this new prototype.
14130 (init_registers_ppc64): Remove, replace by ...
14131 (init_registers_powerpc_64l): ... this new prototype.
14132 (init_registers_powerpc_64): Remove, replace by ...
14133 (init_registers_powerpc_altivec64l): ... this new prototype.
14134 (ppc_num_regs): Set to 73.
14135 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14136 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14137 (ppc_cannot_store_register): Handle orig_r3 and trap.
14138 (ppc_arch_setup): Update init_registers_... calls.
14139 (ppc_fill_gregset): Handle orig_r3 and trap.
14140
14141 * inferiors.c (clear_inferiors): Reset current_inferior.
14142
fdc59709
PB
141432008-04-23 Paolo Bonzini <bonzini@gnu.org>
14144
889bf7c5
PA
14145 * acinclude.m4: Add override.m4.
14146 * configure: Regenerate.
fdc59709 14147
c9b2f845
UW
141482008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14149
14150 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14151 initial call to init_register_ppc64.
14152
550512b8
UW
141532008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14154
43aaf8b6
PA
14155 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14156 single powerpc*-*-linux* case.
550512b8
UW
14157 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14158
b6430ec3
UW
141592008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14160
14161 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14162 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14163 from reg_xmlfiles.
14164 * linux-ppc-low.c: Include <elf.h>.
14165 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14166 (ppc_hwcap): New global variable.
14167 (ppc_regmap): Remove __SPE__ #ifdef sections.
14168 (ppc_regmap_e500): New global variable.
14169 (ppc_cannot_store_register): Update __SPE__ special case.
14170 (ppc_get_hwcap): New function.
14171 (ppc_arch_setup): Use it to determine whether inferior supports
14172 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14173 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14174 Do not access registers if target does not support AltiVec.
14175 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14176 Do not access registers if target does not support SPE.
14177 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14178
52fa2412
UW
141792008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14180
14181 * linux-low.c (disabled_regsets, num_regsets): New.
14182 (use_regsets_p): Delete.
14183 (linux_wait_for_process): Clear disabled_regsets.
14184 (regsets_fetch_inferior_registers): Check and set it.
14185 (regsets_store_inferior_registers): Likewise.
14186 (linux_fetch_registers, linux_store_registers): Do not use
14187 use_regsets_p.
14188 (initialize_low): Allocate disabled_regsets.
14189
e28b3332
DJ
141902008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * Makefile.in (LIBOBJS): New.
14193 (OBS): Use LIBOBJS.
14194 (memmem.o): New rule.
14195 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14196 * configure: Regenerated.
14197
4536995d
UW
141982008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14199
14200 * server.c (handle_query): Never return "unsupported" for
14201 qXfer:features:read queries.
14202
221c031f
UW
142032008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14204
14205 * server.c (get_features_xml): Fix inverted condition.
14206 (handle_query): Always support qXfer:feature:read.
14207
ccd213ac
DJ
142082008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * server.c (wrapper_argv): New.
14211 (start_inferior): Handle wrapper_argv. If set, expect an extra
14212 trap.
14213 (gdbserver_usage): Document --wrapper.
14214 (main): Parse --wrapper.
14215
6fe305f7
UW
142162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14217
14218 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14219 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14220 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14221 (ppc_set_pc): Likewise.
14222 (ppc_arch_setup): New function.
14223 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14224 of collect_register.
889bf7c5 14225 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14226
5b0a002e
UW
142272008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14228
14229 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14230 instead of linux-ppc64-low.o.
14231 * linux-ppc64-low.c: Remove file.
14232 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14233 (linux-ppc64-low.o): Remove rule.
14234
14235 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14236 (init_registers_powerpc_64): Likewise.
14237 (ppc_regmap): Conditionally define depending on __powerpc64__.
14238 (ppc_cannot_store_register): Do not special-case "fpscr" when
14239 compiled on __powerpc64__.
14240 (ppc_collect_ptrace_register): New function.
14241 (ppc_supply_ptrace_register): New function.
14242 (ppc_breakpoint): Change type to "unsigned int".
14243 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14244 (the_low_target): Conditionally provide initializers for the
889bf7c5 14245 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14246 collect_ptrace_register and supply_ptrace_register members.
14247
9b4b61c8
UW
142482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14249
14250 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14251 * server.c (gdbserver_xmltarget): Define.
14252 (get_features_xml): Use it to replace "target.xml" and arch_string.
14253
14254 * configure.srv: Remove srv_xmltarget. Add XML files that were
14255 mentioned there to srv_xmlfiles instead. Remove conditional tests
14256 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14257 srv_xmlfiles and srv_regobj to include all possible choices.
14258 * configure.ac (srv_xmltarget): Remove.
14259 (srv_xmlfiles): Do not add "target.xml".
14260 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14261 checks for supplementary target information.
14262 * configure: Regenerate.
14263 * Makefile.in (XML_TARGET): Remove.
14264 (target.xml): Remove rule.
14265 (clean): Do not clean up target.xml.
14266 (.PRECIOUS): Do not mention target.xml.
14267
14268 * target.h (struct target_ops): Remove arch_string member.
14269 * linux-low.c (linux_arch_string): Remove.
14270 (linux_target_ops): Remove arch_string initializer.
14271 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14272 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14273 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14274 * spu-low.c (spu_arch_string): Remove.
14275 (spu_target_ops): Remove arch_string initializer.
14276 * win32-low.c (win32_arch_string): Remove.
14277 (win32_target_ops): Remove arch_string initializer.
14278 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14279 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14280 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14281
ee1a7ae4
UW
142822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14283
14284 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14285 by collect_ptrace_register and supply_ptrace_register hooks.
14286 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14287 instead of checking for the_low_target.left_pad_xfer.
14288 (usr_store_inferior_registers): Use collect_ptrace_register callback
14289 instead of checking for the_low_target.left_pad_xfer.
14290
14291 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14292 (s390_supply_ptrace_register): Likewise.
14293 (s390_fill_gregset): Call s390_collect_ptrace_register.
14294 (the_low_target): Update.
14295
14296 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14297 (ppc_supply_ptrace_register): Likewise.
14298 (the_low_target): Update.
14299
14300 * linux-i386-low.c (the_low_target): Update.
14301 * linux-x86-64-low.c (the_low_target): Update.
14302
d61ddec4
UW
143032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14304
14305 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14306 reg-s390.o and reg-s390x.o.
14307
14308 * linux-low.c (new_inferior): New global variable.
14309 (linux_create_inferior, linux_attach): Set it.
14310 (linux_wait_for_process): Call the_low_target.arch_setup after the
14311 target has stopped for the first time.
14312 (initialize_low): Do not call the_low_target.arch_setup.
14313
14314 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14315 (s390_set_pc): Likewise.
14316 (s390_arch_setup): New function.
14317 (the_low_target): Use s390_arch_setup as arch_setup routine.
14318
14319 * regcache.c (realloc_register_cache): New function.
14320 (set_register_cache): Call it for each existing regcache.
14321
d05b4ac3
UW
143222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14323
14324 * server.h (init_registers): Remove prototype.
14325
14326 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14327 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14328 instead of init_registers ().
14329 * linux-arm-low.c (init_registers_arm): Add prototype.
14330 (init_registers_arm_with_iwmmxt): Likewise.
14331 (the_low_target): Add initializer for arch_setup field.
14332 * linux-cris-low.c (init_registers_cris): Add prototype.
14333 (the_low_target): Add initializer for arch_setup field.
14334 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14335 (the_low_target): Add initializer for arch_setup field.
14336 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14337 (the_low_target): Add initializer for arch_setup field.
14338 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14339 (the_low_target): Add initializer for arch_setup field.
14340 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14341 (the_low_target): Add initializer for arch_setup field.
14342 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14343 (the_low_target): Add initializer for arch_setup field.
14344 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14345 (init_registers_mips64_linux): Likewise.
14346 (the_low_target): Add initializer for arch_setup field.
14347 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14348 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14349 (the_low_target): Add initializer for arch_setup field.
14350 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14351 (init_registers_powerpc_64): Likewise.
14352 (the_low_target): Add initializer for arch_setup field.
14353 * linux-s390-low.c (init_registers_s390): Add prototype.
14354 (init_registers_s390x): Likewise.
14355 (the_low_target): Add initializer for arch_setup field.
14356 * linux-sh-low.c (init_registers_sh): Add prototype.
14357 (the_low_target): Add initializer for arch_setup field.
14358 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14359 (the_low_target): Add initializer for arch_setup field.
14360 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14361 (the_low_target): Add initializer for arch_setup field.
14362
14363 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14364 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14365 instead of init_registers ().
14366 * win32-arm-low.c (init_registers_arm): Add prototype.
14367 (the_low_target): Add initializer for arch_setup field.
14368 * win32-i386-low.c (init_registers_i386): Add prototype.
14369 (the_low_target): Add initializer for arch_setup field.
14370
14371 * spu-low.c (init_registers_spu): Add prototype.
14372 (initialize_low): Call initialie_registers_spu () instead of
14373 initialize_registers ().
14374
fd96d250
PA
143752008-02-19 Pedro Alves <pedro@codesourcery.com>
14376
14377 * server.c (handle_v_requests): When handling the vRun and vAttach
14378 packets, if already debugging a process, don't kill it. Return an
14379 error instead.
14380
d41b6bb4
DJ
143812008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14382
14383 * server.c (handle_query): Correct length check.
14384
5ac588cf
PA
143852008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14386
14387 * win32-low.c (do_initial_child_stuff): Add process handle
14388 parameter. Set current_process_handle and current_process_id from the
14389 parameters. Clear globals.
14390 (win32_create_inferior): Don't set current_process_handle and
14391 current_process_id here. Instead pass them on the call to
14392 do_initial_child_stuff.
14393 (win32_attach): Likewise.
14394 (win32_clear_inferiors): New.
14395 (win32_kill): Don't close the current process handle or the
14396 current thread handle here. Instead call win32_clear_inferiors.
14397 (win32_detach): Don't open a new handle to the process. Call
14398 win32_clear_inferiors.
14399 (win32_join): Don't rely on current_process_handle; open a new
14400 handle using the process id.
14401 (win32_wait): Call win32_clear_inferiors when the inferior process
14402 has exited.
14403
ecd7ecbc
DJ
144042008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * server.c (monitor_show_help): Add "exit".
14407
1525d545
MG
144082008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14409
ecd7ecbc 14410 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14411 (clean): Add reg-xtensa.c.
14412 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14413 * configure.srv (xtensa*-*-linux*) New target.
14414 * linux-xtensa-low.c: New.
14415 * xtensa-xtregs.c: New.
1525d545 14416
59a016f0
PA
144172008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14418
14419 * hostio.c: Don't include errno.h.
14420 (errno_to_fileio_errno): Move to hostio-errno.
14421 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14422 error number outputting to the target->hostio_last_error callback.
14423 (hostio_packet_error): Use FILEIO_EINVAL directly.
14424 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14425 calls to hostio_error.
14426 * hostio-errno.c: New.
14427 * server.h (hostio_last_error_from_errno): Declare.
14428 * target.h (target_ops): Add hostio_last_error member.
14429 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14430 as hostio_last_error handler.
889bf7c5 14431 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14432 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14433 (wince_hostio_last_error): New functions.
14434 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14435 as hostio_last_error handler.
14436 (win32_target_ops) [!_WIN32_WCE]: Register
14437 hostio_last_error_from_errno as hostio_last_error handler.
14438 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14439 (hostio-errno.o): New rule.
14440 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14441 * configure.srv (srv_hostio_err_objs): New variable. Default to
14442 hostio-errno.o.
14443 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14444 * configure: Regenerate.
14445
2d717e4f
DJ
144462008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14449 (linux_kill, linux_detach): Clean up the process list.
14450 * remote-utils.c (remote_open): Improve port number parsing.
14451 (putpkt_binary, input_interrupt): Only send interrupts if the target
14452 is running.
14453 * server.c (extended_protocol): Make static.
14454 (attached): Define earlier.
14455 (exit_requested, response_needed, program_argv): New variables.
14456 (target_running): New.
14457 (start_inferior): Clear attached here.
14458 (attach_inferior): Set attached here.
14459 (require_running): Define.
14460 (handle_query): Use require_running and target_running. Implement
14461 "monitor exit".
14462 (handle_v_attach, handle_v_run): New.
14463 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14464 (gdbserver_usage): Update.
14465 (main): Redo argument parsing. Handle --debug and --multi. Handle
14466 --attach along with other options or after the port. Save
14467 program_argv. Support no initial program. Resynchronize
14468 communication with GDB after an error. Handle "monitor exit".
14469 Use require_running and target_running. Always allow the extended
14470 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14471 restart in extended mode.
14472 * README: Refer to the GDB manual. Update --attach usage.
14473
7407e2de
AS
144742007-12-20 Andreas Schwab <schwab@suse.de>
14475
14476 * linux-low.c (STACK_SIZE): Define.
14477 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14478 (linux_test_for_tracefork): Likewise.
14479
b65d95c5
DJ
144802007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * linux-low.c (linux_wait_for_event): Update messages. Do not
14483 reinsert auto-delete breakpoints.
14484 * mem-break.c (struct breakpoint): Change return type of handler to
14485 int.
14486 (set_breakpoint_at): Update handler type.
14487 (reinsert_breakpoint_handler): Return 1 instead of calling
14488 delete_breakpoint.
14489 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14490 setting a new one.
14491 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14492 * mem-break.h (set_breakpoint_at): Update handler type.
14493 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14494 * win32-low.c (auto_delete_breakpoint): New.
14495 (get_child_debug_event): Use it.
14496
4e799345
DJ
144972007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14498
14499 * configure.ac: Check for pread and pwrite.
14500 * hostio.c (handle_pread): Fall back to lseek and read.
14501 (handle_pwrite): Fall back to lseek and write.
14502 * config.in, configure: Regenerated.
14503
27524b67
DJ
145042007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * server.c (myresume): Add own_buf argument.
14507 (main): Update calls.
14508
a20d5e98
DJ
145092007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14512 * remote-utils.c (remote_open): Do not call disable_async_io.
14513 (block_async_io): Delete.
14514 (unblock_async_io): Make static.
14515 (initialize_async_io): New.
14516 * server.c (handle_v_cont): Handle async I/O here.
14517 (myresume): Likewise. Move other common resume tasks here...
14518 (main): ... from here. Call initialize_async_io. Disable async
14519 I/O before the main loop.
14520 * server.h (initialize_async_io): Declare.
14521 (block_async_io, unblock_async_io): Delete prototypes.
14522 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14523
b79d787e
DJ
145242007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14525
14526 * remote-utils.c (readchar): Allow binary data in received messages.
14527
d97903b2
PA
145282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14529
14530 * win32-low.c (attaching): New global.
14531 (win32_create_inferior): Clear the `attaching' global.
14532 (win32_attach): Set the `attaching' global.
14533 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14534 attaching. Only set a breakpoint at the entry point if not
14535 attaching.
14536
311de423
PA
145372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14538
14539 * server.c (main): Don't report dll events on the initial
14540 connection on attaches.
14541
6c2d16d2
PA
145422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14543
14544 * server.c (main): Relax numerical bases supported for the pid of
14545 the --attach command line argument.
14546
5ca906e6
PA
145472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14548
14549 * win32-low.c (win32_attach): Call OpenProcess before
14550 DebugActiveProcess, not after. Add last error output to error
14551 call.
14552
9c6c8194
PA
145532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14554
14555 * win32-low.c (win32_get_thread_context)
14556 (win32_set_thread_context): New functions.
14557 (thread_rec): Use win32_get_thread_context.
14558 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14559 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14560 field.
14561
4d5d1aaa
PA
145622007-12-03 Leo Zayas
14563 Pedro Alves <pedro_alves@portugalmail.pt>
14564
14565 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14566 global variables.
14567 (child_add_thread): Minor cleanup.
14568 (child_continue): Resume artificially suspended threads before
14569 calling ContinueDebugEvent.
14570 (suspend_one_thread): New.
14571 (fake_breakpoint_event): New.
14572 (get_child_debug_event): Change return type to int. Check here if
14573 gdb sent an interrupt request. If a soft interrupt was requested,
14574 fake a breakpoint event. Return 0 if there is no event to handle,
14575 and 1 otherwise.
14576 (win32_wait): Don't check here if gdb sent an interrupt request.
14577 Ensure there is a valid event to handle.
14578 (win32_request_interrupt): Add soft interruption method as last
14579 resort.
14580
c436e841
PA
145812007-12-03 Leo Zayas
14582 Pedro Alves <pedro_alves@portugalmail.pt>
14583
14584 * win32-low.h (win32_thread_info): Add descriptions to the
14585 structure members. Replace `suspend_count' counter by a
14586 `suspended' flag.
14587 * win32-low.c (thread_rec): Update condition of when to get the
14588 context from the inferior. Rely on ContextFlags being set if it
14589 has already been retrieved. Only suspend the inferior thread if
14590 we haven't already. Warn if that fails.
14591 (continue_one_thread): s/suspend_count/suspended/. Only call
14592 ResumeThread once. Warn if that fails.
14593
e7b5fa67
PA
145942007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14595
14596 * win32-low.c (win32_wait): Don't read from the inferior when it
14597 has already exited.
14598
a385171d
PA
145992007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14600
14601 * Makefile.in (win32_low_h): New variable.
14602 (win32-low.o): Add dependency on $(win32_low_h).
14603 (win32-arm-low.o, win32-i386-low.o): New rules.
14604
f80c84b3
DJ
146052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * hostio.c: Correct copyright year.
14608
a6b151f1
DJ
146092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * Makefile.in (OBS): Add hostio.o.
14612 (hostio.o): New rule.
14613 * server.h (handle_vFile): Declare.
14614 * hostio.c: New file.
14615 * server.c (handle_v_requests): Take packet_len and new_packet_len
14616 for binary packets. Call handle_vFile.
14617 (main): Update call to handle_v_requests.
14618
f9387fc3
DJ
146192007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * linux-low.c: Include <sched.h>.
14622
51c2684e
DJ
146232007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * linux-low.c (linux_tracefork_grandchild): New.
14626 (linux_tracefork_child): Use clone.
14627 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14628
75f83163
JB
146292007-10-31 Joel Brobecker <brobecker@adacore.com>
14630
14631 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14632
da5898ce
DJ
146332007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14636
24a09b5f
DJ
146372007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * inferiors.c (change_inferior_id): Delete.
14640 (add_pid_to_list, pull_pid_from_list): New.
14641 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14642 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14643 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14644 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14645 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14646 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14647 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14648 (using_threads): Always set to 1.
14649 (handle_extended_wait): New.
14650 (add_process): Do not set TID.
14651 (linux_create_inferior): Set must_set_ptrace_flags.
14652 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14653 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14654 (linux_thread_alive): Rename TID argument to LWPID.
14655 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14656 (linux_wait_for_event): Do not use TID or check using_threads. Update
14657 call to dead_thread_notify. Call handle_extended_wait.
14658 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14659 (send_sigstop): Delete sigstop_sent.
14660 (wait_for_sigstop): Avoid TID.
14661 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14662 (linux_test_for_tracefork): New.
14663 (linux_lookup_signals): Use thread_db_active and
14664 linux_supports_tracefork_flag.
14665 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14666 * linux-low.h (get_process_thread): Avoid TID.
14667 (struct process_ifo): Move thread_known and tid to the end. Remove
14668 sigstop_sent.
14669 (linux_attach_lwp, thread_db_init): Update prototypes.
14670 * server.h (change_inferior_id): Delete prototype.
14671 (add_pid_to_list, pull_pid_from_list): New prototypes.
14672 * thread-db.c (thread_db_use_events): New.
14673 (find_first_thread): Rename to...
14674 (find_one_thread): ...this. Update callers and messages. Do not
14675 call fatal. Check thread_db_use_events. Do not call
14676 change_inferior_id or new_thread_notify.
14677 (maybe_attach_thread): Update. Do not call new_thread_notify.
14678 (thread_db_init): Set thread_db_use_events. Check use_events.
14679 * utils.c (fatal, warning): Correct message prefix.
14680
30ed0a8f
DJ
146812007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14682
14683 * Makefile.in (clean): Remove new files.
14684 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14685 (powerpc-64.o, powerpc-64.c): New rules.
14686 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14687 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14688 with SPE.
14689 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14690 SPE targets.
14691 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14692 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14693 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14694 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14695 (target_regsets): Add AltiVec and SPE register sets.
14696 * configure.ac: Check for AltiVec and SPE.
14697 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14698 (ppc_fill_vrregset, ppc_store_vrregset): New.
14699 (target_regsets): Add AltiVec register set.
14700 * configure: Regenerated.
14701
fd462a61
DJ
147022007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * linux-low.c (O_LARGEFILE): Define.
14705 (linux_read_memory): Use /proc/PID/mem.
14706 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14707 * configure, config.in: Regenerated.
14708
69f223ed
DJ
147092007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * linux-low.c (linux_wait_for_event): Do not pass signals while
14712 single-stepping.
14713
aec18585
PA
147142007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14715
14716 * win32-low.c (create_process): New.
14717 (win32_create_inferior): Use create_process instead of
14718 CreateProcess. If create_process failed retry appending an ".exe"
14719 suffix. Store the GetLastError result immediatelly after
14720 create_process calls and use it on the call to error.
14721
34d86ddd
PA
147222007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14723
14724 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14725
5a0e3bd0
JB
147262007-08-23 Joel Brobecker <brobecker@adacore.com>
14727
14728 * configure.ac: Switch license to GPLv3.
14729
f88c79e6
MS
147302007-08-01 Michael Snyder <msnyder@access-company.com>
14731
14732 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14733
6b3d9b83
PA
147342007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14737 typedef.
14738 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14739 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14740 CloseToolhelp32Snapshot.
14741 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14742 CloseToolhelp32Snapshot.
14743
c588c53c
MS
147442007-07-27 Michael Snyder <michael.snyder@access-company.com>
14745
14746 * server.c (main): Check for inferior exit before main loop.
14747
aa0403d9
PA
147482007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14749
14750 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14751 instead of on tmp_desc.
14752
255e7678
DJ
147532007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14754 Daniel Jacobowitz <dan@codesourcery.com>
14755
14756 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14757 (add_thread): Minor cleanups.
14758 (clear_inferiors): Move lower in the file. Clear the DLL
14759 list.
14760 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14761 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14762 (xml_escape_text): New.
14763 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14764 for qSupported.
14765 (handle_v_cont): Report errors.
14766 (gdbserver_version): Update.
14767 (main): Correct size of own_buf. Do not report initial DLL events.
14768 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14769 (unloaded_dll, xml_escape_text): New.
14770 * win32-low.c (enum target_waitkind): Update comments.
14771 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14772 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14773 (win32_EnumProcessModules, win32_GetModuleInformation)
14774 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14775 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14776 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14777 (win32_Module32First, win32_Module32Next, load_toolhelp)
14778 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14779 (get_child_debug_event): Handle DLL events.
14780 (win32_wait): Likewise.
14781
0d37add9
DJ
147822007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14785 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14786
45e2715e
PA
147872007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14788
14789 * win32-low.c (handle_output_debug_string): Ignore event if not
14790 waiting.
14791
c5674cf1
PA
147922007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14793
14794 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14795
2bbe3cc1
DJ
147962007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14799
ae13219e
DJ
148002007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * inferiors.c (change_inferior_id): Add comment.
14803 * linux-low.c (check_removed_breakpoint): Add an early
14804 prototype. Improve debug output.
14805 (linux_attach): Doc update.
14806 (linux_detach_one_process, linux_detach): Clean up before releasing
14807 each process.
14808 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14809 * linux-low.h (struct process_info): Doc improvement.
14810 * mem-break.c (delete_all_breakpoints): New.
14811 * mem-break.h (delete_all_breakpoints): New prototype.
14812 * thread-db.c (find_first_thread): New.
14813 (thread_db_create_event): Call it instead of
14814 thread_db_find_new_threads. Clean up unused variables.
14815 (maybe_attach_thread): Remove first thread handling.
14816 (thread_db_find_new_threads): Use find_first_thread.
14817 (thread_db_get_tls_address): Likewise.
14818
4105de34
DJ
148192007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14820
14821 * thread-db.c (thread_db_find_new_threads): Add prototype.
14822 (thread_db_create_event): Check for the main thread before adding
14823 a new thread.
14824 (maybe_attach_thread): Only enable event reporting if TID == 0.
14825 (thread_db_get_tls_address): Check for new threads.
14826
2b876972
DJ
148272007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14828
14829 * linux-low.c (linux_create_inferior): Try execv before execvp.
14830 * spu-low.c (spu_create_inferior): Likewise.
14831
7a245884
DJ
148322007-06-13 Mike Frysinger <vapier@gentoo.org>
14833
14834 * linux-low.c (linux_create_inferior): Change execv to execvp.
14835 * spu-low.c (spu_create_inferior): Likewies.
14836
117ce543
DJ
148372007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14838
14839 * Makefile.in (clean): Clean new files instead of deleted ones.
14840 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14841 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14842 rules.
14843 * configure.srv: Specify XML files and new regformats for MIPS and
14844 MIPS64 GNU/Linux.
14845 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14846 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14847 an entry for the restart register.
14848 (mips_cannot_fetch_register, mips_cannot_store_register)
14849 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14850 register names to match the XML descriptions.
14851 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14852 restart register instead of $0.
14853
0e7f50da
UW
148542007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14855 Markus Deuling <deuling@de.ibm.com>
14856
14857 * remote-utils.c (decode_xfer_write): New function.
14858 * server.h (decode_xfer_write): Add prototype.
14859 * server.c (handle_query): Add PACKET_LEN argument. Support
14860 qXfer:spu:read and qXfer:spu:write packets.
14861 (main): Pass packet_len to handle_query.
14862 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14863 * target.h (target_ops): Add qxfer_spu.
14864
374c1d38
UW
148652007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14866
14867 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14868 accessing non-seekable spufs files.
14869
bb63802a
UW
148702007-05-16 Markus Deuling <deuling@de.ibm.com>
14871
889bf7c5 14872 * server.c (handle_query): Add reply for qC packet.
bb63802a 14873
7390519e
PA
148742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14875 Leo Zayas <lerele@champenstudios@com>
14876
14877 * server.h (check_remote_input_interrupt_request): New function.
14878 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14879 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14880 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14881 (check_remote_input_interrupt_request): New function.
14882 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14883 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14884 winapi_GenerateConsoleCtrlEvent): New typedefs.
14885 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14886 to 250 ms.
14887 (win32_wait): Check for remote interrupt request
14888 with check_remote_input_interrupt_request.
14889 (win32_request_interrupt): New function.
14890 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14891
34b34921
PA
148922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14893
14894 * win32-low.c (debug_registers_changed,
14895 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14896 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14897 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14898 (thread_rec): Get context using the low target.
14899 (child_add_thread): Call thread_added on the low target,
14900 which does the same thing.
14901 (regptr): Delete.
14902 (do_initial_child_stuff): Remove debug registers references.
14903 Set context using the low target. Resume threads after
14904 setting the contexts.
14905 (child_continue): Remove dead variable. Remove debug
14906 registers references.
14907 (child_fetch_inferior_registers): Go through the low target.
14908 (do_child_store_inferior_registers): Remove.
14909 (child_store_inferior_registers): Go through the low target.
14910 (win32_resume): Remove debug registers references.
14911 Set context using the low target.
14912 (handle_exception): Change return type to void. Don't record
14913 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14914 first chance exception.
889bf7c5 14915 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14916 goto loop. Always return after waiting for debug event.
14917 (win32_wait): Convert to switch statement. Handle spurious
14918 events.
14919
14920 * win32-i386-low.c (debug_registers_changed,
14921 debug_registers_used): New.
14922 (initial_stuff): Rename to ...
14923 (i386_initial_stuff): ... this. Clear debug registers
14924 state variables.
14925 (store_debug_registers): Delete.
14926 (i386_get_thread_context): New.
14927 (load_debug_registers): Delete.
14928 (i386_set_thread_context): New.
14929 (i386_thread_added): New.
14930 (single_step): Rename to ...
14931 (i386_single_step): ... this.
14932 (do_fetch_inferior_registers): Rename to ...
14933 (i386_fetch_inferior_register): ... this.
14934 (i386_store_inferior_register): New.
14935 (the_low_target): Adapt to new interface.
14936
14937 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14938 (arm_get_thread_context): New.
14939 (arm_set_thread_context): New.
14940 (regptr): New.
14941 (do_fetch_inferior_registers): Rename to ...
14942 (arm_fetch_inferior_register): ... this.
14943 (arm_store_inferior_register): New.
14944 (arm_wince_breakpoint): Reimplement as unsigned long.
14945 (arm_wince_breakpoint_len): Define.
14946 (the_low_target): Adapt to new interface.
14947
14948 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14949 load_debug_registers. Add get_thread_context, set_thread_context,
14950 thread_added and store_inferior_register. Rename
14951 fetch_inferior_registers to fetch_inferior_register.
14952 (regptr): Remove declaration.
14953
dd6953e1
PA
149542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14955
14956 * linux-low.c (linux_detach): Change return type to int. Return 0.
14957 * spu-low.c (spu_detach): Likewise.
14958
444d6139
PA
149592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14960
14961 * target.h (target_ops): Change return type of detach to int.
14962 Add join.
14963 (join_inferior): New.
14964 * server.c (main): Don't skip detach support on mingw32.
14965 If the inferior doesn't support detaching return error.
14966 Call join_inferior instead of using waitpid.
14967 * linux-low.c (linux_join): New.
14968 (linux_target_op): Add linux_join.
14969 * spu-low.c (spu_join): New.
14970 (spu_target_ops): Add spu_join.
14971 * win32-low.c (win32_detach): Adapt to new interface.
14972 Reopen current_process_handle before detaching. Issue a child
14973 resume before detaching.
14974 (win32_join): New.
14975 (win32_target_op): Add win32_join.
14976
1d5315fe
PA
149772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14978
14979 * win32-low.c (win32-attach): Fix return value.
14980 * target.h (target_ops): Describe ATTACH return values.
14981
bf914831
PA
149822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14983
14984 * win32-low.c (GETPROCADDRESS): Define.
14985 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14986 (winapi_DebugSetProcessKillOnExit): Likewise.
14987 (win32_create_inferior): Force usage of ansi CreateProcessA.
14988 (win32_attach): Use GETPROCADDRESS.
14989 (win32_detach): Likewise.
14990
f72f3e60
PA
149912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14992
14993 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14994
ed50f18f
PA
149952007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14996
14997 * win32-low.c: Commit leftover changes from 2007-03-29.
14998
0c2ead7e
DJ
149992007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15000
15001 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15002 fields short instead of int. Add explicit padding.
15003 (i387_cache_to_fsave): Remove unnecessary casts.
15004 (i387_fsave_to_cache): Doc fix.
15005 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15006
73725ff3
DJ
150072007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15010 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15011
d99f33d8
PA
150122007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15013
15014 * configure.srv (arm*-*-mingw32ce*): Move near the other
15015 arm targets.
15016
68070c10
PA
150172007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15018
2482afc6 15019 * configure.ac: Add errno checking.
68070c10
PA
15020 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15021 sys/file.h and malloc.h.
15022 (AC_CHECK_DECLS): Add perror.
15023 (srv_mingwce): Handle.
2482afc6 15024 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15025 win32-i386-low.o to srv_tgtobj.
15026 (i[34567]86-*-mingw*): Likewise.
15027 (arm*-*-mingw32ce*): Add case.
15028 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15029 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15030 [__MINGW32CE__] (strerror): New function.
15031 [__MINGW32CE__] (errno): Define to GetLastError.
15032 [__MINGW32CE__] (COUNTOF): New macro.
15033 (remote_open): Remove extra close call.
15034 * mem-break.c (delete_breakpoint_at): New function.
15035 * mem-break.h (delete_breakpoint_at): Declare.
15036 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15037 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15038 [USE_WIN32API] (read, write): Add char* casts.
15039 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15040 * server.h: Include wincecompat.h on Windows CE.
15041 [HAVE_ERRNO_H]: Check.
15042 (perror): Declare if not declared.
15043 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15044 (perror_with_name): Remove errno declaration.
15045 * wincecompat.h: New.
15046 * wincecompat.c: New.
15047 * win32-low.h: New.
15048 * win32-arm-low.c: New.
15049 * win32-i386-low.c: New.
15050 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15051 (OUTMSG2): Make it safe.
15052 (_T): New macro.
15053 (COUNTOF): New macro.
15054 (NUM_REGS): Get it from the low target.
15055 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15056 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15057 (thread_rec): Let low target handle debug registers.
15058 (child_add_thread): Likewise.
15059 (child_init_thread_list): Likewise.
15060 (continue_one_thread): Likewise.
15061 (regptr): New.
15062 (do_child_fetch_inferior_registers): Move to ...
15063 * win32-i386-low.c: ... here, and rename to ...
15064 (do_fetch_inferior_registers): ... this.
889bf7c5 15065 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15066 Go through the low target.
15067 (do_child_store_inferior_registers): Use regptr.
15068 (strwinerror): New function.
15069 (win32_create_inferior): Handle Windows CE.
15070 Use strwinerror instead of strerror on Windows error
15071 codes. Add program to the error output.
15072 Don't close the main thread handle on Windows CE.
15073 (win32_attach): Use coredll.dll on Windows CE.
15074 (win32_kill): Close current process and current
15075 thread handles.
15076 (win32_detach): Use coredll.dll on Windows CE.
15077 (win32_resume): Let low target handle debug registers, and
15078 step request.
15079 (handle_exception): Add/Remove initial breakpoint. Avoid
15080 non-existant WSTOPSIG on Windows CE.
15081 (win32_read_inferior_memory): Cast to remove warning.
15082 (win32_arch_string): Go through the low target.
15083 (initialize_low): Call set_breakpoint_data with the low
15084 target's breakpoint.
15085 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15086 FOP_REGNUM, mappings): Move to ...
15087 * win32-i386-low.c: ... here.
15088 * win32-low.c (win32_thread_info): Move to ...
15089 * win32-low.h: ... here.
15090 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15091 win32-arm-low.c and wincecompat.c.
15092 (all:): Add $EXEEXT.
15093 (install-only:): Likewise.
15094 (gdbserver:): Likewise.
15095 (gdbreplay:): Likewise.
15096 * config.in: Regenerate.
15097 * configure: Regenerate.
15098
41093d81
PA
150992007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15100
15101 * win32-low.c: Rename typedef thread_info to
15102 win32_thread_info throughout.
15103
544afa54
PA
151042007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15105
15106 * win32-i386-low.c: Rename to ...
15107 * win32-low.c: ... this.
15108 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15109 * Makefile.in: Likewise.
15110
bce7165d
PA
151112007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15112
15113 * remote-utils.c (monitor_output): Constify msg parameter.
15114 * server.h (monitor_output): Likewise.
15115 * win32-i386-low.c (handle_output_debug_string): New.
15116 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15117 handle_output_debug_string.
15118 (get_child_debug_event): Likewise.
15119
506c7aa0
DJ
151202007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15121
15122 * server.c (main): Correct strtoul check.
15123
42c81e2a
DJ
151242007-03-27 Jon Ringle <jon@ringle.org>
15125
15126 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15127
9453113a
DJ
151282007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15129
15130 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15131
64a69107
DJ
151322007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15133
15134 * terminal.h: Check HAVE_SGTTY_H.
15135
151362007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15137
15138 * remote-utils.c (remote_open): Print out the assigned port number.
15139
c74d0ad8
DJ
151402007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15141
15142 * remote-utils.c (monitor_output): New function.
15143 * server.c (debug_threads): Define here.
15144 (monitor_show_help): New function.
15145 (handle_query): Handle qRcmd.
15146 (main): Do not handle 'd' packet.
15147 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15148 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15149 of debug_threads.
15150
de7c3b4a
PA
151512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15152
15153 * Makefile.in (EXEEXT): New.
15154 (clean): Use $(EXEEXT).
15155
ef57601b
PA
151562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15157
15158 * target.h (target_ops): Rename send_signal to request_interrupt,
15159 and remove enum target_signal parameter.
15160 * linux-low.c (linux_request_interrupt): Rename from
15161 linux_send_signal, and always send SIGINT.
15162 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15163 and always send SIGINT.
15164 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15165 of send_signal.
15166 (input_interrupt): Likewise.
15167
820f2bda
PA
151682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15169
15170 * server.c (get_features_xml): Check if target implemented
15171 arch_string.
15172 * win32-i386-low.c (win32_arch_string): New.
15173 (win32_target_ops): Add win32_arch_string as arch_string member.
15174
ab39bf24
UW
151752007-02-22 Markus Deuling <deuling@de.ibm.com>
15176
15177 * spu-low.c (spu_arch_string): New.
15178 (spu_target_ops): Add spu_arch_string.
15179
61ff6e04
DJ
151802007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15181
15182 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15183 * configure.ac: Do not check for terminal.h.
15184 * configure, config.in: Regenerated.
15185
fb1e4ffc
DJ
151862007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * Makefile.in (OBS): Add $(XML_BUILTIN).
15189 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15190 (clean): Update.
15191 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15192 (arm-with-iwmmxt.c): New.
15193 * config.in, configure: Regenerate.
15194 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15195 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15196 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15197 (arm*-*-linux*): Add iWMMXt and regset support.
15198 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15199 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15200 (arm_store_wmmxregset, target_regsets): New.
15201 * server.c (get_features_xml): Take annex argument. Check builtin
15202 XML documents.
15203 (handle_query): Handle multiple annexes.
15204
0f48aa01
DJ
152052007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15206
15207 * remote-utils.c [USE_WIN32API] (read, write): Define.
15208 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15209 write.
15210
23181151
DJ
152112007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * linux-i386-low.c (the_low_target): Set arch_string.
15214 * linux-x86-64-low.c (the_low_target): Likewise.
15215 * linux-low.c (linux_arch_string): New.
15216 (linux_target_ops): Add it.
15217 * linux-low.h (struct linux_target_ops): Add arch_string.
15218 * server.c (write_qxfer_response): Use const void * for DATA.
15219 (get_features_xml): New.
15220 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15221 * target.h (struct target_ops): Add arch_string method.
15222
9d606399
DJ
152232007-01-03 Denis Pilat <denis.pilat@st.com>
15224 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * linux-low.c (linux_kill): Handle being called with no threads.
15227 * win32-i386-low.c (win32_kill): Likewise.
15228 (get_child_debug_event): Clear current_process_handle.
15229
152302006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15231 Daniel Jacobowitz <dan@codesourcery.com>
15232
15233 * remote-utils.c (remote_open): Check the type of specified
15234 serial port devices before opening them.
15235 * server.c (main): Kill the inferior if an error occurs during
15236 the first remote_open.
15237
a5e13d24
DJ
152382006-12-05 Markus Deuling <deuling@de.ibm.com>
15239
15240 * README: Update supported targets.
15241
186947f7
DJ
152422006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15243
15244 * Makefile.in (clean): Remove reg-mips64.c.
15245 (reg-mips64.c, reg-mips64.o): New rules.
15246 * configure.srv: Handle mips64. Include regset support for mips.
15247 * linux-mips-low.c (union mips_register): New.
15248 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15249 (mips_breakpoint, mips_breakpoint_at): Use int.
15250 (mips_collect_register, mips_supply_register)
15251 (mips_collect_register_32bit, mips_supply_register_32bit)
15252 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15253 (mips_store_fpregset, target_regsets): New.
15254 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15255
a13e2c95
UW
152562006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15257
15258 * configure.srv: Add target "spu*-*-*".
15259 * Makefile.in (clean): Remove reg-spu.c.
15260 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15261 * spu-low.c: New file.
15262
cb7283db
DJ
152632006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15264
15265 * configure.ac: Correct td_thr_tls_get_addr test.
15266 * configure: Regenerated.
15267
89be2091
DJ
152682006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * linux-low.c (linux_wait_for_event): Reformat. Use the
15271 pass_signals array.
15272 * remote-utils.c (decode_address_to_semicolon): New.
15273 * server.c (pass_signals, handle_general_set): New.
15274 (handle_query): Mention QPassSignals for qSupported.
15275 (main): Call handle_general_set.
15276 * server.h (pass_signals, decode_address_to_semicolon): New.
15277
000ef4f0
DJ
152782006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15279
15280 * server.c (handle_query): Correct error handling for read_auxv.
15281
b7149293
UW
152822005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15283
15284 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15285 and srv_linux_thread_db to yes.
15286 * linux-s390-low.c (s390_fill_gregset): New function.
15287 (target_regsets): Define data structure.
15288
dae5f5cf
DJ
152892006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15290
15291 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15292 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15293 * config.in, configure: Regenerated.
15294 * inferiors.c (gdb_id_to_thread): New function.
15295 (gdb_id_to_thread_id): Use it.
15296 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15297 * linux-low.h (struct process_info): Add th member.
15298 (thread_db_get_tls_address): New prototype.
15299 * remote-utils.c (decode_address): Make non-static.
15300 * server.c (handle_query): Handle qGetTLSAddr.
15301 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15302 * target.h (struct target_ops): Add get_tls_address.
15303 * thread-db.c (maybe_attach_thread): Save the thread handle.
15304 (thread_db_get_tls_address): New.
15305
32ca6d61
DJ
153062006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15309 (linux_resume_one_process): Take a siginfo_t *. Update all
15310 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15311 (struct pending_signals): Add a siginfo_t.
15312 (linux_wait_for_process): Always set last_status.
15313 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15314 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15315 * linux-low.h (struct process_info): Add last_status.
15316
5ffff7c1
DJ
153172006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15318
15319 * remote-utils.c (try_rle): New function.
15320 (putpkt_binary): Use it.
15321
8695c747
DJ
153222006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15323
15324 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15325 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15326 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15327 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15328 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15329 point registers.
15330
290fadea
RS
153312006-08-08 Richard Sandiford <richard@codesourcery.com>
15332
15333 * server.c (terminal_fd): New variable.
15334 (old_foreground_pgrp): Likewise.
15335 (restore_old_foreground_pgrp): New function.
15336 (start_inferior): Record the terminal file descriptor in terminal_fd
15337 and its original foreground group in old_foreground_pgrp. Register
15338 restore_old_foreground_pgrp with atexit().
15339
9f2e1e63
DJ
153402006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15341
15342 * server.c (handle_query): Correct qPart to qXfer.
15343
b80864fb
DJ
153442006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15345
15346 * configure.ac: Check for more headers which are missing on
15347 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15348 * configure.srv: Add Cygwin and mingw32.
15349 * remote-utils.c: Don't include headers unconditionally which
15350 are missing on mingw32. Include <winsock.h> for mingw32.
15351 (remote_open): Adjust for mingw32 support. Flush
15352 standard error after writing to it.
15353 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15354 (unblock_async_io, enable_async_io, disable_async_io)
15355 (readchar, getpkt): Update for Winsock support.
15356 (prepare_resume_reply): Expect a protocol signal number.
15357 * server.c: Disable <sys/wait.h> on mingw32.
15358 (start_inferior): Adjust for mingw32 support. Flush
15359 standard error after writing to it.
15360 (attach_inferior): Likewise. Use protocol signal
15361 numbers.
15362 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15363 and names.
15364 * win32-i386-low.c: New file.
15365 * Makefile.in (XM_CLIBS): Set.
15366 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15367 (win32-i386-low.o): New dependency rule.
15368 * linux-low.c (linux_wait): Use target signal numbers.
15369 * target.h (struct target_ops): Doc fix.
15370 * server.h (target_signal_to_name): New prototype.
15371 * gdbreplay.c: Don't include headers unconditionally which
15372 are missing on mingw32. Include <winsock.h> for mingw32.
15373 (remote_close, remote_open): Adjust for Winsock support.
15374 * configure, config.in: Regenerated.
15375
0876f84a
DJ
153762006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15377
15378 * server.c (decode_xfer_read, write_qxfer_response): New.
15379 (handle_query): Take a packet length argument. Handle
15380 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15381 the qSupported response.
15382 (main): Update call to handle_query.
15383
01f9e8fa
DJ
153842006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15385
15386 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15387 (putpkt_binary): Renamed from putpkt and adjusted for binary
15388 data.
15389 (putpkt): New wrapper for putpkt_binary.
15390 (readchar): Don't mask off the high bit.
15391 (decode_X_packet): New function.
15392 * server.c (main): Call putpkt_binary if a handler sets the packet
15393 length. Save the length of the incoming packet. Handle 'X'.
15394 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15395
be2a5f71
DJ
153962006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15397
15398 * server.c (handle_query): Handle qSupported.
15399
ea025f5f
DJ
154002006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15401
15402 * remote-utils.c (all_symbols_looked_up): New variable.
15403 (look_up_one_symbol): Check it.
15404 * server.h (look_up_one_symbol): New declaration.
15405 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15406
9308fc88
DJ
154072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15408
15409 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15410 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15411 (PTRACE_GET_THREAD_AREA): Define.
15412 (ps_get_thread_area): New function.
15413
52fb6437
NS
154142006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15415
15416 * configure.srv (m68k*-*-uclinux*): New target.
15417 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15418 (linux_resume_one_process): Remove extraneous cast.
15419 (linux_read_offsets): New.
15420 (linux_target_op): Add linux_read_offsets on mmuless systems.
15421 * server.c (handle_query): Add qOffsets logic.
15422 * target.h (struct target_ops): Add read_offsets.
15423
21b0f40c
DJ
154242006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15427 (PTRACE_GET_THREAD_AREA): Define.
15428 (ps_get_thread_area): New function.
15429 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15430 (linux-x86-64-low.o): Update.
15431
0050a760
DJ
154322006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * configure.ac: Remove checks for prfpregset_t.
15435 * gdb_proc_service.h: New file.
15436 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15437 new "gdb_proc_service.h".
15438 * proc-service.c: Likewise.
15439 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15440 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15441 * Makefile.in (gdb_proc_service_h): Updated.
15442 * configure, config.in: Regenerated.
15443
b92a518e
DJ
154442006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15445
15446 * remote-utils.c (prepare_resume_reply): Move declaration
15447 of gdb_id_from_wait to the top of the block.
15448
545587ee
DJ
154492006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15450
15451 * linux-low.c (regsets_store_inferior_registers): Read the regset
15452 from the target before filling it.
15453
9db87ebd
DJ
154542006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * server.c (attach_inferior): Return SIGTRAP for a successful
15457 attach.
15458
dd24457d
DJ
154592006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15460
15461 * Makefile.in (OBS): Add version.o.
15462 (STAGESTUFF): Delete.
15463 (version.o): Add dependencies.
15464 (version.c): Replace rule.
15465 (clean): Remove version.c.
15466 * server.c (gdbserver_version): New.
15467 (gdbserver_usage): Use printf.
15468 (main): Handle --version and --help.
15469 * server.h (version, host_name): Add declarations.
15470
6f0f660e
EZ
154712005-12-23 Eli Zaretskii <eliz@gnu.org>
15472
889bf7c5
PA
15473 * linux-arm-low.c:
15474 * linux-arm-low.c:
15475 * inferiors.c:
15476 * i387-fp.h:
15477 * i387-fp.c:
15478 * gdbreplay.c:
15479 * regcache.c:
15480 * proc-service.c:
15481 * mem-break.h:
15482 * mem-break.c:
15483 * linux-x86-64-low.c:
15484 * linux-sh-low.c:
15485 * linux-s390-low.c:
15486 * linux-ppc64-low.c:
15487 * linux-ppc-low.c:
15488 * linux-mips-low.c:
15489 * linux-m68k-low.c:
15490 * linux-m32r-low.c:
15491 * linux-low.h:
15492 * linux-low.c:
15493 * linux-ia64-low.c:
15494 * linux-i386-low.c:
15495 * linux-crisv32-low.c:
15496 * thread-db.c:
15497 * terminal.h:
15498 * target.h:
15499 * target.c:
15500 * server.h:
15501 * server.c:
15502 * remote-utils.c:
15503 * regcache.h:
15504 * utils.c:
15505 * Makefile.in:
15506 * configure.ac:
6f0f660e
EZ
15507 * gdbserver.1: Add (C) after Copyright. Update the FSF
15508 address.
15509
9d1fb177
DJ
155102005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15511
15512 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15513 (arm_breakpoint_at): Recognize both breakpoints.
15514 (the_low_target): Use the correct breakpoint instruction.
15515
011a70c2
DJ
155162005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15519 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15520 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15521 (the_low_target): Update.
15522
7fb85e41
AS
155232005-10-25 Andreas Schwab <schwab@suse.de>
15524
15525 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15526
15527 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15528 (ia64_num_regs): Reduce to 462.
15529
3db0444b
DJ
155302005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * acinclude.m4: Correct quoting.
15533 * aclocal.m4: Regenerated.
15534
15535 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15536 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15537 (thread_db_init): Call thread_db_err_str.
15538 * configure.ac: Check for TD_VERSION.
15539 * config.in, configure: Regenerated.
15540
bee0189a
DJ
155412005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15542
15543 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15544
e9d25b98
DJ
155452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15548 is not available. Define HAVE_PTRACE_GETREGS if it is.
15549 * config.in, configure: Regenerated.
15550 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15551 * linux-i386-low.c, linux-m68k-low.c: Update to use
15552 HAVE_PTRACE_GETREGS.
15553 * linux-low.c (regsets_fetch_inferior_registers)
15554 (regsets_store_inferior_registers): Only return 0 if we processed
15555 GENERAL_REGS.
15556 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15557 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15558
a06660f7
DJ
155592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * inferiors.c (struct thread_info): Add gdb_id.
15562 (add_thread): Add gdb_id argument.
15563 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15564 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15565 calls to add_thread.
15566 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15567 * server.c (handle_query): Use thread_to_gdb_id.
15568 (handle_v_cont, main): Use gdb_id_to_thread_id.
15569 * server.h (add_thread): Update prototype.
15570 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15571 prototypes.
15572
5a1f5858
DJ
155732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15574
15575 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15576 left-padded registers.
15577 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15578 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15579
e122f1f5
SE
155802005-07-01 Steve Ellcey <sje@cup.hp.com>
15581
15582 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15583 * configure: Regenerate.
15584 * config.in: Regenerate.
15585 * server.h (NEED_DECLARATION_STRERROR):
15586 Replace with !HAVE_DECL_STRERROR.
15587
d592fa2f
DJ
155882005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15589
15590 * linux-low.c (linux_wait, linux_send_signal): Don't test
15591 an unsigned long variable for > 0 if it could be MAX_ULONG.
15592 * server.c (myresume): Likewise.
15593 * target.c (set_desired_inferior): Likewise.
15594
ccbd4912
MK
155952005-06-13 Mark Kettenis <kettenis@gnu.org>
15596
15597 * configure.ac: Simplify and improve check for socklen_t.
15598 * configure, config.in: Regenerate.
15599
f450004a
DJ
156002005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15601
15602 * acconfig.h: Remove.
15603 * configure.ac: Add a test for socklen_t. Use three-argument
15604 AC_DEFINE throughout.
15605 * config.in: Regenerated using autoheader 2.59.
15606 * configure: Regenerated.
15607
15608 * gdbreplay.c (socklen_t): Provide a default.
15609 (remote_open): Use socklen_t.
15610 * remote-utils.c (socklen_t): Provide a default.
15611 (remote_open): Use socklen_t.
15612 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15613 unsigned char.
15614
15615 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15616 char for buffers.
15617 * linux-low.c (linux_read_memory, linux_write_memory)
15618 (linux_read_auxv): Likewise.
15619 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15620 (check_mem_write): Likewise.
15621 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15622 Likewise.
15623 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15624 (registers_from_string, register_data): Likewise.
15625 * server.c (handle_query, main): Likewise.
15626 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15627 (decode_M_packet): Likewise.
15628 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15629 * target.h (struct target_ops): Update read_memory, write_memory,
15630 and read_auxv.
15631 (read_inferior_memory, write_inferior_memory): Update.
15632 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15633 to unsigned char *.
15634 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15635 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15636 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15637 linux-s390-low.c, linux-sh-low.c: Update for changes in
15638 read_inferior_memory and the_low_target->breakpoint.
15639
eee84df1
DJ
156402005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15641
15642 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15643 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15644 * configure.srv: Add powerpc64-*-linux*.
15645 * linux-ppc64-low.c: New file.
15646
45b134e5
OF
156472005-05-23 Orjan Friberg <orjanf@axis.com>
15648
15649 * linux-cris-low.c: New file with support for CRIS.
15650 * linux-crisv32-low.c: Ditto for CRISv32.
15651 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15652 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15653 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15654 reg-crisv32.o, and reg-crisv32.c to make rules.
15655 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15656 recognized targets.
15657
48d93c75
UW
156582005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15659
15660 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15661 of sizeof (PTRACE_XFER_TYPE).
15662 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15663
e013ee27
OF
156642005-05-12 Orjan Friberg <orjanf@axis.com>
15665
889bf7c5 15666 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15667 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15668 pointers for hardware watchpoint support.
15669 * linux-low.h (struct linux_target_ops): Ditto.
15670 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15671 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15672 to linux_target_ops.
15673 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15674 reply packet.
15675 * server.c (main): Recognize 'Z' and 'z' packets.
15676
b0ded00b
UW
156772005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15678
15679 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15680 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15681 (the_low_target): Add new members.
15682
8643e2ad
DJ
156832005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * proc-service.c (ps_lgetregs): Search all_processes instead of
15686 all_threads.
15687
fc620387
DJ
156882005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15689
15690 * server.c (start_inferior): Change return type to int.
15691 (attach_inferior): Change sigptr to int *.
15692 (handle_v_cont, handle_v_requests): Change signal to int *.
15693 (main): Change signal to int.
15694
156952005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15696
15697 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15698 * configure.srv: Add m32r*-*-linux*.
15699 * linux-m32r-low.c: New file.
15700
e0e76420
DJ
157012005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15702
15703 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15704
a1928bad
DJ
157052005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15706
15707 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15708 Take unsigned long arguments for PIDs.
15709 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15710 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15711 (wait_for_sigstop, linux_resume_one_process)
15712 (regsets_fetch_inferior_registers, linux_send_signal)
15713 (linux_read_auxv): Likewise. Update the types of variables holding
15714 PIDs. Update format string specifiers.
15715 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15716 * remote-utils.c (prepare_resume_reply): Likewise.
15717 * server.c (cont_thread, general_thread, step_thread)
15718 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15719 unsigned long.
15720 (handle_query): Update format specifiers.
15721 (handle_v_cont, main): Use strtoul for thread IDs.
15722 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15723 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15724 (general_thread, step_thread, thread_from_wait)
15725 (old_thread_from_wait): Update.
15726 * target.h (struct thread_resume): Use unsigned long for THREAD.
15727 (struct target_ops): Use unsigned long for arguments to attach and
15728 thread_alive.
15729
dcdb98d2
DJ
157302005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15731
15732 * acinclude.m4: Include bfd/bfd.m4 directly.
15733 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15734 <agriffis@toolchain.org>.
15735 * aclocal.m4, configure: Regenerated.
15736
bec39cab
AC
157372005-01-07 Andrew Cagney <cagney@gnu.org>
15738
15739 * configure.ac: Rename configure.in, require autoconf 2.59.
15740 * configure: Re-generate.
15741
434c4c77
DJ
157422004-12-08 Daniel Jacobowitz <dan@debian.org>
15743
15744 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15745 LIBS when finished.
15746 * aclocal.m4: Regenerated.
15747 * configure: Regenerated.
15748
db1d3e1b
AS
157492004-11-21 Andreas Schwab <schwab@suse.de>
15750
15751 * linux-m68k-low.c (m68k_num_gregs): Define.
15752 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15753 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15754 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15755 (m68k_breakpoint_at): New. Add to the_low_target.
15756
15757 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15758 srv_linux_thread_db to yes.
15759
43360365
JB
157602004-10-20 Joel Brobecker <brobecker@gnat.com>
15761
15762 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15763 (ARCH_SET_FS): Likewise.
15764 (ARCH_GET_FS): Likewise.
15765 (ARCH_GET_GS): Likewise.
15766
fd500816
DJ
157672004-10-16 Daniel Jacobowitz <dan@debian.org>
15768
15769 * linux-i386-low.c (ps_get_thread_area): New.
15770 * linux-x86-64-low.c (ps_get_thread_area): New.
15771 * linux-low.c: Include <sys/syscall.h>.
15772 (linux_kill_one_process): Don't kill the first thread here.
15773 (linux_kill): Kill the first thread here.
15774 (kill_lwp): New function.
15775 (send_sigstop, linux_send_signal): Use it.
15776 * proc-service.c: Clean up #ifdefs.
15777 (fpregset_info): Delete.
15778 (ps_lgetregs): Update and enable implementation.
15779 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15780 implementations.
15781 * remote-utils.c (struct sym_cache, symbol_cache): New.
15782 (input_interrupt): Print a clearer message.
15783 (async_io_enabled): New variable.
15784 (enable_async_io, disable_async_io): Use it. Update comments.
15785 (look_up_one_symbol): Use the symbol cache.
15786 * thread-db.c (thread_db_look_up_symbols): New function.
15787 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15788
f6de3c42
DJ
157892004-10-16 Daniel Jacobowitz <dan@debian.org>
15790
15791 * configure.in: Test for -rdynamic.
15792 * configure: Regenerated.
15793 * Makefile (INTERNAL_LDFLAGS): New.
15794 (gdbserver, gdbreplay): Use it.
15795
2c0fc042
AC
157962004-09-02 Andrew Cagney <cagney@gnu.org>
15797
15798 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15799
075b3282
DJ
158002004-03-23 Daniel Jacobowitz <drow@mvista.com>
15801
15802 * linux-low.c (linux_wait): Clear all_processes list also.
15803
fa6a77dc
DJ
158042004-03-12 Daniel Jacobowitz <drow@mvista.com>
15805
15806 * linux-low.c: Include <errno.h>. Remove extern declaration of
15807 errno.
15808
6d782a97
DJ
158092004-03-12 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * gdbreplay.c, server.h, utils.c: Update copyright years.
15812
3a7fb99b
DJ
158132004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15814
15815 * server.c (main): Print child status or termination signal from
15816 variable 'signal', not 'sig'.
15817
c3e735a6
DJ
158182004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15819
15820 * linux-low.c (linux_read_memory): Change return type to
15821 int. Check for and return error from ptrace().
15822 * target.c (read_inferior_memory): Change return type to int. Pass
15823 back return status from the_target->read_memory().
15824 * target.h (struct target_ops): Adapt *read_memory() prototype.
15825 Update comment.
15826 (read_inferior_memory): Adapt prototype.
15827 * server.c (main): Return an error packet if
15828 read_inferior_memory() returns an error.
15829
a59d1c82
DJ
158302004-03-04 Daniel Jacobowitz <drow@mvista.com>
15831
15832 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15833 Unify with other clean targets.
15834
dc3f8883
DJ
158352004-02-29 Daniel Jacobowitz <drow@mvista.com>
15836
15837 * server.c (handle_v_cont): Call set_desired_inferior.
15838
89a208da
DJ
158392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15840
15841 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15842
62ea82f5
DJ
158432004-02-29 Daniel Jacobowitz <drow@mvista.com>
15844
15845 * linux-low.c (linux_wait): Unblock async I/O.
15846 (linux_resume): Block and enable async I/O.
15847 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15848 * server.h (block_async_io, unblock_async_io): Add prototypes.
15849
6910d122
DJ
158502004-02-29 Daniel Jacobowitz <drow@mvista.com>
15851
15852 * remote-utils.c (remote_open): Print a status notice after
15853 opening a TCP port.
15854 * server.c (attach_inferior): Print a status notice after
15855 attaching.
15856
158572004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15858
15859 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15860
c89dc5d4
DJ
158612004-02-26 Daniel Jacobowitz <drow@mvista.com>
15862
15863 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15864 error packet.
15865 * server.c, target.h: Update copyright years.
15866
4b8dad4a
RM
158672004-02-25 Roland McGrath <roland@redhat.com>
15868
15869 * target.h (struct target_ops): New member `read_auxv'.
15870 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15871 * linux-low.c (linux_read_auxv): New function.
15872 (linux_target_ops): Initialize `read_auxv' member to that.
15873
d7446758
JB
158742004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15875
15876 Committed by Jim Blandy <jimb@redhat.com>.
15877
15878 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15879 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15880 instead of GPR_SIZE to distiguish s390 and s390x targets.
15881
5544ad89
DJ
158822004-01-31 Daniel Jacobowitz <drow@mvista.com>
15883
15884 * linux-low.c: Update copyright year.
15885 (check_removed_breakpoint): Clear pending_is_breakpoint.
15886 (linux_set_resume_request, linux_queue_one_thread)
15887 (resume_status_pending_p): New functions.
15888 (linux_continue_one_thread): Use process->resume.
15889 (linux_resume): Only resume threads if there are no pending events.
15890 * linux-low.h (struct process_info): Add resume request
15891 pointer.
15892
2a68b70e
DJ
158932004-01-30 Daniel Jacobowitz <drow@mvista.com>
15894
15895 * regcache.c (new_register_cache): Clear the allocated register
15896 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15897
64386c31
DJ
158982003-10-13 Daniel Jacobowitz <drow@mvista.com>
15899
15900 * linux-low.c (linux_resume): Take a struct thread_resume *
15901 argument.
15902 (linux_wait): Update call.
15903 (resume_ptr): New static variable.
15904 (linux_continue_one_thread): Renamed from
15905 linux_continue_one_process. Use resume_ptr.
15906 (linux_resume): Use linux_continue_one_thread.
15907 * server.c (handle_v_cont, handle_v_requests): New functions.
15908 (myresume): New function.
15909 (main): Handle 'v' case.
15910 * target.h (struct thread_resume): New type.
15911 (struct target_ops): Change argument of "resume" to struct
15912 thread_resume *.
15913 (myresume): Delete macro.
15914
c938e9b0
L
159152003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15916
15917 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15918 (uninstall): Support DESTDIR.
15919
7f313d07
BC
15920Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15921
15922 * configure.srv: Add xscale*linux copy of arm*linux entry.
15923
3b2fc2ea
DJ
159242003-07-24 Daniel Jacobowitz <drow@mvista.com>
15925
15926 * linux-arm-low.c (arm_reinsert_addr): New function.
15927 (the_low_target): Add arm_reinsert_addr.
15928
1c0a559e
MK
159292003-07-08 Mark Kettenis <kettenis@gnu.org>
15930
15931 * mem-break.c: Remove whitespace at end of file.
15932
43d5792c
DJ
159332003-06-28 Daniel Jacobowitz <drow@mvista.com>
15934
15935 * configure.in: Check whether we need to prototype strerror.
15936 * server.h: Optionally prototype strerror.
15937 * gdbreplay.c (perror_with_name): Use strerror.
15938 * linux-low.c (linux_attach_lwp): Use strerror.
15939 * utils.c (perror_with_name): Use strerror.
15940 * config.in, configure: Regenerated.
15941
c8a86edf
DJ
159422003-06-28 Daniel Jacobowitz <drow@mvista.com>
15943
15944 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15945 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15946
73d37363
DJ
159472003-06-20 Daniel Jacobowitz <drow@mvista.com>
15948
15949 * Makefile.in (SFILES): Update.
15950 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15951 low-sun3.c: Remove files.
15952
6ad8ae5c
DJ
159532003-06-17 Daniel Jacobowitz <drow@mvista.com>
15954
15955 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15956 (linux_detach_one_process, linux_detach): New functions.
15957 (linux_target_ops): Add linux_detach.
15958 * server.c (main): Handle 'D' packet.
15959 * target.h (struct target_ops): Add "detach" member.
15960 (detach_inferior): Define.
15961
1581182a
MK
159622003-06-13 Mark Kettenis <kettenis@gnu.org>
15963
15964 From Kelley Cook <kelleycook@wideopenwest.com>:
15965 * configure.srv: Accept i[34567]86 variants.
15966
e5379b03
DJ
159672003-06-05 Daniel Jacobowitz <drow@mvista.com>
15968
15969 * linux-low.c (linux_wait_for_event): Correct comment typos.
15970 (linux_resume_one_process): Call check_removed_breakpoint.
15971 (linux_send_signal): New function.
15972 (linux_target_ops): Add linux_send_signal.
15973 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15974 of kill.
15975 * target.h (struct target_ops): Add send_signal.
15976
2ff29de4
JB
159772003-05-29 Jim Blandy <jimb@redhat.com>
15978
15979 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15980 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15981 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15982 away part of the register's value.
15983
254787d4
DJ
159842003-03-26 Daniel Jacobowitz <drow@mvista.com>
15985
15986 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15987 (linux_wait_for_event, linux_init_signals): Likewise.
15988
94e10508
DJ
159892003-03-17 Daniel Jacobowitz <drow@mvista.com>
15990
15991 * configure.in: Check for stdlib.h.
15992 * configure: Regenerated.
15993 * config.in: Regenerated.
15994
4c0711e0
DJ
159952003-01-04 Andreas Schwab <schwab@suse.de>
15996
15997 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15998
ef66e766
AC
159992003-01-02 Andrew Cagney <ac131313@redhat.com>
16000
16001 * Makefile.in: Remove obsolete code.
16002
a1358604
DJ
160032002-11-20 Daniel Jacobowitz <drow@mvista.com>
16004
16005 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16006 defined(PT_FPR0_HI).
16007
23ce3b1c
DJ
160082002-11-17 Stuart Hughes <seh@zee2.com>
16009
16010 * linux-arm-low.c (arm_num_regs): Increase.
16011 (arm_regmap): Include status register.
16012
160132002-11-17 Daniel Jacobowitz <drow@mvista.com>
16014
16015 * linux-low.c (register_addr): Remove incorrect -1 check.
16016
a9fa9f7d
DJ
160172002-08-29 Daniel Jacobowitz <drow@mvista.com>
16018
16019 * linux-low.c (linux_create_inferior): Call setpgid. Return
16020 the new PID.
16021 (unstopped_p, linux_signal_pid): Remove.
16022 (linux_target_ops): Remove linux_signal_pid.
16023 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16024 global instead of target method.
16025 * target.h (struct target_ops): Remove signal_pid. Update comment
16026 for create_inferior.
16027 * server.c (signal_pid): New variable.
16028 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16029 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16030 (attach_inferior): Set signal_pid.
16031
17574093
DJ
160322002-08-23 Daniel Jacobowitz <drow@mvista.com>
16033
16034 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16035
160362002-08-20 Jim Blandy <jimb@redhat.com>
16037
16038 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16039 default for this.
16040
160412002-08-01 Andrew Cagney <cagney@redhat.com>
16042
16043 * Makefile.in: Make chill references obsolete.
16044
160452002-07-24 Kevin Buettner <kevinb@redhat.com>
16046
16047 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16048 * configure: Regenerate.
16049 * config.in: Regenerate.
16050
160512002-07-09 David O'Brien <obrien@FreeBSD.org>
16052
16053 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16054 (perror_with_name, remote_close, remote_open, expect, play): Static.
16055
160562002-07-04 Michal Ludvig <mludvig@suse.cz>
16057
4b8dad4a 16058 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16059 byte offsets instead of an array of indexes.
16060 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16061
160622002-06-13 Daniel Jacobowitz <drow@mvista.com>
16063
16064 * regcache.c: Add comment.
16065
160662002-06-11 Daniel Jacobowitz <drow@mvista.com>
16067
16068 * thread-db.c: New file.
16069 * proc-service.c: New file.
16070 * acinclude.m4: New file.
16071 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16072 proc-service.o, and thread-db.o.
16073 (linux-low.o): Add USE_THREAD_DB.
16074 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16075 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16076 * aclocal.m4: Regenerated.
16077 * config.in: Regenerated.
16078 * configure: Regenerated.
16079 * configure.in: Check for proc_service.h, sys/procfs.h,
16080 thread_db.h, and linux/elf.h headrs.
16081 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16082 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16083 Check for -lthread_db and thread support.
16084 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16085 PowerPC, and SuperH.
16086 * i387-fp.c: Constify arguments.
16087 * i387-fp.h: Likewise.
16088 * inferiors.c: (struct thread_info): Renamed from
16089 `struct inferior_info'. Remove PID member. Use generic inferior
16090 list header. All uses updated.
16091 (inferiors, signal_pid): Removed.
16092 (all_threads): New variable.
16093 (get_thread): Define.
16094 (add_inferior_to_list): New function.
16095 (for_each_inferior): New function.
16096 (change_inferior_id): New function.
16097 (add_inferior): Removed.
16098 (remove_inferior): New function.
16099 (add_thread): New function.
16100 (free_one_thread): New function.
16101 (remove_thread): New function.
16102 (clear_inferiors): Use for_each_inferior and free_one_thread.
16103 (find_inferior): New function.
16104 (find_inferior_id): New function.
16105 (inferior_target_data): Update argument type.
16106 (set_inferior_target_data): Likewise.
16107 (inferior_regcache_data): Likewise.
16108 (set_inferior_regcache_data): Likewise.
16109 * linux-low.c (linux_bp_reinsert): Remove.
16110 (all_processes, stopping_threads, using_thrads)
16111 (struct pending_signals, debug_threads, pid_of): New.
16112 (inferior_pid): Replace with macro.
16113 (struct inferior_linux_data): Remove.
16114 (get_stop_pc, add_process): New functions.
16115 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16116 Use add_process and add_thread.
16117 (linux_attach_lwp): New function, based on old linux_attach. Use
16118 add_process and add_thread. Set stop_expected for new threads.
16119 (linux_attach): New function.
16120 (linux_kill_one_process): New function.
16121 (linux_kill): Kill all LWPs.
16122 (linux_thread_alive): Use find_inferior_id.
16123 (check_removed_breakpoints, status_pending_p): New functions.
16124 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16125 Update. Use WNOHANG. Wait for cloned processes also. Update process
16126 struct for the found process.
16127 (linux_wait_for_event): New function.
16128 (linux_wait): Use it. Support LWPs.
16129 (send_sigstop, wait_for_sigstop, stop_all_processes)
16130 (linux_resume_one_process, linux_continue_one_process): New functions.
16131 (linux_resume): Support LWPs.
16132 (REGISTER_RAW_SIZE): Remove.
16133 (fetch_register): Use register_size instead. Call supply_register.
16134 (usr_store_inferior_registers): Likewise. Call collect_register.
16135 Fix recursive case.
16136 (regsets_fetch_inferior_registers): Improve error message.
16137 (regsets_store_inferior_registers): Add debugging.
16138 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16139 (unstopped_p, linux_signal_pid): New functions.
16140 (linux_target_ops): Add linux_signal_pid.
16141 (linux_init_signals): New function.
16142 (initialize_low): Call it. Initialize using_threads.
16143 * regcache.c (inferior_regcache_data): Add valid
16144 flag.
16145 (get_regcache): Fetch registers lazily. Add fetch argument
16146 and update all callers.
16147 (regcache_invalidate_one, regcache_invalidate): New
16148 functions.
16149 (new_register_cache): Renamed from create_register_cache.
16150 Return the new regcache.
16151 (free_register_cache): Change argument to a void *.
16152 (registers_to_string, registers_from_string): Call get_regcache
16153 with fetch flag set.
16154 (register_data): Make static. Pass fetch flag to get_regcache.
16155 (supply_register): Call get_regcache with fetch flag clear.
16156 (collect_register): Call get_regcache with fetch flag set.
16157 (collect_register_as_string): New function.
16158 * regcache.h: Update.
16159 * remote-utils.c (putpkt): Flush after debug output and use
16160 stderr.
16161 Handle input interrupts while waiting for an ACK.
16162 (input_interrupt): Use signal_pid method.
16163 (getpkt): Flush after debug output and use stderr.
16164 (outreg): Use collect_register_as_string.
16165 (new_thread_notify, dead_thread_notify): New functions.
16166 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16167 and general_thread.
16168 (look_up_one_symbol): Flush after debug output.
16169 * server.c (step_thread, server_waiting): New variables.
16170 (start_inferior): Don't use signal_pid. Update call to mywait.
16171 (attach_inferior): Update call to mywait.
16172 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16173 (main): Don't fetch/store registers explicitly. Use
16174 set_desired_inferior. Support proposed ``Hs'' packet. Update
16175 calls to mywait.
16176 * server.h: Update.
16177 (struct inferior_list, struct_inferior_list_entry): New.
16178 * target.c (set_desired_inferior): New.
16179 (write_inferior_memory): Constify.
16180 (mywait): New function.
16181 * target.h: Update.
16182 (struct target_ops): New signal_pid method.
16183 (mywait): Removed macro, added prototype.
16184
16185 * linux-low.h (regset_func): Removed.
16186 (regset_fill_func, regset_store_func): New.
16187 (enum regset_type): New.
16188 (struct regset_info): Add type field. Use new operation types.
16189 (struct linux_target_ops): stop_pc renamed to get_pc.
16190 Add decr_pc_after_break and breakpoint_at.
16191 (get_process, get_thread_proess, get_process_thread)
16192 (strut process_info, all_processes, linux_attach_lwp)
16193 (thread_db_init): New.
16194
16195 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16196 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16197 (the_low_target): Add new members.
16198 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16199 (i386_store_fpxregset): Constify.
16200 (target_regsets): Add new kind identifier.
16201 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16202 (i386_set_pc): Add debugging.
16203 (i386_breakpoint_at): New function.
16204 (the_low_target): Add new members.
16205 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16206 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16207 (mips_breakpoint_at): New.
16208 (the_low_target): Add new members.
16209 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16210 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16211 (the_low_target): Add new members.
16212 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16213 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16214 (the_low_target): Add new members.
16215 * linux-x86-64-low.c (target_regsets): Add new kind
16216 identifier.
16217
162182002-05-15 Daniel Jacobowitz <drow@mvista.com>
16219
16220 From Martin Pool <mbp@samba.org>:
16221 * server.c (gdbserver_usage): New function.
16222 (main): Call it.
16223
162242002-05-14 Daniel Jacobowitz <drow@mvista.com>
16225
16226 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16227 stop_at -> stop_pc.
16228
162292002-05-04 Andrew Cagney <ac131313@redhat.com>
16230
16231 * Makefile.in: Remove obsolete code.
16232
162332002-04-24 Michal Ludvig <mludvig@suse.cz>
16234
16235 * linux-low.c (regsets_fetch_inferior_registers),
16236 (regsets_store_inferior_registers): Removed cast to int from
16237 ptrace() calls.
16238 * regcache.h: Added declaration of struct inferior_info.
16239
162402002-04-20 Daniel Jacobowitz <drow@mvista.com>
16241
16242 * inferiors.c (struct inferior_info): Add regcache_data.
16243 (add_inferior): Call create_register_cache.
16244 (clear_inferiors): Call free_register_cache.
16245 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16246 * regcache.c (struct inferior_regcache_data): New.
16247 (registers): Remove.
16248 (get_regcache): New function.
16249 (create_register_cache, free_register_cache): New functions.
16250 (set_register_cache): Don't initialize the register cache here.
16251 (registers_to_string, registers_from_string, register_data): Call
16252 get_regcache.
16253 * regcache.h: Add prototypes.
16254 * server.h: Likewise.
16255
162562002-04-20 Daniel Jacobowitz <drow@mvista.com>
16257
16258 * mem-break.c: New file.
16259 * mem-break.h: New file.
16260 * Makefile.in: Add mem-break.o rule; update server.h
16261 dependencies.
16262 * inferiors.c (struct inferior_info): Add target_data
16263 member.
16264 (clear_inferiors): Free target_data member if set.
16265 (inferior_target_data, set_inferior_target_data): New functions.
16266 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16267 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16268 * linux-low.c (linux_bp_reinsert): New variable.
16269 (struct inferior_linux_data): New.
16270 (linux_create_inferior): Use set_inferior_target_data.
16271 (linux_attach): Likewise. Call add_inferior.
16272 (linux_wait_for_one_inferior): New function.
16273 (linux_wait): Call it.
16274 (linux_write_memory): Add const.
16275 (initialize_low): Call set_breakpoint_data.
16276 * linux-low.h (struct linux_target_ops): Add breakpoint
16277 handling members.
16278 * server.c (attach_inferior): Remove extra add_inferior
16279 call.
16280 * server.h: Include mem-break.h. Update inferior.c
16281 prototypes.
16282 * target.c (read_inferior_memory)
16283 (write_inferior_memory): New functions.
16284 * target.h (read_inferior_memory)
16285 (write_inferior_memory): Change macros to prototypes.
16286 (struct target_ops): Update comments. Add const to write_memory
16287 definition.
16288
162892002-04-11 Daniel Jacobowitz <drow@mvista.com>
16290
16291 * linux-low.c (usr_store_inferior_registers): Support
16292 registers which are allowed to fail to store.
16293 * linux-low.h (linux_target_ops): Likewise.
16294 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16295 (ppc_cannot_store_register): FPSCR may not be storable.
16296
162972002-04-09 Daniel Jacobowitz <drow@mvista.com>
16298
16299 * server.h: Include <string.h> if HAVE_STRING_H.
16300 * ChangeLog: Correct paths in last ChangeLog entry.
16301
163022002-04-09 Daniel Jacobowitz <drow@mvista.com>
16303
16304 * linux-low.h: Remove obsolete prototypes.
16305 (struct linux_target_ops): New.
16306 (extern the_low_target): New.
16307 * linux-low.c (num_regs, regmap): Remove declarations.
16308 (register_addr): Use the_low_target explicitly.
16309 (fetch_register): Likewise.
16310 (usr_fetch_inferior_registers): Likewise.
16311 (usr_store_inferior_registers): Likewise.
16312 * linux-arm-low.c (num_regs): Remove.
16313 (arm_num_regs): Define.
16314 (arm_regmap): Renamed from regmap, made static.
16315 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16316 made static.
16317 (arm_cannot_store_register): Renamed from cannot_store_register,
16318 made static.
16319 (the_low_target): New.
16320 * linux-i386-low.c (num_regs): Remove.
16321 (i386_num_regs): Define.
16322 (i386_regmap): Renamed from regmap, made static.
16323 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16324 made static.
16325 (i386_cannot_store_register): Renamed from cannot_store_register,
16326 made static.
16327 (the_low_target): New.
16328 * linux-ia64-low.c (num_regs): Remove.
16329 (ia64_num_regs): Define.
16330 (ia64_regmap): Renamed from regmap, made static.
16331 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16332 made static.
16333 (ia64_cannot_store_register): Renamed from cannot_store_register,
16334 made static.
16335 (the_low_target): New.
16336 * linux-m68k-low.c (num_regs): Remove.
16337 (m68k_num_regs): Define.
16338 (m68k_regmap): Renamed from regmap, made static.
16339 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16340 made static.
16341 (m68k_cannot_store_register): Renamed from cannot_store_register,
16342 made static.
16343 (the_low_target): New.
16344 * linux-mips-low.c (num_regs): Remove.
16345 (mips_num_regs): Define.
16346 (mips_regmap): Renamed from regmap, made static.
16347 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16348 made static.
16349 (mips_cannot_store_register): Renamed from cannot_store_register,
16350 made static.
16351 (the_low_target): New.
16352 * linux-ppc-low.c (num_regs): Remove.
16353 (ppc_num_regs): Define.
16354 (ppc_regmap): Renamed from regmap, made static.
16355 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16356 made static.
16357 (ppc_cannot_store_register): Renamed from cannot_store_register,
16358 made static.
16359 (the_low_target): New.
16360 * linux-s390-low.c (num_regs): Remove.
16361 (s390_num_regs): Define.
16362 (s390_regmap): Renamed from regmap, made static.
16363 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16364 made static.
16365 (s390_cannot_store_register): Renamed from cannot_store_register,
16366 made static.
16367 (the_low_target): New.
16368 * linux-sh-low.c (num_regs): Remove.
16369 (sh_num_regs): Define.
16370 (sh_regmap): Renamed from regmap, made static.
16371 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16372 made static.
16373 (sh_cannot_store_register): Renamed from cannot_store_register,
16374 made static.
16375 (the_low_target): New.
16376 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16377 (the_low_target): New.
16378
163792002-04-09 Daniel Jacobowitz <drow@mvista.com>
16380
16381 * Makefile.in: Add stamp-h target.
16382 * configure.in: Create stamp-h.
16383 * configure: Regenerated.
16384
163852002-04-09 Daniel Jacobowitz <drow@mvista.com>
16386
16387 * inferiors.c: New file.
16388 * target.c: New file.
16389 * target.h: New file.
16390 * Makefile.in: Add target.o and inferiors.o. Update
16391 dependencies.
16392 * linux-low.c (inferior_pid): New static variable,
16393 moved from server.c.
16394 (linux_create_inferior): Renamed from create_inferior.
16395 Call add_inferior. Return 0 on success instead of a PID.
16396 (linux_attach): Renamed from myattach.
16397 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16398 (linux_thread_alive): Renamed from mythread_alive.
16399 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16400 child dies.
16401 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16402 (regsets_store_inferior_registers): Correct error message.
16403 Add missing ``return 0''.
16404 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16405 (linux_store_registers): Renamed from store_inferior_registers.
16406 (linux_read_memory): Renamed from read_inferior_memory.
16407 (linux_write_memory): Renamed from write_inferior_memory.
16408 (linux_target_ops): New structure.
16409 (initialize_low): Call set_target_ops ().
16410 * remote-utils.c (unhexify): New function.
16411 (hexify): New function.
16412 (input_interrupt): Send signals to ``signal_pid''.
16413 * server.c (inferior_pid): Remove.
16414 (start_inferior): Update create_inferior call.
16415 (attach_inferior): Call add_inferior.
16416 (handle_query): New function.
16417 (main): Call handle_query for `q' packets.
16418 * server.h: Include "target.h". Remove obsolete prototypes.
16419 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16420
164212002-04-09 Daniel Jacobowitz <drow@mvista.com>
16422
16423 * Makefile.in: Add WARN_CFLAGS. Update configury
16424 dependencies.
16425 * configure.in: Check for <string.h>
16426 * configure: Regenerate.
16427 * config.in: Regenerate.
16428 * gdbreplay.c: Include needed system headers.
16429 (remote_open): Remove strchr prototype.
16430 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16431 * regcache.c (supply_register): Change buf argument to const void *.
16432 (supply_register_by_name): Likewise.
16433 (collect_register): Change buf argument to void *.
16434 (collect_register_by_name): Likewise.
16435 * regcache.h: Add missing prototypes.
16436 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16437 * server.c (handle_query): New function.
16438 (attached): New static variable, moved out of main.
16439 (main): Quiet longjmp clobber warnings.
16440 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16441 * utils.c (error): Remove NORETURN.
16442 (fatal): Likewise.