]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add thread_db_notice_clone to gdbserver
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
86299109
KB
12017-09-21 Kevin Buettner <kevinb@redhat.com>
2
3 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4 * linux-low.h (thread_db_notice_clone): Declare.
5 * thread-db.c (thread_db_notice_clone): New function.
6
f557a88a
PA
72017-09-21 Pedro Alves <palves@redhat.com>
8
9 * server.c (gdb_read_memory, handle_status, process_serial_event)
10 (handle_serial_event, handle_target_event): Adjust to
11 set_desired_thread prototype change.
12 * target.c (set_desired_thread): Remove 'use_general' parameter
13 and adjust.
14 * target.h (set_desired_thread): Remove 'use_general' parameter.
15
223ffa71
TT
162017-09-20 Tom Tromey <tom@tromey.com>
17
18 * target.c (target_terminal::terminal_state): Define.
19 (target_terminal::init): Rename from target_terminal_init.
20 (target_terminal::inferior): Rename from
21 target_terminal_inferior.
22 (target_terminal::ours): Rename from target_terminal_ours.
23 (target_terminal::ours_for_output, target_terminal::info): New.
24
04fd3ba9
SM
252017-09-16 Simon Marchi <simon.marchi@ericsson.com>
26
27 * server.c (accumulate_file_name_length): Remove.
28 (emit_dll_description): Adjust to std::string change.
29 (handle_qxfer_libraries): Use std::string to hold document.
30
5e187554
SM
312017-09-16 Simon Marchi <simon.marchi@ericsson.com>
32
33 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
34 return type of xml_escape_text.
35 * server.c (emit_dll_description): Likewise.
36
1526853e
SM
372017-09-16 Simon Marchi <simon.marchi@ericsson.com>
38
39 * server.c (captured_main): Accept argument for --selftest.
40 Update run_tests call.
41 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
42 when registering selftests.
43
c4dfafab
SDJ
442017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
45
46 * regcache.c (get_thread_regcache): Update code to use "std::vector"
47 instead of "VEC" for "target_desc.reg_defs".
48 (regcache_cpy): Likewise.
49 (registers_to_string): Likewise.
50 (registers_from_string): Likewise.
51 (find_regno): Likewise.
52 (supply_regblock): Likewise.
53 (regcache_raw_read_unsigned): Likewise.
54 * tdesc.c (init_target_desc): Likewise.
55 (tdesc_create_reg): Likewise.
56 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
57 (struct target_desc) <reg_defs>: Convert to "std::vector".
58 (target_desc): Do not initialize "reg_defs".
59 (~target_desc): Update code to use "std::vector" instead of "VEC"
60 for "target_desc.reg_defs".
61 (operator==): Likewise.
62
124aceb4
SM
632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
64
65 * inferiors.h (thread_to_gdb_id): Remove.
66 * inferiors.c (thread_to_gdb_id): Remove.
67 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
68 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
69 lynx_store_registers, lynx_read_memory, lynx_write_memory):
70 Likewise.
71 * nto-low.c (nto_fetch_registers, nto_store_registers,
72 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
73
96cde54f
SM
742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
75
76 * inferiors.h (gdb_id_to_thread_id): Remove.
77 * inferiors.c (gdb_id_to_thread_id): Remove.
78 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
79 removal. Move pid declaration closer to where it's used.
80
e8ca139e
SM
812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
82
83 * server.c (handle_detach): New function.
84 (process_serial_event): Move code out, call handle_detach.
85
f8a4e119
SM
862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
87
88 * server.c (require_running): Rename to ...
89 (require_running_or_return): ... this ...
90 (require_running_or_break): ... and this.
91 (handle_query, process_serial_event): Adjust.
92
0eb0a407
SM
932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
94
95 * linux-low.c (linux_set_resume_request): Remove unused
96 variables.
97
785922a5
SM
982017-09-15 Simon Marchi <simon.marchi@ericsson.com>
99
100 * server.c (first_thread_of): Remove.
101 (process_serial_event): Replace usage of first_thread_of with
102 find_any_thread_of_pid.
103 * tracepoint.c (same_process_p): Remove.
104 (gdb_agent_about_to_close): Replace usage of same_process_p with
105 find_any_thread_of_pid.
106 * linux-x86-low.c (same_process_callback): Remove.
107 (x86_arch_setup_process_callback): Replace usage of
108 same_process_callback with find_any_thread_of_pid.
109 * thread-db.c (any_thread_of): Remove.
110 (switch_to_process): Replace usage of any_thread_of with
111 find_any_thread_of_pid.
112 * inferiors.c (thread_pid_matches_callback): Remove.
113 (find_thread_process): Adjust to use find_any_thread_of_pid.
114
a059f00c
SDJ
1152017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
116
117 * regcache.c (get_thread_regcache): Guard calls to "memset"
118 with "!VEC_empty".
119
cc397f3a
SDJ
1202017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
121
122 * linux-low.c (handle_extended_wait): Use
123 "allocate_target_description" instead of "XNEW".
124 * linux-x86-low.c (initialize_low_arch): Likewise.
125
22916b07
YQ
1262017-09-05 Yao Qi <yao.qi@linaro.org>
127
128 * configure.srv (srv_i386_regobj): Remove.
129 (srv_amd64_regobj): Remove.
130 (srv_regobj): Set it to "" for x86 non-linux targets.
131 * linux-x86-tdesc.c (i386_linux_read_description):
132 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
133 (init_registers_i386): Remove the declaration.
134 (tdesc_i386): Remove the declaration.
135 (lynx_i386_arch_setup): Call i386_create_target_description.
136 * nto-x86-low.c: Likewise.
137 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
138 [!__x86_64__]: include arch/i386.h.
139 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
140
38602d55
YQ
1412017-09-05 Yao Qi <yao.qi@linaro.org>
142
143 * configure.srv (srv_amd64_linux_xmlfiles): Remove
144 i386/amd64-XXX-linux from it.
145
44b886ff
YQ
1462017-09-05 Yao Qi <yao.qi@linaro.org>
147
148 * configure.srv: Empty srv_amd64_linux_regobj if $development is
149 false.
150 (ipa_amd64_linux_regobj): Remove.
151 (ipa_x32_linux_regobj): Remove.
152
b4570e4b
YQ
1532017-09-05 Yao Qi <yao.qi@linaro.org>
154
155 * Makefile.in (arch-amd64.o): New rule.
156 * configure.srv: Append arch-amd64.o.
157 * linux-amd64-ipa.c: Include common/x86-xstate.h.
158 (get_ipa_tdesc): Call amd64_linux_read_description.
159 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
160 and init_registers_amd64_XXX.
161 * linux-x86-low.c (x86_linux_read_description): Call
162 amd64_linux_read_description.
163 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
164 (initialize_low_arch): Don't call init_registers_x32_XXX and
165 init_registers_amd64_XXX.
166 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
167 and tdesc_amd64_XXX.
168 [__x86_64__] (amd64_tdesc_test): New function.
169 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
170 and init_registers_amd64_XXX.
171 * linux-x86-tdesc.c: Include arch/amd64.h.
172 (xcr0_to_tdesc_idx): New function.
173 (i386_linux_read_description): New function.
174 (amd64_get_ipa_tdesc_idx): New function.
175 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
176 (amd64_get_ipa_tdesc): Declare.
177
d1f28ea2
YQ
1782017-09-05 Yao Qi <yao.qi@linaro.org>
179
180 * configure.srv (srv_i386_linux_xmlfiles): Remove
181 i386/i386-XXX-linux.xml from it.
182
25a93583
YQ
1832017-09-05 Yao Qi <yao.qi@linaro.org>
184
185 * configure.srv: Set srv_i386_linux_regobj empty if $development
186 is false.
187 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
188 initialize_low_tdesc.
189 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
190 with #if initialize_low_tdesc.
191 * linux-x86-tdesc-selftest.c: New file.
192 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
193
5f035c07
YQ
1942017-09-05 Yao Qi <yao.qi@linaro.org>
195
196 * Makefile.in (arch-i386.o): New rule.
197 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
198 (x86_64-*-linux*): Likewise.
199 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
200 include arch/i386.h.
201 (i386_linux_read_description): Remove code and call
202 i386_create_target_description.
203 * tdesc.c (allocate_target_description): New function.
204 * tdesc.h (set_tdesc_architecture): Remove declaration.
205 (set_tdesc_osabi): Likewise.
206
0abe8a89
YQ
2072017-09-05 Yao Qi <yao.qi@linaro.org>
208
209 * linux-x86-tdesc.c: Don't include <inttypes.h>.
210 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
211 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
212 .xmltarget.
213 * server.c (get_features_xml): Call tdesc_get_features_xml.
214 * tdesc.c (set_tdesc_architecture): New function.
215 (set_tdesc_osabi): New function.
216 (tdesc_get_features_xml): New function.
217 (tdesc_create_feature): Add an argument.
218 * tdesc.h (struct target_desc) <features>: New field.
219 <arch, osabi>: New field.
220 (~target_desc): xfree features, arch, and osabi.
221 (target_desc::oerator==): Don't compare .xmltarget.
222 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
223 (set_tdesc_osabi): Likewise.
224 (tdesc_get_features_xml): Likewise.
225
0a188386
YQ
2262017-09-05 Yao Qi <yao.qi@linaro.org>
227
228 * linux-x86-tdesc.c: Include selftest.h.
229 (i386_tdesc_test): New function.
230 (initialize_low_tdesc): Call selftests::register_test.
231 * tdesc.h: Include regdef.h.
232 (target_desc): Override operator == and !=.
233
f49ff000
YQ
2342017-09-05 Yao Qi <yao.qi@linaro.org>
235
236 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
237 (ipa_obj): Likewise.
238 * linux-i386-ipa.c: Include common/x86-xstate.h
239 (get_ipa_tdesc): Call i386_linux_read_description.
240 (initialize_low_tracepoint): Don't call init_registers_XXX
241 functions, call initialize_low_tdesc instead.
242 * linux-x86-low.c (x86_linux_read_description): Call
243 i386_linux_read_description.
244 (initialize_low_arch): Don't call init_registers_i386_XXX
245 functions, call initialize_low_tdesc.
246 * linux-x86-tdesc.c: New file.
247 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
248 (i386_get_ipa_tdesc_idx): Declare.
249 (i386_get_ipa_tdesc): Declare.
250 (initialize_low_tdesc): Declare.
251
2b68ef2f
YQ
2522017-09-05 Yao Qi <yao.qi@linaro.org>
253
254 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
255 instead of 0.
256
f7000548
YQ
2572017-09-05 Yao Qi <yao.qi@linaro.org>
258
259 * Makefile.in (IPA_OBJS): Add vec-ipa.o
260 * regcache.c (get_thread_regcache): Use VEC_length.
261 (init_register_cache): Likewise.
262 (regcache_cpy): Likewise.
263 (registers_to_string): Iterate reg_defs via VEC_iterate.
264 (find_regno): Likewise.
265 (find_register_by_number): Use VEC_index.
266 (register_size): Call find_register_by_number.
267 (register_data): Call find_register_by_number.
268 (supply_regblock): Use VEC_length.
269 (regcache_raw_read_unsigned): Likewise.
270 * tdesc.c (init_target_desc): Iterate reg_defs via
271 VEC_iterate.
272 (default_description): Update initializer.
273 (copy_target_description): Don't update field num_registers.
274 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
275 <num_registers>: Remove.
276
50a421ac
SM
2772017-09-04 Simon Marchi <simon.marchi@ericsson.com>
278
279 * Makefile.in (.SECONDARY): Define target.
280
23fdd69e
SM
2812017-09-03 Simon Marchi <simon.marchi@ericsson.com>
282
283 * linux-low.c (linux_wait_1): Adjust.
284 * server.c (queue_stop_reply_callback): Adjust.
285
0a2dde4a
SDJ
2862017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
287
288 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
289 QEnvironmentUnset and QEnvironmentReset packets.
290 (handle_query): Inform remote that QEnvironmentHexEncoded,
291 QEnvironmentUnset and QEnvironmentReset are supported.
292
6afd337d
SM
2932017-08-25 Simon Marchi <simon.marchi@ericsson.com>
294
295 * inferiors.h (inferior_target_data): Rename to ...
296 (thread_target_data): ... this.
297 (inferior_regcache_data): Rename to ...
298 (thread_regcache_data): ... this.
299 (set_inferior_regcache_data): Rename to ...
300 (set_thread_regcache_data): ... this.
301 * inferiors.c (inferior_target_data): Rename to ...
302 (thread_target_data): ... this.
303 (inferior_regcache_data): Rename to ...
304 (thread_regcache_data): ... this.
305 (set_inferior_regcache_data): Rename to ...
306 (set_thread_regcache_data): ... this.
307 (free_one_thread): Update.
308 * linux-low.h (get_thread_lwp): Update.
309 * regcache.c (get_thread_regcache): Update.
310 (regcache_invalidate_thread): Update.
311 (free_register_cache_thread): Update.
312 * win32-i386-low.c (update_debug_registers_callback): Update.
313 (win32_get_current_dr): Update.
314 * win32-low.c (thread_rec): Update.
315 (delete_thread_info): Update.
316 (continue_one_thread): Update.
317 (suspend_one_thread): Update.
318
a160cc46
SM
3192017-08-24 Simon Marchi <simon.marchi@ericsson.com>
320
321 * inferiors.c (set_inferior_target_data): Remove.
322 * inferiors.h (set_inferior_target_data): Remove.
323
6d580b63
YQ
3242017-08-18 Yao Qi <yao.qi@linaro.org>
325
326 * Makefile.in (OBS): Add selftest.o.
327 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
328 * configure, config.in: Re-generated.
329 * server.c: Include common/sefltest.h.
330 (captured_main): Handle option --selftest.
331
f5a29eb0
YQ
3322017-08-09 Yao Qi <yao.qi@linaro.org>
333
334 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
335 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
336 i386-avx-mpx.o and i386-mmx.o.
337 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
338 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
339 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
340 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
341 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
342 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
343 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
344 i386/amd64-avx-mpx.xml.
345
57757c2f
YQ
3462017-08-09 Yao Qi <yao.qi@linaro.org>
347
348 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
349 and x32-avx-avx512.o.
350 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
351 i386/x32-avx-avx512.xml.
352
229d26fc
SM
3532017-07-26 Simon Marchi <simon.marchi@ericsson.com>
354
355 * tracepoint.h (enum class fast_tpoint_collect_result): New
356 enumeration.
357 (fast_tracepoint_collecting): Change return type to
358 fast_tpoint_collect_result.
359 * tracepoint.c (fast_tracepoint_collecting): Likewise.
360 * linux-low.h: Include tracepoint.h.
361 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
362 fast_tpoint_collect_result.
363 * linux-low.c (handle_tracepoints): Adjust.
364 (linux_fast_tracepoint_collecting): Change return type to
365 fast_tpoint_collect_result.
366 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
367 linux_wait_1, stuck_in_jump_pad_callback,
368 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
369 proceed_one_lwp): Adjust to type change.
370
2e1e43e1
YQ
3712017-07-10 Yao Qi <yao.qi@linaro.org>
372
373 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
374
adc764e7
YQ
3752017-06-29 Yao Qi <yao.qi@linaro.org>
376
377 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
378 Remove.
379 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
380
a206891a
SM
3812017-06-20 Simon Marchi <simon.marchi@ericsson.com>
382
383 * Makefile.in (IPA_OBJS): Sort and format one item per line.
384
9a6c7d9c
SDJ
3852017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
386
387 * linux-low.c (linux_create_inferior): Adjust code to access the
388 environment information via 'gdb_environ' class.
389 * lynx-low.c (lynx_create_inferior): Likewise.
390 * server.c (our_environ): Make it an instance of 'gdb_environ'.
391 (get_environ): Return a pointer to 'our_environ'.
392 (captured_main): Initialize 'our_environ'.
393 * server.h (get_environ): Adjust prototype.
394 * spu-low.c (spu_create_inferior): Adjust code to access the
395 environment information via 'gdb_environ' class.
396
ae3e2ccf
SM
3972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
398
399 * linux-low.c (linux_read_memory, linux_write_memory): Remove
400 usage of "register" keyword.
401
3e019bdc
SM
4022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
403
404 * configure: Re-generate.
405
8465943a
SM
4062017-06-17 Simon Marchi <simon.marchi@ericsson.com>
407
408 * configure: Re-generate.
409
cf0dd6f0
SM
4102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
411
412 * Makefile.in (COMPILE.pre): Add "-x c++".
413
9845682b
SDJ
4142017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
415
416 * fork-child.c: Conditionally include <signal.h>.
417
aefd8b33
SDJ
4182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
419
420 * server.c (handle_general_set): Handle new packet
421 "QStartupWithShell".
422 (handle_query): Add "QStartupWithShell" to the list of supported
423 packets.
424 (gdbserver_usage): Add help text explaining the
425 new "--startup-with-shell" and "--no-startup-with-shell" CLI
426 options.
427 (captured_main): Recognize and act upon the presence of the new
428 CLI options.
429
2090129c
SDJ
4302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
431 Pedro Alves <palves@redhat.com>
432
433 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
434 * configure: Regenerate.
435 * configure.srv (srv_linux_obj): Add "fork-child.o" and
436 "fork-inferior.o".
437 (i[34567]86-*-lynxos*): Likewise.
438 (spu*-*-*): Likewise.
439 * fork-child.c: New file.
440 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
441 and "environ.h".
442 (linux_ptrace_fun): New function.
443 (linux_create_inferior): Adjust function prototype to reflect
444 change on "target.h". Adjust function code to use
445 "fork_inferior".
446 (linux_request_interrupt): Delete "signal_pid".
447 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
448 (lynx_ptrace_fun): New function.
449 (lynx_create_inferior): Adjust function prototype to reflect
450 change on "target.h". Adjust function code to use
451 "fork_inferior".
452 * nto-low.c (nto_create_inferior): Adjust function prototype and
453 code to reflect change on "target.h". Update comments.
454 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
455 "common-terminal.h" and "environ.h".
456 (terminal_fd): Moved to fork-child.c.
457 (old_foreground_pgrp): Likewise.
458 (restore_old_foreground_pgrp): Likewise.
459 (last_status): Make it global.
460 (last_ptid): Likewise.
461 (our_environ): New variable.
462 (startup_with_shell): Likewise.
463 (program_name): Likewise.
464 (program_argv): Rename to...
465 (program_args): ...this.
466 (wrapper_argv): New variable.
467 (start_inferior): Delete function.
468 (get_exec_wrapper): New function.
469 (get_exec_file): Likewise.
470 (get_environ): Likewise.
471 (prefork_hook): Likewise.
472 (post_fork_inferior): Likewise.
473 (postfork_hook): Likewise.
474 (postfork_child_hook): Likewise.
475 (handle_v_run): Update code to deal with arguments coming from the
476 remote host. Update calls from "start_inferior" to
477 "create_inferior".
478 (captured_main): Likewise. Initialize environment variable. Call
479 "have_job_control".
480 * server.h (post_fork_inferior): New prototype.
481 (get_environ): Likewise.
482 (last_status): Declare.
483 (last_ptid): Likewise.
484 (signal_pid): Likewise.
485 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
486 (spu_ptrace_fun): New function.
487 (spu_create_inferior): Adjust function prototype to reflect change
488 on "target.h". Adjust function code to use "fork_inferior".
489 * target.c (target_terminal_init): New function.
490 (target_terminal_inferior): Likewise.
491 (target_terminal_ours): Likewise.
492 * target.h: Include <vector>.
493 (struct target_ops) <create_inferior>: Update prototype.
494 (create_inferior): Update macro.
495 * utils.c (gdb_flush_out_err): New function.
496 * win32-low.c (win32_create_inferior): Adjust function prototype
497 and code to reflect change on "target.h".
498
043a4934
SDJ
4992017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
500
501 * inferiors.c (switch_to_thread): New function.
502
15652511
SDJ
5032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
504
505 * Makefile.in (SFILE): Add "common/job-control.c".
506 (OBS): Add "job-control.o".
507
21ea5acd
SDJ
5082017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
509
510 * Makefile: Remove "@host_makefile_frag@".
511
e13cb306
PA
5122017-05-05 Pedro Alves <palves@redhat.com>
513
514 * configure: Regenerate.
515
c94fee56
SDJ
5162017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
517
518 * configure: Regenerate.
519
a0ff9e1a
SM
5202017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
523 software_single_step change of return type to
524 std::vector<CORE_ADDR>.
525 * linux-low.c (install_software_single_step_breakpoints):
526 Likewise.
527 * linux-low.h (install_software_single_step_breakpoints):
528 Likewise.
529
be628ab8
SDJ
5302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
531
532 * remote-utils.c: Include "gdb_termios.h" instead of
533 "terminal.h".
534 * terminal.h: Delete file.
535
7c5ded6a
SDJ
5362017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
537
538 * server.c: Include <vector>.
539 <program_argv, wrapper_argv>: Convert to std::vector.
540 (start_inferior): Rewrite function to use C++.
541 (handle_v_run): Likewise. Update code that calculates the argv
542 based on the vRun packet; use C++.
543 (captured_main): Likewise.
544
436252de
SM
5452017-04-06 Simon Marchi <simon.marchi@ericsson.com>
546
547 * server.c (handle_v_cont): Initialize thread_resume::thread
548 with null_ptid.
549
9bf2a700
PA
5502017-04-05 Pedro Alves <palves@redhat.com>
551
552 * configure: Regenerate.
553
a121b7c1
PA
5542017-04-05 Pedro Alves <palves@redhat.com>
555
556 * gdbreplay.c (sync_error): Constify.
557 * linux-x86-low.c (push_opcode): Constify.
558
21c8a587
PA
5592017-04-05 Pedro Alves <palves@redhat.com>
560
561 * win32-low.c (get_child_debug_event)
562 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
563 Report TARGET_WAITKIND_SPURIOUS instead.
564
fb32b4f7
PA
5652017-04-05 Pedro Alves <palves@redhat.com>
566
567 * remote-utils.c (remote_prepare, remote_open): Constify.
568 * remote-utils.h (remote_prepare, remote_open): Constify.
569 * server.c (captured_main): Constify 'port' handling.
570
65dd1e59
SM
5712017-04-04 Simon Marchi <simon.marchi@ericsson.com>
572
573 * Makefile.in (clean): Clear .deps.
574
8fa5b777
SM
5752017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
576
577 * .gitignore: Remove generated files, replace with wildcard.
578 * (clean): Replace removal of generated files with wildcard.
579 (version.c): Replace with...
580 (version-generated.c): ...this.
581 (xml-builtin.c): Replace with...
582 (xml-builtin-generated.c): ...this.
583 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
584 (%.c: *regformats*): Replace with...
585 (%-generated.c: *regformats*): ...this.
586
a12e714b
MF
5872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
588
589 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
590 (xtensa_fill_gregset): Call collect_register_by_name for
591 threadptr register.
592 (xtensa_store_gregset): Call supply_register_by_name for
593 threadptr register.
594
1a09b50a
MF
5952017-03-27 Max Filippov <jcmvbkbc@gmail.com>
596
597 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
598 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
599 (xtensa_store_gregset): Call supply_register for all registers in
600 a0_regnum..a0_regnum + C0_NREGS range.
601
1a01e7c6
SM
6022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
603
604 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
605 (ax-ipa.o: ax.c): Remove.
606 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
607 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
608 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
609 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
610 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
611
36bc18a8
SM
6122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
615 (print-utils-ipa.o: ../common/print-utils.c): Remove.
616 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
617 (errors-ipa.o: ../common/errors.c): Remove.
618 (format-ipa.o: ../common/format.c): Remove.
619 (common-utils-ipa.o: ../common/common-utils.c): Remove.
620
a8ebe3d5
SM
6212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
622
623 * Makefile.in (%-ipa.o: %.c): New rule.
624 (tracepoint-ipa.o: tracepoint.c): Remove.
625 (utils-ipa.o: utils.c): Remove.
626 (remote-utils-ipa.o: remote-utils.c): Remove.
627 (regcache-ipa.o: regcache.c): Remove.
628 (i386-linux-ipa.o: i386-linux.c): Remove.
629 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
630 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
631 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
632 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
633 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
634 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
635 (amd64-linux-ipa.o: amd64-linux.c): Remove.
636 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
637 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
638 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
639 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
640 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
641 (aarch64-ipa.o: aarch64.c): Remove.
642 (s390-linux32-ipa.o: s390-linux32.c): Remove.
643 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
644 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
645 (s390-linux64-ipa.o: s390-linux64.c): Remove.
646 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
647 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
648 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
649 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
650 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
651 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
652 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
653 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
654 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
655 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
656 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
657 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
658 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
659 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
660 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
661 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
662 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
663 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
664 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
665 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
666 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
667 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
668 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
669 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
670 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
671 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
672 (tdesc-ipa.o: tdesc.c): Remove.
673 (x32-linux-ipa.o: x32-linux.c): Remove.
674 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
675 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
676
50cfacb7
SM
6772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
678
679 * Makefile.in (%.o: ../arch/%.c): New rule.
680 (arm.o: ../arch/arm.c): Remove.
681 (arm-linux.o: ../arch/arm-linux.c): Remove.
682 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
683 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
684
c5a22423
SM
6852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * Makefile.in (%.o: ../nat/%.c): New rule.
688 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
689 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
690 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
691 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
692 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
693 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
694 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
695 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
696 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
697 (linux-personality.o: ../nat/linux-personality.c): Remove.
698 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
699 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
700 (x86-linux.o: ../nat/x86-linux.c): Remove.
701 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
702 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
703
6bda016b
SM
7042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
705
706 * Makefile.in (%.o: ../common/%.c): New rule.
707 (signals.o: ../common/signals.c): Remove.
708 (print-utils.o: ../common/print-utils.c): Remove.
709 (rsp-low.o: ../common/rsp-low.c): Remove.
710 (common-utils.o: ../common/common-utils.c): Remove.
711 (posix-strerror.o: ../common/posix-strerror.c): Remove.
712 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
713 (vec.o: ../common/vec.c): Remove.
714 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
715 (xml-utils.o: ../common/xml-utils.c): Remove.
716 (ptid.o: ../common/ptid.c): Remove.
717 (buffer.o: ../common/buffer.c): Remove.
718 (format.o: ../common/format.c): Remove.
719 (filestuff.o: ../common/filestuff.c): Remove.
720 (agent.o: ../common/agent.c): Remove.
721 (errors.o: ../common/errors.c): Remove.
722 (environ.o: ../common/environ.c): Remove.
723 (common-debug.o: ../common/common-debug.c): Remove.
724 (cleanups.o: ../common/cleanups.c): Remove.
725 (common-exceptions.o: ../common/common-exceptions.c): Remove.
726 (fileio.o: ../common/fileio.c): Remove.
727 (common-regcache.o: ../common/common-regcache.c): Remove.
728 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
729 (new-op.o: ../common/new-op.c): Remove.
730 (btrace-common.o: ../common/btrace-common.c): Remove.
731
21122961
SM
7322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
733
734 * Makefile.in (%.o: ../target/%.c): New rule.
735 (waitstatus.o: ../target/waitstatus.c): Remove.
736
c362e621
SM
7372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * Makefile.in
740 (%.c: ../regformats/%.dat,
741 (%.c: ../regformats/arm/%.dat,
742 (%.c: ../regformats/i386/%.dat,
743 (%.c: ../regformats/rs6000/%.dat): New rules.
744 (aarch64.c): Remove.
745 (reg-arm.c): Remove.
746 (arm-with-iwmmxt.c): Remove.
747 (arm-with-vfpv2.c): Remove.
748 (arm-with-vfpv3.c): Remove.
749 (arm-with-neon.c): Remove.
750 (reg-bfin.c): Remove.
751 (reg-cris.c): Remove.
752 (reg-crisv32.c): Remove.
753 (i386.c): Remove.
754 (i386-linux.c): Remove.
755 (i386-avx.c): Remove.
756 (i386-avx-linux.c): Remove.
757 (i386-avx-avx512.c): Remove.
758 (i386-avx-avx512-linux.c): Remove.
759 (i386-mpx.c): Remove.
760 (i386-mpx-linux.c): Remove.
761 (i386-avx-mpx-avx512-pku.c): Remove.
762 (i386-avx-mpx-avx512-pku-linux.c): Remove.
763 (i386-avx-mpx.c): Remove.
764 (i386-avx-mpx-linux.c): Remove.
765 (i386-mmx.c): Remove.
766 (i386-mmx-linux.c): Remove.
767 (reg-ia64.c): Remove.
768 (reg-m32r.c): Remove.
769 (reg-m68k.c): Remove.
770 (reg-cf.c): Remove.
771 (mips-linux.c): Remove.
772 (mips-dsp-linux.c): Remove.
773 (mips64-linux.c): Remove.
774 (mips64-dsp-linux.c): Remove.
775 (nios2-linux.c): Remove.
776 (powerpc-32.c): Remove.
777 (powerpc-32l.c): Remove.
778 (powerpc-altivec32l.c): Remove.
779 (powerpc-cell32l.c): Remove.
780 (powerpc-vsx32l.c): Remove.
781 (powerpc-isa205-32l.c): Remove.
782 (powerpc-isa205-altivec32l.c): Remove.
783 (powerpc-isa205-vsx32l.c): Remove.
784 (powerpc-e500l.c): Remove.
785 (powerpc-64l.c): Remove.
786 (powerpc-altivec64l.c): Remove.
787 (powerpc-cell64l.c): Remove.
788 (powerpc-vsx64l.c): Remove.
789 (powerpc-isa205-64l.c): Remove.
790 (powerpc-isa205-altivec64l.c): Remove.
791 (powerpc-isa205-vsx64l.c): Remove.
792 (s390-linux32.c): Remove.
793 (s390-linux32v1.c): Remove.
794 (s390-linux32v2.c): Remove.
795 (s390-linux64.c): Remove.
796 (s390-linux64v1.c): Remove.
797 (s390-linux64v2.c): Remove.
798 (s390-te-linux64.c): Remove.
799 (s390-vx-linux64.c): Remove.
800 (s390-tevx-linux64.c): Remove.
801 (s390x-linux64.c): Remove.
802 (s390x-linux64v1.c): Remove.
803 (s390x-linux64v2.c): Remove.
804 (s390x-te-linux64.c): Remove.
805 (s390x-vx-linux64.c): Remove.
806 (s390x-tevx-linux64.c): Remove.
807 (tic6x-c64xp-linux.c): Remove.
808 (tic6x-c64x-linux.c): Remove.
809 (tic6x-c62x-linux.c): Remove.
810 (reg-sh.c): Remove.
811 (reg-sparc64.c): Remove.
812 (reg-spu.c): Remove.
813 (amd64.c): Remove.
814 (amd64-linux.c): Remove.
815 (amd64-avx.c): Remove.
816 (amd64-avx-linux.c): Remove.
817 (amd64-avx-avx512.c): Remove.
818 (amd64-avx-avx512-linux.c): Remove.
819 (amd64-mpx.c): Remove.
820 (amd64-mpx-linux.c): Remove.
821 (amd64-avx-mpx-avx512-pku.c): Remove.
822 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
823 (amd64-avx-mpx.c): Remove.
824 (amd64-avx-mpx-linux.c): Remove.
825 (x32.c): Remove.
826 (x32-linux.c): Remove.
827 (x32-avx.c): Remove.
828 (x32-avx-linux.c): Remove.
829 (x32-avx-avx512.c): Remove.
830 (x32-avx-avx512-linux.c): Remove.
831 (reg-xtensa.c): Remove.
832 (reg-tilegx.c): Remove.
833 (reg-tilegx32.c): Remove.
834
1672e0d9
SDJ
8352017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
836
837 * Makefile.in (SFILES): Add "common/environ.c".
838 (OBJS): Add "common/environ.h".
839
239b6d10
WT
8402017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
841
842 * configure.ac: Check if the fs_base and gs_base members of
843 `struct user_regs_struct' exist.
844 * config.in: Regenerated.
845 * configure: Likewise.
846
694b382c
AT
8472017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
848
849 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
850 target_read_memory.
851 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
852 (get_next_pcs_syscall_next_pc): Likewise.
853
7dc53023
LM
8542016-12-23 Luis Machado <lgustavo@codesourcery.com>
855
856 * win32-i386-low.c: Fix incorrect reference to a couple source files.
857 * nto-x86-low.c: Likewise.
858
ad02e4fe
SM
8592016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
860
861 * Makefile.in: Include disable-implicit-rules.mk.
862
dcb07cfa
PA
8632016-11-23 Pedro Alves <palves@redhat.com>
864
865 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
866 (debug_vprintf): Use std::chrono::steady_clock instead of
867 gettimeofday. Use '.' instead of ':'.
868 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
869 (get_timestamp): Use std::chrono::steady_clock instead of
870 gettimeofday.
871
8629c02c
SM
8722016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
873
874 * Makefile.in: Fix whitespace formatting.
875
b593ecca
SM
8762016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
877
878 * Makefile.in (SFILES, OBS): Flatten list and order
879 alphabetically.
880
9986ba08
PA
8812016-11-23 Pedro Alves <palves@redhat.com>
882
883 * event-loop.c (handle_file_event): Use warning.
884 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
885 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
886 Use warning.
887
4eefa7bc
PA
8882016-11-23 Pedro Alves <palves@redhat.com>
889
890 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
891 output.
892 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
893 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
894 debug_printf and debug_flush for debug output.
895 * server.c (handle_general_set): Likewise.
896 * thread-db.c (try_thread_db_load): Use debug_printf for debug
897 output.
898
5443506e
SM
8992016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
900
901 * Makefile.in (.c.o): Replace rule with ...
902 (%.o: %.c): ... this one.
903
3b165252
SM
9042016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
907 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
908 make.
909 * configure.ac: Remove checks for the make program.
910 * configure: Re-generate.
911
0bcda685
PA
9122016-10-28 Pedro Alves <palves@redhat.com>
913
914 * Makefile.in (CXX_DIALECT): Get from configure.
915 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
916 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
917 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
918 * config.in: Regenerate.
919 * configure: Regenerate.
920
c3805894
YQ
9212016-10-27 Yao Qi <yao.qi@linaro.org>
922
923 * linux-low.c (linux_supports_range_stepping): Return true if
924 can_software_single_step return true.
925
89342618
YQ
9262016-10-27 Yao Qi <yao.qi@linaro.org>
927
928 * inferiors.c (find_inferior_in_random): New function.
929 * inferiors.h (find_inferior_in_random): Declare.
930 * linux-low.c (linux_wait_for_event_filtered): Call
931 find_inferior_in_random instead of find_inferior.
932
e3652c84
YQ
9332016-10-27 Yao Qi <yao.qi@linaro.org>
934
935 * linux-low.c (linux_wait_1): If single-step breakpoints are
936 inserted, remove them.
937
5a04c4cf
PA
9382016-10-26 Pedro Alves <palves@redhat.com>
939
940 * linux-low.c (handle_extended_wait): Link parent/child fork
941 threads.
942 (linux_wait_1): Unlink them.
943 (linux_set_resume_request): Ignore resume requests for
944 already-resumed and unhandled fork child threads.
945 * linux-low.h (struct lwp_info) <fork_relative>: New field.
946 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
947 New functions.
948 (handle_v_requests) <vCont>: Don't call require_running.
949 * server.h (in_queued_stop_replies): New declaration.
950
cb93dc7f
YQ
9512016-10-24 Yao Qi <yao.qi@linaro.org>
952
953 PR server/20733
954 * linux-aarch64-low.c (append_insns): Cast the return value to
955 'uint32_t *'.
956
a1078bea
YQ
9572016-10-10 Yao Qi <yao.qi@linaro.org>
958
959 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
960
1fb77080
SDJ
9612016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
962
963 * target.c (target_supports_multi_process): New function, moved
964 from...
965 * target.h (target_supports_multi_process): ... here. Remove
966 macro.
967
39b5a3b9
TT
9682016-10-05 Tom Tromey <tom@tromey.com>
969
970 PR remote/20655:
971 * tracepoint.c (handle_tracepoint_bkpts): Check
972 ipa_error_tracepoint, not ipa_stopping_tracepoint.
973
c1d0b70a
YQ
9742016-10-05 Yao Qi <yao.qi@linaro.org>
975
976 * configure.srv: Update the path of arm-*.xml files.
977
0a69eedb
YQ
9782016-10-05 Terry Guo <terry.guo@arm.com>
979 Yao Qi <yao.qi@linaro.org>
980
981 * Makefile.in: Adjust the path of rules.
982 * configure.srv: Update the path of xml files.
983 * regformats/arm-with-iwmmxt.dat: Regenerated.
984 * regformats/arm-with-neon.dat: Likewise.
985 * regformats/arm-with-vfpv2.dat: Likewise.
986 * regformats/arm-with-vfpv3.dat Likewise.
987
17e16485
YQ
9882016-09-30 Yao Qi <yao.qi@linaro.org>
989
990 PR gdbserver/20627
991 * target.c (target_stop_and_wait): Don't call
992 target_continue_no_signal, use resume_stop instead.
993
edeeb602
YQ
9942016-09-26 Yao Qi <yao.qi@linaro.org>
995
996 * linux-low.c (linux_wait_1): Call debug_exit.
997
503b1c39
PA
9982016-09-23 Pedro Alves <palves@redhat.com>
999
1000 * Makefile.in (SFILES): Add common/new-op.c.
1001 (OBS): Add common/new-op.o.
1002 (new-op.o): New rule.
1003
74172ecf
SM
10042016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1005
1006 * .gitinore: Ignore more files.
1007
fc6cda2e
YQ
10082016-09-21 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1011 23.
1012
bc1e6c81
SDJ
10132016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1014
1015 * server.c (start_inferior): Call target_mourn_inferior instead of
1016 mourn_inferior; pass ptid_t argument to it.
1017 (resume): Likewise.
1018 (handle_target_event): Likewise.
1019 * target.c (target_mourn_inferior): New function.
1020 * target.h (mourn_inferior): Delete macro.
1021
0e00e962
AA
10222016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1023
1024 * linux-low.c (lwp_is_stepping): New function.
1025
1d8cb77d
CL
10262016-09-06 Carl Love <cel@us.ibm.com>
1027
1028 * server.c (start_inferior): Fixed comment, requested comment change
1029 didn't get updated correctly. Removed reference to ptrace () call as
1030 it is only true on Linux systems.
1031
7313bced
CL
10322016-09-06 Carl Love <cel@us.ibm.com>
1033
1034 * server.c (start_inferior): Do not call
1035 function target_post_create_inferior () if the
1036 inferior process has already exited.
1037
cf6de44d
PA
10382016-09-05 Pedro Alves <palves@redhat.com>
1039
1040 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1041 (COMPILE.pre, CC_LD): Use CXX directly.
1042 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1043 * acinclude.m4: Don't include build-with-cxx.m4.
1044 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1045 * configure: Regenerate.
1046
c1da6748
AT
10472016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1048
1049 PR gdb/19495
1050 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1051 call writing data to own_buf.
1052
f2b9e3df
SDJ
10532016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1054
1055 * target.c (mywait): Call target_wait instead of
1056 the_target->wait.
1057 (target_wait): New function.
1058
049a8570
SDJ
10592016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1060
1061 * server.c (start_inferior): New variable 'ptid'. Replace calls
1062 to the_target->resume by target_continue{,_no_signal}, depending
1063 on the case.
1064 * target.c (target_stop_and_wait): Call target_continue_no_signal
1065 instead of the_target->resume.
1066 (target_continue): New function.
1067
3aa5cfa0
AT
10682016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1069
1070 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1071
754653a7
AZ
10722016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1073
1074 PR server/20491
1075 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1076 ps_prochandle.
1077 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1078 * linux-arm-low.c (ps_get_thread_area): Likewise.
1079 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1080 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1081 * linux-mips-low.c (ps_get_thread_area): Likewise.
1082 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1083 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1084 * linux-x86-low.c (ps_get_thread_area): Likewise.
1085 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1086
ed036b40
PA
10872016-08-19 Pedro Alves <palves@redhat.com>
1088
1089 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1090
c8ef42ee
PA
10912016-08-19 Pedro Alves <palves@redhat.com>
1092
1093 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1094 comment. Use memcpy instead of casting through unsigned long.
1095
9c235a72
PA
10962016-08-19 Pedro Alves <palves@redhat.com>
1097
1098 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1099 allocating around 0x80000000.
1100
201506da
PA
11012016-08-19 Pedro Alves <palves@redhat.com>
1102
1103 PR gdb/20415
1104 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1105 (x32-avx512-linux-ipa.o): New rules.
1106 * configure.ac (x86_64-*-linux*): New x32 check.
1107 * configure.srv (ipa_x32_linux_regobj): New.
1108 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1109 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1110 descriptions.
1111 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1112 descriptions.
1113 * configure: Regenerate.
1114
f348d89a
PA
11152016-08-09 Pedro Alves <palves@redhat.com>
1116
1117 PR gdb/18653
1118 * Makefile.in (OBS): Add signals-state-save-restore.o.
1119 (signals-state-save-restore.o): New rule.
1120 * config.in: Regenerate.
1121 * configure: Regenerate.
1122 * linux-low.c: Include "signals-state-save-restore.h".
1123 (linux_create_inferior): Call
1124 restore_original_signals_state.
1125 * server.c: Include "dispositions-save-restore.h".
1126 (captured_main): Call save_original_signals_state.
1127
1baf5149
PA
11282016-08-05 Pedro Alves <palves@redhat.com>
1129
1130 * configure: Regenerate.
1131
fcd4a73d
YQ
11322016-08-04 Yao Qi <yao.qi@linaro.org>
1133
1134 * linux-low.c (regsets_fetch_inferior_registers): Check
1135 errno is ESRCH or not.
1136
979659d0
YQ
11372016-08-02 Yao Qi <yao.qi@linaro.org>
1138
1139 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1140 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1141 (thread_db_load_search): Update.
1142 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1143 td_ta_set_event and td_ta_event_getmsg.
1144
6598661d
PA
11452016-07-26 Pedro Alves <palves@redhat.com>
1146
1147 PR server/20414
1148 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1149 of unsigned long for 64-bit registers and use uint32_t instead of
1150 unsigned int for 32-bit registers.
1151
9cf12d57
PA
11522016-07-26 Pedro Alves <palves@redhat.com>
1153
1154 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1155 to 'ptrace'.
1156
305450ed
TT
11572016-07-21 Tom Tromey <tom@tromey.com>
1158
1159 * configure: Rebuild.
1160
2583da7c
YQ
11612016-07-21 Yao Qi <yao.qi@linaro.org>
1162
1163 * mem-break.c (find_gdb_breakpoint): Cast bp to
1164 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1165
21536b36
YQ
11662016-07-21 Yao Qi <yao.qi@linaro.org>
1167
1168 * server.c (handle_v_requests): Support s and S actions
1169 if target_supports_software_single_step return true.
1170
8901d193
YQ
11712016-07-21 Yao Qi <yao.qi@linaro.org>
1172
1173 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1174 is resume_step, call maybe_hw_step.
1175 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1176 and unstop them.
1177 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1178 breakpoints or not.
1179 (proceed_one_lwp): If resume request is resume_step, install
1180 reinsert breakpoints and call maybe_hw_step.
1181
0e9a339e
YQ
11822016-07-21 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (proceed_one_lwp): Declare.
1185 (linux_resume_one_thread): Remove local variable 'step'.
1186 Lift code enqueue signal. Call proceed_one_lwp instead of
1187 linux_resume_one_lwp.
1188
4281b351
YQ
11892016-07-21 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-low.c (linux_resume_one_thread): Call
1192 enqueue_pending_signal.
1193
984a2c04
YQ
11942016-07-21 Yao Qi <yao.qi@linaro.org>
1195
1196 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1197 * inferiors.c (do_restore_current_thread_cleanup): New function.
1198 (make_cleanup_restore_current_thread): Likewise.
1199 * linux-low.c (install_software_single_step_breakpoints): Call
1200 make_cleanup_restore_current_thread. Switch current_thread to
1201 thread.
1202
bec903c9
YQ
12032016-07-21 Yao Qi <yao.qi@linaro.org>
1204
1205 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1206 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1207 (clone_one_breakpoint): Likewise.
1208 (delete_reinsert_breakpoints): Change parameter to thread.
1209 Callers updated.
1210 (has_reinsert_breakpoints): Likewise.
1211 (uninsert_reinsert_breakpoints): Likewise.
1212 (reinsert_reinsert_breakpoints): Likewise.
1213 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1214 (delete_reinsert_breakpoints): Likewise.
1215 (reinsert_reinsert_breakpoints): Likewise.
1216 (uninsert_reinsert_breakpoints): Likewise.
1217 (has_reinsert_breakpoints): Likewise.
1218
63c40ec7
YQ
12192016-07-21 Yao Qi <yao.qi@linaro.org>
1220
1221 * inferiors.c (get_thread_process): Make parameter const.
1222 * inferiors.h (get_thread_process): Update declaration.
1223 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1224 Add new parameters child_thread and parent_thread. Callers
1225 updated.
1226 * mem-break.h (clone_all_breakpoints): Update declaration.
1227
9aa76cd0
YQ
12282016-07-21 Yao Qi <yao.qi@linaro.org>
1229
1230 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1231 <command_list, handler>: Remove.
1232 (struct gdb_breakpoint): New.
1233 (struct other_breakpoint): New.
1234 (struct reinsert_breakpoint): New.
1235 (is_gdb_breakpoint): New function.
1236 (any_persistent_commands): Update command_list if
1237 is_gdb_breakpoint returns true.
1238 (set_breakpoint): Create breakpoints according to their types.
1239 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1240 (set_gdb_breakpoint_1): Likewise.
1241 (set_gdb_breakpoint): Likewise.
1242 (clear_breakpoint_conditions): Change parameter type to
1243 'struct gdb_breakpoint *'.
1244 (clear_breakpoint_commands): Likewise.
1245 (clear_breakpoint_conditions_and_commands): Likewise.
1246 (add_condition_to_breakpoint): Likewise.
1247 (add_breakpoint_condition): Likewise.
1248 (add_commands_to_breakpoint): Likewise.
1249 (check_breakpoints): Check other_breakpoint.
1250 (clone_one_breakpoint): Clone breakpopint according to its type.
1251 * mem-break.h (struct gdb_breakpoint): Declare.
1252 (set_gdb_breakpoint): Update declaration.
1253 (clear_breakpoint_conditions_and_commands): Likewise.
1254 (add_breakpoint_condition): Likewise.
1255 (add_breakpoint_commands): Likewise.
1256 * server.c (process_point_options): Change parameter type to
1257 'struct gdb_breakpoint *'.
1258
811f8301
YQ
12592016-07-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * mem-break.c (set_breakpoint_at): Rename it to ...
1262 (set_breakpoint_type_at): ... it.
1263 (set_breakpoint_at): Call set_breakpoint_type_at.
1264 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1265 * mem-break.h (set_breakpoint_at): Update comments.
1266
b1c51e36
CLT
12672016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1268
1269 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1270 to buf parameter.
1271 (nios2_store_gregset): Likewise.
1272
ced2dffb
PA
12732016-07-01 Pedro Alves <palves@redhat.com>
1274 Antoine Tremblay <antoine.tremblay@ericsson.com>
1275
1276 * linux-low.c: Change interface to take the target lwp_info
1277 pointer directly and return void. Handle detaching from a zombie
1278 thread.
1279 (linux_detach_lwp_callback): New function.
1280 (linux_detach): Detach from the leader thread after detaching from
1281 the clone threads.
1282
2ac09a5b
YQ
12832016-06-28 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1286 for variable new_offset.
1287 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1288 (aarch64_ftrace_insn_reloc_cb): Likewise.
1289 (aarch64_ftrace_insn_reloc_tb): Likewise.
1290 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1291 PRIx64 instead of PRIx32.
1292
79e7fd4f
YQ
12932016-06-28 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1296 (the_low_target): Install arm_get_syscall_trapinfo.
1297
061fc021
YQ
12982016-06-28 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1301 function.
1302 (the_low_target): Install aarch64_get_syscall_trapinfo.
1303
4cc32bec
YQ
13042016-06-28 Yao Qi <yao.qi@linaro.org>
1305
1306 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1307 Callers updated.
1308 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1309 Remove parameter sysno.
1310 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1311 sysret.
1312
782c1122
AA
13132016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1314
1315 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1316 (s390_emit_ne_goto): Likewise.
1317 (s390_emit_lt_goto): Likewise.
1318 (s390_emit_le_goto): Likewise.
1319 (s390_emit_gt_goto): Likewise.
1320 (s390_emit_ge_goto): Likewise.
1321 (s390x_emit_eq_goto): Likewise.
1322 (s390x_emit_ne_goto): Likewise.
1323 (s390x_emit_lt_goto): Likewise.
1324 (s390x_emit_le_goto): Likewise.
1325 (s390x_emit_gt_goto): Likewise.
1326 (s390x_emit_ge_goto): Likewise.
1327 (s390_emit_ops_impl): Mark variable static.
1328 (s390x_emit_ops): Likewise.
1329
2e7b624b
YQ
13302016-06-17 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (handle_extended_wait): Call
1333 uninsert_reinsert_breakpoints for the parent process. Remove
1334 reinsert breakpoints from the child process. Reinsert them to
1335 the parent process when vfork is done.
1336 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1337 (reinsert_reinsert_breakpoints): New function.
1338 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1339 (reinsert_reinsert_breakpoints): Declare.
1340
8a81c5d7
YQ
13412016-06-17 Yao Qi <yao.qi@linaro.org>
1342
1343 * linux-low.c (handle_extended_wait): If the parent is doing
1344 step-over, remove the reinsert breakpoints from the forked child.
1345
f50bf8e5
YQ
13462016-06-17 Yao Qi <yao.qi@linaro.org>
1347
1348 * linux-low.c (unsuspend_all_lwps): Declare.
1349 (linux_low_filter_event): If thread exited, call finish_step_over.
1350 If step-over is finished, unsuspend other threads.
1351
8376a3cb
YQ
13522016-06-17 Yao Qi <yao.qi@linaro.org>
1353
1354 * linux-low.c (linux_resume_one_lwp_throw): Assert
1355 has_reinsert_breakpoints returns false.
1356 * mem-break.c (delete_disabled_breakpoints): Assert
1357 bp type isn't reinsert_breakpoint.
1358
f79b145d
YQ
13592016-06-17 Yao Qi <yao.qi@linaro.org>
1360
1361 * linux-low.c (maybe_hw_step): New function.
1362 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1363 (finish_step_over): Switch current_thread to lwp temporarily,
1364 and assert has_reinsert_breakpoints returns true.
1365 (proceed_one_lwp): Call maybe_hw_step.
1366 * mem-break.c (has_reinsert_breakpoints): New function.
1367 * mem-break.h (has_reinsert_breakpoints): Declare.
1368
0ae534d2
JT
13692016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1370
1371 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1372
fcdad592
YQ
13732016-05-17 Yao Qi <yao.qi@linaro.org>
1374
1375 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1376 instead of find_inferior.
1377
9e784964
YQ
13782016-05-05 Yao Qi <yao.qi@linaro.org>
1379
1380 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1381 Initialize res to zero.
1382
cf2ebb6e
YQ
13832016-05-05 Yao Qi <yao.qi@linaro.org>
1384
1385 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1386 to uint32_t.
1387
c1aebf87
UW
13882016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1389
1390 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1391 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1392 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1393
35fd2deb 13942016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1395 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1396
1397 * tracepoint.c (write_inferior_int8): New function.
1398 (cmd_qtenable_disable): Write enable flag using
1399 write_inferior_int8.
1400
484b3c32
YQ
14012016-04-25 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1404 (need_step_over_p): Return zero if the LWP has pending signals
1405 can be delivered on software single step target.
1406
85ba7d86
YQ
14072016-04-25 Yao Qi <yao.qi@linaro.org>
1408
1409 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1410 return instead of error.
1411
3539aa13
YQ
14122016-04-22 Yao Qi <yao.qi@linaro.org>
1413
1414 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1415 to 23.
1416
5b061e98
YQ
14172016-04-22 Yao Qi <yao.qi@linaro.org>
1418
1419 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1420 signal when stepping over breakpoint with software single
1421 step.
1422
3451269c
PA
14232016-04-21 Pedro Alves <palves@redhat.com>
1424
1425 * linux-s390-low.c (s390_collect_ptrace_register)
1426 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1427 add casts.
1428 (s390_check_regset): Use void * instead of gdb_byte *.
1429
a2358508
PA
14302016-04-20 Pedro Alves <palves@redhat.com>
1431
1432 * configure: Renegerate.
1433
6885166d
YQ
14342016-04-20 Yao Qi <yao.qi@linaro.org>
1435
1436 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1437 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1438 number 16.
1439 (arm_store_gregset): Likewise.
1440
2b863f51
WT
14412016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1442
1443 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1444 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1445 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1446 (amd64-avx-mpx-linux.c): New rules.
1447 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1448 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1449 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1450 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1451 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1452 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1453 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1454 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1456 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1457 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1458 * linux-x86-low.c (x86_linux_read_description): Add case for
1459 X86_XSTATE_AVX_MPX_MASK.
1460 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1461 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1462 init_registers_i386_avx_mpx_linux.
1463 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1464 (initialize_low_tracepoint): Call
1465 init_registers_i386_avx_mpx_linux.
1466 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1467 (initialize_low_tracepoint): Call
1468 init_registers_amd64_avx_mpx_linux.
1469 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1470 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1471 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1472 declarations.
1473
9b30624b
PA
14742016-04-18 Pedro Alves <palves@redhat.com>
1475
1476 * configure: Regenerate.
1477
45e3745e
AT
14782016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1479
1480 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1481 (aarch64_emit_sub): Likewise.
1482
2afc13ff
PA
14832016-04-12 Pedro Alves <palves@redhat.com>
1484
1485 * utils.c (prepare_to_throw_exception): Delete.
1486
6e774b13
SM
14872016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1488
1489 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1490
4dca19f8
MK
14912016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1492
1493 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1494
d0a9981f
MK
14952016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1496
1497 * linux-aarch64-ipa.c: Add <elf.h> include.
1498 * linux-ppc-ipa.c: Add <elf.h> include.
1499 * linux-s390-ipa.c: Add <elf.h> include.
1500
252db07e
MK
15012016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1502
1503 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1504 (get_raw_reg_ptr): Likewise.
1505 (get_trace_state_variable_value_ptr): Likewise.
1506 (set_trace_state_variable_value_ptr): Likewise.
1507 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1508 char *.
1509
14e2b6d9
MK
15102016-03-31 Wei-cheng Wang <cole945@gmail.com>
1511 Marcin Kościelnicki <koriakin@0x04.net>
1512
1513 PR/17221
1514 * linux-ppc-low.c (emit_insns): New function.
1515 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1516 (ppc_emit_prologue): New function.
1517 (ppc_emit_epilogue): New function.
1518 (ppc_emit_add): New function.
1519 (ppc_emit_sub): New function.
1520 (ppc_emit_mul): New function.
1521 (ppc_emit_lsh): New function.
1522 (ppc_emit_rsh_signed): New function.
1523 (ppc_emit_rsh_unsigned): New function.
1524 (ppc_emit_ext): New function.
1525 (ppc_emit_zero_ext): New function.
1526 (ppc_emit_log_not): New function.
1527 (ppc_emit_bit_and): New function.
1528 (ppc_emit_bit_or): New function.
1529 (ppc_emit_bit_xor): New function.
1530 (ppc_emit_bit_not): New function.
1531 (ppc_emit_equal): New function.
1532 (ppc_emit_less_signed): New function.
1533 (ppc_emit_less_unsigned): New function.
1534 (ppc_emit_ref): New function.
1535 (ppc_emit_const): New function.
1536 (ppc_emit_reg): New function.
1537 (ppc_emit_pop): New function.
1538 (ppc_emit_stack_flush): New function.
1539 (ppc_emit_swap): New function.
1540 (ppc_emit_stack_adjust): New function.
1541 (ppc_emit_call): New function.
1542 (ppc_emit_int_call_1): New function.
1543 (ppc_emit_void_call_2): New function.
1544 (ppc_emit_if_goto): New function.
1545 (ppc_emit_goto): New function.
1546 (ppc_emit_eq_goto): New function.
1547 (ppc_emit_ne_goto): New function.
1548 (ppc_emit_lt_goto): New function.
1549 (ppc_emit_le_goto): New function.
1550 (ppc_emit_gt_goto): New function.
1551 (ppc_emit_ge_goto): New function.
1552 (ppc_write_goto_address): New function.
1553 (ppc_emit_ops_impl): New static variable.
1554 (ppc64v1_emit_prologue): New function.
1555 (ppc64v2_emit_prologue): New function.
1556 (ppc64_emit_epilogue): New function.
1557 (ppc64_emit_add): New function.
1558 (ppc64_emit_sub): New function.
1559 (ppc64_emit_mul): New function.
1560 (ppc64_emit_lsh): New function.
1561 (ppc64_emit_rsh_signed): New function.
1562 (ppc64_emit_rsh_unsigned): New function.
1563 (ppc64_emit_ext): New function.
1564 (ppc64_emit_zero_ext): New function.
1565 (ppc64_emit_log_not): New function.
1566 (ppc64_emit_bit_and): New function.
1567 (ppc64_emit_bit_or): New function.
1568 (ppc64_emit_bit_xor): New function.
1569 (ppc64_emit_bit_not): New function.
1570 (ppc64_emit_equal): New function.
1571 (ppc64_emit_less_signed): New function.
1572 (ppc64_emit_less_unsigned): New function.
1573 (ppc64_emit_ref): New function.
1574 (ppc64_emit_const): New function.
1575 (ppc64v1_emit_reg): New function.
1576 (ppc64v2_emit_reg): New function.
1577 (ppc64_emit_pop): New function.
1578 (ppc64_emit_stack_flush): New function.
1579 (ppc64_emit_swap): New function.
1580 (ppc64v1_emit_call): New function.
1581 (ppc64v2_emit_call): New function.
1582 (ppc64v1_emit_int_call_1): New function.
1583 (ppc64v2_emit_int_call_1): New function.
1584 (ppc64v1_emit_void_call_2): New function.
1585 (ppc64v2_emit_void_call_2): New function.
1586 (ppc64_emit_if_goto): New function.
1587 (ppc64_emit_eq_goto): New function.
1588 (ppc64_emit_ne_goto): New function.
1589 (ppc64_emit_lt_goto): New function.
1590 (ppc64_emit_le_goto): New function.
1591 (ppc64_emit_gt_goto): New function.
1592 (ppc64_emit_ge_goto): New function.
1593 (ppc64v1_emit_ops_impl): New static variable.
1594 (ppc64v2_emit_ops_impl): New static variable.
1595 (ppc_emit_ops): New function.
1596 (linux_low_target): Wire in ppc_emit_ops.
1597
a2174ba4
MK
15982016-03-31 Wei-cheng Wang <cole945@gmail.com>
1599 Marcin Kościelnicki <koriakin@0x04.net>
1600
1601 PR/17221
1602 * Makefile.in: Add powerpc-*-ipa.o
1603 * configure.srv: Add ipa_obj for powerpc*-linux.
1604 * linux-ppc-ipa.c: New file.
1605 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1606 includes.
1607 (PPC_FIELD): New macro.
1608 (PPC_SEXT): New macro.
1609 (PPC_OP6): New macro.
1610 (PPC_BO): New macro.
1611 (PPC_LI): New macro.
1612 (PPC_BD): New macro.
1613 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1614 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1615 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1616 (ppc_get_thread_area): New function.
1617 (is_elfv2_inferior): New function.
1618 (gen_ds_form): New function.
1619 (GEN_STD): New macro.
1620 (GEN_STDU): New macro.
1621 (GEN_LD): New macro.
1622 (GEN_LDU): New macro.
1623 (gen_d_form): New function.
1624 (GEN_ADDI): New macro.
1625 (GEN_ADDIS): New macro.
1626 (GEN_LI): New macro.
1627 (GEN_LIS): New macro.
1628 (GEN_ORI): New macro.
1629 (GEN_ORIS): New macro.
1630 (GEN_LWZ): New macro.
1631 (GEN_STW): New macro.
1632 (GEN_STWU): New macro.
1633 (gen_xfx_form): New function.
1634 (GEN_MFSPR): New macro.
1635 (GEN_MTSPR): New macro.
1636 (GEN_MFCR): New macro.
1637 (GEN_MTCR): New macro.
1638 (GEN_SYNC): New macro.
1639 (GEN_LWSYNC): New macro.
1640 (gen_x_form): New function.
1641 (GEN_OR): New macro.
1642 (GEN_MR): New macro.
1643 (GEN_LWARX): New macro.
1644 (GEN_STWCX): New macro.
1645 (GEN_CMPW): New macro.
1646 (gen_md_form): New function.
1647 (GEN_RLDICL): New macro.
1648 (GEN_RLDICR): New macro.
1649 (gen_i_form): New function.
1650 (GEN_B): New macro.
1651 (GEN_BL): New macro.
1652 (gen_b_form): New function.
1653 (GEN_BNE): New macro.
1654 (GEN_LOAD): New macro.
1655 (GEN_STORE): New macro.
1656 (gen_limm): New function.
1657 (gen_atomic_xchg): New function.
1658 (gen_call): New function.
1659 (ppc_relocate_instruction): New function.
1660 (ppc_install_fast_tracepoint_jump_pad): New function.
1661 (ppc_get_min_fast_tracepoint_insn_len): New function.
1662 (ppc_get_ipa_tdesc_idx): New function.
1663 (the_low_target): Wire in the new functions.
1664 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1665 tdescs.
1666 * linux-ppc-tdesc.h: New file.
1667
a13c4696
MK
16682016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1669
1670 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1671 (alloc_jump_pad_buffer): New function.
1672 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1673 (alloc_jump_pad_buffer): New function.
1674 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1675 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1676 (alloc_jump_pad_buffer): New function.
1677 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1678 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1679 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1680 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1681
1cda1512
MK
16822016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1683
1684 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1685 * linux-amd64-ipa.c: Likewise.
1686 * linux-i386-ipa.c: Likewise.
1687 * linux-s390-ipa.c: Likewise.
1688 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1689 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1690 set_trace_state_variable_value_ptr.
1691 (struct ipa_sym_addresses): Likewise.
1692 (symbol_list): Likewise.
1693 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1694 accessing gdb_collect directly.
1695 (gdb_collect_ptr_type): New typedef.
1696 (get_raw_reg_ptr_type): New typedef.
1697 (get_trace_state_variable_value_ptr_type): New typedef.
1698 (set_trace_state_variable_value_ptr_type): New typedef.
1699 (gdb_collect_ptr): New global.
1700 (get_raw_reg_ptr): New global.
1701 (get_trace_state_variable_value_ptr): New global.
1702 (set_trace_state_variable_value_ptr): New global.
1703 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1704 accessing get_raw_reg directly.
1705 (get_get_tsv_func_addr): Likewise for
1706 get_trace_state_variable_value_ptr.
1707 (get_set_tsv_func_addr): Likewise for
1708 set_trace_state_variable_value_ptr.
1709 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1710
72fb5488
SM
17112016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1714
28170b88
MK
17152016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1716
1717 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1718 packets.
1719 (relocate_instruction): Remove own_buf.
1720 * server.c (own_buf): Make global.
1721 (handle_v_requests): Make global.
1722 * server.h (own_buf): New declaration.
1723 (handle_v_requests): New prototype.
1724
f39e8743
MK
17252016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1726
1727 PR 18377
1728 * linux-s390-low.c (add_insns): New function.
1729 (s390_emit_prologue): New function.
1730 (s390_emit_epilogue): New function.
1731 (s390_emit_add): New function.
1732 (s390_emit_sub): New function.
1733 (s390_emit_mul): New function.
1734 (s390_emit_lsh): New function.
1735 (s390_emit_rsh_signed): New function.
1736 (s390_emit_rsh_unsigned): New function.
1737 (s390_emit_ext): New function.
1738 (s390_emit_log_not): New function.
1739 (s390_emit_bit_and): New function.
1740 (s390_emit_bit_or): New function.
1741 (s390_emit_bit_xor): New function.
1742 (s390_emit_bit_not): New function.
1743 (s390_emit_equal): New function.
1744 (s390_emit_less_signed): New function.
1745 (s390_emit_less_unsigned): New function.
1746 (s390_emit_ref): New function.
1747 (s390_emit_if_goto): New function.
1748 (s390_emit_goto): New function.
1749 (s390_write_goto_address): New function.
1750 (s390_emit_litpool): New function.
1751 (s390_emit_const): New function.
1752 (s390_emit_call): New function.
1753 (s390_emit_reg): New function.
1754 (s390_emit_pop): New function.
1755 (s390_emit_stack_flush): New function.
1756 (s390_emit_zero_ext): New function.
1757 (s390_emit_swap): New function.
1758 (s390_emit_stack_adjust): New function.
1759 (s390_emit_set_r2): New function.
1760 (s390_emit_int_call_1): New function.
1761 (s390_emit_void_call_2): New function.
1762 (s390_emit_eq_goto): New function.
1763 (s390_emit_ne_goto): New function.
1764 (s390_emit_lt_goto): New function.
1765 (s390_emit_le_goto): New function.
1766 (s390_emit_gt_goto): New function.
1767 (s390_emit_ge_goto): New function.
1768 (s390x_emit_prologue): New function.
1769 (s390x_emit_epilogue): New function.
1770 (s390x_emit_add): New function.
1771 (s390x_emit_sub): New function.
1772 (s390x_emit_mul): New function.
1773 (s390x_emit_lsh): New function.
1774 (s390x_emit_rsh_signed): New function.
1775 (s390x_emit_rsh_unsigned): New function.
1776 (s390x_emit_ext): New function.
1777 (s390x_emit_log_not): New function.
1778 (s390x_emit_bit_and): New function.
1779 (s390x_emit_bit_or): New function.
1780 (s390x_emit_bit_xor): New function.
1781 (s390x_emit_bit_not): New function.
1782 (s390x_emit_equal): New function.
1783 (s390x_emit_less_signed): New function.
1784 (s390x_emit_less_unsigned): New function.
1785 (s390x_emit_ref): New function.
1786 (s390x_emit_if_goto): New function.
1787 (s390x_emit_const): New function.
1788 (s390x_emit_call): New function.
1789 (s390x_emit_reg): New function.
1790 (s390x_emit_pop): New function.
1791 (s390x_emit_stack_flush): New function.
1792 (s390x_emit_zero_ext): New function.
1793 (s390x_emit_swap): New function.
1794 (s390x_emit_stack_adjust): New function.
1795 (s390x_emit_int_call_1): New function.
1796 (s390x_emit_void_call_2): New function.
1797 (s390x_emit_eq_goto): New function.
1798 (s390x_emit_ne_goto): New function.
1799 (s390x_emit_lt_goto): New function.
1800 (s390x_emit_le_goto): New function.
1801 (s390x_emit_gt_goto): New function.
1802 (s390x_emit_ge_goto): New function.
1803 (s390_emit_ops): New function.
1804 (struct linux_target_ops): Fill in emit_ops hook.
1805
abd9baf9
MK
18062016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1807
1808 PR 18377
1809 * Makefile.in: Add s390 IPA files.
1810 * configure.srv: Build IPA for s390.
1811 * linux-s390-ipa.c: New file.
1812 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1813 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1814 (tdesc_s390_linux32): Likewise.
1815 (init_registers_s390_linux32v1): Likewise.
1816 (tdesc_s390_linux32v1): Likewise.
1817 (init_registers_s390_linux32v2): Likewise.
1818 (tdesc_s390_linux32v2): Likewise.
1819 (init_registers_s390_linux64): Likewise.
1820 (tdesc_s390_linux64): Likewise.
1821 (init_registers_s390_linux64v1): Likewise.
1822 (tdesc_s390_linux64v1): Likewise.
1823 (init_registers_s390_linux64v2): Likewise.
1824 (tdesc_s390_linux64v2): Likewise.
1825 (init_registers_s390_te_linux64): Likewise.
1826 (tdesc_s390_te_linux64): Likewise.
1827 (init_registers_s390_vx_linux64): Likewise.
1828 (tdesc_s390_vx_linux64): Likewise.
1829 (init_registers_s390_tevx_linux64): Likewise.
1830 (tdesc_s390_tevx_linux64): Likewise.
1831 (init_registers_s390x_linux64): Likewise.
1832 (tdesc_s390x_linux64): Likewise.
1833 (init_registers_s390x_linux64v1): Likewise.
1834 (tdesc_s390x_linux64v1): Likewise.
1835 (init_registers_s390x_linux64v2): Likewise.
1836 (tdesc_s390x_linux64v2): Likewise.
1837 (init_registers_s390x_te_linux64): Likewise.
1838 (tdesc_s390x_te_linux64): Likewise.
1839 (init_registers_s390x_vx_linux64): Likewise.
1840 (tdesc_s390x_vx_linux64): Likewise.
1841 (init_registers_s390x_tevx_linux64): Likewise.
1842 (tdesc_s390x_tevx_linux64): Likewise.
1843 (have_hwcap_s390_vx): New static variable.
1844 (s390_arch_setup): Fill have_hwcap_s390_vx.
1845 (s390_get_thread_area): New function.
1846 (s390_ft_entry_gpr_esa): New const.
1847 (s390_ft_entry_gpr_zarch): New const.
1848 (s390_ft_entry_misc): New const.
1849 (s390_ft_entry_fr): New const.
1850 (s390_ft_entry_vr): New const.
1851 (s390_ft_main_31): New const.
1852 (s390_ft_main_64): New const.
1853 (s390_ft_exit_fr): New const.
1854 (s390_ft_exit_vr): New const.
1855 (s390_ft_exit_misc): New const.
1856 (s390_ft_exit_gpr_esa): New const.
1857 (s390_ft_exit_gpr_zarch): New const.
1858 (append_insns): New function.
1859 (s390_relocate_instruction): New function.
1860 (s390_install_fast_tracepoint_jump_pad): New function.
1861 (s390_get_min_fast_tracepoint_insn_len): New function.
1862 (s390_get_ipa_tdesc_idx): New function.
1863 (struct linux_target_ops): Wire in the above functions.
1864 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1865 * linux-s390-tdesc.h: New file.
1866
a4105d04
MK
18672016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1868
1869 * linux-s390-low.c (s390_supports_tracepoints): New function.
1870 (struct linux_target_ops): Fill supports_tracepoints hook.
1871
35ac8b3e
YQ
18722016-03-18 Yao Qi <yao.qi@linaro.org>
1873
1874 * linux-low.c (lwp_signal_can_be_delivered): New function.
1875 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1876
94610ec4
YQ
18772016-03-18 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1880 0 if signal is enqueued. Remove 'signal' from one debugging
1881 message. Move one debugging message to some lines below.
1882 Remove code setting 'signal' to 0.
1883
80aea927
YQ
18842016-03-18 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-low.c (linux_low_filter_event): Remove redundant
1887 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1888
b04fd3be
MK
18892016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1890
1891 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1892 (struct linux_target_ops): Wire in the above.
1893
c40c8d4b
YQ
18942016-03-03 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c: Update comments to start_step_over.
1897
0f8288ae
YQ
18982016-03-03 Yao Qi <yao.qi@linaro.org>
1899
1900 PR server/19736
1901 * linux-low.c (handle_extended_wait): Set child suspended
1902 if event_lwp->bp_reinsert isn't zero.
1903
fdbd04a8
YQ
19042016-03-02 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1907 enqueue_pending_signal.
1908
6896a8fa
MK
19092016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1910
1911 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1912 is actually loaded.
1913
ab503087
MK
19142016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1915
1916 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1917 (s390_regmap_3264) [!__s390x__]: New global.
1918 (s390_collect_ptrace_register): Skip map entries containing -1.
1919 (s390_supply_ptrace_register): Ditto.
1920 (s390_fill_gprs_high): New function.
1921 (s390_store_gprs_high): New function.
1922 (s390_regsets): Add NT_S390_HIGH_GPRS.
1923 (s390_get_hwcap): Enable on 31-bit.
1924 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1925 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1926 Detect NT_S390_HIGH_GPRS.
1927 (s390_usrregs_info_3264): Enable on 31-bit.
1928 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1929 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1930
ae91f625
MK
19312016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1932
1933 PR gdb/13808
1934 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1935 * configure.srv: Ditto.
1936 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1937 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1938 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1939 (init_registers_amd64_linux): Remove prototype.
1940 (tdesc_amd64_linux): Remove declaration.
1941 (get_ipa_tdesc): New function.
1942 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1943 initialize remaining tdescs.
1944 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1945 (init_registers_i386_linux): Remove prototype.
1946 (tdesc_i386_linux): Remove declaration.
1947 (get_ipa_tdesc): New function.
1948 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1949 initialize remaining tdescs.
1950 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1951 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1952 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1953 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1954 (x86_get_ipa_tdesc_idx): New function.
1955 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1956 * linux-x86-tdesc.h: New file.
1957 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1958 (target_get_ipa_tdesc_idx): New macro.
1959 * tracepoint.c (ipa_tdesc_idx): New macro.
1960 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1961 (symbol_list): Add ipa_tdesc_idx.
1962 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1963 (ipa_tdesc): Remove.
1964 (ipa_tdesc_idx): New variable.
1965 (get_context_regcache): Use get_ipa_tdesc.
1966 (gdb_collect): Ditto.
1967 (gdb_probe): Ditto.
1968 * tracepoint.h (get_ipa_tdesc): New prototype.
1969 (ipa_tdesc): Remove.
1970
e7ad2f14
PA
19712016-02-24 Pedro Alves <palves@redhat.com>
1972
1973 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1974 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1975 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1976 Factor out common code between the USE_SIGTRAP_SIGINFO and
1977 !USE_SIGTRAP_SIGINFO blocks.
1978 (linux_low_filter_event): Call save_stop_reason instead of
1979 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1980 Update comments.
1981 (linux_wait_1): Update comments.
1982
657f9cde
WW
19832016-02-24 Wei-cheng Wang <cole945@gmail.com>
1984
1985 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1986 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1987 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1988 ppc_insert_point, ppc_remove_point.
1989
b00b61e1
MK
19902016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1991
1992 * linux-s390-low.c (s390_supports_z_point_type): New function.
1993 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1994
553cb527
YQ
19952016-02-16 Yao Qi <yao.qi@linaro.org>
1996
1997 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1998 PC. Get pc from regcache_read_pc.
1999
a5652c21
YQ
20002016-02-12 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2003 or linux_get_pc_32bit.
2004 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2005
ed443b61
YQ
20062016-02-12 Yao Qi <yao.qi@linaro.org>
2007
2008 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2009 arm_linux_get_next_pcs_fixup.
2010
020ecd38
MK
20112016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2012
2013 * tracepoint.c (x_tracepoint_action_download): Change
2014 write_inferior_data_ptr to write_inferior_data_pointer.
2015 (cmd_qtstart): Likewise.
2016 (write_inferior_data_ptr): Remove.
2017 (download_agent_expr): Change write_inferior_data_ptr to
2018 write_inferior_data_pointer.
2019 (download_tracepoint_1): Likewise.
2020 (download_tracepoint): Likewise.
2021 (download_trace_state_variables): Likewise.
2022
7cae9051
WW
20232016-02-11 Wei-cheng Wang <cole945@gmail.com>
2024 Marcin Kościelnicki <koriakin@0x04.net>
2025
2026 * tracepoint.c (struct tracepoint_action_ops): Remove.
2027 (struct tracepoint_action): Remove ops.
2028 (m_tracepoint_action_download, r_tracepoint_action_download)
2029 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2030 size and offset accordingly.
2031 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2032 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2033 (tracepoint_action_send, tracepoint_action_download): New functions.
2034 Helpers for trace action handlers.
2035 (add_tracepoint_action): Remove setup actions ops.
2036 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2037
9f6a71b4
YQ
20382016-02-10 Yao Qi <yao.qi@linaro.org>
2039
2040 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2041
1e94266c
SM
20422016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2043
2044 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2045 to AC_OUTPUT.
2046 * configure: Regenerate.
2047
8adce034
SM
20482016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2051 void * to gdb_byte *.
2052 * linux-low.c (siginfo_fixup): Likewise.
2053 (linux_xfer_siginfo): Likewise.
2054 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2055 Likewise.
2056 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2057
93813b37
WT
20582016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2059
2060 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2061 to srv_tgtobj.
2062 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2063 to srv_tgtobj.
2064 * linux-x86-low.c [__x86_64__]: Include
2065 "nat/amd64-linux-siginfo.h".
2066 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2067 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2068 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2069 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2070 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2071 (cpt_si_fd, si_timerid, si_overrun): Move from
2072 nat/amd64-linux-siginfo.c.
2073 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2074
8424cc97
SM
20752016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2076
2077 * server.c (skip_to_semicolon): Remove.
2078 (process_point_options): Use strchrnul instead of
2079 skip_to_semicolon.
2080
4d18591b
YQ
20812016-01-26 Yao Qi <yao.qi@linaro.org>
2082
2083 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2084 * linux-low.c (install_software_single_step_breakpoints): Don't
2085 call regcache_read_pc.
2086 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2087 argument pc.
2088
d8020970
YQ
20892016-01-26 Yao Qi <yao.qi@linaro.org>
2090
2091 * linux-low.c (install_software_single_step_breakpoints): Call
2092 regcache_read_pc instead of get_pc.
2093
8b207339
YQ
20942016-01-26 Yao Qi <yao.qi@linaro.org>
2095
2096 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2097 (unblock_async_io): Rename to ...
2098 (block_unblock_async_io): ... it. New function.
2099 (enable_async_io): Don't install SIGIO handler. Unblock it
2100 instead.
2101 (disable_async_io): Don't ignore SIGIO. Block it instead.
2102 (initialize_async_io): Install SIGIO handler. Don't call
2103 unblock_async_io.
2104
18879fef
YQ
21052016-01-26 Yao Qi <yao.qi@linaro.org>
2106
2107 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2108 first character is '\003', call *the_target->request_interrupt.
2109
a0f8e08a
YQ
21102016-01-25 Yao Qi <yao.qi@linaro.org>
2111
2112 * remote-utils.c (new_thread_notify): Remove.
2113 (dead_thread_notify): Likewise.
2114 * remote-utils.h (new_thread_notify): Remove declaration.
2115 (dead_thread_notify): Likewise.
2116
cc5fd9ab
MK
21172016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2118
2119 * gdb.trace/pending.exp: Fix expected message on continue.
2120
99e8eb11
MK
21212016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2122
2123 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2124 it works properly on big-endian machines where sizeof (CORE_ADDR)
2125 != sizeof (void *).
2126
a994041d
PA
21272016-01-21 Pedro Alves <palves@redhat.com>
2128
2129 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2130 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2131 * configure: Regenerate.
2132
f7a6a40d
YQ
21332016-01-21 Yao Qi <yao.qi@linaro.org>
2134
2135 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2136 is_thumb and set it according to CPSR saved on the stack.
2137 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2138 arm_sigreturn_next_pc.
2139
6f69e520
YQ
21402016-01-18 Yao Qi <yao.qi@linaro.org>
2141
2142 * linux-low.c (linux_set_pc_64bit): New function.
2143 (linux_get_pc_64bit): New function.
2144 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2145 Declare.
2146 * linux-sparc-low.c (debug_threads): Remove declaration.
2147 (sparc_get_pc): Remove.
2148 (the_low_target): Use linux_get_pc_64bit instead of
2149 sparc_get_pc.
2150 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2151 (the_low_target): Use linux_get_pc_64bit and
2152 linux_set_pc_64bit.
2153
276d4552
YQ
21542016-01-18 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-arm-low.c (debug_threads): Remove declaration.
2157 (arm_get_pc, arm_set_pc): Remove.
2158 (the_low_target): Use linux_get_pc_32bit and
2159 linux_set_pc_32bit.
2160 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2161 (the_low_target): Use linux_get_pc_32bit and
2162 linux_set_pc_32bit.
2163 * linux-cris-low.c (debug_threads): Remove declaration.
2164 (cris_get_pc, cris_set_pc,): Remove.
2165 (the_low_target): Use linux_get_pc_32bit and
2166 linux_set_pc_32bit.
2167 * linux-crisv32-low.c (debug_threads): Remove declaration.
2168 (cris_get_pc, cris_set_pc): Remove.
2169 (the_low_target): Use linux_get_pc_32bit and
2170 linux_set_pc_32bit.
2171 * linux-low.c: Include inttypes.h.
2172 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2173 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2174 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2175 (the_low_target): Use linux_get_pc_32bit and
2176 linux_set_pc_32bit.
2177 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2178 (the_low_target): Use linux_get_pc_32bit and
2179 linux_set_pc_32bit.
2180 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2181 (the_low_target): Use linux_get_pc_32bit and
2182 linux_set_pc_32bit.
2183 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2184 (the_low_target): Use linux_get_pc_32bit and
2185 linux_set_pc_32bit.
2186 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2187 (the_low_target): Use linux_get_pc_32bit and
2188 linux_set_pc_32bit.
2189
eb0edac8
GB
21902016-01-18 Gary Benson <gbenson@redhat.com>
2191
2192 * configure.ac (AC_FUNC_FORK): New check.
2193 * config.in: Regenerate.
2194 * configure: Likewise.
2195
1b451dda
YQ
21962016-01-14 Yao Qi <yao.qi@linaro.org>
2197
2198 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2199 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2200 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2201 arm_get_next_pcs_ctor.
2202
82075af2
JS
22032016-01-12 Josh Stone <jistone@redhat.com>
2204 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2205
2206 * inferiors.h: Include "gdb_vecs.h".
2207 (struct process_info): Add syscalls_to_catch.
2208 * inferiors.c (remove_process): Free syscalls_to_catch.
2209 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2210 syscall_return stops.
2211 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2212 * server.c (handle_general_set): Handle QCatchSyscalls.
2213 (handle_query): Report support for QCatchSyscalls.
2214 * target.h (struct target_ops): Add supports_catch_syscall.
2215 (target_supports_catch_syscall): New macro.
2216 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2217 (struct lwp_info): Add syscall_state.
2218 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2219 Maintain syscall_state and syscalls_to_catch across exec.
2220 (get_syscall_trapinfo): New function, proxy to the_low_target.
2221 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2222 (linux_low_filter_event): Toggle syscall_state entry/return for
2223 syscall traps, and set it ignored for all others.
2224 (gdb_catching_syscalls_p): New function.
2225 (gdb_catch_this_syscall_p): New function.
2226 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2227 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2228 (linux_supports_catch_syscall): New function.
2229 (linux_target_ops): Install it.
2230 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2231 (the_low_target): Install it.
2232
8f13a3ce
MF
22332016-01-12 Mike Frysinger <vapier@gentoo.org>
2234
2235 * acinclude.m4: Include new ../warning.m4 file.
2236 * configure: Regenerated.
2237 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2238
5b3da067
MF
22392016-01-12 Mike Frysinger <vapier@gentoo.org>
2240
2241 * ax.c (is_goto_target): Mark static.
2242 * linux-low.c (register_addr): Likewise.
2243 (linux_fetch_registers, linux_store_registers): Likewise.
2244 * mem-break.c (any_persistent_commands): Fix old prototype.
2245 (add_commands_to_breakpoint): Mark static.
2246 * regcache.c (find_register_by_name): Delete unused func.
2247 * remote-utils.c (hex_or_minus_one): Mark static.
2248 * server.c (monitor_show_help): Mark static.
2249 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2250 handle_v_requests): Likewise.
2251
bc504a31
PA
22522016-01-12 Pedro Alves <palves@redhat.com>
2253
2254 Remove use of the registered trademark symbol throughout.
2255
5a0dd67a
YQ
22562016-01-08 Yao Qi <yao.qi@linaro.org>
2257
2258 * remote-utils.c (getpkt): If c is '\003', call target hook
2259 request_interrupt.
2260
b2ca446f
YQ
22612016-01-06 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2264 linux-aarch32-low.c.
2265 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2266 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2267 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2268 (thumb2_breakpoint): Declare.
2269 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2270 linux-aarch32-low.h.
2271 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2272 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2273 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2274
edd88788
JB
22752016-01-01 Joel Brobecker <brobecker@adacore.com>
2276
2277 * gdbreplay.c (gdbreplay_version): Change copyright year in
2278 version message.
2279 * server.c (gdbserver_version): Likewise.
2280
65da7f14
PP
22812015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2282
2283 * server.c (crc32_table): Delete.
2284 (crc32): Use libiberty's xcrc32 function.
2285
4abd5ed2
JB
22862015-12-22 Joel Brobecker <brobecker@adacore.com>
2287
2288 * lynx-low.c (lynx_delete_thread_callback): New function.
2289 (lynx_mourn): Properly delete our process and all of its
2290 threads. Remove call to clear_inferiors.
2291
0e50fe5c
JB
22922015-12-22 Joel Brobecker <brobecker@adacore.com>
2293
2294 * target.c (thread_search_callback): Add check that
2295 the thread_stopped target callback is not NULL before
2296 calling it.
2297
35adc03f
YQ
22982015-12-21 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2301 arm breakpoint.
2302
bd2b2909
AT
23032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2304
2305 * server.c (handle_query): Call target_supports_software_single_step.
2306
7fe5e27e
AT
23072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2308
2309 * linux-low.c (single_step): New function.
2310 (linux_resume_one_lwp_throw): Call single_step.
2311 (start_step_over): Likewise.
2312
d9311bfa
AT
23132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2314
2315 * Makefile.in (SFILES): Append arch/arm-linux.c,
2316 arch/arm-get-next-pcs.c.
2317 (arm-linux.o): New rule.
2318 (arm-get-next-pcs.o): New rule.
2319 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2320 arm-linux.o.
2321 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2322 to linux-aarch32-low.c.
2323 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2324 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2325 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2326 (thumb2_breakpoint_len): Likewise.
2327 (arm_is_thumb_mode): Make non-static.
2328 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2329 from linux-aarch32-low.c.
2330 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2331 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2332 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2333 (thumb2_breakpoint_len): Likewise.
2334 (arm_is_thumb_mode): New declaration.
2335 * linux-arm-low.c: Include arch/arm-linux.h
2336 aarch/arm-get-next-pcs.h, sys/syscall.h.
2337 (get_next_pcs_ops): New struct.
2338 (get_next_pcs_addr_bits_remove): New function.
2339 (get_next_pcs_is_thumb): New function.
2340 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2341 (arm_sigreturn_next_pc): Likewise.
2342 (get_next_pcs_syscall_next_pc): Likewise.
2343 (arm_gdbserver_get_next_pcs): Likewise.
2344 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2345 Initialize.
2346 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2347 * server.h: Include gdb_vecs.h.
2348
68ce2059
AT
23492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2350
2351 * Makefile.in (SFILES): Append common/common-regcache.c.
2352 (OBS): Append common-regcache.o.
2353 (common-regcache.o): New rule.
2354 * regcache.c (init_register_cache): Initialize cache to
2355 REG_UNAVAILABLE.
2356 (regcache_raw_read_unsigned): New function.
2357 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2358 register_status enum.
2359
fa5308bd
AT
23602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2361
2362 * linux-aarch64-low.c (the_low_targets): Rename
2363 breakpoint_reinsert_addr to get_next_pcs.
2364 * linux-arm-low.c (the_low_targets): Likewise.
2365 * linux-bfin-low.c (the_low_targets): Likewise.
2366 * linux-cris-low.c (the_low_targets): Likewise.
2367 * linux-crisv32-low.c (the_low_targets): Likewise.
2368 * linux-low.c (can_software_single_step): Likewise.
2369 (install_software_single_step_breakpoints): New function.
2370 (start_step_over): Use install_software_single_step_breakpoints.
2371 * linux-low.h: New CORE_ADDR vector.
2372 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2373 get_next_pcs.
2374 * linux-mips-low.c (the_low_targets): Likewise.
2375 * linux-nios2-low.c (the_low_targets): Likewise.
2376 * linux-sparc-low.c (the_low_targets): Likewise.
2377
4a6ed09b
PA
23782015-12-17 Pedro Alves <palves@redhat.com>
2379
2380 * linux-low.c (linux_kill_one_lwp): Remove references to
2381 LinuxThreads.
2382 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2383 to 'kill'.
2384 (linux_init_signals): Delete.
2385 (initialize_low): Adjust.
2386 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2387
7544db95
PA
23882015-12-16 Pedro Alves <palves@redhat.com>
2389
2390 * configure.ac (compiler warning flags): When testing a
2391 -Wno-foo option, check whether -Wfoo works instead.
2392 * configure: Regenerate.
2393
8020350c
DB
23942015-12-11 Don Breazeal <donb@codesourcery.com>
2395
2396 * server.c (process_serial_event): Don't exit from gdbserver
2397 in remote mode if there are still active inferiors.
2398
db91f502
YQ
23992015-12-11 Yao Qi <yao.qi@linaro.org>
2400
2401 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2402 arm_breakpoint_at if the process is 32-bit.
2403
b37a6290
YQ
24042015-12-11 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2407 arm breakpoint.
2408
17b1509a
YQ
24092015-12-07 Yao Qi <yao.qi@linaro.org>
2410
2411 * configure.srv: Append arm.o to srv_tgtobj for
2412 aarch64*-*-linux* target.
2413 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2414 from linux-arm-low.c.
2415 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2416 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2417 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2418 (thumb2_breakpoint_len): Likewise.
2419 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2420 (arm_breakpoint_kinds): Likewise.
2421 (arm_breakpoint_kind_from_pc): Likewise.
2422 (arm_sw_breakpoint_from_kind): Likewise.
2423 (arm_breakpoint_kind_from_current_state): Likewise.
2424 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2425 (arm_sw_breakpoint_from_kind): Declare.
2426 (arm_breakpoint_kind_from_current_state): Declare.
2427 (arm_breakpoint_at): Declare.
2428 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2429 arm_sw_breakpoint_from_kind if process is 32-bit.
2430 (aarch64_breakpoint_kind_from_pc): New function.
2431 (aarch64_breakpoint_kind_from_current_state): New function.
2432 (the_low_target): Initialize fields breakpoint_kind_from_pc
2433 and breakpoint_kind_from_current_state.
2434 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2435 linux-aarch32-low.c.
2436 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2437 (arm_breakpoint, arm_breakpoint_len): Likewise.
2438 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2439 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2440 (arm_is_thumb_mode): Likewise.
2441 (arm_breakpoint_at): Likewise.
2442 (arm_breakpoint_kind_from_pc): Likewise.
2443 (arm_sw_breakpoint_from_kind): Likewise.
2444 (arm_breakpoint_kind_from_current_state): Likewise.
2445
2446 Revert:
2447 2015-08-04 Yao Qi <yao.qi@linaro.org>
2448
2449 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2450 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2451 * server.c (extended_protocol): Remove "static".
2452 * server.h (extended_protocol): Declare it.
2453
ece66d65
JS
24542015-12-04 Josh Stone <jistone@redhat.com>
2455
2456 * target.h (struct target_ops) <arch_setup>: Rename to ...
2457 (struct target_ops) <post_create_inferior>: ... this.
2458 (target_arch_setup): Rename to ...
2459 (target_post_create_inferior): ... this, calling post_create_inferior.
2460 * server.c (start_inferior): Update target_arch_setup calls to
2461 target_post_create_inferior.
2462 * linux-low.c (linux_low_ptrace_options): Forward declare.
2463 (linux_arch_setup): Update its comment for general use.
2464 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2465 (struct linux_target_ops): Use linux_post_create_inferior.
2466 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2467 to post_create_inferior.
2468 * nto-low.c (struct nto_target_ops): Likewise.
2469 * spu-low.c (struct spu_target_ops): Likewise.
2470 * win32-low.c (struct win32_target_ops): Likewise.
2471
e58c48b4
AT
24722015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2473
2474 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2475
fbec8956
AT
24762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2477
2478 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2479 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2480 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2481 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2482 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2483 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2484 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2485 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2486 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2487 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2488 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2489 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2490
9b4c5f87
AT
24912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2492
2493 * linux-low.c (linux_look_up_symbols): Don't call
2494 linux_supports_traceclone.
2495 * linux-low.h (thread_db_init): Remove use_events argument.
2496 * thread-db.c (thread_db_use_event): Remove global variable.
2497 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2498 (struct thread_db) <td_create_bp>: Remove field.
2499 (thread_db_create_event): Remove function.
2500 (thread_db_enable_reporting): Likewise.
2501 (find_one_thread): Don't check for thread_db_use_events.
2502 (attach_thread): Likewise.
2503 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2504 (try_thread_db_load_1): Don't check for thread_db_use_events.
2505 (thread_db_init): Remove use_events argument and thread events
2506 handling.
2507 (remove_thread_event_breakpoints): Remove function.
2508 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2509
7d00775e
AT
25102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2511
2512 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2513 New function.
2514 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2515 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2516 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2517 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2518 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2519 Initialize.
2520 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2521 New function.
2522 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2523 * linux-low.c (can_hardware_single_step): Use
2524 supports_hardware_single_step.
2525 (can_software_single_step): New function.
2526 (start_step_over): Call can_software_single_step.
2527 (linux_supports_hardware_single_step): New function.
2528 (struct target_ops) <supports_software_single_step>: Initialize.
2529 * linux-low.h (struct linux_target_ops)
2530 <supports_hardware_single_step>: Initialize.
2531 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2532 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2533 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2534 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2535 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2536 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2537 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2538 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2539 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2540 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2541 Initialize.
2542 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2543 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2544 Initialize.
2545 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2547 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2548 New function.
2549 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2550 * target.h (struct target_ops): <supports_software_single_step>:
2551 New field.
2552 (target_supports_software_single_step): New macro.
2553
2d97cd35
AT
25542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555
2556 * linux-low.c (linux_wait_1): Fix pc advance condition.
2557 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2558 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2559
769ef81f
AT
25602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2561
2562 * linux-arm-low.c (arm_is_thumb_mode): New function.
2563 (arm_breakpoint_at): Use arm_is_thumb_mode.
2564 (arm_breakpoint_kind_from_current_state): New function.
2565 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2566 Initialize.
2567 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2568 (linux_breakpoint_kind_from_current_state): New function.
2569 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2570 * linux-low.h (struct linux_target_ops)
2571 <breakpoint_kind_from_current_state>: New field.
2572 * target.h (struct target_ops): Likewise.
2573 (target_breakpoint_kind_from_current_state): New macro.
2574
1bebeeca
PA
25752015-11-30 Pedro Alves <palves@redhat.com>
2576
2577 * linux-low.c (linux_resume): Wake up the event loop before
2578 returning.
2579
a67a9fae
PA
25802015-11-30 Pedro Alves <palves@redhat.com>
2581
2582 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2583 check.
2584 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2585 to -1.
2586 * target.c (struct thread_search): New structure.
2587 (thread_search_callback): New function.
2588 (prev_general_thread): New global.
2589 (prepare_to_access_memory, done_accessing_memory): New functions.
2590 * target.h (prepare_to_access_memory, done_accessing_memory):
2591 Replace macros with function declarations.
2592
f2faf941
PA
25932015-11-30 Pedro Alves <palves@redhat.com>
2594
2595 PR 14618
2596 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2597 report TARGET_WAITKIND_NO_RESUMED.
2598 * remote-utils.c (prepare_resume_reply): Handle
2599 TARGET_WAITKIND_NO_RESUMED.
2600 * server.c (report_no_resumed): New global.
2601 (handle_query) <qSupported>: Handle "no-resumed+". Report
2602 "no-resumed+" support.
2603 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2604 return error if the client doesn't support no-resumed events.
2605 (push_stop_notification): New function.
2606 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2607 events if the client supports them.
2608
a681f9c9
PA
26092015-11-30 Pedro Alves <palves@redhat.com>
2610
2611 * linux-low.c (thread_still_has_status_pending_p): Don't check
2612 vCont;t here.
2613 (lwp_resumed): New function.
2614 (status_pending_p_callback): Return early if the LWP is not
2615 supposed to be resumed.
2616
65706a29
PA
26172015-11-30 Pedro Alves <palves@redhat.com>
2618
2619 * linux-low.c (handle_extended_wait): Assert that the LWP's
2620 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2621 thread create events, leave the new child's status pending.
2622 (linux_low_filter_event): If GDB wants to hear about thread exit
2623 events, leave the LWP marked dead and don't delete it.
2624 (linux_wait_for_event_filtered): Don't check for thread exit.
2625 (filter_exit_event): New function.
2626 (linux_wait_1): Use it, when returning an exit event.
2627 (linux_resume_one_lwp_throw): Assert that the LWP's
2628 waitstatus is TARGET_WAITKIND_IGNORE.
2629 * remote-utils.c (prepare_resume_reply): Handle
2630 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2631 * server.c (report_thread_events): New global.
2632 (handle_general_set): Handle QThreadEvents.
2633 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2634 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2635 TARGET_WAITKIND_THREAD_EXITED.
2636 * server.h (report_thread_events): Declare.
2637
56cf4bed
PA
26382015-11-30 Pedro Alves <palves@redhat.com>
2639
2640 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2641 the thread's last_resume_kind was resume_stop.
2642
500c1d85
PA
26432015-11-30 Pedro Alves <palves@redhat.com>
2644
2645 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2646 before returning.
2647
de979965
PA
26482015-11-30 Pedro Alves <palves@redhat.com>
2649
2650 * server.c (handle_v_requests): Handle vCtrlC.
2651
34c65914
PA
26522015-11-30 Pedro Alves <palves@redhat.com>
2653
2654 * gdbthread.h (find_any_thread_of_pid): Declare.
2655 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2656 functions.
2657 * server.c (handle_query): If current_thread is NULL, look for
2658 another thread of the selected process.
2659
79efa585 26602015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2661 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2662
2663 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2664 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2665 name in reply.
2666 * target.h (struct target_ops) <thread_name>: New field.
2667 (target_thread_name): New macro.
2668
80d82c19
JB
26692015-11-23 Joel Brobecker <brobecker@adacore.com>
2670
2671 * regcache.h (regcache_invalidate_pid): Add declaration.
2672 * regcache.c (regcache_invalidate_pid): New function, extracted
2673 from regcache_invalidate.
2674 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2675 Add trivial documentation comment.
2676 * lynx-low.c: Use regcache_invalidate_pid instead of
2677 regcache_invalidate.
2678
64da5dd5
JB
26792015-11-23 Joel Brobecker <brobecker@adacore.com>
2680
2681 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2682 and Elf64_auxv_t if the target is Android.
2683
37ce4055
DE
26842015-11-22 Doug Evans <xdje42@gmail.com>
2685
2686 * target.h: #include <sys/types.h>.
2687
06e03fff
PA
26882015-11-19 Pedro Alves <palves@redhat.com>
2689
2690 * linux-low.c (linux_process_qsupported): Change prototype.
2691 Adjust.
2692 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2693 Change prototype.
2694 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2695 and adjust to loop over all features.
2696 * server.c (handle_query) <qSupported>: Adjust to call
2697 target_process_qsupported once, passing it a vector of unprocessed
2698 features.
2699 * target.h (struct target_ops) <process_qsupported>: Change
2700 prototype.
2701 (target_process_qsupported): Adjust.
2702
9a084706
PA
27032015-11-19 Pedro Alves <palves@redhat.com>
2704
2705 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2706 mode.
2707 * configure: Regenerate.
2708
dad44a1f
PA
27092015-11-19 Pedro Alves <palves@redhat.com>
2710
2711 * configure: Regenerate.
2712
231c0592
YQ
27132015-11-19 Yao Qi <yao.qi@linaro.org>
2714
2715 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2716 type to uint32_t.
2717
6c1c9a8b
YQ
27182015-11-19 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2721 (struct aarch64_operand): Move enum out.
2722
9caa3311
YQ
27232015-11-19 Yao Qi <yao.qi@linaro.org>
2724
2725 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2726 struct user_fpsimd_state *.
2727 (aarch64_store_fpregset): Likewise.
2728
6a69a054
YQ
27292015-11-19 Yao Qi <yao.qi@linaro.org>
2730
2731 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2732 struct user_pt_regs *.
2733 (aarch64_store_gregset): Likewise.
2734
1798301e
PA
27352015-11-18 Pedro Alves <palves@redhat.com>
2736
2737 * Makefile.in (all_object_files): Add $IPA_OBJS.
2738
ce7715e2
PA
27392015-11-17 Pedro Alves <palves@redhat.com>
2740
2741 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2742 GDB_SIGNAL_0 and gdb_signal_to_string.
2743
c0879059
PA
27442015-11-17 Pedro Alves <palves@redhat.com>
2745
2746 * win32-low.c (handle_output_debug_string): Remove parameter.
2747 (win32_kill): Remove our_status local and adjust call to
2748 handle_output_debug_string.
2749 (get_child_debug_event): Adjust call to
2750 handle_output_debug_string.
2751
1996e237
SM
27522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2753
2754 * linux-mips-low.c (mips_fill_gregset): Add cast.
2755 (mips_store_gregset): Likewise.
2756 (mips_fill_fpregset): Likewise.
2757 (mips_store_fpregset): Likewise.
2758
cbec665b
SM
27592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2760
2761 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2762 priv.
2763
eb3e3c67
SM
27642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2765
2766 * linux-mips-low.c (mips_linux_new_thread): Change type of
2767 watch_type to enum target_hw_bp_type.
2768
171de4b8
SM
27692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2772 Change return type to arm_hwbp_type.
2773
04248ead
SM
27742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2775
2776 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2777 (arm_store_gregset): Likewise.
2778 * linux-arm-low.c (arm_get_hwcap): Likewise.
2779 (arm_read_description): Likewise.
2780
04b3479c
SM
27812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2782
2783 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2784
2bc84e8a
SM
27852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2786
2787 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2788 (ppc_fill_vsxregset): Likewise.
2789 (ppc_store_vsxregset): Likewise.
2790 (ppc_fill_vrregset): Likewise.
2791 (ppc_store_vrregset): Likewise.
2792 (ppc_fill_evrregset): Likewise.
2793 (ppc_store_evrregset): Likewise.
2794
e6c5bb05
SM
27952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2796
2797 * linux-ppc-low.c (ppc_usrregs_info): Remove
2798 forward-declaration.
2799 (ppc_arch_setup): Move lower in file.
2800
7ea45d72
SM
28012015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2802
2803 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2804 (ps_pdwrite): Likewise.
2805
69291610
HW
28062015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2807
2808 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2809 to after assert checks.
2810
b42945fd
SM
28112015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2812
2813 * proc-service.c (ps_pdread): Add/adjust casts.
2814 (ps_pdwrite): Add/adjust casts.
2815
d6f85c84
SM
28162015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2817
2818 * server.c (handle_search_memory_1): Cast return value of
2819 memmem.
2820
f98cd059
SM
28212015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2822
2823 * server.c (write_qxfer_response): Change type of data to
2824 gdb_byte *.
2825
d2412fa5
PA
28262015-10-29 Pedro Alves <palves@redhat.com>
2827
2828 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2829
c17414a2
PA
28302015-10-29 Pedro Alves <palves@redhat.com>
2831
2832 * tracepoint.c (clear_installed_tracepoints): Add casts.
2833
e053fbc4
PA
28342015-10-29 Pedro Alves <palves@redhat.com>
2835
2836 * server.c (handle_v_cont, process_serial_event): Add enum
2837 gdb_signal casts to signal parsing code.
2838
add67df8
PA
28392015-10-29 Pedro Alves <palves@redhat.com>
2840
2841 * linux-low.h (NULL_REGSET): Define.
2842 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2843 * linux-arm-low.c (arm_regsets): Likewise.
2844 * linux-crisv32-low.c (cris_regsets): Likewise.
2845 * linux-m68k-low.c (m68k_regsets): Likewise.
2846 * linux-mips-low.c (mips_regsets): Likewise.
2847 * linux-nios2-low.c (nios2_regsets): Likewise.
2848 * linux-ppc-low.c (ppc_regsets): Likewise.
2849 * linux-s390-low.c (s390_regsets): Likewise.
2850 * linux-sh-low.c (sh_regsets): Likewise.
2851 * linux-sparc-low.c (sparc_regsets): Likewise.
2852 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2853 * linux-tile-low.c (tile_regsets): Likewise.
2854 * linux-x86-low.c (x86_regsets): Likewise.
2855 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2856
50bc912a
PA
28572015-10-29 Pedro Alves <palves@redhat.com>
2858
2859 * linux-low.h (NULL_REGSET): Define.
2860 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2861 * linux-arm-low.c (arm_regsets): Likewise.
2862 * linux-crisv32-low.c (cris_regsets): Likewise.
2863 * linux-m68k-low.c (m68k_regsets): Likewise.
2864 * linux-mips-low.c (mips_regsets): Likewise.
2865 * linux-nios2-low.c (nios2_regsets): Likewise.
2866 * linux-ppc-low.c (ppc_regsets): Likewise.
2867 * linux-s390-low.c (s390_regsets): Likewise.
2868 * linux-sh-low.c (sh_regsets): Likewise.
2869 * linux-sparc-low.c (sparc_regsets): Likewise.
2870 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2871 * linux-tile-low.c (tile_regsets): Likewise.
2872 * linux-x86-low.c (x86_regsets): Likewise.
2873 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2874
682b2546
DE
28752015-10-26 Doug Evans <dje@google.com>
2876
2877 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2878
963843d4
DE
28792015-10-26 Doug Evans <dje@google.com>
2880
2881 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2882
d41401ac
DE
28832015-10-26 Doug Evans <dje@google.com>
2884
2885 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2886 for debug_printf.
2887 (attach_thread, find_new_threads_callback): Ditto.
2888
3db28855
AT
28892015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2890
2891 * mem-break.h (set_breakpoint_data): Remove.
2892
fb78e89c
AT
28932015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2894
2895 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2896 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2897 (initialize_low): Remove set_breakpoint_data call.
2898 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2899 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2900 (initialize_low): Remove set_breakpoint_data call.
2901 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2902 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2903 (initialize_low): Remove set_breakpoint_data call.
2904
2e6ee069
AT
29052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2908 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2909 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2910 * target.h (target_breakpoint_kind_from_pc): New macro.
2911
1652a986
AT
29122015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2913
2914 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2915 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2916 the default breakpoint kind.
2917
abeead09
AT
29182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2919
2920 * linux-arm-low.c (arm_supports_z_point_type): Add software
2921 breakpoint support.
2922
b0b4b501
AT
29232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2924
2925 * linux-arm-low.c: Refactor breakpoint definitions.
2926 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2927 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2928
8689682c
AT
29292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2930
2931 * Makefile.in: Add arm.c/o.
2932 * configure.srv: Likewise.
2933 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2934 (arm_breakpoint_kind_from_pc): New function.
2935 (arm_sw_breakpoint_from_kind): Return proper kind.
2936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2937
27165294
AT
29382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2939
2940 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2941 removal.
2942 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2943 (struct raw_breakpoint) <size>: Remove.
2944 (struct raw_breakpoint) <kind>: Add.
2945 (bp_size): New function.
2946 (bp_opcode): Likewise.
2947 (find_raw_breakpoint_at): Adjust for kind.
2948 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2949 (remove_memory_breakpoint): Adjust for kind call bp_size.
2950 (set_raw_breakpoint_at): Adjust for kind.
2951 (set_breakpoint): Likewise.
2952 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2953 (delete_raw_breakpoint): Adjust for kind.
2954 (delete_breakpoint): Likewise.
2955 (find_gdb_breakpoint): Likewise.
2956 (set_gdb_breakpoint_1): Likewise.
2957 (set_gdb_breakpoint): Likewise.
2958 (delete_gdb_breakpoint_1): Likewise.
2959 (delete_gdb_breakpoint): Likewise.
2960 (uninsert_raw_breakpoint): Likewise.
2961 (reinsert_raw_breakpoint): Likewise.
2962 (set_breakpoint_data): Remove.
2963 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2964 (check_mem_read): Adjust for kind call bp_size.
2965 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2966 (clone_one_breakpoint): Adjust for kind.
2967 * mem-break.h (set_gdb_breakpoint): Likewise.
2968 (delete_gdb_breakpoint): Likewise.
2969 * server.c (process_serial_event): Likewise.
2970
dd373349
AT
29712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972
2973 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2974 (struct linux_target_ops) <breakpoint>: Remove.
2975 (struct linux_target_ops) <breakpoint_len>: Remove.
2976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2978 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2979 (arm_sw_breakpoint_from_kind): New function.
2980 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2981 (struct linux_target_ops) <breakpoint>: Remove.
2982 (struct linux_target_ops) <breakpoint_len>: Remove.
2983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2984 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2985 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2986 (struct linux_target_ops) <breakpoint>: Remove.
2987 (struct linux_target_ops) <breakpoint_len>: Remove.
2988 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2989 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2990 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2991 (struct linux_target_ops) <breakpoint>: Remove.
2992 (struct linux_target_ops) <breakpoint_len>: Remove.
2993 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2994 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2995 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2996 and sw_breakpoint_from_kind to increment the pc.
2997 (linux_breakpoint_kind_from_pc): New function.
2998 (linux_sw_breakpoint_from_kind): New function.
2999 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3000 (initialize_low): Call breakpoint_kind_from_pc and
3001 sw_breakpoint_from_kind to replace breakpoint_data/len.
3002 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3003 New field.
3004 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3005 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3006 (struct linux_target_ops) <breakpoint>: Remove.
3007 (struct linux_target_ops) <breakpoint_len>: Remove.
3008 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3009 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3010 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3011 (struct linux_target_ops) <breakpoint>: Remove.
3012 (struct linux_target_ops) <breakpoint_len>: Remove.
3013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3015 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3016 (struct linux_target_ops) <breakpoint>: Remove.
3017 (struct linux_target_ops) <breakpoint_len>: Remove.
3018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3020 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3021 (struct linux_target_ops) <breakpoint>: Remove.
3022 (struct linux_target_ops) <breakpoint_len>: Remove.
3023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3025 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3026 (struct linux_target_ops) <breakpoint>: Remove.
3027 (struct linux_target_ops) <breakpoint_len>: Remove.
3028 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3029 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3030 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3031 (struct linux_target_ops) <breakpoint>: Remove.
3032 (struct linux_target_ops) <breakpoint_len>: Remove.
3033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3034 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3035 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3036 (struct linux_target_ops) <breakpoint>: Remove.
3037 (struct linux_target_ops) <breakpoint_len>: Remove.
3038 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3039 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3040 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3041 (struct linux_target_ops) <breakpoint>: Remove.
3042 (struct linux_target_ops) <breakpoint_len>: Remove.
3043 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3044 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3045 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3046 (struct linux_target_ops) <breakpoint>: Remove.
3047 (struct linux_target_ops) <breakpoint_len>: Remove.
3048 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3049 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3050 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3051 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3052 (struct linux_target_ops) <breakpoint>: Remove.
3053 (struct linux_target_ops) <breakpoint_len>: Remove.
3054 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3056 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3057 (struct linux_target_ops) <breakpoint>: Remove.
3058 (struct linux_target_ops) <breakpoint_len>: Remove.
3059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3061
4cd98a19
AT
30622015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3063
3064 * linux-cris-low.c (cris_get_pc): Remove void arg.
3065
774ee6d2
AR
30662015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3067
3068 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3069 variable name.
3070
833dcd29
AR
30712015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3072
3073 * inferiors.c (thread_pid_matches_callback): New function.
3074 (find_thread_process): New function.
3075 (remove_thread): Reset current_thread.
3076 (remove_process): Assert threads have been removed first.
3077
8d689ee5
YQ
30782015-10-15 Yao Qi <yao.qi@linaro.org>
3079
3080 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3081 if it is 3.
3082 (aarch64_remove_point): Likewise.
3083 * regcache.c (regcache_register_size): New function.
3084
1c2e1515
YQ
30852015-10-12 Yao Qi <yao.qi@linaro.org>
3086
3087 * linux-aarch64-low.c: Update all callers as emit_load_store
3088 is renamed to aarch64_emit_load_store.
3089
e1c587c3
YQ
30902015-10-12 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c: Update all callers of function renaming
3093 from emit_insn to aarch64_emit_insn.
3094
b6542f81
YQ
30952015-10-12 Yao Qi <yao.qi@linaro.org>
3096
3097 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3098 arch/aarch64-insn.h.
3099 (struct aarch64_memory_operand): Likewise.
3100 (ENCODE): Likewise.
3101 (emit_insn): Move to arch/aarch64-insn.c.
3102 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3103 (emit_load_store): Move to arch/aarch64-insn.c.
3104 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3105 (can_encode_int32): Remove.
3106
246994ce
YQ
31072015-10-12 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3110 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3111 (aarch64_relocate_instruction): Likewise.
3112 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3113 (struct aarch64_insn_visitor): Likewise.
3114
0badd99f
YQ
31152015-10-12 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3118 (struct aarch64_insn_visitor): New.
3119 (struct aarch64_insn_relocation_data): New.
3120 (aarch64_ftrace_insn_reloc_b): New function.
3121 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3122 (aarch64_ftrace_insn_reloc_cb): Likewise.
3123 (aarch64_ftrace_insn_reloc_tb): Likewise.
3124 (aarch64_ftrace_insn_reloc_adr): Likewise.
3125 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3126 (aarch64_ftrace_insn_reloc_others): Likewise.
3127 (visitor): New.
3128 (aarch64_relocate_instruction): Use visitor.
3129
dfaffe9d
YQ
31302015-10-12 Yao Qi <yao.qi@linaro.org>
3131
3132 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3133 int. Add argument buf.
3134 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3135 aarch64_relocate_instruction.
3136
70b439f0
YQ
31372015-10-12 Yao Qi <yao.qi@linaro.org>
3138
3139 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3140 argument insn. Remove local variable insn. Don't call
3141 target_read_uint32.
3142 (aarch64_install_fast_tracepoint_jump_pad): Call
3143 target_read_uint32.
3144
7781c06f
YQ
31452015-09-30 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3148 (emit_load_store_pair): Likewise.
3149
9a3c8263
SM
31502015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3151
3152 * dll.c (match_dll): Add cast(s).
3153 (unloaded_dll): Likewise.
3154 * linux-low.c (second_thread_of_pid_p): Likewise.
3155 (delete_lwp_callback): Likewise.
3156 (count_events_callback): Likewise.
3157 (select_event_lwp_callback): Likewise.
3158 (linux_set_resume_request): Likewise.
3159 * server.c (accumulate_file_name_length): Likewise.
3160 (emit_dll_description): Likewise.
3161 (handle_qxfer_threads_worker): Likewise.
3162 (visit_actioned_threads): Likewise.
3163 * thread-db.c (any_thread_of): Likewise.
3164 * tracepoint.c (same_process_p): Likewise.
3165 (match_blocktype): Likewise.
3166 (build_traceframe_info_xml): Likewise.
3167
224c3ddb
SM
31682015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3171 assignment.
3172 (gdb_unparse_agent_expr): Likewise.
3173 * hostio.c (require_data): Likewise.
3174 (handle_pread): Likewise.
3175 * linux-low.c (disable_regset): Likewise.
3176 (fetch_register): Likewise.
3177 (store_register): Likewise.
3178 (get_dynamic): Likewise.
3179 (linux_qxfer_libraries_svr4): Likewise.
3180 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3181 (set_fast_tracepoint_jump): Likewise.
3182 (uninsert_fast_tracepoint_jumps_at): Likewise.
3183 (reinsert_fast_tracepoint_jumps_at): Likewise.
3184 (validate_inserted_breakpoint): Likewise.
3185 (clone_agent_expr): Likewise.
3186 * regcache.c (init_register_cache): Likewise.
3187 * remote-utils.c (putpkt_binary_1): Likewise.
3188 (decode_M_packet): Likewise.
3189 (decode_X_packet): Likewise.
3190 (look_up_one_symbol): Likewise.
3191 (relocate_instruction): Likewise.
3192 (monitor_output): Likewise.
3193 * server.c (handle_search_memory): Likewise.
3194 (handle_qxfer_exec_file): Likewise.
3195 (handle_qxfer_libraries): Likewise.
3196 (handle_qxfer): Likewise.
3197 (handle_query): Likewise.
3198 (handle_v_cont): Likewise.
3199 (handle_v_run): Likewise.
3200 (captured_main): Likewise.
3201 * target.c (write_inferior_memory): Likewise.
3202 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3203 * tracepoint.c (init_trace_buffer): Likewise.
3204 (add_tracepoint_action): Likewise.
3205 (add_traceframe): Likewise.
3206 (add_traceframe_block): Likewise.
3207 (cmd_qtdpsrc): Likewise.
3208 (cmd_qtdv): Likewise.
3209 (cmd_qtstatus): Likewise.
3210 (response_source): Likewise.
3211 (response_tsv): Likewise.
3212 (cmd_qtnotes): Likewise.
3213 (gdb_collect): Likewise.
3214 (initialize_tracepoint): Likewise.
3215
afbe19f8
PL
32162015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3217
3218 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3219 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3220 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3221 <NOP>: New.
3222 (enum aarch64_condition_codes): New enum.
3223 (w0): New static global.
3224 (fp): Likewise.
3225 (lr): Likewise.
3226 (struct aarch64_memory_operand) <type>: New
3227 MEMORY_OPERAND_POSTINDEX type.
3228 (postindex_memory_operand): New helper function.
3229 (emit_ret): New function.
3230 (emit_load_store_pair): New function, factored out of emit_stp
3231 with support for MEMORY_OPERAND_POSTINDEX.
3232 (emit_stp): Rewrite using emit_load_store_pair.
3233 (emit_ldp): New function.
3234 (emit_load_store): Likewise.
3235 (emit_ldr): Mention post-index instruction in comment.
3236 (emit_ldrh): New function.
3237 (emit_ldrb): New function.
3238 (emit_ldrsw): Mention post-index instruction in comment.
3239 (emit_str): Likewise.
3240 (emit_subs): New function.
3241 (emit_cmp): Likewise.
3242 (emit_and): Likewise.
3243 (emit_orr): Likewise.
3244 (emit_orn): Likewise.
3245 (emit_eor): Likewise.
3246 (emit_mvn): Likewise.
3247 (emit_lslv): Likewise.
3248 (emit_lsrv): Likewise.
3249 (emit_asrv): Likewise.
3250 (emit_mul): Likewise.
3251 (emit_sbfm): Likewise.
3252 (emit_sbfx): Likewise.
3253 (emit_ubfm): Likewise.
3254 (emit_ubfx): Likewise.
3255 (emit_csinc): Likewise.
3256 (emit_cset): Likewise.
3257 (emit_nop): Likewise.
3258 (emit_ops_insns): New helper function.
3259 (emit_pop): Likewise.
3260 (emit_push): Likewise.
3261 (aarch64_emit_prologue): New function.
3262 (aarch64_emit_epilogue): Likewise.
3263 (aarch64_emit_add): Likewise.
3264 (aarch64_emit_sub): Likewise.
3265 (aarch64_emit_mul): Likewise.
3266 (aarch64_emit_lsh): Likewise.
3267 (aarch64_emit_rsh_signed): Likewise.
3268 (aarch64_emit_rsh_unsigned): Likewise.
3269 (aarch64_emit_ext): Likewise.
3270 (aarch64_emit_log_not): Likewise.
3271 (aarch64_emit_bit_and): Likewise.
3272 (aarch64_emit_bit_or): Likewise.
3273 (aarch64_emit_bit_xor): Likewise.
3274 (aarch64_emit_bit_not): Likewise.
3275 (aarch64_emit_equal): Likewise.
3276 (aarch64_emit_less_signed): Likewise.
3277 (aarch64_emit_less_unsigned): Likewise.
3278 (aarch64_emit_ref): Likewise.
3279 (aarch64_emit_if_goto): Likewise.
3280 (aarch64_emit_goto): Likewise.
3281 (aarch64_write_goto_address): Likewise.
3282 (aarch64_emit_const): Likewise.
3283 (aarch64_emit_call): Likewise.
3284 (aarch64_emit_reg): Likewise.
3285 (aarch64_emit_pop): Likewise.
3286 (aarch64_emit_stack_flush): Likewise.
3287 (aarch64_emit_zero_ext): Likewise.
3288 (aarch64_emit_swap): Likewise.
3289 (aarch64_emit_stack_adjust): Likewise.
3290 (aarch64_emit_int_call_1): Likewise.
3291 (aarch64_emit_void_call_2): Likewise.
3292 (aarch64_emit_eq_goto): Likewise.
3293 (aarch64_emit_ne_goto): Likewise.
3294 (aarch64_emit_lt_goto): Likewise.
3295 (aarch64_emit_le_goto): Likewise.
3296 (aarch64_emit_gt_goto): Likewise.
3297 (aarch64_emit_ge_got): Likewise.
3298 (aarch64_emit_ops_impl): New static global variable.
3299 (aarch64_emit_ops): New target function, return
3300 &aarch64_emit_ops_impl.
3301 (struct linux_target_ops): Install it.
3302
bb903df0
PL
33032015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3304
3305 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3306 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3307 aarch64-ipa.o.
3308 * linux-aarch64-ipa.c: New file.
3309 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3310 and endian.h.
3311 (aarch64_get_thread_area): New target method.
3312 (extract_signed_bitfield): New helper function.
3313 (aarch64_decode_ldr_literal): New function.
3314 (enum aarch64_opcodes): New enum.
3315 (struct aarch64_register): New struct.
3316 (struct aarch64_operand): New struct.
3317 (x0): New static global.
3318 (x1): Likewise.
3319 (x2): Likewise.
3320 (x3): Likewise.
3321 (x4): Likewise.
3322 (w2): Likewise.
3323 (ip0): Likewise.
3324 (sp): Likewise.
3325 (xzr): Likewise.
3326 (aarch64_register): New helper function.
3327 (register_operand): Likewise.
3328 (immediate_operand): Likewise.
3329 (struct aarch64_memory_operand): New struct.
3330 (offset_memory_operand): New helper function.
3331 (preindex_memory_operand): Likewise.
3332 (enum aarch64_system_control_registers): New enum.
3333 (ENCODE): New macro.
3334 (emit_insn): New helper function.
3335 (emit_b): New function.
3336 (emit_bcond): Likewise.
3337 (emit_cb): Likewise.
3338 (emit_tb): Likewise.
3339 (emit_blr): Likewise.
3340 (emit_stp): Likewise.
3341 (emit_ldp_q_offset): Likewise.
3342 (emit_stp_q_offset): Likewise.
3343 (emit_load_store): Likewise.
3344 (emit_ldr): Likewise.
3345 (emit_ldrsw): Likewise.
3346 (emit_str): Likewise.
3347 (emit_ldaxr): Likewise.
3348 (emit_stxr): Likewise.
3349 (emit_stlr): Likewise.
3350 (emit_data_processing_reg): Likewise.
3351 (emit_data_processing): Likewise.
3352 (emit_add): Likewise.
3353 (emit_sub): Likewise.
3354 (emit_mov): Likewise.
3355 (emit_movk): Likewise.
3356 (emit_mov_addr): Likewise.
3357 (emit_mrs): Likewise.
3358 (emit_msr): Likewise.
3359 (emit_sevl): Likewise.
3360 (emit_wfe): Likewise.
3361 (append_insns): Likewise.
3362 (can_encode_int32_in): New helper function.
3363 (aarch64_relocate_instruction): New function.
3364 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3365 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3366 (struct linux_target_ops): Install aarch64_get_thread_area,
3367 aarch64_install_fast_tracepoint_jump_pad and
3368 aarch64_get_min_fast_tracepoint_insn_len.
3369
787749ea
PL
33702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3371
3372 * Makefile.in (aarch64-insn.o): New rule.
3373 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3374
9812b2e6
YQ
33752015-09-21 Yao Qi <yao.qi@linaro.org>
3376
3377 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3378
18fe412b
YQ
33792015-09-21 Yao Qi <yao.qi@linaro.org>
3380
3381 * tracepoint.c (max_jump_pad_size): Remove.
3382
a0cc84cd
YQ
33832015-09-18 Yao Qi <yao.qi@linaro.org>
3384
3385 * linux-aarch64-low.c: Don't include sys/uio.h.
3386 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3387
d78908cf
WW
33882015-09-16 Wei-cheng Wang <cole945@gmail.com>
3389
3390 * tracepoint.c (eval_result_type): Change prototype.
3391 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3392
d57e0d50
PA
33932015-09-15 Pedro Alves <palves@redhat.com>
3394
3395 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3396 Check whether to report exec events instead of checking whether
3397 multiprocess is enabled.
3398
5a676acc
PA
33992015-09-15 Pedro Alves <palves@redhat.com>
3400
3401 PR remote/18965
3402 * remote-utils.c (prepare_resume_reply): Merge
3403 TARGET_WAITKIND_VFORK_DONE switch case with the
3404 TARGET_WAITKIND_FORKED case.
3405
7c5d0fad
YQ
34062015-09-15 Yao Qi <yao.qi@linaro.org>
3407
3408 * server.c (handle_query): Check string comparison using
3409 "else if" instead of "if".
3410
750ce8d1
YQ
34112015-09-15 Yao Qi <yao.qi@linaro.org>
3412
3413 * server.c (vCont_supported): New global variable.
3414 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3415 matches. Append ";vContSupported+" to own_buf.
3416 (handle_v_requests): Append ";s;S" to own_buf if target supports
3417 hardware single step or vCont_supported is false.
3418 (capture_main): Set vCont_supported to zero.
3419
70b90b91
YQ
34202015-09-15 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3423 it to ...
3424 (linux_supports_hardware_single_step): ... New function.
3425 (linux_target_ops): Update.
3426 * lynx-low.c (lynx_target_ops): Set field
3427 supports_hardware_single_step to target_can_do_hardware_single_step.
3428 * nto-low.c (nto_target_ops): Likewise.
3429 * spu-low.c (spu_target_ops): Likewise.
3430 * win32-low.c (win32_target_ops): Likewise.
3431 * target.c (target_can_do_hardware_single_step): New function.
3432 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3433 Remove. <supports_hardware_single_step>: New field.
3434 (target_supports_conditional_breakpoints): Remove.
3435 (target_supports_hardware_single_step): New macro.
3436 (target_can_do_hardware_single_step): Declare.
3437 * server.c (handle_query): Use target_supports_hardware_single_step
3438 instead of target_supports_conditional_breakpoints.
3439
ade90bde
YQ
34402015-09-15 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3443 function.
3444 (struct linux_target_ops the_low_target): Install
3445 aarch64_linux_siginfo_fixup.
3446
94585166
DB
34472015-09-11 Don Breazeal <donb@codesourcery.com>
3448 Luis Machado <lgustavo@codesourcery.com>
3449
3450 * linux-low.c (linux_mourn): Static declaration.
3451 (linux_arch_setup): Move in front of
3452 handle_extended_wait.
3453 (linux_arch_setup_thread): New function.
3454 (handle_extended_wait): Handle exec events. Call
3455 linux_arch_setup_thread. Make event_lwp argument a
3456 pointer-to-a-pointer.
3457 (check_zombie_leaders): Do not check stopped threads.
3458 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3459 (linux_low_filter_event): Add lwp and thread for exec'ing
3460 non-leader thread if leader thread has been deleted.
3461 Refactor code into linux_arch_setup_thread and call it.
3462 Pass child lwp pointer by reference to handle_extended_wait.
3463 (linux_wait_for_event_filtered): Update comment.
3464 (linux_wait_1): Prevent clobbering exec event status.
3465 (linux_supports_exec_events): New function.
3466 (linux_target_ops) <supports_exec_events>: Initialize new member.
3467 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3468 new member.
3469 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3470 * server.c (report_exec_events): New global variable.
3471 (handle_query): Handle qSupported query for exec-events feature.
3472 (captured_main): Initialize report_exec_events.
3473 * server.h (report_exec_events): Declare new global variable.
3474 * target.h (struct target_ops) <supports_exec_events>: New
3475 member.
3476 (target_supports_exec_events): New macro.
3477 * win32-low.c (win32_target_ops) <supports_exec_events>:
3478 Initialize new member.
3479
0568462b
MM
34802015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3481
3482 * linux-low.c (linux_low_enable_btrace): Remove.
3483 (linux_target_ops): Replace linux_low_enable_btrace with
3484 linux_enable_btrace.
3485
39edd165
YQ
34862015-09-03 Yao Qi <yao.qi@linaro.org>
3487
3488 * linux-aarch64-low.c (aarch64_insert_point): Call
3489 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3490 returns true.
3491
1db33b5a
UW
34922015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3493
3494 * linux-low.c (check_stopped_by_breakpoint): Use
3495 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3496
ab290430
PA
34972015-08-27 Pedro Alves <palves@redhat.com>
3498
3499 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3500
8d749320
SM
35012015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3502
6711b7f8
SM
3503 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3504 the XNEW-family equivalent.
8d749320
SM
3505 (compile_bytecodes): Likewise.
3506 * dll.c (loaded_dll): Likewise.
3507 * event-loop.c (append_callback_event): Likewise.
3508 (create_file_handler): Likewise.
3509 (create_file_event): Likewise.
3510 * hostio.c (handle_open): Likewise.
3511 * inferiors.c (add_thread): Likewise.
3512 (add_process): Likewise.
3513 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3514 * linux-arm-low.c (arm_new_process): Likewise.
3515 (arm_new_thread): Likewise.
3516 * linux-low.c (add_to_pid_list): Likewise.
3517 (linux_add_process): Likewise.
3518 (handle_extended_wait): Likewise.
3519 (add_lwp): Likewise.
3520 (enqueue_one_deferred_signal): Likewise.
3521 (enqueue_pending_signal): Likewise.
3522 (linux_resume_one_lwp_throw): Likewise.
3523 (linux_resume_one_thread): Likewise.
3524 (linux_read_memory): Likewise.
3525 (linux_write_memory): Likewise.
3526 * linux-mips-low.c (mips_linux_new_process): Likewise.
3527 (mips_linux_new_thread): Likewise.
3528 (mips_add_watchpoint): Likewise.
3529 * linux-x86-low.c (initialize_low_arch): Likewise.
3530 * lynx-low.c (lynx_add_process): Likewise.
3531 * mem-break.c (set_raw_breakpoint_at): Likewise.
3532 (set_breakpoint): Likewise.
3533 (add_condition_to_breakpoint): Likewise.
3534 (add_commands_to_breakpoint): Likewise.
3535 (clone_agent_expr): Likewise.
3536 (clone_one_breakpoint): Likewise.
3537 * regcache.c (new_register_cache): Likewise.
3538 * remote-utils.c (look_up_one_symbol): Likewise.
3539 * server.c (queue_stop_reply): Likewise.
3540 (start_inferior): Likewise.
3541 (queue_stop_reply_callback): Likewise.
3542 (handle_target_event): Likewise.
3543 * spu-low.c (fetch_ppc_memory): Likewise.
3544 (store_ppc_memory): Likewise.
3545 * target.c (set_target_ops): Likewise.
3546 * thread-db.c (thread_db_load_search): Likewise.
3547 (try_thread_db_load_1): Likewise.
3548 * tracepoint.c (add_tracepoint): Likewise.
3549 (add_tracepoint_action): Likewise.
3550 (create_trace_state_variable): Likewise.
3551 (cmd_qtdpsrc): Likewise.
3552 (cmd_qtro): Likewise.
3553 (add_while_stepping_state): Likewise.
3554 * win32-low.c (child_add_thread): Likewise.
3555 (get_image_name): Likewise.
3556
ed8b7b42
YQ
35572015-08-25 Yao Qi <yao.qi@linaro.org>
3558
3559 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3560
db3cb7cb
YQ
35612015-08-25 Yao Qi <yao.qi@linaro.org>
3562
3563 * Makefile.in (aarch64-linux.o): New rule.
3564 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3565 srv_tgtobj.
3566 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3567 (aarch64_init_debug_reg_state): Make it extern.
3568 (aarch64_linux_prepare_to_resume): Remove.
3569
f6011a1c
YQ
35702015-08-25 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3573 lwp_arch_private_info and ptid_of_lwp.
3574
88e2cf7e
YQ
35752015-08-25 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3578 Find proc_info by find_process_pid. All callers updated.
3579
5e35436e
YQ
35802015-08-25 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3583 Remove.
3584 (debug_reg_change_callback): Remove.
3585 (aarch64_notify_debug_reg_change): Remove.
3586
4a8a7965
YQ
35872015-08-25 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3590 Call current_lwp_ptid.
3591
32a271ee
YQ
35922015-08-25 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-aarch64-low.c (debug_reg_change_callback): Use
3595 debug_printf.
3596
0d51c8d7
YQ
35972015-08-25 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3600
31a43dd5
YQ
36012015-08-25 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3604
8ee52567
YQ
36052015-08-25 Yao Qi <yao.qi@linaro.org>
3606
3607 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3608 the code.
3609
ff3f0f45
YQ
36102015-08-25 Yao Qi <yao.qi@linaro.org>
3611
3612 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3613 Remove.
3614 (debug_reg_change_callback): Remove argument entry and add argument
3615 lwp. Remove local variable thread. Don't print thread id in the
3616 debugging output. Don't check whether pid of thread equals to pid.
3617 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3618 iterate_over_lwps instead find_inferior.
3619
3d40fbb5
PA
36202015-08-24 Pedro Alves <palves@redhat.com>
3621
3622 * inferiors.c (get_first_process): New function.
3623 * inferiors.h (get_first_process): New declaration.
3624 * remote-utils.c (read_ptid): Default to the first process in the
3625 list, instead of to the current thread's process.
3626
438e1e42
PA
36272015-08-24 Pedro Alves <palves@redhat.com>
3628
3629 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3630 * event-loop.c: Likewise.
3631 * remote-utils.c: Likewise.
3632 * tracepoint.c: Likewise.
3633
a8c6d4fc
PA
36342015-08-24 Pedro Alves <palves@redhat.com>
3635
3636 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3637 ptid_get_lwp.
3638
99b0bb12
PA
36392015-08-21 Pedro Alves <palves@redhat.com>
3640
3641 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3642 instead of literal 1.
3643
f8904751
PA
36442015-08-21 Pedro Alves <palves@redhat.com>
3645
3646 * tdesc.c (default_description): Explicitly zero-initialize.
3647
465a859e
PA
36482015-08-21 Pedro Alves <palves@redhat.com>
3649
3650 PR gdb/18749
3651 * inferiors.c (remove_thread): Discard any pending stop reply for
3652 this thread.
3653 * server.c (remove_all_on_match_pid): Rename to ...
3654 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3655 instead of a pid.
3656 (discard_queued_stop_replies): Change parameter to a ptid. Now
3657 extern.
3658 (handle_v_kill, kill_inferior_callback, captured_main)
3659 (process_serial_event): Adjust.
3660 * server.h (discard_queued_stop_replies): Declare.
3661
f0db101d
PA
36622015-08-21 Pedro Alves <palves@redhat.com>
3663
3664 * linux-low.c (wait_for_sigstop): Always switch to no thread
3665 selected if the previously current thread dies.
3666 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3667 process instead of the current thread's.
3668 * remote-utils.c (input_interrupt): Don't check if there's no
3669 current thread.
3670 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3671 current thread to the general thread fails, error out.
3672 (handle_qxfer_auxv, handle_qxfer_libraries)
3673 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3674 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3675 (handle_query): Check if there's a thread selected instead of
3676 checking whether there's any thread in the thread list.
3677 (handle_qxfer_threads, handle_qxfer_btrace)
3678 (handle_qxfer_btrace_conf): Don't error out early if there's no
3679 thread in the thread list.
3680 (handle_v_cont, myresume): Don't set the current thread to the
3681 continue thread.
3682 (process_serial_event) <Hg handling>: Also set thread_id if the
3683 previous general thread is still alive.
3684 (process_serial_event) <g/G handling>: If setting the current
3685 thread to the general thread fails, error out.
3686 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3687 thread's lwp instead of the current thread's.
3688 * target.c (set_desired_thread): If the desired thread was not
3689 found, leave the current thread pointing to NULL. Return an int
3690 (boolean) indicating success.
3691 * target.h (set_desired_thread): Change return type to int.
3692
40045d91
MF
36932015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3694
3695 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3696 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3697 #includes.
3698 (ps_get_thread_area): New function.
3699
45face3b
GB
37002015-08-19 Gary Benson <gbenson@redhat.com>
3701
3702 * hostio.c (handle_pread): Do not attempt to read more data
3703 than hostio_reply_with_data can fit in a packet.
3704
16d5f642
JB
37052015-08-18 Joel Brobecker <brobecker@adacore.com>
3706
3707 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3708
a738da3a
MF
37092015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3710
3711 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3712
33ebda9d
PA
37132015-08-06 Pedro Alves <palves@redhat.com>
3714
3715 * tracepoint.c (expr_eval_result): Now an int.
3716
a44892be
PA
37172015-08-06 Pedro Alves <palves@redhat.com>
3718
3719 * gdbthread.h (struct regcache): Forward declare.
3720 (struct thread_info) <regcache_data>: Now a struct regcache
3721 pointer.
3722 * inferiors.c (inferior_regcache_data)
3723 (set_inferior_regcache_data): Now work with struct regcache
3724 pointers.
3725 * inferiors.h (struct regcache): Forward declare.
3726 (inferior_regcache_data, set_inferior_regcache_data): Now work
3727 with struct regcache pointers.
3728 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3729 (free_register_cache_thread): Remove struct regcache pointer
3730 casts.
3731
608a1e46
PA
37322015-08-06 Pedro Alves <palves@redhat.com>
3733
3734 * server.c (captured_main): On error, print the exception message
3735 to stderr, and if run_once is set, throw a quit.
3736
f0ce0d3a
PA
37372015-08-06 Pedro Alves <palves@redhat.com>
3738
3739 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3740 the current thread.
3741
bf47e248
PA
37422015-08-06 Pedro Alves <palves@redhat.com>
3743
3744 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3745 reading beyond the passed in buffer length.
3746
b6b9ffcc
PL
37472015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3748
3749 * tracepoint.c (symbol_list) <required>: Remove.
3750
863d01bd
PA
37512015-08-06 Pedro Alves <palves@redhat.com>
3752
3753 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3754 count if stopping and suspending threads.
3755 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3756 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3757 (linux_detach): Complete an ongoing step-over.
3758 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3759 throughout.
3760 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3761 (linux_wait_1): If passing a signal to the inferior after
3762 finishing a step-over, unsuspend and re-resume all lwps. If we
3763 see a single-step event but the thread should be continuing, don't
3764 pass the trap to gdb.
3765 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3766 internal_error instead of gdb_assert.
3767 (enqueue_pending_signal): New function.
3768 (check_ptrace_stopped_lwp_gone): Add debug output.
3769 (start_step_over): Use internal_error instead of gdb_assert.
3770 (complete_ongoing_step_over): New function.
3771 (linux_resume_one_thread): Don't resume a suspended thread.
3772 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3773 it stepping.
3774
00db26fa
PA
37752015-08-06 Pedro Alves <palves@redhat.com>
3776
3777 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3778 (linux_thread_alive): Use lwp_is_marked_dead.
3779 (extended_event_reported): Delete.
3780 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3781 instead of extended_event_reported.
3782 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3783 as well.
3784 (lwp_is_marked_dead): New function.
3785 (lwp_running): Use lwp_is_marked_dead.
3786 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3787 comment.
3788
ad071a30
PA
37892015-08-06 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (linux_wait_1): Move fork event output out of the
3792 !report_to_gdb check. Pass event_child->waitstatus to
3793 target_waitstatus_to_string instead of ourstatus.
3794
524b57e6
YQ
37952015-08-04 Yao Qi <yao.qi@linaro.org>
3796
3797 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3798 if current_thread is 32 bit.
3799
6085d6f6
YQ
38002015-08-04 Yao Qi <yao.qi@linaro.org>
3801
3802 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3803 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3804 * server.c (extended_protocol): Remove "static".
3805 * server.h (extended_protocol): Declare it.
3806
8a7e4587
YQ
38072015-08-04 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3810 both aarch64 and aarch32.
3811 (aarch64_set_pc): Likewise.
3812
3b53ae99
YQ
38132015-08-04 Yao Qi <yao.qi@linaro.org>
3814
3815 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3816 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3817 arm-with-neon.xml to srv_xmlfiles.
3818 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3819 (is_64bit_tdesc): New function.
3820 (aarch64_linux_read_description): New function.
3821 (aarch64_arch_setup): Call aarch64_linux_read_description.
3822 (regs_info): Rename to regs_info_aarch64.
3823 (aarch64_regs_info): Return right regs_info.
3824 (initialize_low_arch): Call initialize_low_arch_aarch32.
3825
bd9e6534
YQ
38262015-08-04 Yao Qi <yao.qi@linaro.org>
3827
3828 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3829 * linux-aarch32-low.c: New file.
3830 * linux-aarch32-low.h: New file.
3831 * linux-arm-low.c (arm_fill_gregset): Move it to
3832 linux-aarch32-low.c.
3833 (arm_store_gregset): Likewise.
3834 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3835 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3836 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3837 (regs_info): Rename to regs_info_arm.
3838 (arm_regs_info): Return regs_info_aarch32 if
3839 have_ptrace_getregset is 1 and target description is
3840 arm_with_neon or arm_with_vfpv3.
3841 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3842 Call initialize_low_arch_aarch32 instead.
3843
ded48a5e
YQ
38442015-08-04 Yao Qi <yao.qi@linaro.org>
3845
3846 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3847 * linux-low.c: ... here.
3848 * linux-low.h (have_ptrace_getregset): Declare it.
3849
96e9210f
PA
38502015-08-04 Pedro Alves <palves@redhat.com>
3851
3852 * thread-db.c (struct thread_db): Use new typedefs.
3853 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3854 CHK calls.
3855 (disable_thread_event_reporting): Cast result of dlsym to
3856 destination function pointer type.
3857 (thread_db_mourn): Use td_ta_delete_ftype.
3858
af60a1ef
SL
38592015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3860
3861 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3862 arch variant.
3863 (CDX_BREAKPOINT): Define for R2.
3864 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3865 (the_low_target): Add comments.
3866
e8b41681
YQ
38672015-07-30 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-arm-low.c (arm_hwcap): Remove it.
3870 (arm_read_description): New local variable arm_hwcap. Don't
3871 set arm_hwcap to zero.
3872
89abb039
YQ
38732015-07-30 Yao Qi <yao.qi@linaro.org>
3874
3875 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3876 Use regcache->tdesc instead.
3877 (arm_store_wmmxregset): Likewise.
3878 (arm_fill_vfpregset): Likewise.
3879 (arm_store_vfpregset): Likewise.
3880
deca266c
YQ
38812015-07-30 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-arm-low.c: Include arch/arm.h.
3884 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3885 (arm_store_gregset): Likewise.
3886
aa58a496
SM
38872015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3890 ptrace's 4th parameter.
3891
50904b25
YQ
38922015-07-27 Yao Qi <yao.qi@linaro.org>
3893
3894 * configure.srv (case aarch64*-*-linux*): Don't set
3895 srv_linux_usrregs.
3896
5826e159
PA
38972015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3898
3899 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3900 sys/ptrace.h.
3901 * linux-arm-low.c: Likewise.
3902 * linux-cris-low.c: Likewise.
3903 * linux-crisv32-low.c: Likewise.
3904 * linux-low.c: Likewise.
3905 * linux-m68k-low.c: Likewise.
3906 * linux-mips-low.c: Likewise.
3907 * linux-nios2-low.c: Likewise.
3908 * linux-s390-low.c: Likewise.
3909 * linux-sparc-low.c: Likewise.
3910 * linux-tic6x-low.c: Likewise.
3911 * linux-tile-low.c: Likewise.
3912 * linux-x86-low.c: Likewise.
3913
54019719
PA
39142015-07-24 Pedro Alves <palves@redhat.com>
3915
3916 * config.in: Regenerate.
3917 * configure: Regenerate.
3918
eb7aa561
PA
39192015-07-24 Pedro Alves <palves@redhat.com>
3920
3921 * acinclude.m4: Include ../ptrace.m4.
3922 * configure.ac: Call GDB_AC_PTRACE.
3923 * config.in, configure: Regenerate.
3924
55d7b841
YQ
39252015-07-24 Yao Qi <yao.qi@linaro.org>
3926
3927 * linux-low.c (linux_create_inferior): Remove setting to
3928 proc->priv->new_inferior.
3929 (linux_attach): Likewise.
3930 (linux_low_filter_event): Likewise.
3931 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3932
c06cbd92
YQ
39332015-07-24 Yao Qi <yao.qi@linaro.org>
3934
3935 * linux-low.c (linux_arch_setup): New function.
3936 (linux_low_filter_event): If proc->tdesc is NULL and
3937 proc->attached is true, call the_low_target.arch_setup.
3938 Otherwise, keep status pending, and return.
3939 (linux_resume_one_lwp_throw): Don't call get_pc if
3940 thread->while_stepping isn't NULL. Don't call
3941 get_thread_regcache if proc->tdesc is NULL.
3942 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3943 (linux_target_ops): Install arch_setup.
3944 * server.c (start_inferior): Call the_target->arch_setup.
3945 * target.h (struct target_ops) <arch_setup>: New field.
3946 (target_arch_setup): New marco.
3947 * lynx-low.c (lynx_target_ops): Update.
3948 * nto-low.c (nto_target_ops): Update.
3949 * spu-low.c (spu_target_ops): Update.
3950 * win32-low.c (win32_target_ops): Update.
3951
5ae3ebba
YQ
39522015-07-24 Yao Qi <yao.qi@linaro.org>
3953
3954 * linux-low.c (linux_add_process): Don't set
3955 proc->priv->new_inferior.
3956 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3957 (linux_attach): Likewise.
3958
eb97750b
YQ
39592015-07-24 Yao Qi <yao.qi@linaro.org>
3960
3961 * server.c (start_inferior): Code refactor.
3962
51aee833
YQ
39632015-07-24 Yao Qi <yao.qi@linaro.org>
3964
3965 * server.c (process_serial_event): Set general_thread.
3966
af1b22f3
YQ
39672015-07-21 Yao Qi <yao.qi@linaro.org>
3968
3969 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3970 aarch64_linux_get_debug_reg_capacity.
3971
554717a3
YQ
39722015-07-17 Yao Qi <yao.qi@linaro.org>
3973
3974 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3975 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3976 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3977 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3978 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3979 (AARCH64_HWP_ALIGNMENT): Likewise.
3980 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3981 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3982 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3983 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3984 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3985 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3986 (struct aarch64_debug_reg_state): Likewise.
3987 (struct arch_lwp_info): Likewise.
3988 (aarch64_align_watchpoint): Likewise.
3989 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3990 (aarch64_watchpoint_length): Likewise.
3991 (aarch64_point_encode_ctrl_reg): Likewise
3992 (aarch64_point_is_aligned): Likewise.
3993 (aarch64_align_watchpoint): Likewise.
3994 (aarch64_linux_set_debug_regs):
3995 (aarch64_dr_state_insert_one_point): Likewise.
3996 (aarch64_dr_state_remove_one_point): Likewise.
3997 (aarch64_handle_breakpoint): Likewise.
3998 (aarch64_handle_aligned_watchpoint): Likewise.
3999 (aarch64_handle_unaligned_watchpoint): Likewise.
4000 (aarch64_handle_watchpoint): Likewise.
4001
c67ca4de
YQ
40022015-07-17 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4005 and don't aarch64_get_debug_reg_state. All callers update.
4006 (aarch64_handle_aligned_watchpoint): Likewise.
4007 (aarch64_handle_unaligned_watchpoint): Likewise.
4008 (aarch64_handle_watchpoint): Likewise.
4009 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4010 (aarch64_remove_point): Likewise.
4011
25abf979
YQ
40122015-07-17 Yao Qi <yao.qi@linaro.org>
4013
4014 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4015 debug_printf.
4016 (aarch64_handle_unaligned_watchpoint): Likewise.
4017
db1ff28b
JK
40182015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4019
4020 Revert the previous 3 commits:
4021 Move gdb_regex* to common/
4022 Move linux_find_memory_regions_full & co.
4023 gdbserver build-id attribute generator
4024
700ca40f
JK
40252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4026 Jan Kratochvil <jan.kratochvil@redhat.com>
4027
4028 gdbserver build-id attribute generator.
4029 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4030 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4031 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4032 (find_phdr): New.
4033 (get_dynamic): Use find_pdhr to traverse program headers.
4034 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4035 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4036 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4037 (get_hex_build_id): New.
4038 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4039 to reply XML document.
4040
9904185c
JK
40412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4042 Jan Kratochvil <jan.kratochvil@redhat.com>
4043
4044 * target.c: Include target/target-utils.h and fcntl.h.
4045 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4046 (target_fileio_read_stralloc): New functions.
4047
6e5b4429
JK
40482015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4049
4050 * Makefile.in (OBS): Add gdb_regex.o.
4051 (gdb_regex.o): New.
4052 * config.in: Rebuilt.
4053 * configure: Rebuilt.
4054
ddc98fbf
JK
40552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4056 Jan Kratochvil <jan.kratochvil@redhat.com>
4057
4058 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4059 * Makefile.in (OBS): Add target-utils.o.
4060 (linux-maps.o, target-utils.o): New.
4061 * configure.srv (srv_linux_obj): Add linux-maps.o.
4062
e57bb7a0
PL
40632015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4064
4065 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4066 function, return 1.
4067 (the_low_target): Install it.
4068
586b02a9
PA
40692015-07-14 Pedro Alves <palves@redhat.com>
4070
4071 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4072 Instead, ignore ECHILD, and throw an error for other errnos.
4073
58c1b36c
PA
40742015-07-10 Pedro Alves <palves@redhat.com>
4075
4076 * event-loop.c (struct callback_event) <data>: Change type to
4077 gdb_client_data instance instead of gdb_client_data pointer.
4078 (append_callback_event): Adjust.
4079
421530db
PL
40802015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4081
4082 * linux-aarch64-low.c: Add comments for each linux_target_ops
4083 method. Remove comments already covered in target_ops and
4084 linux_target_ops definitions.
4085 (the_low_target): Add comments for each unimplemented method.
4086
c2d65f38
YQ
40872015-07-09 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-aarch64-low.c (aarch64_regmap): Remove.
4090 (aarch64_usrregs_info): Remove.
4091 (regs_info): Set field usrregs to NULL.
4092
b20a6524
MM
40932015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4094
4095 * linux-low.c: Include "rsp-low.h"
4096 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4097 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4098 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4099 (handle_btrace_enable_pt): New.
4100 (handle_btrace_general_set): Support "pt".
4101 (handle_btrace_conf_general_set): Support "pt:size".
4102
96c97461
PL
41032015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4104
4105 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4106 Z_PACKET_SW_BP.
4107
37d66942
PL
41082015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4109
4110 * linux-aarch64-low.c: Remove comment about endianness.
4111 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4112 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4113 memcmp.
4114
dc06243f
GB
41152015-06-24 Gary Benson <gbenson@redhat.com>
4116
4117 * linux-i386-ipa.c (stdint.h): Do not include.
4118 * lynx-i386-low.c (stdint.h): Likewise.
4119 * lynx-ppc-low.c (stdint.h): Likewise.
4120 * mem-break.c (stdint.h): Likewise.
4121 * thread-db.c (stdint.h): Likewise.
4122 * tracepoint.c (stdint.h): Likewise.
4123 * win32-low.c (stdint.h): Likewise.
4124
124e13d9
SM
41252015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4126
4127 * server.c (write_qxfer_response): Update call to
4128 remote_escape_output.
4129
909c2cda
JK
41302015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4131 Jan Kratochvil <jan.kratochvil@redhat.com>
4132
4133 Merge multiple hex conversions.
4134 * gdbreplay.c (tohex): Rename to 'fromhex'.
4135 (logchar): Use fromhex.
4136
24c05f46
JK
41372015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4138
4139 * server.c (handle_qxfer_libraries): Set `version' attribute for
4140 <library-list>.
4141
14d2069a
GB
41422015-06-10 Gary Benson <gbenson@redhat.com>
4143
4144 * target.h (struct target_ops) <multifs_open>: New field.
4145 <multifs_unlink>: Likewise.
4146 <multifs_readlink>: Likewise.
4147 * linux-low.c (nat/linux-namespaces.h): New include.
4148 (linux_target_ops): Initialize the_target->multifs_open,
4149 the_target->multifs_unlink and the_target->multifs_readlink.
4150 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4151 * hostio.c (hostio_fs_pid): New static variable.
4152 (hostio_handle_new_gdb_connection): New function.
4153 (handle_setfs): Likewise.
4154 (handle_open): Use the_target->multifs_open as appropriate.
4155 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4156 (handle_readlink): Use the_target->multifs_readlink as
4157 appropriate.
4158 (handle_vFile): Handle vFile:setfs packets.
4159 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4160 after target_handle_new_gdb_connection.
4161
4b8b5e72
GB
41622015-06-10 Gary Benson <gbenson@redhat.com>
4163
4164 * configure.ac (AC_CHECK_FUNCS): Add setns.
4165 * config.in: Regenerate.
4166 * configure: Likewise.
4167 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4168 (linux-namespaces.o): New rule.
4169 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4170
3ac2e371
GB
41712015-06-09 Gary Benson <gbenson@redhat.com>
4172
4173 * hostio.c (handle_open): Process mode argument with
4174 fileio_to_host_mode.
4175
ca9b78ce
YQ
41762015-06-01 Yao Qi <yao.qi@linaro.org>
4177
4178 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4179 * linux-x86-low.c: Likewise.
4180
bfacd19d
DB
41812015-05-28 Don Breazeal <donb@codesourcery.com>
4182
4183 * linux-low.c (handle_extended_wait): Initialize
4184 thread_info.last_resume_kind for new fork children.
4185
452003ef
PA
41862015-05-15 Pedro Alves <palves@redhat.com>
4187
4188 * target.h (target_handle_new_gdb_connection): Rewrite using if
4189 wrapped in do/while.
4190
1041a03c
JB
41912015-05-14 Joel Brobecker <brobecker@adacore.com>
4192
4193 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4194 * configure, config.in: Regenerate.
4195 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4196 Declare typedef.
4197
c269dbdb
DB
41982015-05-12 Don Breazeal <donb@codesourcery.com>
4199
4200 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4201 PTRACE_EVENT_VFORK_DONE.
4202 (linux_low_ptrace_options, extended_event_reported): Add vfork
4203 events.
4204 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4205 and "vforkdone" for RSP 'T' Stop Reply Packet.
4206 * server.h (report_vfork_events): Declare
4207 global variable.
4208
3a8a0396
DB
42092015-05-12 Don Breazeal <donb@codesourcery.com>
4210
4211 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4212 (the_low_target) <new_fork>: Initialize new member.
4213 * linux-arm-low.c (arm_new_fork): New function.
4214 (the_low_target) <new_fork>: Initialize new member.
4215 * linux-low.c (handle_extended_wait): Call new target function
4216 new_fork.
4217 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4218 * linux-mips-low.c (mips_add_watchpoint): New function
4219 extracted from mips_insert_point.
4220 (the_low_target) <new_fork>: Initialize new member.
4221 (mips_linux_new_fork): New function.
4222 (mips_insert_point): Call mips_add_watchpoint.
4223 * linux-x86-low.c (x86_linux_new_fork): New function.
4224 (the_low_target) <new_fork>: Initialize new member.
4225
de0d863e
DB
42262015-05-12 Don Breazeal <donb@codesourcery.com>
4227
4228 * linux-low.c (handle_extended_wait): Implement return value,
4229 rename argument 'event_child' to 'event_lwp', handle
4230 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4231 (linux_low_ptrace_options): New function.
4232 (linux_low_filter_event): Call linux_low_ptrace_options,
4233 use different argument fo linux_enable_event_reporting,
4234 use return value from handle_extended_wait.
4235 (extended_event_reported): New function.
4236 (linux_wait_1): Call extended_event_reported and set
4237 status to report fork events.
4238 (linux_write_memory): Add pid to debug message.
4239 (reset_lwp_ptrace_options_callback): New function.
4240 (linux_handle_new_gdb_connection): New function.
4241 (linux_target_ops): Initialize new structure member.
4242 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4243 * lynx-low.c: Initialize new structure member.
4244 * remote-utils.c (prepare_resume_reply): Implement stop reason
4245 "fork" for "T" stop message.
4246 * server.c (handle_query): Call handle_new_gdb_connection.
4247 * server.h (report_fork_events): Declare global flag.
4248 * target.h (struct target_ops) <handle_new_gdb_connection>:
4249 New member.
4250 (target_handle_new_gdb_connection): New macro.
4251 * win32-low.c: Initialize new structure member.
4252
ddcbc397
DB
42532015-05-12 Don Breazeal <donb@codesourcery.com>
4254
4255 * mem-break.c (APPEND_TO_LIST): Define macro.
4256 (clone_agent_expr): New function.
4257 (clone_one_breakpoint): New function.
4258 (clone_all_breakpoints): New function.
4259 * mem-break.h: Declare new functions.
4260
89245bc0
DB
42612015-05-12 Don Breazeal <donb@codesourcery.com>
4262
4263 * linux-low.c (linux_supports_fork_events): New function.
4264 (linux_supports_vfork_events): New function.
4265 (linux_target_ops): Initialize new structure members.
4266 (initialize_low): Call linux_check_ptrace_features.
4267 * lynx-low.c (lynx_target_ops): Initialize new structure
4268 members.
4269 * server.c (report_fork_events, report_vfork_events):
4270 New global flags.
4271 (handle_query): Add new features to qSupported packet and
4272 response.
4273 (captured_main): Initialize new global variables.
4274 * target.h (struct target_ops) <supports_fork_events>:
4275 New member.
4276 <supports_vfork_events>: New member.
4277 (target_supports_fork_events): New macro.
4278 (target_supports_vfork_events): New macro.
4279 * win32-low.c (win32_target_ops): Initialize new structure
4280 members.
4281
835205d0
GB
42822015-05-12 Gary Benson <gbenson@redhat.com>
4283
4284 * server.c (handle_qxfer_exec_file): Use current process
4285 if annex is empty.
4286
21e94bd9
SL
42872015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4288
4289 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4290 Remove HAVE_PTRACE_GETREGS conditionals.
4291 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4292 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4293
45614f15
YQ
42942015-05-08 Yao Qi <yao.qi@linaro.org>
4295
4296 * linux-low.c (linux_supports_conditional_breakpoints): New
4297 function.
4298 (linux_target_ops): Install new target method.
4299 * lynx-low.c (lynx_target_ops): Install NULL hook for
4300 supports_conditional_breakpoints.
4301 * nto-low.c (nto_target_ops): Likewise.
4302 * spu-low.c (spu_target_ops): Likewise.
4303 * win32-low.c (win32_target_ops): Likewise.
4304 * server.c (handle_query): Check
4305 target_supports_conditional_breakpoints.
4306 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4307 New field.
4308 (target_supports_conditional_breakpoints): New macro.
4309
80ad801e
PA
43102015-05-06 Pedro Alves <palves@redhat.com>
4311
4312 PR server/18081
4313 * server.c (start_inferior): If the process exits, mourn it.
4314
819843c7
GB
43152015-04-21 Gary Benson <gbenson@redhat.com>
4316
4317 * hostio.c (fileio_open_flags_to_host): Factored out to
4318 fileio_to_host_openflags in common/fileio.c. Single use
4319 updated.
4320
a2d5a9d7
MF
43212015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4322
4323 * linux-xtensa-low.c (xtensa_fill_gregset)
4324 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4325 XCHAL_HAVE_LOOP.
4326
deb44829
MF
43272015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4328
4329 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4330 (regs_info): Replace usrregs pointer with NULL.
4331
e57f1de3
GB
43322015-04-17 Gary Benson <gbenson@redhat.com>
4333
4334 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4335 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4336 * server.c (handle_qxfer_exec_file): New function.
4337 (qxfer_packets): Add exec-file entry.
4338 (handle_query): Report qXfer:exec-file:read as supported packet.
4339
62828379
RN
43402015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4341
4342 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4343
b88bb450
GB
43442015-04-09 Gary Benson <gbenson@redhat.com>
4345
4346 * hostio-errno.c (errno_to_fileio_error): Remove function.
4347 Update caller to use remote_fileio_to_fio_error.
4348
c8f4bfdd
YQ
43492015-04-09 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-low.c (linux_insert_point): Call
4352 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4353 (linux_remove_point): Call remove_memory_breakpoint if type is
4354 raw_bkpt_type_sw.
4355 * linux-x86-low.c (x86_insert_point): Don't call
4356 insert_memory_breakpoint.
4357 (x86_remove_point): Don't call remove_memory_breakpoint.
4358
41f98f02
PA
43592015-04-01 Pedro Alves <palves@redhat.com>
4360 Cleber Rosa <crosa@redhat.com>
4361
4362 * server.c (gdbserver_usage): Reorganize and extend the usage
4363 message.
4364
2bf6fb9d
PA
43652015-03-24 Pedro Alves <palves@redhat.com>
4366
4367 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4368 output. Also dump TRAP_TRACE.
4369 (linux_low_filter_event): In debug output, distinguish a
4370 resume_stop SIGSTOP from a delayed SIGSTOP.
4371
369f6daa
GB
43722015-03-24 Gary Benson <gbenson@redhat.com>
4373
4374 * linux-x86-low.c (x86_linux_new_thread): Moved to
4375 nat/x86-linux.c.
4376 (x86_linux_prepare_to_resume): Likewise.
4377
8e5d4070
GB
43782015-03-24 Gary Benson <gbenson@redhat.com>
4379
4380 * Makefile.in (x86-linux-dregs.o): New rule.
4381 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4382 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4383 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4384 (x86_linux_dr_get): Likewise.
4385 (x86_linux_dr_set): Likewise.
4386 (update_debug_registers_callback): Likewise.
4387 (x86_linux_dr_set_addr): Likewise.
4388 (x86_linux_dr_get_addr): Likewise.
4389 (x86_linux_dr_set_control): Likewise.
4390 (x86_linux_dr_get_control): Likewise.
4391 (x86_linux_dr_get_status): Likewise.
4392 (x86_linux_update_debug_registers): Likewise.
4393
2b95d440
GB
43942015-03-24 Gary Benson <gbenson@redhat.com>
4395
4396 * linux-x86-low.c (x86_linux_update_debug_registers):
4397 New function, factored out from...
4398 (x86_linux_prepare_to_resume): ...this.
4399
14b0bc68
GB
44002015-03-24 Gary Benson <gbenson@redhat.com>
4401
4402 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4403 (x86_linux_dr_set): Likewise.
4404 (update_debug_registers_callback): Likewise.
4405 (x86_linux_dr_set_addr): Likewise.
4406 (x86_linux_dr_get_addr): Likewise.
4407 (x86_linux_dr_set_control): Likewise.
4408 (x86_linux_dr_get_control): Likewise.
4409 (x86_linux_dr_get_status): Likewise.
4410 (x86_linux_prepare_to_resume): Likewise.
4411
5dfe6ca8
GB
44122015-03-24 Gary Benson <gbenson@redhat.com>
4413
4414 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4415 Use perror_with_name. Pass string through gettext.
4416 (x86_linux_dr_set): Likewise.
4417
d33472ad
GB
44182015-03-24 Gary Benson <gbenson@redhat.com>
4419
4420 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4421 (x86_linux_dr_set_addr): ...this.
4422 (x86_dr_low_get_addr): Rename to...
4423 (x86_linux_dr_get_addr): ...this.
4424 (x86_dr_low_set_control): Rename to...
4425 (x86_linux_dr_set_control): ...this.
4426 (x86_dr_low_get_control): Rename to...
4427 (x86_linux_dr_get_control): ...this.
4428 (x86_dr_low_get_status): Rename to...
4429 (x86_linux_dr_get_status): ...this.
4430 (x86_dr_low): Update with new function names.
4431
4b134ca1
GB
44322015-03-24 Gary Benson <gbenson@redhat.com>
4433
4434 * Makefile.in (x86-linux.o): New rule.
4435 * configure.srv: Add x86-linux.o to relevant targets.
4436 * linux-low.c (lwp_set_arch_private_info): New function.
4437 (lwp_arch_private_info): Likewise.
4438 * linux-x86-low.c: Include nat/x86-linux.h.
4439 (arch_lwp_info): Removed structure.
4440 (update_debug_registers_callback):
4441 Use lwp_set_debug_registers_changed.
4442 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4443 and lwp_set_debug_registers_changed.
4444 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4445
34c703da
GB
44462015-03-24 Gary Benson <gbenson@redhat.com>
4447
4448 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4449 * linux-arm-low.c (arm_new_thread): Likewise.
4450 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4451 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4452 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4453 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4454
cff068da
GB
44552015-03-24 Gary Benson <gbenson@redhat.com>
4456
4457 * linux-low.c (ptid_of_lwp): New function.
4458 (lwp_is_stopped): Likewise.
4459 (lwp_stop_reason): Likewise.
4460 * linux-x86-low.c (update_debug_registers_callback):
4461 Use lwp_is_stopped.
4462 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4463 lwp_stop_reason.
4464
b2f7c7e8
GB
44652015-03-24 Gary Benson <gbenson@redhat.com>
4466
4467 * linux-low.h (linux_stop_lwp): Remove declaration.
4468
6d4ee8c6
GB
44692015-03-24 Gary Benson <gbenson@redhat.com>
4470
4471 * linux-low.h: Include nat/linux-nat.h.
4472 * linux-low.c (iterate_over_lwps_args): New structure.
4473 (iterate_over_lwps_filter): New function.
4474 (iterate_over_lwps): Likewise.
4475 * linux-x86-low.c (update_debug_registers_callback):
4476 Update signature to what iterate_over_lwps expects.
4477 Remove PID check that iterate_over_lwps now performs.
4478 (x86_dr_low_set_addr): Use iterate_over_lwps.
4479 (x86_dr_low_set_control): Likewise.
4480
70a0bb6b
GB
44812015-03-24 Gary Benson <gbenson@redhat.com>
4482
4483 * linux-x86-low.c (x86_debug_reg_state): New function.
4484 (x86_linux_prepare_to_resume): Use the above.
4485
7b669087
GB
44862015-03-24 Gary Benson <gbenson@redhat.com>
4487
4488 * linux-low.c (current_lwp_ptid): New function.
4489 * linux-x86-low.c: Include nat/linux-nat.h.
4490 (x86_dr_low_get_addr): Use current_lwp_ptid.
4491 (x86_dr_low_get_control): Likewise.
4492 (x86_dr_low_get_status): Likewise.
4493
eef49a3d
PA
44942015-03-20 Pedro Alves <palves@redhat.com>
4495
4496 * tracepoint.c (cmd_qtstatus): Make "str" const.
4497
b2333d22
PA
44982015-03-20 Pedro Alves <palves@redhat.com>
4499
4500 * server.c (handle_general_set): Make "req_str" const.
4501
23f238d3
PA
45022015-03-19 Pedro Alves <palves@redhat.com>
4503
4504 * linux-low.c (linux_resume_one_lwp): Rename to ...
4505 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4506 instead call perror_with_name.
4507 (check_ptrace_stopped_lwp_gone): New function.
4508 (linux_resume_one_lwp): Reimplement as wrapper around
4509 linux_resume_one_lwp_throw that swallows errors if the LWP is
4510 gone.
4511
91baf43f
PA
45122015-03-19 Pedro Alves <palves@redhat.com>
4513
4514 * linux-low.c (count_events_callback, select_event_lwp_callback):
4515 No longer check whether the thread has resume_stop as last resume
4516 kind.
4517
8bf3b159
PA
45182015-03-19 Pedro Alves <palves@redhat.com>
4519
4520 * linux-low.c (count_events_callback, select_event_lwp_callback):
4521 Use the lwp's status_pending_p field, not the thread's.
4522
b90fc188
PA
45232015-03-19 Pedro Alves <palves@redhat.com>
4524
4525 * linux-low.c (select_event_lwp_callback): Update comments to
4526 no longer mention SIGTRAP.
4527
464b0089
GB
45282015-03-18 Gary Benson <gbenson@redhat.com>
4529
4530 * server.c (handle_query): Do not report vFile:fstat as supported.
4531
aa9e327f
GB
45322015-03-11 Gary Benson <gbenson@redhat.com>
4533
4534 * hostio.c (sys/types.h): New include.
4535 (sys/stat.h): Likewise.
4536 (common-remote-fileio.h): Likewise.
4537 (handle_fstat): New function.
4538 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4539
791c0056
GB
45402015-03-11 Gary Benson <gbenson@redhat.com>
4541
4542 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4543 struct stat.st_blocks and struct stat.st_blksize.
4544 * configure: Regenerate.
4545 * config.in: Likewise.
4546 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4547 (OBS): Add common-remote-fileio.o.
4548 (common-remote-fileio.o): New rule.
4549
9a9df970
PA
45502015-03-09 Pedro Alves <palves@redhat.com>
4551
4552 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4553 'struct sockaddr' pointer in 'accept' call.
4554
9eb1356e
PA
45552015-03-09 Pedro Alves <palves@redhat.com>
4556
4557 Revert:
4558 2015-03-07 Pedro Alves <palves@redhat.com>
4559 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4560 or <winsock2.h> here. Instead include "gdb_socket.h".
4561 (remote_open): Use union gdb_sockaddr_u.
4562 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4563 or <winsock2.h> here. Instead include "gdb_socket.h".
4564 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4565 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4566 or <sys/un.h>.
4567 (init_named_socket, gdb_agent_helper_thread): Use union
4568 gdb_sockaddr_u.
4569
aac331e4
PA
45702015-03-07 Pedro Alves <palves@redhat.com>
4571
4572 * configure.ac (build_warnings): Move
4573 -Wdeclaration-after-statement to the C-specific set.
4574 * configure: Regenerate.
4575
366c75fc
PA
45762015-03-07 Pedro Alves <palves@redhat.com>
4577
4578 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4579 or <winsock2.h> here. Instead include "gdb_socket.h".
4580 (remote_open): Use union gdb_sockaddr_u.
4581 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4582 or <winsock2.h> here. Instead include "gdb_socket.h".
4583 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4584 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4585 or <sys/un.h>.
4586 (init_named_socket, gdb_agent_helper_thread): Use union
4587 gdb_sockaddr_u.
4588
492d29ea
PA
45892015-03-07 Pedro Alves <palves@redhat.com>
4590
4591 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4592 instead.
4593
60a191ed
YQ
45942015-03-06 Yao Qi <yao.qi@linaro.org>
4595
4596 * linux-aarch64-low.c (aarch64_insert_point): Use
4597 show_debug_regs as a boolean.
4598 (aarch64_remove_point): Likewise.
4599
f5771b1d
PA
46002015-03-05 Pedro Alves <palves@redhat.com>
4601
4602 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4603 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4604 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4605 * nto-low.c (nto_target_ops): Likewise.
4606 * spu-low.c (spu_target_ops): Likewise.
4607 * win32-low.c (win32_target_ops): Likewise.
4608
3e572f71
PA
46092015-03-04 Pedro Alves <palves@redhat.com>
4610
72f4393d 4611 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4612 Decide whether a breakpoint triggered based on the SIGTRAP's
4613 siginfo.si_code.
72f4393d
L
4614 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4615 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4616 (linux_low_filter_event): Check for breakpoints before checking
4617 watchpoints.
4618 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4619 siginfo.si_code.
72f4393d
L
4620 (linux_stopped_by_sw_breakpoint)
4621 (linux_supports_stopped_by_sw_breakpoint)
4622 (linux_stopped_by_hw_breakpoint)
4623 (linux_supports_stopped_by_hw_breakpoint): New functions.
4624 (linux_target_ops): Install new target methods.
3e572f71 4625
1ec68e26
PA
46262015-03-04 Pedro Alves <palves@redhat.com>
4627
4628 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4629 * server.c (swbreak_feature, hwbreak_feature): New globals.
4630 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4631 (captured_main): Clear swbreak_feature and hwbreak_feature.
4632 * server.h (swbreak_feature, hwbreak_feature): Declare.
4633 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4634 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4635 supports_stopped_by_hw_breakpoint>: New fields.
4636 (target_supports_stopped_by_sw_breakpoint)
4637 (target_stopped_by_sw_breakpoint)
4638 (target_supports_stopped_by_hw_breakpoint)
4639 (target_stopped_by_hw_breakpoint): Declare.
4640
15c66dd6
PA
46412015-03-04 Pedro Alves <palves@redhat.com>
4642
4643 enum lwp_stop_reason -> enum target_stop_reason
4644 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4645 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4646 (linux_wait_1, stuck_in_jump_pad_callback)
4647 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4648 (linux_stopped_by_watchpoint):
4649 * linux-low.h (enum lwp_stop_reason): Delete.
4650 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4651 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4652
98fc70d6
YQ
46532015-03-04 Yao Qi <yao.qi@linaro.org>
4654
4655 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4656
dd2ac174
GB
46572015-03-03 Gary Benson <gbenson@redhat.com>
4658
4659 * hostio.c (handle_vFile): Fix prefix lengths.
4660
d68e53f4
MM
46612015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4662
4663 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4664 ptr_bits.
4665
bf2d68ab
AA
46662015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4667
4668 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4669 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4670 (clean): Add "rm -f" for above C files.
4671 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4672 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4673 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4674 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4675 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4676 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4677 (init_registers_s390x_vx_linux64)
4678 (init_registers_s390x_tevx_linux64)
4679 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4680 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4681 declarations.
4682 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4683 (s390_store_vxrs_high): New functions.
4684 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4685 NT_S390_VXRS_HIGH.
4686 (s390_arch_setup): Add logic for selecting one of the new target
4687 descriptions. Activate the new vector regsets if applicable.
4688 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4689 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4690 and init_registers_s390x_tevx_linux64.
4691
c966a859
PA
46922015-03-01 Pedro Alves <palves@redhat.com>
4693
4694 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4695 parameter.
4696
4180215b
PA
46972015-02-27 Pedro Alves <palves@redhat.com>
4698
4699 * linux-x86-low.c (u_debugreg_offset): New function.
4700 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4701
749bab01
PA
47022015-02-27 Pedro Alves <palves@redhat.com>
4703
4704 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4705 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4706 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4707 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4708 (ps_lsetfpregs, ps_getpid)
4709 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4710 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4711 (ps_lsetxregs, ps_plog): Declare.
4712
3c14e5a3
PA
47132015-02-27 Pedro Alves <palves@redhat.com>
4714
4715 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4716 IP_AGENT_EXPORT_FUNC.
4717 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4718 IP_AGENT_EXPORT_FUNC.
4719 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4720 (IP_AGENT_EXPORT): Delete.
4721 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4722 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4723 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4724 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4725 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4726 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4727 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4728 (traceframe_read_count, traceframe_write_count)
4729 (traceframes_created, trace_state_variables, get_raw_reg)
4730 (get_trace_state_variable_value, set_trace_state_variable_value)
4731 (ust_loaded, helper_thread_id, cmd_buf): Use
4732 IPA_SYM_EXPORTED_NAME.
4733 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4734 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4735 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4736 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4737 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4738 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4739 EXTERN_C_PUSH/EXTERN_C_POP.
4740 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4741 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4742 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4743 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4744 (traceframe_write_count, traceframe_read_count)
4745 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4746 (about_to_request_buffer_space, get_trace_state_variable_value)
4747 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4748 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4749 EXTERN_C_PUSH/EXTERN_C_POP.
4750 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4751 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4752 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4753 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4754 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4755 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4756 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4757 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4758 Define.
4759 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4760 (IP_AGENT_EXPORT_VAR_DECL): Define.
4761 (tracing): Declare.
4762 (gdb_agent_get_raw_reg): Declare.
4763
fe978cb0
PA
47642015-02-27 Tom Tromey <tromey@redhat.com>
4765 Pedro Alves <palves@redhat.com>
4766
4767 Rename symbols whose names are reserved C++ keywords throughout.
4768
3bc3d82a
PA
47692015-02-27 Pedro Alves <palves@redhat.com>
4770
4771 * Makefile.in (COMPILER): New, get it from autoconf.
4772 (CXX): Get from autoconf instead.
4773 (COMPILE.pre): Use COMPILER.
4774 (CC-LD): Rename to ...
4775 (CC_LD): ... this. Use COMPILER.
4776 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4777 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4778 * acinclude.m4: Include build-with-cxx.m4.
4779 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4780 Disable -Werror by default if building in C++ mode.
4781 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4782 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4783 the C++ compiler. Save/restore CXXFLAGS too.
4784 * configure: Regenerate.
4785
07697489
PA
47862015-02-27 Pedro Alves <palves@redhat.com>
4787
4788 * acinclude.m4: Include libiberty.m4.
4789 * configure.ac: Call libiberty_INIT.
4790 * config.in, configure: Regenerate.
4791
9beb7c4e
PA
47922015-02-26 Pedro Alves <palves@redhat.com>
4793
4794 * linux-low.c (linux_wait_1): When incrementing the PC past a
4795 program breakpoint always use the_low_target.breakpoint_len as
4796 increment, rather than the maximum between that and
4797 the_low_target.decr_pc_after_break.
4798
8090aef2
PA
47992015-02-23 Pedro Alves <palves@redhat.com>
4800
4801 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4802 thread was doing a step-over; always adjust the PC if
4803 we stepped over a permanent breakpoint.
4804 (linux_wait_1): If we stepped over breakpoint that was on top of a
4805 permanent breakpoint, manually advance the PC past it.
4806
bc9540e8
PA
48072015-02-23 Pedro Alves <palves@redhat.com>
4808
4809 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4810 modes.
4811 (x86_fill_gregset, x86_store_gregset): Use it when handling
4812 $orig_eax.
4813
2db9a427
PA
48142015-02-20 Pedro Alves <palves@redhat.com>
4815
4816 * thread-db.c: Include "nat/linux-procfs.h".
4817 (thread_db_init): Skip listing new threads if the kernel supports
4818 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4819
afa8d396
PA
48202015-02-20 Pedro Alves <palves@redhat.com>
4821
4822 * linux-low.c (status_pending_p_callback): Use ptid_match.
4823
c9587f88
AT
48242015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4825
4826 PR breakpoints/16812
4827 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4828 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4829 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4830
b05ec7a5
AT
48312015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4832
4833 PR breakpoints/15956
4834 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4835
d33501a5
MM
48362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4837
4838 * linux-low.c (linux_low_btrace_conf): Print size.
4839 * server.c (handle_btrace_conf_general_set): New.
4840 (hanle_general_set): Call handle_btrace_conf_general_set.
4841 (handle_query): Report Qbtrace-conf:bts:size as supported.
4842
f4abbc16
MM
48432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4844
4845 * linux-low.c (linux_low_enable_btrace): Update parameters.
4846 (linux_low_btrace_conf): New.
4847 (linux_target_ops)<to_btrace_conf>: Initialize.
4848 * server.c (current_btrace_conf): New.
4849 (handle_btrace_enable): Rename to ...
4850 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4851 to target_enable_btrace. Update comment. Update users.
4852 (handle_qxfer_btrace_conf): New.
4853 (qxfer_packets): Add btrace-conf entry.
4854 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4855 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4856 (target_ops)<read_btrace_conf>: New.
4857 (target_enable_btrace): Update parameters.
4858 (target_read_btrace_conf): New.
4859
043c3577
MM
48602015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4861
4862 * server.c (handle_btrace_general_set): Remove call to
4863 target_supports_btrace.
4864 (supported_btrace_packets): New.
4865 (handle_query): Call supported_btrace_packets.
4866 * target.h: include btrace-common.h.
4867 (btrace_target_info): Removed.
4868 (supports_btrace, target_supports_btrace): Update parameters.
4869
734b0e4b
MM
48702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4871
4872 * Makefile.in (SFILES): Add common/btrace-common.c.
4873 (OBS): Add common/btrace-common.o.
4874 (btrace-common.o): Add build rules.
4875 * linux-low: Include btrace-common.h.
4876 (linux_low_read_btrace): Use struct btrace_data. Call
4877 btrace_data_init and btrace_data_fini.
4878
d6c146e9
PA
48792015-02-06 Pedro Alves <palves@redhat.com>
4880
4881 * thread-db.c (find_new_threads_callback): Add debug output.
4882
20ba1ce6
PA
48832015-02-04 Pedro Alves <palves@redhat.com>
4884
4885 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4886 (resume_stopped_resumed_lwps): New function.
4887 (linux_wait_for_event_filtered): Use it.
4888
8cc73a39
SDJ
48892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4890
4891 * Makefile.in (SFILES): Add linux-personality.c.
4892 (linux-personality.o): New rule.
4893 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4894 list of objects to be built.
4895 * linux-low.c: Include nat/linux-personality.h.
4896 (linux_create_inferior): Remove code to disable address space
4897 randomization (moved to ../nat/linux-personality.c). Create
4898 cleanup to disable address space randomization.
4899
fb23d554
SDJ
49002015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4901
4902 * Makefile.in (posix-strerror.o): New rule.
4903 (mingw-strerror.o): Likewise.
4904 * configure: Regenerated.
4905 * configure.ac: Source file ../common/common.host. Initialize new
4906 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4907
cdf43629
YQ
49082015-01-14 Yao Qi <yao@codesourcery.com>
4909
4910 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4911 (ppc-linux.o): New rule.
4912 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4913 * configure.ac: AC_CHECK_FUNCS(getauxval).
4914 * config.in: Re-generated.
4915 * configure: Re-generated.
4916 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4917 ppc64_64bit_inferior_p
4918
514c5338
YQ
49192015-01-14 Yao Qi <yao@codesourcery.com>
4920
4921 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4922 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4923 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4924 (PT_ORIG_R3, PT_TRAP): Likewise.
4925 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4926 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4927 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4928
3368c1e5
JB
49292015-01-10 Joel Brobecker <brobecker@adacore.com>
4930
4931 * i387-fp.c (i387_cache_to_xsave): In look over
4932 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4933 zmmh_low_space field by use of zmmh_high_space.
4934
582511be
PA
49352015-01-09 Pedro Alves <palves@redhat.com>
4936
4937 * linux-low.c (step_over_bkpt): Move higher up in the file.
4938 (handle_extended_wait): Don't store the stop_pc here.
4939 (get_stop_pc): Adjust comments and rename to ...
4940 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4941 stopped for a software breakpoint or hardware breakpoint.
4942 (thread_still_has_status_pending_p): New function.
4943 (status_pending_p_callback): Use
4944 thread_still_has_status_pending_p. If the event is no longer
4945 interesting, resume the LWP.
4946 (handle_tracepoints): Add assert.
4947 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4948 (wstatus_maybe_breakpoint): New function.
4949 (cancel_breakpoint): Delete function.
4950 (check_stopped_by_watchpoint): New function, factored out from
4951 linux_low_filter_event.
4952 (lp_status_maybe_breakpoint): Delete function.
4953 (linux_low_filter_event): Remove filter_ptid argument.
4954 Leave thread group exits pending here. Store the LWP's stop PC.
4955 Always leave events pending.
4956 (linux_wait_for_event_filtered): Pull all events out of the
4957 kernel, and leave them all pending.
4958 (count_events_callback, select_event_lwp_callback): Consider all
4959 events.
4960 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4961 (select_event_lwp): Only give preference to the stepping LWP in
4962 all-stop mode. Adjust comments.
4963 (ignore_event): New function.
4964 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4965 references to cancel_breakpoints. Adjust to renames. Also give
4966 equal priority to all LWPs that have had events in non-stop mode.
4967 If reporting a software breakpoint event, unadjust the LWP's PC.
4968 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4969 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4970 Adjust.
4971 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4972 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4973 (linux_stopped_by_watchpoint): Adjust.
4974 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4975 * linux-low.h (enum lwp_stop_reason): New.
4976 (struct lwp_info) <stop_pc>: Adjust comment.
4977 <stopped_by_watchpoint>: Delete field.
4978 <stop_reason>: New field.
4979 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4980 * mem-break.c (software_breakpoint_inserted_here)
4981 (hardware_breakpoint_inserted_here): New function.
4982 * mem-break.h (software_breakpoint_inserted_here)
4983 (hardware_breakpoint_inserted_here): Declare.
4984 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4985 (cancel_breakpoints): Delete.
4986 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4987 (upload_fast_traceframes): Remove references to
4988 cancel_breakpoints.
4989
a33e3959
PA
49902015-01-09 Pedro Alves <palves@redhat.com>
4991
4992 * thread-db.c (find_new_threads_callback): Ignore thread if the
4993 kernel thread ID is -1.
4994
8784d563
PA
49952015-01-09 Pedro Alves <palves@redhat.com>
4996
4997 * linux-low.c (linux_attach_fail_reason_string): Move to
4998 nat/linux-ptrace.c, and rename.
4999 (linux_attach_lwp): Update comment.
5000 (attach_proc_task_lwp_callback): New function.
5001 (linux_attach): Adjust to rename and use
5002 linux_proc_attach_tgid_threads.
5003 (linux_attach_fail_reason_string): Delete declaration.
5004
76f2b779
JB
50052015-01-01 Joel Brobecker <brobecker@adacore.com>
5006
5007 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5008 * server.c (gdbserver_version): Likewise.
5009
fafcc06a
SDJ
50102014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5011
5012 * remote-utils.c: Include ctype.h.
5013 (input_interrupt): Explicitly handle the case when the char
5014 received is the NUL byte. Improve the printing of non-ASCII
5015 characters.
5016
beed38b8
JB
50172014-12-16 Joel Brobecker <brobecker@adacore.com>
5018
5019 * linux-low.c (linux_low_filter_event): Update call to
5020 linux_enable_event_reporting following the addition of
5021 a new parameter to that function.
5022
bf330350
CU
50232014-12-16 Catalin Udma <catalin.udma@freescale.com>
5024
5025 PR server/17457
5026 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5027 (AARCH64_FPCR_REGNO): Likewise.
5028 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5029 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5030 (aarch64_store_fpregset): Likewise.
5031
5227d625
JB
50322014-12-15 Joel Brobecker <brobecker@adacore.com>
5033
5034 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5035 Remove FIXME comment about assumption about N.
5036
f93b65a0
JB
50372014-12-13 Joel Brobecker <brobecker@adacore.com>
5038
5039 * configure.ac: If large-file support is disabled in GDBserver,
5040 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5041 * configure: Regenerate.
5042
e5a9158d
AA
50432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5044
5045 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5046 warning upon ENODATA from ptrace.
5047 * linux-s390-low.c (s390_store_tdb): New.
5048 (s390_regsets): Add regset for NT_S390_TDB.
5049
feea5f36
AA
50502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5051
5052 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5053 without a fill_function.
5054 * linux-s390-low.c (s390_fill_last_break): Remove.
5055 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5056 (s390_arch_setup): Use regset's size instead of fill_function for
5057 loop end condition.
5058
098dbe61
AA
50592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5060
5061 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5062 the regset's store function when ptrace returned an error.
5063 * regcache.c (get_thread_regcache): Invalidate register cache
5064 before fetching inferior's registers.
5065
28eef672
AA
50662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5067
5068 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5069 while-loop as for-loop.
5070 (regsets_store_inferior_registers): Likewise.
5071
bdca27a2
YQ
50722014-11-28 Yao Qi <yao@codesourcery.com>
5073
5074 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5075 * config.in, configure: Re-generate.
5076 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5077 is defined.
5078
9c232dda
YQ
50792014-11-21 Yao Qi <yao@codesourcery.com>
5080
5081 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5082 (AC_CHECK_HEADERS): Remove malloc.h.
5083 * configure: Re-generated.
5084 * config.in: Re-generated.
5085 * server.h: Don't include alloca.h and malloc.h.
5086 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5087 Don't include malloc.h.
5088
43968415
JB
50892014-11-17 Joel Brobecker <brobecker@adacore.com>
5090
5091 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5092 corresponding ERRNO check in same block.
5093
40e91bc7
PA
50942014-11-12 Pedro Alves <palves@redhat.com>
5095
5096 * server.c (cont_thread): Update comment.
5097 (start_inferior, attach_inferior): No longer clear cont_thread.
5098 (handle_v_cont): No longer set cont_thread.
5099 (captured_main): Clear cont_thread each time a GDB connects.
5100
c2c118cf
PA
51012014-11-12 Pedro Alves <palves@redhat.com>
5102
5103 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5104 thread, and don't resume all threads if the Hc thread has exited.
5105
78708b7c
PA
51062014-11-12 Pedro Alves <palves@redhat.com>
5107
5108 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5109 the process group instead of to a specific LWP.
5110
a2abc7de
PA
51112014-10-15 Pedro Alves <palves@redhat.com>
5112
5113 PR server/17487
5114 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5115 parameter.
5116 (arm_set_thread_context): Delete.
5117 (the_low_target): Adjust.
5118 * win32-i386-low.c (debug_registers_changed)
5119 (debug_registers_used): Delete.
5120 (update_debug_registers_callback): New function.
5121 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5122 needing to update their debug registers.
5123 (win32_get_current_dr): New function.
5124 (x86_dr_low_get_addr, x86_dr_low_get_control)
5125 (x86_dr_low_get_status): Fetch the debug register from the thread
5126 record's context.
5127 (i386_initial_stuff): Adjust.
5128 (i386_get_thread_context): Remove current_event parameter. Don't
5129 clear debug_registers_changed nor copy DR values to
5130 debug_reg_state.
5131 (i386_set_thread_context): Delete.
5132 (i386_prepare_to_resume): New function.
5133 (i386_thread_added): Mark the thread as needing to update irs
5134 debug registers.
5135 (the_low_target): Remove i386_set_thread_context and install
5136 i386_prepare_to_resume.
5137 * win32-low.c (win32_get_thread_context): Adjust.
5138 (win32_set_thread_context): Use SetThreadContext
5139 directly.
5140 (win32_prepare_to_resume): New function.
5141 (win32_require_context): New function, factored out from ...
5142 (thread_rec): ... this.
5143 (continue_one_thread): Call win32_prepare_to_resume on each thread
5144 we're about to continue.
5145 (win32_resume): Call win32_prepare_to_resume on the event thread.
5146 * win32-low.h (struct win32_thread_info)
5147 <debug_registers_changed>: New field.
5148 (struct win32_target_ops): Change prototype of set_thread_context,
5149 delete set_thread_context and add prepare_to_resume.
5150 (win32_require_context): New declaration.
5151
a442d071
GB
51522014-10-08 Gary Benson <gbenson@redhat.com>
5153
5154 * server.h: Do not include common-exceptions.h.
5155
6f1947e8
GB
51562014-10-08 Gary Benson <gbenson@redhat.com>
5157
5158 * server.h: Do not include cleanups.h.
5159
63b434a4
JH
51602014-09-30 James Hogan <james.hogan@imgtec.com>
5161
5162 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5163 mips64-dsp-linux.c.
5164
c4d9ceb6
YQ
51652014-09-23 Yao Qi <yao@codesourcery.com>
5166
5167 * linux-low.c (lp_status_maybe_breakpoint): New function.
5168 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5169 (count_events_callback): Likewise.
5170 (select_event_lwp_callback): Likewise.
5171 (cancel_breakpoints_callback): Likewise.
5172
89a5711c
DB
51732014-09-19 Don Breazeal <donb@codesourcery.com>
5174
5175 * linux-low.c (handle_extended_wait): Call
5176 linux_ptrace_get_extended_event.
5177 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5178 linux_is_extended_waitstatus.
5179
bffc0964
JB
51802014-09-16 Joel Brobecker <brobecker@adacore.com>
5181
5182 * Makefile.in (CPPFLAGS): Define.
5183 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5184 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5185
0bfdf32f
GB
51862014-09-16 Gary Benson <gbenson@redhat.com>
5187
5188 * inferiors.h (current_inferior): Renamed as...
5189 (current_thread): New variable. All uses updated.
5190 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5191 (maybe_move_out_of_jump_pad): Likewise.
5192 (cancel_breakpoint): Likewise.
5193 (linux_low_filter_event): Likewise.
5194 (wait_for_sigstop): Likewise.
5195 (linux_resume_one_lwp): Likewise.
5196 (need_step_over_p): Likewise.
5197 (start_step_over): Likewise.
5198 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5199 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5200 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5201 and save_inferior as saved_thread.
5202 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5203 saved_thread.
5204 (regcache_invalidate_thread): Likewise.
5205 * remote-utils.c (prepare_resume_reply): Likewise.
5206 * thread-db.c (thread_db_get_tls_address): Likewise.
5207 (disable_thread_event_reporting): Likewise.
5208 (remove_thread_event_breakpoints): Likewise.
5209 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5210 as saved_thread.
5211 * target.h (set_desired_inferior): Renamed as...
5212 (set_desired_thread): New declaration. All uses updated.
5213 * server.c (myresume): Updated comment to reference thread instead
5214 of inferior.
5215 (handle_serial_event): Likewise.
5216 (handle_target_event): Likewise.
5217
361c8ade
GB
52182014-09-12 Tom Tromey <tromey@redhat.com>
5219 Gary Benson <gbenson@redhat.com>
5220
5221 * regcache.h: Include common-regcache.h.
5222 (regcache_read_pc): Don't declare.
5223 * regcache.c (get_thread_regcache_for_ptid): New function.
5224
bd9269f7
GB
52252014-09-11 Tom Tromey <tromey@redhat.com>
5226 Gary Benson <gbenson@redhat.com>
5227
5228 * symbol.c: New file.
5229 * Makefile.in (SFILES): Add symbol.c.
5230 (OBS): Add symbol.o.
5231
f8c1d06b
GB
52322014-09-11 Gary Benson <gbenson@redhat.com>
5233
5234 * target.c (target_stop_ptid, target_continue_ptid): New
5235 functions.
5236
721ec300
GB
52372014-09-11 Tom Tromey <tromey@redhat.com>
5238 Gary Benson <gbenson@redhat.com>
5239
5240 * target.h: Include target/target.h.
5241 * target.c (target_read_memory, target_read_uint32)
5242 (target_write_memory): New functions.
5243
c5e92cca
GB
52442014-09-11 Gary Benson <gbenson@redhat.com>
5245
5246 * server.h (debug_hw_points): Don't declare.
5247 * server.c (debug_hw_points): Don't define. Replace all uses
5248 with show_debug_regs.
5249 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5250 all uses with show_debug_regs.
5251
2e4bb98a
EBM
52522014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5253
5254 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5255 endianness into account.
5256 (ppc_supply_ptrace_register): Likewise.
5257
ac740bc7
JH
52582014-09-03 James Hogan <james.hogan@imgtec.com>
5259
5260 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5261 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5262
97ea6506
GB
52632014-09-03 Gary Benson <gbenson@redhat.com>
5264
5265 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5266 ALL_DEBUG_ADDRESS_REGISTERS.
5267
df7e5265
GB
52682014-09-02 Gary Benson <gbenson@redhat.com>
5269
5270 * i386-low.h: Renamed as...
5271 * x86-low.h: New file. All type, function and variable name
5272 prefixes changed from "i386_" to "x86_". All references updated.
5273 * i386-low.c: Renamed as...
5274 * x86-low.c: New file. All type, function and variable name
5275 prefixes changed from "i386_" to "x86_". All references updated.
5276
ed859da7
GB
52772014-09-02 Gary Benson <gbenson@redhat.com>
5278
5279 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5280 (x86_linux_new_thread): Likewise.
5281
860789c7
GB
52822014-08-29 Gary Benson <gbenson@redhat.com>
5283
5284 * server.h (setjmp.h): Do not include.
5285 (toplevel): Do not declare.
5286 (common-exceptions.h): Include.
5287 (cleanups.h): Likewise.
5288 * server.c (toplevel): Do not define.
5289 (exit_code): New static global.
5290 (detach_or_kill_for_exit_cleanup): New function.
5291 (main): New function. Original main renamed to...
5292 (captured_main): New function.
5293 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5294
ff55e1b5
GB
52952014-08-29 Gary Benson <gbenson@redhat.com>
5296
5297 * Makefile.in (SFILES): Add common/common-exceptions.c.
5298 (OBS): Add common-exceptions.o.
5299 (common-exceptions.o): New rule.
5300 * utils.c (prepare_to_throw_exception): New function.
5301
e9bcb658
GB
53022014-08-29 Gary Benson <gbenson@redhat.com>
5303
5304 * config.in: Regenerate.
5305 * configure: Likewise.
5306
e3180625
GB
53072014-08-29 Gary Benson <gbenson@redhat.com>
5308
5309 * Makefile.in (SFILES): Add common/cleanups.c.
5310 (OBS): cleanups.o.
5311 (cleanups.o): New rule.
5312
e3d6ba5d
GB
53132014-08-29 Gary Benson <gbenson@redhat.com>
5314
5315 * utils.c (internal_vwarning): New function.
5316
7096e886
GB
53172014-08-28 Gary Benson <gbenson@redhat.com>
5318
5319 * utils.h (fatal): Remove declaration.
5320 * utils.c (fatal): Remove function.
5321
14ce3192
GB
53222014-08-28 Gary Benson <gbenson@redhat.com>
5323
5324 * tracepoint.c (gdb_agent_init): Replace fatal with
5325 perror_with_name.
5326 (initialize_tracepoint): Likewise.
5327
50278d59
GB
53282014-08-28 Gary Benson <gbenson@redhat.com>
5329
5330 * remote-utils.c (remote_prepare): Replace fatal with error.
5331
aa96c426
GB
53322014-08-28 Gary Benson <gbenson@redhat.com>
5333
5334 * linux-low.c (linux_async): Replace fatal with warning.
5335 Tidy up and return.
5336 (linux_start_non_stop): Return -1 if linux_async failed.
5337
f7160e97
GB
53382014-08-28 Gary Benson <gbenson@redhat.com>
5339
5340 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5341 gdb_assert.
5342 (i386_dr_low_get_addr): Remove vague comment.
5343 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5344 gdb_assert.
5345
38e08fca
GB
53462014-08-28 Gary Benson <gbenson@redhat.com>
5347
5348 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5349 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5350 internal_error.
5351 (linux_resume_one_lwp): Likewise.
5352 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5353 gdb_assert.
5354 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5355 with internal_error.
5356 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5357 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5358 (find_register_by_name): Replace fatal with internal_error.
5359 (find_regno): Likewise.
5360 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5361 * thread-db.c (thread_db_create_event): Likewise.
5362 (thread_db_load_search): Likewise.
5363 (try_thread_db_load_1): Likewise.
5364 * tracepoint.c (get_jump_space_head): Replace fatal with
5365 internal_error.
5366 (claim_trampoline_space): Likewise.
5367 (have_fast_tracepoint_trampoline_buffer): Likewise.
5368 (cmd_qtstart): Likewise.
5369 (stop_tracing): Likewise.
5370 (fast_tracepoint_collecting): Likewise.
5371 (target_malloc): Likewise.
5372 (download_tracepoint): Likewise.
5373 (download_trace_state_variables): Replace check with gdb_assert.
5374 (upload_fast_traceframes): Replace fatal with internal_error.
5375
34abf635
GB
53762014-08-19 Tom Tromey <tromey@redhat.com>
5377 Gary Benson <gbenson@redhat.com>
5378
5379 * Makefile.in (SFILES): Add common/common-debug.c.
5380 (OBS): Add common-debug.o.
5381 (common-debug.o): New rule.
5382 * debug.h (debug_printf): Don't declare.
5383 * debug.c (debug_printf): Renamed and rewritten as...
5384 (debug_vprintf): New function.
5385
f6e94d78
GB
53862014-08-19 Gary Benson <gbenson@redhat.com>
5387
5388 * utils.h: Do not include print-utils.h.
5389
9239eeab
GB
53902014-08-19 Tom Tromey <tromey@redhat.com>
5391 Gary Benson <gbenson@redhat.com>
5392
5393 * server.h: Add static assertion.
5394 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5395
ef87c8bb
GB
53962014-08-19 Tom Tromey <tromey@redhat.com>
5397 Gary Benson <gbenson@redhat.com>
5398
5399 * Makefile.in (SFILES): Add common/errors.c.
5400 (OBS): Add errors.o.
5401 (IPA_OBS): Add errors-ipa.o.
5402 (errors.o): New rule.
5403 (errors-ipa.o): Likewise.
5404 * utils.h (perror_with_name, error, warning): Don't declare.
5405 * utils.c (warning): Renamed and rewritten as...
5406 (vwarning): New function.
5407 (error): Renamed and rewritten as...
5408 (verror): New function.
5409 (internal_error): Renamed and rewritten as...
5410 (internal_verror): New function.
5411
bb974a24
GB
54122014-08-07 Gary Benson <gbenson@redhat.com>
5413
5414 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5415 * configure: Regenerate.
5416 * config.in: Likewise.
5417 * server.h: Do not include errno.h.
5418 * event-loop.c: Likewise.
5419 * hostio-errno.c: Likewise.
5420 * linux-low.c: Likewise.
5421 * remote-utils.c: Likewise.
5422 * spu-low.c: Likewise.
5423 * utils.c: Likewise.
5424 * gdbreplay.c: Unconditionally include errno.h.
5425
6d3d12eb
GB
54262014-08-07 Gary Benson <gbenson@redhat.com>
5427
5428 * server.h: Do not include string.h.
5429 * event-loop.c: Likewise.
5430 * linux-low.c: Likewise.
5431 * regcache.c: Likewise.
5432 * remote-utils.c: Likewise.
5433 * spu-low.c: Likewise.
5434 * utils.c: Likewise.
5435
dccbb609
GB
54362014-08-07 Gary Benson <gbenson@redhat.com>
5437
5438 * server.h: Do not include gdb_assert.h.
5439
e76df0d0
GB
54402014-08-07 Gary Benson <gbenson@redhat.com>
5441
5442 * server.h: Do not include common-utils.h.
5443
4cb9c816
GB
54442014-08-07 Gary Benson <gbenson@redhat.com>
5445
5446 * server.h: Do not include ptid.h.
5447 * notif.h: Likewise.
5448
3995eeee
GB
54492014-08-07 Gary Benson <gbenson@redhat.com>
5450
5451 * server.h: Do not include gdb_locale.h.
5452
cb9f1a9b
GB
54532014-08-07 Gary Benson <gbenson@redhat.com>
5454
5455 * server.h: Do not include gdb/signals.h.
5456 * win32-low.c: Likewise.
5457
a5fceff8
GB
54582014-08-07 Gary Benson <gbenson@redhat.com>
5459
5460 * server.h: Do not include pathmax.h.
5461
b9391142
GB
54622014-08-07 Gary Benson <gbenson@redhat.com>
5463
5464 * server.h: Do not include libiberty.h.
5465 * linux-bfin-low.c: Likewise.
5466
0e443c87
GB
54672014-08-07 Gary Benson <gbenson@redhat.com>
5468
5469 * server.h: Do not include ansidecl.h.
5470
8ebb3f56
GB
54712014-08-07 Gary Benson <gbenson@redhat.com>
5472
5473 * linux-x86-low.c: Do not include stddef.h.
5474 * lynx-ppc-low.c: Likewise.
5475 * tracepoint.c: Likewise.
5476
8980bdf6
GB
54772014-08-07 Gary Benson <gbenson@redhat.com>
5478
5479 * server.h: Do not include stdarg.h.
5480 * nto-low.c: Likewise.
5481
d7096f71
GB
54822014-08-07 Gary Benson <gbenson@redhat.com>
5483
5484 * server.h: Do not include stdlib.h.
5485 * inferiors.c: Likewise.
5486 * linux-low.c: Likewise.
5487 * regcache.c: Likewise.
5488 * spu-low.c: Likewise.
5489 * tracepoint.c: Likewise.
5490 * utils.c: Likewise.
5491
d02f550d
GB
54922014-08-07 Gary Benson <gbenson@redhat.com>
5493
5494 * server.h: Do not include stdio.h.
5495 * linux-low.c: Likewise.
5496 * remote-utils.c: Likewise.
5497 * spu-low.c: Likewise.
5498 * utils.c: Likewise.
5499 * wincecompat.c: Likewise.
5500
87f6c4e3
GB
55012014-08-06 Gary Benson <gbenson@redhat.com>
5502
5503 * regcache.c (init_register_cache): Move conditionals inside if.
5504
7089dca4
GB
55052014-08-06 Gary Benson <gbenson@redhat.com>
5506
5507 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5508
462f517e
GB
55092014-07-31 Gary Benson <gbenson@redhat.com>
5510
5511 * ax.h: Do not include server.h.
5512 * gdbthread.h: Likewise.
5513 * lynx-low.h: Likewise.
5514 * notif.h: Likewise.
5515
976411d6
GB
55162014-07-30 Gary Benson <gbenson@redhat.com>
5517
5518 * server.h: Include common-defs.h.
5519 Do not include config.h or build-gnulib-gdbserver/config.h.
5520
d41f6d8e
GB
55212014-07-30 Gary Benson <gbenson@redhat.com>
5522
5523 * hostio-errno.c: Move server.h to top of includes list.
5524 * inferiors.c: Likewise.
5525 * linux-x86-low.c: Likewise.
5526 * notif.c: Include server.h.
5527
314c6a35
TT
55282014-07-24 Tom Tromey <tromey@redhat.com>
5529 Gary Benson <gbenson@redhat.com>
5530
5531 * server.h (CORE_ADDR): Now unsigned.
5532
69ff6be5
PA
55332014-07-16 Pedro Alves <palves@redhat.com>
5534
5535 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5536
ce9e3fe7
PA
55372014-07-15 Pedro Alves <palves@redhat.com>
5538
5539 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5540 copy.
5541
e76126e8
PA
55422014-07-11 Pedro Alves <palves@redhat.com>
5543
5544 * linux-low.c (kill_wait_lwp): New function, based on
5545 kill_one_lwp_callback, but use my_waitpid directly.
5546 (kill_one_lwp_callback, linux_kill): Use it.
5547
8e9db26e
PA
55482014-06-23 Pedro Alves <palves@redhat.com>
5549
5550 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5551 before setting DR0..DR3.
5552
698b3e08
GB
55532014-06-20 Gary Benson <gbenson@redhat.com>
5554
5555 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5556 * configure: Regenerated.
5557 * config.in: Likewise.
5558
125f8a3d
GB
55592014-06-20 Gary Benson <gbenson@redhat.com>
5560
5561 * Makefile.in (SFILES): Update locations for files moved
5562 from common to nat.
5563 (object file files): Reordered.
5564
42995dbd
GB
55652014-06-20 Gary Benson <gbenson@redhat.com>
5566
5567 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5568 (i386_dr_low_set_addr): Likewise.
5569 (i386_dr_low_get_addr): Likewise.
5570 (i386_dr_low_can_set_control): Likewise.
5571 (i386_dr_low_set_control): Likewise.
5572 (i386_dr_low_get_control): Likewise.
5573 (i386_dr_low_get_status): Likewise.
5574 (i386_get_debug_register_length): Likewise.
5575 * linux-x86-low.c (i386_dr_low_set_addr):
5576 Changed signature. Made static.
5577 (i386_dr_low_get_addr): Likewise.
5578 (i386_dr_low_set_control): Likewise.
5579 (i386_dr_low_get_control): Likewise.
5580 (i386_dr_low_get_status): Likewise.
5581 (i386_dr_low): New global variable.
5582 * win32-i386-low.c (i386_dr_low_set_addr):
5583 Changed signature. Made static.
5584 (i386_dr_low_get_addr): Likewise.
5585 (i386_dr_low_set_control): Likewise.
5586 (i386_dr_low_get_control): Likewise.
5587 (i386_dr_low_get_status): Likewise.
5588 (i386_dr_low): New global variable.
5589
e1d2394b
MS
55902014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5591
5592 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5593 * Makefile.in (AR, AR_FLAGS): Define.
5594 * configure: Regenerate.
5595
3a8ee006
GB
55962014-06-19 Gary Benson <gbenson@redhat.com>
5597
5598 * Makefile.in (i386-dregs.o): New rule.
5599 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5600 * i386-low.c (target.h): Remove include.
5601 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5602 (DR_CONTROL_SHIFT): Likewise.
5603 (DR_CONTROL_SIZE): Likewise.
5604 (DR_RW_EXECUTE): Likewise.
5605 (DR_RW_WRITE): Likewise.
5606 (DR_RW_READ): Likewise.
5607 (DR_RW_IORW): Likewise.
5608 (DR_LEN_1): Likewise.
5609 (DR_LEN_2): Likewise.
5610 (DR_LEN_4): Likewise.
5611 (DR_LEN_8): Likewise.
5612 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5613 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5614 (DR_ENABLE_SIZE): Likewise.
5615 (DR_LOCAL_SLOWDOWN): Likewise.
5616 (DR_GLOBAL_SLOWDOWN): Likewise.
5617 (DR_CONTROL_RESERVED): Likewise.
5618 (I386_DR_CONTROL_MASK): Likewise.
5619 (I386_DR_VACANT): Likewise.
5620 (I386_DR_LOCAL_ENABLE): Likewise.
5621 (I386_DR_GLOBAL_ENABLE): Likewise.
5622 (I386_DR_DISABLE): Likewise.
5623 (I386_DR_SET_RW_LEN): Likewise.
5624 (I386_DR_GET_RW_LEN): Likewise.
5625 (I386_DR_WATCH_HIT): Likewise.
5626 (i386_wp_op_t): Likewise.
5627 (i386_show_dr): Likewise.
5628 (i386_length_and_rw_bits): Likewise.
5629 (i386_insert_aligned_watchpoint): Likewise.
5630 (i386_remove_aligned_watchpoint): Likewise.
5631 (i386_handle_nonaligned_watchpoint): Likewise.
5632 i386_update_inferior_debug_regs(): Likewise.
5633 (i386_dr_insert_watchpoint): Likewise.
5634 (i386_dr_remove_watchpoint): Likewise.
5635 (i386_dr_region_ok_for_watchpoint): Likewise.
5636 (i386_dr_stopped_data_address): Likewise.
5637 (i386_dr_stopped_by_watchpoint): Likewise.
5638
8f26655c
GB
56392014-06-19 Gary Benson <gbenson@redhat.com>
5640
5641 * i386-low.c (i386_dr_show): Renamed to
5642 i386_show_dr and made static. All uses updated.
5643 (i386_dr_length_and_rw_bits): Renamed to
5644 i386_length_and_rw_bits and made static.
5645 All uses updated.
5646 (i386_dr_insert_aligned_watchpoint): Renamed to
5647 i386_insert_aligned_watchpoint and made static.
5648 All uses updated.
5649 (i386_dr_remove_aligned_watchpoint): Renamed to
5650 i386_remove_aligned_watchpoint and made static.
5651 All uses updated.
5652 (i386_dr_update_inferior_debug_regs): Renamed to
5653 i386_update_inferior_debug_regs and made static.
5654 All uses updated.
5655
b9228891
GB
56562014-06-18 Gary Benson <gbenson@redhat.com>
5657
5171def3
GB
5658 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5659 (i386_dr_low_can_set_control): Likewise.
5660 (i386_get_debug_register_length): Likewise.
5661 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5662 (i386_dr_low_can_set_control): Likewise.
5663 (i386_get_debug_register_length): Likewise.
5664
56652014-06-17 Gary Benson <gbenson@redhat.com>
5666
b9228891
GB
5667 * i386-low.h (i386-dregs.h): New include.
5668 (DR_FIRSTADDR): Now in i386-dregs.h.
5669 (DR_LASTADDR): Likewise.
5670 (DR_NADDR): Likewise.
5671 (DR_STATUS): Likewise.
5672 (DR_CONTROL): Likewise.
5673 (i386_debug_reg_state): Likewise.
5674 (i386_dr_insert_watchpoint): Likewise.
5675 (i386_dr_remove_watchpoint): Likewise.
5676 (i386_dr_region_ok_for_watchpoint): Likewise.
5677 (i386_dr_stopped_data_address): Likewise.
5678 (i386_dr_stopped_by_watchpoint): Likewise.
5679 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5680
4be83cc2
GB
56812014-06-18 Gary Benson <gbenson@redhat.com>
5682
5683 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5684 i386_dr_insert_watchpoint.
5685 (i386_low_remove_watchpoint): Renamed to
5686 i386_dr_remove_watchpoint.
5687 (i386_low_region_ok_for_watchpoint): Renamed to
5688 i386_dr_region_ok_for_watchpoint.
5689 (i386_low_stopped_data_address): Renamed to
5690 i386_dr_stopped_data_address.
5691 (i386_low_stopped_by_watchpoint): Renamed to
5692 i386_dr_stopped_by_watchpoint.
5693 * i386-low.c (i386_show_dr): Renamed to
5694 i386_dr_show and made nonstatic. All uses updated.
5695 (i386_length_and_rw_bits): Renamed to
5696 i386_dr_length_and_rw_bits and made nonstatic.
5697 All uses updated.
5698 (i386_insert_aligned_watchpoint): Renamed to
5699 i386_dr_insert_aligned_watchpoint and made nonstatic.
5700 All uses updated.
5701 (i386_remove_aligned_watchpoint): Renamed to
5702 i386_dr_remove_aligned_watchpoint and made nonstatic.
5703 All uses updated.
5704 (i386_update_inferior_debug_regs): Renamed to
5705 i386_dr_update_inferior_debug_regs and made nonstatic.
5706 All uses updated.
5707 (i386_low_insert_watchpoint): Renamed to
5708 i386_dr_insert_watchpoint. All uses updated.
5709 (i386_low_remove_watchpoint): Renamed to
5710 i386_dr_remove_watchpoint. All uses updated.
5711 (i386_low_region_ok_for_watchpoint): Renamed to
5712 i386_dr_region_ok_for_watchpoint. All uses updated.
5713 (i386_low_stopped_data_address): Renamed to
5714 i386_dr_stopped_data_address. All uses updated.
5715 (i386_low_stopped_by_watchpoint): Renamed to
5716 i386_dr_stopped_by_watchpoint. All uses updated.
5717
131aa0d4
GB
57182014-06-18 Gary Benson <gbenson@redhat.com>
5719
5720 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5721 (i386_dr_low_can_set_control): Likewise.
5722 (i386_insert_aligned_watchpoint): New check.
5723
d9305f7f
GB
57242014-06-18 Gary Benson <gbenson@redhat.com>
5725
5726 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5727 Renamed to state.
5728
e927c9fc
GB
57292014-06-18 Gary Benson <gbenson@redhat.com>
5730
5731 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5732 instead of fatal and error.
5733 (i386_handle_nonaligned_watchpoint): Likewise.
5734
1b6d4134
GB
57352014-06-18 Gary Benson <gbenson@redhat.com>
5736
5737 * i386-low.c (i386_get_debug_register_length): New macro.
5738 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5739 (i386_show_dr): Use debug_printf instead of fprintf. Use
5740 phex to format values.
5741
6e62758f
GB
57422014-06-18 Gary Benson <gbenson@redhat.com>
5743
5744 * i386-low.h: Comment changes.
5745 * i386-low.c: Likewise.
5746
fc6e2f03
GB
57472014-06-18 Gary Benson <gbenson@redhat.com>
5748
5749 * i386-low.c: Whitespace changes.
5750
f9d1eeed
TT
57512014-06-12 Tom Tromey <tromey@redhat.com>
5752
5753 * utils.c (freeargv): Remove.
5754
0b04e523
TT
57552014-06-12 Tom Tromey <tromey@redhat.com>
5756
5757 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5758 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5759 (parse_debug_format_options): Likewise.
5760 (gdbserver_usage): Likewise.
5761 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5762 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5763 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5764 against libiberty.
5765 ($(LIBGNU)): Depend on libiberty.
5766 (all-lib): Recurse into all subdirs.
5767 (install-only): Invoke "install" target in subdirs.
5768 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5769 targets.
5770 * configure: Rebuild.
5771 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5772 for vasprintf, vsnprintf, or gettimeofday.
5773 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5774 srv_tgtobj.
5775
270c9937
JB
57762014-06-05 Joel Brobecker <brobecker@adacore.com>
5777
5778 * development.sh: Delete.
5779 * Makefile.in (config.status): Adjust dependency on development.sh.
5780 * configure.ac: Adjust development.sh source call.
5781 * configure: Regenerate.
5782
0a261ed8
PA
57832014-06-02 Pedro Alves <palves@redhat.com>
5784
5785 * ax.c (gdb_free_agent_expr): New function.
5786 * ax.h (gdb_free_agent_expr): New declaration.
5787 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5788 list.
5789 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5790 static.
5791 (clear_breakpoint_conditions_and_commands): New function.
5792 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5793 (clear_breakpoint_conditions_and_commands): New declaration.
5794
e9dae05e
RR
57952014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5796
5797 * linux-aarch64-low.c (asm/ptrace.h): Include.
5798
5876f503
JK
57992014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5800
5801 Fix TLS access for -static -pthread.
5802 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5803 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5804 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5805
802e8e6d
PA
58062014-05-20 Pedro Alves <palves@redhat.com>
5807
5808 * linux-aarch64-low.c (aarch64_insert_point)
5809 (aarch64_remove_point): No longer check whether the type is
5810 supported here. Adjust to new interface.
5811 (the_low_target): Install aarch64_supports_z_point_type as
5812 supports_z_point_type method.
5813 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5814 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5815 instead of a Z packet char. Adjust.
5816 (arm_supports_z_point_type): New function.
5817 (arm_insert_point, arm_remove_point): Adjust to new interface.
5818 (the_low_target): Install arm_supports_z_point_type.
5819 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5820 (cris_insert_point, cris_remove_point): Adjust to new interface.
5821 Don't check whether the type is supported here.
5822 (the_low_target): Install cris_supports_z_point_type.
5823 * linux-low.c (linux_supports_z_point_type): New function.
5824 (linux_insert_point, linux_remove_point): Adjust to new interface.
5825 * linux-low.h (struct linux_target_ops) <insert_point,
5826 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5827 raw_breakpoint pointer parameter.
5828 <supports_z_point_type>: New method.
5829 * linux-mips-low.c (mips_supports_z_point_type): New function.
5830 (mips_insert_point, mips_remove_point): Adjust to new interface.
5831 Use mips_supports_z_point_type.
5832 (the_low_target): Install mips_supports_z_point_type.
5833 * linux-ppc-low.c (the_low_target): Install NULL as
5834 supports_z_point_type method.
5835 * linux-s390-low.c (the_low_target): Install NULL as
5836 supports_z_point_type method.
5837 * linux-sparc-low.c (the_low_target): Install NULL as
5838 supports_z_point_type method.
5839 * linux-x86-low.c (x86_supports_z_point_type): New function.
5840 (x86_insert_point): Adjust to new insert_point interface. Use
5841 insert_memory_breakpoint. Adjust to new
5842 i386_low_insert_watchpoint interface.
5843 (x86_remove_point): Adjust to remove_point interface. Use
5844 remove_memory_breakpoint. Adjust to new
5845 i386_low_remove_watchpoint interface.
5846 (the_low_target): Install x86_supports_z_point_type.
5847 * lynx-low.c (lynx_target_ops): Install NULL as
5848 supports_z_point_type callback.
5849 * nto-low.c (nto_supports_z_point_type): New.
5850 (nto_insert_point, nto_remove_point): Adjust to new interface.
5851 (nto_target_ops): Install nto_supports_z_point_type.
5852 * mem-break.c: Adjust intro comment.
5853 (struct raw_breakpoint) <raw_type, size>: New fields.
5854 <inserted>: Update comment.
5855 <shlib_disabled>: Delete field.
5856 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5857 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5858 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5859 (raw_bkpt_type_to_target_hw_bp_type): New function.
5860 (find_enabled_raw_code_breakpoint_at): New function.
5861 (find_raw_breakpoint_at): New type and size parameters. Use them.
5862 (insert_memory_breakpoint): New function, based off
5863 set_raw_breakpoint_at.
5864 (remove_memory_breakpoint): New function.
5865 (set_raw_breakpoint_at): Reimplement.
5866 (set_breakpoint): New, based on set_breakpoint_at.
5867 (set_breakpoint_at): Reimplement.
5868 (delete_raw_breakpoint): Go through the_target->remove_point
5869 instead of assuming memory breakpoints.
5870 (find_gdb_breakpoint_at): Delete.
5871 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5872 (find_gdb_breakpoint): New function.
5873 (set_gdb_breakpoint_at): Delete.
5874 (z_type_supported): New function.
5875 (set_gdb_breakpoint_1): New function, loosely based off
5876 set_gdb_breakpoint_at.
5877 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5878 (delete_gdb_breakpoint_at): Delete.
5879 (delete_gdb_breakpoint_1): New function, loosely based off
5880 delete_gdb_breakpoint_at.
5881 (delete_gdb_breakpoint): New function.
5882 (clear_gdb_breakpoint_conditions): Rename to ...
5883 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5884 breakpoint.
5885 (add_condition_to_breakpoint): Make static.
5886 (add_breakpoint_condition): Take a struct breakpoint pointer
5887 instead of an address. Adjust.
5888 (gdb_condition_true_at_breakpoint): Rename to ...
5889 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5890 z_type parameter.
5891 (gdb_condition_true_at_breakpoint): Reimplement.
5892 (add_breakpoint_commands): Take a struct breakpoint pointer
5893 instead of an address. Adjust.
5894 (gdb_no_commands_at_breakpoint): Rename to ...
5895 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5896 parameter. Return true if no breakpoint was found. Change debug
5897 output.
5898 (gdb_no_commands_at_breakpoint): Reimplement.
5899 (run_breakpoint_commands): Rename to ...
5900 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5901 and change return type to boolean.
5902 (run_breakpoint_commands): New function.
5903 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5904 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5905 breakpoint. Go through the_target->remove_point instead of
5906 assuming memory breakpoint.
5907 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5908 software and hardware breakpoints.
5909 (reinsert_raw_breakpoint): Go through the_target->insert_point
5910 instead of assuming memory breakpoint.
5911 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5912 software and hardware breakpoints.
5913 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5914 Check both software and hardware breakpoints.
5915 (validate_inserted_breakpoint): Assert the breakpoint is a
5916 software breakpoint. Set the inserted flag to -1 instead of
5917 setting shlib_disabled.
5918 (delete_disabled_breakpoints): Adjust.
5919 (validate_breakpoints): Only validate software breakpoints.
5920 Adjust to inserted flag change.
5921 (check_mem_read, check_mem_write): Skip breakpoint types other
5922 than software breakpoints. Adjust to inserted flag change.
5923 * mem-break.h (enum raw_bkpt_type): New enum.
5924 (raw_breakpoint, struct process_info): Forward declare.
5925 (Z_packet_to_target_hw_bp_type): Delete declaration.
5926 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5927 (set_gdb_breakpoint, delete_gdb_breakpoint)
5928 (clear_breakpoint_conditions): New declarations.
5929 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5930 (breakpoint_inserted_here): Update comment.
5931 (add_breakpoint_condition, add_breakpoint_commands): Replace
5932 address parameter with a breakpoint pointer parameter.
5933 (gdb_breakpoint_here): Update comment.
5934 (delete_gdb_breakpoint_at): Delete.
5935 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5936 * server.c (process_point_options): Take a struct breakpoint
5937 pointer instead of an address. Adjust.
5938 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5939 delete_gdb_breakpoint.
5940 * spu-low.c (spu_target_ops): Install NULL as
5941 supports_z_point_type method.
5942 * target.h: Include mem-break.h.
5943 (struct target_ops) <prepare_to_access_memory>: Update comment.
5944 <supports_z_point_type>: New field.
5945 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5946 instead of a char. Also take a raw breakpoint pointer.
5947 * win32-arm-low.c (the_low_target): Install NULL as
5948 supports_z_point_type.
5949 * win32-i386-low.c (i386_supports_z_point_type): New function.
5950 (i386_insert_point, i386_remove_point): Adjust to new interface.
5951 (the_low_target): Install i386_supports_z_point_type.
5952 * win32-low.c (win32_supports_z_point_type): New function.
5953 (win32_insert_point, win32_remove_point): Adjust to new interface.
5954 (win32_target_ops): Install win32_supports_z_point_type.
5955 * win32-low.h (struct win32_target_ops):
5956 <supports_z_point_type>: New method.
5957 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5958 instead of a char. Also take a raw breakpoint pointer.
5959
932539e3
PA
59602014-05-20 Pedro Alves <palves@redhat.com>
5961
5962 * mem-break.h: Include break-common.h.
5963 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5964 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5965 (Z_packet_to_target_hw_bp_type): New declaration.
5966 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5967 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5968 (Z_PACKET_ACCESS_WP): Delete macros.
5969 (Z_packet_to_hw_type): Delete function.
5970 * i386-low.h: Don't include break-common.h here.
5971 (Z_packet_to_hw_type): Delete declaration.
5972 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5973 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5974 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5975 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5976 * linux-aarch64-low.c: Don't include break-common.h here.
5977 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5978 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5979 (Z_packet_to_target_hw_bp_type): Delete function.
5980 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5981 function.
5982 (mips_insert_point, mips_remove_point): Use
5983 Z_packet_to_target_hw_bp_type.
5984
4ff0d3d8
PA
59852014-05-20 Pedro Alves <palves@redhat.com>
5986
5987 * linux-aarch64-low.c: Include break-common.h.
5988 (enum target_point_type): Delete.
5989 (Z_packet_to_point_type): Rename to ...
5990 (Z_packet_to_target_hw_bp_type): ... this, and return a
5991 target_hw_bp_type instead.
5992 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5993 instead of an enum target_point_type.
5994 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5995 breakpoint type.
5996 (aarch64_dr_state_insert_one_point)
5997 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5998 (aarch64_handle_aligned_watchpoint)
5999 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6000 Take an enum target_hw_bp_type instead of an enum
6001 target_point_type.
6002 (aarch64_supports_z_point_type): New function.
6003 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6004 use Z_packet_to_target_hw_bp_type.
6005
786dc519
JB
60062014-05-20 Joel Brobecker <brobecker@adacore.com>
6007
6008 * configure.ac: Only use -Werror by default when DEVELOPMENT
6009 is true.
6010 * configure: Regenerate.
6011
9e0aa64f
JK
60122014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6013
6014 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6015 * linux-x86-low.c (X86_64_USER_REGS): New.
6016 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6017
2b577b92
YQ
60182014-04-28 Yao Qi <yao@codesourcery.com>
6019
6020 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6021 name.
6022
94611da2
PA
60232014-04-25 Pedro Alves <palves@redhat.com>
6024
6025 PR server/16255
6026 * linux-low.c (linux_attach_fail_reason_string): New function.
6027 (linux_attach_lwp): Delete.
6028 (linux_attach_lwp_1): Rename to ...
6029 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6030 argument. Remove "initial" parameter. Return int instead of
6031 void. Don't error or warn here.
6032 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6033 failure to attach to the tgid. Call warning when failing to
6034 attach to an lwp.
6035 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6036 argument. Remove "initial" parameter. Return int instead of
6037 void. Don't error or warn here.
6038 (linux_attach_fail_reason_string): New declaration.
6039 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6040 interface change. Use linux_attach_fail_reason_string.
6041
01f9f808
MS
60422014-04-24 Michael Sturm <michael.sturm@mintel.com>
6043 Walfred Tedeschi <walfred.tedeschi@intel.com>
6044
6045 * Makefile.in: Added rules to handle new files
6046 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6047 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6048 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6049 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6050 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6051 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6052 x32-avx512-linux.o.
6053 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6054 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6055 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6056 i386/x32-avx512.xml.
6057 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6058 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6059 i386/x32-avx512-linux.xml.
6060 * i387-fp.c (num_avx512_k_registers): New constant for number
6061 of K registers.
6062 (num_avx512_zmmh_low_registers): New constant for number of
6063 lower ZMM registers (0-15).
6064 (num_avx512_zmmh_high_registers): New constant for number of
6065 higher ZMM registers (16-31).
6066 (num_avx512_ymmh_registers): New contant for number of higher
6067 YMM registers (ymm16-31 added by avx521 on x86_64).
6068 (num_avx512_xmm_registers): New constant for number of higher
6069 XMM registers (xmm16-31 added by AVX512 on x86_64).
6070 (struct i387_xsave): Add space for AVX512 registers.
6071 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6072 Add code to handle AVX512 registers.
6073 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6074 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6075 prototypei from generated file.
6076 (tdesc_amd64_avx512_linux): Likewise.
6077 (init_registers_x32_avx512_linux): Likewise.
6078 (tdesc_x32_avx512_linux): Likewise.
6079 (init_registers_i386_avx512_linux): Likewise.
6080 (tdesc_i386_avx512_linux): Likewise.
6081 (x86_64_regmap): Add AVX512 registers.
6082 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6083 mask.
6084 (initialize_low_arch): Add code to initialize AVX512 registers.
6085
51aa91f9
PA
60862014-04-23 Pedro Alves <palves@redhat.com>
6087
6088 * mem-break.c (find_gdb_breakpoint_at): Make static.
6089 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6090
a4165e94
PA
60912014-04-23 Pedro Alves <palves@redhat.com>
6092
6093 * i386-low.c: Don't include break-common.h here.
6094 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6095 prototype to take target_hw_bp_type as argument instead of a Z
6096 packet char.
6097 * i386-low.h: Include break-common.h here.
6098 (Z_packet_to_hw_type): Declare.
6099 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6100 prototypes.
6101 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6102 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6103 (x86_remove_point): Convert the packet number to a
6104 target_hw_bp_type before calling i386_low_remove_watchpoint.
6105 * win32-i386-low.c (i386_insert_point): Convert the packet number
6106 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6107 (i386_remove_point): Convert the packet number to a
6108 target_hw_bp_type before calling i386_low_remove_watchpoint.
6109
b8acf843
PA
61102014-04-23 Pedro Alves <palves@redhat.com>
6111
6112 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6113
d708bcd1
PA
61142014-04-10 Pedro Alves <palves@redhat.com>
6115
6116 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6117 Check if the condition or command is NULL before checking if the
6118 breakpoint is known. On success, return true.
6119 * mem-break.h (add_breakpoint_condition): Document return.
6120 (add_breakpoint_commands): Add describing comment.
6121 * server.c (skip_to_semicolon): New function.
6122 (process_point_options): Use it.
6123
2eec7d5b
PA
61242014-04-09 Pedro Alves <palves@redhat.com>
6125
6126 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6127 to lwpid_of.
6128
fa96cb38
PA
61292014-02-27 Pedro Alves <palves@redhat.com>
6130
6131 PR 12702
6132 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6133 macros.
6134 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6135 output.
6136 (last_thread_of_process_p): Take a PID argument instead of a
6137 thread pointer.
6138 (linux_wait_for_lwp): Delete.
6139 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6140 functions.
6141 (linux_low_filter_event): New function, party factored out from
6142 linux_wait_for_event.
6143 (linux_wait_for_event): Rename to ...
6144 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6145 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6146 sigsuspend. Check for zombie leaders.
6147 (linux_wait_for_event): Reimplement as wrapper around
6148 linux_wait_for_event_filtered.
6149 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6150 a normal or signal exit is seen, it's the whole process exiting.
6151 (wait_for_sigstop): No longer a for_each_inferior callback.
6152 Rewrite on top of linux_wait_for_event_filtered.
6153 (stop_all_lwps): Call wait_for_sigstop directly.
6154 * server.c (resume, handle_target_event): Handle
6155 TARGET_WAITKIND_NO_RESUMED.
6156
d763de10
JB
61572014-02-26 Joel Brobecker <brobecker@adacore.com>
6158
6159 * win32-low.c (psapi_get_dll_name,
6160 * win32_CreateToolhelp32Snapshot): Delete.
6161 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6162 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6163 Delete.
6164 (handle_load_dll): Add function description.
6165 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6166
850a0f76
JB
61672014-02-26 Joel Brobecker <brobecker@adacore.com>
6168
6169 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6170 Add comment.
6171 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6172 base address when calling win32_add_one_solib.
6173 (handle_load_dll): Delete local variable load_addr.
6174 Remove 0x1000 offset applied to DLL base address when calling
6175 win32_add_one_solib.
6176 (handle_unload_dll): Add comment.
6177
f25b3fc3
JB
61782014-02-26 Joel Brobecker <brobecker@adacore.com>
6179
6180 * win32-low.c (win32_add_all_dlls): Renames
6181 win32_ensure_ntdll_loaded. Rewrite function documentation.
6182 Adjust implementation to always load all DLLs.
6183 Add 0x1000 offset to DLL base address when calling
6184 win32_add_one_solib.
6185 (child_initialization_done): New static global.
6186 (do_initial_child_stuff): Set child_initialization_done to
6187 zero during child initialization, and 1 after. Replace call
6188 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6189 Add comment.
6190 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6191 (handle_unload_dll): Add function documentation.
6192 (get_child_debug_event): Ignore load and unload DLL events
6193 during child initialization.
6194
d86d4aaf
DE
61952014-02-20 Doug Evans <dje@google.com>
6196
3bc32da3 6197 Remove global all_lwps.
d86d4aaf
DE
6198 * inferiors.h (ptid_of): Move here from linux-low.h.
6199 (pid_of, lwpid_of): Ditto.
6200 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6201 parameter is a struct thread_info * now.
6202 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6203 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6204 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6205 directly.
6206 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6207 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6208 * linux-arm-low.c (update_registers_callback): Update, "entry"
6209 parameter is a struct thread_info * now.
6210 Fetch lwpid from current_inferior directly.
6211 (arm_insert_point): Pass &all_threads to find_inferior instead of
6212 &all_lwps.
6213 (arm_remove_point): Ditto.
6214 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6215 (arm_prepare_to_resume): Fetch pid from thread.
6216 (arm_read_description): Fetch lwpid from current_inferior directly.
6217 * linux-low.c (all_lwps): Delete.
6218 (delete_lwp): Delete call to remove_inferior.
6219 (handle_extended_wait): Fetch lwpid from thread.
6220 (add_lwp): Don't set lwp->entry.id. Remove call to
6221 add_inferior_to_list.
6222 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6223 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6224 (kill_one_lwp_callback): Ditto.
6225 (linux_kill): Don't dereference NULL pointer.
6226 Fetch ptid,lwpid from thread.
6227 (get_detach_signal): Fetch ptid from thread.
6228 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6229 Simplify call to regcache_invalidate_thread.
6230 (delete_lwp_callback): Update, "entry" parameter is a
6231 struct thread_info * now. Fetch pid from thread.
6232 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6233 (status_pending_p_callback): Update, "entry" parameter is a
6234 struct thread_info * now. Fetch ptid from thread.
6235 (find_lwp_pid): Update, "entry" parameter is a
6236 struct thread_info * now.
6237 (linux_wait_for_lwp): Fetch pid from thread.
6238 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6239 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6240 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6241 (dequeue_one_deferred_signal): Ditto.
6242 (cancel_breakpoint): Fetch ptid from current_inferior.
6243 (linux_wait_for_event): Pass &all_threads to find_inferior,
6244 not &all_lwps. Fetch ptid, lwpid from thread.
6245 (count_events_callback): Update, "entry" parameter is a
6246 struct thread_info * now.
6247 (select_singlestep_lwp_callback): Ditto.
6248 (select_event_lwp_callback): Ditto.
6249 (cancel_breakpoints_callback): Ditto.
6250 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6251 not &all_lwps.
6252 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6253 (unsuspend_one_lwp): Update, "entry" parameter is a
6254 struct thread_info * now.
6255 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6256 not &all_lwps.
6257 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6258 Fetch lwpid from thread, not lwp.
6259 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6260 Pass &all_threads to find_inferior, not &all_lwps.
6261 (send_sigstop): Fetch lwpid from thread, not lwp.
6262 (send_sigstop_callback): Update, "entry" parameter is a
6263 struct thread_info * now.
6264 (suspend_and_send_sigstop_callback): Ditto.
6265 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6266 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6267 struct thread_info * now.
6268 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6269 from thread, lwp.
6270 (lwp_running): Update, "entry" parameter is a
6271 struct thread_info * now.
6272 (stop_all_lwps): Fetch ptid from thread.
6273 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6274 (linux_resume_one_lwp): Fetch lwpid from thread.
6275 (linux_set_resume_request): Update, "entry" parameter is a
6276 struct thread_info * now. Fetch pid, lwpid from thread.
6277 (resume_status_pending_p): Update, "entry" parameter is a
6278 struct thread_info * now.
6279 (need_step_over_p): Ditto. Fetch lwpid from thread.
6280 (start_step_over): Fetch lwpid from thread.
6281 (linux_resume_one_thread): Update, "entry" parameter is a
6282 struct thread_info * now. Fetch lwpid from thread.
6283 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6284 (proceed_one_lwp): Update, "entry" parameter is a
6285 struct thread_info * now. Fetch lwpid from thread.
6286 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6287 struct thread_info * now.
6288 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6289 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6290 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6291 directly.
6292 (regsets_store_inferior_registers): Ditto.
6293 (fetch_register, store_register): Ditto.
6294 (linux_read_memory, linux_write_memory): Ditto.
6295 (linux_request_interrupt): Ditto.
6296 (linux_read_auxv): Ditto.
6297 (linux_xfer_siginfo): Ditto.
6298 (linux_qxfer_spu): Ditto.
6299 (linux_qxfer_libraries_svr4): Ditto.
6300 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6301 moved to inferiors.h.
6302 (get_lwp): Delete.
6303 (get_thread_lwp): Update.
6304 (struct lwp_info): Delete member "entry". Simplify comment for
6305 member "thread".
6306 (all_lwps): Delete.
6307 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6308 current_inferior directly.
6309 (update_watch_registers_callback): Update, "entry" parameter is a
6310 struct thread_info * now. Fetch pid from thread.
6311 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6312 (mips_insert_point): Fetch lwpid from current_inferior.
6313 Pass &all_threads to find_inferior, not &all_lwps.
6314 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6315 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6316 directly.
6317 (mips_stopped_data_address): Ditto.
6318 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6319 directly.
6320 * linux-tile-low.c (tile_arch_setup): Ditto.
6321 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6322 (update_debug_registers_callback): Update, "entry" parameter is a
6323 struct thread_info * now. Fetch pid from thread.
6324 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6325 Pass &all_threads to find_inferior, not &all_lwps.
6326 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6327 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6328 Pass &all_threads to find_inferior, not &all_lwps.
6329 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6330 (i386_dr_low_get_status): Ditto.
6331 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6332 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6333 (x86_linux_read_description): Ditto.
6334 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6335
3b8361aa
DE
63362014-02-20 Doug Evans <dje@google.com>
6337
6338 * inferiors.c (get_first_inferior): Fix buglet.
6339
f7667f0d
DE
63402014-02-19 Doug Evans <dje@google.com>
6341
6342 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6343 * inferiors.c (add_thread): Change result type to struct thread_info *.
6344 All callers updated.
6345 (add_lwp): Call add_thread here instead of in callers.
6346 All callers updated.
6347 * linux-low.h (get_lwp_thread): Rewrite.
6348 (struct lwp_info): New member "thread".
6349
b3312d80
DE
63502014-02-19 Doug Evans <dje@google.com>
6351
6352 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6353 All callers updated.
6354
ecc6f45c
DE
63552014-02-19 Doug Evans <dje@google.com>
6356
6357 * inferiors.c (add_thread): Fix whitespace.
6358
649ebbca
DE
63592014-02-19 Doug Evans <dje@google.com>
6360
6361 * dll.c (clear_dlls): Replace accessing list implemention details
6362 with API function.
6363 * gdbthread.h (get_first_thread): Declare.
6364 * inferiors.c (for_each_inferior_with_data): New function.
6365 (get_first_thread): New function.
6366 (find_thread_ptid): Simplify.
6367 (get_first_inferior): New function.
6368 (clear_list): Delete.
6369 (one_inferior_p): New function.
6370 (clear_inferior_list): New function.
6371 (clear_inferiors): Update.
6372 * inferiors.h (for_each_inferior_with_data): Declare.
6373 (clear_inferior_list): Declare.
6374 (one_inferior_p): Declare.
6375 (get_first_inferior): Declare.
6376 * linux-low.c (linux_wait_for_event): Replace accessing list
6377 implemention details with API function.
6378 * server.c (target_running): Ditto.
6379 (accumulate_file_name_length): New function.
6380 (emit_dll_description): New function.
6381 (handle_qxfer_libraries): Replace accessing list implemention
6382 details with API function.
6383 (handle_qxfer_threads_worker): New function.
6384 (handle_qxfer_threads_proper): Replace accessing list implemention
6385 details with API function.
6386 (handle_query): Ditto.
6387 (visit_actioned_threads_callback_ftype): New typedef.
6388 (visit_actioned_threads_data): New struct.
6389 (visit_actioned_threads): Rewrite to be find_inferior callback.
6390 (resume): Call find_inferior.
6391 (handle_status): Replace accessing list implemention
6392 details with API function.
6393 (process_serial_event): Replace accessing list implemention details
6394 with API function.
6395 * target.c (set_desired_inferior): Replace accessing list implemention
6396 details with API function.
6397 * tracepoint.c (same_process_p): New function.
6398 (gdb_agent_about_to_close): Replace accessing list implemention
6399 details with API function.
6400 * win32-low.c (child_delete_thread): Replace accessing list
6401 implemention details with API function.
6402 (match_dll_by_basename): New function.
6403 (dll_is_loaded_by_basename): New function.
6404 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6405 details call to dll_is_loaded_by_basename.
6406
80894984
DE
64072014-02-19 Doug Evans <dje@google.com>
6408
6409 * dll.h (struct dll_info): Add comment.
6410 * gdbthread.h (struct thread_info): Add comment.
6411 (current_ptid): Simplify.
6412 * inferiors.c (add_process): Update.
6413 (remove_process): Update.
6414 * inferiors.h (struct process_info): Rename member "head" to "entry".
6415 * linux-low.c (delete_lwp): Update.
6416 (add_lwp): Update.
6417 (last_thread_of_process_p): Update.
6418 (kill_one_lwp_callback, linux_kill): Update.
6419 (status_pending_p_callback): Update.
6420 (wait_for_sigstop): Update. Simplify read of ptid.
6421 (start_step_over): Update.
6422 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6423 (get_lwp_thread): Update.
6424 (struct lwp_info): Rename member "head" to "entry".
6425 * regcache.h (inferior_list_entry): Delete.
6426 * server.c (kill_inferior_callback): Update.
6427 (detach_or_kill_inferior_callback): Update.
6428 (print_started_pid): Update.
6429 (print_attached_pid): Update.
6430 (process_serial_event): Simplify read of ptid.
6431 * thread-db.c (thread_db_create_event): Update.
6432 (thread_db_get_tls_address): Update.
6433 * win32-low.c (current_inferior_ptid): Simplify.
6434
46917d26
TT
64352014-02-19 Tom Tromey <tromey@redhat.com>
6436
6437 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6438 argument.
6439 (target_supports_btrace): Update.
6440
0759a81e
YQ
64412014-02-14 Yao Qi <yao@codesourcery.com>
6442
6443 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6444 (rsp-low-ipa.o): New target.
6445
a7191e8b
TT
64462014-02-12 Tom Tromey <tromey@redhat.com>
6447
6448 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6449 convert_ascii_to_int.
6450 * regcache.c (registers_to_string): Likewise.
6451 * remote-utils.c (decode_M_packet): Likewise.
6452 * server.c (process_serial_event): Likewise.
6453
ff0e980e
TT
64542014-02-12 Tom Tromey <tromey@redhat.com>
6455
6456 * server.c (handle_query, handle_v_run): Use hex2bin, not
6457 unhexify.
6458 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6459
e9371aff
TT
64602014-02-12 Tom Tromey <tromey@redhat.com>
6461
6462 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6463 convert_int_to_ascii.
6464 * regcache.c (registers_to_string, collect_register_as_string):
6465 Likewise.
6466 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6467 Likewise.
6468 * server.c (process_serial_event): Likewise.
6469 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6470 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6471
971dc0b8
TT
64722014-02-12 Tom Tromey <tromey@redhat.com>
6473
6474 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6475 bin2hex, not hexify.
6476 * tracepoint.c (cmd_qtstatus): Likewise.
6477
0a822afb
TT
64782014-02-12 Tom Tromey <tromey@redhat.com>
6479
6480 * remote-utils.c (monitor_output): Pass explicit length to
6481 hexify.
6482
9c3d6531
TT
64832014-02-12 Tom Tromey <tromey@redhat.com>
6484
6485 * tracepoint.c: Include rsp-low.h.
6486 * server.c: Include rsp-low.h.
6487 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6488 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6489 declare.
6490 * remote-utils.c: Include rsp-low.h.
6491 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6492 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6493 (convert_int_to_ascii, convert_ascii_to_int): Move to
6494 common/rsp-low.c.
6495 * regcache.c: Include rsp-low.h.
6496 * ax.c: Include rsp-low.h.
6497 * Makefile.in (SFILES): Add common/rsp-low.c.
6498 (OBS): Add rsp-low.o.
6499 (rsp-low.o): New target.
6500
01fd3ea5
TT
65012014-02-12 Tom Tromey <tromey@redhat.com>
6502
6503 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6504 Include print-utils.h.
6505 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6506 (plongest, thirty_two, phex_nz): Remove.
6507 * Makefile.in (SFILES): Add common/print-utils.c.
6508 (OBS): Add print-utils.o.
6509 (print-utils-ipa.o): New target.
6510 (print-utils.o): New target.
6511 (IPA_OBJS): Add print-utils-ipa.o.
6512
e99dc820
TT
65132014-02-06 Tom Tromey <tromey@redhat.com>
6514
6515 * Makefile.in (SFILES): Fix indentation.
6516
ee1e2d4f
DE
65172014-02-05 Doug Evans <dje@google.com>
6518
6519 * linux-low.c (linux_wait_for_event): Improve comment.
6520 (linux_wait_1): Keep current_inferior in sync with event_child.
6521
f5a02773
DE
65222014-01-22 Doug Evans <dje@google.com>
6523
6524 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6525
87ce2a04
DE
65262014-01-22 Doug Evans <dje@google.com>
6527
6528 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6529 * configure: Regenerate.
6530 * config.in: Regenerate.
6531 * Makefile.in (SFILES): Add debug.c.
6532 (OBS): Add debug.o.
6533 * debug.c: New file.
6534 * debug.h: New file.
6535 * linux-aarch64-low.c (*): Update all debugging printfs to use
6536 debug_printf instead of fprintf.
6537 * linux-arm-low.c (*): Ditto.
6538 * linux-cris-low.c (*): Ditto.
6539 * linux-crisv32-low.c (*): Ditto.
6540 * linux-m32r-low.c (*): Ditto.
6541 * linux-sparc-low.c (*): Ditto.
6542 * linux-x86.c (*): Ditto.
6543 * linux-low.c (*): Ditto.
6544 (linux_wait_1): Add calls to debug_enter, debug_exit.
6545 (linux_wait): Remove redundant debugging printf.
6546 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6547 (linux_resume, unstop_all_lwps): Ditto.
6548 * mem-break.c (*): Update all debugging printfs to use
6549 debug_printf instead of fprintf.
6550 * remote-utils.c (*): Ditto.
6551 * thread-db.c (*): Ditto.
6552 * server.c #include <ctype.h>, "gdb_vecs.h".
6553 (debug_threads): Moved to debug.c.
6554 (*): Update all debugging printfs to use debug_printf instead of
6555 fprintf.
6556 (start_inferior): Replace call to fflush with call to debug_flush.
6557 (monitor_show_help): Mention set debug-format.
6558 (parse_debug_format_options): New function.
6559 (handle_monitor_command): Handle "monitor set debug-format".
6560 (gdbserver_usage): Mention --debug-format.
6561 (main): Parse --debug-format.
6562 * server.h (debug_threads): Declaration moved to debug.h.
6563 #include "debug.h".
6564 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6565 trace_debug_1 that uses debug_printf.
6566 (tracepoint_look_up_symbols): Update all debugging printfs to use
6567 debug_printf instead of fprintf.
6568
e671835b
BS
65692014-01-20 Baruch Siach <baruch@tkos.co.il>
6570
6571 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6572 sys/ptrace.h.
6573
b5737fa9
PA
65742014-01-17 Pedro Alves <palves@redhat.com>
6575
ea38d2a9 6576 PR build/16445
c7faa97a
PA
6577 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6578 defined after including gdb_proc_service.h.
b5737fa9 6579
40ed484e
DE
65802014-01-16 Doug Evans <dje@google.com>
6581
6582 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6583 (match_dll): Use it.
6584
969c39fb
MM
65852014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6586
6587 * target.h (target_ops) <read_btrace>: Change parameters and
6588 return type to allow error reporting.
6589 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6590 trace reading errors on.
6591 * linux-low.c (linux_low_read_btrace): Pass trace reading
6592 errors on.
6593 (linux_low_disable_btrace): New.
6594
ab7f45ba
DE
65952014-01-15 Doug Evans <dje@google.com>
6596
6597 * inferiors.c (thread_id_to_gdb_id): Delete.
6598 * inferiors.h (thread_id_to_gdb_id): Delete.
6599
66af0f44
EZ
66002014-01-13 Eli Zaretskii <eliz@gnu.org>
6601
6602 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6603 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6604 versions.
6605
9939e131
PA
66062014-01-08 Pedro Alves <palves@redhat.com>
6607
6608 * server.c (handle_status): Don't discard previous queued stop
6609 replies or thread's pending status here.
6610 (main) <disconnection>: Do it here instead.
6611
b7ea362b
PA
66122014-01-08 Pedro Alves <palves@redhat.com>
6613
6614 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6615 * server.c (visit_actioned_threads, handle_pending_status): New
6616 function.
6617 (handle_v_cont): Factor out parts to ...
6618 (resume): ... this new function. If in all-stop, and a thread
6619 being resumed has a pending status, report it without actually
6620 resuming.
6621 (myresume): Adjust to use the new 'resume' function.
6622 (clear_pending_status_callback, set_pending_status_callback)
6623 (find_status_pending_thread_callback): New functions.
6624 (handle_status): Handle the case of multiple threads having
6625 interesting statuses to report. Report threads' real last signal
6626 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6627 with an interesting thread to report the status for, instead of
6628 always reporting the status of the first thread.
6629
28498c42
JB
66302014-01-01 Joel Brobecker <brobecker@adacore.com>
6631
6632 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6633 * gdbreplay.c (gdbreplay_version): Likewise.
6634
f45c82da
YZ
66352013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6636
6637 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6638 iov.iov_len with the real length in use.
6639
379a5e2d
JB
66402013-12-13 Joel Brobecker <brobecker@adacore.com>
6641
6642 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6643 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6644 for all targets that use win32-low.c.
6645 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6646 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6647
4210d83e
PA
66482013-12-13 Pedro Alves <palves@redhat.com>
6649
6650 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6651 if equal to TARGET_WAITKIND_LOADED.
6652 * win32-low.c (cached_status): New static global.
6653 (win32_wait): Add declaration.
6654 (do_initial_child_stuff): Flush all initial pending debug events
6655 up to the initial breakpoint.
6656 (win32_wait): If CACHED_STATUS was set, return that instead
6657 of doing a real wait. Remove the code resuming the execution
6658 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6659 during the initial phase. Also remove the code changing
6660 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6661 TARGET_WAITKIND_STOPPED.
6662
e7f0d979
YQ
66632013-12-11 Yao Qi <yao@codesourcery.com>
6664
6665 * notif.c (handle_notif_ack): Return 0 if no notification
6666 matches.
6667
ebcf782c
DE
66682013-11-20 Doug Evans <dje@google.com>
6669
6670 * linux-low.c (linux_set_resume_request): Fix comment.
6671
20ad9378
DE
66722013-11-20 Doug Evans <dje@google.com>
6673
6674 * linux-low.c (resume_status_pending_p): Tweak comment.
6675
a196ebeb
WT
66762013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6677
6678 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6679 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6680 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6681 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6682 (srv_amd64_regobj): Add amd64-mpx.o.
6683 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6684 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6685 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6686 * i387-fp.c (num_pl_bnd_register) Added constant.
6687 (num_pl_bnd_cfg_registers) Added constant.
6688 (struct i387_xsave) Added reserved area and MPX fields.
6689 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6690 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6691 function.
6692 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6693 (init_registers_amd64_mpx_linux): Declare new function.
6694 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6695 (x86_64_regmap): Add MPX registers.
6696 (x86_linux_read_description): Add MPX case.
6697 (initialize_low_arch): Initialize MPX targets.
6698
0080a2f6
TT
66992013-11-18 Tom Tromey <tromey@redhat.com>
6700
6701 * configure: Rebuild.
6702 * configure.ac: Don't check for stdlib.h.
6703 * gdbreplay.c: Unconditionally include stdlib.h.
6704
2978b111
TT
67052013-11-18 Tom Tromey <tromey@redhat.com>
6706
6707 * config.in: Rebuild.
6708 * configure: Rebuild.
6709 * configure.ac: Don't use AC_HEADER_DIRENT.
6710
a3d08894
TT
67112013-11-18 Tom Tromey <tromey@redhat.com>
6712
6713 * server.h: Don't check HAVE_STRING_H.
6714 * gdbreplay.c: Don't check HAVE_STRING_H.
6715 * configure: Rebuild.
6716
0a5dd17d
TT
67172013-11-18 Tom Tromey <tromey@redhat.com>
6718
6719 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6720 LIBGNU.
6721
1bd2f0ba
TT
67222013-11-08 Tom Tromey <tromey@redhat.com>
6723
6724 * configure, config.in: Rebuild.
6725 * configure.ac: Remove unused configury.
6726
3266f10b
TT
67272013-11-08 Tom Tromey <tromey@redhat.com>
6728
6729 * acinclude.m4: Include common.m4, codeset.m4.
6730 * configure, config.in: Rebuild.
6731 * configure.ac: Use GDB_AC_COMMON.
6732
6682d959
AA
67332013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6734
6735 * linux-s390-low.c (HWCAP_S390_TE): New define.
6736 (s390_arch_setup): Consider the TE field in the HWCAP for
6737 determining 'have_regset_tdb'.
6738
fd0a4d76
SDJ
67392013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6740
6741 PR gdb/16014
6742 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6743 call to sizeof.
6744
1a3d890b
PA
67452013-10-02 Pedro Alves <palves@redhat.com>
6746
6747 * server.c (process_serial_event): Don't output "GDBserver
6748 exiting" if GDB is connected through stdio.
6749 * target.c (mywait): Likewise, be silent if GDB is connected
6750 through stdio.
6751
97ad4581
JB
67522013-10-01 Joel Brobecker <brobecker@adacore.com>
6753
6754 * lynx-low.c (lynx_add_threads_after_attach): New function.
6755 (lynx_attach): Remove call to add_thread. Add call to
6756 lynx_add_threads_after_attach instead.
6757
5b4e221c
MF
67582013-09-28 Mike Frysinger <vapier@gentoo.org>
6759
6760 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6761 * config.in, configure: Regenerated.
6762
ee47b2f8
YQ
67632013-09-18 Yao Qi <yao@codesourcery.com>
6764
6765 PR server/15959
6766 * server.c (start_inferior): Clear 'resume_info'.
6767
d6707650 67682013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6769
d6707650
JW
6770 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6771 for each register.
6772
9243dd0e 67732013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6774
9243dd0e
JW
6775 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6776 linux-tile-low.o to srv_tgtobj.
6777
c623a6ef
WN
67782013-09-16 Will Newton <will.newton@linaro.org>
6779
6780 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6781 out regs.
6782
fb71d39e
PA
67832013-09-06 Pedro Alves <palves@redhat.com>
6784
6785 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6786 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6787 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6788 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6789 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6790 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6791
8e7e9910
PA
67922013-09-06 Pedro Alves <palves@redhat.com>
6793
6794 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6795 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6796
7c3a12ca
PA
67972013-09-06 Pedro Alves <palves@redhat.com>
6798
6799 * linux-amd64-ipa.c: Include tracepoint.h.
6800 * linux-i386-ipa.c: Include tracepoint.h.
6801
8eb3d7b6
RW
68022013-09-06 Ricard Wanderlof <ricardw@axis.com>
6803
6804 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6805 (ps_get_thread_area): New function.
6806
eddddb9d
RW
68072013-09-06 Ricard Wanderlof <ricardw@axis.com>
6808
6809 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6810 (initialize_low_arch): Call init_registers_crisv32 rather than
6811 init_register_crisv32.
6812
533b0600
PA
68132013-09-05 Pedro Alves <palves@redhat.com>
6814
6815 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6816 to ...
6817 * hostio.h: ... this new file.
6818 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6819 win32-low.c: Include hostio.h.
6820
0ce3d3b5
PA
68212013-09-05 Pedro Alves <palves@redhat.com>
6822
6823 * server.h (gdb_client_data, handler_func, callback_handler_func)
6824 (delete_file_handler, add_file_handler, append_callback_event)
6825 (delete_callback_event, start_event_loop, initialize_event_loop):
6826 Move to event-loop.h and include it.
6827 * event-loop.h: New file.
6828
799cdc37
PA
68292013-09-05 Pedro Alves <palves@redhat.com>
6830
6831 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6832 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6833 (loaded_dll, unloaded_dll): Move to ...
6834 * dll.h: ... this new file.
6835 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6836
6a6bbd9d
PA
68372013-09-05 Pedro Alves <palves@redhat.com>
6838
6839 * server.h (current_process, get_thread_process, all_processes)
6840 (add_inferior_to_list, for_each_inferior, current_inferior)
6841 (remove_inferior, add_process, remove_process, find_process_pid)
6842 (have_started_inferiors_p, have_attached_inferiors_p)
6843 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6844 (clear_inferiors, find_inferior, find_inferior_id)
6845 (inferior_target_data, set_inferior_target_data)
6846 (inferior_regcache_data, set_inferior_regcache_data): Move to
6847 inferiors.h, and include it.
6848 * inferiors.h: New file.
6849
f699aaba
PA
68502013-09-05 Pedro Alves <palves@redhat.com>
6851
6852 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6853 Move ...
72f4393d 6854 * ax.h: ... here.
f699aaba 6855
c144c7a0
PA
68562013-09-05 Pedro Alves <palves@redhat.com>
6857
6858 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6859 tracepoint.h.
6860 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6861 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6862 (handle_tracepoint_general_set, handle_tracepoint_query)
6863 (tracepoint_finished_step, tracepoint_was_hit)
6864 (release_while_stepping_state_list, current_traceframe)
6865 (in_readonly_region, traceframe_read_mem)
6866 (fetch_traceframe_registers, traceframe_read_sdata)
6867 (traceframe_read_info, struct fast_tpoint_collect_status)
6868 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6869 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6870 (supply_fast_tracepoint_registers)
6871 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6872 (ipa_tdesc, claim_trampoline_space)
6873 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6874 (agent_mem_read, agent_get_trace_state_variable_value)
6875 (agent_set_trace_state_variable_value, agent_tsv_read)
6876 (agent_mem_read_string, get_raw_reg_func_addr)
6877 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6878 * tracepoint.h: ... this new file.
6879
ff42e6ab
PA
68802013-09-05 Pedro Alves <palves@redhat.com>
6881
6882 * server.h (perror_with_name, error, fatal, warning, paddress)
6883 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6884 include it.
6885 * utils.h: New file.
6886
541af0f4
PA
68872013-09-05 Pedro Alves <palves@redhat.com>
6888
6889 * server.h (remote_debug, noack_mode, transport_is_reliable)
6890 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6891 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6892 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6893 (write_enn, initialize_async_io, enable_async_io)
6894 (disable_async_io, check_remote_input_interrupt_request)
6895 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6896 (dead_thread_notify, prepare_resume_reply)
6897 (decode_address_to_semicolon, decode_address, decode_m_packet)
6898 (decode_M_packet, decode_X_packet, decode_xfer_write)
6899 (decode_search_memory_packet, unhexify, hexify)
6900 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6901 (look_up_one_symbol, relocate_instruction)
6902 (monitor_output): Move to remote-utils.h, and include it.
6903 * remote-utils.h: New file.
6904
eebdf26b
PA
69052013-09-05 Pedro Alves <palves@redhat.com>
6906
6907 * server.h (_): Delete.
6908
3aafd2ff
PA
69092013-09-02 Pedro Alves <palves@redhat.com>
6910
6911 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6912 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6913 allocated.
6914 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6915
cee83bcb
PM
69162013-09-02 Pierre Muller <muller@sourceware.org>
6917
6918 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6919 or WriteProcessMemory complete successfully and handle
6920 ERROR_PARTIAL_COPY error.
6921
9a13b2fa
PA
69222013-09-02 Pedro Alves <palves@redhat.com>
6923
6924 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6925 error instead of EIO.
6926
602e3198
JK
69272013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6928
6929 PR server/15604
6930 * linux-low.c: Include filestuff.h.
6931 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6932 * lynx-low.c: Include filestuff.h.
6933 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6934 * server.c: Include filestuff.h.
6935 (main): Call notice_open_fds.
6936 * spu-low.c: Include filestuff.h.
6937 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6938
96d7229d
LM
69392013-08-22 Luis Machado <lgustavo@codesourcery.com>
6940
6941 * Makefile.in: Explain why ../target and ../nat are not
6942 listed as include file search paths.
6943 (linux-waitpid.o): New object file rule.
6944 * configure.srv (srv_native_linux_obj): New variable.
6945 Replace all occurrences of linux native object files with
6946 $srv_native_linux_obj.
6947 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6948 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6949 (linux_enable_event_reporting): Remove declaration.
6950 (my_waitpid): Moved to common/linux-waitpid.c.
6951 (linux_wait_for_event): Pass ptid when calling
6952 linux_enable_event_reporting.
6953 (linux_supports_tracefork_flag): Remove.
6954 (linux_enable_event_reporting): Likewise.
6955 (linux_tracefork_grandchild): Remove.
6956 (STACK_SIZE): Moved to common/linux-ptrace.c.
6957 (linux_tracefork_child): Remove.
6958 (linux_test_for_tracefork): Remove.
6959 (linux_look_up_symbols): Call linux_supports_traceclone.
6960 (initialize_low): Remove call to linux_test_for_tracefork.
6961 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6962 common/linux-ptrace.h.
6963 (PTRACE_TYPE_ARG4): Likewise.
6964 Include linux-ptrace.h.
6965
32940073
PA
69662013-08-21 Pedro Alves <palves@redhat.com>
6967
6968 * config.in: Renegerate.
6969
33b60d58 69702013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6971
33b60d58
LM
6972 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6973 (SFILES): Remove $(srcdir)/common/target-common.c and
6974 add $(srcdir)/target/waitstatus.c.
6975 (OBS): Remove target-common.o and add waitstatus.o.
6976 (server_h): Remove $(srcdir)/../common/target-common.h and
6977 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6978 and $(srcdir)/../target/waitstatus.h.
6979 (target-common.o): Remove.
6980 (waitstatus.o): New target object file.
6981 * target.h: Do not include target-common.h and
6982 include target/resume.h, target/wait.h and
6983 target/waitstatus.h.
6984
b8e1b30e
LM
69852013-08-13 Luis Machado <lgustavo@codesourcery.com>
6986
6987 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6988 to PTRACE_TYPE_ARG3.
6989 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6990 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6991 PTRACE_TYPE_ARG4.
6992 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6993 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6994
7a60ad40
YQ
69952013-07-27 Jie Zhang <jie@codesourcery.com>
6996 Daniel Jacobowitz <dan@codesourcery.com>
6997 Yao Qi <yao@codesourcery.com>
6998
6999 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7000 (mips-linux-watch.o): New rule.
7001 (mips_linux_watch_h): New variable.
7002 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7003 srv_tgtobj.
7004 * linux-mips-low.c: Include mips-linux-watch.h.
7005 (struct arch_process_info, struct arch_lwp_info): New.
7006 (update_watch_registers_callback): New function.
7007 (mips_linux_new_process, mips_linux_new_thread) New functions.
7008 (mips_linux_prepare_to_resume, mips_insert_point): New
7009 functions.
7010 (mips_remove_point, mips_stopped_by_watchpoint): New
7011 functions.
7012 (rsp_bp_type_to_target_hw_bp_type): New function.
7013 (mips_stopped_data_address): New function.
7014 (the_low_target): Add watchpoint support functions.
7015
de6f69ad
YQ
70162013-07-27 Yao Qi <yao@codesourcery.com>
7017
7018 * i386-low.c: Include break-common.h.
7019 (enum target_hw_bp_type): Remove.
7020
3360c0bf
LM
70212013-07-24 Luis Machado <lgustavo@codesourcery.com>
7022
7023 * Makefile.in (SFILES): /common/target-common.c.
7024 (OBS): Add target-common.o.
7025 (server_h): Add $(srcdir)/../common/target-common.h.
7026 (target-common.o): New target.
7027 * server.c (queue_stop_reply_callback): Free
7028 status string after use.
7029 * target.c (target_waitstatus_to_string): Remove.
7030 * target.h: Include target-common.h.
7031 (resume_kind): Likewise.
7032 (target_waitkind): Likewise.
7033 (target_waitstatus): Likewise.
7034 (TARGET_WNOHANG): Likewise.
7035
bd885420
YQ
70362013-07-04 Yao Qi <yao@codesourcery.com>
7037
7038 * Makefile.in (host_alias): Use @host_noncanonical@.
7039 (target_alias): Use @target_noncanonical@.
7040 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7041 ACX_NONCANONICAL_HOST.
7042 * configure: Regenerated.
7043
7044 Revert:
7045 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7046
7047 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7048 * configure: Rebuild.
7049 * Makefile.in (version_host, version_target): Get from configure.
7050 (version.c): Use $(version_host) and $(version_target).
7051
17ef446e
PA
70522013-07-03 Pedro Alves <palves@redhat.com>
7053
7054 * Makefile.in (config.status): Depend on development.sh.
7055 * acinclude.m4: Include libmcheck.m4.
7056 * configure: Regenerate.
7057
7a9a7487
MG
70582013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7059
7060 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7061 attribute inside the parentheses.
7062 (winapi_DebugSetProcessKillOnExit): Ditto.
7063 (winapi_DebugBreakProcess): Ditto.
7064 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7065
49b64de6
MG
70662013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7067
7068 * notif.h (notif_event): Add a dummy member to avoid compiler
7069 errors.
7070
d5749ee7
PA
70712013-07-01 Pedro Alves <palves@redhat.com>
7072
7073 * hostio.c (HOSTIO_PATH_MAX): Define.
7074 (require_filename, handle_open, handle_unlink, handle_readlink):
7075 Use it.
7076
d8d2a3ee
PA
70772013-07-01 Pedro Alves <palves@redhat.com>
7078
7079 * server.h: Include "pathmax.h".
7080 * linux-low.c: Don't include sys/param.h.
7081 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7082 MAXPATHLEN.
7083 * win32-low.c: Don't include sys/param.h.
7084 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7085
bc7dea8d
PA
70862013-07-01 Pedro Alves <palves@redhat.com>
7087
7088 * event-loop.c: Don't check HAVE_UNISTD_H before including
7089 <unistd.h>.
7090 * gdbreplay.c: Likewise.
7091 * remote-utils.c: Likewise.
7092 * server.c: Likewise.
7093 * configure.ac: Don't check for unistd.h.
7094 * configure: Regenerate.
7095
d6c2da54
TT
70962013-06-28 Tom Tromey <tromey@redhat.com>
7097
7098 * Makefile.in (version.c): Use version.in, not
7099 common/version.in.
7100
257b6bec
MG
71012013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7102
7103 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7104 * configure: Rebuild.
7105 * Makefile.in (version_host, version_target): Get from configure.
7106 (version.c): Use $(version_host) and $(version_target).
7107
86ebe149
DK
71082013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7109
7110 Fix trace-status to output user name without trailing colon.
7111 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7112
f30aa5af
DK
71132013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7114
7115 Fix trace-status to output proper start-time and stop-time.
7116 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7117 output start time and stop time in hex as gdb expects.
7118
28a93511
YQ
71192013-06-26 Pedro Alves <pedro@codesourcery.com>
7120
7121 * tracepoint.c (build_traceframe_info_xml): Output trace state
7122 variables present in the trace buffer.
7123
01208463
TT
71242013-06-24 Tom Tromey <tromey@redhat.com>
7125
7126 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7127 create-version.sh.
7128 (version.o): Remove.
7129 * gdbreplay.c: Include version.h.
7130 (version, host_name): Don't declare.
7131 * server.h: Include version.h.
7132 (version, host_name): Don't declare.
7133
760256f9
PA
71342013-06-12 Pedro Alves <palves@redhat.com>
7135
7136 * linux-x86-low.c (linux_is_elf64): Delete global.
7137 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7138 with local linux_pid_exe_is_elf_64_file use.
7139
030031ee
PA
71402013-06-11 Pedro Alves <palves@redhat.com>
7141
7142 * linux-low.c (regset_disabled, disable_regset): New functions.
7143 (regsets_fetch_inferior_registers)
7144 (regsets_store_inferior_registers): Use them.
7145 (initialize_regsets_info); Don't allocate the disabled_regsets
7146 array here.
7147 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7148 comment.
7149
5da6eb0a
PA
71502013-06-11 Pedro Alves <palves@redhat.com>
7151
7152 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7153 xmalloc.
7154
7e5aaa09
PA
71552013-06-11 Pedro Alves <palves@redhat.com>
7156
7157 * linux-x86-low.c (initialize_low_arch): Call
7158 init_registers_x32_avx_linux.
7159
d878444c
JK
71602013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7161
7162 Fix compatibility with Android Bionic.
7163 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7164 it is not empty.
7165
3aee8918
PA
71662013-06-07 Pedro Alves <palves@redhat.com>
7167
5f2b57b5 7168 PR server/14823
3aee8918
PA
7169 * Makefile.in (OBS): Add tdesc.o.
7170 (IPA_OBJS): Add tdesc-ipa.o.
7171 (tdesc-ipa.o): New rule.
7172 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7173 interface.
7174 * linux-low.c (new_inferior): Delete.
7175 (disabled_regsets, num_regsets): Delete.
7176 (linux_add_process): Adjust to set the new per-process
7177 new_inferior flag.
7178 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7179 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7180 was a stop. When calling arch_setup, switch the current inferior
7181 to the thread that got an event.
7182 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7183 (regsets_fetch_inferior_registers)
7184 (regsets_store_inferior_registers): New regsets_info parameter.
7185 Adjust to use it.
7186 (linux_register_in_regsets): New regs_info parameter. Adjust to
7187 use it.
7188 (register_addr, fetch_register, store_register): New usrregs_info
7189 parameter. Adjust to use it.
7190 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7191 parameter regs_info. Adjust to use it.
7192 (linux_fetch_registers): Get the current inferior's regs_info, and
7193 adjust to use it.
7194 (linux_store_registers): Ditto.
7195 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7196 (initialize_low): Don't initialize the target_regsets here. Call
7197 initialize_low_arch.
7198 * linux-low.h (target_regsets): Delete declaration.
7199 (struct regsets_info): New.
7200 (struct usrregs_info): New.
7201 (struct regs_info): New.
7202 (struct process_info_private) <new_inferior>: New field.
7203 (struct linux_target_ops): Delete the num_regs, regmap, and
7204 regset_bitmap fields. New field regs_info.
7205 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7206 * i387-fp.c (num_xmm_registers): Delete.
7207 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7208 calls to new interface.
7209 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7210 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7211 Infer the number of xmm registers from the regcache's target
7212 description.
7213 * i387-fp.h (num_xmm_registers): Delete.
7214 * inferiors.c (add_thread): Don't install the thread's regcache
7215 here.
7216 * proc-service.c (gregset_info): Fetch the current inferior's
7217 regs_info. Adjust to use it.
7218 * regcache.c: Include tdesc.h.
7219 (register_bytes, reg_defs, num_registers)
7220 (gdbserver_expedite_regs): Delete.
7221 (get_thread_regcache): If the thread doesn't have a regcache yet,
7222 create one, instead of aborting gdbserver.
7223 (regcache_invalidate_one): Rename to ...
7224 (regcache_invalidate_thread): ... this.
7225 (regcache_invalidate_one): New.
7226 (regcache_invalidate): Only invalidate registers of the current
7227 process.
7228 (init_register_cache): Add target_desc parameter, and use it.
7229 (new_register_cache): Ditto. Assert the target description has a
7230 non zero registers_size.
7231 (regcache_cpy): Add assertions. Adjust.
7232 (realloc_register_cache, set_register_cache): Delete.
7233 (registers_to_string, registers_from_string): Adjust.
7234 (find_register_by_name, find_regno, find_register_by_number)
7235 (register_cache_size): Add target_desc parameter, and use it.
7236 (free_register_cache_thread, free_register_cache_thread_one)
7237 (regcache_release, register_cache_size): New.
7238 (register_size): Add target_desc parameter, and use it.
7239 (register_data, supply_register, supply_register_zeroed)
7240 (supply_regblock, supply_register_by_name, collect_register)
7241 (collect_register_as_string, collect_register_by_name): Adjust.
7242 * regcache.h (struct target_desc): Forward declare.
7243 (struct regcache) <tdesc>: New field.
7244 (init_register_cache, new_register_cache): Add target_desc
7245 parameter.
7246 (regcache_invalidate_thread): Declare.
7247 (regcache_invalidate_one): Delete declaration.
7248 (regcache_release): Declare.
7249 (find_register_by_number, register_cache_size, register_size)
7250 (find_regno): Add target_desc parameter.
7251 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7252 declarations.
7253 * remote-utils.c: Include tdesc.h.
7254 (outreg, prepare_resume_reply): Adjust.
7255 * server.c: Include tdesc.h.
7256 (gdbserver_xmltarget): Delete declaration.
7257 (get_features_xml, process_serial_event): Adjust.
7258 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7259 declare.
7260 (struct process_info) <tdesc>: New field.
7261 (ipa_tdesc): Declare.
7262 * tdesc.c: New file.
7263 * tdesc.h: New file.
7264 * tracepoint.c: Include tdesc.h.
7265 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7266 (get_context_regcache): Adjust to pass ipa_tdesc down.
7267 (do_action_at_tracepoint): Adjust to get the register cache size
7268 from the context regcache's description.
7269 (traceframe_walk_blocks): Adjust to get the register cache size
7270 from the current trace frame's description.
7271 (traceframe_get_pc): Adjust to get current trace frame's
7272 description and pass it down.
7273 (gdb_collect): Adjust to get the register cache size from the
7274 IPA's description.
7275 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7276 (gdbserver_xmltarget): Delete.
7277 (initialize_low_tracepoint): Set the ipa's target description.
7278 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7279 (initialize_low_tracepoint): Set the ipa's target description.
7280 * linux-x86-low.c: Include tdesc.h.
7281 [__x86_64__] (is_64bit_tdesc): New.
7282 (ps_get_thread_area, x86_get_thread_area): Use it.
7283 (i386_cannot_store_register): Rename to ...
7284 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7285 (i386_cannot_fetch_register): Rename to ...
7286 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7287 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7288 to new interface.
7289 (target_regsets): Rename to ...
7290 (x86_regsets): ... this.
7291 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7292 interface.
7293 (x86_siginfo_fixup): Use is_64bit_tdesc.
7294 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7295 (tdesc_x32_avx_linux, tdesc_x32_linux)
7296 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7297 Declare.
7298 (x86_linux_update_xmltarget): Delete.
7299 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7300 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7301 (AMD64_LINUX_USER64_CS): New.
7302 (x86_linux_read_description): New, based on
7303 x86_linux_update_xmltarget.
7304 (same_process_callback): New.
7305 (x86_arch_setup_process_callback): New.
7306 (x86_linux_update_xmltarget): New.
7307 (x86_regsets_info): New.
7308 (amd64_linux_regs_info): New.
7309 (i386_linux_usrregs_info): New.
7310 (i386_linux_regs_info): New.
7311 (x86_linux_regs_info): New.
7312 (x86_arch_setup): Reimplement.
7313 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7314 (x86_emit_ops): Ditto.
7315 (the_low_target): Adjust. Install x86_linux_regs_info,
7316 x86_cannot_fetch_register, and x86_cannot_store_register.
7317 (initialize_low_arch): New.
7318 * linux-ia64-low.c (tdesc_ia64): Declare.
7319 (ia64_fetch_register): Adjust.
7320 (ia64_usrregs_info, regs_info): New globals.
7321 (ia64_regs_info): New function.
7322 (the_low_target): Adjust.
7323 (initialize_low_arch): New function.
7324 * linux-sparc-low.c (tdesc_sparc64): Declare.
7325 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7326 Adjust.
7327 (sparc_arch_setup): New function.
7328 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7329 (the_low_target): Adjust.
7330 (initialize_low_arch): New function.
7331 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7332 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7333 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7334 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7335 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7336 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7337 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7338 (tdesc_powerpc_isa205_vsx64l): Declare.
7339 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7340 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7341 (ppc_set_pc, ppc_get_hwcap): Adjust.
7342 (ppc_usrregs_info): Forward declare.
7343 (!__powerpc64__) ppc_regmap_adjusted: New global.
7344 (ppc_arch_setup): Adjust to the current process'es target
7345 description.
7346 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7347 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7348 (ppc_store_evrregset): Adjust.
7349 (target_regsets): Rename to ...
7350 (ppc_regsets): ... this, and make static.
7351 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7352 (ppc_regs_info): New function.
7353 (the_low_target): Adjust.
7354 (initialize_low_arch): New function.
7355 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7356 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7357 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7358 (tdesc_s390x_linux64v2): Declare.
7359 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7360 (s390_fill_gregset, s390_store_last_break): Adjust.
7361 (target_regsets): Rename to ...
7362 (s390_regsets): ... this, and make static.
7363 (s390_get_pc, s390_set_pc): Adjust.
7364 (s390_get_hwcap): New target_desc parameter, and use it.
7365 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7366 (s390_arch_setup): Adjust to set the current process'es target
7367 description. Don't adjust the regmap.
7368 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7369 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7370 (regs_info_3264): New globals.
7371 (s390_regs_info): New function.
7372 (the_low_target): Adjust.
7373 (initialize_low_arch): New function.
7374 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7375 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7376 [__mips64] (init_registers_mips_linux)
7377 (init_registers_mips_dsp_linux): Delete defines.
7378 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7379 (have_dsp): New global.
7380 (mips_read_description): New, based on mips_arch_setup.
7381 (mips_arch_setup): Reimplement.
7382 (get_usrregs_info): New function.
7383 (mips_cannot_fetch_register, mips_cannot_store_register)
7384 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7385 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7386 (target_regsets): Rename to ...
7387 (mips_regsets): ... this, and make static.
7388 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7389 (dsp_regs_info, regs_info): New globals.
7390 (mips_regs_info): New function.
7391 (the_low_target): Adjust.
7392 (initialize_low_arch): New function.
7393 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7394 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7395 Declare.
7396 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7397 (arm_read_description): New, with bits factored from
7398 arm_arch_setup.
7399 (arm_arch_setup): Reimplement.
7400 (target_regsets): Rename to ...
7401 (arm_regsets): ... this, and make static.
7402 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7403 (arm_regs_info): New function.
7404 (the_low_target): Adjust.
7405 (initialize_low_arch): New function.
7406 * linux-m68k-low.c (tdesc_m68k): Declare.
7407 (target_regsets): Rename to ...
7408 (m68k_regsets): ... this, and make static.
7409 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7410 (m68k_regs_info): New function.
7411 (m68k_arch_setup): New function.
7412 (the_low_target): Adjust.
7413 (initialize_low_arch): New function.
7414 * linux-sh-low.c (tdesc_sharch): Declare.
7415 (target_regsets): Rename to ...
7416 (sh_regsets): ... this, and make static.
7417 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7418 (sh_regs_info, sh_arch_setup): New functions.
7419 (the_low_target): Adjust.
7420 (initialize_low_arch): New function.
7421 * linux-bfin-low.c (tdesc_bfin): Declare.
7422 (bfin_arch_setup): New function.
7423 (bfin_usrregs_info, regs_info): New globals.
7424 (bfin_regs_info): New function.
7425 (the_low_target): Adjust.
7426 (initialize_low_arch): New function.
7427 * linux-cris-low.c (tdesc_cris): Declare.
7428 (cris_arch_setup): New function.
7429 (cris_usrregs_info, regs_info): New globals.
7430 (cris_regs_info): New function.
7431 (the_low_target): Adjust.
7432 (initialize_low_arch): New function.
7433 * linux-cris-low.c (tdesc_crisv32): Declare.
7434 (cris_arch_setup): New function.
7435 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7436 (cris_regs_info): New function.
7437 (the_low_target): Adjust.
7438 (initialize_low_arch): New function.
7439 * linux-m32r-low.c (tdesc_m32r): Declare.
7440 (m32r_arch_setup): New function.
7441 (m32r_usrregs_info, regs_info): New globals.
7442 (m32r_regs_info): Adjust.
7443 (initialize_low_arch): New function.
7444 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7445 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7446 (tic6x_usrregs_info): Forward declare.
7447 (tic6x_read_description): New function, based on ...
7448 (tic6x_arch_setup): ... this. Reimplement.
7449 (target_regsets): Rename to ...
7450 (tic6x_regsets): ... this, and make static.
7451 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7452 (tic6x_regs_info): New function.
7453 (the_low_target): Adjust.
7454 (initialize_low_arch): New function.
7455 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7456 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7457 (target_regsets): Rename to ...
7458 (xtensa_regsets): ... this, and make static.
7459 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7460 globals.
7461 (xtensa_arch_setup, xtensa_regs_info): New functions.
7462 (the_low_target): Adjust.
7463 (initialize_low_arch): New function.
7464 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7465 (nios2_arch_setup): Set the current process'es tdesc.
7466 (target_regsets): Rename to ...
7467 (nios2_regsets): ... this.
7468 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7469 (nios2_regs_info): New function.
7470 (the_low_target): Adjust.
7471 (initialize_low_arch): New function.
a261b8f5
PA
7472 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7473 (aarch64_arch_setup): Set the current process'es tdesc.
7474 (target_regsets): Rename to ...
7475 (aarch64_regsets): ... this.
7476 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7477 (aarch64_regs_info): New function.
7478 (the_low_target): Adjust.
7479 (initialize_low_arch): New function.
3aee8918
PA
7480 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7481 globals.
7482 (target_regsets): Rename to ...
7483 (tile_regsets): ... this.
7484 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7485 (tile_regs_info): New function.
7486 (tile_arch_setup): Set the current process'es tdesc.
7487 (the_low_target): Adjust.
7488 (initialize_low_arch): New function.
7489 * spu-low.c (tdesc_spu): Declare.
7490 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7491 * win32-arm-low.c (tdesc_arm): Declare.
7492 (arm_arch_setup): New function.
7493 (the_low_target): Install arm_arch_setup instead of
7494 init_registers_arm.
7495 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7496 (init_windows_x86): Rename to ...
7497 (i386_arch_setup): ... this. Set `win32_tdesc'.
7498 (the_low_target): Adjust.
7499 * win32-low.c (win32_tdesc): New global.
7500 (child_add_thread): Don't create the thread cache here.
7501 (do_initial_child_stuff): Set the new process'es tdesc.
7502 * win32-low.h (struct target_desc): Forward declare.
7503 (win32_tdesc): Declare.
7504 * lynx-i386-low.c (tdesc_i386): Declare global.
7505 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7506 * lynx-low.c (lynx_tdesc): New global.
7507 (lynx_add_process): Set the new process'es tdesc.
7508 * lynx-low.h (struct target_desc): Forward declare.
7509 (lynx_tdesc): Declare global.
7510 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7511 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7512 * nto-low.c (nto_tdesc): New global.
7513 (do_attach): Set the new process'es tdesc.
7514 * nto-low.h (struct target_desc): Forward declare.
7515 (nto_tdesc): Declare.
7516 * nto-x86-low.c (tdesc_i386): Declare.
7517 (nto_x86_arch_setup): Set `nto_tdesc'.
7518
b1fbec62
GB
75192013-06-04 Gary Benson <gbenson@redhat.com>
7520
7521 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7522 to qSupported response when appropriate.
7523 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7524 with nonzero-length annex.
7525 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7526 arguments supplied in annex.
7527
d1ec4ce7
DE
75282013-05-31 Doug Evans <dje@google.com>
7529
ac44adcb 7530 PR server/15594
d1ec4ce7
DE
7531 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7532 64 bits in 64-cross-32 environment.
7533
9b25f2d3
PA
75342013-05-28 Pedro Alves <palves@redhat.com>
7535
7536 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7537 (aarch64-without-fpu.c): Delete rule.
7538 * configure.srv (aarch64*-*-linux*): Remove references to
7539 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7540 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7541 declaration.
7542
6740dc9c
PA
75432013-05-24 Pedro Alves <palves@redhat.com>
7544
7545 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7546 instead of strchr/decode_address. Error if the range isn't split
7547 with a ','. Don't assume there's be a ':' in the action.
7548
c2d6af84
PA
75492013-05-23 Yao Qi <yao@codesourcery.com>
7550 Pedro Alves <palves@redhat.com>
7551
7552 * linux-low.c (lwp_in_step_range): New function.
7553 (linux_wait_1): If the thread was range stepping and stopped
7554 outside the stepping range, report the stop to GDB. Otherwise,
7555 continue stepping. Add range stepping debug output.
7556 (linux_set_resume_request): Copy the step range from the resume
7557 request to the lwp.
7558 (linux_supports_range_stepping): New.
7559 (linux_target_ops) <supports_range_stepping>: Set to
7560 linux_supports_range_stepping.
7561 * linux-low.h (struct linux_target_ops)
7562 <supports_range_stepping>: New field.
7563 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7564 * linux-x86-low.c (x86_supports_range_stepping): New.
7565 (the_low_target) <supports_range_stepping>: Set to
7566 x86_supports_range_stepping.
7567 * server.c (handle_v_cont): Handle 'r' action.
7568 (handle_v_requests): Append ";r" if the target supports range
7569 stepping.
7570 * target.h (struct thread_resume) <step_range_start,
7571 step_range_end>: New fields.
7572 (struct target_ops) <supports_range_stepping>:
7573 New field.
7574 (target_supports_range_stepping): New macro.
7575
58794e1a
JB
75762013-05-17 Joel Brobecker <brobecker@adacore.com>
7577
7578 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7579 confusion in comment.
7580
d631c5a7
JB
75812013-05-17 Joel Brobecker <brobecker@adacore.com>
7582
7583 * lynx-low.c (struct process_info_private): New type.
7584 (lynx_add_process): New function.
7585 (lynx_create_inferior, lynx_attach): Replace calls to
7586 add_process by calls to lynx_add_process.
7587 (lynx_resume): If PTID is null, then try using
7588 current_process()->private->last_wait_event_ptid.
7589 Add comments.
7590 (lynx_clear_inferiors): Delete. The contents of that function
7591 has been inlined in lynx_mourn;
7592 (lynx_wait_1): Save the ptid in the process's private data.
7593 (lynx_mourn): Free the process' private data. Replace call
7594 to lynx_clear_inferiors by call to clear_inferiors.
7595
96f7a20f
YQ
75962013-05-17 Yao Qi <yao@codesourcery.com>
7597
7598 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7599 the right place.
7600
db0dfaa0
LM
76012013-05-16 Luis Machado <lgustavo@codesourcery.com>
7602
7603 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7604 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7605 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7606 PT_TEXT_END_ADDR guards. Update comments.
7607 (linux_target_op) <read_offsets>: Conditionally define to
7608 linux_read_offsets if the target is UCLIBC and if it defines
7609 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7610
68f5f838
SL
76112013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7612 Andrew Jenner <andrew@codesourcery.com>
7613
7614 * Makefile.in (SFILES): Add linux-nios2-low.c.
7615 (clean): Add action to delete nios2-linux.c.
7616 (nios2-linux.c): New rule.
7617 * configure.srv: Add nios2*-*-linux*.
7618 * linux-nios2-low.c: New.
7619
1ebff1fd
HAQ
76202013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7621
7622 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7623
f6150862
HZ
76242013-04-25 Hui Zhu <hui@codesourcery.com>
7625
7626 PR gdb/15186
f6150862
HZ
7627 * ax.c (ax_printf): Add fflush.
7628
614c279d
TT
76292013-04-22 Tom Tromey <tromey@redhat.com>
7630
7631 * Makefile.in (SFILES): Add filestuff.c.
7632 (OBS): Add filestuff.o.
7633 (filestuff.o): New target.
7634 * config.in, configure: Rebuild.
7635 * configure.ac: Check for fdwalk, pipe2.
7636
7d4e5717
PA
76372013-04-17 Pedro Alves <palves@redhat.com>
7638
7639 * configure.ac (USE_THREAD_DB): Delete variable.
7640 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7641 Don't AC_SUBST USE_THREAD_DB.
7642 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7643 * config.in, configure: Regenerate.
7644
d5c93e41
PA
76452013-04-16 Pedro Alves <palves@redhat.com>
7646
7647 * linux-low.h (struct lwp_info) <thread_known>: Move under
7648 the USE_THREAD_DB #ifdef.
7649
04f5fe89
PA
76502013-04-16 Pedro Alves <palves@redhat.com>
7651
7652 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7653 (linux-low.o): Delete rule.
7654 * linux-low.h: Always include "gdb_thread_db.h" instead of
7655 conditionally including thread_db.h.
7656 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7657 HAVE_THREAD_DB_H.
7658
480b27bf
JK
76592013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7660
7661 * Makefile.in (install-only): Fix make install regression.
7662
43662968
JK
76632013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7664
7665 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7666 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7667 installation.
7668 * gdbserver.1: Remove.
7669
3e74e146
PA
76702013-03-22 Pedro Alves <palves@redhat.com>
7671
7672 * linux-low.c (handle_extended_wait): Don't call
7673 linux_enable_event_reporting.
7674
a8347a2a
TT
76752013-03-15 Tony Theodore <tonyt@logyst.com>
7676
7677 PR build/9098:
7678 * Makefile.in (SHELL): Use @SHELL@.
7679
eeb56fa7
SDJ
76802013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7681
7682 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7683 compiler warning.
7684
4fa7e2ff
JB
76852013-03-13 Joel Brobecker <brobecker@adacore.com>
7686
7687 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7688 Remove extraneous NULL element.
7689
8ddb1965
YQ
76902013-03-13 Yao Qi <yao@codesourcery.com>
7691
7692 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7693 'V' block in trace frame.
7694
9accd112
MM
76952013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7696
7697 * target.h (struct target_ops): Add btrace ops.
7698 (target_supports_btrace): New macro.
7699 (target_enable_btrace): New macro.
7700 (target_disable_btrace): New macro.
7701 (target_read_btrace): New macro.
7702 * gdbthread.h (struct thread_info): Add btrace field.
7703 * server.c: Include btrace-common.h.
7704 (handle_btrace_general_set): New function.
7705 (handle_btrace_enable): New function.
7706 (handle_btrace_disable): New function.
7707 (handle_general_set): Call handle_btrace_general_set.
7708 (handle_qxfer_btrace): New function.
7709 (struct qxfer qxfer_packets[]): Add btrace entry.
7710 * inferiors.c (remove_thread): Disable btrace.
7711 * linux-low: Include linux-btrace.h.
7712 (linux_low_enable_btrace): New function.
7713 (linux_low_read_btrace): New function.
7714 (linux_target_ops): Add btrace ops.
7715 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7716 Add srv_linux_btrace=yes.
7717 (x86_64-*-linux*): Add linux-btrace.o.
7718 Add srv_linux_btrace=yes.
7719 * configure.ac: Define HAVE_LINUX_BTRACE.
7720 * config.in: Regenerated.
7721 * configure: Regenerated.
7722
5cc22e4c
MM
77232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7724
7725 * server.c (handle_qxfer): Preserve error message if -3 is
7726 returned.
7727 (qxfer): Document the -3 return value.
7728
7c97f91e
MM
77292013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7730
7731 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7732 (linux_btrace_h): New variable.
7733 (linux-btrace.o): New rule.
7734
be9a119c 77352013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7736 Hafiz Abid Qadeer <abidh@codesourcery.com>
7737
7738 * tracepoint.c (trace_buffer_size): New global.
7739 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7740 (init_trace_buffer): Change to one-argument function. Allocate
7741 trace buffer memory.
7742 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7743 handle QTBuffer:size packet.
7744 (cmd_bigqtbuffer_size): New function.
7745 (initialize_tracepoint): Call init_trace_buffer with
7746 DEFAULT_TRACE_BUFFER_SIZE.
7747 * server.c (handle_query): Add QTBuffer:size in the
7748 supported packets.
7749
e64f7499
YQ
77502013-03-07 Yao Qi <yao@codesourcery.com>
7751
7752 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7753 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7754 of -1.
7755 (cmd_qtsp): Adjust condition. Do post increment.
7756 Set cur_action and cur_step_action back to 0.
7757
f0ae6fc3
PA
77582013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7759
7760 PR server/15236
7761 * linux-low.c (linux_write_memory): Return early success if LEN is
7762 zero.
7763
b5b0b0af
CV
77642013-03-05 Corinna Vinschen <vinschen@redhat.de>
7765
334ad4a8 7766 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7767
589bc927
TT
77682013-02-28 Tom Tromey <tromey@redhat.com>
7769
7770 * configure.ac: Invoke AC_SYS_LARGEFILE.
7771 * configure, config.in: Rebuild.
7772
dfe07582
CV
77732013-02-28 Corinna Vinschen <vinschen@redhat.com>
7774
7775 * win32-low.c: Throughout, fix format strings and casts of
7776 printf-like functions to avoid type related warnings on all
7777 platforms.
7778 (get_child_debug_event): Print dwDebugEventCode as hex since
7779 that's how it's usually documented.
7780
736cd585
YQ
77812013-02-28 Yao Qi <yao@codesourcery.com>
7782
7783 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7784 pulongest.
7785
e1f58301
JW
77862013-02-27 Jiong Wang <jiwang@tilera.com>
7787
7788 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7789 (reg-tilegx32.c): New rule.
7790 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7791 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7792 different register info initializer according to elf class.
7793 (init_registers_tilgx32): New function. The tilegx32 register info
7794 initializer.
7795 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7796 (tile_store_gregset): Likewise.
7797
d171ca78
YQ
77982013-02-27 Yao Qi <yao@codesourcery.com>
7799
7800 * server.c (process_point_options): Print debug message when
7801 debug_threads is true.
7802
282bbdf3
YQ
78032013-02-26 Yao Qi <yao@codesourcery.com>
7804
7805 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7806
aca22551
PA
78072013-02-19 Pedro Alves <palves@redhat.com>
7808 Kai Tietz <ktietz@redhat.com>
7809
7810 PR gdb/15161
7811
7812 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7813 instead of strtoul to extract address from packet.
7814 (process_serial_event) <'z'>: Likewise.
7815
4f3cee1c
YQ
78162013-02-18 Yao Qi <yao@codesourcery.com>
7817
7818 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7819
8e1d55a3
PA
78202013-02-14 Pedro Alves <palves@redhat.com>
7821
7822 Plug memory leak.
7823
7824 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7825 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7826
458820da
PA
78272013-02-14 Pedro Alves <palves@redhat.com>
7828
7829 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7830
baea0dae
PA
78312013-02-14 Pedro Alves <palves@redhat.com>
7832
7833 * tracepoint.c (save_string): Delete.
7834 (add_tracepoint_action): Use savestring instead of save_string.
7835
0b1afbb3
PA
78362013-02-12 Pedro Alves <palves@redhat.com>
7837
7838 * linux-xtensa-low.c: Ditto.
7839 * xtensa-xtregs.c: Ditto.
7840
8a4ac37e
PA
78412013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7842
7843 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7844 thread_db.
7845
148de6bb
MS
78462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7847
7848 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7849 aarch64_num_wp_regs and aarch64_num_bp_regs to
7850 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7851
55fac6e0
MS
78522013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7853
7854 * linux-aarch64-low.c (ps_get_thread_area): Replace
7855 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7856
176eb98c
MS
78572013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7858 Marcus Shawcroft <marcus.shawcroft@arm.com>
7859 Nigel Stephens <nigel.stephens@arm.com>
7860 Yufeng Zhang <yufeng.zhang@arm.com>
7861
7862 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7863 (aarch64.c, aarch64-without-fpu.c): New targets.
7864 * configure.srv (aarch64*-*-linux*): New.
7865 * linux-aarch64-low.c: New file.
7866
56f7af9c
MS
78672013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7868
43aaf8b6 7869 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7870 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7871 (dequeue_one_deferred_signal, linux_resume_one_thread)
7872 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7873 (linux_tracefork_grandchild, linux_test_for_tracefork)
7874 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7875 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7876 where the argument is 0.
7877
60f662b0
YQ
78782013-01-25 Yao Qi <yao@codesourcery.com>
7879
7880 * event-loop.c: Include "queue.h".
7881 (gdb_event_p): New typedef.
7882 (struct gdb_event) <next_event>: Remove.
7883 (event_queue): Change to QUEUE(gdb_event_p).
7884 (async_queue_event): Remove.
7885 (gdb_event_xfree): New.
7886 (initialize_event_loop): New.
7887 (process_event): Use API from QUEUE.
7888 (wait_for_event): Likewise.
7889 * server.c (main): Call initialize_event_loop.
7890 * server.h (initialize_event_loop): Declare.
7891
5ae4861a
YQ
78922013-01-18 Yao Qi <yao@codesourcery.com>
7893
7894 * ax.h (struct eval_agent_expr_context): New.
7895 (gdb_eval_agent_expr): Update declaration.
7896 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7897 TFRAME. Add new argument CTX.
7898 * server.h (struct eval_agent_expr_context): Declare.
7899 (agent_mem_read, agent_tsv_read): Update declaration.
7900 (agent_mem_read_string): Likewise.
7901 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7902 (add_traceframe_block): Add new argument TPOINT.
7903 Increase TPOINT->traceframe_usage.
7904 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7905 eval_tracepoint_agent_expr.
7906 (condition_true_at_tracepoint): Likewise.
7907 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7908 (agent_mem_read_string, agent_tsv_read): Likewise.
7909
85e00e85
YQ
79102013-01-16 Yao Qi <yao@codesourcery.com>
7911
7912 * linux-low.c (linux_resume_one_lwp): Don't check
7913 'lwp->bp_reinsert != 0'.
7914
4039cf45
JB
79152013-01-07 Joel Brobecker <brobecker@adacore.com>
7916 Pedro Alves <palves@redhat.com>
7917
7918 * lynx-low.c (ptrace_request_to_str): Define a temporary
7919 macro and use it to simplify this function's implementation.
7920
9044dee2
JB
79212013-01-07 Joel Brobecker <brobecker@adacore.com>
7922
7923 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7924 sets errno.
7925
e6352c8f
JB
79262013-01-07 Joel Brobecker <brobecker@adacore.com>
7927
7928 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7929
50681a27
JB
79302013-01-07 Joel Brobecker <brobecker@adacore.com>
7931
7932 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7933
3f6e77ef
JB
79342013-01-07 Joel Brobecker <brobecker@adacore.com>
7935
7936 * lynx-low.c (lynx_resume): Use the resume_info parameter
7937 to determine the ptid for the lynx_ptrace call, unless
7938 it is equal to minus_one_ptid, in which case we use the
7939 ptid of the current_inferior.
7940 (lynx_wait_1): After having received a thread create/exit
7941 event, resume the inferior's execution using the signaling
7942 thread's ptid, rather than the old ptid.
7943
7fda33ae
JB
79442013-01-07 Joel Brobecker <brobecker@adacore.com>
7945
7946 * lynx-low.c (lynx_resume): Delete variable ret.
7947
b9786c74
JB
79482013-01-01 Joel Brobecker <brobecker@adacore.com>
7949
7950 * gdbreplay.c (gdbreplay_version): Update copyright year.
7951 * server.c (gdbserver_version): Likewise.
7952
8b93d60f
JB
79532012-12-17 Joel Brobecker <brobecker@adacore.com>
7954
7955 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7956 new thread.
7957
037335a7
JB
79582012-12-17 Joel Brobecker <brobecker@adacore.com>
7959
7960 * lynx-low.c (ptrace_request_to_str): Add handling for
7961 PTRACE_GETTRACESIG.
7962
52d4cbd8
JB
79632012-12-17 Joel Brobecker <brobecker@adacore.com>
7964
7965 * lynx-low.c (lynx_attach): Delete variable new_process.
7966
ab8f6ca9
JB
79672012-12-17 Joel Brobecker <brobecker@adacore.com>
7968
7969 * lynx-low.c (lynx_create_inferior): Delete variable
7970 new_process.
7971
78cbc024
JB
79722012-12-17 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (ptrace_request_to_str): Do not handle
7975 PTRACE_GETTHREADLIST if this macro does not exist.
7976
14a00470
YQ
79772012-12-15 Yao Qi <yao@codesourcery.com>
7978
7979 * Makefile.in (OBS): Add notif.o.
7980 * notif.c, notif.h: New.
7981 * server.c: Include "notif.h".
7982 (struct vstop_notif) <next>: Remove.
7983 <base>: New field.
7984 (queue_stop_reply): Update.
7985 (push_event, send_next_stop_reply): Remove.
7986 (discard_queued_stop_replies): Update.
7987 (notif_stop): New variable.
7988 (handle_v_stopped): Remove.
7989 (handle_v_requests): Don't call handle_v_stopped. Call
7990 handle_ack_notif instead.
7991 (queue_stop_reply_callback): Call notif_event_enque instead
7992 of queue_stop_reply.
7993 (handle_status): Don't call send_next_stop_reply, call
7994 notif_write_event instead.
7995 (kill_inferior_callback): Likewise.
7996 (detach_or_kill_inferior_callback): Likewise.
7997 (main): Call initialize_notif.
7998 (process_serial_event): Call QUEUE_is_empty.
7999 (handle_target_event): Call notif_push instead of push event.
8000 * server.h (push_event): Remove declaration.
8001
61c125b9
TT
80022012-12-10 Tom Tromey <tromey@redhat.com>
8003
8004 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8005 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8006 macros.
8007 (.c.o): Rewrite.
8008 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8009 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8010 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8011 (amd64-linux-ipa.o, ax.o): Rewrite.
8012 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8013 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8014 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8015 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8016 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8017 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8018 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8019 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8020 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8021 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8022 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8023 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8024 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8025 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8026 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8027 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8028 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8029 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8030 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8031 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8032 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8033 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8034 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8035 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8036 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8037 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8038 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8039 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8040 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8041 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8042 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8043 (reg-tilegx.o): Remove.
8044 (all_object_files): New macro.
8045 Include .deps files.
8046 * aclocal.m4, configure: Rebuild.
8047 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8048 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8049 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8050
e90e9ad9
TT
80512012-12-05 Tom Tromey <tromey@redhat.com>
8052
8053 PR gdb/14917:
8054 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8055
02d403bf 80562012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8057
8058 * configure.ac: Check for linux/perf_event.h.
8059 * config.in: Regenerated.
8060 * configure: Regenerated.
8061
0270a750
PA
80622012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8063
8064 * hostio.c (handle_readlink): Decrease buffer size
8065 parameter passed to readlink by one byte.
8066
8c29b58e
YQ
80672012-11-26 Yao Qi <yao@codesourcery.com>
8068
8069 * configure.ac (build_warnings): Append '-Wempty-body'.
8070 * configure: Regenerated.
8071 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8072 body.
8073
8bdce1ff
PM
80742012-11-15 Pierre Muller <muller@sourceware.org>
8075
8076 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8077 * config.in: Regenerate.
8078 * configure: Regenerate.
8079 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8080 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8081 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8082 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8083 header.
8084 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8085 instead of <sys/wait.h> header.
8086 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8087
02d403bf 80882012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8089
8090 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8091 (various make rules): Remove -DGDBSERVER
8092
fbd5db48
YQ
80932012-11-09 Yao Qi <yao@codesourcery.com>
8094
8095 * spu-low.c (current_ptid): Move it to ..
8096 * gdbthread.h: ... here. New.
8097 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8098 * server.c (myresume, process_serial_event): Likewise.
8099 * thread-db.c (thread_db_find_new_threads): Likewise.
8100 * tracepoint.c (run_inferior_command): Likewise.
8101
b3dc46ff
AB
81022012-10-01 Andrew Burgess <aburgess@broadcom.com>
8103
8104 * server.c (handle_search_memory_1): Include access length in
8105 warning message.
8106
07c04788
HPN
81072012-09-05 Michael Brandt <michael.brandt@axis.com>
8108
8109 * linux-crisv32-low.c: Fix compile errors.
8110
918d227b
YQ
81112012-09-04 Yao Qi <yao@codesourcery.com>
8112
8113 * tracepoint.c (cmd_qtsv): Adjust debug message.
8114 Don't check CUR_TPOINT.
8115
18c1b81a
YQ
81162012-08-28 Yao Qi <yao@codesourcery.com>
8117
8118 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8119 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8120 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8121 Remove declarations of xmalloc, xreallloc, xstrdup and
8122 freeargv.
8123 * Makefile.in (libiberty_h): New.
8124 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8125 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8126
dc82f37b
YQ
81272012-08-23 Yao Qi <yao@codesourcery.com>
8128
8129 * server.h: Remove declaration of 'xsnprintf'.
8130
406b1477
KS
81312012-08-22 Keith Seitz <keiths@redhat.com>
8132
8133 * server.h: Include build-gnulib-gbserver/config.h.
8134 * gdbreplay.c: Likewise.
8135
e6712ff1
DE
81362012-08-08 Doug Evans <dje@google.com>
8137
8138 * Makefile.in (SFILES): Add gdb_vecs.c.
8139 (OBS): Add gdb_vecs.o.
8140 (gdb_vecs_h, host_defs_h): New variables.
8141 (thread-db.o): Add $(gdb_vecs_h) dependency.
8142 (gdb_vecs.o): New rule.
8143 * thread-db.c: #include "gdb_vecs.h".
8144 (thread_db_load_search): Use a vector to iterate over path elements.
8145 Handle text appearing after "$pdir".
8146
8147 * configure.ac: Add check for strstr.
8148 * config.in: Regenerate.
8149 * configure: Regenerate.
8150
7c3270ae
UW
81512012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8152
8153 * hostio.c (handle_pread): If pread fails, fall back to attempting
8154 lseek/read.
8155 (handle_pwrite): Likewise for pwrite.
8156
b62e2b27
UW
81572012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8158
8159 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8160 between unsupported TYPE and unimplementable ADDR/LEN combination.
8161 (arm_insert_point): Act on new return value.
8162
78a99e91
PA
81632012-07-31 Pedro Alves <palves@redhat.com>
8164
8165 * server.c (process_point_options): Only skip tokens if we find
8166 one that is unrecognized. Don't treat 'X' specially while
8167 skipping unrecognized tokens.
8168
fcf303ab
UW
81692012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8170
8171 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8172 to 4-byte-align HW breakpoint addresses for Thumb.
8173
7255706c
YQ
81742012-07-27 Yao Qi <yao@codesourcery.com>
8175
8176 PR remote/14161.
8177
8178 * server.h: Declare gdb_agent_about_to_close.
8179 * target.c (kill_inferior): Include "agent.h".
8180 New. Send command 'kill'.
8181 * target.h (kill_inferior): Removed macro.
8182 * tracepoint.c (gdb_agent_about_to_close): New.
8183 (gdb_agent_helper_thread): Handle command 'close'.
8184 Wait endlessly until the inferior stops.
8185 Install gdb_agent_remove_socket to atexit hook.
8186 (agent_socket_name): New static variable.
8187 (gdb_agent_socket_init): Replace local variable 'name' with
8188 'agent_socket_name'.
8189 (gdb_agent_remove_socket): New.
8190
5a3f286f
YQ
81912012-07-27 Yao Qi <yao@codesourcery.com>
8192
8193 * server.c (process_point_options): Stop at 'X' when parsing.
8194
961bd387
ME
81952012-07-19 Michael Eager <eager@eagercon.com>
8196
a261b8f5 8197 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8198 to hw_execute.
8199 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8200 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8201 hardware breakpoint.
8202
aa7c7447
JK
82032012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8204
8205 * gdbserver/linux-low.c (initialize_low): Call
8206 linux_ptrace_init_warnings.
8207
7f216e7c
DE
82082012-07-02 Doug Evans <dje@google.com>
8209
8210 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8211 pointer to int.
8212
d3ce09f5
SS
82132012-07-02 Stan Shebs <stan@codesourcery.com>
8214
8215 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8216 (ax.o): Add it to build rule.
8217 (ax-ipa.o): Ditto.
8218 (OBS): Add format.o.
8219 (IPA_OBS): Add format.o.
8220 * server.c (handle_query): Claim support for breakpoint commands.
8221 (process_point_options): Add command case.
8222 (process_serial_event): Leave running if there are printfs in
8223 effect.
8224 * mem-break.h (any_persistent_commands): Declare.
8225 (add_breakpoint_commands): Declare.
8226 (gdb_no_commands_at_breakpoint): Declare.
8227 (run_breakpoint_commands): Declare.
8228 * mem-break.c (struct point_command_list): New struct.
8229 (struct breakpoint): New field command_list.
8230 (any_persistent_commands): New function.
8231 (add_commands_to_breakpoint): New function.
8232 (add_breakpoint_commands): New function.
8233 (gdb_no_commands_at_breakpoint): New function.
8234 (run_breakpoint_commands): New function.
8235 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8236 locally.
8237 * ax.c: Include format.h.
8238 (ax_printf): New function.
8239 (gdb_eval_agent_expr): Add printf opcode.
8240
2f8f6aed
YQ
82412012-06-13 Yao Qi <yao@codesourcery.com>
8242
8243 * server.c (start_inferior): Remove duplicated writes to fields
8244 'last_resume_kind' and 'last_status' of 'current_inferior'.
8245
0c9070b3
YQ
82462012-06-12 Yao Qi <yao@codesourcery.com>
8247 Pedro Alves <palves@redhat.com>
8248
8249 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8250 comment.
8251 * server.c (handle_v_cont): Extend comment.
8252
c52daf70
YQ
82532012-06-11 Yao Qi <yao@codesourcery.com>
8254
8255 * linux-low.c (linux_attach): Add 'static'.
8256
d38bbb0a
YQ
82572012-06-06 Yao Qi <yao@codesourcery.com>
8258
8259 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8260
89dc0afd
JK
82612012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8262
8263 Fix gcc -flto compilation warning.
8264 * server.c (main): Make variable multi_mode and attach volatile.
8265
75f62ce7
TJB
82662012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8267
8268 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8269 if the platform doesn't know about it.
8270
65f479b6
PA
82712012-05-30 Jeff Kenton <jkenton@tilera.com>
8272
8273 * Makefile.in (SFILES): Add linux-tile-low.c.
8274 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8275 * configure.srv: Handle tilegx-*-linux*.
8276 * linux-tile-low.c: New file.
8277
0c5bf5a9
JK
82782012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8279
8280 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8281
a493e3e2
PA
82822012-05-24 Pedro Alves <palves@redhat.com>
8283
8284 PR gdb/7205
8285
43aaf8b6 8286 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8287
2ea28649
PA
82882012-05-24 Pedro Alves <palves@redhat.com>
8289
8290 PR gdb/7205
8291
8292 Replace target_signal with gdb_signal throughout.
8293
8d409d16
MR
82942012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8295
8296 * linux-low.c (linux_store_registers): Avoid the copying sequence
8297 when no data has been retrieved by ptrace.
8298
23512c01
MGD
82992012-05-22 Will Deacon <will.deacon@arm.com>
8300
8301 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8302 Include asm/ptrace.h.
8303 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8304 already defined.
8305
4934b29e
MR
83062012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8307
8308 * linux-low.c (linux_store_registers): Don't re-retrieve data
8309 with ptrace that has already been obtained from /proc. Always
8310 copy any data retrieved with ptrace to the buffer supplied.
8311
bde24c0a
PA
83122012-05-11 Yao Qi <yao@codesourcery.com>
8313 Pedro Alves <palves@redhat.com>
8314
8315 * linux-low.c (enum stopping_threads_kind): New.
8316 (stopping_threads): Change type to `enum stopping_threads_kind'.
8317 (handle_extended_wait): If stopping and suspending threads, leave
8318 the new_lwp suspended too.
8319 (linux_wait_for_event): Adjust.
8320 (stop_all_lwps): Set `stopping_threads' to
8321 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8322 whether we're suspending threads or just stopping them. Assert no
8323 recursion happens.
8324
623b6bdf
YQ
83252012-04-29 Yao Qi <yao@codesourcery.com>
8326
8327 * server.h: Move some code to ...
8328 * gdbthread.h: ... here. New.
8329 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8330 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8331 (nto-low.o, win32-low.o): Likewise.
8332 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8333 * regcache.c, remote-utils.c, server.c: Likewise.
8334 * target.c, tracepoint.c, win32-low.c: Likewise.
8335
f15f9948
TJB
83362012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8337
8338 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8339 (PTRACE_ARG4_TYPE): Likewise.
8340 (PTRACE_XFER_TYPE): Likewise.
8341 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8342 ptrace to PTRACE_ARG3_TYPE.
8343 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8344 (PTRACE_ARG4_TYPE): Likewise.
8345 (PTRACE_XFER_TYPE): Likewise.
8346 (linux_detach_one_lwp): Cast fourth argument of
8347 ptrace to long then PTRACE_ARG4_TYPE.
8348 (regsets_fetch_inferior_registers): Cast third argument of
8349 ptrace to long then PTRACE_ARG3_TYPE.
8350 (regsets_store_inferior_registers): Likewise.
8351
38ea300a
PA
83522012-04-20 Pedro Alves <palves@redhat.com>
8353
8354 * configure: Regenerate.
8355
c971b7fa
PA
83562012-04-19 Pedro Alves <palves@redhat.com>
8357
43aaf8b6 8358 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8359 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8360 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8361 (all, install-only, uninstall, clean-info, all-lib, clean): No
8362 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8363 (maintainer-clean realclean distclean): Use subdir_do.
8364 (subdir_do): New.
8365 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8366 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8367 * acinclude.m4: Include acx_configure_dir.m4.
8368 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8369 calls. Call AC_PROG_RANLIB. Configure gnulib using
8370 ACX_CONFIGURE_DIR.
8371 (GNULIB): New.
8372 (GNULIB_STDINT_H): Adjust.
8373 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8374 * gdbreplay.c: Include build-gnulib/config.h.
8375 * server.h: Likewise.
8376 * aclocal.m4: Regenerate.
8377 * config.in: Regenerate.
8378 * configure: Regenerate.
c971b7fa 8379
809277f8
PA
83802012-04-19 Pedro Alves <palves@redhat.com>
8381
8382 * Makefile.in (LIBGNU, INCGNU): Adjust.
8383 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8384 (all, install-only, uninstall, clean-info, all-lib, clean)
8385 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8386 * configure.ac: Adjust AC_OUTPUT output.
8387 * aclocal.m4: Regenerate.
8388 * configure: Regenerate.
8389
fd9bb8b8
PA
83902012-04-19 Pedro Alves <palves@redhat.com>
8391
8392 * Makefile.in (generated_files): New.
8393 (server_h): Remove the explicit dependency on config.h, and depend
8394 on $generated_files.
8395
1c298c66
PA
83962012-04-19 Pedro Alves <palves@redhat.com>
8397
8398 * Makefile.in (INCGNU): Add -Ignulib.
8399
57c4b50b
PA
84002012-04-19 Pedro Alves <palves@redhat.com>
8401
8402 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8403 (INCGNU): ... this, and spell out -I here.
8404 (GNULIB_LIB): Rename to ...
8405 (LIBGNU): ... this.
8406 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8407
1030e047
PA
84082012-04-19 Pedro Alves <palves@redhat.com>
8409
8410 * config.in: Regenerate.
8411
447d4319
PA
84122012-04-19 Pedro Alves <palves@redhat.com>
8413
8414 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8415 * server.h (memmem): Remove declaration.
8416 * config.in: Regenerate.
8417 * configure: Regenerate.
8418
aad9eab9
YQ
84192012-04-19 Yao Qi <yao@codesourcery.com>
8420
8421 * Makefile.in (SFILES): Add common/vec.c.
8422 (OBS): Add vec.o.
8423 (vec.o): New rule.
8424
3e10640f
YQ
84252012-04-19 Yao Qi <yao@codesourcery.com>
8426
8427 * remote-utils.c (prepare_resume_reply): Replace with macro
8428 target_core_of_thread.
8429 * server.c (handle_qxfer_threads_proper): Likewise.
8430 * target.h (traget_core_of_thread): New macro.
8431
71622373
PA
84322012-04-18 Pedro Alves <palves@redhat.com>
8433
8434 * aclocal.m4: Regenerate.
8435 * configure: Regenerate.
8436
80d26939
YQ
84372012-04-16 Yao Qi <yao@codesourcery.com>
8438
8439 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8440 duplicated on address.
8441
42476b70
YQ
84422012-04-16 Yao Qi <yao@codesourcery.com>
8443
8444 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8445 (struct tracepoint_action_ops) <send>: New field.
8446 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8447 (agent_expr_send, x_tracepoint_action_send): New.
8448 (l_tracepoint_action_send): New.
8449 (cmd_qtdp): Download and install tracepoint
8450 according to `use_agent'.
8451 (run_inferior_command): Add one more parameter `len'.
8452 Update callers.
8453 (tracepoint_send_agent): New.
8454 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8455
7bc83639
YQ
84562012-04-16 Yao Qi <yao@codesourcery.com>
8457
8458 * tracepoint.c (download_tracepoints): Moved to ...
8459 (cmd_qtstart): ... here.
8460
5f18041e
YQ
84612012-04-14 Yao Qi <yao@codesourcery.com>
8462
8463 * tracepoint.c: Include inttypes.h.
8464 (struct collect_memory_action): Use sized types.
8465 (struct tracepoint): Likewise.
8466 (cmd_qtdp, stop_tracing): Update print specifiers.
8467 (cmd_qtp, response_tracepoint): Likewise.
8468 (collect_data_at_tracepoint): Likewise.
8469 (collect_data_at_step): Likewise.
8470
55a8c076
YQ
84712012-04-14 Yao Qi <yao@codesourcery.com>
8472
8473 Import gnulib module inttypes.
8474 * aclocal.m4, config.in, configure: Regenerated.
8475
dc750257
YQ
84762012-04-14 Yao Qi <yao@codesourcery.com>
8477
8478 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8479 Makefile and config.status at last.
8480
0ab5faf9
YQ
84812012-04-13 Yao Qi <yao@codesourcery.com>
8482
8483 * tracepoint.c: Include stdint.h unconditionally.
8484
18f5fd81
TJB
84852012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8486
8487 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8488 on BFD_HAVE_SYS_PROCFS_TYPE.
8489 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8490 * configure: Regenerate.
8491 * config.in: Likewise.
8492
4d47af5c
L
84932012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8494
8495 * Makefile.in (clean): Also remove x32.c x32-linux.c
8496 x32-avx.c x32-avx-linux.c.
8497 (x32.o): New target.
8498 (x32.c): Likewise.
8499 (x32-linux.o): Likewise.
8500 (x32-linux.c): Likewise.
8501 (x32-avx.o): Likewise.
8502 (x32-avx.c): Likewise.
8503 (x32-avx-linux.o): Likewise.
8504 (x32-avx-linux.c): Likewise.
8505
8506 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8507 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8508 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8509 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8510 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8511 i386/x32-avx-linux.xml.
8512
8513 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8514 (init_registers_x32_avx_linux): Likwise.
8515 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8516 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8517
ecedbe58
PA
85182012-04-13 Pedro Alves <palves@redhat.com>
8519
8520 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8521 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8522 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8523 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8524 the sub-make.
8525
c92b5177
L
85262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8527
8528 * linux-x86-low.c (compat_x32_clock_t): New.
8529 (compat_x32_siginfo_t): Likewise.
8530 (compat_x32_siginfo_from_siginfo): Likewise.
8531 (siginfo_from_compat_x32_siginfo): Likewise.
8532 (linux_is_elf64): Likewise.
8533 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8534 and siginfo_from_compat_x32_siginfo for x32.
8535 (x86_arch_setup): Set linux_is_elf64.
8536
214d508e
L
85372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8538
8539 PR gdb/13969
8540 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8541 e_machine field.
8542 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8543 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8544 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8545 compatible with process.
8546
c9a1864a
YQ
85472012-04-12 Yao Qi <yao@codesourcery.com>
8548
8549 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8550 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8551 (install-only, install-info, clean): Handle sub dir gnulib.
8552 (all-lib, am--refresh): New targets.
8553 (memmem.o): Remove target.
8554 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8555 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8556 (AC_REPLACE_FUNCS): Remove memmem.
8557 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8558 (AC_OUTPUT): Generate Makefile in gnulib/.
8559 * aclocal.m4, config.in, configure: Regenerated.
8560
367ba2c2
MR
85612012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8562
8563 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8564
9d236627
PA
85652012-04-05 Pedro Alves <palves@redhat.com>
8566
8567 -Werror=strict-aliasing
8568
8569 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8570 pointer.
8571
111217b3
PA
85722012-04-04 Pedro Alves <palves@redhat.com>
8573
8574 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8575 (sparc_store_gregset_from_stack, sparc_store_gregset)
8576 (sparc_breakpoint_at): Fix formatting.
8577
8365dcf5
TJB
85782012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8579
8580 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8581 are available.
8582 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8583 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8584 * config.in: Regenerate.
8585 * configure: Likewise.
8586
689cc2ae
PA
85872012-03-29 Pedro Alves <palves@redhat.com>
8588
8589 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8590 Correct ptrace arguments.
8591
c14dfd32
PA
85922012-03-28 Pedro Alves <palves@redhat.com>
8593
8594 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8595 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8596 (IA64_FR1_REGNUM): New defines.
8597 (ia64_fetch_register): New.
8598 (the_low_target): Install it.
8599 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8600 field.
8601 * linux-low.c (linux_fetch_registers): Try the
8602 the_low_target.fetch_register hook first.
8603
8604 * linux-arm-low.c (the_low_target): Adjust.
8605 * linux-bfin-low.c (the_low_target): Adjust.
8606 * linux-cris-low.c (the_low_target): Adjust.
8607 * linux-crisv32-low.c (the_low_target): Adjust.
8608 * linux-m32r-low.c (the_low_target): Adjust.
8609 * linux-m68k-low.c (the_low_target): Adjust.
8610 * linux-mips-low.c (the_low_target): Adjust.
8611 * linux-ppc-low.c (the_low_target): Adjust.
8612 * linux-s390-low.c (the_low_target): Adjust.
8613 * linux-sh-low.c (the_low_target): Adjust.
8614 * linux-sparc-low.c (the_low_target): Adjust.
8615 * linux-tic6x-low.c (the_low_target): Adjust.
8616 * linux-x86-low.c (the_low_target): Adjust.
8617 * linux-xtensa-low.c (the_low_target): Adjust.
8618
63c88e13
PA
86192012-03-26 Pedro Alves <palves@redhat.com>
8620
8621 * server.c (handle_qxfer_libraries): Don't bail early if
8622 the_target->qxfer_libraries_svr4 is not NULL.
8623
fb723180
PA
86242012-03-26 Pedro Alves <palves@redhat.com>
8625
8626 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8627
0afae3cf
PA
86282012-03-23 Pedro Alves <palves@redhat.com>
8629
8630 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8631 "library-list-svr4" element's start tag when the the DSO list is
8632 empty.
8633
485f1ee4
PA
86342012-03-23 Pedro Alves <palves@redhat.com>
8635
8636 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8637 a variable whose type size is the same as the inferior's pointer
8638 size.
8639
a5362b9a
TS
86402012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8641
8642 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8643 struct siginfo.
8644 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8645 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8646 * linux-low.h: Include <signal.h>.
8647 (struct siginfo): Remove forward declaration.
8648 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8649 struct siginfo.
8650
d226c142
MF
86512012-03-21 Mike Frysinger <vapier@gentoo.org>
8652
8653 * .gitignore: Ignore more files.
8654
122f36ef
PA
86552012-03-19 Pedro Alves <palves@redhat.com>
8656 Jan Kratochvil <jan.kratochvil@redhat.com>
8657
8658 * server.c (cont_thread, general_thread): Add describing comments.
8659 (start_inferior): Clear `cont_thread'.
8660 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8661 of a process.
8662
fc3e5175
YQ
86632012-03-15 Yao Qi <yao@codesourcery.com>
8664
8665 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8666 handling to ...
8667 (cmd_qtdp): ... here.
8668
8d0d92cd
YQ
86692012-03-15 Yao Qi <yao@codesourcery.com>
8670
8671 * tracepoint.c (struct tracepoint_action_ops): New.
8672 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8673 (m_tracepoint_action_download): New.
8674 (r_tracepoint_action_download): New.
8675 (x_tracepoint_action_download): New.
8676 (l_tracepoint_action_download): New.
8677 (add_tracepoint_action): Install `action->ops' according type.
8678 (download_tracepoint_1): Move code `download' function pointer
8679 of various tracepoint_action_ops.
8680
87b0bb13
JK
86812012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8682
8683 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8684 linux_ptrace_attach_warnings.
8685
5f572dec
JK
86862012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8687
8688 * Makefile.in (linux-ptrace.o): New.
8689 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8690 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8691 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8692 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8693 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8694 of these targets.
8695 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8696
f4647387
YQ
86972012-03-08 Yao Qi <yao@codesourcery.com>
8698 Pedro Alves <palves@redhat.com>
8699
8700 Fix PR server/13392.
8701 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8702 offset of JMP insn.
8703 * tracepoint.c (remove_tracepoint): New.
8704 (cmd_qtdp): Call remove_tracepoint when failed to install.
8705
9b224c5e
PA
87062012-03-07 Pedro Alves <palves@redhat.com>
8707
8708 * linux-low.c (get_detach_signal): New.
8709 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8710 Pass on pending signals to PTRACE_DETACH. Check the result of the
8711 ptrace call.
8712 * server.c (program_signals, program_signals_p): New.
8713 (handle_general_set): Handle QProgramSignals.
8714 * server.h (program_signals, program_signals_p): Declare.
8715
e237a7e2
JK
87162012-03-05 Pedro Alves <palves@redhat.com>
8717 Jan Kratochvil <jan.kratochvil@redhat.com>
8718
8719 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8720 New comment why.
8721
5808517f
YQ
87222012-03-03 Yao Qi <yao@codesourcery.com>
8723
8724 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8725 agent_look_up_symbols.
8726
58b4daa5
YQ
87272012-03-03 Yao Qi <yao@codesourcery.com>
8728
8729 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8730 (linux-x86-low.o): Likewise.
8731 * server.h: Remove in_process_agent_loaded.
8732 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8733 common/agent.c.
8734 Update callers.
8735
8ffcbaaf
YQ
87362012-03-03 Yao Qi <yao@codesourcery.com>
8737
8738 * tracepoint.c (gdb_agent_capability): New global.
8739 (in_process_agent_loaded_ust): Renamed to
8740 `in_process_agent_supports_ust'.
8741 Update callers.
8742 (in_process_agent_supports_ust): Call agent_capability_check.
8743 (clear_installed_tracepoints): Assert that agent supports
8744 agent.
8745
d1feda86
YQ
87462012-03-03 Yao Qi <yao@codesourcery.com>
8747
8748 * linux-low.c (linux_supports_agent): New.
8749 (linux_target_ops): Initialize field `supports_agent' with
8750 linux_supports_agent.
8751 * target.h (struct target_ops) <supports_agent>: New.
8752 (target_supports_agent): New macro.
8753 * server.c (handle_general_set): Handle packet 'QAgent'.
8754 (handle_query): Send `QAgent+'.
8755 * Makefile.in (server.o): Depends on agent.h.
8756
2fa291ac
YQ
87572012-03-03 Yao Qi <yao@codesourcery.com>
8758
8759 * Makefile.in (OBS): Add agent.o.
8760 Add new rule for agent.o.
8761 Track dependence of tracepoint.c on agent.h.
8762 * tracepoint.c (run_inferior_command_1):
8763 (run_inferior_command): Call agent_run_command.
8764 (gdb_ust_connect_sync_socket): Deleted. Move it to
8765 common/agent.c.
8766 (resume_thread, stop_thread): Likewise.
8767 (gdb_ust_socket_init): Renamed to ...
8768 (gdb_agent_socket_init): ... New.
8769 (gdb_ust_thread): Renamed to ...
8770 (gdb_agent_helper_thread): ... New.
8771 (gdb_ust_init): Move some code to ...
8772 (gdb_agent_init): ... here. New.
8773 [HAVE_UST]: Call gdb_ust_init.
8774 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8775 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8776 * config.in, configure: Regenerated.
8777
05044653
PA
87782012-03-02 Pedro Alves <palves@redhat.com>
8779
8780 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8781 * linux-low.c (struct simple_pid_list): New.
8782 (stopped_pids): New a struct simple_pid_list pointer.
8783 (add_to_pid_list, pull_pid_from_list): New.
8784 (handle_extended_wait): Don't assume the first signal new children
8785 report is SIGSTOP. Adjust call to pull_pid_from_list.
8786 (linux_wait_for_lwp): Adjust.
8787
8d00225b
YQ
87882012-03-02 Yao Qi <yao@codesourcery.com>
8789
8790 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8791 debug log.
8792
19560ba5
YQ
87932012-03-02 Yao Qi <yao@codesourcery.com>
8794
8795 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8796 `stop_pc' and `tpoint'. Update caller.
8797
1faeff08
MR
87982012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8799
8800 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8801 * linux-low.c (use_linux_regsets): New macro.
8802 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8803 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8804 (linux_register_in_regsets): New function.
8805 (usr_fetch_inferior_registers): Skip registers covered by
8806 regsets.
8807 (usr_store_inferior_registers): Likewise.
8808 (usr_fetch_inferior_registers): New macro.
8809 (usr_store_inferior_registers): Likewise.
8810 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8811 (linux_store_registers): Likewise.
8812 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8813 prototype.
8814 (init_registers_mips64_dsp_linux): Likewise.
8815 (init_registers_mips_linux): New macro.
8816 (init_registers_mips_dsp_linux): Likewise.
8817 (mips_dsp_num_regs): Likewise.
8818 (DSP_BASE, DSP_CONTROL): New fallback macros.
8819 (mips_base_regs): New macro.
8820 (mips_regmap): Use it. Fix the size.
8821 (mips_dsp_regmap): New variable.
8822 (mips_dsp_regset_bitmap): Likewise.
8823 (mips_arch_setup): New function.
8824 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8825 than mips_regmap.
8826 (mips_cannot_store_register): Likewise.
8827 (the_low_target): Update .arch_setup, .num_regs and .regmap
8828 initializers. Add .regset_bitmap initializer.
8829 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8830 initializer.
8831 * linux-bfin-low.c (the_low_target): Likewise.
8832 * linux-cris-low.c (the_low_target): Likewise.
8833 * linux-crisv32-low.c (the_low_target): Likewise.
8834 * linux-ia64-low.c (the_low_target): Likewise.
8835 * linux-m32r-low.c (the_low_target): Likewise.
8836 * linux-m68k-low.c (the_low_target): Likewise.
8837 * linux-ppc-low.c (the_low_target): Likewise.
8838 * linux-s390-low.c (the_low_target): Likewise.
8839 * linux-sh-low.c (the_low_target): Likewise.
8840 * linux-sparc-low.c (the_low_target): Likewise.
8841 * linux-tic6x-low.c (the_low_target): Likewise.
8842 * linux-x86-low.c (the_low_target): Likewise.
8843 * linux-xtensa-low.c (the_low_target): Likewise.
8844 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8845 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8846 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8847 srv_xmlfiles.
8848 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8849 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8850
c03e6ccc
YQ
88512012-02-29 Yao Qi <yao@codesourcery.com>
8852 Pedro Alves <palves@redhat.com>
8853
8854 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8855 `step_over_finished' is true.
8856
644cebc9
PA
88572012-02-27 Pedro Alves <palves@redhat.com>
8858
8859 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8860 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8861
c14d7ab2
PA
88622012-02-27 Pedro Alves <palves@redhat.com>
8863
8864 PR server/9684
8865 * linux-low.c (pid_is_stopped): New.
8866 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8867
412c89dd
LM
88682012-02-25 Luis Machado <lgustavo@codesourcery.com>
8869
8870 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8871 of conditions.
8872
b745defe
MR
88732012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8874
8875 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8876
9f3a5c85
LM
88772012-02-24 Luis Machado <lgustavo@codesourcery>
8878
8879 * server.c (handle_query): Advertise support for target-side
8880 breakpoint condition evaluation.
8881 (process_point_options): New function.
8882 (process_serial_event): When inserting a breakpoint, check for
8883 a target-side condition that should be evaluated.
8884
8885 * mem-break.c: Include regcache.h and ax.h.
8886 (point_cond_list_t): New data structure.
8887 (breakpoint) <cond_list>: New field.
8888 (find_gdb_breakpoint_at): Make non-static.
8889 (delete_gdb_breakpoint_at): Clear any target-side
8890 conditions.
8891 (clear_gdb_breakpoint_conditions): New function.
8892 (add_condition_to_breakpoint): Likewise.
8893 (add_breakpoint_condition): Likewise.
8894 (gdb_condition_true_at_breakpoint): Likewise.
8895 (gdb_breakpoint_here): Return result directly instead
8896 of going through a local variable.
8897
8898 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8899 (clear_gdb_breakpoint_conditions): Likewise.
8900 (add_breakpoint_condition): Likewise.
8901 (gdb_condition_true_at_breakpoint): Likewise.
8902
8903 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8904 (need_step_over_p): Take target-side breakpoint condition into
8905 consideration.
8906
5e1dc496
LM
89072012-02-24 Luis Machado <lgustavo@codesourcery>
8908
8909 * server.h: Include tracepoint.h.
8910 (agent_mem_read, agent_get_trace_state_variable_value,
8911 agent_set_trace_state_variable_value,
8912 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8913 get_set_tsv_func_addr): New prototypes.
8914
8915 * ax.h: New include file.
8916 * ax.c: New source file.
8917
8918 * tracepoint.c: Include ax.h.
8919 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8920 agent_expr, eval_result_type): Move to ax.h.
8921 (parse_agent_expr): Rename to ...
8922 (gdb_parse_agent_expr): ... this, make it non-static and move
8923 to ax.h.
8924 (unparse_agent_expr) Rename to ...
8925 (gdb_unparse_agent_expr): ... this, make it non-static and move
8926 to ax.h.
8927 (eval_agent_expr): Rename to ...
8928 (eval_tracepoint_agent_expr): ... this.
8929 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8930 forward declarations.
8931 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8932 (agent_get_trace_state_variable_value): New function.
8933 (agent_set_trace_state_variable_value): New function.
8934 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8935 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8936 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8937 (condition_true_at_tracepoint): Likewise.
8938 (parse_agent_expr): Rename to ...
8939 (gdb_parse_agent_expr): ... this and move to ax.c.
8940 (unparse_agent_expr): Rename to ...
8941 (gdb_unparse_agent_expr): ... this and move to ax.c.
8942 (gdb_agent_op_name): Move to ax.c.
8943 (eval_agent_expr): Rename to ...
8944 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8945 and move to ax.c.
8946 (eval_tracepoint_agent_expr): New function.
8947 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8948 non-static.
5e1dc496
LM
8949 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8950 ax.c.
8951 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8952 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8953 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8954 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8955 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8956 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8957 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8958 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8959 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8960 (compile_bytecodes): Remove forward declaration.
8961 (is_goto_target): Move to ax.c.
8962 (compile_bytecodes): Move to ax.c and call
8963 agent_get_trace_state_variable_value (...) and
8964 agent_set_trace_state_variable_value (...).
8965
8966 * Makefile.in: Update ax.c and IPA dependencies.
8967
277e4e52
PA
89682012-02-24 Pedro Alves <palves@redhat.com>
8969
8970 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8971 (cmd_bigqtbuffer_circular): ... this. Only handle
8972 'QTBuffer:circular:'.
8973 (handle_tracepoint_general_set): Adjust.
8974
bf4c19f7
YQ
89752012-02-16 Yao Qi <yao@codesourcery.com>
8976
8977 * inferiors.c: Move code to ...
8978 * dll.c: .... here. New.
8979 * server.h: Declare clear_dlls.
8980 * Makefile.in (SFILES): Add dll.c.
8981 (OBS): Add dll.o
8982 (dll.o): New rule.
8983
d73f2619
YQ
89842012-02-11 Yao Qi <yao@codesourcery.com>
8985
8986 * server.c: (handle_monitor_command): Add a new parameter
8987 `own_buf'.
8988 (handle_query): Update caller.
8989
f8255c2a
JB
89902012-02-09 Joel Brobecker <brobecker@adacore.com>
8991
8992 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8993 * configure, config.in: Regenerate.
8994 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8995 is not defined.
8996
da84f473
PA
89972012-02-02 Pedro Alves <palves@redhat.com>
8998
8999 Try SIGKILL first, then PTRACE_KILL.
9000 * linux-low.c (linux_kill_one_lwp): New.
9001 (linux_kill_one_lwp): Rename to ...
9002 (kill_one_lwp_callback): ... this. Use the new
9003 linux_kill_one_lwp.
9004
e886a173
PA
90052012-02-02 Pedro Alves <palves@redhat.com>
9006
9007 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9008 inferior.
9009
be07f1a2
PA
90102012-01-27 Pedro Alves <palves@redhat.com>
9011
9012 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9013 (elf_64_file_p): Make static.
9014 (linux_pid_exe_is_elf_64_file): New.
9015 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9016 Delete declarations.
9017 (linux_pid_exe_is_elf_64_file): Declare.
9018 * linux-x86-low.c (x86_arch_setup): Use
9019 linux_pid_exe_is_elf_64_file.
9020
d8301ad1
JK
90212012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9022
9023 * linux-low.c (linux_wait_for_event_1): Rename to ...
9024 (linux_wait_for_event): ... here and merge it with former
9025 linux_wait_for_event - new variable wait_ptid, use it.
9026 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9027
01b17894
PA
90282012-01-23 Pedro Alves <palves@redhat.com>
9029
9030 * server.c (main): Avoid yet another case of infinite loop while
9031 detaching/killing after a longjmp.
9032
e825046f
JK
90332012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9034
9035 Code cleanup.
9036 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9037
b9e7b9c3
UW
90382012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9039
9040 * hostio.c (handle_readlink): New function.
9041 (handle_vFile): Call it to handle "vFile:readlink" packets.
9042
901f9912
UW
90432012-01-20 Pedro Alves <palves@redhat.com>
9044 Ulrich Weigand <ulrich.weigand@linaro.org>
9045
9046 * server.c (handle_v_requests): Only support vAttach and vRun to
9047 start multiple processes when in extended protocol mode.
9048
fc1ab1a0
PA
90492012-01-17 Pedro Alves <palves@redhat.com>
9050
9051 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9052 memalign plus mprotect to allocate the scratch buffer.
9053
7d5d4e98
PA
90542012-01-13 Pedro Alves <palves@redhat.com>
9055
9056 * server.c (attach_inferior): Clear `cont_thread'.
9057
f128d5e9
PA
90582012-01-13 Pedro Alves <palves@redhat.com>
9059
9060 * server.c (main): Avoid infinite loop while detaching/killing
9061 after a longjmp.
9062
06db92f0
DE
90632012-01-09 Doug Evans <dje@google.com>
9064
9065 * server.c (start_inferior): Set last_ptid in --wrapper case.
9066
32d92999
YQ
90672012-01-06 Yao Qi <yao@codesourcery.com>
9068
9069 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9070 defined.
9071 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9072
5e0a92a9
YQ
90732012-01-04 Yao Qi <yao@codesourcery.com>
9074
9075 * tracepoint.c (cmd_qtdp): Print debug message
9076 for static tracepoint.
9077
ae639e8c
YQ
90782012-01-04 Yao Qi <yao@codesourcery.com>
9079
9080 * tracepoint.c (trace_vdebug): Differentiate debug message
9081 between gdbserver and IPA.
9082
f72429c5
YQ
90832012-01-03 Yao Qi <yao@codesourcery.com>
9084
9085 * tracepoint.c (tracepoint_was_hit): Don't collect for
9086 static tracepoint.
9087
12c3e59c
JB
90882012-01-02 Joel Brobecker <brobecker@adacore.com>
9089
9090 * terminal.h: Reformat copyright header.
9091
67827812
JB
90922012-01-02 Joel Brobecker <brobecker@adacore.com>
9093
9094 * server.c (gdbserver_version): Update copyright year.
9095 * gdbreplay.c (gdbreplay_version): Likewise.
9096
3e52c33d
JK
90972011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9098
9099 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9100
9101 Revert:
9102 2011-12-18 Hui Zhu <teawater@gmail.com>
9103 * linux-low.c (linux_create_inferior): Save return value to ret.
9104
66f1260e
HZ
91052011-12-18 Hui Zhu <teawater@gmail.com>
9106
9107 * linux-low.c (linux_create_inferior): Save return value to ret.
9108
e77616d7
DE
91092011-12-16 Doug Evans <dje@google.com>
9110
e7b06c57
DE
9111 * linux-low.c (linux_create_inferior): If stdio connection,
9112 redirect stdin from /dev/null, stdout to stderr.
9113 * remote-utils.c (remote_is_stdio): New static global.
9114 (remote_connection_is_stdio): New function.
9115 (remote_prepare): Handle stdio connection.
9116 (remote_open): Ditto.
9117 (remote_close): Don't close stdin for stdio connections.
9118 (read_prim,write_prim): New functions. Replace all calls to
9119 read/write to these.
9120 * server.c (main): Watch for "-" argument. Move call to
9121 remote_prepare before start_inferior.
9122 * server.h (STDIO_CONNECTION_NAME): New macro.
9123 (remote_connection_is_stdio): Declare.
9124
e77616d7
DE
9125 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9126 in debugging output.
9127
82067193
YQ
91282011-12-15 Yao Qi <yao@codesourcery.com>
9129
9130 * tracepoint.c: Include sys/syscall.h.
9131 (gdb_ust_thread): Remove preprocessor conditional.
9132
82bfbe7e
PA
91332011-12-14 Pedro Alves <pedro@codesourcery.com>
9134
9135 * linux-low.c (linux_detach_one_lwp): Call
9136 the_low_target.prepare_to_resume before detaching.
9137
712c6575
YQ
91382011-12-14 Yao Qi <yao@codesourcery.com>
9139
9140 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9141 of write.
9142
d54d1edf
YQ
91432011-12-14 Yao Qi <yao@codesourcery.com>
9144
9145 * i386-low.c (i386_low_stopped_data_address): Initialize local
9146 variable `control'.
9147
6210a125
PA
91482011-12-13 Pedro Alves <pedro@codesourcery.com>
9149
9150 PR remote/13492
9151
9152 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9153 DR_CONTROL unless necessary. Extend comments.
9154 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9155 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9156
2ece8244
YQ
91572011-12-13 Yao Qi <yao@codesourcery.com>
9158
9159 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9160 macros.
9161 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9162
784867a5
JK
91632011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9164
9165 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9166 Print new debug message for such case.
9167
6bf36717
JK
91682011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9169
9170 Fix overlapping memcpy.
9171 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9172 the read_inferior_memory transfer.
9173 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9174 write_inferior_memory transfer.
9175 (set_fast_tracepoint_jump): New variable buf. Use it for the
9176 read_inferior_memory and write_inferior_memory transfers.
9177 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9178 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9179 Use it for the write_inferior_memory transfer.
9180 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9181 buffers.
9182
50275556
MR
91832011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9184
9185 * linux-low.c (fetch_register, store_register): Make code
9186 consistent, fix formatting.
9187
7325beb4
MR
91882011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9189
9190 * linux-low.c (usr_store_inferior_registers): Factor out code
9191 to handle individual registers into...
9192 (store_register): ... this new function.
9193
c642a434
UW
91942011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9197 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9198 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9199 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9200 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9201 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9202 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9203 (srv_xmlfiles): Add new XML files.
9204
9205 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9206 and <sys/uio.h>.
9207 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9208 (init_registers_s390_linux32v1): Add prototype.
9209 (init_registers_s390_linux32v2): Likewise.
9210 (init_registers_s390_linux64v1): Likewise.
9211 (init_registers_s390_linux64v2): Likewise.
9212 (init_registers_s390x_linux64v1): Likewise.
9213 (init_registers_s390x_linux64v2): Likewise.
9214 (s390_num_regs): Increment to 52.
9215 (s390_regmap): Add orig_r2 register.
9216 (s390_num_regs_3264): Increment to 68.
9217 (s390_regmap_3264): Add orig_r2 register.
9218 (s390_collect_ptrace_register): Handle orig_r2 register.
9219 (s390_supply_ptrace_register): Likewise.
9220 (s390_fill_last_break): New function.
9221 (s390_store_last_break): Likewise.
9222 (s390_fill_system_call): New function.
9223 (s390_store_system_call): Likewise.
9224 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9225 register sets.
9226 (s390_check_regset): New function.
9227 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9228 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9229 Update target_regsets for available register sets.
9230
2268b414
JK
92312011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9232 Jan Kratochvil <jan.kratochvil@redhat.com>
9233
9234 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9235 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9236 New.
9237 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9238 * linux-low.h (struct process_info_private): New member r_debug.
9239 * server.c (handle_qxfer_libraries): Call
9240 the_target->qxfer_libraries_svr4.
9241 (handle_qxfer_libraries_svr4): New function.
9242 (qxfer_packets): New entry "libraries-svr4".
9243 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9244 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9245 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9246 PACKET_qXfer_libraries_svr4.
9247
d6db1fab
UW
92482011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9249
9250 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9251 PSW address/mask between 8-byte and 16-byte formats.
9252 (s390_supply_ptrace_register): Likewise.
9253 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9254 basic addressing mode bit.
9255
242f5f1c
SS
92562011-11-24 Stan Shebs <stan@codesourcery.com>
9257
9258 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9259
f196051f
SS
92602011-11-17 Stan Shebs <stan@codesourcery.com>
9261
9262 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9263 (tracing_start_time): New global.
9264 (tracing_stop_time): New global.
9265 (tracing_user_name): New global.
9266 (tracing_notes): New global.
9267 (tracing_stop_note): New global.
9268 (cmd_qtstart): Set traceframe_usage, start_time.
9269 (stop_tracing): Set stop_time.
9270 (cmd_qtstatus): Report additional status.
9271 (cmd_qtp): New function.
9272 (handle_tracepoint_query): Call it.
9273 (cmd_qtnotes): New function.
9274 (handle_tracepoint_general_set): Call it.
9275 (get_timestamp): Rename from tsv_get_timestamp.
9276
405f8e94
SS
92772011-11-14 Stan Shebs <stan@codesourcery.com>
9278 Kwok Cheung Yeung <kcy@codesourcery.com>
9279
9280 * linux-x86-low.c (small_jump_insn): New.
9281 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9282 trampoline and error message, build a trampoline and issue a small
9283 jump instruction to it.
9284 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9285 trampoline and error message.
9286 (x86_get_min_fast_tracepoint_insn_len): New.
9287 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9288 * linux-low.h (struct linux_target_ops): Add arguments to
9289 install_fast_tracepoint_jump_pad operation, add new operation.
9290 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9291 arguments.
9292 (linux_get_min_fast_tracepoint_insn_len): New function.
9293 (linux_target_op): Add new operation.
9294 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9295 (gdb_trampoline_buffer_end): Ditto.
9296 (gdb_trampoline_buffer_error): Ditto.
9297 (struct ipa_sym_addresses): Add fields for new IPA variables.
9298 (symbol_list): Add entries for new IPA variables.
9299 (struct tracepoint): Add fields to hold the address range of the
9300 trampoline used by the tracepoint.
9301 (trampoline_buffer_head): New static variable.
9302 (trampoline_buffer_tail): Ditto.
9303 (claim_trampoline_space): New function.
9304 (have_fast_tracepoint_trampoline_buffer): New function.
9305 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9306 structure.
9307 (install_fast_tracepoint): Ditto, also add error buffer argument.
9308 (cmd_qtminftpilen): New function.
9309 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9310 (fast_tracepoint_from_trampoline_address): New function.
9311 (fast_tracepoint_collecting): Handle trampoline as part of jump
9312 pad space.
9313 (set_trampoline_buffer_space): New function.
9314 (initialize_tracepoint): Initialize new IPA variables.
9315 * target.h (struct target_ops): Add arguments to
9316 install_fast_tracepoint_jump_pad operation, add new
9317 get_min_fast_tracepoint_insn_len operation.
9318 (target_get_min_fast_tracepoint_insn_len): New.
9319 (install_fast_tracepoint_jump_pad): Add arguments.
9320 * server.h (IPA_BUFSIZ): Define.
9321 * linux-i386-ipa.c: Include extra header files.
9322 (initialize_fast_tracepoint_trampoline_buffer): New function.
9323 (initialize_low_tracepoint): Call it.
9324 * server.h (set_trampoline_buffer_space): Declare.
9325 (claim_trampoline_space): Ditto.
9326 (have_fast_tracepoint_trampoline_buffer): Ditto.
9327
1e4d1764
YQ
93282011-11-14 Yao Qi <yao@codesourcery.com>
9329
9330 * server.c (handle_query): Handle InstallInTrace for qSupported.
9331 * tracepoint.c (add_tracepoint): Sort list.
9332 (install_tracepoint, download_tracepoint): New.
9333 (cmd_qtdp): Call them to install and download tracepoints.
9334 (sort_tracepoints): Removed.
9335 (cmd_qtstart): Update.
9336
5c73ff4e
YQ
93372011-11-14 Yao Qi <yao@codesourcery.com>
9338
9339 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9340 * mem-break.h: Declare.
9341 * tracepoint.c (cmd_qtstart): Move some code to ...
9342 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9343 New.
9344 (download_tracepoints): Move some code to ...
9345 (download_tracepoint_1): ... here. New.
9346
86a30030
YQ
93472011-11-08 Yao Qi <yao@codesourcery.com>
9348
9349 * remote-utils.c (relocate_instruction): A comment fix.
9350
8d26e50c
JB
93512011-11-07 Joel Brobecker <brobecker@adacore.com>
9352
9353 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9354 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9355 dr_status_mirror and dr_control_mirror from debug_reg_state.
9356 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9357 (i386_initial_stuff): Remove use of deleted globals.
9358 (i386_get_thread_context, i386_set_thread_context,
9359 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9360 from debug_reg_state.
9361
a59306a3
YQ
93622011-11-05 Yao Qi <yao@codesourcery.com>
9363
9364 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9365 address as TPOINT's.
9366
3065dfb6
SS
93672011-11-02 Stan Shebs <stan@codesourcery.com>
9368
9369 * tracepoint.c (agent_mem_read_string): New function.
9370 (eval_agent_expr): Call it for tracenz.
9371 * server.c (handle_query): Report support for tracenz.
9372
fd0d8c7c
YQ
93732011-11-02 Yao Qi <yao@codesourcery.com>
9374
9375 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9376
609086b1
YQ
93772011-11-02 Yao Qi <yao@codesourcery.com>
9378
9379 * target.h: Fix a typo in comment.
9380
b9fd1791
PA
93812011-10-31 Pedro Alves <pedro@codesourcery.com>
9382
9383 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9384 clobber the breakpoints' shadows with fast tracepoint jumps.
9385 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9386 * target.c (write_inferior_memory): Also pass MYADDR down to
9387 check_mem_write.
9388
03583c20
UW
93892011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9390
9391 * configure.ac: Check support for personality routine.
9392 * configure: Regenerate.
9393 * config.in: Likewise.
9394 * linux-low.c: Include <sys/personality.h>.
9395 Define ADDR_NO_RANDOMIZE if necessary.
9396 (linux_create_inferior): Disable address space randomization when
9397 forking inferior, if requested.
9398 (linux_supports_disable_randomization): New function.
9399 (linux_target_ops): Install it.
9400 * server.h (disable_randomization): Declare.
9401 * server.c (disable_randomization): New global variable.
9402 (handle_general_set): Handle QDisableRandomization.
9403 (handle_query): Likewise for qSupported.
9404 (main): Support --disable-randomization and --no-disable-randomization
9405 command line arguments.
9406 * target.h (struct target_ops): Add supports_disable_randomization.
9407 (target_supports_disable_randomization): New macro.
9408
723b724b
MF
94092011-09-29 Mike Frysinger <vapier@gentoo.org>
9410
9411 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9412 ifdef check.
9413 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9414 [!PT_GETDSBT] (target_loadmap): New definition.
9415 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9416 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9417 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9418 and PT_GETDSBT to LINUX_LOADMAP.
9419 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9420 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9421
55329a5c 94222011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9423
9424 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9425 (arm_linux_hwbp_cap): New static variable.
9426 (arm_linux_get_hwbp_cap): Replace by ...
9427 (arm_linux_init_hwbp_cap): ... this new function.
9428 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9429 (arm_linux_get_hw_watchpoint_count): Likewise.
9430 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9431 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9432 (arm_prepare_to_resume): Use perror_with_name instead of error.
9433
55329a5c 94342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9435
9436 * linux-arm-low.c: Include <signal.h>.
9437 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9438 (struct arm_linux_hwbp_cap): New data type.
9439 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9440 (struct arm_linux_hw_breakpoint): New data type.
9441 (MAX_BPTS, MAX_WPTS): Define.
9442 (struct arch_process_info, struct arch_lwp_info): New data types.
9443 (arm_linux_get_hwbp_cap): New function.
9444 (arm_linux_get_hw_breakpoint_count): Likewise.
9445 (arm_linux_get_hw_watchpoint_count): Likewise.
9446 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9447 (arm_hwbp_control_initialize): Likewise.
9448 (arm_hwbp_control_is_enabled): Likewise.
9449 (arm_hwbp_control_is_initialized): Likewise.
9450 (arm_hwbp_control_disable): Likewise.
9451 (arm_linux_hw_breakpoint_equal): Likewise.
9452 (arm_linux_hw_point_initialize): Likewise.
9453 (struct update_registers_data): New data structure.
9454 (update_registers_callback: New function.
9455 (arm_insert_point): Likewise.
9456 (arm_remove_point): Likewise.
9457 (arm_stopped_by_watchpoint): Likewise.
9458 (arm_stopped_data_address): Likewise.
9459 (arm_new_process): Likewise.
9460 (arm_new_thread): Likewise.
9461 (arm_prepare_to_resume): Likewise.
9462 (the_low_target): Register arm_insert_point, arm_remove_point,
9463 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9464 arm_new_thread, and arm_prepare_to_resume.
9465
6b9801d4
SS
94662011-09-15 Stan Shebs <stan@codesourcery.com>
9467
9468 * server.h (struct emit_ops): Add compare-goto fields.
9469 * tracepoint.c (gdb_agent_op_sizes): New table.
9470 (emit_eq_goto): New function.
9471 (emit_ne_goto): New function.
9472 (emit_lt_goto): New function.
9473 (emit_le_goto): New function.
9474 (emit_gt_goto): New function.
9475 (emit_ge_goto): New function.
9476 (is_goto_target): New function.
9477 (compile_bytecodes): Recognize special cases of compare-goto
9478 combinations and call specialized emitters for them.
9479 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9480 (amd64_emit_ne_goto): New function.
9481 (amd64_emit_lt_goto): New function.
9482 (amd64_emit_le_goto): New function.
9483 (amd64_emit_gt_goto): New function.
9484 (amd64_emit_ge_goto): New function.
9485 (amd64_emit_ops): Add the new functions.
9486 (i386_emit_eq_goto): New function.
9487 (i386_emit_ne_goto): New function.
9488 (i386_emit_lt_goto): New function.
9489 (i386_emit_le_goto): New function.
9490 (i386_emit_gt_goto): New function.
9491 (i386_emit_ge_goto): New function.
9492 (i386_emit_ops): Add the new functions.
9493
bf15cbda
SS
94942011-09-08 Stan Shebs <stan@codesourcery.com>
9495
9496 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9497 (i386_emit_epilogue): Restore %ebx.
9498
943ca1dd
JZ
94992011-08-31 Jie Zhang <jzhang918@gmail.com>
9500
9501 * server.c (step_thread): Remove definition.
9502 (process_serial_event): Don't handle Hs.
9503 * server.h (step_thread): Remove declaration.
9504 * target.c (set_desired_inferior): Remove use of step_thread.
9505
e3deef73
LM
95062011-08-24 Luis Machado <lgustavo@codesourcery.com>
9507
9508 * linux-low.c: Include linux-procfs.h.
9509 (linux_attach_lwp_1): Update comments.
9510 (linux_attach): Scan for existing threads when attaching to a
9511 process that is the tgid.
9512 * Makefile.in: Update dependencies.
9513
13da1c97
LM
95142011-08-24 Luis Machado <lgustavo@codesourcery.com>
9515
9516 * configure.srv: Add linux-procfs.o dependencies.
9517
881127c9
YQ
95182011-08-14 Yao Qi <yao@codesourcery.com>
9519
9520 * target.h (struct target_ops): Fix indent.
9521 * win32-low.c (win32_target_ops): Fix comment.
9522
58dbd541
YQ
95232011-08-14 Andrew Jenner <andrew@codesourcery.com>
9524 Yao Qi <yao@codesourcery.com>
9525
9526 * Makefile.in (clean): Remove tic6x-*.c files.
9527 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9528 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9529 (tic6x-c64xp-linux.c): Likewise.
9530 * configure.srv: Add support for tic6x-*-uclinux.
9531 * linux-tic6x-low.c: New.
9532 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9533
78d85199
YQ
95342011-08-14 Andrew Stubbs <ams@codesourcery.com>
9535 Yao Qi <yao@codesourcery.com>
9536
9537 * target.h (struct target_ops): Add read_loadmap.
9538 * linux-low.c (struct target_loadseg): New type.
9539 (struct target_loadmap): New type.
9540 (linux_read_loadmap): New function.
9541 (linux_target_ops): Add linux_read_loadmap.
9542 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9543 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9544 to NULL.
78d85199 9545
a959a88d
EZ
95462011-08-05 Eli Zaretskii <eliz@gnu.org>
9547
9548 * win32-low.c: Include <stdint.h>.
9549
1ced966e
PA
95502011-07-22 Pedro Alves <pedro@codesourcery.com>
9551
9552 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9553 to the inferior here.
9554 (i386_remove_aligned_watchpoint): Ditto.
9555 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9556 fit part of the watchpoint in the debug registers.
9557 (i386_update_inferior_debug_regs): New.
9558 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9559 registers, and only update the inferior on success.
9560 (i386_low_remove_watchpoint): Ditto.
9561
d26e3629
KY
95622011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9563
9564 * linux-low.c (compare_ints, unique, list_threads, show_process,
9565 linux_core_of_thread): Delete.
9566 (linux_target_ops): Change linux_core_of_thread to
9567 linux_common_core_of_thread.
9568 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9569 * utils.c (malloc_failure): Change type of argument.
9570 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9571 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9572 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9573 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9574 (IPA_OBJS): Add common-utils-ipa.o.
9575 (ptid_h, linux_osdata_h): New macros.
9576 (server_h): Add common/common-utils.h, common/xml-utils.h,
9577 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9578 common/ptid.h.
9579 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9580 ptid.o, buffer.o): New rules.
9581 (linux-low.o): Add common/linux-osdata.h as a dependency.
9582 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9583 * configure.ac: Add AC_HEADER_DIRENT check.
9584 * config.in: Regenerate.
9585 * configure: Regenerate.
9586 * remote-utils.c (xml_escape_text): Delete.
9587 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9588 buffer_xml_printf): Move to common/buffer.c.
9589 * server.c (main): Remove call to initialize_inferiors.
9590 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9591 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9592 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9593 internal_error, gdb_assert, gdb_assert_fail): Delete.
9594 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9595 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9596 common/buffer.h.
9597 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9598 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9599 initialize_inferiors): Delete.
9600
2275a1a7
PA
96012011-07-20 Pedro Alves <pedro@codesourcery.com>
9602
9603 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9604 symbol error.
9605
0a5b1e09
PA
96062011-05-31 Pedro Alves <pedro@codesourcery.com>
9607
9608 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9609 assertion.
9610 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9611
6938fd34
YQ
96122011-05-26 Yao Qi <yao@codesourcery.com>
9613
9614 * Makefile.in (thread-db.o): Track dependence to
9615 common/gdb_thread_db.h.
9616 * thread-db.c: include gdb_thread_db.h from right place.
9617
b481f9e0
TT
96182011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9619
9620 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9621 __FILE__ and __LINE__ to internal_error.
9622
98a5dd13
DE
96232011-05-13 Doug Evans <dje@google.com>
9624
9625 * thread-db.c (try_thread_db_load_from_sdir): New function.
9626 (try_thread_db_load_from_dir): New function.
9627 (thread_db_load_search): Handle $sdir, ignore $pdir.
9628 Remove trying of system directories if search of
9629 libthread-db-search-path fails, that is now done via $sdir.
9630
d248b706
KY
96312011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9632
9633 * server.c (handle_query): Add EnableDisableTracepoints to the list
9634 of supported features.
43aaf8b6 9635 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9636 tracepoints.
43aaf8b6
PA
9637 (cmd_qtenable_disable): New.
9638 (cmd_qtstart): Install tracepoints even if disabled.
9639 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9640 receiving a QTEnable or QTDisable packet.
9641 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9642 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9643 tracepoints.
9644 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9645
84e578fb
DE
96462011-05-10 Doug Evans <dje@google.com>
9647
9648 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9649
71f55dd8
DE
96502011-05-04 Doug Evans <dje@google.com>
9651
9652 * linux-low.c (linux_join): Skip process lookup.
9653 * spu-low.c (spu_join): Ditto.
9654 * server.c (join_inferiors_callback): Delete.
9655 (process_serial_event): For 'D' packet (detach) call join_inferior
9656 directly.
9657
4d393d60
JM
96582011-05-04 Joseph Myers <joseph@codesourcery.com>
9659
9660 * README: Don't mention xscale*-*-linux*.
9661 * configure.srv (xscale*-*-linux*): Don't handle target.
9662
b00ad6ff
NF
96632011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9664
9665 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9666 casting pointers.
9667 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9668 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9669 (i386_emit_void_call_2): Likewise.
9670
af96c192
YQ
96712011-04-26 Yao Qi <yao@codesourcery.com>
9672
43aaf8b6
PA
9673 * linux-low.c: Move common macros to linux-ptrace.h.
9674 Include linux-ptrace.h.
af96c192
YQ
9675 * Makefile.in (linux_ptrace_h): New.
9676 (linux-low.o): Depends on linux-ptrace.h.
9677
03f2bd59
JK
96782011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9679
9680 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9681 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9682 (remote_prepare): New function with most of the TCP code from ...
9683 (remote_open): ... here. Detect PORT here unconditionally. Move also
9684 setting transport_is_reliable.
9685 * server.c (run_once): New variable.
9686 (gdbserver_usage): Document it.
9687 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9688 the first run if RUN_ONCE.
9689 * server.h (run_once, remote_prepare): New declarations.
9690
7a9dd1b2
TT
96912011-04-19 Tom Tromey <tromey@redhat.com>
9692
9693 * win32-low.c (handle_load_dll): Remove duplicate "the".
9694
81239425
PM
96952011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9696
9697 Remove support for old Cygwin 1.5 versions.
9698 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9699 function to avoid warning.
9700 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9701 warning.
9702
9e0627f1
PM
97032011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9704
9705 * gdbserver/server.h (Macro _): Define it if not available.
9706
588eebee
MS
97072011-03-14 Michael Snyder <msnyder@vmware.com>
9708
348af9f7 9709 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9710
43f70d4c
JB
97112011-03-10 Joel Brobecker <brobecker@adacore.com>
9712
9713 * Makefile.in (maintainer-clean realclean distclean): Remove
9714 "make ... subdir_do" command.
9715
348af9f7
MS
97162011-03-10 Michael Snyder <msnyder@vmware.com>
9717
9718 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9719
9720 * server.c (handle_v_run): Free alloced buffer on early return.
9721
e637a4f5
YQ
97222011-03-09 Yao Qi <yao@codesourcery.com>
9723
9724 Revert:
9725 2011-03-04 Yao Qi <yao@codesourcery.com>
9726
9727 * Makefile.in: Remove GNU make feature --directory.
9728
9729 2011-03-05 Yao Qi <yao@codesourcery.com>
9730
9731 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9732 (subdir_do): New make target. Copied from gdb/Makefile.
9733 (maintainer-clean, realclean, distclean, clean): Call corresponding
9734 make targets in common/Makefile.
9735
9736 2011-02-11 Yao Qi <yao@codesourcery.com>
9737
9738 * configure.ac: Call AC_PROG_RANLIB.
9739 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9740 * configure: Regenerate.
9741
e6edda56
JK
97422011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9743
9744 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9745
e5141119
JB
97462011-03-06 Yao Qi <yao@codesourcery.com>
9747
9748 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9749
64794aa4
JB
97502011-03-05 Yao Qi <yao@codesourcery.com>
9751
9752 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9753 (subdir_do): New make target. Copied from gdb/Makefile.
9754 (maintainer-clean, realclean, distclean, clean): Call corresponding
9755 make targets in common/Makefile.
9756
7a762829
YQ
97572011-03-04 Yao Qi <yao@codesourcery.com>
9758
9759 * Makefile.in: Remove GNU make feature --directory.
9760
348af9f7
MS
97612011-03-04 Michael Snyder <msnyder@vmware.com>
9762
9763 * server.c (queue_stop_reply): Call xmalloc not malloc.
9764
97652011-03-02 Michael Snyder <msnyder@vmware.com>
9766
9767 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9768
9f72fee2
MS
97692011-02-28 Michael Snyder <msnyder@vmware.com>
9770
588eebee
MS
9771 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9772 (cmd_qtframe): Ditto.
9773 (cmd_qtbuffer): Ditto.
9774 (cmd_bigqtbuffer): Ditto.
9775
9f72fee2
MS
9776 * utils.c (decimal2str): Initialize 'width' to nine, then
9777 don't mess with it.
9778
8040bd49
UW
97792011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9780
9781 * hostio.c (require_data): Free *data, not data.
9782
7e52cbd0
JK
97832011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9784
9785 * hostio.c (require_data): Use free, not xfree.
9786
9130f83e
MS
97872011-02-27 Michael Snyder <msnyder@vmware.com>
9788
4b812f4e
MS
9789 * server.c (handle_query): Discard unused value.
9790
9130f83e
MS
9791 * hostio.c (require_data): Free malloc memory before returning
9792 error.
9793
69d37113
MS
97942011-02-26 Michael Snyder <msnyder@vmware.com>
9795
9796 * linux-low.c (list_threads): Call closedir for dirent.
9797
35f5825a
MS
97982011-02-27 Michael Snyder <msnyder@vmware.com>
9799
2a589cef
MS
9800 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9801 a case statement falls through.
9802
0adea5f7
MS
9803 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9804
35f5825a
MS
9805 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9806 in comparison.
9807
238f1c74
MS
98082011-02-26 Michael Snyder <msnyder@vmware.com>
9809
9810 * utils.c (decimal2str): Eliminate dead code and dead param.
9811 (pulongest): Drop dead param from call to decimal2str.
9812 (plongest): Ditto.
9813
633ff500
JB
98142011-02-24 Joel Brobecker <brobecker@adacore.com>
9815
9816 Revert the following patch (not approved yet):
9817 2011-02-21 Hui Zhu <teawater@gmail.com>
9818 * tracepoint.c (tp_printf): New function.
9819 (eval_agent_expr): Handle gdb_agent_op_printf.
9820
f9c6ff72
HZ
98212011-02-21 Hui Zhu <teawater@gmail.com>
9822
9823 * tracepoint.c (tp_printf): New function.
9824 (eval_agent_expr): Handle gdb_agent_op_printf.
9825
94d5e490
TT
98262011-02-18 Tom Tromey <tromey@redhat.com>
9827
9828 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9829 (tracepoint.o): Likewise.
9830 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9831 (gdb_agent_op_names): Likewise.
9832
c7f96d2b
TT
98332011-02-18 Tom Tromey <tromey@redhat.com>
9834
9835 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9836 gdb_agent_op_rot>: New constants.
9837 (gdb_agent_op_names): Add pick and roll.
9838 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9839 cases.
9840
0feedb2c
JK
98412011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9842
9843 * aclocal.m4: Regenerated with aclocal-1.11.1.
9844
b3b9301e
PA
98452011-02-14 Pedro Alves <pedro@codesourcery.com>
9846
9847 * server.c (handle_qxfer_traceframe_info): New.
9848 (qxfer_packets): Register "traceframe-info".
9849 (handle_query): Report support for qXfer:traceframe-info:read+.
9850 * tracepoint.c (match_blocktype): New.
9851 (traceframe_find_block_type): Rename to ...
9852 (traceframe_walk_blocks): ... this. Add callback filter argument,
9853 and use it.
9854 (traceframe_find_block_type): New, reimplemented on top of
9855 traceframe_walk_blocks.
9856 (build_traceframe_info_xml): New.
9857 (traceframe_read_info): New.
9858 * server.h (traceframe_read_info): Declare.
9859
4f3e6fb7
YQ
98602011-02-11 Yao Qi <yao@codesourcery.com>
9861
9862 * configure.ac: Call AC_PROG_RANLIB.
9863 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9864 * configure: Regenerate.
9865
764880b7
PA
98662011-02-07 Pedro Alves <pedro@codesourcery.com>
9867
9868 * server.c (gdb_read_memory): Change return semantics to allow
9869 partial transfers.
9870 (handle_search_memory_1): Adjust.
9871 (process_serial_event) <'m' packet>: Handle partial transfers.
9872 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9873
1c79eb8a
PA
98742011-01-28 Pedro Alves <pedro@codesourcery.com>
9875
9876 * regcache.c (init_register_cache): Initialize
9877 regcache->register_status.
9878 (free_register_cache): Release regcache->register_status.
9879 (regcache_cpy): Copy register_status.
9880 (registers_to_string): Print 'x's for unavailable registers.
9881 (supply_register): Mark the register's status valid or
9882 unavailable, depending on whether a buffer was passed in or not.
9883 (supply_register_zeroed): New.
9884 (supply_regblock): Mark the registers' status valid or
9885 unavailable, depending on whether a buffer was passed in or not.
9886 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9887 (struct regcache): New `register_status' field.
9888 (supply_register_zeroed): Declare.
9889 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9890 supply_register_zeroed, rather than passing a NULL buffer to
9891 supply_register.
9892 * tracepoint.c (fetch_traceframe_registers): Update comment.
9893
85724a0e
PA
98942011-01-28 Pedro Alves <pedro@codesourcery.com>
9895
9896 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9897 buffer explicit.
9898
d08aafef
PA
98992011-01-25 Pedro Alves <pedro@codesourcery.com>
9900
9901 * server.h (decode_xfer_write): Change prototype.
9902 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9903 and don't extract the annex here.
9904 * server.c (decode_xfer_read): Remove `annex' parameter,
9905 and don't extract the annex here.
9906 (decode_xfer): New.
9907 (struct qxfer): New.
9908 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9909 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9910 (handle_qxfer_statictrace): New functions, abstracted out from
9911 handle_query, and made to use the struct qxfer interface.
9912 (handle_threads_qxfer_proper): Rename to ...
9913 (handle_qxfer_threads_proper): ... this.
9914 (handle_threads_qxfer): Rename to ...
9915 (handle_qxfer_threads): ... this. Adjust.
9916 (qxfer_packets): New array.
9917 (handle_qxfer): New function.
9918 (handle_query): Use handle_qxfer.
9919
493e2a69
MS
99202011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9921
9922 * gdbreplay.c: Shorten lines of >= 80 columns.
9923 * linux-low.c: Ditto.
9924 * linux-ppc-low.c: Ditto.
9925 * linux-s390-low.c: Ditto.
9926 * linux-sparc-low.c: Ditto.
9927 * linux-x86-low.c: Ditto.
9928 * linux-xtensa-low.c: Ditto.
9929 * mem-break.c: Ditto.
9930 * nto-low.c: Ditto.
9931 * regcache.h: Ditto.
9932 * remote-utils.c: Ditto.
9933 * server.c: Ditto.
9934 * server.h: Ditto.
9935 * thread-db.c: Ditto.
9936 * tracepoint.c: Ditto.
9937 * utils.c: Ditto.
9938 * win32-low.h: Ditto.
9939
44944448
JB
99402011-01-05 Joel Brobecker <brobecker@adacore.com>
9941
9942 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9943 update.
9944
71ce852c
JB
99452011-01-01 Joel Brobecker <brobecker@adacore.com>
9946
9947 * server.c (gdbserver_version): Update copyright year in version
9948 output.
9949 * gdbreplay.c (gdbreplay_version): Ditto.
9950
eb826dc6
MF
99512010-12-29 Jie Zhang <jie.zhang@analog.com>
9952
9953 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9954 * linux-bfin-low.c: New file.
9955 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9956 PT_DATA_ADDR for BFIN targets.
9957 * Makefile.in (SFILES): Add linux-bfin-low.c.
9958 (clean): Remove reg-bfin.c.
9959 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9960 * README: Mention supported Blackfin targets.
9961
39ab222a
MF
99622010-12-23 Mike Frysinger <vapier@gentoo.org>
9963
9964 * .gitignore: New file.
9965
a1f2ce7d
MF
99662010-11-16 Mike Frysinger <vapier@gentoo.org>
9967
9968 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9969
f474844c
JZ
99702010-10-22 Jie Zhang <jie@codesourcery.com>
9971
9972 * Makefile.in: Add FLAGS_TO_PASS variable.
9973 (install): Remove dependency of install-only and recursively
9974 invoke make for install-only.
9975
f1048712
DE
99762010-10-04 Doug Evans <dje@google.com>
9977
9978 * Makefile.in (uninstall): Use $(DESTDIR).
9979
b53a1623
PA
99802010-09-24 Pedro Alves <pedro@codesourcery.com>
9981
e6ee044d
PA
9982 PR gdb/11842
9983
b53a1623
PA
9984 * linux-x86-low.c (compat_siginfo_from_siginfo)
9985 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9986 si_code is < 0. Check for si_code == SI_TIMER before checking for
9987 si_code < 0.
9988
fa1bd1e4
JB
99892010-09-13 Joel Brobecker <brobecker@adacore.com>
9990
9991 * lynx-i386-low.c: New file.
9992 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9993
47fac8f8
JB
99942010-09-13 Joel Brobecker <brobecker@adacore.com>
9995
9996 * lynx-low.c (ptrace_request_to_str): Remove handling for
9997 request values that have been removed in LynxOS 5.x.
9998
1adfc54d
JB
99992010-09-13 Joel Brobecker <brobecker@adacore.com>
10000
10001 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10002 <ptrace.h>
10003
c2a66c29
NS
100042010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10005
10006 * configure.ac: Add --enable-inprocess-agent option.
10007 * configure: Rebuilt.
10008
32fcada3
YQ
100092010-09-06 Yao Qi <yao@codesourcery.com>
10010
10011 * linux-low.c (linux_kill): Remove unused variable.
10012 (linux_stabilize_threads): Likewise.
10013 * server.c (start_inferior): Likewise.
10014 (queue_stop_reply_callback): Likewise.
10015 * tracepoint.c (do_action_at_tracepoint): Likewise.
10016
0cccb683
YQ
100172010-09-06 Yao Qi <yao@codesourcery.com>
10018
10019 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10020 on return.
10021
423ec54c
JK
100222010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10023
10024 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10025
12ac6819
PA
100262010-09-06 Pedro Alves <pedro@codesourcery.com>
10027
10028 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10029 "$(IPA_DEPFILES)".
10030
8ed54b31
JB
100312010-09-01 Joel Brobecker <brobecker@adacore.com>
10032
10033 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10034 gdbserver/lynx-ppc-low.c: New files.
10035 * Makefile.in (lynx_low_h): New variable.
10036 (lynx-low.o, lynx-ppc-low.o): New rules.
10037 * configure.ac: On LynxOS, link with -lnetinet.
10038 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10039 * configure: regenerate.
10040
bb0116a4
JB
100412010-09-01 Joel Brobecker <brobecker@adacore.com>
10042
10043 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10044 * configure.ac: Add check for vasprintf and vsnprintf.
10045 * configure, config.in: Regenerate.
10046 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10047
a778ab81 100482010-09-01 Joel Brobecker <brobecker@adacore.com>
10049
10050 * gdbreplay.c: Move include of alloca.h up, next to include of
10051 malloc.h.
10052 * server.h: Add include of malloc.h.
10053 * mem-break.c: Remove include of malloc.h.
10054 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10055
8b034a19 100562010-09-01 Joel Brobecker <brobecker@adacore.com>
10057
10058 * Makefile.in (memmem.o): Build with -Wno-error.
10059
100602010-09-01 Joel Brobecker <brobecker@adacore.com>
10061
10062 * utils.c (xsnprintf): Make non-static.
10063 * server.h: Add xsnprintf declaration.
10064 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10065 replace calls to snprintf by calls to xsnprintf throughout.
10066
100672010-09-01 Joel Brobecker <brobecker@adacore.com>
10068
10069 * configure.ac: Add configure check for alloca.
10070 * configure, config.in: Regenerate.
10071 * server.h: Include alloca.h if it exists.
10072 * gdbreplay.c: Include alloca.h if it exists.
10073
1a981360
PA
100742010-08-28 Pedro Alves <pedro@codesourcery.com>
10075
10076 * linux-low.c (__SIGRTMIN): Define if not already defined.
10077 (linux_create_inferior): Check for __ANDROID__ rather than
10078 __SIGRTMIN.
10079 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10080 are already deferred.
10081 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10082 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10083 stopped and already has a pending signal to report.
10084 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10085 a pending signal to report or is moving out of a jump pad.
10086 (linux_init_signals): Check for __ANDROID__ rather than
10087 __SIGRTMIN.
10088
b4d51a55
PA
100892010-08-28 Pedro Alves <pedro@codesourcery.com>
10090
10091 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10092 debug_threads check. Avoid a linear search when not doing debug
10093 output.
10094
ec48365d
PA
100952010-08-27 Pedro Alves <pedro@codesourcery.com>
10096
10097 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10098 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10099 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10100 (process_event): Change local fd's type to gdb_fildes_t.
10101 (create_file_handler): Adjust prototype.
10102 (delete_file_handler): Adjust prototype.
10103 (handle_file_event): Adjust prototype. Use pfildes.
10104 (create_file_event): Adjsut prototype.
10105 * remote-utils.c (remote_desc, listen_desc): Change type to
10106 gdb_fildes_t.
10107 * server.h: New gdb_fildes_t typedef.
10108 [USE_WIN32API]: Include winsock2.h.
10109 (delete_file_handler, add_file_handler): Adjust prototypes.
10110 (pfildes): Declare.
10111 * utils.c (pfildes): New.
10112
854d88f0
PA
101132010-08-27 Pedro Alves <pedro@codesourcery.com>
10114
10115 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10116 * configure: Regenerate.
10117
0146f85b
PA
101182010-08-27 Pedro Alves <pedro@codesourcery.com>
10119
10120 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10121 (linux_done_accessing_memory): ... this.
10122 (linux_target_ops): Adjust.
10123 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10124 * nto-low.c (nto_target_ops): Adjust comment.
10125 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10126 * spu-low.c (spu_target_ops): Adjust comment.
10127 * target.h (target_ops): Rename unprepare_to_access_memory field
10128 to done_accessing_memory.
10129 (unprepare_to_access_memory): Rename to ...
10130 (done_accessing_memory): ... this.
10131
90d74c30
PA
101322010-08-26 Pedro Alves <pedro@codesourcery.com>
10133
10134 * linux-low.c (linux_prepare_to_access_memory): New.
10135 (linux_unprepare_to_access_memory): New.
10136 (linux_target_ops): Install them.
10137 * server.c (read_memory): Rename to ...
10138 (gdb_read_memory): ... this. Use
10139 prepare_to_access_memory/prepare_to_access_memory.
10140 (write_memory): Rename to ...
10141 (gdb_write_memory): ... this. Use
10142 prepare_to_access_memory/prepare_to_access_memory.
10143 (handle_search_memory_1): Adjust.
10144 (process_serial_event): Adjust.
10145 * target.h (struct target_ops): New fields
10146 prepare_to_access_memory and unprepare_to_access_memory.
10147 (prepare_to_access_memory, unprepare_to_access_memory): New.
10148 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10149 prepare_to_access_memory/prepare_to_access_memory.
10150 * nto-low.c (nto_target_ops): Adjust.
10151 * spu-low.c (spu_target_ops): Adjust.
10152 * win32-low.c (win32_target_ops): Adjust.
10153
fd467969
PA
101542010-08-26 Pedro Alves <pedro@codesourcery.com>
10155
10156 * Makefile.in (WARN_CFLAGS): Get it from configure.
10157 (WERROR_CFLAGS): New.
10158 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10159 * configure.ac: Introduce --enable-werror, which adds -Werror to
10160 the compiler command line. Enabled by default. Disable with
10161 --disable-werror. Add -Wdeclaration-after-statement
10162 Wpointer-arith and -Wformat-nonliteral to warning flags.
10163 * configure: Regenerate.
10164
331e2f5f
PA
101652010-08-26 Pedro Alves <pedro@codesourcery.com>
10166
10167 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10168
e581f2b4
PA
101692010-08-26 Pedro Alves <pedro@codesourcery.com>
10170
10171 * gdbreplay.c (remote_error): New.
10172 (gdbchar): New.
10173 (expect): Use gdbchar. Check for error reading from GDB.
10174 Clarify sync error output.
10175 (play): Check for errors writing to GDB.
10176 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10177 * remote-utils.c (getpkt): Check for errors writing to the remote
10178 descriptor.
10179
3c11dd79
PA
101802010-08-25 Pedro Alves <pedro@codesourcery.com>
10181
10182 * linux-low.c (linux_wait_1): Move non-debugging code out of
10183 `debug_threads' control.
10184
d20a8ad9
PA
101852010-08-25 Pedro Alves <pedro@codesourcery.com>
10186
10187 * linux-low.c (linux_wait_1): Don't set last_status here.
10188 * server.c (push_event, queue_stop_reply_callback): Assert we're
10189 not pushing a TARGET_WAITKIND_IGNORE event.
10190 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10191 (myresume, handle_target_event): Set the thread's last_resume_kind
10192 and last_status from the target returned status.
10193
964e4306
PA
101942010-08-25 Pedro Alves <pedro@codesourcery.com>
10195
10196 PR threads/10729
10197
10198 * linux-x86-low.c (update_debug_registers_callback): New.
10199 (i386_dr_low_set_addr): Use it.
10200 (i386_dr_low_get_addr): New.
10201 (i386_dr_low_set_control): Use update_debug_registers_callback.
10202 (i386_dr_low_get_control): New.
10203 (i386_dr_low_get_status): Adjust.
10204 * linux-low.c (linux_stop_lwp): New.
10205 * linux-low.h (linux_stop_lwp): Declare.
10206
10207 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10208 argument instead of a i386_debug_reg_state.
10209 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10210 a i386_debug_reg_state.
10211 (i386_insert_aligned_watchpoint): Adjust.
10212 (i386_remove_aligned_watchpoint): Adjust.
10213 (i386_low_stopped_data_address): Read the debug registers from the
10214 inferior instead of from the mirrors.
10215 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10216 (i386_dr_low_get_addr): Declare.
10217 (i386_dr_low_get_control): Declare.
10218 (i386_dr_low_get_status): Change prototype.
10219
10220 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10221 (i386_dr_low_get_addr): New.
10222 (i386_dr_low_get_control): New.
10223 (i386_dr_low_get_status): Adjust prototype. Return
10224 dr_status_mirror.
10225 (i386_initial_stuff): Clear dr_status_mirror and
10226 dr_control_mirror.
10227 (i386_get_thread_context): Adjust.
10228 (i386_set_thread_context): Adjust.
10229 (i386_thread_added): Adjust.
10230
5f21a75b
PA
102312010-08-24 Pedro Alves <pedro@codesourcery.com>
10232
10233 * linux-low.h (linux_thread_area): Delete declaration.
10234
3e4c1235
TS
102352010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10236
10237 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10238 after its termination.
10239
1971b033
PA
102402010-08-09 Pedro Alves <pedro@codesourcery.com>
10241
10242 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10243 (gdb_wants_all_stopped): Delete.
10244 (linux_wait_1): Don't call them.
10245 * server.c (handle_v_cont): Tag all threads as want-stopped.
10246 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10247 stopped as "client-wants-stopped".
10248
310444ac
PA
102492010-07-31 Pedro Alves <pedro@codesourcery.com>
10250
10251 * Makefile.in (signals_h): New.
10252 (server_h): Depend on it.
10253 (server.o): Don't depend on $(signals_def).
10254 (signals.o): Depend on $(signals_def).
10255
a19cae16
JK
102562010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10257
10258 * Makefile.in (signals_def): New.
10259 (server_h): Append include/gdb/signals.h and signals_def.
10260 (server.o): Append signals_def.
10261
30d50328
JK
102622010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10263
10264 * server.c (handle_target_event): Use target_signal_to_host for
10265 resume_info.sig initialization.
10266 * target.h (struct thread_resume) <sig>: New comment.
10267
5c3216e2
OS
102682010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10269
c6f46ca0
OS
10270 * server.c (handle_query): strcpy() the returned string from paddress()
10271 instead of sprintf().
5c3216e2
OS
10272 * utils.c (paddress): Return phex_nz().
10273
6bd31874
JB
102742010-07-07 Joel Brobecker <brobecker@adacore.com>
10275
10276 * server.c (handle_v_cont): Call mourn_inferior if process
10277 just exited.
10278 (myresume): Likewise.
10279
0fb4aa4b
PA
102802010-07-01 Pedro Alves <pedro@codesourcery.com>
10281
10282 Static tracepoints, and integration with UST.
10283
10284 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10285 * mem-break.c (uninsert_all_breakpoints)
10286 (reinsert_all_breakpoints): New.
10287 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10288 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10289 (gdb_agent_ust_loaded, helper_thread_id)
10290 (gdb_agent_helper_thread_id): New macros.
10291 (struct ipa_sym_addresses): Add addr_ust_loaded,
10292 addr_helper_thread_id, addr_cmd_buf.
10293 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10294 (in_process_agent_loaded_ust): New.
10295 (write_e_ust_not_loaded): New.
10296 (maybe_write_ipa_ust_not_loaded): New.
10297 (struct collect_static_trace_data_action): New.
10298 (enum tracepoint_type) <static_tracepoint>: New.
10299 (struct tracepoint) <handle>: Mention static tracepoints.
10300 (struct static_tracepoint_ctx): New.
10301 (CMD_BUF_SIZE): New.
10302 (add_tracepoint_action): Handle static tracepoint actions.
10303 (unprobe_marker_at): New.
10304 (clear_installed_tracepoints): Handle static tracepoints.
10305 (cmd_qtdp): Handle static tracepoints.
10306 (probe_marker_at): New.
10307 (cmd_qtstart): Handle static tracepoints.
10308 (response_tracepoint): Handle static tracepoints.
10309 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10310 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10311 (get_context_regcache): Handle static tracepoints.
10312 (do_action_at_tracepoint): Handle static tracepoint actions.
10313 (traceframe_find_block_type): Handle static trace data blocks.
10314 (traceframe_read_sdata): New.
10315 (download_tracepoints): Download static tracepoint actions.
10316 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10317 (GDB_PROBE_NAME): New.
10318 (ust_ops): New.
10319 (GET_UST_SYM): New.
10320 (USTF): New.
10321 (dlsym_ust): New.
10322 (ust_marker_to_static_tracepoint): New.
10323 (gdb_probe): New.
10324 (collect_ust_data_at_tracepoint): New.
10325 (gdb_ust_probe): New.
10326 (UNIX_PATH_MAX, SOCK_DIR): New.
10327 (gdb_ust_connect_sync_socket): New.
10328 (resume_thread, stop_thread): New.
10329 (run_inferior_command): New.
10330 (init_named_socket): New.
10331 (gdb_ust_socket_init): New.
10332 (cstr_to_hexstr): New.
10333 (next_st): New.
10334 (first_marker, next_marker): New.
10335 (response_ust_marker): New.
10336 (cmd_qtfstm, cmd_qtsstm): New.
10337 (unprobe_marker_at, probe_marker_at): New.
10338 (cmd_qtstmat, gdb_ust_thread): New.
10339 (gdb_ust_init): New.
10340 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10341 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10342 (ST_REGENTRY): New.
10343 (x86_64_st_collect_regmap): New.
10344 (X86_64_NUM_ST_COLLECT_GREGS): New.
10345 (AMD64_RIP_REGNUM): New.
10346 (supply_static_tracepoint_registers): New.
10347 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10348 (ST_REGENTRY): New.
10349 (i386_st_collect_regmap): New.
10350 (i386_NUM_ST_COLLECT_GREGS): New.
10351 (supply_static_tracepoint_registers): New.
10352 * server.c (handle_query): Handle qXfer:statictrace:read.
10353 <qSupported>: Report support for StaticTracepoints, and
10354 qXfer:statictrace:read features.
10355 * server.h (traceframe_read_sdata)
10356 (supply_static_tracepoint_registers): Declare.
10357 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10358 (unpack_varlen_hex): Include in IPA build.
10359 * Makefile.in (ustlibs, ustinc): New.
10360 (IPA_OBJS): Add remote-utils-ipa.o.
10361 ($(IPA_LIB)): Link -ldl and -lpthread.
10362 (UST_CFLAGS): New.
10363 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10364 * config.in, configure: Regenerate.
10365
9e4344e5
PA
103662010-06-20 Ian Lance Taylor <iant@google.com>
10367 Pedro Alves <pedro@codesourcery.com>
10368
10369 * linux-x86-low.c (always_true): Delete.
10370 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10371 trying to fool the compiler with always_true.
10372
c6beb2cb
PA
103732010-06-20 Pedro Alves <pedro@codesourcery.com>
10374
10375 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10376 conditions in gdbserver.
10377
d2ed6730
UW
103782010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10379
10380 * spu-low.c (spu_read_memory): Wrap around local store limit.
10381 (spu_write_memory): Likewise.
10382
4e29fb54
PA
103832010-06-15 Pedro Alves <pedro@codesourcery.com>
10384
10385 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10386 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10387 LONGEST uses.
10388 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10389 uses.
10390 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10391 uses with LONGEST uses.
10392
6a271cae
PA
103932010-06-14 Stan Shebs <stan@codesourcery.com>
10394 Pedro Alves <pedro@codesourcery.com>
10395
10396 Bytecode compiler.
10397
10398 * linux-x86-low.c: Include limits.h.
10399 (add_insns): New.
10400 (always_true): New.
10401 (EMIT_ASM): New.
10402 (EMIT_ASM32): New.
10403 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10404 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10405 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10406 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10407 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10408 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10409 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10410 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10411 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10412 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10413 (amd64_emit_void_call_2): New.
10414 (amd64_emit_ops): New.
10415 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10416 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10417 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10418 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10419 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10420 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10421 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10422 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10423 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10424 (i386_emit_stack_adjust, i386_emit_int_call_1)
10425 (i386_emit_void_call_2): New.
10426 (i386_emit_ops): New.
10427 (x86_emit_ops): New.
10428 (the_low_target): Install x86_emit_ops.
10429 * server.h (struct emit_ops): New.
10430 (get_raw_reg_func_addr): Declare.
10431 (current_insn_ptr, emit_error): Declare.
10432 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10433 (set_trace_state_variable_value): New defines.
10434 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10435 addr_get_trace_state_variable_value and
10436 addr_set_trace_state_variable_value.
10437 (symbol_list): New fields for get_raw_reg,
10438 get_trace_state_variable_value and set_trace_state_variable_value.
10439 (condfn): New typedef.
10440 (struct tracepoint): New field `compiled_cond'.
10441 (do_action_at_tracepoint): Clear compiled_cond.
10442 (get_trace_state_variable_value, set_trace_state_variable_value):
10443 Export in the IPA.
10444 (condition_true_at_tracepoint): If there's a compiled condition,
10445 run that.
10446 (current_insn_ptr, emit_error): New globals.
10447 (struct bytecode_address): New.
10448 (get_raw_reg_func_addr): New.
10449 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10450 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10451 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10452 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10453 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10454 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10455 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10456 (compile_tracepoint_condition, compile_bytecodes): New.
10457 * target.h (emit_ops): Forward declare.
10458 (struct target_ops): New field emit_ops.
10459 (target_emit_ops): New.
10460 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10461 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10462 * linux-low.c (linux_emit_ops): New.
10463 (linux_target_ops): Install it.
10464 * linux-low.h (struct linux_target_ops): New field emit_ops.
10465
92b72907
UW
104662010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10467
10468 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10469 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10470
fa593d66
PA
104712010-06-01 Pedro Alves <pedro@codesourcery.com>
10472 Stan Shebs <stan@codesourcery.com>
10473
10474 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10475 (all): Depend on $(extra_libraries).
10476 (install-only): Install the IPA.
10477 (IPA_OBJS, IPA_LIB): New.
10478 (clean): Remove the IPA lib.
10479 (IPAGENT_CFLAGS): New.
10480 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10481 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10482 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10483 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10484 * configure.ac: Check for atomic builtins support in the compiler.
10485 (IPA_DEPFILES, extra_libraries): Define.
10486 * configure.srv (ipa_obj): Add description.
10487 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10488 (i[34567]86-*-linux*): Set ipa_obj.
10489 (x86_64-*-linux*): Set ipa_obj.
10490 * linux-low.c (stabilizing_threads): New.
10491 (supports_fast_tracepoints): New.
10492 (linux_detach): Stabilize threads before detaching.
10493 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10494 the lwp is either not stabilizing, or is moving out of a jump pad.
10495 (linux_fast_tracepoint_collecting): New.
10496 (maybe_move_out_of_jump_pad): New.
10497 (enqueue_one_deferred_signal): New.
10498 (dequeue_one_deferred_signal): New.
10499 (linux_wait_for_event_1): If moving out of a jump pad, defer
10500 pending signals to later.
10501 (linux_stabilize_threads): New.
10502 (linux_wait_1): Check if threads need moving out of jump pads, and
10503 do it if so.
10504 (stuck_in_jump_pad_callback): New.
10505 (move_out_of_jump_pad_callback): New.
10506 (lwp_running): New.
10507 (linux_resume_one_lwp): Handle moving out of jump pads.
10508 (linux_set_resume_request): Dequeue deferred signals.
10509 (need_step_over_p): Also step over fast tracepoint jumps.
10510 (start_step_over): Also uninsert fast tracepoint jumps.
10511 (finish_step_over): Also reinsert fast tracepoint jumps.
10512 (linux_install_fast_tracepoint_jump): New.
10513 (linux_target_ops): Install linux_stabilize_threads and
10514 linux_install_fast_tracepoint_jump_pad.
10515 * linux-low.h (linux_target_ops) <get_thread_area,
10516 install_fast_tracepoint_jump_pad>: New fields.
10517 (struct lwp_info) <collecting_fast_tracepoint,
10518 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10519 (linux_get_thread_area): Declare.
10520 * linux-x86-low.c (jump_insn): New.
10521 (x86_get_thread_area): New.
10522 (append_insns): New.
10523 (push_opcode): New.
10524 (amd64_install_fast_tracepoint_jump_pad): New.
10525 (i386_install_fast_tracepoint_jump_pad): New.
10526 (x86_install_fast_tracepoint_jump_pad): New.
10527 (the_low_target): Install x86_get_thread_area and
10528 x86_install_fast_tracepoint_jump_pad.
10529 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10530 (struct fast_tracepoint_jump): New.
10531 (fast_tracepoint_jump_insn): New.
10532 (fast_tracepoint_jump_shadow): New.
10533 (find_fast_tracepoint_jump_at): New.
10534 (fast_tracepoint_jump_here): New.
10535 (delete_fast_tracepoint_jump): New.
10536 (set_fast_tracepoint_jump): New.
10537 (uninsert_fast_tracepoint_jumps_at): New.
10538 (reinsert_fast_tracepoint_jumps_at): New.
10539 (set_breakpoint_at): Use write_inferior_memory.
10540 (uninsert_raw_breakpoint): Use write_inferior_memory.
10541 (check_mem_read): Mask out fast tracepoint jumps.
10542 (check_mem_write): Mask out fast tracepoint jumps.
10543 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10544 (set_fast_tracepoint_jump): Declare.
10545 (delete_fast_tracepoint_jump)
10546 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10547 (reinsert_fast_tracepoint_jumps_at): Declare.
10548 * regcache.c: Don't compile many functions when building the
10549 in-process agent library.
10550 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10551 the register buffer in the heap.
10552 (free_register_cache): If the register buffer isn't owned by the
10553 regcache, don't free it.
10554 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10555 pre-existing register caches.
10556 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10557 type.
10558 (convert_ascii_to_int): : Constify `from' parameter type.
10559 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10560 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10561 the needed buffer in-place.
10562 (relocate_instruction): New.
10563 * server.c (handle_query) <qSymbols>: If the target supports
10564 tracepoints, give it a chance of looking up symbols. Report
10565 support for fast tracepoints.
10566 (handle_status): Stabilize threads.
10567 (process_serial_event): Adjust.
10568 * server.h (struct fast_tracepoint_jump): Forward declare.
10569 (struct process_info) <fast_tracepoint_jumps>: New field.
10570 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10571 (decode_X_packet, decode_M_packet): Adjust.
10572 (relocate_instruction): Declare.
10573 (in_process_agent_loaded): Declare.
10574 (tracepoint_look_up_symbols): Declare.
10575 (struct fast_tpoint_collect_status): Declare.
10576 (fast_tracepoint_collecting): Declare.
10577 (force_unlock_trace_buffer): Declare.
10578 (handle_tracepoint_bkpts): Declare.
10579 (initialize_low_tracepoint)
10580 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10581 * target.h (struct target_ops) <stabilize_threads,
10582 install_fast_tracepoint_jump_pad>: New fields.
10583 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10584 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10585 [HAVE_STDINT_H]: Include stdint.h.
10586 (trace_debug_1): Rename to ...
10587 (trace_vdebug): ... this.
10588 (trace_debug): Rename to ...
10589 (trace_debug_1): ... this. Add `level' parameter.
10590 (trace_debug): New.
10591 (ATTR_USED, ATTR_NOINLINE): New.
10592 (IP_AGENT_EXPORT): New.
10593 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10594 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10595 (about_to_request_buffer_space, trace_buffer_is_full)
10596 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10597 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10598 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10599 (traceframe_write_count, traceframes_created)
10600 (trace_state_variables)
10601 New renaming defines.
10602 (struct ipa_sym_addresses): New.
10603 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10604 (symbol_list): New.
10605 (ipa_sym_addrs): New.
10606 (all_tracepoint_symbols_looked_up): New.
10607 (in_process_agent_loaded): New.
10608 (write_e_ipa_not_loaded): New.
10609 (maybe_write_ipa_not_loaded): New.
10610 (tracepoint_look_up_symbols): New.
10611 (debug_threads) [IN_PROCESS_AGENT]: New.
10612 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10613 (UNKNOWN_SIDE_EFFECTS): New.
10614 (stop_tracing): New.
10615 (flush_trace_buffer): New.
10616 (stop_tracing_bkpt): New.
10617 (flush_trace_buffer_bkpt): New.
10618 (read_inferior_integer): New.
10619 (read_inferior_uinteger): New.
10620 (read_inferior_data_pointer): New.
10621 (write_inferior_data_pointer): New.
10622 (write_inferior_integer): New.
10623 (write_inferior_uinteger): New.
10624 (struct collect_static_trace_data_action): Delete.
10625 (enum tracepoint_type): New.
10626 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10627 <actions_str, step_actions, step_actions_str>: Only include in
10628 GDBserver.
fa593d66
PA
10629 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10630 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10631 (tracepoints): Use IP_AGENT_EXPORT.
10632 (last_tracepoint): Don't include in the IPA.
10633 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10634 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10635 (alloced_trace_state_variables): New.
10636 (trace_state_variables): Use IP_AGENT_EXPORT.
10637 (traceframe_t): Delete unused variable.
10638 (circular_trace_buffer): Don't include in the IPA.
10639 (trace_buffer_start): Delete.
10640 (struct trace_buffer_control): New.
10641 (trace_buffer_free): Delete.
10642 (struct ipa_trace_buffer_control): New.
10643 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10644 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10645 New.
10646 (trace_buffer_ctrl): New.
10647 (TRACE_BUFFER_CTRL_CURR): New.
10648 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10649 Reimplement as macros.
10650 (trace_buffer_wrap): Delete.
10651 (traceframe_write_count, traceframe_read_count)
10652 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10653 (struct tracepoint_hit_ctx) <type>: New field.
10654 (struct fast_tracepoint_ctx): New.
10655 (memory_barrier): New.
10656 (cmpxchg): New.
10657 (record_tracepoint_error): Update atomically in the IPA.
10658 (clear_inferior_trace_buffer): New.
10659 (about_to_request_buffer_space): New.
10660 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10661 updating the same buffer.
10662 (add_tracepoint): Default the tracepoint's type to trap
10663 tracepoint, and orig_size to -1.
10664 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10665 internal variables.
10666 (create_trace_state_variable): New parameter `gdb'. Handle it.
10667 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10668 (cmd_qtdp): Handle fast tracepoints.
10669 (cmd_qtdv): Adjust.
10670 (max_jump_pad_size): New.
10671 (gdb_jump_pad_head): New.
10672 (get_jump_space_head): New.
10673 (claim_jump_space): New.
10674 (sort_tracepoints): New.
10675 (MAX_JUMP_SIZE): New.
10676 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10677 IPA.
10678 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10679 support. Upload fast traceframes, and delete internal IPA
10680 breakpoints.
10681 (stop_tracing_handler): New.
10682 (flush_trace_buffer_handler): New.
10683 (cmd_qtstop): Upload fast tracepoints.
10684 (response_tracepoint): Handle fast tracepoints.
10685 (tracepoint_finished_step): Upload fast traceframes. Set the
10686 tracepoint hit context's tracepoint type.
10687 (handle_tracepoint_bkpts): New.
10688 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10689 type. Add comment about fast tracepoints.
10690 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10691 non-existing action_str field.
10692 (get_context_regcache): Handle fast tracepoints.
10693 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10694 to the regcache.
10695 (fast_tracepoint_from_jump_pad_address): New.
10696 (fast_tracepoint_from_ipa_tpoint_address): New.
10697 (collecting_t): New.
10698 (force_unlock_trace_buffer): New.
10699 (fast_tracepoint_collecting): New.
10700 (collecting): New.
10701 (gdb_collect): New.
10702 (write_inferior_data_ptr): New.
10703 (target_tp_heap): New.
10704 (target_malloc): New.
10705 (download_agent_expr): New.
10706 (UALIGN): New.
10707 (download_tracepoints): New.
10708 (download_trace_state_variables): New.
10709 (upload_fast_traceframes): New.
10710 (IPA_FIRST_TRACEFRAME): New.
10711 (IPA_NEXT_TRACEFRAME_1): New.
10712 (IPA_NEXT_TRACEFRAME): New.
10713 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10714 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10715 (gdb_jump_pad_buffer_end): New.
10716 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10717 (initialize_tracepoint): Adjust.
10718 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10719 buffer. Initialize the low module.
10720 * utils.c (PREFIX, TOOLNAME): New.
10721 (malloc_failure): Use PREFIX.
10722 (error): In the IPA, an error causes an exit.
10723 (fatal, warning): Use PREFIX.
10724 (internal_error): Use TOOLNAME.
10725 (NUMCELLS): Increase to 10.
10726 * configure, config.in: Regenerate.
10727
d149dd1d
PA
107282010-06-01 Pedro Alves <pedro@codesourcery.com>
10729
10730 * server.c (handle_query) <qSupported>: Do two passes over the
10731 qSupported string to avoid nesting strtok.
10732
f6528abd
JK
107332010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10736 (CDEPS): New.
10737 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10738 -Wl,--dynamic-list.
10739 * configure: Regenerate.
10740 * proc-service.list: New.
10741
ca2a87a0
JK
107422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10743
10744 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10745 New comment.
10746
363a6e9f
OS
107472010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10748
10749 * gdbreplay.c (remote_open): Check error return from socket() call by
10750 its equality to -1 not by it being negative.
10751 * remote-utils.c (remote_open): Likewise.
10752
d23b6cb1
PA
107532010-05-23 Pedro Alves <pedro@codesourcery.com>
10754
10755 * config.h: Regenerate.
10756
28d3cf85
MK
107572010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10758
10759 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10760 doesn't provide PTRACE_GET_THREAD_AREA.
10761
fea36a59
MK
107622010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10763
10764 * linux-m68k-low.c: Include <asm/ptrace.h>
10765 (ps_get_thread_area): Implement.
10766
24b066ba
DE
107672010-05-03 Doug Evans <dje@google.com>
10768
10769 * event-loop.c (struct callback_event): New struct.
10770 (callback_list): New global.
10771 (append_callback_event, delete_callback_event): New functions.
10772 (process_callback): New function.
10773 (start_event_loop): Call it.
10774 * remote-utils.c (NOT_SCHEDULED): Define.
10775 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10776 moved out of readchar.
10777 (readchar): Rewrite. Call reschedule before returning.
10778 (reset_readchar): New function.
10779 (remote_close): Call it.
10780 (process_remaining, reschedule): New functions.
10781 * server.h (callback_handler_func): New typedef.
10782 (append_callback_event, delete_callback_event): Declare.
10783
9836d6ea
PA
107842010-05-03 Pedro Alves <pedro@codesourcery.com>
10785
10786 * proc-service.c (ps_pglobal_lookup): Use
10787 thread_db_look_up_one_symbol.
10788 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10789 parameter. Use it instead of all_symbols_looked_up.
10790 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10791 field.
10792 (all_symbols_looked_up): Don't declare.
10793 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10794 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10795 field.
10796 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10797 Set all_symbols_looked_up here.
10798 (thread_db_look_up_one_symbol): New.
10799 (thread_db_get_tls_address): Adjust.
10800 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10801 thread_db object on the heap, and tentatively set it in the
10802 process structure.
10803 (thread_db_init): Don't set all_symbols_looked_up here.
10804 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10805
7984d532
PA
108062010-05-03 Pedro Alves <pedro@codesourcery.com>
10807
10808 * linux-low.c (linux_kill, linux_detach): Adjust.
10809 (status_pending_p_callback): Remove redundant statement. Check
10810 for !TARGET_WAITIKIND_IGNORE, instead of
10811 TARGET_WAITKIND_STOPPED.
10812 (handle_tracepoints): Make sure LWP is locked. Adjust.
10813 (linux_wait_for_event_1): Adjust.
10814 (linux_cancel_breakpoints): New.
10815 (unsuspend_one_lwp): New.
10816 (unsuspend_all_lwps): New.
10817 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10818 (send_sigstop_callback): Change return type to int, add new
10819 `except' parameter and handle it.
10820 (suspend_and_send_sigstop_callback): New.
10821 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10822 pass them down. If SUSPEND, also increment the lwp's suspend
10823 count.
10824 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10825 (need_step_over_p): Don't consider suspended LWPs.
10826 (start_step_over): Adjust.
10827 (proceed_one_lwp): Change return type to int, add new `except'
10828 parameter and handle it.
10829 (unsuspend_and_proceed_one_lwp): New.
10830 (proceed_all_lwps): Use find_inferior instead of
10831 for_each_inferior.
10832 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10833 also decrement the suspend count of LWPs. Pass `except' down,
10834 instead of hacking its suspend count.
10835 (linux_pause_all): Add `freeze' parameter. Adjust.
10836 (linux_unpause_all): New.
10837 (linux_target_ops): Install linux_unpause_all.
10838 * server.c (handle_status): Adjust.
10839 * target.h (struct target_ops): New fields `unpause_all' and
10840 `cancel_breakpoints'. Add new parameter to `pause_all'.
10841 (pause_all): Add new `freeze' parameter.
10842 (unpause_all): New.
10843 (cancel_breakpoints): New.
10844 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10845 cancel breakpoints.
10846 (cmd_qtstart): Pause threads.
10847 (stop_tracing): Pause threads, and cancel breakpoints.
10848 * win32-low.c (win32_target_ops): Adjust.
10849
e471f25b
PA
108502010-05-03 Pedro Alves <pedro@codesourcery.com>
10851
10852 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10853 the inferior right away from here...
10854 (linux_wait_1): ... to here, and adjust to check the thread's
10855 last_resume_kind instead of the lwp's step or stop_expected flags.
10856
1915ef4f
PA
108572010-05-02 Pedro Alves <pedro@codesourcery.com>
10858
10859 * README: Use consistent `GDB' and `GDBserver' spellings.
10860
f9e39928
PA
108612010-05-02 Pedro Alves <pedro@codesourcery.com>
10862
10863 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10864 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10865 (linux_detach_one_lwp): Assume the lwp is stopped.
10866 (any_thread_of): Delete.
10867 (linux_detach): Stop all lwps here. Don't blindly delete all
10868 breakpoints.
10869 (delete_lwp_callback): New.
10870 (linux_mourn): Delete all lwps of the process that is gone.
10871 (linux_wait_1): Don't delete the last lwp of the process here.
10872 * mem-break.h (mark_breakpoints_out): Declare.
10873 * mem-break.c (mark_breakpoints_out): New.
10874 (free_all_breakpoints): Use it.
10875 * server.c (handle_target_event): If the process is gone, mark
10876 breakpoints out.
10877 * thread-db.c (struct thread_db) <create_bp>: New field.
10878 (thread_db_enable_reporting): Fix prototype. Store a thread event
10879 breakpoint reference in the thread_db struct.
10880 (thread_db_load_search): Clear the thread_db object.
10881 (try_thread_db_load_1): Ditto.
10882 (switch_to_process): New.
10883 (disable_thread_event_reporting): Use it.
10884 (remove_thread_event_breakpoints): New.
10885 (thread_db_detach, thread_db_mourn): Use it.
10886
1e7fc18c
PA
108872010-05-01 Pedro Alves <pedro@codesourcery.com>
10888
10889 * linux-low.c (linux_enable_event_reporting): New.
10890 (linux_wait_for_event_1, handle_extended_wait): Use it.
10891
02fc4de7
PA
108922010-04-30 Pedro Alves <pedro@codesourcery.com>
10893
10894 * linux-low.c (linux_kill_one_lwp, linux_kill)
10895 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10896 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10897 SIGSTOP even if the LWP is stopped.
10898 (send_sigstop_callback): New.
10899 (stop_all_lwps): Use send_sigstop_callback instead.
10900 (linux_resume_one_thread): Adjust.
10901 (proceed_one_lwp): Still proceed an LWP that the client has
10902 requested to stop, if we haven't reported it as stopped yet. Make
10903 sure that LWPs the client want stopped, have a pending SIGSTOP.
10904
bc3b5632
DE
109052010-04-26 Doug Evans <dje@google.com>
10906
ae1ada35
DE
10907 * server.c (handle_general_set): Make static.
10908
bc3b5632
DE
10909 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10910 Print received char after testing for error/eof instead of before.
10911 (input_interrupt): Tweak comment.
10912
65730243
DE
109132010-04-23 Doug Evans <dje@google.com>
10914
10915 * server.c (start_inferior): Print inferior argv if --debug.
10916
a8ae7dc0
AR
109172010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10918
10919 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10920 * nto-x86-low.c: Include server.h
10921
1c07cc19
PM
109222010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10923
10924 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10925 be consistent with other sources of this directory.
10926 (init_registers_amd64): Correct name of source file of this function
10927 in the comment.
10928
e0a61e09
PM
109292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10930
10931 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10932 64-bit executables.
10933
54709339
PM
109342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10935
10936 * win32-i386-low.c: Add 64-bit support.
10937 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10938 (init_registers_amd64): Declare.
10939 (mappings): Add 64-bit version of array.
10940 (init_windows_x86): New function.
10941 (the_low_target): Change init_arch field to init_windows_x86.
10942
e8f0053d
PM
109432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10944
10945 * win32-low.c: Adapt to support also 64-bit architecture.
10946 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10947 (get_image_name): Use SIZE_T type for local variable `done'.
10948 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10949 (toolhelp_get_dll_name): Idem.
10950 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10951 Use uintptr_t typecast to avoid warning.
10952 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10953 (handle_exception): Use phex_nz to avoid warning.
10954 (win32_wait): Remove unused local variable `process'.
10955
c481e77e
PM
109562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10957
10958 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10959 `amd64-avx.o'.
10960
12ea4b69
PM
109612010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10962
10963 * configure.ac: Use `ws2_32' library for srv_mingw.
10964 * configure: Regenerate.
10965 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10966 * remote-utils.c: Likewise.
10967
f6d1620c
L
109682010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10969
10970 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10971 if __x86_64__ is defined.
10972
8e642873
PM
109732010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10974
10975 * configure: Regenerate.
10976
711e434b
PM
109772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10978
10979 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10980 * target.h (target_ops): New get_tib_address field.
10981 * win32-low.h (win32_thread_info): Add thread_local_base field.
10982 * win32-low.c (child_add_thread): Add tlb argument.
10983 Set thread_local_base field to TLB.
10984 (get_child_debug_event): Adapt to child_add_thread change.
10985 (win32_get_tib_address): New function.
10986 (win32_target_ops): Set get_tib_address field to
10987 win32_get_tib_address.
10988 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10989
505106cd
PA
109902010-04-12 Pedro Alves <pedro@codesourcery.com>
10991
505106cd
PA
10992 * linux-low.c (linux_mourn): Also remove the process.
10993 * server.c (handle_target_event): Don't remove the process here.
10994 * nto-low.c (nto_mourn): New.
10995 (nto_target_ops): Install it.
10996 * spu-low.c (spu_mourn): New.
10997 (spu_target_ops): Install it.
10998 * win32-low.c (win32_mourn): New.
10999 (win32_target_ops): Install it.
11000
e8470a06
PA
110012010-04-12 Pedro Alves <pedro@codesourcery.com>
11002
11003 * server.h (buffer_xml_printf): Remove redundant `;'.
11004
45ba0d02
PA
110052010-04-12 Pedro Alves <pedro@codesourcery.com>
11006
11007 * regcache.c (set_register_cache): Invalidate regcaches before
11008 changing the register cache layout.
11009 (regcache_invalidate_one): Allow a NULL regcache.
11010 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11011 regcaches before changing the register cache layout or the target
11012 regsets.
11013
59e04013
L
110142010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11015
11016 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11017 variable warning on Linux/x86-64.
11018
8336d594
PA
110192010-04-11 Pedro Alves <pedro@codesourcery.com>
11020
11021 GDBserver disconnected tracing support.
11022
11023 * linux-low.c (linux_remove_process): Delete.
11024 (add_lwp): Don't set last_resume_kind here.
11025 (linux_kill): Use `mourn'.
11026 (linux_detach): Use `thread_db_detach', and `mourn'.
11027 (linux_mourn): New.
11028 (linux_attach_lwp_1): Adjust comment.
11029 (linux_attach): last_resume_kind moved the thread_info; adjust.
11030 (status_pending_p_callback): Adjust.
11031 (linux_wait_for_event_1): Adjust.
11032 (count_events_callback, select_singlestep_lwp_callback)
11033 (select_event_lwp_callback, cancel_breakpoints_callback)
11034 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11035 (proceed_one_lwp): Adjust.
11036 (linux_async): Add debug output.
11037 (linux_thread_stopped): New.
11038 (linux_pause_all): New.
11039 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11040 linux_pause_all.
11041 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11042 (thread_db_free): Delete declaration.
11043 (thread_db_detach, thread_db_mourn): Declare.
11044 * thread-db.c (thread_db_init): Use thread_db_mourn.
11045 (thread_db_free): Delete, split in two.
11046 (disable_thread_event_reporting): New.
11047 (thread_db_detach): New.
11048 (thread_db_mourn): New.
11049
11050 * server.h (struct thread_info) <last_resume_kind>: New field.
11051 <attached>: Add comment.
11052 <gdb_detached>: New field.
11053 (handler_func): Change return type to int.
11054 (handle_serial_event, handle_target_event): Ditto.
11055 (gdb_connected): Declare.
11056 (tracing): Delete.
11057 (disconnected_tracing): Declare.
11058 (stop_tracing): Declare.
11059
11060 * server.c (handle_query) <qSupported>: Report support for
11061 disconnected tracing.
11062 (queue_stop_reply_callback): Account for running threads.
11063 (gdb_wants_thread_stopped): New.
11064 (gdb_wants_all_threads_stopped): New.
11065 (gdb_reattached_process): New.
11066 (handle_status): Clear the `gdb_detached' flag of all processes.
11067 In all-stop, stop all threads.
11068 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11069 (process_serial_event): If the remote connection breaks, or if an
11070 exit was forced with "monitor exit", force an event loop exit.
11071 Handle disconnected tracing on detach.
11072 (handle_serial_event): Adjust.
11073 (handle_target_event): If GDB isn't connected, forward events back
11074 to the inferior, unless the last process exited, in which case,
11075 exit gdbserver. Adjust interface.
11076
11077 * remote-utils.c (remote_open): Don't block in accept. Instead
11078 register an event loop source on the listen socket file
11079 descriptor. Refactor bits into ...
11080 (listen_desc): ... this new global.
11081 (gdb_connected): ... this new function.
11082 (enable_async_notification): ... this new function.
11083 (handle_accept_event): ... this new function.
11084 (remote_close): Clear remote_desc.
11085
11086 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11087
11088 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11089 New fields.
11090 (mourn_inferior): Define.
11091 (target_process_qsupported): Avoid the dangling else problem.
11092 (thread_stopped): Define.
11093 (pause_all): Define.
11094 (target_waitstatus_to_string): Declare.
11095 * target.c (target_waitstatus_to_string): New.
11096
11097 * tracepoint.c (tracing): Make extern.
11098 (disconnected_tracing): New.
11099 (stop_tracing): Make extern. Handle tracing stops due to GDB
11100 disconnecting.
11101 (cmd_qtdisconnected): New.
11102 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11103 (handle_tracepoint_general_set): Handle QTDisconnected.
11104
11105 * event-loop.c (event_handler_func): Change return type to int.
11106 (process_event): Bail out if the event handler wants the event
11107 loop to stop.
11108 (handle_file_event): Ditto.
11109 (start_event_loop): Bail out if the event handler wants the event
11110 loop to stop.
11111
11112 * nto-low.c (nto_target_ops): Adjust.
11113 * spu-low.c (spu_wait): Don't remove the process here.
11114 (spu_target_ops): Adjust.
11115 * win32-low.c (win32_wait): Don't remove the process here.
11116 (win32_target_ops): Adjust.
11117
5d267c4c
PA
111182010-04-11 Pedro Alves <pedro@codesourcery.com>
11119
11120 * regcache.c (realloc_register_cache): Invalidate inferior's
11121 regcache before recreating it.
11122
623ccd72
PA
111232010-04-09 Pedro Alves <pedro@codesourcery.com>
11124
11125 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11126
219f2f23
PA
111272010-04-09 Stan Shebs <stan@codesourcery.com>
11128 Pedro Alves <pedro@codesourcery.com>
11129
11130 * server.h (LONGEST): New.
11131 (struct thread_info) <while_stepping>: New field.
11132 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11133 Declare.
11134 (initialize_tracepoint, handle_tracepoint_general_set)
11135 (handle_tracepoint_query, tracepoint_finished_step)
11136 (tracepoint_was_hit, release_while_stepping_state_list):
11137 (current_traceframe): Declare.
11138 * server.c (handle_general_set): Handle tracepoint packets.
11139 (read_memory): New.
11140 (write_memory): New.
11141 (handle_search_memory_1): Use read_memory.
11142 (handle_query): Report support for conditional tracepoints, trace
11143 state variables, and tracepoint sources. Handle tracepoint
11144 queries.
11145 (main): Initialize the tracepoints module.
11146 (process_serial_event): Handle traceframe reads/writes.
11147
11148 * linux-low.c (handle_tracepoints): New.
11149 (linux_wait_1): Call it.
11150 (linux_resume_one_lwp): Handle while-stepping.
11151 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11152 (linux_target_ops): Install them.
11153 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11154 New field.
11155 * linux-x86-low.c (x86_supports_tracepoints): New.
11156 (the_low_target). Install it.
11157
11158 * mem-break.h (delete_breakpoint): Declare.
11159 * mem-break.c (delete_breakpoint): Make external.
11160
11161 * target.h (struct target_ops): Add `supports_tracepoints',
11162 `read_pc', and `write_pc' fields.
11163 (target_supports_tracepoints): Define.
11164 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11165 (phex_nz): New.
11166
11167 * regcache.h (struct regcache) <registers_owned>: New field.
11168 (init_register_cache, regcache_cpy): Declare.
11169 (regcache_read_pc, regcache_write_pc): Declare.
11170 (register_cache_size): Declare.
11171 (supply_regblock): Declare.
11172 * regcache.c (init_register_cache): New.
11173 (new_register_cache): Use it.
11174 (regcache_cpy): New.
11175 (register_cache_size): New.
11176 (supply_regblock): New.
11177 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11178
219f2f23
PA
11179 * tracepoint.c: New.
11180
11181 * Makefile.in (OBS): Add tracepoint.o.
11182 (tracepoint.o): New rule.
11183
3a13a53b
L
111842010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11185
11186 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11187 (i386-mmx.o): New.
11188 (i386-mmx.c): Likewise.
11189 (i386-mmx-linux.o): Likewise.
11190 (i386-mmx-linux.c): Likewise.
11191
11192 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11193 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11194 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11195 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11196
11197 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11198 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11199 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11200
1570b33e
L
112012010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11202
11203 * Makefile.in (clean): Updated.
11204 (i386-avx.o): New.
11205 (i386-avx.c): Likewise.
11206 (i386-avx-linux.o): Likewise.
11207 (i386-avx-linux.c): Likewise.
11208 (amd64-avx.o): Likewise.
11209 (amd64-avx.c): Likewise.
11210 (amd64-avx-linux.o): Likewise.
11211 (amd64-avx-linux.c): Likewise.
11212
11213 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11214 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11215 (srv_amd64_regobj): Add amd64-avx.o.
11216 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11217 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11218 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11219 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11220 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11221 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11222 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11223
11224 * i387-fp.c: Include "i386-xstate.h".
11225 (i387_xsave): New.
11226 (i387_cache_to_xsave): Likewise.
11227 (i387_xsave_to_cache): Likewise.
11228 (x86_xcr0): Likewise.
11229
11230 * i387-fp.h (i387_cache_to_xsave): Likewise.
11231 (i387_xsave_to_cache): Likewise.
11232 (x86_xcr0): Likewise.
11233
11234 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11235 * linux-crisv32-low.c (target_regsets): Likewise.
11236 * linux-m68k-low.c (target_regsets): Likewise.
11237 * linux-mips-low.c (target_regsets): Likewise.
11238 * linux-ppc-low.c (target_regsets): Likewise.
11239 * linux-s390-low.c (target_regsets): Likewise.
11240 * linux-sh-low.c (target_regsets): Likewise.
11241 * linux-sparc-low.c (target_regsets): Likewise.
11242 * linux-xtensa-low.c (target_regsets): Likewise.
11243
11244 * linux-low.c: Include <sys/uio.h>.
11245 (regsets_fetch_inferior_registers): Support nt_type.
11246 (regsets_store_inferior_registers): Likewise.
11247 (linux_process_qsupported): New.
11248 (linux_target_ops): Add linux_process_qsupported.
11249
11250 * linux-low.h (regset_info): Add nt_type.
11251 (linux_target_ops): Add process_qsupported.
11252
11253 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11254 and <sys/uio.h>.
11255 (init_registers_i386_avx_linux): New.
11256 (init_registers_amd64_avx_linux): Likewise.
11257 (xmltarget_i386_linux_no_xml): Likewise.
11258 (xmltarget_amd64_linux_no_xml): Likewise.
11259 (PTRACE_GETREGSET): Likewise.
11260 (PTRACE_SETREGSET): Likewise.
11261 (x86_fill_xstateregset): Likewise.
11262 (x86_store_xstateregset): Likewise.
11263 (use_xml): Likewise.
11264 (x86_linux_update_xmltarget): Likewise.
11265 (x86_linux_process_qsupported): Likewise.
11266 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11267 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11268 init_registers_i386_linux here. Call
11269 x86_linux_update_xmltarget.
11270 (the_low_target): Add x86_linux_process_qsupported.
11271
11272 * server.c (handle_query): Call target_process_qsupported.
11273
11274 * target.h (target_ops): Add process_qsupported.
11275 (target_process_qsupported): New.
11276
fc7238bb
PA
112772010-04-03 Pedro Alves <pedro@codesourcery.com>
11278
11279 * inferiors.c (add_thread): Set last_status kind to
11280 TARGET_WAITKIND_IGNORE.
11281 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11282 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11283 (linux_wait_1): Move `thread' local definition to block that uses
11284 it. Don't NULL initialize `event_child'.
11285 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11286 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11287 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11288
bdabb078
PA
112892010-04-01 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11292 an extended waitstatus, or by a watchpoint.
11293 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11294 thread was stepping or has been stopped by a watchpoint.
11295
d3bbe7a0
PA
112962010-04-01 Pedro Alves <pedro@codesourcery.com>
11297
11298 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11299 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11300 of another, then delete the previous, and validate all
11301 breakpoints.
11302 (validate_inserted_breakpoint): New.
11303 (delete_disabled_breakpoints): New.
11304 (validate_breakpoints): New.
11305 (check_mem_read): Validate breakpoints before trusting their
11306 shadow. Delete disabled breakpoints.
11307 (check_mem_write): Validate breakpoints before trusting they
11308 should be inserted. Delete disabled breakpoints.
11309 * mem-break.h (validate_breakpoints):
11310 * server.c (handle_query): Validate breakpoints when we see a
11311 qSymbol query.
11312
8b07ae33
PA
113132010-04-01 Pedro Alves <pedro@codesourcery.com>
11314
11315 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11316 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11317 if we could tell there's a GDB breakpoint at stop_pc.
11318 (need_step_over_p): Don't do a step over if we find a GDB
11319 breakpoint at the resume PC.
11320
11321 * mem-break.c (struct raw_breakpoint): New.
11322 (enum bkpt_type): New type `gdb_breakpoint'.
11323 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11324 fields. New field `raw'.
11325 (find_raw_breakpoint_at): New.
11326 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11327 breakpoint instead.
11328 (set_breakpoint_at): Adjust.
11329 (delete_raw_breakpoint): New.
11330 (release_breakpoint): New.
11331 (delete_breakpoint): Rename to...
11332 (delete_breakpoint_1): ... this. Add proc parameter. Use
11333 release_breakpoint. Return ENOENT.
11334 (delete_breakpoint): Reimplement.
11335 (find_breakpoint_at): Delete.
11336 (find_gdb_breakpoint_at): New.
11337 (delete_breakpoint_at): Delete.
11338 (set_gdb_breakpoint_at): New.
11339 (delete_gdb_breakpoint_at): New.
11340 (gdb_breakpoint_here): New.
11341 (set_reinsert_breakpoint): Use release_breakpoint.
11342 (uninsert_breakpoint): Rename to ...
11343 (uninsert_raw_breakpoint): ... this.
11344 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11345 (reinsert_raw_breakpoint): Change parameter type to
11346 raw_breakpoint.
11347 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11348 instead.
11349 (check_breakpoints): Adjust. Use release_breakpoint.
11350 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11351 (breakpoint_inserted_here): Ditto.
11352 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11353 Don't trust the breakpoint's shadow if it is not inserted.
11354 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11355 (delete_all_breakpoints): Adjust.
11356 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11357 use delete_breakpoint_1.
11358
11359 * mem-break.h (breakpoints_supported): Delete declaration.
11360 (set_gdb_breakpoint_at): Declare.
11361 (gdb_breakpoint_here): Declare.
11362 (delete_breakpoint_at): Delete.
11363 (delete_gdb_breakpoint_at): Declare.
11364
11365 * server.h (struct raw_breakpoint): Forward declare.
11366 (struct process_info): New field `raw_breakpoints'.
11367
11368 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11369 breakpoints.
11370
6bf5e0ba
PA
113712010-03-24 Pedro Alves <pedro@codesourcery.com>
11372
11373 * linux-low.c (status_pending_p_callback): Fix comment.
11374 (linux_wait_for_event_1): Move most of the internal breakpoint
11375 handling from here...
11376 (linux_wait_1): ... to here.
11377 (count_events_callback): New.
11378 (select_singlestep_lwp_callback): New.
11379 (select_event_lwp_callback): New.
11380 (cancel_breakpoints_callback): New.
11381 (select_event_lwp): New.
11382 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11383 priority to all LWPs that have had events that should be reported
11384 to the client. Cancel breakpoints when about to reporting the
11385 event to the client, not while stopping lwps. No longer cancel
11386 finished single-steps here.
11387 (cancel_finished_single_step): Delete.
11388 (cancel_finished_single_steps): Delete.
11389
414a389f
PA
113902010-03-24 Pedro Alves <pedro@codesourcery.com>
11391
11392 * mem-break.c (enum bkpt_type): New.
11393 (struct breakpoint): New field `type'.
11394 (set_breakpoint_at): Change return type to struct breakpoint
11395 pointer. Set type to `other_breakpoint' by default.
11396 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11397 in the breakpoint list.
11398 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11399 (reinsert_breakpoint): Rename to ...
11400 (reinsert_raw_breakpoint): ... this.
11401 (reinsert_breakpoints_at): Adjust.
11402 * mem-break.h (struct breakpoint): Declare.
11403 (set_breakpoint_at): Change return type to struct breakpoint
11404 pointer.
11405
2280c721
PA
114062010-03-24 Pedro Alves <pedro@codesourcery.com>
11407
11408 * server.c (handle_query): Assign, not compare.
11409
d50171e4
PA
114102010-03-24 Pedro Alves <pedro@codesourcery.com>
11411
11412 Teach linux gdbserver to step-over-breakpoints.
11413
11414 * linux-low.c (can_hardware_single_step): New.
11415 (supports_breakpoints): New.
11416 (handle_extended_wait): If stopping threads, read the stop pc of
11417 the new cloned LWP.
11418 (get_pc): New.
11419 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11420 low target doesn't support retrieving the PC.
11421 (add_lwp): Set last_resume_kind to resume_continue.
11422 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11423 (linux_attach): Don't clear stop_expected. Set the lwp's
11424 last_resume_kind to resume_stop.
11425 (linux_detach_one_lwp): Don't check for removed breakpoints.
11426 (check_removed_breakpoint): Delete.
11427 (status_pending_p): Rename to ...
11428 (status_pending_p_callback): ... this. Don't check for removed
11429 breakpoints. Don't consider threads that are stopped from GDB's
11430 perspective.
11431 (linux_wait_for_lwp): Always read the stop_pc here.
11432 (cancel_breakpoint): New.
11433 (step_over_bkpt): New global.
11434 (linux_wait_for_event_1): Implement stepping over breakpoints.
11435 (gdb_wants_lwp_stopped): New.
11436 (gdb_wants_all_stopped): New.
11437 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11438 single-step traps here. Store the thread's last reported target
11439 wait status.
11440 (send_sigstop): Don't clear stop_expected. Always set it,
11441 instead.
11442 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11443 (cancel_finished_single_step): New.
11444 (cancel_finished_single_steps): New.
11445 (wait_for_sigstop): Don't cancel finished single-step traps here.
11446 (linux_resume_one_lwp): Don't check for removed breakpoints.
11447 Don't set `step' on non-hardware step archs.
11448 (linux_set_resume_request): Ignore resume_stop requests if already
11449 stopping or stopped. Set the lwp's last_resume_kind.
11450 (resume_status_pending_p): Don't check for removed breakpoints.
11451 (need_step_over_p): New.
11452 (start_step_over): New.
11453 (finish_step_over): New.
11454 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11455 requests. Clear the thread's last reported target waitstatus.
11456 Don't use the `suspended' flag. Don't consider pending breakpoints.
11457 (linux_resume): Start a step-over if necessary.
11458 (proceed_one_lwp): New.
11459 (proceed_all_lwps): New.
11460 (unstop_all_lwps): New.
11461 * linux-low.h (struct lwp_info): Rewrite comment for the
11462 `suspended' flag. Add the `stop_pc' field. Delete the
11463 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11464 Add `'last_resume_kind' and `need_step_over' fields.
11465 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11466 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11467 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11468 (set_raw_breakpoint_at): New.
11469 (set_breakpoint_at): Rewrite to use it.
11470 (reinsert_breakpoint_handler): Delete.
11471 (set_reinsert_breakpoint): New.
11472 (reinsert_breakpoint_by_bp): Delete.
11473 (delete_reinsert_breakpoints): New.
11474 (uninsert_breakpoint): Rewrite.
11475 (uninsert_breakpoints_at): New.
11476 (reinsert_breakpoint): Rewrite.
11477 (reinsert_breakpoints_at): New.
11478 (check_breakpoints): Rewrite.
11479 (breakpoint_here): New.
11480 (breakpoint_inserted_here): New.
11481 (check_mem_read): Adjust.
11482 * mem-break.h (breakpoints_supported, breakpoint_here)
11483 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11484 (reinsert_breakpoint_by_bp): Delete declaration.
11485 (delete_reinsert_breakpoints): Declare.
11486 (reinsert_breakpoint): Delete declaration.
11487 (reinsert_breakpoints_at): Declare.
11488 (uninsert_breakpoint): Delete declaration.
11489 (uninsert_breakpoints_at): Declare.
11490 (check_breakpoints): Adjust prototype.
11491 * server.h: Adjust include order.
11492 (struct thread_info): Declare here. Add a `last_status' field.
11493
30ba68cb
MS
114942010-03-23 Michael Snyder <msnyder@vmware.com>
11495
11496 * server.c (crc32): New function.
11497 (handle_query): Add handling for 'qCRC:' request.
11498
b9a881c2
PA
114992010-03-23 Pedro Alves <pedro@codesourcery.com>
11500
11501 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11502 lwp had been stopped by a watchpoint.
11503
e92d13d5
PA
115042010-03-16 Pedro Alves <pedro@codesourcery.com>
11505
11506 * server.h (internal_error): Declare.
11507 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11508 * utils.c (internal_error): New function.
11509
64daa791
AS
115102010-03-15 Andreas Schwab <schwab@redhat.com>
11511
11512 * configure.srv: Fix typo setting srv_regobj.
11513
f52cd8cd
PA
115142010-03-15 Pedro Alves <pedro@codesourcery.com>
11515
11516 * linux-low.c (fetch_register): Avoid passing a non string literal
11517 format to `error'.
11518 (usr_store_inferior_registers): Ditto.
11519
93ae6fdc
PA
115202010-03-14 Pedro Alves <pedro@codesourcery.com>
11521
11522 * linux-low.c (linux_write_memory): Bail out early if peeking
11523 memory failed.
11524
c3adc08c
PA
115252010-03-14 Pedro Alves <pedro@codesourcery.com>
11526
11527 * linux-low.h (struct lwp_info): New fields
11528 `stopped_by_watchpoint' and `stopped_data_address'.
11529 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11530 here, and cache them in the lwp object.
11531 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11532 directly.
11533 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11534 field.
11535 (linux_stopped_by_watchpoint): Rewrite.
11536 (linux_stopped_data_address): Rewrite.
11537
bce522a2
PA
115382010-03-06 Simo Melenius <simo.melenius@iki.fi>
11539
11540 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11541 switching the current inferior, not before.
11542
90884b2b
L
115432010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11544
11545 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11546 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11547 i386-linux.c and amd64-linux.c.
11548 (reg-i386.o): Removed.
11549 (reg-i386.c): Likewise.
11550 (reg-i386-linux.o): Likewise.
11551 (reg-i386-linux.c): Likewise.
11552 (reg-x86-64.o): Likewise.
11553 (reg-x86-64.c): Likewise.
11554 (reg-x86-64-linux.o): Likewise.
11555 (reg-x86-64-linux.c): Likewise.
11556 (i386.o): New.
11557 (i386.c): Likewise.
11558 (i386-linux.o): Likewise.
11559 (i386-linux.c): Likewise.
11560 (amd64.o): Likewise.
11561 (amd64.c): Likewise.
11562 (amd64-linux.o): Likewise.
11563 (amd64-linux.c): Likewise.
11564
11565 * configure.srv (srv_i386_regobj): New.
11566 (srv_i386_linux_regobj): Likewise.
11567 (srv_amd64_regobj): Likewise.
11568 (srv_amd64_linux_regobj): Likewise.
11569 (srv_i386_32bit_xmlfiles): Likewise.
11570 (srv_i386_64bit_xmlfiles): Likewise.
11571 (srv_i386_xmlfiles): Likewise.
11572 (srv_amd64_xmlfiles): Likewise.
11573 (srv_i386_linux_xmlfiles): Likewise.
11574 (srv_amd64_linux_xmlfiles): Likewise.
11575 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11576 srv_xmlfiles to $srv_i386_xmlfiles.
11577 (i[34567]86-*-mingw32ce*): Likewise.
11578 (i[34567]86-*-mingw*): Likewise.
11579 (i[34567]86-*-nto*): Likewise.
11580 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11581 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11582 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11583 (x86_64-*-linux*): Likewise.
11584
11585 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11586 (init_registers_amd64_linux): New.
11587 (x86_arch_setup): Replace init_registers_x86_64_linux with
11588 init_registers_amd64_linux.
11589
193f13e6
MK
115902010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11591
11592 * configure.ac: Check for libdl. If it is not available link against
11593 static libthread_db.
11594 * configure: Regenerate.
11595
85d721b8
PA
115962010-02-22 Pedro Alves <pedro@codesourcery.com>
11597
11598 PR9605
11599
11600 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11601 handing a read watchpoint.
11602 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11603
6076632b
DE
116042010-02-12 Doug Evans <dje@google.com>
11605
11606 * linux-low.c (linux_supports_tracefork_flag): Document.
11607 (linux_look_up_symbols): Add comment.
11608
3327ccf7
L
116092010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11610
11611 * regcache.c (supply_register): Clear regcache if buf is NULL.
11612
0718675c 116132010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11614 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11615
11616 * inferiors.c (find_inferior): Add function documentation.
11617 (unloaded_dll): Handle the case where the unloaded dll has not
11618 been previously registered in the dll list.
11619
177321bd
DJ
116202010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11623 (thumb2_breakpoint): New.
11624 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11625
2b009048
DJ
116262010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11629 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11630 breakpoints.
11631
3be029c7
PA
116322010-01-21 Pedro Alves <pedro@codesourcery.com>
11633
11634 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11635
18f5de3b
JK
116362010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11637
11638 * linux-s390-low.c (s390_collect_ptrace_register)
11639 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11640
3743bb4f
DE
116412010-01-21 Doug Evans <dje@google.com>
11642
14ce3065
DE
11643 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11644 (PTRACE_ARG4_TYPE): New macro.
11645 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11646 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11647 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11648 (usr_store_inferior_registers): Ditto.
11649 (linux_read_memory, linux_write_memory): Ditto.
11650 (linux_test_for_tracefork): Ditto.
11651
3743bb4f
DE
11652 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11653 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11654
8b315be5
PA
116552010-01-21 Pedro Alves <pedro@codesourcery.com>
11656
11657 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11658 target.
11659
85492558
PA
116602010-01-21 Pedro Alves <pedro@codesourcery.com>
11661
11662 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11663 prototype to take a regcache. Adjust.
11664
442ea881
PA
116652010-01-20 Pedro Alves <pedro@codesourcery.com>
11666
11667 * regcache.h (struct thread_info): Forward declare.
11668 (struct regcache): New.
11669 (new_register_cache): Adjust prototype.
11670 (get_thread_regcache): Declare.
11671 (free_register_cache): Adjust prototype.
11672 (registers_to_string, registers_from_string): Ditto.
11673 (supply_register, supply_register_by_name, collect_register)
11674 (collect_register_as_string, collect_register_by_name): Ditto.
11675 * regcache.c (struct inferior_regcache_data): Delete.
11676 (get_regcache): Rename to ...
11677 (get_thread_regcache): ... this. Adjust. Switch inferior before
11678 fetching registers.
11679 (regcache_invalidate_one): Adjust.
11680 (regcache_invalidate): Fix prototype.
11681 (new_register_cache): Return the new register cache.
11682 (free_register_cache): Change prototype.
11683 (realloc_register_cache): Adjust.
11684 (registers_to_string): Change prototype to take a regcache. Adjust.
11685 (registers_from_string): Ditto.
11686 (register_data): Ditto.
11687 (supply_register): Ditto.
11688 (supply_register_by_name): Ditto.
11689 (collect_register): Ditto.
11690 (collect_register_as_string): Ditto.
11691 (collect_register_by_name): Ditto.
11692 * server.c (process_serial_event): Adjust.
11693 * linux-low.h (regset_fill_func, regset_store_func): Change
11694 prototype.
11695 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11696 Change prototype.
11697 * linux-low.c (get_stop_pc): Adjust.
11698 (check_removed_breakpoint): Adjust.
11699 (linux_wait_for_event): Adjust.
11700 (linux_resume_one_lwp): Adjust.
11701 (fetch_register): Add regcache parameter. Adjust.
11702 (usr_store_inferior_registers): Ditto.
11703 (regsets_fetch_inferior_registers): Ditto.
11704 (regsets_store_inferior_registers): Ditto.
11705 (linux_fetch_registers, linux_store_registers): Ditto.
11706 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11707 regcache. Adjust.
43aaf8b6
PA
11708 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11709 Ditto.
442ea881
PA
11710 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11711 prototype to take a regcache.
11712 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11713 * remote-utils.c (convert_ascii_to_int, outreg)
11714 (prepare_resume_reply): Change prototype to take a regcache.
11715 Adjust.
11716 * target.h (struct target_ops) <fetch_registers, store_registers>:
11717 Change prototype to take a regcache.
11718 (fetch_inferior_registers, store_inferior_registers): Change
11719 prototype to take a regcache. Adjust.
11720 * proc-service.c (ps_lgetregs): Adjust.
11721 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11722 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11723 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11724 take a regcache. Adjust.
11725 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11726 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11727 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11728 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11729 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11730 (cris_cannot_fetch_register):
11731 (cris_breakpoint_at): Change prototype to take a regcache.
11732 Adjust.
11733 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11734 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11735 to take a regcache. Adjust.
11736 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11737 Adjust.
11738 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11739 take a regcache. Adjust.
11740 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11741 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11742 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11743 * linux-mips-low.c (mips_get_pc):
11744 (mips_set_pc): Change prototype to take a regcache. Adjust.
11745 (mips_reinsert_addr): Adjust.
11746 (mips_collect_register): Change prototype to take a regcache.
11747 Adjust.
11748 (mips_supply_register):
11749 (mips_collect_register_32bit, mips_supply_register_32bit)
11750 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11751 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11752 * linux-ppc-low.c (ppc_supply_ptrace_register)
11753 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11754 (parse_spufs_run): Adjust.
11755 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11756 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11757 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11758 take a regcache. Adjust.
11759 * linux-s390-low.c (s390_collect_ptrace_register)
11760 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11761 (s390_set_pc): Change prototype to take a regcache. Adjust.
11762 (s390_arch_setup): Adjust.
11763 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11764 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11765 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11766 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11767 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11768 regcache. Adjust.
11769 (sparc_breakpoint_at): Adjust.
11770 * linux-xtensa-low.c (xtensa_fill_gregset):
11771 (xtensa_store_gregset):
11772 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11773 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11774 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11775 prototype to take a regcache. Adjust.
11776 * win32-arm-low.c (arm_fetch_inferior_register)
11777 (arm_store_inferior_register): Change prototype to take a
11778 regcache. Adjust.
11779 * win32-i386-low.c (i386_fetch_inferior_register)
11780 (i386_store_inferior_register): Change prototype to take a
11781 regcache. Adjust.
11782 * win32-low.c (child_fetch_inferior_registers)
11783 (child_store_inferior_registers): Change prototype to take a
11784 regcache. Adjust.
11785 (win32_wait): Adjust.
11786 (win32_fetch_inferior_registers): Change prototype to take a
11787 regcache. Adjust.
11788 (win32_store_inferior_registers): Adjust.
11789 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11790 store_inferior_register>: Change prototype to take a regcache.
11791
60c3d7b0
DE
117922010-01-20 Doug Evans <dje@google.com>
11793
11794 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11795 #ifdef.
11796 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11797 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11798
dc146f7c
VP
117992010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11800
11801 * linux-low.c (linux_core_of_thread): New.
11802 (compare_ints, show_process, list_threads): New.
11803 (linux_qxfer_osdata): Report threads and cores.
11804 (linux_target_op): Register linux_core_of_thread.
11805 * remote-utils.c (prepare_resume_reply): Report the core.
11806 (buffer_xml_printf): Support %d specifier.
11807 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11808 New.
11809 (handle_query): Handle qXfer:threads. Announce availability
11810 thereof.
11811 * target.h (struct target_ops): New field core_of_thread.
11812
7803799a
UW
118132010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11814
11815 * Makefile.in (clean): Remove new generated files.
11816 (reg-s390.o, reg-s390.c): Remove rules.
11817 (reg-s390x.o, reg-s390x.c): Likewise.
11818 (s390-linux32.o, s390-linux32.c): Add rules.
11819 (s390-linux64.o, s390-linux64.c): Likewise.
11820 (s390x-linux64.o, s390x-linux64.c): Likewise.
11821 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11822 * linux-s390-low.c: Include <elf.h>.
11823 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11824 (init_registers_s390): Remove prototype.
11825 (init_registers_s390x): Likewise.
11826 (init_registers_s390_linux32): Add prototype.
11827 (init_registers_s390_linux64): Likewise.
11828 (init_registers_s390x_linux64): Likewise.
11829 (s390_num_regs_3264): New define.
11830 (s390_regmap_3264): New global variable.
11831 (s390_cannot_fetch_register): Remove obsolete check.
11832 (s390_cannot_store_register): Likewise.
11833 (s390_collect_ptrace_register): Handle upper/lower register halves.
11834 (s390_supply_ptrace_register): Likewise.
11835 (s390_fill_gregset): Update to register number changes.
11836 (s390_get_hwcap): New routine.
11837 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11838 Install appropriate regmap and register set.
11839
6e7ffa39
JB
118402010-01-01 Joel Brobecker <brobecker@adacore.com>
11841
11842 * server.c (gdbserver_version): Update copyright year to 2010.
11843 * gdbreplay.c (gdbreplay_version): Likewise.
11844
957f3f49
DE
118452009-12-28 Doug Evans <dje@google.com>
11846
11847 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11848 elf/external.h. Include <elf.h> instead but only if necessary.
11849
ca5c370d
PA
118502009-12-28 Pedro Alves <pedro@codesourcery.com>
11851
11852 * linux-low.c (linux_remove_process): Remove `detaching'
11853 parameter. Don't release/detach from thread_db here.
11854 (linux_kill): Release/detach from thread_db here, ...
11855 (linux_detach): ... and here, before actually detaching.
11856 (linux_wait_1): ... and here, when a process exits.
11857 * thread-db.c (any_thread_of): New.
11858 (thread_db_free): Switch the current inferior to a thread of the
11859 passed in process.
11860
4ee62156
DE
118612009-12-21 Doug Evans <dje@google.com>
11862
d90e6a88
DE
11863 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11864
c5f62d5f
DE
11865 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11866 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11867 warning ifndef __NR_tkill. Move setting of errno there too.
11868 Delete unnecessary resetting of errno after syscall.
11869 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11870
10e86dd7
DE
11871 * configure.ac: Check for dladdr.
11872 * config.in: Regenerate.
11873 * configure: Regenerate.
11874 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11875 (try_thread_db_load): Update.
11876
4ee62156
DE
11877 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11878
00f515da
DE
118792009-12-18 Doug Evans <dje@google.com>
11880
e9464885
DE
11881 * event-loop.c: Include unistd.h if it exists.
11882
07d4f67e
DE
11883 * linux-low.c (my_waitpid): Move definition away from being in
11884 between linux_tracefork_child/linux_test_for_tracefork.
11885
00f515da
DE
11886 * gdb_proc_service.h (psaddr_t): Fix type.
11887 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11888 signature to match glibc.
11889
1de1badb
DE
118902009-12-16 Doug Evans <dje@google.com>
11891
11892 * linux-low.c (linux_read_memory): Fix argument to read.
11893
aeeb81d1
PA
118942009-11-26 Pedro Alves <pedro@codesourcery.com>
11895
11896 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11897 events, don't leave current_inferior pointing at null.
11898
10357975
PA
118992009-11-26 Pedro Alves <pedro@codesourcery.com>
11900
11901 * win32-low.c (LOG): Delete.
11902 (OUTMSG): Output to stderr.
11903 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11904 on compile time LOG macro.
11905 (win32_wait): Fix debug output.
11906
cf6e3471
PA
119072009-11-26 Pedro Alves <pedro@codesourcery.com>
11908
11909 * win32-low.c (win32_add_one_solib): If the dll name is
11910 "ntdll.dll", prepend the system directory to the dll path.
11911
0c85e18e
MK
119122009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11913
11914 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11915
9ac544ce 119162009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11917 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11918
11919 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11920 * configure.ac: Check for __mcoldfire__ and set
11921 gdb_cv_m68k_is_coldfire.
11922 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11923 reg-cf.o and reg-m68k.o.
11924 * configure: Regenerated.
11925
fd7dd3e6
PA
119262009-11-16 Pedro Alves <pedro@codesourcery.com>
11927
11928 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11929 Pass it to thread_db_free.
11930 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11931 proper `detaching' argument to linux_remove_process.
11932 * linux-low.h (thread_db_free): Add `detaching' parameter.
11933 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11934 to thread_db_free.
11935 (thread_db_free): Add `detaching' parameter. Only
11936 call td_ta_clear_event if detaching from process.
11937
75aa492e
MK
119382009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11939
11940 * thread-db.c (thread_db_free): Fix typo.
11941
21e1bee4
PP
119422009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11943
11944 PR gdb/10838
11945 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11946
8838b45e
NS
119472009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11948
11949 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11950 with an i686 compiler.
11951 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11952 needed.
11953 * configure: Rebuilt.
11954
8a35fb51
SL
119552009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11956
11957 PR gdb/10783
11958
11959 * server.c (handle_search_memory_1): Correct read_addr initialization
11960 in loop for searching subsequent chunks.
11961
96f15937
PP
119622009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11963
11964 * configure.ac: New --with-libthread-db option.
11965 * thread-db.c: Allow direct dependence on libthread_db.
11966 (thread_db_free): Adjust.
11967 * config.in: Regenerate.
11968 * configure: Likewise.
889bf7c5 11969
5f7d1694
PP
119702009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11971
11972 PR gdb/10757
11973 * thread-db.c (attach_thread): New function.
11974 (maybe_attach_thread): Return success/failure.
11975 (find_new_threads_callback): Adjust.
889bf7c5
PA
11976 (thread_db_find_new_threads): Loop until no new threads.
11977
88e3b899
PA
119782009-10-13 Pedro Alves <pedro@codesourcery.com>
11979
11980 * proc-service.c (ps_lgetregs): Formatting.
11981
cdbfd419
PP
119822009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11983
11984 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11985 * configure.ac: Adjust.
11986 * linux-low.h (struct process_info_private): Move members to struct
11987 thread_db.
11988 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11989 * linux-low.c (linux_remove_process): Adjust.
11990 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11991 * server.c (handle_query): Move code ...
11992 (handle_monitor_command): ... here. New function.
11993 * target.h (struct target_ops): New member.
11994 * thread-db.c (struct thread_db): New.
11995 (libthread_db_search_path): New variable.
11996 (thread_db_create_event, thread_db_enable_reporting)
11997 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11998 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11999 (try_thread_db_load_1, dladdr_to_soname): New functions.
12000 (try_thread_db_load, thread_db_load_search): New functions.
12001 (thread_db_init): Search for libthread_db.
12002 (thread_db_free): New function.
12003 (thread_db_handle_monitor_command): Likewise.
12004 * config.in: Regenerate.
12005 * configure: Regenerate.
889bf7c5 12006
4168d2d6
UW
120072009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12008
12009 * spu-low.c (spu_kill): Wait for inferior to terminate.
12010 Call clear_inferiors.
12011 (spu_detach): Call clear_inferiors.
12012
81ecdfbb
RW
120132009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12014
12015 * aclocal.m4: Regenerate.
12016 * config.in: Likewise.
12017 * configure: Likewise.
12018
0b9ff2c0
UW
120192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12020
12021 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12022 (parse_spufs_run): New function.
12023 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12024 (ppc_breakpoint_at): Handle SPU breakpoints.
12025
efcbbd14
UW
120262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12027
12028 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12029 (SPUFS_MAGIC): Define.
12030 (spu_enumerate_spu_ids): New function.
12031 (linux_qxfer_spu): New function.
12032 (linux_target_ops): Install linux_qxfer_spu.
12033
f4d9bade
UW
120342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12035
12036 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12037 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12038 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12039 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12040 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12041 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12042 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12043 (init_registers_powerpc_cell32l): Add prototype.
12044 (init_registers_powerpc_cell64l): Likewise.
12045 (ppc_arch_setup): Detect Cell/B.E. architecture.
12046
96e946ca
RW
120472009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12048
12049 * Makefile.in (datarootdir): New variable.
12050
58d6951d
DJ
120512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12052
12053 * linux-low.c (linux_write_memory): Update debugging output.
12054 * Makefile.in (clean): Add new descriptions.
12055 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12056 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12057 * configure.srv: Add new files for arm*-*-linux*.
12058 * linux-arm-low.c: Add new declarations.
12059 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12060 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12061 (HWCAP_VFPv3D16): New.
12062 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12063 instead of __IWMMXT__.
12064 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12065 (arm_arch_setup): New.
12066 (target_regsets): Remove #ifdef. Add VFP regset.
12067 (the_low_target): Use arm_arch_setup.
12068
12b42a12
DJ
120692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12070
12071 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12072 the main thread again.
12073
ac8c974e
AR
120742009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12075
12076 Adding Neutrino gdbserver.
12077 * configure: Regenerated.
12078 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12079 * configure.srv (i[34567]86-*-nto*): New target.
12080 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12081 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12082 (nto_comctrl) [__QNX__]: New function.
12083 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12084
4424e0c3 120852009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12086
12087 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12088 srv_tgtobj.
12089
912cf4ba
PA
120902009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12091 Pedro Alves <pedro@codesourcery.com>
12092
12093 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12094 don't support CONTEXT_EXTENDED_REGISTERS.
12095 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12096 (the_low_target): Install them.
12097 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12098 failing with ERROR_PIPE_NOT_CONNECTED.
12099
aa5ca48f
DE
121002009-06-30 Doug Evans <dje@google.com>
12101 Pierre Muller <muller@ics.u-strasbg.fr>
12102
12103 Add h/w watchpoint support to x86-linux, win32-i386.
12104 * Makefile.in (SFILES): Add i386-low.c
12105 (i386_low_h): Define.
12106 (i386-low.o): Add dependencies.
12107 (linux-x86-low.o): Add i386-low.h dependency.
12108 (win32-i386-low.o): Ditto.
12109 * i386-low.c: New file.
12110 * i386-low.h: New file.
12111 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12112 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12113 * linux-low.c (linux_add_process): Initialize arch_private.
12114 (linux_remove_process): Free arch_private.
12115 (add_lwp): Initialize arch_private.
12116 (delete_lwp): Free arch_private.
12117 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12118 provided.
12119 * linux-low.h (process_info_private): New member arch_private.
12120 (lwp_info): New member arch_private.
12121 (linux_target_ops): New members new_process, new_thread,
12122 prepare_to_resume.
12123 (ptid_of): New macro.
12124 * linux-x86-low.c: Include stddef.h, i386-low.h.
12125 (arch_process_info): New struct.
12126 (arch_lwp_info): New struct.
12127 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12128 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12129 (i386_dr_low_get_status): New function.
12130 (x86_insert_point, x86_remove_point): New functions.
12131 (x86_stopped_by_watchpoint): New function.
12132 (x86_stopped_data_address): New function.
12133 (x86_linux_new_process, x86_linux_new_thread): New functions.
12134 (x86_linux_prepare_to_resume): New function.
12135 (the_low_target): Add entries for insert_point, remove_point,
12136 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12137 prepare_to_resume.
12138 * server.c (debug_hw_points): New global.
12139 (monitor_show_help): Document set debug-hw-points.
12140 (handle_query): Process "set debug-hw-points".
12141 * server.h (debug_hw_points): Declare.
12142 (paddress): Declare.
12143 * utils.c (NUMCELLS, CELLSIZE): New macros.
12144 (get_sell, xsnprintf, paddress): New functions.
12145 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12146 remove_point, stopped_by_watchpoint, stopped_data_address.
12147 * win32-i386-low.c: Include i386-low.h.
12148 (debug_reg_state): Replaces dr.
12149 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12150 (i386_dr_low_get_status): New function.
12151 (i386_insert_point, i386_remove_point): New functions.
12152 (i386_stopped_by_watchpoint): New function.
12153 (i386_stopped_data_address): New function.
12154 (i386_initial_stuff): Update.
12155 (get_thread_context,set_thread_context,i386_thread_added): Update.
12156 (the_low_target): Add entries for insert_point,
12157 remove_point, stopped_by_watchpoint, stopped_data_address.
12158 * win32-low.c (win32_insert_watchpoint): New function.
12159 (win32_remove_watchpoint): New function.
12160 (win32_stopped_by_watchpoint): New function.
12161 (win32_stopped_data_address): New function.
12162 (win32_target_ops): Add entries for insert_watchpoint,
12163 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12164 * win32-low.h (win32_target_ops): New members insert_point,
12165 remove_point, stopped_by_watchpoint, stopped_data_address.
12166
d993e290
PA
121672009-06-25 Pedro Alves <pedro@codesourcery.com>
12168
12169 * server.c (process_serial_event): Re-return unsupported, not
12170 error, if the type isn't recognized. Re-allow supporting only
12171 insert or remove packets. Also call require_running for
12172 breakpoints. Add missing break statement to default case. Tidy.
12173 * target.h (struct target_ops): Rename insert_watchpoint to
12174 insert_point, and remove_watchpoint to remove_point.
12175
12176 * linux-low.h (struct linux_target_ops): Likewise.
12177 * linux-low.c (linux_insert_watchpoint): Rename to ...
12178 (linux_insert_point): ... this. Adjust.
12179 (linux_remove_watchpoint): Rename to ...
12180 (linux_remove_point): ... this. Adjust.
12181 (linux_target_ops): Adjust.
12182 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12183 (cris_insert_point): ... this.
12184 (cris_remove_watchpoint): Rename to ...
12185 (cris_remove_point): ... this.
12186 (the_low_target): Adjust.
12187
0f54c268
PM
121882009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12189
12190 * server.c (handle_v_kill): Pass signal_pid to
12191 kill_inferior if multi_process is zero.
12192
c6314022
AR
121932009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12194
12195 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12196 * target.h (target_ops): Comment for *_watchpoint to make it clear
12197 the functions can get types '0' and '1'.
12198
4463ce24
AR
121992009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12200
12201 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12202 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12203 * regcache.c (get_regcache): Likewise.
12204 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12205 * win32-low.c (child_fetch_inferior_registers): Remove check for
12206 regno 0.
12207
cf8fd78b
PA
122082009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12209 Pedro Alves <pedro@codesourcery.com>
12210
12211 * target.h (struct target_ops) <supports_multi_process>: New
12212 callback.
12213 (target_supports_multi_process): New.
12214 * server.c (handle_query): Even if GDB reports support, only
12215 enable multi-process if the target also supports it. Report
12216 multi-process support only if the target backend supports it.
12217 * linux-low.c (linux_supports_multi_process): New function.
12218 (linux_target_ops): Install it as target_supports_multi_process
12219 callback.
12220
47c0c975
DE
122212009-05-24 Doug Evans <dje@google.com>
12222
e09875d4
DE
12223 Global renaming of find_thread_pid to find_thread_ptid.
12224 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12225 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12226 All callers updated.
12227
e27d73f6
DE
12228 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12229 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12230 directly.
12231
47c0c975
DE
12232 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12233 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12234 (linux_resume_one_lwp): Ditto.
12235
2acc282a
DE
122362009-05-23 Doug Evans <dje@google.com>
12237
12238 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12239 from struct inferior_list_entry * to struct lwp_info *.
12240 All callers updated.
12241
9f1036c1
DE
122422009-05-13 Doug Evans <dje@google.com>
12243
12244 * linux-x86-low.c: Don't include assert.h.
12245 (x86_siginfo_fixup): Use fatal, not assert.
12246 (x86_arch_setup): Fix comment.
12247
d0722149
DE
122482009-05-12 Doug Evans <dje@google.com>
12249
12250 Biarch support for i386/amd64 gdbserver.
12251 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12252 Add linux-x86-low.c.
12253 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12254 (linux-x86-low.o): Add.
12255 * linux-x86-64-low.c: Delete.
12256 * linux-i386-low.c: Delete.
12257 * linux-x86-low.c: New file.
12258 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12259 linux-x86-low.o.
12260 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12261 linux-x86-low.o.
12262 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12263 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12264 (linux_child_pid_to_exec_file): New function.
12265 (elf_64_header_p, elf_64_file_p): New functions.
12266 (siginfo_fixup): New function.
12267 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12268 give target a chance to convert layout.
12269 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12270 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12271
fdeb2a12
DE
122722009-05-07 Doug Evans <dje@google.com>
12273
12274 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12275 (regsets_store_inferior_registers): Ditto.
12276
a6dbe5df
PA
122772009-05-06 Pedro Alves <pedro@codesourcery.com>
12278
12279 PR server/10048
12280
12281 * linux-low.c (must_set_ptrace_flags): Delete.
12282 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12283 of the global.
12284 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12285 `lwp->must_set_ptrace_flags' instead.
ba42693b 12286 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12287 (linux_wait_1): ... not here.
12288
5091eb23
DE
122892009-04-30 Doug Evans <dje@google.com>
12290
9f767825
DE
12291 * inferiors.c (started_inferior_callback): New function.
12292 (attached_inferior_callback): New function.
12293 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12294 * server.c (print_started_pid, print_attached_pid): New functions.
12295 (detach_or_kill_for_exit): New function.
12296 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12297 * server.h (have_started_inferiors_p): Declare.
12298 (have_attached_inferiors_p): Declare.
12299
5091eb23
DE
12300 * inferiors.c (remove_process): Fix memory leak, free process.
12301 * linux-low.c (linux_remove_process): New function.
12302 (linux_kill): Call it instead of remove_process.
12303 (linux_detach, linux_wait_1): Ditto.
12304
155c8968
PA
123052009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12306
12307 * configure.srv: Add x86 Windows CE target.
12308
7fe519cb
UW
123092009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12310
12311 * inferiors.c (get_thread_process): Make global.
12312 * server.h (get_thread_process): Add prototype.
12313 * thread-db.c (find_one_thread): Use get_thread_process
12314 instead of current_process.
12315 (thread_db_get_tls_address): Do not crash if called when
12316 thread layer is not yet initialized.
12317
5472f405
UW
123182009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12319
12320 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12321 * spu-low.c (current_tid): Rename to ...
12322 (current_ptid): ... this.
12323 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12324 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12325 ptid_get_lwp (current_ptid) instead of current_tid.
12326 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12327 instead of current_tid. Use find_process_pid to verify pid
12328 argument is valid. Pass proper argument to remove_process.
12329 (spu_thread_alive): Compare current_ptid instead of current_tid.
12330 (spu_resume): Likewise.
12331
55ac2b99
PA
123322009-04-02 Pedro Alves <pedro@codesourcery.com>
12333
12334 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12335 variable.
12336
95954743
PA
123372009-04-01 Pedro Alves <pedro@codesourcery.com>
12338
12339 Implement the multiprocess extensions, and add linux multiprocess
12340 support.
12341
12342 * server.h (ULONGEST): Declare.
12343 (struct ptid, ptid_t): New.
12344 (minus_one_ptid, null_ptid): Declare.
12345 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12346 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12347 (struct inferior_list_entry): Change `id' type from unsigned from
12348 to ptid_t.
12349 (struct sym_cache, struct breakpoint, struct
12350 process_info_private): Forward declare.
12351 (struct process_info): Declare.
12352 (current_process): Declare.
12353 (all_processes): Declare.
12354 (initialize_inferiors): Declare.
12355 (add_thread): Adjust to use ptid_t.
12356 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12357 (add_process, remove_process, find_thread_pid): Declare.
12358 (find_inferior_id): Adjust to use ptid_t.
12359 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12360 (multi_process): Declare.
12361 (push_event): Adjust to use ptid_t.
12362 (read_ptid, write_ptid): Declare.
12363 (prepare_resume_reply): Adjust to use ptid_t.
12364 (clear_symbol_cache): Declare.
12365 * inferiors.c (all_processes): New.
12366 (null_ptid, minus_one_ptid): New.
12367 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12368 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12369 (add_thread): Change unsigned long to ptid. Remove gdb_id
12370 parameter. Adjust.
12371 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12372 (gdb_id_to_thread): Rename to ...
12373 (find_thread_pid): ... this. Change unsigned long to ptid.
12374 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12375 (loaded_dll, pull_pid_from_list): Adjust.
12376 (add_process, remove_process, find_process_pid)
12377 (get_thread_process, current_process, initialize_inferiors): New.
12378 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12379 (struct target_waitstatus) <related_pid>: Ditto.
12380 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12381 return type to int.
12382 (struct target_ops) <join>: Add `pid' argument.
12383 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12384 (struct target_ops) <wait>: Add `ptid' field. Change return type
12385 to ptid.
12386 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12387 (mywait): Add `ptid' argument. Change return type to ptid_t.
12388 (target_pid_to_str): Declare.
12389 * target.c (set_desired_inferior): Adjust to use ptids.
12390 (mywait): Add new `ptid' argument. Adjust.
12391 (target_pid_to_str): New.
12392 * mem-break.h (free_all_breakpoints): Declare.
12393 * mem-break.c (breakpoints): Delelete.
12394 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12395 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12396 to use per-process breakpoint list.
12397 (free_all_breakpoints): New.
12398 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12399 (symbol_cache, all_symbols_looked_up): Delete.
12400 (hexchars): New.
12401 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12402 read_ptid): New.
12403 (prepare_resume_reply): Change ptid argument's type from unsigned
12404 long to ptid_t. Adjust. Implement W;process and X;process.
12405 (free_sym_cache, clear_symbol_cache): New.
12406 (look_up_one_symbol): Adjust to per-process symbol cache. *
12407 * server.c (cont_thread, general_thread, step_thread): Change type
12408 to ptid_t.
12409 (attached): Delete.
12410 (multi_process): New.
12411 (last_ptid): Change type to ptid_t.
12412 (struct vstop_notif) <ptid>: Change type to ptid_t.
12413 (queue_stop_reply, push_event): Change `ptid' argument's type to
12414 ptid_t.
12415 (discard_queued_stop_replies): Add `pid' argument.
12416 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12417 changes. Don't reference the `attached' global.
12418 (attach_inferior): Adjust to mywait interface changes.
12419 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12420 features. Handle and report "multiprocess+". Handle
12421 "qAttached:PID".
12422 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12423 changes.
12424 (handle_v_kill): New.
12425 (handle_v_stopped): Adjust to use target_pid_to_str.
12426 (handle_v_requests): Allow multiple attaches and runs when
12427 multiprocess extensions are in effect. Handle "vKill".
12428 (myresume): Adjust to use ptids.
12429 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12430 (handle_status): Adjust to discard_queued_stop_replies interface
12431 change.
12432 (first_thread_of, kill_inferior_callback)
12433 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12434 (main): Call initialize_inferiors. Adjust to use ptids, killing
12435 and detaching from all inferiors. Handle multiprocess packet
12436 variants.
12437 * linux-low.h: Include gdb_proc_service.h.
12438 (struct process_info_private): New.
12439 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12440 <lwpid_of>: Use ptid_get_lwp.
12441 (get_lwp_thread): Adjust.
12442 (struct lwp_info): Add `dead' member.
12443 (find_lwp_pid): Declare.
12444 * linux-low.c (thread_db_active): Delete.
12445 (new_inferior): Adjust comment.
12446 (inferior_pid): Delete.
12447 (linux_add_process): New.
12448 (handle_extended_wait): Adjust.
12449 (add_lwp): Change unsigned long to ptid.
12450 (linux_create_inferior): Add process to processes table. Adjust
12451 to use ptids. Don't set new_inferior here.
12452 (linux_attach_lwp): Rename to ...
12453 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12454 it. Adjust to use ptids.
12455 (linux_attach_lwp): New.
12456 (linux_attach): Add process to processes table. Don't set
12457 new_inferior here.
12458 (struct counter): New.
12459 (second_thread_of_pid_p, last_thread_of_process_p): New.
12460 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12461 multiple processes.
12462 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12463 processes. Remove process from process table.
12464 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12465 to multiple processes.
12466 (any_thread_of): New.
12467 (linux_detach): Add `pid' argument, and handle it. Remove process
12468 from processes table.
12469 (linux_join): Add `pid' argument. Handle it.
12470 (linux_thread_alive): Change unsighed long argument to ptid_t.
12471 Consider dead lwps as not being alive.
12472 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12473 threads we're not interested in.
12474 (same_lwp, find_lwp_pid): New.
12475 (linux_wait_for_lwp): Change `pid' argument's type from int to
12476 ptid_t. Adjust.
12477 (linux_wait_for_event): Rename to ...
12478 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12479 from int to ptid_t. Adjust.
12480 (linux_wait_for_event): New.
12481 (linux_wait_1): Add `ptid' argument. Change return type to
12482 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12483 that exit from the process table.
12484 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12485 Adjust.
12486 (mark_lwp_dead): New.
12487 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12488 stopping all threads, mark its main lwp as dead.
12489 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12490 ptids.
12491 (fetch_register, usr_store_inferior_registers)
12492 (regsets_fetch_inferior_registers)
12493 (regsets_store_inferior_registers, linux_read_memory)
12494 (linux_write_memory): Inline `inferior_pid'.
12495 (linux_look_up_symbols): Adjust to use per-process
12496 `thread_db_active'.
12497 (linux_request_interrupt): Adjust to use ptids.
12498 (linux_read_auxv): Inline `inferior_pid'.
12499 (initialize_low): Don't reference thread_db_active.
12500 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12501 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12502 (ps_getpid): Return the pid of the current inferior.
12503 * thread-db.c (proc_handle, thread_agent): Delete.
12504 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12505 per-process data.
12506 (find_one_thread): Change argument type to ptid_t. Adjust to
12507 per-process data.
12508 (maybe_attach_thread): Adjust to per-process data and ptids.
12509 (thread_db_find_new_threads): Ditto.
12510 (thread_db_init): Ditto.
12511 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12512 processes table. Adjust to use ptids.
12513 (spu_kill, spu_detach): Adjust interface. Remove process from
12514 processes table.
12515 (spu_join, spu_thread_alive): Adjust interface.
12516 (spu_wait): Adjust interface. Remove process from processes
12517 table. Adjust to use ptids.
12518 * win32-low.c (current_inferior_tid): Delete.
12519 (current_inferior_ptid): New.
12520 (debug_event_ptid): New.
12521 (thread_rec): Take a ptid. Adjust.
12522 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12523 (child_delete_thread): Ditto.
12524 (do_initial_child_stuff): Add `attached' argument. Add process to
12525 processes table.
12526 (child_fetch_inferior_registers, child_store_inferior_registers):
12527 Adjust.
12528 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12529 (win32_attach): Pass 1 to do_initial_child_stuff.
12530 (win32_kill): Adjust interface. Remove process from processes
12531 table.
12532 (win32_detach): Ditto.
12533 (win32_join): Adjust interface.
12534 (win32_thread_alive): Take a ptid.
12535 (win32_resume): Adjust to use ptids.
12536 (get_child_debug_event): Ditto.
12537 (win32_wait): Adjust interface. Remove exiting process from
12538 processes table.
12539
bd99dc85
PA
125402009-04-01 Pedro Alves <pedro@codesourcery.com>
12541
12542 Non-stop mode support.
12543
12544 * server.h (non_stop): Declare.
12545 (gdb_client_data, handler_func): Declare.
12546 (delete_file_handler, add_file_handler, start_event_loop):
12547 Declare.
12548 (handle_serial_event, handle_target_event, push_event)
12549 (putpkt_notif): Declare.
12550 * target.h (enum resume_kind): New.
12551 (struct thread_resume): Replace `step' field by `kind' field.
12552 (TARGET_WNOHANG): Define.
12553 (struct target_ops) <wait>: Add `options' argument.
12554 <supports_non_stop, async, start_non_stop>: New fields.
12555 (target_supports_non_stop, target_async): New.
12556 (start_non_stop): Declare.
12557 (mywait): Add `options' argument.
12558 * target.c (mywait): Add `options' argument. Print child exit
12559 notifications here.
12560 (start_non_stop): New.
12561 * server.c (non_stop, own_buf, mem_buf): New globals.
12562 (struct vstop_notif): New.
12563 (notif_queue): New global.
12564 (queue_stop_reply, push_event, discard_queued_stop_replies)
12565 (send_next_stop_reply): New.
12566 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12567 interface changes.
12568 (attach_inferior): In non-stop mode, don't wait for the target
12569 here.
12570 (handle_general_set): Handle QNonStop.
12571 (handle_query): When handling qC, return the current general
12572 thread, instead of the first thread of the list.
12573 (handle_query): If the backend supports non-stop mode, include
12574 QNonStop+ in the qSupported query response.
12575 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12576 and non-stop mode.
12577 (handle_v_attach, handle_v_run): Handle non-stop mode.
12578 (handle_v_stopped): New.
12579 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12580 (myresume): Adjust to use resume_kind. Handle non-stop.
12581 (queue_stop_reply_callback): New.
12582 (handle_status): Handle non-stop mode.
12583 (main): Clear non_stop flag on reconnection. Use the event-loop.
12584 Refactor serial protocol handling from here ...
12585 (process_serial_event): ... to this new function. When GDB
12586 selects any thread, select one here. In non-stop mode, wait until
12587 GDB acks all pending events before exiting.
12588 (handle_serial_event, handle_target_event): New.
12589 * remote-utils.c (remote_open): Install remote_desc in the event
12590 loop.
12591 (remote_close): Remove remote_desc from the event loop.
12592 (putpkt_binary): Rename to...
12593 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12594 (putpkt_binary): New as wrapper around putpkt_binary_1.
12595 (putpkt_notif): New.
12596 (prepare_resume_reply): In non-stop mode, don't change the
12597 general_thread.
12598 * event-loop.c: New.
12599 * Makefile.in (OBJ): Add event-loop.o.
12600 (event-loop.o): New rule.
12601
12602 * linux-low.h (pid_of): Moved here.
12603 (lwpid_of): New.
12604 (get_lwp_thread): Use lwpid_of.
12605 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12606 * linux-low.c (pid_of): Delete.
12607 (inferior_pid): Use lwpid_of.
12608 (linux_event_pipe): New.
12609 (target_is_async_p): New.
12610 (delete_lwp): New.
12611 (handle_extended_wait): Use lwpid_of.
12612 (add_lwp): Don't set lwpid field.
12613 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12614 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12615 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12616 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12617 first. Adjust to linux_wait_for_event interface changes. Use
12618 lwpid_of.
12619 (linux_detach): Don't delete the main lwp here.
12620 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12621 (status_pending_p): Don't consider explicitly suspended lwps.
12622 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12623 pointer. Add OPTIONS argument. Change return type to int. Use
12624 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12625 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12626 pointer. Add status pointer argument. Return a pid instead of a
12627 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12628 changes. In non-stop mode, don't switch to a random thread.
12629 (linux_wait): Rename to...
12630 (linux_wait_1): ... this. Add target_options argument, and handle
12631 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12632 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12633 clean exit and signal exit code. Don't stop all threads in
12634 non-stop mode. In all-stop mode, only stop all threads when
12635 reporting a stop to GDB. Handle explicit thread stop requests.
12636 (async_file_flush, async_file_mark): New.
12637 (linux_wait): New.
12638 (send_sigstop): Use lwpid_of.
12639 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12640 interface changes. In non-stop mode, don't switch to a random
12641 thread.
12642 (linux_resume_one_lwp): Use lwpid_of.
12643 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12644 (linux_resume_one_thread): ... this. Handle resume_stop. In
12645 non-stop mode, don't look for pending flag in all threads.
12646 (resume_status_pending_p): Don't consider explicitly suspended
12647 threads.
12648 (my_waitpid): Reimplement. Emulate __WALL.
12649 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12650 Use lwpid_of.
12651 (sigchld_handler, linux_supports_non_stop, linux_async)
12652 (linux_start_non_stop): New.
12653 (linux_target_ops): Register linux_supports_non_stop, linux_async
12654 and linux_start_non_stop.
12655 (initialize_low): Install SIGCHLD handler.
12656 * thread-db.c (thread_db_create_event, find_one_thread)
12657 (thread_db_get_tls_address): Use lwpid_of.
12658 * win32-low.c (win32_detach): Adjust to use resume_kind.
12659 (win32_wait): Add `options' argument.
12660 * spu-low.c (spu_resume): Adjust to use resume_kind.
12661 (spu_wait): Add `options' argument.
12662
5b1c542e
PA
126632009-04-01 Pedro Alves <pedro@codesourcery.com>
12664
12665 Decouple target code from remote protocol.
12666
12667 * target.h (enum target_waitkind): New.
12668 (struct target_waitstatus): New.
12669 (struct target_ops) <wait>: Return an unsigned long. Take a
12670 target_waitstatus pointer instead of a char pointer.
12671 (mywait): Likewise.
12672 * target.c (mywait): Change prototype to return an unsigned long.
12673 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12674 * server.h (thread_from_wait, old_thread_from_wait): Delete
12675 declarations.
12676 (prepare_resume_reply): Change prototype to take a
12677 target_waitstatus.
12678 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12679 (last_status, last_ptid): New.
12680 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12681 pid instead of a signal.
12682 (attach_inferior): Remove "status" and "signal" parameters.
12683 Adjust.
12684 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12685 not as an address.
12686 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12687 (handle_v_requests, myresume): Remove "status" and "signal"
12688 parameters. Adjust.
12689 (handle_status): New.
12690 (main): Delete local `status'. Adjust.
12691 * remote-utils.c: Include target.h.
12692 (prepare_resume_reply): Change prototype to take a
12693 target_waitstatus. Adjust.
12694
12695 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12696 interface.
12697 * spu-low.c (spu_wait): Adjust.
12698 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12699 Delete.
12700 (win32_wait): Adjust.
12701
2bd7c093
PA
127022009-04-01 Pedro Alves <pedro@codesourcery.com>
12703
12704 * target.h (struct thread_resume): Delete leave_stopped member.
12705 (struct target_ops): Add a `n' argument to the `resume' callback.
12706 * server.c (start_inferior): Adjust.
12707 (handle_v_cont, myresume): Adjust.
12708 * linux-low.c (check_removed_breakpoint): Adjust to resume
12709 interface change, and to removed leave_stopped field.
12710 (resume_ptr): Delete.
12711 (struct thread_resume_array): New.
12712 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12713 resume interface change.
12714 (linux_continue_one_thread, linux_queue_one_thread)
12715 (resume_status_pending_p): Check if the resume field is NULL
12716 instead of checking the leave_stopped member.
12717 (linux_resume): Adjust to the target resume interface change.
12718 * spu-low.c (spu_resume): Adjust to the target resume interface
12719 change.
12720 * win32-low.c (win32_detach, win32_resume): Ditto.
12721
c35fafde
PA
127222009-04-01 Pedro Alves <pedro@codesourcery.com>
12723
12724 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12725 flag.
12726 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12727 pending.
12728 (linux_continue_one_thread): Only preserve the stepping flag if
12729 there's a pending breakpoint.
12730
0a59d50b
PA
127312009-03-31 Pedro Alves <pedro@codesourcery.com>
12732
12733 * server.c (main): After the inferior having exited, call
12734 remote_close before exiting gdbserver.
12735
f04c6d38
TJB
127362009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12737
12738 Fix size of FPSCR in Power 7 processors.
12739 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12740 (PPC_FEATURE_HAS_DFP): New #define.
12741 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12742 size of the FPSCR.
12743
78e5cee6
PA
127442009-03-23 Pedro Alves <pedro@codesourcery.com>
12745
12746 * server.c (handle_query) Whitespace and formatting.
12747
1b3f6016
PA
127482009-03-22 Pedro Alves <pedro@codesourcery.com>
12749
12750 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12751 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12752 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12753 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12754 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12755 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12756 Makefile.in, configure.ac: Fix whitespace throughout.
12757 * configure: Regenerate.
12758
a07b2135
PA
127592009-03-22 Pedro Alves <pedro@codesourcery.com>
12760
12761 * inferiors.c (find_inferior): Make it safe for the callback
12762 function to delete the currently iterated inferior.
12763
67cc2626
PA
127642009-03-22 Pedro Alves <pedro@codesourcery.com>
12765
12766 * Makefile.in (linuw_low_h): Move higher.
12767 (thread-db.o): Depend on $(linux_low_h).
12768
54a0b537
PA
127692009-03-17 Pedro Alves <pedro@codesourcery.com>
12770
12771 Rename "process" to "lwp" throughout.
12772
12773 * linux-low.c (all_processes): Rename to...
12774 (all_lwps): ... this.
12775 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12776 (add_process): Rename to ...
12777 (add_lwp): ... this. Adjust.
12778 (linux_create_inferior): Adjust.
12779 (linux_attach_lwp): Adjust.
12780 (linux_attach): Adjust.
12781 (linux_kill_one_process): Rename to ...
12782 (linux_kill_one_lwp): ... this. Adjust.
12783 (linux_kill): Adjust.
12784 (linux_detach_one_process): Rename to ...
12785 (linux_detach_one_lwp): ... this. Adjust.
12786 (linux_detach): Adjust.
12787 (check_removed_breakpoint): Adjust.
12788 (status_pending_p): Adjust.
12789 (linux_wait_for_process): Rename to ...
12790 (linux_wait_for_lwp): ... this. Adjust.
12791 (linux_wait_for_event): Adjust.
12792 (send_sigstop): Adjust.
12793 (wait_for_sigstop): Adjust.
12794 (stop_all_processes): Rename to ...
12795 (stop_all_lwps): ... this.
12796 (linux_resume_one_process): Rename to ...
12797 (linux_resume_one_lwp): ... this. Adjust.
12798 (linux_set_resume_request, linux_continue_one_thread)
12799 (linux_queue_one_thread, resume_status_pending_p)
12800 (usr_store_inferior_registers, regsets_store_inferior_registers)
12801 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12802 Adjust.
12803 * linux-low.h (get_process): Rename to ...
12804 (get_lwp): ... this. Adjust.
12805 (get_thread_process): Rename to ...
12806 (get_thread_lwp): ... this. Adjust.
12807 (get_process_thread): Rename to ...
12808 (get_lwp_thread): ... this. Adjust.
12809 (struct process_info): Rename to ...
12810 (struct lwp_info): ... this.
12811 (all_processes): Rename to ...
12812 (all_lwps): ... this.
12813 * proc-service.c (ps_lgetregs): Adjust.
12814 * thread-db.c (thread_db_create_event, find_one_thread)
12815 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12816
0b16c5cf
PA
128172009-03-14 Pedro Alves <pedro@codesourcery.com>
12818
12819 * server.c (handle_query): Handle "qAttached".
12820
32de4b9d
NS
128212009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12822
12823 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12824 GPLv3, update license URL.
12825
2aecd87f
DE
128262009-03-01 Doug Evans <dje@google.com>
12827
93efd302 12828 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12829 (server_h): Add gdb_signals.h.
12830 (signals.o): Update.
12831 * server.h (target_signal_from_host,target_signal_to_host_p)
12832 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12833
86b1f9c5
PM
128342009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12835
12836 * remote-utils.c (getpkt): Also generate remote-debug
12837 information if noack_mode is set.
12838
4aa995e1
PA
128392009-02-06 Pedro Alves <pedro@codesourcery.com>
12840
12841 * server.c (handle_query): Report qXfer:siginfo:read and
12842 qXfer:siginfo:write as supported and handle them.
12843 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12844 * linux-low.c (linux_xfer_siginfo): New.
12845 (linux_target_ops): Set it.
12846
62709adf
PA
128472009-01-26 Pedro Alves <pedro@codesourcery.com>
12848
12849 * server.c (gdbserver_usage): Mention --remote-debug.
12850 (main): Accept '--remote-debug' switch.
12851
aef93bd7
DE
128522009-01-18 Doug Evans <dje@google.com>
12853
12854 * regcache.c (new_register_cache): No need to check result of xcalloc.
12855 * server.c (handle_search_memory): Back out calls to xmalloc,
12856 result is checked and error is returned to user upon failure.
12857 (handle_query): Ditto. Add more checks for result of malloc.
12858 (handle_v_cont): Check result of malloc, report error back to
12859 user upon failure.
12860 (handle_v_run): Ditto. Call freeargv.
12861 * server.h (freeargv): Declare.
12862 * utils.c (freeargv): New fn.
12863
54363045
DE
128642009-01-15 Doug Evans <dje@google.com>
12865
f626972c
DE
12866 * gdbreplay.c (perror_with_name): Make arg const char *.
12867 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12868 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12869 * utils.c (perror_with_name): Make arg const char *.
54363045 12870
18aae699
PA
128712009-01-14 Pedro Alves <pedro@codesourcery.com>
12872
12873 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12874 when handling a EXIT_PROCESS_DEBUG_EVENT.
12875
ff703abe
JB
128762009-01-06 Joel Brobecker <brobecker@adacore.com>
12877
12878 * gdbreplay.c (gdbreplay_version): Update copyright year.
12879 * server.c (gdbserver_version): Likewise.
12880
f21cc1a2 128812009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12882
12883 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12884 (handle_extended_wait): Improve comment.
0e21c1ec 12885
bca929d3
DE
128862008-12-13 Doug Evans <dje@google.com>
12887
12888 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12889 * server.h (ATTR_MALLOC): New macro.
12890 (xmalloc,xcalloc,xstrdup): Declare.
12891 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12892 * inferiors.c: Ditto.
12893 * linux-low.c: Ditto.
12894 * mem-break.c: Ditto.
12895 * regcache.c: Ditto.
12896 * remote-utils.c: Ditto.
12897 * server.c: Ditto.
12898 * target.c: Ditto.
12899 * win32-low.c: Ditto.
12900
97438e3f
DE
129012008-12-12 Doug Evans <dje@google.com>
12902
896c7fbb
DE
12903 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12904 in debugging printf.
12905
97438e3f
DE
12906 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12907
e3b886f8
DE
129082008-12-09 Doug Evans <dje@google.com>
12909
12910 * linux-low.h (struct process_info): Delete member tid, unused.
12911 * thread-db.c (find_one_thread): Update.
12912 (maybe_attach_thread): Update.
12913
07e059b5
VP
129142008-12-02 Pedro Alves <pedro@codesourcery.com>
12915
889bf7c5
PA
12916 * target.h (struct target_ops): Add qxfer_osdata member.
12917 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12918 and dirent.h.
12919 (linux_qxfer_osdata): New functions.
12920 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12921 callback.
12922 * server.c (handle_query): Handle "qXfer:osdata:read:".
12923 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12924 (buffer_xml_printf): New functions.
12925 * server.h (struct buffer): New.
12926 (buffer_grow_str, buffer_grow_str0): New macros.
12927 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12928 (buffer_xml_printf): Declare.
07e059b5 12929
4cab47ab
DE
129302008-11-24 Doug Evans <dje@google.com>
12931
12932 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12933
f142445f
DJ
129342008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12935
12936 * server.c (handle_v_run): Always use the supplied argument list.
12937
d0107bb6 129382008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12939
d0107bb6
BW
12940 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12941 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12942
2c4ad781
TJB
129432008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12944
12945 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12946 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12947 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12948 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12949 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12950 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12951 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12952 XML target descriptions.
12953 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12954 when inferior is running on an ISA 2.05 or later processor. Add
12955 special case to return offset for full 64-bit slot of FPSCR when
12956 in 32-bits.
12957
dfb64f85
DJ
129582008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12959
12960 * Makefile.in (SFILES, clean): Added sparc64 files.
12961 (reg-sparc64.o, reg-sparc64.c): New.
12962 * configure.srv (sparc*-*-linux*): New configuration.
12963 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12964 syscall arguments for SPARC.
12965 (regsets_store_inferior_registers): Likewise.
12966 * linux-sparc-low.c: New file.
12967
66b6e1dd
DE
129682008-10-21 Doug Evans <dje@google.com>
12969
12970 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12971 (READLINE_DIR,READLINE_DEP): Delete.
12972 (INTERNAL_CFLAGS): Update.
12973 (LINTFLAGS): Update.
12974
9b710a42
PA
129752008-10-10 Pedro Alves <pedro@codesourcery.com>
12976
12977 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12978 whole argv from the last run, not just argv[0].
12979
5822d809
PA
129802008-09-08 Pedro Alves <pedro@codesourcery.com>
12981
12982 * regcache.c (new_register_cache): Return NULL if the register
12983 cache size isn't known yet.
12984 (free_register_cache): Avoid dereferencing a NULL regcache.
12985
74aac56f
DJ
129862008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12987
12988 * configure.srv: Merge MIPS and MIPS64.
12989
400b20f5
MR
129902008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12991
12992 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12993
677c5bb1
LM
129942008-08-18 Luis Machado <luisgpm@br.ibm.com>
12995
12996 * Makefile.in: Add required vsx dependencies.
12997
12998 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12999 Declare init_registers_powerpc_vsx32l.
13000 Declare init_registers_powerpc_vsx64l.
13001 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13002 (ppc_arch_setup): Check for VSX in hwcap.
13003 (ppc_fill_vsxregset): New function.
13004 (ppc_store_vsxregset): New function.
13005 Add new VSX entry in regset_info target_regsets.
13006
13007 * configure.srv: Add new VSX dependencies.
13008
a6f3e723
SL
130092008-08-12 Pedro Alves <pedro@codesourcery.com>
13010
13011 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13012 (remote_open): Set or clear transport_is_reliable.
13013 (putpkt_binary): Don't expect acks in noack mode.
13014 (getpkt): Don't send ack/nac in noack mode.
13015 * server.c (handle_general_set): Handle QStartNoAckMode.
13016 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13017 qSupported.
13018 (main): Reset noack_mode on every connection.
13019 * server.h (noack_mode): Declare.
13020
a417dc56
RW
130212008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13022
13023 * Makefile.in (GDBREPLAY_OBS): New variable.
13024 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13025
3221518c
UW
130262008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13027 Daniel Jacobowitz <dan@codesourcery.com>
13028
13029 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13030 (usr_store_inferior_registers): Likewise.
13031 (regsets_store_inferior_registers): Likewise.
13032
ec56be1b
PA
130332008-07-31 Rolf Jansen <rj@surtec.com>
13034 Pedro Alves <pedro@codesourcery.com>
13035
13036 * configure.ac: Check for memmem declaration.
13037 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13038 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13039 (disable_packet_qfThreadInfo): Unconditionally compile.
13040 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13041 * configure, config.in: Regenerate.
13042
2fe5e3ff
DE
130432008-07-28 Doug Kwan <dougkwan@google.com>
13044
13045 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13046 (linux_write_memory): Remove declaration of errno.
13047
836acd6d
UW
130482008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13049
13050 * linux-low.c (handle_extended_wait): Do not use "status"
13051 variable uninitialized.
13052
aeba519e
PA
130532008-07-07 Pedro Alves <pedro@codesourcery.com>
13054
13055 * server.c (handle_v_attach): Inhibit reporting dll changes.
13056
db42f210
PA
130572008-06-27 Pedro Alves <pedro@codesourcery.com>
13058
13059 * remote-utils.c (prepare_resume_reply): If requested, don't
13060 output "thread:TID" in the T stop reply.
13061
13062 * server.c (disable_packet_vCont, disable_packet_Tthread)
13063 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13064 (handle_query): If requested, disable support for qC, qfThreadInfo
13065 and qsThreadInfo.
13066 (handle_v_requests): If requested, disable support for vCont.
13067 (gdbserver_show_disableable): New.
13068 (main): Handle --disable-packet and --disable-packet=LIST.
13069
13070 * server.h (disable_packet_vCont, disable_packet_Tthread)
13071 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13072
8e4c5421
CD
130732008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13074
13075 * server.c (gdbserver_usage): Mention --version.
13076
6e23a804
DJ
130772008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * Makefile.in (gdbreplay.o): New rule.
13080
90aa6a40
JM
130812008-06-06 Joseph Myers <joseph@codesourcery.com>
13082
13083 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13084 message, not gdbserver.
13085
c16158bc 130862008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13087 Nathan Sidwell <nathan@codesourcery.com>
13088 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13089
13090 * acinclude.m4: Include ../../config/acx.m4.
13091 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13092 * configure, config.in: Regenerate.
13093 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13094 * server.c (gdbserver_version): Print PKGVERSION.
13095 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13096 (main): Adjust gdbserver_usage calls.
13097 * gdbreplay.c (version, host_name): Add declarations.
13098 (gdbreplay_version, gdbreplay_usage): New.
13099 (main): Accept --version and --help options.
13100
aeb75bf5
DJ
131012008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13102
13103 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13104 (arm_breakpoint_at): Handle Thumb.
13105 (the_low_target): Add comment.
13106
76b233dd
UW
131072008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13108
13109 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13110
08388c79
DE
131112008-05-09 Doug Evans <dje@google.com>
13112
a3c83fae
DE
13113 * server.h (decode_search_memory_packet): Declare.
13114 * remote-utils.c (decode_search_memory_packet): New fn.
13115 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13116 (handle_search_memory): New fn.
13117 (handle_query): Process qSearch:memory packets.
13118
bb9c3d36
UW
131192008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13120
13121 * regcache.c (registers_length): Remove.
13122 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13123 full register packet.
13124 * regcache.h (registers_length): Remove prototype.
13125 * server.h (PBUFSIZ): Define to 16384.
13126
7284e1be
UW
131272008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13128
13129 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13130 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13131 powerpc-64l.o, and powerpc-altivec64l.o.
13132 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13133 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13134 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13135 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13136 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13137 to srv_xmlfiles.
13138
13139 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13140 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13141 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13142 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13143 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13144 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13145 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13146 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13147 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13148 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13149 (clean): Update.
13150
13151 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13152 (init_registers_powerpc_32l): ... this new prototype.
13153 (init_registers_powerpc_32): Remove, replace by ...
13154 (init_registers_powerpc_altivec32l): ... this new prototype.
13155 (init_registers_powerpc_e500): Remove, replace by ...
13156 (init_registers_powerpc_e500l): ... this new prototype.
13157 (init_registers_ppc64): Remove, replace by ...
13158 (init_registers_powerpc_64l): ... this new prototype.
13159 (init_registers_powerpc_64): Remove, replace by ...
13160 (init_registers_powerpc_altivec64l): ... this new prototype.
13161 (ppc_num_regs): Set to 73.
13162 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13163 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13164 (ppc_cannot_store_register): Handle orig_r3 and trap.
13165 (ppc_arch_setup): Update init_registers_... calls.
13166 (ppc_fill_gregset): Handle orig_r3 and trap.
13167
13168 * inferiors.c (clear_inferiors): Reset current_inferior.
13169
fdc59709
PB
131702008-04-23 Paolo Bonzini <bonzini@gnu.org>
13171
889bf7c5
PA
13172 * acinclude.m4: Add override.m4.
13173 * configure: Regenerate.
fdc59709 13174
c9b2f845
UW
131752008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13176
13177 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13178 initial call to init_register_ppc64.
13179
550512b8
UW
131802008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13181
43aaf8b6
PA
13182 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13183 single powerpc*-*-linux* case.
550512b8
UW
13184 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13185
b6430ec3
UW
131862008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13187
13188 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13189 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13190 from reg_xmlfiles.
13191 * linux-ppc-low.c: Include <elf.h>.
13192 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13193 (ppc_hwcap): New global variable.
13194 (ppc_regmap): Remove __SPE__ #ifdef sections.
13195 (ppc_regmap_e500): New global variable.
13196 (ppc_cannot_store_register): Update __SPE__ special case.
13197 (ppc_get_hwcap): New function.
13198 (ppc_arch_setup): Use it to determine whether inferior supports
13199 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13200 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13201 Do not access registers if target does not support AltiVec.
13202 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13203 Do not access registers if target does not support SPE.
13204 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13205
52fa2412
UW
132062008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * linux-low.c (disabled_regsets, num_regsets): New.
13209 (use_regsets_p): Delete.
13210 (linux_wait_for_process): Clear disabled_regsets.
13211 (regsets_fetch_inferior_registers): Check and set it.
13212 (regsets_store_inferior_registers): Likewise.
13213 (linux_fetch_registers, linux_store_registers): Do not use
13214 use_regsets_p.
13215 (initialize_low): Allocate disabled_regsets.
13216
e28b3332
DJ
132172008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * Makefile.in (LIBOBJS): New.
13220 (OBS): Use LIBOBJS.
13221 (memmem.o): New rule.
13222 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13223 * configure: Regenerated.
13224
4536995d
UW
132252008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13226
13227 * server.c (handle_query): Never return "unsupported" for
13228 qXfer:features:read queries.
13229
221c031f
UW
132302008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13231
13232 * server.c (get_features_xml): Fix inverted condition.
13233 (handle_query): Always support qXfer:feature:read.
13234
ccd213ac
DJ
132352008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * server.c (wrapper_argv): New.
13238 (start_inferior): Handle wrapper_argv. If set, expect an extra
13239 trap.
13240 (gdbserver_usage): Document --wrapper.
13241 (main): Parse --wrapper.
13242
6fe305f7
UW
132432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13244
13245 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13246 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13247 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13248 (ppc_set_pc): Likewise.
13249 (ppc_arch_setup): New function.
13250 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13251 of collect_register.
889bf7c5 13252 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13253
5b0a002e
UW
132542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13255
13256 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13257 instead of linux-ppc64-low.o.
13258 * linux-ppc64-low.c: Remove file.
13259 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13260 (linux-ppc64-low.o): Remove rule.
13261
13262 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13263 (init_registers_powerpc_64): Likewise.
13264 (ppc_regmap): Conditionally define depending on __powerpc64__.
13265 (ppc_cannot_store_register): Do not special-case "fpscr" when
13266 compiled on __powerpc64__.
13267 (ppc_collect_ptrace_register): New function.
13268 (ppc_supply_ptrace_register): New function.
13269 (ppc_breakpoint): Change type to "unsigned int".
13270 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13271 (the_low_target): Conditionally provide initializers for the
889bf7c5 13272 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13273 collect_ptrace_register and supply_ptrace_register members.
13274
9b4b61c8
UW
132752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13276
13277 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13278 * server.c (gdbserver_xmltarget): Define.
13279 (get_features_xml): Use it to replace "target.xml" and arch_string.
13280
13281 * configure.srv: Remove srv_xmltarget. Add XML files that were
13282 mentioned there to srv_xmlfiles instead. Remove conditional tests
13283 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13284 srv_xmlfiles and srv_regobj to include all possible choices.
13285 * configure.ac (srv_xmltarget): Remove.
13286 (srv_xmlfiles): Do not add "target.xml".
13287 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13288 checks for supplementary target information.
13289 * configure: Regenerate.
13290 * Makefile.in (XML_TARGET): Remove.
13291 (target.xml): Remove rule.
13292 (clean): Do not clean up target.xml.
13293 (.PRECIOUS): Do not mention target.xml.
13294
13295 * target.h (struct target_ops): Remove arch_string member.
13296 * linux-low.c (linux_arch_string): Remove.
13297 (linux_target_ops): Remove arch_string initializer.
13298 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13299 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13300 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13301 * spu-low.c (spu_arch_string): Remove.
13302 (spu_target_ops): Remove arch_string initializer.
13303 * win32-low.c (win32_arch_string): Remove.
13304 (win32_target_ops): Remove arch_string initializer.
13305 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13306 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13307 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13308
ee1a7ae4
UW
133092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13310
13311 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13312 by collect_ptrace_register and supply_ptrace_register hooks.
13313 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13314 instead of checking for the_low_target.left_pad_xfer.
13315 (usr_store_inferior_registers): Use collect_ptrace_register callback
13316 instead of checking for the_low_target.left_pad_xfer.
13317
13318 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13319 (s390_supply_ptrace_register): Likewise.
13320 (s390_fill_gregset): Call s390_collect_ptrace_register.
13321 (the_low_target): Update.
13322
13323 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13324 (ppc_supply_ptrace_register): Likewise.
13325 (the_low_target): Update.
13326
13327 * linux-i386-low.c (the_low_target): Update.
13328 * linux-x86-64-low.c (the_low_target): Update.
13329
d61ddec4
UW
133302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13331
13332 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13333 reg-s390.o and reg-s390x.o.
13334
13335 * linux-low.c (new_inferior): New global variable.
13336 (linux_create_inferior, linux_attach): Set it.
13337 (linux_wait_for_process): Call the_low_target.arch_setup after the
13338 target has stopped for the first time.
13339 (initialize_low): Do not call the_low_target.arch_setup.
13340
13341 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13342 (s390_set_pc): Likewise.
13343 (s390_arch_setup): New function.
13344 (the_low_target): Use s390_arch_setup as arch_setup routine.
13345
13346 * regcache.c (realloc_register_cache): New function.
13347 (set_register_cache): Call it for each existing regcache.
13348
d05b4ac3
UW
133492008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13350
13351 * server.h (init_registers): Remove prototype.
13352
13353 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13354 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13355 instead of init_registers ().
13356 * linux-arm-low.c (init_registers_arm): Add prototype.
13357 (init_registers_arm_with_iwmmxt): Likewise.
13358 (the_low_target): Add initializer for arch_setup field.
13359 * linux-cris-low.c (init_registers_cris): Add prototype.
13360 (the_low_target): Add initializer for arch_setup field.
13361 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13362 (the_low_target): Add initializer for arch_setup field.
13363 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13364 (the_low_target): Add initializer for arch_setup field.
13365 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13366 (the_low_target): Add initializer for arch_setup field.
13367 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13368 (the_low_target): Add initializer for arch_setup field.
13369 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13370 (the_low_target): Add initializer for arch_setup field.
13371 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13372 (init_registers_mips64_linux): Likewise.
13373 (the_low_target): Add initializer for arch_setup field.
13374 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13375 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13376 (the_low_target): Add initializer for arch_setup field.
13377 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13378 (init_registers_powerpc_64): Likewise.
13379 (the_low_target): Add initializer for arch_setup field.
13380 * linux-s390-low.c (init_registers_s390): Add prototype.
13381 (init_registers_s390x): Likewise.
13382 (the_low_target): Add initializer for arch_setup field.
13383 * linux-sh-low.c (init_registers_sh): Add prototype.
13384 (the_low_target): Add initializer for arch_setup field.
13385 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13386 (the_low_target): Add initializer for arch_setup field.
13387 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13388 (the_low_target): Add initializer for arch_setup field.
13389
13390 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13391 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13392 instead of init_registers ().
13393 * win32-arm-low.c (init_registers_arm): Add prototype.
13394 (the_low_target): Add initializer for arch_setup field.
13395 * win32-i386-low.c (init_registers_i386): Add prototype.
13396 (the_low_target): Add initializer for arch_setup field.
13397
13398 * spu-low.c (init_registers_spu): Add prototype.
13399 (initialize_low): Call initialie_registers_spu () instead of
13400 initialize_registers ().
13401
fd96d250
PA
134022008-02-19 Pedro Alves <pedro@codesourcery.com>
13403
13404 * server.c (handle_v_requests): When handling the vRun and vAttach
13405 packets, if already debugging a process, don't kill it. Return an
13406 error instead.
13407
d41b6bb4
DJ
134082008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13409
13410 * server.c (handle_query): Correct length check.
13411
5ac588cf
PA
134122008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13413
13414 * win32-low.c (do_initial_child_stuff): Add process handle
13415 parameter. Set current_process_handle and current_process_id from the
13416 parameters. Clear globals.
13417 (win32_create_inferior): Don't set current_process_handle and
13418 current_process_id here. Instead pass them on the call to
13419 do_initial_child_stuff.
13420 (win32_attach): Likewise.
13421 (win32_clear_inferiors): New.
13422 (win32_kill): Don't close the current process handle or the
13423 current thread handle here. Instead call win32_clear_inferiors.
13424 (win32_detach): Don't open a new handle to the process. Call
13425 win32_clear_inferiors.
13426 (win32_join): Don't rely on current_process_handle; open a new
13427 handle using the process id.
13428 (win32_wait): Call win32_clear_inferiors when the inferior process
13429 has exited.
13430
ecd7ecbc
DJ
134312008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13432
13433 * server.c (monitor_show_help): Add "exit".
13434
1525d545
MG
134352008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13436
ecd7ecbc 13437 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13438 (clean): Add reg-xtensa.c.
13439 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13440 * configure.srv (xtensa*-*-linux*) New target.
13441 * linux-xtensa-low.c: New.
13442 * xtensa-xtregs.c: New.
1525d545 13443
59a016f0
PA
134442008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * hostio.c: Don't include errno.h.
13447 (errno_to_fileio_errno): Move to hostio-errno.
13448 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13449 error number outputting to the target->hostio_last_error callback.
13450 (hostio_packet_error): Use FILEIO_EINVAL directly.
13451 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13452 calls to hostio_error.
13453 * hostio-errno.c: New.
13454 * server.h (hostio_last_error_from_errno): Declare.
13455 * target.h (target_ops): Add hostio_last_error member.
13456 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13457 as hostio_last_error handler.
889bf7c5 13458 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13459 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13460 (wince_hostio_last_error): New functions.
13461 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13462 as hostio_last_error handler.
13463 (win32_target_ops) [!_WIN32_WCE]: Register
13464 hostio_last_error_from_errno as hostio_last_error handler.
13465 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13466 (hostio-errno.o): New rule.
13467 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13468 * configure.srv (srv_hostio_err_objs): New variable. Default to
13469 hostio-errno.o.
13470 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13471 * configure: Regenerate.
13472
2d717e4f
DJ
134732008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13476 (linux_kill, linux_detach): Clean up the process list.
13477 * remote-utils.c (remote_open): Improve port number parsing.
13478 (putpkt_binary, input_interrupt): Only send interrupts if the target
13479 is running.
13480 * server.c (extended_protocol): Make static.
13481 (attached): Define earlier.
13482 (exit_requested, response_needed, program_argv): New variables.
13483 (target_running): New.
13484 (start_inferior): Clear attached here.
13485 (attach_inferior): Set attached here.
13486 (require_running): Define.
13487 (handle_query): Use require_running and target_running. Implement
13488 "monitor exit".
13489 (handle_v_attach, handle_v_run): New.
13490 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13491 (gdbserver_usage): Update.
13492 (main): Redo argument parsing. Handle --debug and --multi. Handle
13493 --attach along with other options or after the port. Save
13494 program_argv. Support no initial program. Resynchronize
13495 communication with GDB after an error. Handle "monitor exit".
13496 Use require_running and target_running. Always allow the extended
13497 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13498 restart in extended mode.
13499 * README: Refer to the GDB manual. Update --attach usage.
13500
7407e2de
AS
135012007-12-20 Andreas Schwab <schwab@suse.de>
13502
13503 * linux-low.c (STACK_SIZE): Define.
13504 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13505 (linux_test_for_tracefork): Likewise.
13506
b65d95c5
DJ
135072007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * linux-low.c (linux_wait_for_event): Update messages. Do not
13510 reinsert auto-delete breakpoints.
13511 * mem-break.c (struct breakpoint): Change return type of handler to
13512 int.
13513 (set_breakpoint_at): Update handler type.
13514 (reinsert_breakpoint_handler): Return 1 instead of calling
13515 delete_breakpoint.
13516 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13517 setting a new one.
13518 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13519 * mem-break.h (set_breakpoint_at): Update handler type.
13520 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13521 * win32-low.c (auto_delete_breakpoint): New.
13522 (get_child_debug_event): Use it.
13523
4e799345
DJ
135242007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * configure.ac: Check for pread and pwrite.
13527 * hostio.c (handle_pread): Fall back to lseek and read.
13528 (handle_pwrite): Fall back to lseek and write.
13529 * config.in, configure: Regenerated.
13530
27524b67
DJ
135312007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * server.c (myresume): Add own_buf argument.
13534 (main): Update calls.
13535
a20d5e98
DJ
135362007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13539 * remote-utils.c (remote_open): Do not call disable_async_io.
13540 (block_async_io): Delete.
13541 (unblock_async_io): Make static.
13542 (initialize_async_io): New.
13543 * server.c (handle_v_cont): Handle async I/O here.
13544 (myresume): Likewise. Move other common resume tasks here...
13545 (main): ... from here. Call initialize_async_io. Disable async
13546 I/O before the main loop.
13547 * server.h (initialize_async_io): Declare.
13548 (block_async_io, unblock_async_io): Delete prototypes.
13549 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13550
b79d787e
DJ
135512007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13552
13553 * remote-utils.c (readchar): Allow binary data in received messages.
13554
d97903b2
PA
135552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13556
13557 * win32-low.c (attaching): New global.
13558 (win32_create_inferior): Clear the `attaching' global.
13559 (win32_attach): Set the `attaching' global.
13560 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13561 attaching. Only set a breakpoint at the entry point if not
13562 attaching.
13563
311de423
PA
135642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13565
13566 * server.c (main): Don't report dll events on the initial
13567 connection on attaches.
13568
6c2d16d2
PA
135692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13570
13571 * server.c (main): Relax numerical bases supported for the pid of
13572 the --attach command line argument.
13573
5ca906e6
PA
135742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13575
13576 * win32-low.c (win32_attach): Call OpenProcess before
13577 DebugActiveProcess, not after. Add last error output to error
13578 call.
13579
9c6c8194
PA
135802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13581
13582 * win32-low.c (win32_get_thread_context)
13583 (win32_set_thread_context): New functions.
13584 (thread_rec): Use win32_get_thread_context.
13585 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13586 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13587 field.
13588
4d5d1aaa
PA
135892007-12-03 Leo Zayas
13590 Pedro Alves <pedro_alves@portugalmail.pt>
13591
13592 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13593 global variables.
13594 (child_add_thread): Minor cleanup.
13595 (child_continue): Resume artificially suspended threads before
13596 calling ContinueDebugEvent.
13597 (suspend_one_thread): New.
13598 (fake_breakpoint_event): New.
13599 (get_child_debug_event): Change return type to int. Check here if
13600 gdb sent an interrupt request. If a soft interrupt was requested,
13601 fake a breakpoint event. Return 0 if there is no event to handle,
13602 and 1 otherwise.
13603 (win32_wait): Don't check here if gdb sent an interrupt request.
13604 Ensure there is a valid event to handle.
13605 (win32_request_interrupt): Add soft interruption method as last
13606 resort.
13607
c436e841
PA
136082007-12-03 Leo Zayas
13609 Pedro Alves <pedro_alves@portugalmail.pt>
13610
13611 * win32-low.h (win32_thread_info): Add descriptions to the
13612 structure members. Replace `suspend_count' counter by a
13613 `suspended' flag.
13614 * win32-low.c (thread_rec): Update condition of when to get the
13615 context from the inferior. Rely on ContextFlags being set if it
13616 has already been retrieved. Only suspend the inferior thread if
13617 we haven't already. Warn if that fails.
13618 (continue_one_thread): s/suspend_count/suspended/. Only call
13619 ResumeThread once. Warn if that fails.
13620
e7b5fa67
PA
136212007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13622
13623 * win32-low.c (win32_wait): Don't read from the inferior when it
13624 has already exited.
13625
a385171d
PA
136262007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13627
13628 * Makefile.in (win32_low_h): New variable.
13629 (win32-low.o): Add dependency on $(win32_low_h).
13630 (win32-arm-low.o, win32-i386-low.o): New rules.
13631
f80c84b3
DJ
136322007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * hostio.c: Correct copyright year.
13635
a6b151f1
DJ
136362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * Makefile.in (OBS): Add hostio.o.
13639 (hostio.o): New rule.
13640 * server.h (handle_vFile): Declare.
13641 * hostio.c: New file.
13642 * server.c (handle_v_requests): Take packet_len and new_packet_len
13643 for binary packets. Call handle_vFile.
13644 (main): Update call to handle_v_requests.
13645
f9387fc3
DJ
136462007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * linux-low.c: Include <sched.h>.
13649
51c2684e
DJ
136502007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * linux-low.c (linux_tracefork_grandchild): New.
13653 (linux_tracefork_child): Use clone.
13654 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13655
75f83163
JB
136562007-10-31 Joel Brobecker <brobecker@adacore.com>
13657
13658 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13659
da5898ce
DJ
136602007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13663
24a09b5f
DJ
136642007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * inferiors.c (change_inferior_id): Delete.
13667 (add_pid_to_list, pull_pid_from_list): New.
13668 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13669 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13670 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13671 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13672 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13673 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13674 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13675 (using_threads): Always set to 1.
13676 (handle_extended_wait): New.
13677 (add_process): Do not set TID.
13678 (linux_create_inferior): Set must_set_ptrace_flags.
13679 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13680 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13681 (linux_thread_alive): Rename TID argument to LWPID.
13682 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13683 (linux_wait_for_event): Do not use TID or check using_threads. Update
13684 call to dead_thread_notify. Call handle_extended_wait.
13685 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13686 (send_sigstop): Delete sigstop_sent.
13687 (wait_for_sigstop): Avoid TID.
13688 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13689 (linux_test_for_tracefork): New.
13690 (linux_lookup_signals): Use thread_db_active and
13691 linux_supports_tracefork_flag.
13692 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13693 * linux-low.h (get_process_thread): Avoid TID.
13694 (struct process_ifo): Move thread_known and tid to the end. Remove
13695 sigstop_sent.
13696 (linux_attach_lwp, thread_db_init): Update prototypes.
13697 * server.h (change_inferior_id): Delete prototype.
13698 (add_pid_to_list, pull_pid_from_list): New prototypes.
13699 * thread-db.c (thread_db_use_events): New.
13700 (find_first_thread): Rename to...
13701 (find_one_thread): ...this. Update callers and messages. Do not
13702 call fatal. Check thread_db_use_events. Do not call
13703 change_inferior_id or new_thread_notify.
13704 (maybe_attach_thread): Update. Do not call new_thread_notify.
13705 (thread_db_init): Set thread_db_use_events. Check use_events.
13706 * utils.c (fatal, warning): Correct message prefix.
13707
30ed0a8f
DJ
137082007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13709
13710 * Makefile.in (clean): Remove new files.
13711 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13712 (powerpc-64.o, powerpc-64.c): New rules.
13713 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13714 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13715 with SPE.
13716 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13717 SPE targets.
13718 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13719 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13720 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13721 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13722 (target_regsets): Add AltiVec and SPE register sets.
13723 * configure.ac: Check for AltiVec and SPE.
13724 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13725 (ppc_fill_vrregset, ppc_store_vrregset): New.
13726 (target_regsets): Add AltiVec register set.
13727 * configure: Regenerated.
13728
fd462a61
DJ
137292007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * linux-low.c (O_LARGEFILE): Define.
13732 (linux_read_memory): Use /proc/PID/mem.
13733 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13734 * configure, config.in: Regenerated.
13735
69f223ed
DJ
137362007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13737
13738 * linux-low.c (linux_wait_for_event): Do not pass signals while
13739 single-stepping.
13740
aec18585
PA
137412007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13742
13743 * win32-low.c (create_process): New.
13744 (win32_create_inferior): Use create_process instead of
13745 CreateProcess. If create_process failed retry appending an ".exe"
13746 suffix. Store the GetLastError result immediatelly after
13747 create_process calls and use it on the call to error.
13748
34d86ddd
PA
137492007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13750
13751 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13752
5a0e3bd0
JB
137532007-08-23 Joel Brobecker <brobecker@adacore.com>
13754
13755 * configure.ac: Switch license to GPLv3.
13756
f88c79e6
MS
137572007-08-01 Michael Snyder <msnyder@access-company.com>
13758
13759 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13760
6b3d9b83
PA
137612007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13762
13763 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13764 typedef.
13765 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13766 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13767 CloseToolhelp32Snapshot.
13768 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13769 CloseToolhelp32Snapshot.
13770
c588c53c
MS
137712007-07-27 Michael Snyder <michael.snyder@access-company.com>
13772
13773 * server.c (main): Check for inferior exit before main loop.
13774
aa0403d9
PA
137752007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13776
13777 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13778 instead of on tmp_desc.
13779
255e7678
DJ
137802007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13781 Daniel Jacobowitz <dan@codesourcery.com>
13782
13783 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13784 (add_thread): Minor cleanups.
13785 (clear_inferiors): Move lower in the file. Clear the DLL
13786 list.
13787 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13788 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13789 (xml_escape_text): New.
13790 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13791 for qSupported.
13792 (handle_v_cont): Report errors.
13793 (gdbserver_version): Update.
13794 (main): Correct size of own_buf. Do not report initial DLL events.
13795 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13796 (unloaded_dll, xml_escape_text): New.
13797 * win32-low.c (enum target_waitkind): Update comments.
13798 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13799 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13800 (win32_EnumProcessModules, win32_GetModuleInformation)
13801 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13802 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13803 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13804 (win32_Module32First, win32_Module32Next, load_toolhelp)
13805 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13806 (get_child_debug_event): Handle DLL events.
13807 (win32_wait): Likewise.
13808
0d37add9
DJ
138092007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13812 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13813
45e2715e
PA
138142007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13815
13816 * win32-low.c (handle_output_debug_string): Ignore event if not
13817 waiting.
13818
c5674cf1
PA
138192007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13820
13821 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13822
2bbe3cc1
DJ
138232007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13826
ae13219e
DJ
138272007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * inferiors.c (change_inferior_id): Add comment.
13830 * linux-low.c (check_removed_breakpoint): Add an early
13831 prototype. Improve debug output.
13832 (linux_attach): Doc update.
13833 (linux_detach_one_process, linux_detach): Clean up before releasing
13834 each process.
13835 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13836 * linux-low.h (struct process_info): Doc improvement.
13837 * mem-break.c (delete_all_breakpoints): New.
13838 * mem-break.h (delete_all_breakpoints): New prototype.
13839 * thread-db.c (find_first_thread): New.
13840 (thread_db_create_event): Call it instead of
13841 thread_db_find_new_threads. Clean up unused variables.
13842 (maybe_attach_thread): Remove first thread handling.
13843 (thread_db_find_new_threads): Use find_first_thread.
13844 (thread_db_get_tls_address): Likewise.
13845
4105de34
DJ
138462007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13847
13848 * thread-db.c (thread_db_find_new_threads): Add prototype.
13849 (thread_db_create_event): Check for the main thread before adding
13850 a new thread.
13851 (maybe_attach_thread): Only enable event reporting if TID == 0.
13852 (thread_db_get_tls_address): Check for new threads.
13853
2b876972
DJ
138542007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13855
13856 * linux-low.c (linux_create_inferior): Try execv before execvp.
13857 * spu-low.c (spu_create_inferior): Likewise.
13858
7a245884
DJ
138592007-06-13 Mike Frysinger <vapier@gentoo.org>
13860
13861 * linux-low.c (linux_create_inferior): Change execv to execvp.
13862 * spu-low.c (spu_create_inferior): Likewies.
13863
117ce543
DJ
138642007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * Makefile.in (clean): Clean new files instead of deleted ones.
13867 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13868 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13869 rules.
13870 * configure.srv: Specify XML files and new regformats for MIPS and
13871 MIPS64 GNU/Linux.
13872 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13873 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13874 an entry for the restart register.
13875 (mips_cannot_fetch_register, mips_cannot_store_register)
13876 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13877 register names to match the XML descriptions.
13878 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13879 restart register instead of $0.
13880
0e7f50da
UW
138812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13882 Markus Deuling <deuling@de.ibm.com>
13883
13884 * remote-utils.c (decode_xfer_write): New function.
13885 * server.h (decode_xfer_write): Add prototype.
13886 * server.c (handle_query): Add PACKET_LEN argument. Support
13887 qXfer:spu:read and qXfer:spu:write packets.
13888 (main): Pass packet_len to handle_query.
13889 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13890 * target.h (target_ops): Add qxfer_spu.
13891
374c1d38
UW
138922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13893
13894 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13895 accessing non-seekable spufs files.
13896
bb63802a
UW
138972007-05-16 Markus Deuling <deuling@de.ibm.com>
13898
889bf7c5 13899 * server.c (handle_query): Add reply for qC packet.
bb63802a 13900
7390519e
PA
139012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13902 Leo Zayas <lerele@champenstudios@com>
13903
13904 * server.h (check_remote_input_interrupt_request): New function.
13905 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13906 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13907 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13908 (check_remote_input_interrupt_request): New function.
13909 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13910 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13911 winapi_GenerateConsoleCtrlEvent): New typedefs.
13912 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13913 to 250 ms.
13914 (win32_wait): Check for remote interrupt request
13915 with check_remote_input_interrupt_request.
13916 (win32_request_interrupt): New function.
13917 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13918
34b34921
PA
139192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * win32-low.c (debug_registers_changed,
13922 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13923 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13924 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13925 (thread_rec): Get context using the low target.
13926 (child_add_thread): Call thread_added on the low target,
13927 which does the same thing.
13928 (regptr): Delete.
13929 (do_initial_child_stuff): Remove debug registers references.
13930 Set context using the low target. Resume threads after
13931 setting the contexts.
13932 (child_continue): Remove dead variable. Remove debug
13933 registers references.
13934 (child_fetch_inferior_registers): Go through the low target.
13935 (do_child_store_inferior_registers): Remove.
13936 (child_store_inferior_registers): Go through the low target.
13937 (win32_resume): Remove debug registers references.
13938 Set context using the low target.
13939 (handle_exception): Change return type to void. Don't record
13940 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13941 first chance exception.
889bf7c5 13942 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13943 goto loop. Always return after waiting for debug event.
13944 (win32_wait): Convert to switch statement. Handle spurious
13945 events.
13946
13947 * win32-i386-low.c (debug_registers_changed,
13948 debug_registers_used): New.
13949 (initial_stuff): Rename to ...
13950 (i386_initial_stuff): ... this. Clear debug registers
13951 state variables.
13952 (store_debug_registers): Delete.
13953 (i386_get_thread_context): New.
13954 (load_debug_registers): Delete.
13955 (i386_set_thread_context): New.
13956 (i386_thread_added): New.
13957 (single_step): Rename to ...
13958 (i386_single_step): ... this.
13959 (do_fetch_inferior_registers): Rename to ...
13960 (i386_fetch_inferior_register): ... this.
13961 (i386_store_inferior_register): New.
13962 (the_low_target): Adapt to new interface.
13963
13964 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13965 (arm_get_thread_context): New.
13966 (arm_set_thread_context): New.
13967 (regptr): New.
13968 (do_fetch_inferior_registers): Rename to ...
13969 (arm_fetch_inferior_register): ... this.
13970 (arm_store_inferior_register): New.
13971 (arm_wince_breakpoint): Reimplement as unsigned long.
13972 (arm_wince_breakpoint_len): Define.
13973 (the_low_target): Adapt to new interface.
13974
13975 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13976 load_debug_registers. Add get_thread_context, set_thread_context,
13977 thread_added and store_inferior_register. Rename
13978 fetch_inferior_registers to fetch_inferior_register.
13979 (regptr): Remove declaration.
13980
dd6953e1
PA
139812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13982
13983 * linux-low.c (linux_detach): Change return type to int. Return 0.
13984 * spu-low.c (spu_detach): Likewise.
13985
444d6139
PA
139862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13987
13988 * target.h (target_ops): Change return type of detach to int.
13989 Add join.
13990 (join_inferior): New.
13991 * server.c (main): Don't skip detach support on mingw32.
13992 If the inferior doesn't support detaching return error.
13993 Call join_inferior instead of using waitpid.
13994 * linux-low.c (linux_join): New.
13995 (linux_target_op): Add linux_join.
13996 * spu-low.c (spu_join): New.
13997 (spu_target_ops): Add spu_join.
13998 * win32-low.c (win32_detach): Adapt to new interface.
13999 Reopen current_process_handle before detaching. Issue a child
14000 resume before detaching.
14001 (win32_join): New.
14002 (win32_target_op): Add win32_join.
14003
1d5315fe
PA
140042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14005
14006 * win32-low.c (win32-attach): Fix return value.
14007 * target.h (target_ops): Describe ATTACH return values.
14008
bf914831
PA
140092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14010
14011 * win32-low.c (GETPROCADDRESS): Define.
14012 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14013 (winapi_DebugSetProcessKillOnExit): Likewise.
14014 (win32_create_inferior): Force usage of ansi CreateProcessA.
14015 (win32_attach): Use GETPROCADDRESS.
14016 (win32_detach): Likewise.
14017
f72f3e60
PA
140182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14021
ed50f18f
PA
140222007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14023
14024 * win32-low.c: Commit leftover changes from 2007-03-29.
14025
0c2ead7e
DJ
140262007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14027
14028 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14029 fields short instead of int. Add explicit padding.
14030 (i387_cache_to_fsave): Remove unnecessary casts.
14031 (i387_fsave_to_cache): Doc fix.
14032 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14033
73725ff3
DJ
140342007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14035
14036 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14037 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14038
d99f33d8
PA
140392007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14040
14041 * configure.srv (arm*-*-mingw32ce*): Move near the other
14042 arm targets.
14043
68070c10
PA
140442007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14045
2482afc6 14046 * configure.ac: Add errno checking.
68070c10
PA
14047 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14048 sys/file.h and malloc.h.
14049 (AC_CHECK_DECLS): Add perror.
14050 (srv_mingwce): Handle.
2482afc6 14051 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14052 win32-i386-low.o to srv_tgtobj.
14053 (i[34567]86-*-mingw*): Likewise.
14054 (arm*-*-mingw32ce*): Add case.
14055 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14056 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14057 [__MINGW32CE__] (strerror): New function.
14058 [__MINGW32CE__] (errno): Define to GetLastError.
14059 [__MINGW32CE__] (COUNTOF): New macro.
14060 (remote_open): Remove extra close call.
14061 * mem-break.c (delete_breakpoint_at): New function.
14062 * mem-break.h (delete_breakpoint_at): Declare.
14063 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14064 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14065 [USE_WIN32API] (read, write): Add char* casts.
14066 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14067 * server.h: Include wincecompat.h on Windows CE.
14068 [HAVE_ERRNO_H]: Check.
14069 (perror): Declare if not declared.
14070 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14071 (perror_with_name): Remove errno declaration.
14072 * wincecompat.h: New.
14073 * wincecompat.c: New.
14074 * win32-low.h: New.
14075 * win32-arm-low.c: New.
14076 * win32-i386-low.c: New.
14077 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14078 (OUTMSG2): Make it safe.
14079 (_T): New macro.
14080 (COUNTOF): New macro.
14081 (NUM_REGS): Get it from the low target.
14082 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14083 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14084 (thread_rec): Let low target handle debug registers.
14085 (child_add_thread): Likewise.
14086 (child_init_thread_list): Likewise.
14087 (continue_one_thread): Likewise.
14088 (regptr): New.
14089 (do_child_fetch_inferior_registers): Move to ...
14090 * win32-i386-low.c: ... here, and rename to ...
14091 (do_fetch_inferior_registers): ... this.
889bf7c5 14092 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14093 Go through the low target.
14094 (do_child_store_inferior_registers): Use regptr.
14095 (strwinerror): New function.
14096 (win32_create_inferior): Handle Windows CE.
14097 Use strwinerror instead of strerror on Windows error
14098 codes. Add program to the error output.
14099 Don't close the main thread handle on Windows CE.
14100 (win32_attach): Use coredll.dll on Windows CE.
14101 (win32_kill): Close current process and current
14102 thread handles.
14103 (win32_detach): Use coredll.dll on Windows CE.
14104 (win32_resume): Let low target handle debug registers, and
14105 step request.
14106 (handle_exception): Add/Remove initial breakpoint. Avoid
14107 non-existant WSTOPSIG on Windows CE.
14108 (win32_read_inferior_memory): Cast to remove warning.
14109 (win32_arch_string): Go through the low target.
14110 (initialize_low): Call set_breakpoint_data with the low
14111 target's breakpoint.
14112 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14113 FOP_REGNUM, mappings): Move to ...
14114 * win32-i386-low.c: ... here.
14115 * win32-low.c (win32_thread_info): Move to ...
14116 * win32-low.h: ... here.
14117 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14118 win32-arm-low.c and wincecompat.c.
14119 (all:): Add $EXEEXT.
14120 (install-only:): Likewise.
14121 (gdbserver:): Likewise.
14122 (gdbreplay:): Likewise.
14123 * config.in: Regenerate.
14124 * configure: Regenerate.
14125
41093d81
PA
141262007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14127
14128 * win32-low.c: Rename typedef thread_info to
14129 win32_thread_info throughout.
14130
544afa54
PA
141312007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14132
14133 * win32-i386-low.c: Rename to ...
14134 * win32-low.c: ... this.
14135 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14136 * Makefile.in: Likewise.
14137
bce7165d
PA
141382007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14139
14140 * remote-utils.c (monitor_output): Constify msg parameter.
14141 * server.h (monitor_output): Likewise.
14142 * win32-i386-low.c (handle_output_debug_string): New.
14143 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14144 handle_output_debug_string.
14145 (get_child_debug_event): Likewise.
14146
506c7aa0
DJ
141472007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14148
14149 * server.c (main): Correct strtoul check.
14150
42c81e2a
DJ
141512007-03-27 Jon Ringle <jon@ringle.org>
14152
14153 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14154
9453113a
DJ
141552007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14156
14157 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14158
64a69107
DJ
141592007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * terminal.h: Check HAVE_SGTTY_H.
14162
141632007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14164
14165 * remote-utils.c (remote_open): Print out the assigned port number.
14166
c74d0ad8
DJ
141672007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * remote-utils.c (monitor_output): New function.
14170 * server.c (debug_threads): Define here.
14171 (monitor_show_help): New function.
14172 (handle_query): Handle qRcmd.
14173 (main): Do not handle 'd' packet.
14174 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14175 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14176 of debug_threads.
14177
de7c3b4a
PA
141782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14179
14180 * Makefile.in (EXEEXT): New.
14181 (clean): Use $(EXEEXT).
14182
ef57601b
PA
141832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14184
14185 * target.h (target_ops): Rename send_signal to request_interrupt,
14186 and remove enum target_signal parameter.
14187 * linux-low.c (linux_request_interrupt): Rename from
14188 linux_send_signal, and always send SIGINT.
14189 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14190 and always send SIGINT.
14191 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14192 of send_signal.
14193 (input_interrupt): Likewise.
14194
820f2bda
PA
141952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14196
14197 * server.c (get_features_xml): Check if target implemented
14198 arch_string.
14199 * win32-i386-low.c (win32_arch_string): New.
14200 (win32_target_ops): Add win32_arch_string as arch_string member.
14201
ab39bf24
UW
142022007-02-22 Markus Deuling <deuling@de.ibm.com>
14203
14204 * spu-low.c (spu_arch_string): New.
14205 (spu_target_ops): Add spu_arch_string.
14206
61ff6e04
DJ
142072007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14208
14209 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14210 * configure.ac: Do not check for terminal.h.
14211 * configure, config.in: Regenerated.
14212
fb1e4ffc
DJ
142132007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * Makefile.in (OBS): Add $(XML_BUILTIN).
14216 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14217 (clean): Update.
14218 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14219 (arm-with-iwmmxt.c): New.
14220 * config.in, configure: Regenerate.
14221 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14222 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14223 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14224 (arm*-*-linux*): Add iWMMXt and regset support.
14225 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14226 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14227 (arm_store_wmmxregset, target_regsets): New.
14228 * server.c (get_features_xml): Take annex argument. Check builtin
14229 XML documents.
14230 (handle_query): Handle multiple annexes.
14231
0f48aa01
DJ
142322007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * remote-utils.c [USE_WIN32API] (read, write): Define.
14235 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14236 write.
14237
23181151
DJ
142382007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14239
14240 * linux-i386-low.c (the_low_target): Set arch_string.
14241 * linux-x86-64-low.c (the_low_target): Likewise.
14242 * linux-low.c (linux_arch_string): New.
14243 (linux_target_ops): Add it.
14244 * linux-low.h (struct linux_target_ops): Add arch_string.
14245 * server.c (write_qxfer_response): Use const void * for DATA.
14246 (get_features_xml): New.
14247 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14248 * target.h (struct target_ops): Add arch_string method.
14249
9d606399
DJ
142502007-01-03 Denis Pilat <denis.pilat@st.com>
14251 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * linux-low.c (linux_kill): Handle being called with no threads.
14254 * win32-i386-low.c (win32_kill): Likewise.
14255 (get_child_debug_event): Clear current_process_handle.
14256
142572006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14258 Daniel Jacobowitz <dan@codesourcery.com>
14259
14260 * remote-utils.c (remote_open): Check the type of specified
14261 serial port devices before opening them.
14262 * server.c (main): Kill the inferior if an error occurs during
14263 the first remote_open.
14264
a5e13d24
DJ
142652006-12-05 Markus Deuling <deuling@de.ibm.com>
14266
14267 * README: Update supported targets.
14268
186947f7
DJ
142692006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * Makefile.in (clean): Remove reg-mips64.c.
14272 (reg-mips64.c, reg-mips64.o): New rules.
14273 * configure.srv: Handle mips64. Include regset support for mips.
14274 * linux-mips-low.c (union mips_register): New.
14275 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14276 (mips_breakpoint, mips_breakpoint_at): Use int.
14277 (mips_collect_register, mips_supply_register)
14278 (mips_collect_register_32bit, mips_supply_register_32bit)
14279 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14280 (mips_store_fpregset, target_regsets): New.
14281 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14282
a13e2c95
UW
142832006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14284
14285 * configure.srv: Add target "spu*-*-*".
14286 * Makefile.in (clean): Remove reg-spu.c.
14287 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14288 * spu-low.c: New file.
14289
cb7283db
DJ
142902006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14291
14292 * configure.ac: Correct td_thr_tls_get_addr test.
14293 * configure: Regenerated.
14294
89be2091
DJ
142952006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * linux-low.c (linux_wait_for_event): Reformat. Use the
14298 pass_signals array.
14299 * remote-utils.c (decode_address_to_semicolon): New.
14300 * server.c (pass_signals, handle_general_set): New.
14301 (handle_query): Mention QPassSignals for qSupported.
14302 (main): Call handle_general_set.
14303 * server.h (pass_signals, decode_address_to_semicolon): New.
14304
000ef4f0
DJ
143052006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14306
14307 * server.c (handle_query): Correct error handling for read_auxv.
14308
b7149293
UW
143092005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14310
14311 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14312 and srv_linux_thread_db to yes.
14313 * linux-s390-low.c (s390_fill_gregset): New function.
14314 (target_regsets): Define data structure.
14315
dae5f5cf
DJ
143162006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14317
14318 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14319 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14320 * config.in, configure: Regenerated.
14321 * inferiors.c (gdb_id_to_thread): New function.
14322 (gdb_id_to_thread_id): Use it.
14323 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14324 * linux-low.h (struct process_info): Add th member.
14325 (thread_db_get_tls_address): New prototype.
14326 * remote-utils.c (decode_address): Make non-static.
14327 * server.c (handle_query): Handle qGetTLSAddr.
14328 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14329 * target.h (struct target_ops): Add get_tls_address.
14330 * thread-db.c (maybe_attach_thread): Save the thread handle.
14331 (thread_db_get_tls_address): New.
14332
32ca6d61
DJ
143332006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14336 (linux_resume_one_process): Take a siginfo_t *. Update all
14337 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14338 (struct pending_signals): Add a siginfo_t.
14339 (linux_wait_for_process): Always set last_status.
14340 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14341 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14342 * linux-low.h (struct process_info): Add last_status.
14343
5ffff7c1
DJ
143442006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * remote-utils.c (try_rle): New function.
14347 (putpkt_binary): Use it.
14348
8695c747
DJ
143492006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14350
14351 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14352 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14353 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14354 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14355 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14356 point registers.
14357
290fadea
RS
143582006-08-08 Richard Sandiford <richard@codesourcery.com>
14359
14360 * server.c (terminal_fd): New variable.
14361 (old_foreground_pgrp): Likewise.
14362 (restore_old_foreground_pgrp): New function.
14363 (start_inferior): Record the terminal file descriptor in terminal_fd
14364 and its original foreground group in old_foreground_pgrp. Register
14365 restore_old_foreground_pgrp with atexit().
14366
9f2e1e63
DJ
143672006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (handle_query): Correct qPart to qXfer.
14370
b80864fb
DJ
143712006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * configure.ac: Check for more headers which are missing on
14374 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14375 * configure.srv: Add Cygwin and mingw32.
14376 * remote-utils.c: Don't include headers unconditionally which
14377 are missing on mingw32. Include <winsock.h> for mingw32.
14378 (remote_open): Adjust for mingw32 support. Flush
14379 standard error after writing to it.
14380 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14381 (unblock_async_io, enable_async_io, disable_async_io)
14382 (readchar, getpkt): Update for Winsock support.
14383 (prepare_resume_reply): Expect a protocol signal number.
14384 * server.c: Disable <sys/wait.h> on mingw32.
14385 (start_inferior): Adjust for mingw32 support. Flush
14386 standard error after writing to it.
14387 (attach_inferior): Likewise. Use protocol signal
14388 numbers.
14389 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14390 and names.
14391 * win32-i386-low.c: New file.
14392 * Makefile.in (XM_CLIBS): Set.
14393 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14394 (win32-i386-low.o): New dependency rule.
14395 * linux-low.c (linux_wait): Use target signal numbers.
14396 * target.h (struct target_ops): Doc fix.
14397 * server.h (target_signal_to_name): New prototype.
14398 * gdbreplay.c: Don't include headers unconditionally which
14399 are missing on mingw32. Include <winsock.h> for mingw32.
14400 (remote_close, remote_open): Adjust for Winsock support.
14401 * configure, config.in: Regenerated.
14402
0876f84a
DJ
144032006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * server.c (decode_xfer_read, write_qxfer_response): New.
14406 (handle_query): Take a packet length argument. Handle
14407 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14408 the qSupported response.
14409 (main): Update call to handle_query.
14410
01f9e8fa
DJ
144112006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14412
14413 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14414 (putpkt_binary): Renamed from putpkt and adjusted for binary
14415 data.
14416 (putpkt): New wrapper for putpkt_binary.
14417 (readchar): Don't mask off the high bit.
14418 (decode_X_packet): New function.
14419 * server.c (main): Call putpkt_binary if a handler sets the packet
14420 length. Save the length of the incoming packet. Handle 'X'.
14421 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14422
be2a5f71
DJ
144232006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * server.c (handle_query): Handle qSupported.
14426
ea025f5f
DJ
144272006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14428
14429 * remote-utils.c (all_symbols_looked_up): New variable.
14430 (look_up_one_symbol): Check it.
14431 * server.h (look_up_one_symbol): New declaration.
14432 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14433
9308fc88
DJ
144342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14435
14436 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14437 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14438 (PTRACE_GET_THREAD_AREA): Define.
14439 (ps_get_thread_area): New function.
14440
52fb6437
NS
144412006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14442
14443 * configure.srv (m68k*-*-uclinux*): New target.
14444 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14445 (linux_resume_one_process): Remove extraneous cast.
14446 (linux_read_offsets): New.
14447 (linux_target_op): Add linux_read_offsets on mmuless systems.
14448 * server.c (handle_query): Add qOffsets logic.
14449 * target.h (struct target_ops): Add read_offsets.
14450
21b0f40c
DJ
144512006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14452
14453 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14454 (PTRACE_GET_THREAD_AREA): Define.
14455 (ps_get_thread_area): New function.
14456 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14457 (linux-x86-64-low.o): Update.
14458
0050a760
DJ
144592006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14460
14461 * configure.ac: Remove checks for prfpregset_t.
14462 * gdb_proc_service.h: New file.
14463 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14464 new "gdb_proc_service.h".
14465 * proc-service.c: Likewise.
14466 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14467 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14468 * Makefile.in (gdb_proc_service_h): Updated.
14469 * configure, config.in: Regenerated.
14470
b92a518e
DJ
144712006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14472
14473 * remote-utils.c (prepare_resume_reply): Move declaration
14474 of gdb_id_from_wait to the top of the block.
14475
545587ee
DJ
144762006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * linux-low.c (regsets_store_inferior_registers): Read the regset
14479 from the target before filling it.
14480
9db87ebd
DJ
144812006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * server.c (attach_inferior): Return SIGTRAP for a successful
14484 attach.
14485
dd24457d
DJ
144862006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * Makefile.in (OBS): Add version.o.
14489 (STAGESTUFF): Delete.
14490 (version.o): Add dependencies.
14491 (version.c): Replace rule.
14492 (clean): Remove version.c.
14493 * server.c (gdbserver_version): New.
14494 (gdbserver_usage): Use printf.
14495 (main): Handle --version and --help.
14496 * server.h (version, host_name): Add declarations.
14497
6f0f660e
EZ
144982005-12-23 Eli Zaretskii <eliz@gnu.org>
14499
889bf7c5
PA
14500 * linux-arm-low.c:
14501 * linux-arm-low.c:
14502 * inferiors.c:
14503 * i387-fp.h:
14504 * i387-fp.c:
14505 * gdbreplay.c:
14506 * regcache.c:
14507 * proc-service.c:
14508 * mem-break.h:
14509 * mem-break.c:
14510 * linux-x86-64-low.c:
14511 * linux-sh-low.c:
14512 * linux-s390-low.c:
14513 * linux-ppc64-low.c:
14514 * linux-ppc-low.c:
14515 * linux-mips-low.c:
14516 * linux-m68k-low.c:
14517 * linux-m32r-low.c:
14518 * linux-low.h:
14519 * linux-low.c:
14520 * linux-ia64-low.c:
14521 * linux-i386-low.c:
14522 * linux-crisv32-low.c:
14523 * thread-db.c:
14524 * terminal.h:
14525 * target.h:
14526 * target.c:
14527 * server.h:
14528 * server.c:
14529 * remote-utils.c:
14530 * regcache.h:
14531 * utils.c:
14532 * Makefile.in:
14533 * configure.ac:
6f0f660e
EZ
14534 * gdbserver.1: Add (C) after Copyright. Update the FSF
14535 address.
14536
9d1fb177
DJ
145372005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14538
14539 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14540 (arm_breakpoint_at): Recognize both breakpoints.
14541 (the_low_target): Use the correct breakpoint instruction.
14542
011a70c2
DJ
145432005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14546 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14547 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14548 (the_low_target): Update.
14549
7fb85e41
AS
145502005-10-25 Andreas Schwab <schwab@suse.de>
14551
14552 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14553
14554 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14555 (ia64_num_regs): Reduce to 462.
14556
3db0444b
DJ
145572005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14558
14559 * acinclude.m4: Correct quoting.
14560 * aclocal.m4: Regenerated.
14561
14562 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14563 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14564 (thread_db_init): Call thread_db_err_str.
14565 * configure.ac: Check for TD_VERSION.
14566 * config.in, configure: Regenerated.
14567
bee0189a
DJ
145682005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14569
14570 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14571
e9d25b98
DJ
145722005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14575 is not available. Define HAVE_PTRACE_GETREGS if it is.
14576 * config.in, configure: Regenerated.
14577 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14578 * linux-i386-low.c, linux-m68k-low.c: Update to use
14579 HAVE_PTRACE_GETREGS.
14580 * linux-low.c (regsets_fetch_inferior_registers)
14581 (regsets_store_inferior_registers): Only return 0 if we processed
14582 GENERAL_REGS.
14583 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14584 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14585
a06660f7
DJ
145862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * inferiors.c (struct thread_info): Add gdb_id.
14589 (add_thread): Add gdb_id argument.
14590 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14591 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14592 calls to add_thread.
14593 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14594 * server.c (handle_query): Use thread_to_gdb_id.
14595 (handle_v_cont, main): Use gdb_id_to_thread_id.
14596 * server.h (add_thread): Update prototype.
14597 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14598 prototypes.
14599
5a1f5858
DJ
146002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14603 left-padded registers.
14604 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14605 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14606
e122f1f5
SE
146072005-07-01 Steve Ellcey <sje@cup.hp.com>
14608
14609 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14610 * configure: Regenerate.
14611 * config.in: Regenerate.
14612 * server.h (NEED_DECLARATION_STRERROR):
14613 Replace with !HAVE_DECL_STRERROR.
14614
d592fa2f
DJ
146152005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14616
14617 * linux-low.c (linux_wait, linux_send_signal): Don't test
14618 an unsigned long variable for > 0 if it could be MAX_ULONG.
14619 * server.c (myresume): Likewise.
14620 * target.c (set_desired_inferior): Likewise.
14621
ccbd4912
MK
146222005-06-13 Mark Kettenis <kettenis@gnu.org>
14623
14624 * configure.ac: Simplify and improve check for socklen_t.
14625 * configure, config.in: Regenerate.
14626
f450004a
DJ
146272005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14628
14629 * acconfig.h: Remove.
14630 * configure.ac: Add a test for socklen_t. Use three-argument
14631 AC_DEFINE throughout.
14632 * config.in: Regenerated using autoheader 2.59.
14633 * configure: Regenerated.
14634
14635 * gdbreplay.c (socklen_t): Provide a default.
14636 (remote_open): Use socklen_t.
14637 * remote-utils.c (socklen_t): Provide a default.
14638 (remote_open): Use socklen_t.
14639 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14640 unsigned char.
14641
14642 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14643 char for buffers.
14644 * linux-low.c (linux_read_memory, linux_write_memory)
14645 (linux_read_auxv): Likewise.
14646 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14647 (check_mem_write): Likewise.
14648 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14649 Likewise.
14650 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14651 (registers_from_string, register_data): Likewise.
14652 * server.c (handle_query, main): Likewise.
14653 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14654 (decode_M_packet): Likewise.
14655 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14656 * target.h (struct target_ops): Update read_memory, write_memory,
14657 and read_auxv.
14658 (read_inferior_memory, write_inferior_memory): Update.
14659 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14660 to unsigned char *.
14661 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14662 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14663 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14664 linux-s390-low.c, linux-sh-low.c: Update for changes in
14665 read_inferior_memory and the_low_target->breakpoint.
14666
eee84df1
DJ
146672005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14670 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14671 * configure.srv: Add powerpc64-*-linux*.
14672 * linux-ppc64-low.c: New file.
14673
45b134e5
OF
146742005-05-23 Orjan Friberg <orjanf@axis.com>
14675
14676 * linux-cris-low.c: New file with support for CRIS.
14677 * linux-crisv32-low.c: Ditto for CRISv32.
14678 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14679 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14680 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14681 reg-crisv32.o, and reg-crisv32.c to make rules.
14682 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14683 recognized targets.
14684
48d93c75
UW
146852005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14686
14687 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14688 of sizeof (PTRACE_XFER_TYPE).
14689 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14690
e013ee27
OF
146912005-05-12 Orjan Friberg <orjanf@axis.com>
14692
889bf7c5 14693 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14694 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14695 pointers for hardware watchpoint support.
14696 * linux-low.h (struct linux_target_ops): Ditto.
14697 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14698 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14699 to linux_target_ops.
14700 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14701 reply packet.
14702 * server.c (main): Recognize 'Z' and 'z' packets.
14703
b0ded00b
UW
147042005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14705
14706 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14707 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14708 (the_low_target): Add new members.
14709
8643e2ad
DJ
147102005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * proc-service.c (ps_lgetregs): Search all_processes instead of
14713 all_threads.
14714
fc620387
DJ
147152005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14716
14717 * server.c (start_inferior): Change return type to int.
14718 (attach_inferior): Change sigptr to int *.
14719 (handle_v_cont, handle_v_requests): Change signal to int *.
14720 (main): Change signal to int.
14721
147222005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14723
14724 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14725 * configure.srv: Add m32r*-*-linux*.
14726 * linux-m32r-low.c: New file.
14727
e0e76420
DJ
147282005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14731
a1928bad
DJ
147322005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14733
14734 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14735 Take unsigned long arguments for PIDs.
14736 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14737 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14738 (wait_for_sigstop, linux_resume_one_process)
14739 (regsets_fetch_inferior_registers, linux_send_signal)
14740 (linux_read_auxv): Likewise. Update the types of variables holding
14741 PIDs. Update format string specifiers.
14742 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14743 * remote-utils.c (prepare_resume_reply): Likewise.
14744 * server.c (cont_thread, general_thread, step_thread)
14745 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14746 unsigned long.
14747 (handle_query): Update format specifiers.
14748 (handle_v_cont, main): Use strtoul for thread IDs.
14749 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14750 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14751 (general_thread, step_thread, thread_from_wait)
14752 (old_thread_from_wait): Update.
14753 * target.h (struct thread_resume): Use unsigned long for THREAD.
14754 (struct target_ops): Use unsigned long for arguments to attach and
14755 thread_alive.
14756
dcdb98d2
DJ
147572005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14758
14759 * acinclude.m4: Include bfd/bfd.m4 directly.
14760 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14761 <agriffis@toolchain.org>.
14762 * aclocal.m4, configure: Regenerated.
14763
bec39cab
AC
147642005-01-07 Andrew Cagney <cagney@gnu.org>
14765
14766 * configure.ac: Rename configure.in, require autoconf 2.59.
14767 * configure: Re-generate.
14768
434c4c77
DJ
147692004-12-08 Daniel Jacobowitz <dan@debian.org>
14770
14771 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14772 LIBS when finished.
14773 * aclocal.m4: Regenerated.
14774 * configure: Regenerated.
14775
db1d3e1b
AS
147762004-11-21 Andreas Schwab <schwab@suse.de>
14777
14778 * linux-m68k-low.c (m68k_num_gregs): Define.
14779 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14780 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14781 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14782 (m68k_breakpoint_at): New. Add to the_low_target.
14783
14784 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14785 srv_linux_thread_db to yes.
14786
43360365
JB
147872004-10-20 Joel Brobecker <brobecker@gnat.com>
14788
14789 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14790 (ARCH_SET_FS): Likewise.
14791 (ARCH_GET_FS): Likewise.
14792 (ARCH_GET_GS): Likewise.
14793
fd500816
DJ
147942004-10-16 Daniel Jacobowitz <dan@debian.org>
14795
14796 * linux-i386-low.c (ps_get_thread_area): New.
14797 * linux-x86-64-low.c (ps_get_thread_area): New.
14798 * linux-low.c: Include <sys/syscall.h>.
14799 (linux_kill_one_process): Don't kill the first thread here.
14800 (linux_kill): Kill the first thread here.
14801 (kill_lwp): New function.
14802 (send_sigstop, linux_send_signal): Use it.
14803 * proc-service.c: Clean up #ifdefs.
14804 (fpregset_info): Delete.
14805 (ps_lgetregs): Update and enable implementation.
14806 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14807 implementations.
14808 * remote-utils.c (struct sym_cache, symbol_cache): New.
14809 (input_interrupt): Print a clearer message.
14810 (async_io_enabled): New variable.
14811 (enable_async_io, disable_async_io): Use it. Update comments.
14812 (look_up_one_symbol): Use the symbol cache.
14813 * thread-db.c (thread_db_look_up_symbols): New function.
14814 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14815
f6de3c42
DJ
148162004-10-16 Daniel Jacobowitz <dan@debian.org>
14817
14818 * configure.in: Test for -rdynamic.
14819 * configure: Regenerated.
14820 * Makefile (INTERNAL_LDFLAGS): New.
14821 (gdbserver, gdbreplay): Use it.
14822
2c0fc042
AC
148232004-09-02 Andrew Cagney <cagney@gnu.org>
14824
14825 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14826
075b3282
DJ
148272004-03-23 Daniel Jacobowitz <drow@mvista.com>
14828
14829 * linux-low.c (linux_wait): Clear all_processes list also.
14830
fa6a77dc
DJ
148312004-03-12 Daniel Jacobowitz <drow@mvista.com>
14832
14833 * linux-low.c: Include <errno.h>. Remove extern declaration of
14834 errno.
14835
6d782a97
DJ
148362004-03-12 Daniel Jacobowitz <drow@mvista.com>
14837
14838 * gdbreplay.c, server.h, utils.c: Update copyright years.
14839
3a7fb99b
DJ
148402004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14841
14842 * server.c (main): Print child status or termination signal from
14843 variable 'signal', not 'sig'.
14844
c3e735a6
DJ
148452004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14846
14847 * linux-low.c (linux_read_memory): Change return type to
14848 int. Check for and return error from ptrace().
14849 * target.c (read_inferior_memory): Change return type to int. Pass
14850 back return status from the_target->read_memory().
14851 * target.h (struct target_ops): Adapt *read_memory() prototype.
14852 Update comment.
14853 (read_inferior_memory): Adapt prototype.
14854 * server.c (main): Return an error packet if
14855 read_inferior_memory() returns an error.
14856
a59d1c82
DJ
148572004-03-04 Daniel Jacobowitz <drow@mvista.com>
14858
14859 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14860 Unify with other clean targets.
14861
dc3f8883
DJ
148622004-02-29 Daniel Jacobowitz <drow@mvista.com>
14863
14864 * server.c (handle_v_cont): Call set_desired_inferior.
14865
89a208da
DJ
148662004-02-29 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14869
62ea82f5
DJ
148702004-02-29 Daniel Jacobowitz <drow@mvista.com>
14871
14872 * linux-low.c (linux_wait): Unblock async I/O.
14873 (linux_resume): Block and enable async I/O.
14874 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14875 * server.h (block_async_io, unblock_async_io): Add prototypes.
14876
6910d122
DJ
148772004-02-29 Daniel Jacobowitz <drow@mvista.com>
14878
14879 * remote-utils.c (remote_open): Print a status notice after
14880 opening a TCP port.
14881 * server.c (attach_inferior): Print a status notice after
14882 attaching.
14883
148842004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14885
14886 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14887
c89dc5d4
DJ
148882004-02-26 Daniel Jacobowitz <drow@mvista.com>
14889
14890 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14891 error packet.
14892 * server.c, target.h: Update copyright years.
14893
4b8dad4a
RM
148942004-02-25 Roland McGrath <roland@redhat.com>
14895
14896 * target.h (struct target_ops): New member `read_auxv'.
14897 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14898 * linux-low.c (linux_read_auxv): New function.
14899 (linux_target_ops): Initialize `read_auxv' member to that.
14900
d7446758
JB
149012004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14902
14903 Committed by Jim Blandy <jimb@redhat.com>.
14904
14905 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14906 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14907 instead of GPR_SIZE to distiguish s390 and s390x targets.
14908
5544ad89
DJ
149092004-01-31 Daniel Jacobowitz <drow@mvista.com>
14910
14911 * linux-low.c: Update copyright year.
14912 (check_removed_breakpoint): Clear pending_is_breakpoint.
14913 (linux_set_resume_request, linux_queue_one_thread)
14914 (resume_status_pending_p): New functions.
14915 (linux_continue_one_thread): Use process->resume.
14916 (linux_resume): Only resume threads if there are no pending events.
14917 * linux-low.h (struct process_info): Add resume request
14918 pointer.
14919
2a68b70e
DJ
149202004-01-30 Daniel Jacobowitz <drow@mvista.com>
14921
14922 * regcache.c (new_register_cache): Clear the allocated register
14923 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14924
64386c31
DJ
149252003-10-13 Daniel Jacobowitz <drow@mvista.com>
14926
14927 * linux-low.c (linux_resume): Take a struct thread_resume *
14928 argument.
14929 (linux_wait): Update call.
14930 (resume_ptr): New static variable.
14931 (linux_continue_one_thread): Renamed from
14932 linux_continue_one_process. Use resume_ptr.
14933 (linux_resume): Use linux_continue_one_thread.
14934 * server.c (handle_v_cont, handle_v_requests): New functions.
14935 (myresume): New function.
14936 (main): Handle 'v' case.
14937 * target.h (struct thread_resume): New type.
14938 (struct target_ops): Change argument of "resume" to struct
14939 thread_resume *.
14940 (myresume): Delete macro.
14941
c938e9b0
L
149422003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14943
14944 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14945 (uninstall): Support DESTDIR.
14946
7f313d07
BC
14947Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14948
14949 * configure.srv: Add xscale*linux copy of arm*linux entry.
14950
3b2fc2ea
DJ
149512003-07-24 Daniel Jacobowitz <drow@mvista.com>
14952
14953 * linux-arm-low.c (arm_reinsert_addr): New function.
14954 (the_low_target): Add arm_reinsert_addr.
14955
1c0a559e
MK
149562003-07-08 Mark Kettenis <kettenis@gnu.org>
14957
14958 * mem-break.c: Remove whitespace at end of file.
14959
43d5792c
DJ
149602003-06-28 Daniel Jacobowitz <drow@mvista.com>
14961
14962 * configure.in: Check whether we need to prototype strerror.
14963 * server.h: Optionally prototype strerror.
14964 * gdbreplay.c (perror_with_name): Use strerror.
14965 * linux-low.c (linux_attach_lwp): Use strerror.
14966 * utils.c (perror_with_name): Use strerror.
14967 * config.in, configure: Regenerated.
14968
c8a86edf
DJ
149692003-06-28 Daniel Jacobowitz <drow@mvista.com>
14970
14971 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14972 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14973
73d37363
DJ
149742003-06-20 Daniel Jacobowitz <drow@mvista.com>
14975
14976 * Makefile.in (SFILES): Update.
14977 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14978 low-sun3.c: Remove files.
14979
6ad8ae5c
DJ
149802003-06-17 Daniel Jacobowitz <drow@mvista.com>
14981
14982 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14983 (linux_detach_one_process, linux_detach): New functions.
14984 (linux_target_ops): Add linux_detach.
14985 * server.c (main): Handle 'D' packet.
14986 * target.h (struct target_ops): Add "detach" member.
14987 (detach_inferior): Define.
14988
1581182a
MK
149892003-06-13 Mark Kettenis <kettenis@gnu.org>
14990
14991 From Kelley Cook <kelleycook@wideopenwest.com>:
14992 * configure.srv: Accept i[34567]86 variants.
14993
e5379b03
DJ
149942003-06-05 Daniel Jacobowitz <drow@mvista.com>
14995
14996 * linux-low.c (linux_wait_for_event): Correct comment typos.
14997 (linux_resume_one_process): Call check_removed_breakpoint.
14998 (linux_send_signal): New function.
14999 (linux_target_ops): Add linux_send_signal.
15000 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15001 of kill.
15002 * target.h (struct target_ops): Add send_signal.
15003
2ff29de4
JB
150042003-05-29 Jim Blandy <jimb@redhat.com>
15005
15006 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15007 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15008 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15009 away part of the register's value.
15010
254787d4
DJ
150112003-03-26 Daniel Jacobowitz <drow@mvista.com>
15012
15013 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15014 (linux_wait_for_event, linux_init_signals): Likewise.
15015
94e10508
DJ
150162003-03-17 Daniel Jacobowitz <drow@mvista.com>
15017
15018 * configure.in: Check for stdlib.h.
15019 * configure: Regenerated.
15020 * config.in: Regenerated.
15021
4c0711e0
DJ
150222003-01-04 Andreas Schwab <schwab@suse.de>
15023
15024 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15025
ef66e766
AC
150262003-01-02 Andrew Cagney <ac131313@redhat.com>
15027
15028 * Makefile.in: Remove obsolete code.
15029
a1358604
DJ
150302002-11-20 Daniel Jacobowitz <drow@mvista.com>
15031
15032 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15033 defined(PT_FPR0_HI).
15034
23ce3b1c
DJ
150352002-11-17 Stuart Hughes <seh@zee2.com>
15036
15037 * linux-arm-low.c (arm_num_regs): Increase.
15038 (arm_regmap): Include status register.
15039
150402002-11-17 Daniel Jacobowitz <drow@mvista.com>
15041
15042 * linux-low.c (register_addr): Remove incorrect -1 check.
15043
a9fa9f7d
DJ
150442002-08-29 Daniel Jacobowitz <drow@mvista.com>
15045
15046 * linux-low.c (linux_create_inferior): Call setpgid. Return
15047 the new PID.
15048 (unstopped_p, linux_signal_pid): Remove.
15049 (linux_target_ops): Remove linux_signal_pid.
15050 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15051 global instead of target method.
15052 * target.h (struct target_ops): Remove signal_pid. Update comment
15053 for create_inferior.
15054 * server.c (signal_pid): New variable.
15055 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15056 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15057 (attach_inferior): Set signal_pid.
15058
17574093
DJ
150592002-08-23 Daniel Jacobowitz <drow@mvista.com>
15060
15061 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15062
150632002-08-20 Jim Blandy <jimb@redhat.com>
15064
15065 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15066 default for this.
15067
150682002-08-01 Andrew Cagney <cagney@redhat.com>
15069
15070 * Makefile.in: Make chill references obsolete.
15071
150722002-07-24 Kevin Buettner <kevinb@redhat.com>
15073
15074 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15075 * configure: Regenerate.
15076 * config.in: Regenerate.
15077
150782002-07-09 David O'Brien <obrien@FreeBSD.org>
15079
15080 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15081 (perror_with_name, remote_close, remote_open, expect, play): Static.
15082
150832002-07-04 Michal Ludvig <mludvig@suse.cz>
15084
4b8dad4a 15085 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15086 byte offsets instead of an array of indexes.
15087 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15088
150892002-06-13 Daniel Jacobowitz <drow@mvista.com>
15090
15091 * regcache.c: Add comment.
15092
150932002-06-11 Daniel Jacobowitz <drow@mvista.com>
15094
15095 * thread-db.c: New file.
15096 * proc-service.c: New file.
15097 * acinclude.m4: New file.
15098 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15099 proc-service.o, and thread-db.o.
15100 (linux-low.o): Add USE_THREAD_DB.
15101 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15102 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15103 * aclocal.m4: Regenerated.
15104 * config.in: Regenerated.
15105 * configure: Regenerated.
15106 * configure.in: Check for proc_service.h, sys/procfs.h,
15107 thread_db.h, and linux/elf.h headrs.
15108 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15109 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15110 Check for -lthread_db and thread support.
15111 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15112 PowerPC, and SuperH.
15113 * i387-fp.c: Constify arguments.
15114 * i387-fp.h: Likewise.
15115 * inferiors.c: (struct thread_info): Renamed from
15116 `struct inferior_info'. Remove PID member. Use generic inferior
15117 list header. All uses updated.
15118 (inferiors, signal_pid): Removed.
15119 (all_threads): New variable.
15120 (get_thread): Define.
15121 (add_inferior_to_list): New function.
15122 (for_each_inferior): New function.
15123 (change_inferior_id): New function.
15124 (add_inferior): Removed.
15125 (remove_inferior): New function.
15126 (add_thread): New function.
15127 (free_one_thread): New function.
15128 (remove_thread): New function.
15129 (clear_inferiors): Use for_each_inferior and free_one_thread.
15130 (find_inferior): New function.
15131 (find_inferior_id): New function.
15132 (inferior_target_data): Update argument type.
15133 (set_inferior_target_data): Likewise.
15134 (inferior_regcache_data): Likewise.
15135 (set_inferior_regcache_data): Likewise.
15136 * linux-low.c (linux_bp_reinsert): Remove.
15137 (all_processes, stopping_threads, using_thrads)
15138 (struct pending_signals, debug_threads, pid_of): New.
15139 (inferior_pid): Replace with macro.
15140 (struct inferior_linux_data): Remove.
15141 (get_stop_pc, add_process): New functions.
15142 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15143 Use add_process and add_thread.
15144 (linux_attach_lwp): New function, based on old linux_attach. Use
15145 add_process and add_thread. Set stop_expected for new threads.
15146 (linux_attach): New function.
15147 (linux_kill_one_process): New function.
15148 (linux_kill): Kill all LWPs.
15149 (linux_thread_alive): Use find_inferior_id.
15150 (check_removed_breakpoints, status_pending_p): New functions.
15151 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15152 Update. Use WNOHANG. Wait for cloned processes also. Update process
15153 struct for the found process.
15154 (linux_wait_for_event): New function.
15155 (linux_wait): Use it. Support LWPs.
15156 (send_sigstop, wait_for_sigstop, stop_all_processes)
15157 (linux_resume_one_process, linux_continue_one_process): New functions.
15158 (linux_resume): Support LWPs.
15159 (REGISTER_RAW_SIZE): Remove.
15160 (fetch_register): Use register_size instead. Call supply_register.
15161 (usr_store_inferior_registers): Likewise. Call collect_register.
15162 Fix recursive case.
15163 (regsets_fetch_inferior_registers): Improve error message.
15164 (regsets_store_inferior_registers): Add debugging.
15165 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15166 (unstopped_p, linux_signal_pid): New functions.
15167 (linux_target_ops): Add linux_signal_pid.
15168 (linux_init_signals): New function.
15169 (initialize_low): Call it. Initialize using_threads.
15170 * regcache.c (inferior_regcache_data): Add valid
15171 flag.
15172 (get_regcache): Fetch registers lazily. Add fetch argument
15173 and update all callers.
15174 (regcache_invalidate_one, regcache_invalidate): New
15175 functions.
15176 (new_register_cache): Renamed from create_register_cache.
15177 Return the new regcache.
15178 (free_register_cache): Change argument to a void *.
15179 (registers_to_string, registers_from_string): Call get_regcache
15180 with fetch flag set.
15181 (register_data): Make static. Pass fetch flag to get_regcache.
15182 (supply_register): Call get_regcache with fetch flag clear.
15183 (collect_register): Call get_regcache with fetch flag set.
15184 (collect_register_as_string): New function.
15185 * regcache.h: Update.
15186 * remote-utils.c (putpkt): Flush after debug output and use
15187 stderr.
15188 Handle input interrupts while waiting for an ACK.
15189 (input_interrupt): Use signal_pid method.
15190 (getpkt): Flush after debug output and use stderr.
15191 (outreg): Use collect_register_as_string.
15192 (new_thread_notify, dead_thread_notify): New functions.
15193 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15194 and general_thread.
15195 (look_up_one_symbol): Flush after debug output.
15196 * server.c (step_thread, server_waiting): New variables.
15197 (start_inferior): Don't use signal_pid. Update call to mywait.
15198 (attach_inferior): Update call to mywait.
15199 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15200 (main): Don't fetch/store registers explicitly. Use
15201 set_desired_inferior. Support proposed ``Hs'' packet. Update
15202 calls to mywait.
15203 * server.h: Update.
15204 (struct inferior_list, struct_inferior_list_entry): New.
15205 * target.c (set_desired_inferior): New.
15206 (write_inferior_memory): Constify.
15207 (mywait): New function.
15208 * target.h: Update.
15209 (struct target_ops): New signal_pid method.
15210 (mywait): Removed macro, added prototype.
15211
15212 * linux-low.h (regset_func): Removed.
15213 (regset_fill_func, regset_store_func): New.
15214 (enum regset_type): New.
15215 (struct regset_info): Add type field. Use new operation types.
15216 (struct linux_target_ops): stop_pc renamed to get_pc.
15217 Add decr_pc_after_break and breakpoint_at.
15218 (get_process, get_thread_proess, get_process_thread)
15219 (strut process_info, all_processes, linux_attach_lwp)
15220 (thread_db_init): New.
15221
15222 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15223 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15224 (the_low_target): Add new members.
15225 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15226 (i386_store_fpxregset): Constify.
15227 (target_regsets): Add new kind identifier.
15228 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15229 (i386_set_pc): Add debugging.
15230 (i386_breakpoint_at): New function.
15231 (the_low_target): Add new members.
15232 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15233 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15234 (mips_breakpoint_at): New.
15235 (the_low_target): Add new members.
15236 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15237 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15238 (the_low_target): Add new members.
15239 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15240 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15241 (the_low_target): Add new members.
15242 * linux-x86-64-low.c (target_regsets): Add new kind
15243 identifier.
15244
152452002-05-15 Daniel Jacobowitz <drow@mvista.com>
15246
15247 From Martin Pool <mbp@samba.org>:
15248 * server.c (gdbserver_usage): New function.
15249 (main): Call it.
15250
152512002-05-14 Daniel Jacobowitz <drow@mvista.com>
15252
15253 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15254 stop_at -> stop_pc.
15255
152562002-05-04 Andrew Cagney <ac131313@redhat.com>
15257
15258 * Makefile.in: Remove obsolete code.
15259
152602002-04-24 Michal Ludvig <mludvig@suse.cz>
15261
15262 * linux-low.c (regsets_fetch_inferior_registers),
15263 (regsets_store_inferior_registers): Removed cast to int from
15264 ptrace() calls.
15265 * regcache.h: Added declaration of struct inferior_info.
15266
152672002-04-20 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * inferiors.c (struct inferior_info): Add regcache_data.
15270 (add_inferior): Call create_register_cache.
15271 (clear_inferiors): Call free_register_cache.
15272 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15273 * regcache.c (struct inferior_regcache_data): New.
15274 (registers): Remove.
15275 (get_regcache): New function.
15276 (create_register_cache, free_register_cache): New functions.
15277 (set_register_cache): Don't initialize the register cache here.
15278 (registers_to_string, registers_from_string, register_data): Call
15279 get_regcache.
15280 * regcache.h: Add prototypes.
15281 * server.h: Likewise.
15282
152832002-04-20 Daniel Jacobowitz <drow@mvista.com>
15284
15285 * mem-break.c: New file.
15286 * mem-break.h: New file.
15287 * Makefile.in: Add mem-break.o rule; update server.h
15288 dependencies.
15289 * inferiors.c (struct inferior_info): Add target_data
15290 member.
15291 (clear_inferiors): Free target_data member if set.
15292 (inferior_target_data, set_inferior_target_data): New functions.
15293 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15294 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15295 * linux-low.c (linux_bp_reinsert): New variable.
15296 (struct inferior_linux_data): New.
15297 (linux_create_inferior): Use set_inferior_target_data.
15298 (linux_attach): Likewise. Call add_inferior.
15299 (linux_wait_for_one_inferior): New function.
15300 (linux_wait): Call it.
15301 (linux_write_memory): Add const.
15302 (initialize_low): Call set_breakpoint_data.
15303 * linux-low.h (struct linux_target_ops): Add breakpoint
15304 handling members.
15305 * server.c (attach_inferior): Remove extra add_inferior
15306 call.
15307 * server.h: Include mem-break.h. Update inferior.c
15308 prototypes.
15309 * target.c (read_inferior_memory)
15310 (write_inferior_memory): New functions.
15311 * target.h (read_inferior_memory)
15312 (write_inferior_memory): Change macros to prototypes.
15313 (struct target_ops): Update comments. Add const to write_memory
15314 definition.
15315
153162002-04-11 Daniel Jacobowitz <drow@mvista.com>
15317
15318 * linux-low.c (usr_store_inferior_registers): Support
15319 registers which are allowed to fail to store.
15320 * linux-low.h (linux_target_ops): Likewise.
15321 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15322 (ppc_cannot_store_register): FPSCR may not be storable.
15323
153242002-04-09 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * server.h: Include <string.h> if HAVE_STRING_H.
15327 * ChangeLog: Correct paths in last ChangeLog entry.
15328
153292002-04-09 Daniel Jacobowitz <drow@mvista.com>
15330
15331 * linux-low.h: Remove obsolete prototypes.
15332 (struct linux_target_ops): New.
15333 (extern the_low_target): New.
15334 * linux-low.c (num_regs, regmap): Remove declarations.
15335 (register_addr): Use the_low_target explicitly.
15336 (fetch_register): Likewise.
15337 (usr_fetch_inferior_registers): Likewise.
15338 (usr_store_inferior_registers): Likewise.
15339 * linux-arm-low.c (num_regs): Remove.
15340 (arm_num_regs): Define.
15341 (arm_regmap): Renamed from regmap, made static.
15342 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15343 made static.
15344 (arm_cannot_store_register): Renamed from cannot_store_register,
15345 made static.
15346 (the_low_target): New.
15347 * linux-i386-low.c (num_regs): Remove.
15348 (i386_num_regs): Define.
15349 (i386_regmap): Renamed from regmap, made static.
15350 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15351 made static.
15352 (i386_cannot_store_register): Renamed from cannot_store_register,
15353 made static.
15354 (the_low_target): New.
15355 * linux-ia64-low.c (num_regs): Remove.
15356 (ia64_num_regs): Define.
15357 (ia64_regmap): Renamed from regmap, made static.
15358 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15359 made static.
15360 (ia64_cannot_store_register): Renamed from cannot_store_register,
15361 made static.
15362 (the_low_target): New.
15363 * linux-m68k-low.c (num_regs): Remove.
15364 (m68k_num_regs): Define.
15365 (m68k_regmap): Renamed from regmap, made static.
15366 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15367 made static.
15368 (m68k_cannot_store_register): Renamed from cannot_store_register,
15369 made static.
15370 (the_low_target): New.
15371 * linux-mips-low.c (num_regs): Remove.
15372 (mips_num_regs): Define.
15373 (mips_regmap): Renamed from regmap, made static.
15374 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15375 made static.
15376 (mips_cannot_store_register): Renamed from cannot_store_register,
15377 made static.
15378 (the_low_target): New.
15379 * linux-ppc-low.c (num_regs): Remove.
15380 (ppc_num_regs): Define.
15381 (ppc_regmap): Renamed from regmap, made static.
15382 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15383 made static.
15384 (ppc_cannot_store_register): Renamed from cannot_store_register,
15385 made static.
15386 (the_low_target): New.
15387 * linux-s390-low.c (num_regs): Remove.
15388 (s390_num_regs): Define.
15389 (s390_regmap): Renamed from regmap, made static.
15390 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15391 made static.
15392 (s390_cannot_store_register): Renamed from cannot_store_register,
15393 made static.
15394 (the_low_target): New.
15395 * linux-sh-low.c (num_regs): Remove.
15396 (sh_num_regs): Define.
15397 (sh_regmap): Renamed from regmap, made static.
15398 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15399 made static.
15400 (sh_cannot_store_register): Renamed from cannot_store_register,
15401 made static.
15402 (the_low_target): New.
15403 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15404 (the_low_target): New.
15405
154062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * Makefile.in: Add stamp-h target.
15409 * configure.in: Create stamp-h.
15410 * configure: Regenerated.
15411
154122002-04-09 Daniel Jacobowitz <drow@mvista.com>
15413
15414 * inferiors.c: New file.
15415 * target.c: New file.
15416 * target.h: New file.
15417 * Makefile.in: Add target.o and inferiors.o. Update
15418 dependencies.
15419 * linux-low.c (inferior_pid): New static variable,
15420 moved from server.c.
15421 (linux_create_inferior): Renamed from create_inferior.
15422 Call add_inferior. Return 0 on success instead of a PID.
15423 (linux_attach): Renamed from myattach.
15424 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15425 (linux_thread_alive): Renamed from mythread_alive.
15426 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15427 child dies.
15428 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15429 (regsets_store_inferior_registers): Correct error message.
15430 Add missing ``return 0''.
15431 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15432 (linux_store_registers): Renamed from store_inferior_registers.
15433 (linux_read_memory): Renamed from read_inferior_memory.
15434 (linux_write_memory): Renamed from write_inferior_memory.
15435 (linux_target_ops): New structure.
15436 (initialize_low): Call set_target_ops ().
15437 * remote-utils.c (unhexify): New function.
15438 (hexify): New function.
15439 (input_interrupt): Send signals to ``signal_pid''.
15440 * server.c (inferior_pid): Remove.
15441 (start_inferior): Update create_inferior call.
15442 (attach_inferior): Call add_inferior.
15443 (handle_query): New function.
15444 (main): Call handle_query for `q' packets.
15445 * server.h: Include "target.h". Remove obsolete prototypes.
15446 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15447
154482002-04-09 Daniel Jacobowitz <drow@mvista.com>
15449
15450 * Makefile.in: Add WARN_CFLAGS. Update configury
15451 dependencies.
15452 * configure.in: Check for <string.h>
15453 * configure: Regenerate.
15454 * config.in: Regenerate.
15455 * gdbreplay.c: Include needed system headers.
15456 (remote_open): Remove strchr prototype.
15457 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15458 * regcache.c (supply_register): Change buf argument to const void *.
15459 (supply_register_by_name): Likewise.
15460 (collect_register): Change buf argument to void *.
15461 (collect_register_by_name): Likewise.
15462 * regcache.h: Add missing prototypes.
15463 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15464 * server.c (handle_query): New function.
15465 (attached): New static variable, moved out of main.
15466 (main): Quiet longjmp clobber warnings.
15467 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15468 * utils.c (error): Remove NORETURN.
15469 (fatal): Likewise.