]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Make xml_escape_text return an std::string
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5e187554
SM
12017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4 return type of xml_escape_text.
5 * server.c (emit_dll_description): Likewise.
6
1526853e
SM
72017-09-16 Simon Marchi <simon.marchi@ericsson.com>
8
9 * server.c (captured_main): Accept argument for --selftest.
10 Update run_tests call.
11 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
12 when registering selftests.
13
c4dfafab
SDJ
142017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
15
16 * regcache.c (get_thread_regcache): Update code to use "std::vector"
17 instead of "VEC" for "target_desc.reg_defs".
18 (regcache_cpy): Likewise.
19 (registers_to_string): Likewise.
20 (registers_from_string): Likewise.
21 (find_regno): Likewise.
22 (supply_regblock): Likewise.
23 (regcache_raw_read_unsigned): Likewise.
24 * tdesc.c (init_target_desc): Likewise.
25 (tdesc_create_reg): Likewise.
26 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
27 (struct target_desc) <reg_defs>: Convert to "std::vector".
28 (target_desc): Do not initialize "reg_defs".
29 (~target_desc): Update code to use "std::vector" instead of "VEC"
30 for "target_desc.reg_defs".
31 (operator==): Likewise.
32
124aceb4
SM
332017-09-15 Simon Marchi <simon.marchi@ericsson.com>
34
35 * inferiors.h (thread_to_gdb_id): Remove.
36 * inferiors.c (thread_to_gdb_id): Remove.
37 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
38 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
39 lynx_store_registers, lynx_read_memory, lynx_write_memory):
40 Likewise.
41 * nto-low.c (nto_fetch_registers, nto_store_registers,
42 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
43
96cde54f
SM
442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
45
46 * inferiors.h (gdb_id_to_thread_id): Remove.
47 * inferiors.c (gdb_id_to_thread_id): Remove.
48 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
49 removal. Move pid declaration closer to where it's used.
50
e8ca139e
SM
512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
52
53 * server.c (handle_detach): New function.
54 (process_serial_event): Move code out, call handle_detach.
55
f8a4e119
SM
562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
57
58 * server.c (require_running): Rename to ...
59 (require_running_or_return): ... this ...
60 (require_running_or_break): ... and this.
61 (handle_query, process_serial_event): Adjust.
62
0eb0a407
SM
632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
64
65 * linux-low.c (linux_set_resume_request): Remove unused
66 variables.
67
785922a5
SM
682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
69
70 * server.c (first_thread_of): Remove.
71 (process_serial_event): Replace usage of first_thread_of with
72 find_any_thread_of_pid.
73 * tracepoint.c (same_process_p): Remove.
74 (gdb_agent_about_to_close): Replace usage of same_process_p with
75 find_any_thread_of_pid.
76 * linux-x86-low.c (same_process_callback): Remove.
77 (x86_arch_setup_process_callback): Replace usage of
78 same_process_callback with find_any_thread_of_pid.
79 * thread-db.c (any_thread_of): Remove.
80 (switch_to_process): Replace usage of any_thread_of with
81 find_any_thread_of_pid.
82 * inferiors.c (thread_pid_matches_callback): Remove.
83 (find_thread_process): Adjust to use find_any_thread_of_pid.
84
a059f00c
SDJ
852017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
86
87 * regcache.c (get_thread_regcache): Guard calls to "memset"
88 with "!VEC_empty".
89
cc397f3a
SDJ
902017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
91
92 * linux-low.c (handle_extended_wait): Use
93 "allocate_target_description" instead of "XNEW".
94 * linux-x86-low.c (initialize_low_arch): Likewise.
95
22916b07
YQ
962017-09-05 Yao Qi <yao.qi@linaro.org>
97
98 * configure.srv (srv_i386_regobj): Remove.
99 (srv_amd64_regobj): Remove.
100 (srv_regobj): Set it to "" for x86 non-linux targets.
101 * linux-x86-tdesc.c (i386_linux_read_description):
102 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
103 (init_registers_i386): Remove the declaration.
104 (tdesc_i386): Remove the declaration.
105 (lynx_i386_arch_setup): Call i386_create_target_description.
106 * nto-x86-low.c: Likewise.
107 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
108 [!__x86_64__]: include arch/i386.h.
109 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
110
38602d55
YQ
1112017-09-05 Yao Qi <yao.qi@linaro.org>
112
113 * configure.srv (srv_amd64_linux_xmlfiles): Remove
114 i386/amd64-XXX-linux from it.
115
44b886ff
YQ
1162017-09-05 Yao Qi <yao.qi@linaro.org>
117
118 * configure.srv: Empty srv_amd64_linux_regobj if $development is
119 false.
120 (ipa_amd64_linux_regobj): Remove.
121 (ipa_x32_linux_regobj): Remove.
122
b4570e4b
YQ
1232017-09-05 Yao Qi <yao.qi@linaro.org>
124
125 * Makefile.in (arch-amd64.o): New rule.
126 * configure.srv: Append arch-amd64.o.
127 * linux-amd64-ipa.c: Include common/x86-xstate.h.
128 (get_ipa_tdesc): Call amd64_linux_read_description.
129 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
130 and init_registers_amd64_XXX.
131 * linux-x86-low.c (x86_linux_read_description): Call
132 amd64_linux_read_description.
133 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
134 (initialize_low_arch): Don't call init_registers_x32_XXX and
135 init_registers_amd64_XXX.
136 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
137 and tdesc_amd64_XXX.
138 [__x86_64__] (amd64_tdesc_test): New function.
139 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
140 and init_registers_amd64_XXX.
141 * linux-x86-tdesc.c: Include arch/amd64.h.
142 (xcr0_to_tdesc_idx): New function.
143 (i386_linux_read_description): New function.
144 (amd64_get_ipa_tdesc_idx): New function.
145 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
146 (amd64_get_ipa_tdesc): Declare.
147
d1f28ea2
YQ
1482017-09-05 Yao Qi <yao.qi@linaro.org>
149
150 * configure.srv (srv_i386_linux_xmlfiles): Remove
151 i386/i386-XXX-linux.xml from it.
152
25a93583
YQ
1532017-09-05 Yao Qi <yao.qi@linaro.org>
154
155 * configure.srv: Set srv_i386_linux_regobj empty if $development
156 is false.
157 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
158 initialize_low_tdesc.
159 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
160 with #if initialize_low_tdesc.
161 * linux-x86-tdesc-selftest.c: New file.
162 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
163
5f035c07
YQ
1642017-09-05 Yao Qi <yao.qi@linaro.org>
165
166 * Makefile.in (arch-i386.o): New rule.
167 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
168 (x86_64-*-linux*): Likewise.
169 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
170 include arch/i386.h.
171 (i386_linux_read_description): Remove code and call
172 i386_create_target_description.
173 * tdesc.c (allocate_target_description): New function.
174 * tdesc.h (set_tdesc_architecture): Remove declaration.
175 (set_tdesc_osabi): Likewise.
176
0abe8a89
YQ
1772017-09-05 Yao Qi <yao.qi@linaro.org>
178
179 * linux-x86-tdesc.c: Don't include <inttypes.h>.
180 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
181 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
182 .xmltarget.
183 * server.c (get_features_xml): Call tdesc_get_features_xml.
184 * tdesc.c (set_tdesc_architecture): New function.
185 (set_tdesc_osabi): New function.
186 (tdesc_get_features_xml): New function.
187 (tdesc_create_feature): Add an argument.
188 * tdesc.h (struct target_desc) <features>: New field.
189 <arch, osabi>: New field.
190 (~target_desc): xfree features, arch, and osabi.
191 (target_desc::oerator==): Don't compare .xmltarget.
192 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
193 (set_tdesc_osabi): Likewise.
194 (tdesc_get_features_xml): Likewise.
195
0a188386
YQ
1962017-09-05 Yao Qi <yao.qi@linaro.org>
197
198 * linux-x86-tdesc.c: Include selftest.h.
199 (i386_tdesc_test): New function.
200 (initialize_low_tdesc): Call selftests::register_test.
201 * tdesc.h: Include regdef.h.
202 (target_desc): Override operator == and !=.
203
f49ff000
YQ
2042017-09-05 Yao Qi <yao.qi@linaro.org>
205
206 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
207 (ipa_obj): Likewise.
208 * linux-i386-ipa.c: Include common/x86-xstate.h
209 (get_ipa_tdesc): Call i386_linux_read_description.
210 (initialize_low_tracepoint): Don't call init_registers_XXX
211 functions, call initialize_low_tdesc instead.
212 * linux-x86-low.c (x86_linux_read_description): Call
213 i386_linux_read_description.
214 (initialize_low_arch): Don't call init_registers_i386_XXX
215 functions, call initialize_low_tdesc.
216 * linux-x86-tdesc.c: New file.
217 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
218 (i386_get_ipa_tdesc_idx): Declare.
219 (i386_get_ipa_tdesc): Declare.
220 (initialize_low_tdesc): Declare.
221
2b68ef2f
YQ
2222017-09-05 Yao Qi <yao.qi@linaro.org>
223
224 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
225 instead of 0.
226
f7000548
YQ
2272017-09-05 Yao Qi <yao.qi@linaro.org>
228
229 * Makefile.in (IPA_OBJS): Add vec-ipa.o
230 * regcache.c (get_thread_regcache): Use VEC_length.
231 (init_register_cache): Likewise.
232 (regcache_cpy): Likewise.
233 (registers_to_string): Iterate reg_defs via VEC_iterate.
234 (find_regno): Likewise.
235 (find_register_by_number): Use VEC_index.
236 (register_size): Call find_register_by_number.
237 (register_data): Call find_register_by_number.
238 (supply_regblock): Use VEC_length.
239 (regcache_raw_read_unsigned): Likewise.
240 * tdesc.c (init_target_desc): Iterate reg_defs via
241 VEC_iterate.
242 (default_description): Update initializer.
243 (copy_target_description): Don't update field num_registers.
244 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
245 <num_registers>: Remove.
246
50a421ac
SM
2472017-09-04 Simon Marchi <simon.marchi@ericsson.com>
248
249 * Makefile.in (.SECONDARY): Define target.
250
23fdd69e
SM
2512017-09-03 Simon Marchi <simon.marchi@ericsson.com>
252
253 * linux-low.c (linux_wait_1): Adjust.
254 * server.c (queue_stop_reply_callback): Adjust.
255
0a2dde4a
SDJ
2562017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
257
258 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
259 QEnvironmentUnset and QEnvironmentReset packets.
260 (handle_query): Inform remote that QEnvironmentHexEncoded,
261 QEnvironmentUnset and QEnvironmentReset are supported.
262
6afd337d
SM
2632017-08-25 Simon Marchi <simon.marchi@ericsson.com>
264
265 * inferiors.h (inferior_target_data): Rename to ...
266 (thread_target_data): ... this.
267 (inferior_regcache_data): Rename to ...
268 (thread_regcache_data): ... this.
269 (set_inferior_regcache_data): Rename to ...
270 (set_thread_regcache_data): ... this.
271 * inferiors.c (inferior_target_data): Rename to ...
272 (thread_target_data): ... this.
273 (inferior_regcache_data): Rename to ...
274 (thread_regcache_data): ... this.
275 (set_inferior_regcache_data): Rename to ...
276 (set_thread_regcache_data): ... this.
277 (free_one_thread): Update.
278 * linux-low.h (get_thread_lwp): Update.
279 * regcache.c (get_thread_regcache): Update.
280 (regcache_invalidate_thread): Update.
281 (free_register_cache_thread): Update.
282 * win32-i386-low.c (update_debug_registers_callback): Update.
283 (win32_get_current_dr): Update.
284 * win32-low.c (thread_rec): Update.
285 (delete_thread_info): Update.
286 (continue_one_thread): Update.
287 (suspend_one_thread): Update.
288
a160cc46
SM
2892017-08-24 Simon Marchi <simon.marchi@ericsson.com>
290
291 * inferiors.c (set_inferior_target_data): Remove.
292 * inferiors.h (set_inferior_target_data): Remove.
293
6d580b63
YQ
2942017-08-18 Yao Qi <yao.qi@linaro.org>
295
296 * Makefile.in (OBS): Add selftest.o.
297 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
298 * configure, config.in: Re-generated.
299 * server.c: Include common/sefltest.h.
300 (captured_main): Handle option --selftest.
301
f5a29eb0
YQ
3022017-08-09 Yao Qi <yao.qi@linaro.org>
303
304 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
305 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
306 i386-avx-mpx.o and i386-mmx.o.
307 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
308 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
309 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
310 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
311 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
312 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
313 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
314 i386/amd64-avx-mpx.xml.
315
57757c2f
YQ
3162017-08-09 Yao Qi <yao.qi@linaro.org>
317
318 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
319 and x32-avx-avx512.o.
320 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
321 i386/x32-avx-avx512.xml.
322
229d26fc
SM
3232017-07-26 Simon Marchi <simon.marchi@ericsson.com>
324
325 * tracepoint.h (enum class fast_tpoint_collect_result): New
326 enumeration.
327 (fast_tracepoint_collecting): Change return type to
328 fast_tpoint_collect_result.
329 * tracepoint.c (fast_tracepoint_collecting): Likewise.
330 * linux-low.h: Include tracepoint.h.
331 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
332 fast_tpoint_collect_result.
333 * linux-low.c (handle_tracepoints): Adjust.
334 (linux_fast_tracepoint_collecting): Change return type to
335 fast_tpoint_collect_result.
336 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
337 linux_wait_1, stuck_in_jump_pad_callback,
338 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
339 proceed_one_lwp): Adjust to type change.
340
2e1e43e1
YQ
3412017-07-10 Yao Qi <yao.qi@linaro.org>
342
343 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
344
adc764e7
YQ
3452017-06-29 Yao Qi <yao.qi@linaro.org>
346
347 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
348 Remove.
349 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
350
a206891a
SM
3512017-06-20 Simon Marchi <simon.marchi@ericsson.com>
352
353 * Makefile.in (IPA_OBJS): Sort and format one item per line.
354
9a6c7d9c
SDJ
3552017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
356
357 * linux-low.c (linux_create_inferior): Adjust code to access the
358 environment information via 'gdb_environ' class.
359 * lynx-low.c (lynx_create_inferior): Likewise.
360 * server.c (our_environ): Make it an instance of 'gdb_environ'.
361 (get_environ): Return a pointer to 'our_environ'.
362 (captured_main): Initialize 'our_environ'.
363 * server.h (get_environ): Adjust prototype.
364 * spu-low.c (spu_create_inferior): Adjust code to access the
365 environment information via 'gdb_environ' class.
366
ae3e2ccf
SM
3672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
368
369 * linux-low.c (linux_read_memory, linux_write_memory): Remove
370 usage of "register" keyword.
371
3e019bdc
SM
3722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
373
374 * configure: Re-generate.
375
8465943a
SM
3762017-06-17 Simon Marchi <simon.marchi@ericsson.com>
377
378 * configure: Re-generate.
379
cf0dd6f0
SM
3802017-06-17 Simon Marchi <simon.marchi@ericsson.com>
381
382 * Makefile.in (COMPILE.pre): Add "-x c++".
383
9845682b
SDJ
3842017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
385
386 * fork-child.c: Conditionally include <signal.h>.
387
aefd8b33
SDJ
3882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
389
390 * server.c (handle_general_set): Handle new packet
391 "QStartupWithShell".
392 (handle_query): Add "QStartupWithShell" to the list of supported
393 packets.
394 (gdbserver_usage): Add help text explaining the
395 new "--startup-with-shell" and "--no-startup-with-shell" CLI
396 options.
397 (captured_main): Recognize and act upon the presence of the new
398 CLI options.
399
2090129c
SDJ
4002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
401 Pedro Alves <palves@redhat.com>
402
403 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
404 * configure: Regenerate.
405 * configure.srv (srv_linux_obj): Add "fork-child.o" and
406 "fork-inferior.o".
407 (i[34567]86-*-lynxos*): Likewise.
408 (spu*-*-*): Likewise.
409 * fork-child.c: New file.
410 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
411 and "environ.h".
412 (linux_ptrace_fun): New function.
413 (linux_create_inferior): Adjust function prototype to reflect
414 change on "target.h". Adjust function code to use
415 "fork_inferior".
416 (linux_request_interrupt): Delete "signal_pid".
417 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
418 (lynx_ptrace_fun): New function.
419 (lynx_create_inferior): Adjust function prototype to reflect
420 change on "target.h". Adjust function code to use
421 "fork_inferior".
422 * nto-low.c (nto_create_inferior): Adjust function prototype and
423 code to reflect change on "target.h". Update comments.
424 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
425 "common-terminal.h" and "environ.h".
426 (terminal_fd): Moved to fork-child.c.
427 (old_foreground_pgrp): Likewise.
428 (restore_old_foreground_pgrp): Likewise.
429 (last_status): Make it global.
430 (last_ptid): Likewise.
431 (our_environ): New variable.
432 (startup_with_shell): Likewise.
433 (program_name): Likewise.
434 (program_argv): Rename to...
435 (program_args): ...this.
436 (wrapper_argv): New variable.
437 (start_inferior): Delete function.
438 (get_exec_wrapper): New function.
439 (get_exec_file): Likewise.
440 (get_environ): Likewise.
441 (prefork_hook): Likewise.
442 (post_fork_inferior): Likewise.
443 (postfork_hook): Likewise.
444 (postfork_child_hook): Likewise.
445 (handle_v_run): Update code to deal with arguments coming from the
446 remote host. Update calls from "start_inferior" to
447 "create_inferior".
448 (captured_main): Likewise. Initialize environment variable. Call
449 "have_job_control".
450 * server.h (post_fork_inferior): New prototype.
451 (get_environ): Likewise.
452 (last_status): Declare.
453 (last_ptid): Likewise.
454 (signal_pid): Likewise.
455 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
456 (spu_ptrace_fun): New function.
457 (spu_create_inferior): Adjust function prototype to reflect change
458 on "target.h". Adjust function code to use "fork_inferior".
459 * target.c (target_terminal_init): New function.
460 (target_terminal_inferior): Likewise.
461 (target_terminal_ours): Likewise.
462 * target.h: Include <vector>.
463 (struct target_ops) <create_inferior>: Update prototype.
464 (create_inferior): Update macro.
465 * utils.c (gdb_flush_out_err): New function.
466 * win32-low.c (win32_create_inferior): Adjust function prototype
467 and code to reflect change on "target.h".
468
043a4934
SDJ
4692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
470
471 * inferiors.c (switch_to_thread): New function.
472
15652511
SDJ
4732017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * Makefile.in (SFILE): Add "common/job-control.c".
476 (OBS): Add "job-control.o".
477
21ea5acd
SDJ
4782017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * Makefile: Remove "@host_makefile_frag@".
481
e13cb306
PA
4822017-05-05 Pedro Alves <palves@redhat.com>
483
484 * configure: Regenerate.
485
c94fee56
SDJ
4862017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
487
488 * configure: Regenerate.
489
a0ff9e1a
SM
4902017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
493 software_single_step change of return type to
494 std::vector<CORE_ADDR>.
495 * linux-low.c (install_software_single_step_breakpoints):
496 Likewise.
497 * linux-low.h (install_software_single_step_breakpoints):
498 Likewise.
499
be628ab8
SDJ
5002017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
501
502 * remote-utils.c: Include "gdb_termios.h" instead of
503 "terminal.h".
504 * terminal.h: Delete file.
505
7c5ded6a
SDJ
5062017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
507
508 * server.c: Include <vector>.
509 <program_argv, wrapper_argv>: Convert to std::vector.
510 (start_inferior): Rewrite function to use C++.
511 (handle_v_run): Likewise. Update code that calculates the argv
512 based on the vRun packet; use C++.
513 (captured_main): Likewise.
514
436252de
SM
5152017-04-06 Simon Marchi <simon.marchi@ericsson.com>
516
517 * server.c (handle_v_cont): Initialize thread_resume::thread
518 with null_ptid.
519
9bf2a700
PA
5202017-04-05 Pedro Alves <palves@redhat.com>
521
522 * configure: Regenerate.
523
a121b7c1
PA
5242017-04-05 Pedro Alves <palves@redhat.com>
525
526 * gdbreplay.c (sync_error): Constify.
527 * linux-x86-low.c (push_opcode): Constify.
528
21c8a587
PA
5292017-04-05 Pedro Alves <palves@redhat.com>
530
531 * win32-low.c (get_child_debug_event)
532 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
533 Report TARGET_WAITKIND_SPURIOUS instead.
534
fb32b4f7
PA
5352017-04-05 Pedro Alves <palves@redhat.com>
536
537 * remote-utils.c (remote_prepare, remote_open): Constify.
538 * remote-utils.h (remote_prepare, remote_open): Constify.
539 * server.c (captured_main): Constify 'port' handling.
540
65dd1e59
SM
5412017-04-04 Simon Marchi <simon.marchi@ericsson.com>
542
543 * Makefile.in (clean): Clear .deps.
544
8fa5b777
SM
5452017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
546
547 * .gitignore: Remove generated files, replace with wildcard.
548 * (clean): Replace removal of generated files with wildcard.
549 (version.c): Replace with...
550 (version-generated.c): ...this.
551 (xml-builtin.c): Replace with...
552 (xml-builtin-generated.c): ...this.
553 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
554 (%.c: *regformats*): Replace with...
555 (%-generated.c: *regformats*): ...this.
556
a12e714b
MF
5572017-03-27 Max Filippov <jcmvbkbc@gmail.com>
558
559 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
560 (xtensa_fill_gregset): Call collect_register_by_name for
561 threadptr register.
562 (xtensa_store_gregset): Call supply_register_by_name for
563 threadptr register.
564
1a09b50a
MF
5652017-03-27 Max Filippov <jcmvbkbc@gmail.com>
566
567 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
568 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
569 (xtensa_store_gregset): Call supply_register for all registers in
570 a0_regnum..a0_regnum + C0_NREGS range.
571
1a01e7c6
SM
5722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
575 (ax-ipa.o: ax.c): Remove.
576 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
577 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
578 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
579 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
580 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
581
36bc18a8
SM
5822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
585 (print-utils-ipa.o: ../common/print-utils.c): Remove.
586 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
587 (errors-ipa.o: ../common/errors.c): Remove.
588 (format-ipa.o: ../common/format.c): Remove.
589 (common-utils-ipa.o: ../common/common-utils.c): Remove.
590
a8ebe3d5
SM
5912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
592
593 * Makefile.in (%-ipa.o: %.c): New rule.
594 (tracepoint-ipa.o: tracepoint.c): Remove.
595 (utils-ipa.o: utils.c): Remove.
596 (remote-utils-ipa.o: remote-utils.c): Remove.
597 (regcache-ipa.o: regcache.c): Remove.
598 (i386-linux-ipa.o: i386-linux.c): Remove.
599 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
600 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
601 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
602 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
603 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
604 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
605 (amd64-linux-ipa.o: amd64-linux.c): Remove.
606 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
607 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
608 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
609 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
610 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
611 (aarch64-ipa.o: aarch64.c): Remove.
612 (s390-linux32-ipa.o: s390-linux32.c): Remove.
613 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
614 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
615 (s390-linux64-ipa.o: s390-linux64.c): Remove.
616 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
617 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
618 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
619 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
620 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
621 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
622 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
623 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
624 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
625 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
626 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
627 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
628 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
629 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
630 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
631 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
632 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
633 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
634 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
635 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
636 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
637 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
638 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
639 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
640 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
641 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
642 (tdesc-ipa.o: tdesc.c): Remove.
643 (x32-linux-ipa.o: x32-linux.c): Remove.
644 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
645 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
646
50cfacb7
SM
6472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * Makefile.in (%.o: ../arch/%.c): New rule.
650 (arm.o: ../arch/arm.c): Remove.
651 (arm-linux.o: ../arch/arm-linux.c): Remove.
652 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
653 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
654
c5a22423
SM
6552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
656
657 * Makefile.in (%.o: ../nat/%.c): New rule.
658 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
659 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
660 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
661 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
662 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
663 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
664 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
665 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
666 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
667 (linux-personality.o: ../nat/linux-personality.c): Remove.
668 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
669 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
670 (x86-linux.o: ../nat/x86-linux.c): Remove.
671 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
672 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
673
6bda016b
SM
6742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
675
676 * Makefile.in (%.o: ../common/%.c): New rule.
677 (signals.o: ../common/signals.c): Remove.
678 (print-utils.o: ../common/print-utils.c): Remove.
679 (rsp-low.o: ../common/rsp-low.c): Remove.
680 (common-utils.o: ../common/common-utils.c): Remove.
681 (posix-strerror.o: ../common/posix-strerror.c): Remove.
682 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
683 (vec.o: ../common/vec.c): Remove.
684 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
685 (xml-utils.o: ../common/xml-utils.c): Remove.
686 (ptid.o: ../common/ptid.c): Remove.
687 (buffer.o: ../common/buffer.c): Remove.
688 (format.o: ../common/format.c): Remove.
689 (filestuff.o: ../common/filestuff.c): Remove.
690 (agent.o: ../common/agent.c): Remove.
691 (errors.o: ../common/errors.c): Remove.
692 (environ.o: ../common/environ.c): Remove.
693 (common-debug.o: ../common/common-debug.c): Remove.
694 (cleanups.o: ../common/cleanups.c): Remove.
695 (common-exceptions.o: ../common/common-exceptions.c): Remove.
696 (fileio.o: ../common/fileio.c): Remove.
697 (common-regcache.o: ../common/common-regcache.c): Remove.
698 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
699 (new-op.o: ../common/new-op.c): Remove.
700 (btrace-common.o: ../common/btrace-common.c): Remove.
701
21122961
SM
7022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
703
704 * Makefile.in (%.o: ../target/%.c): New rule.
705 (waitstatus.o: ../target/waitstatus.c): Remove.
706
c362e621
SM
7072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
708
709 * Makefile.in
710 (%.c: ../regformats/%.dat,
711 (%.c: ../regformats/arm/%.dat,
712 (%.c: ../regformats/i386/%.dat,
713 (%.c: ../regformats/rs6000/%.dat): New rules.
714 (aarch64.c): Remove.
715 (reg-arm.c): Remove.
716 (arm-with-iwmmxt.c): Remove.
717 (arm-with-vfpv2.c): Remove.
718 (arm-with-vfpv3.c): Remove.
719 (arm-with-neon.c): Remove.
720 (reg-bfin.c): Remove.
721 (reg-cris.c): Remove.
722 (reg-crisv32.c): Remove.
723 (i386.c): Remove.
724 (i386-linux.c): Remove.
725 (i386-avx.c): Remove.
726 (i386-avx-linux.c): Remove.
727 (i386-avx-avx512.c): Remove.
728 (i386-avx-avx512-linux.c): Remove.
729 (i386-mpx.c): Remove.
730 (i386-mpx-linux.c): Remove.
731 (i386-avx-mpx-avx512-pku.c): Remove.
732 (i386-avx-mpx-avx512-pku-linux.c): Remove.
733 (i386-avx-mpx.c): Remove.
734 (i386-avx-mpx-linux.c): Remove.
735 (i386-mmx.c): Remove.
736 (i386-mmx-linux.c): Remove.
737 (reg-ia64.c): Remove.
738 (reg-m32r.c): Remove.
739 (reg-m68k.c): Remove.
740 (reg-cf.c): Remove.
741 (mips-linux.c): Remove.
742 (mips-dsp-linux.c): Remove.
743 (mips64-linux.c): Remove.
744 (mips64-dsp-linux.c): Remove.
745 (nios2-linux.c): Remove.
746 (powerpc-32.c): Remove.
747 (powerpc-32l.c): Remove.
748 (powerpc-altivec32l.c): Remove.
749 (powerpc-cell32l.c): Remove.
750 (powerpc-vsx32l.c): Remove.
751 (powerpc-isa205-32l.c): Remove.
752 (powerpc-isa205-altivec32l.c): Remove.
753 (powerpc-isa205-vsx32l.c): Remove.
754 (powerpc-e500l.c): Remove.
755 (powerpc-64l.c): Remove.
756 (powerpc-altivec64l.c): Remove.
757 (powerpc-cell64l.c): Remove.
758 (powerpc-vsx64l.c): Remove.
759 (powerpc-isa205-64l.c): Remove.
760 (powerpc-isa205-altivec64l.c): Remove.
761 (powerpc-isa205-vsx64l.c): Remove.
762 (s390-linux32.c): Remove.
763 (s390-linux32v1.c): Remove.
764 (s390-linux32v2.c): Remove.
765 (s390-linux64.c): Remove.
766 (s390-linux64v1.c): Remove.
767 (s390-linux64v2.c): Remove.
768 (s390-te-linux64.c): Remove.
769 (s390-vx-linux64.c): Remove.
770 (s390-tevx-linux64.c): Remove.
771 (s390x-linux64.c): Remove.
772 (s390x-linux64v1.c): Remove.
773 (s390x-linux64v2.c): Remove.
774 (s390x-te-linux64.c): Remove.
775 (s390x-vx-linux64.c): Remove.
776 (s390x-tevx-linux64.c): Remove.
777 (tic6x-c64xp-linux.c): Remove.
778 (tic6x-c64x-linux.c): Remove.
779 (tic6x-c62x-linux.c): Remove.
780 (reg-sh.c): Remove.
781 (reg-sparc64.c): Remove.
782 (reg-spu.c): Remove.
783 (amd64.c): Remove.
784 (amd64-linux.c): Remove.
785 (amd64-avx.c): Remove.
786 (amd64-avx-linux.c): Remove.
787 (amd64-avx-avx512.c): Remove.
788 (amd64-avx-avx512-linux.c): Remove.
789 (amd64-mpx.c): Remove.
790 (amd64-mpx-linux.c): Remove.
791 (amd64-avx-mpx-avx512-pku.c): Remove.
792 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
793 (amd64-avx-mpx.c): Remove.
794 (amd64-avx-mpx-linux.c): Remove.
795 (x32.c): Remove.
796 (x32-linux.c): Remove.
797 (x32-avx.c): Remove.
798 (x32-avx-linux.c): Remove.
799 (x32-avx-avx512.c): Remove.
800 (x32-avx-avx512-linux.c): Remove.
801 (reg-xtensa.c): Remove.
802 (reg-tilegx.c): Remove.
803 (reg-tilegx32.c): Remove.
804
1672e0d9
SDJ
8052017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
806
807 * Makefile.in (SFILES): Add "common/environ.c".
808 (OBJS): Add "common/environ.h".
809
239b6d10
WT
8102017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
811
812 * configure.ac: Check if the fs_base and gs_base members of
813 `struct user_regs_struct' exist.
814 * config.in: Regenerated.
815 * configure: Likewise.
816
694b382c
AT
8172017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
818
819 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
820 target_read_memory.
821 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
822 (get_next_pcs_syscall_next_pc): Likewise.
823
7dc53023
LM
8242016-12-23 Luis Machado <lgustavo@codesourcery.com>
825
826 * win32-i386-low.c: Fix incorrect reference to a couple source files.
827 * nto-x86-low.c: Likewise.
828
ad02e4fe
SM
8292016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
830
831 * Makefile.in: Include disable-implicit-rules.mk.
832
dcb07cfa
PA
8332016-11-23 Pedro Alves <palves@redhat.com>
834
835 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
836 (debug_vprintf): Use std::chrono::steady_clock instead of
837 gettimeofday. Use '.' instead of ':'.
838 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
839 (get_timestamp): Use std::chrono::steady_clock instead of
840 gettimeofday.
841
8629c02c
SM
8422016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * Makefile.in: Fix whitespace formatting.
845
b593ecca
SM
8462016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
847
848 * Makefile.in (SFILES, OBS): Flatten list and order
849 alphabetically.
850
9986ba08
PA
8512016-11-23 Pedro Alves <palves@redhat.com>
852
853 * event-loop.c (handle_file_event): Use warning.
854 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
855 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
856 Use warning.
857
4eefa7bc
PA
8582016-11-23 Pedro Alves <palves@redhat.com>
859
860 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
861 output.
862 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
863 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
864 debug_printf and debug_flush for debug output.
865 * server.c (handle_general_set): Likewise.
866 * thread-db.c (try_thread_db_load): Use debug_printf for debug
867 output.
868
5443506e
SM
8692016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
870
871 * Makefile.in (.c.o): Replace rule with ...
872 (%.o: %.c): ... this one.
873
3b165252
SM
8742016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
875
876 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
877 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
878 make.
879 * configure.ac: Remove checks for the make program.
880 * configure: Re-generate.
881
0bcda685
PA
8822016-10-28 Pedro Alves <palves@redhat.com>
883
884 * Makefile.in (CXX_DIALECT): Get from configure.
885 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
886 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
887 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
888 * config.in: Regenerate.
889 * configure: Regenerate.
890
c3805894
YQ
8912016-10-27 Yao Qi <yao.qi@linaro.org>
892
893 * linux-low.c (linux_supports_range_stepping): Return true if
894 can_software_single_step return true.
895
89342618
YQ
8962016-10-27 Yao Qi <yao.qi@linaro.org>
897
898 * inferiors.c (find_inferior_in_random): New function.
899 * inferiors.h (find_inferior_in_random): Declare.
900 * linux-low.c (linux_wait_for_event_filtered): Call
901 find_inferior_in_random instead of find_inferior.
902
e3652c84
YQ
9032016-10-27 Yao Qi <yao.qi@linaro.org>
904
905 * linux-low.c (linux_wait_1): If single-step breakpoints are
906 inserted, remove them.
907
5a04c4cf
PA
9082016-10-26 Pedro Alves <palves@redhat.com>
909
910 * linux-low.c (handle_extended_wait): Link parent/child fork
911 threads.
912 (linux_wait_1): Unlink them.
913 (linux_set_resume_request): Ignore resume requests for
914 already-resumed and unhandled fork child threads.
915 * linux-low.h (struct lwp_info) <fork_relative>: New field.
916 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
917 New functions.
918 (handle_v_requests) <vCont>: Don't call require_running.
919 * server.h (in_queued_stop_replies): New declaration.
920
cb93dc7f
YQ
9212016-10-24 Yao Qi <yao.qi@linaro.org>
922
923 PR server/20733
924 * linux-aarch64-low.c (append_insns): Cast the return value to
925 'uint32_t *'.
926
a1078bea
YQ
9272016-10-10 Yao Qi <yao.qi@linaro.org>
928
929 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
930
1fb77080
SDJ
9312016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
932
933 * target.c (target_supports_multi_process): New function, moved
934 from...
935 * target.h (target_supports_multi_process): ... here. Remove
936 macro.
937
39b5a3b9
TT
9382016-10-05 Tom Tromey <tom@tromey.com>
939
940 PR remote/20655:
941 * tracepoint.c (handle_tracepoint_bkpts): Check
942 ipa_error_tracepoint, not ipa_stopping_tracepoint.
943
c1d0b70a
YQ
9442016-10-05 Yao Qi <yao.qi@linaro.org>
945
946 * configure.srv: Update the path of arm-*.xml files.
947
0a69eedb
YQ
9482016-10-05 Terry Guo <terry.guo@arm.com>
949 Yao Qi <yao.qi@linaro.org>
950
951 * Makefile.in: Adjust the path of rules.
952 * configure.srv: Update the path of xml files.
953 * regformats/arm-with-iwmmxt.dat: Regenerated.
954 * regformats/arm-with-neon.dat: Likewise.
955 * regformats/arm-with-vfpv2.dat: Likewise.
956 * regformats/arm-with-vfpv3.dat Likewise.
957
17e16485
YQ
9582016-09-30 Yao Qi <yao.qi@linaro.org>
959
960 PR gdbserver/20627
961 * target.c (target_stop_and_wait): Don't call
962 target_continue_no_signal, use resume_stop instead.
963
edeeb602
YQ
9642016-09-26 Yao Qi <yao.qi@linaro.org>
965
966 * linux-low.c (linux_wait_1): Call debug_exit.
967
503b1c39
PA
9682016-09-23 Pedro Alves <palves@redhat.com>
969
970 * Makefile.in (SFILES): Add common/new-op.c.
971 (OBS): Add common/new-op.o.
972 (new-op.o): New rule.
973
74172ecf
SM
9742016-09-21 Simon Marchi <simon.marchi@ericsson.com>
975
976 * .gitinore: Ignore more files.
977
fc6cda2e
YQ
9782016-09-21 Yao Qi <yao.qi@linaro.org>
979
980 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
981 23.
982
bc1e6c81
SDJ
9832016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
984
985 * server.c (start_inferior): Call target_mourn_inferior instead of
986 mourn_inferior; pass ptid_t argument to it.
987 (resume): Likewise.
988 (handle_target_event): Likewise.
989 * target.c (target_mourn_inferior): New function.
990 * target.h (mourn_inferior): Delete macro.
991
0e00e962
AA
9922016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
993
994 * linux-low.c (lwp_is_stepping): New function.
995
1d8cb77d
CL
9962016-09-06 Carl Love <cel@us.ibm.com>
997
998 * server.c (start_inferior): Fixed comment, requested comment change
999 didn't get updated correctly. Removed reference to ptrace () call as
1000 it is only true on Linux systems.
1001
7313bced
CL
10022016-09-06 Carl Love <cel@us.ibm.com>
1003
1004 * server.c (start_inferior): Do not call
1005 function target_post_create_inferior () if the
1006 inferior process has already exited.
1007
cf6de44d
PA
10082016-09-05 Pedro Alves <palves@redhat.com>
1009
1010 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1011 (COMPILE.pre, CC_LD): Use CXX directly.
1012 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1013 * acinclude.m4: Don't include build-with-cxx.m4.
1014 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1015 * configure: Regenerate.
1016
c1da6748
AT
10172016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1018
1019 PR gdb/19495
1020 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1021 call writing data to own_buf.
1022
f2b9e3df
SDJ
10232016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1024
1025 * target.c (mywait): Call target_wait instead of
1026 the_target->wait.
1027 (target_wait): New function.
1028
049a8570
SDJ
10292016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1030
1031 * server.c (start_inferior): New variable 'ptid'. Replace calls
1032 to the_target->resume by target_continue{,_no_signal}, depending
1033 on the case.
1034 * target.c (target_stop_and_wait): Call target_continue_no_signal
1035 instead of the_target->resume.
1036 (target_continue): New function.
1037
3aa5cfa0
AT
10382016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1039
1040 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1041
754653a7
AZ
10422016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1043
1044 PR server/20491
1045 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1046 ps_prochandle.
1047 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1048 * linux-arm-low.c (ps_get_thread_area): Likewise.
1049 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1050 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1051 * linux-mips-low.c (ps_get_thread_area): Likewise.
1052 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1053 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1054 * linux-x86-low.c (ps_get_thread_area): Likewise.
1055 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1056
ed036b40
PA
10572016-08-19 Pedro Alves <palves@redhat.com>
1058
1059 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1060
c8ef42ee
PA
10612016-08-19 Pedro Alves <palves@redhat.com>
1062
1063 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1064 comment. Use memcpy instead of casting through unsigned long.
1065
9c235a72
PA
10662016-08-19 Pedro Alves <palves@redhat.com>
1067
1068 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1069 allocating around 0x80000000.
1070
201506da
PA
10712016-08-19 Pedro Alves <palves@redhat.com>
1072
1073 PR gdb/20415
1074 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1075 (x32-avx512-linux-ipa.o): New rules.
1076 * configure.ac (x86_64-*-linux*): New x32 check.
1077 * configure.srv (ipa_x32_linux_regobj): New.
1078 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1079 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1080 descriptions.
1081 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1082 descriptions.
1083 * configure: Regenerate.
1084
f348d89a
PA
10852016-08-09 Pedro Alves <palves@redhat.com>
1086
1087 PR gdb/18653
1088 * Makefile.in (OBS): Add signals-state-save-restore.o.
1089 (signals-state-save-restore.o): New rule.
1090 * config.in: Regenerate.
1091 * configure: Regenerate.
1092 * linux-low.c: Include "signals-state-save-restore.h".
1093 (linux_create_inferior): Call
1094 restore_original_signals_state.
1095 * server.c: Include "dispositions-save-restore.h".
1096 (captured_main): Call save_original_signals_state.
1097
1baf5149
PA
10982016-08-05 Pedro Alves <palves@redhat.com>
1099
1100 * configure: Regenerate.
1101
fcd4a73d
YQ
11022016-08-04 Yao Qi <yao.qi@linaro.org>
1103
1104 * linux-low.c (regsets_fetch_inferior_registers): Check
1105 errno is ESRCH or not.
1106
979659d0
YQ
11072016-08-02 Yao Qi <yao.qi@linaro.org>
1108
1109 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1110 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1111 (thread_db_load_search): Update.
1112 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1113 td_ta_set_event and td_ta_event_getmsg.
1114
6598661d
PA
11152016-07-26 Pedro Alves <palves@redhat.com>
1116
1117 PR server/20414
1118 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1119 of unsigned long for 64-bit registers and use uint32_t instead of
1120 unsigned int for 32-bit registers.
1121
9cf12d57
PA
11222016-07-26 Pedro Alves <palves@redhat.com>
1123
1124 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1125 to 'ptrace'.
1126
305450ed
TT
11272016-07-21 Tom Tromey <tom@tromey.com>
1128
1129 * configure: Rebuild.
1130
2583da7c
YQ
11312016-07-21 Yao Qi <yao.qi@linaro.org>
1132
1133 * mem-break.c (find_gdb_breakpoint): Cast bp to
1134 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1135
21536b36
YQ
11362016-07-21 Yao Qi <yao.qi@linaro.org>
1137
1138 * server.c (handle_v_requests): Support s and S actions
1139 if target_supports_software_single_step return true.
1140
8901d193
YQ
11412016-07-21 Yao Qi <yao.qi@linaro.org>
1142
1143 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1144 is resume_step, call maybe_hw_step.
1145 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1146 and unstop them.
1147 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1148 breakpoints or not.
1149 (proceed_one_lwp): If resume request is resume_step, install
1150 reinsert breakpoints and call maybe_hw_step.
1151
0e9a339e
YQ
11522016-07-21 Yao Qi <yao.qi@linaro.org>
1153
1154 * linux-low.c (proceed_one_lwp): Declare.
1155 (linux_resume_one_thread): Remove local variable 'step'.
1156 Lift code enqueue signal. Call proceed_one_lwp instead of
1157 linux_resume_one_lwp.
1158
4281b351
YQ
11592016-07-21 Yao Qi <yao.qi@linaro.org>
1160
1161 * linux-low.c (linux_resume_one_thread): Call
1162 enqueue_pending_signal.
1163
984a2c04
YQ
11642016-07-21 Yao Qi <yao.qi@linaro.org>
1165
1166 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1167 * inferiors.c (do_restore_current_thread_cleanup): New function.
1168 (make_cleanup_restore_current_thread): Likewise.
1169 * linux-low.c (install_software_single_step_breakpoints): Call
1170 make_cleanup_restore_current_thread. Switch current_thread to
1171 thread.
1172
bec903c9
YQ
11732016-07-21 Yao Qi <yao.qi@linaro.org>
1174
1175 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1176 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1177 (clone_one_breakpoint): Likewise.
1178 (delete_reinsert_breakpoints): Change parameter to thread.
1179 Callers updated.
1180 (has_reinsert_breakpoints): Likewise.
1181 (uninsert_reinsert_breakpoints): Likewise.
1182 (reinsert_reinsert_breakpoints): Likewise.
1183 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1184 (delete_reinsert_breakpoints): Likewise.
1185 (reinsert_reinsert_breakpoints): Likewise.
1186 (uninsert_reinsert_breakpoints): Likewise.
1187 (has_reinsert_breakpoints): Likewise.
1188
63c40ec7
YQ
11892016-07-21 Yao Qi <yao.qi@linaro.org>
1190
1191 * inferiors.c (get_thread_process): Make parameter const.
1192 * inferiors.h (get_thread_process): Update declaration.
1193 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1194 Add new parameters child_thread and parent_thread. Callers
1195 updated.
1196 * mem-break.h (clone_all_breakpoints): Update declaration.
1197
9aa76cd0
YQ
11982016-07-21 Yao Qi <yao.qi@linaro.org>
1199
1200 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1201 <command_list, handler>: Remove.
1202 (struct gdb_breakpoint): New.
1203 (struct other_breakpoint): New.
1204 (struct reinsert_breakpoint): New.
1205 (is_gdb_breakpoint): New function.
1206 (any_persistent_commands): Update command_list if
1207 is_gdb_breakpoint returns true.
1208 (set_breakpoint): Create breakpoints according to their types.
1209 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1210 (set_gdb_breakpoint_1): Likewise.
1211 (set_gdb_breakpoint): Likewise.
1212 (clear_breakpoint_conditions): Change parameter type to
1213 'struct gdb_breakpoint *'.
1214 (clear_breakpoint_commands): Likewise.
1215 (clear_breakpoint_conditions_and_commands): Likewise.
1216 (add_condition_to_breakpoint): Likewise.
1217 (add_breakpoint_condition): Likewise.
1218 (add_commands_to_breakpoint): Likewise.
1219 (check_breakpoints): Check other_breakpoint.
1220 (clone_one_breakpoint): Clone breakpopint according to its type.
1221 * mem-break.h (struct gdb_breakpoint): Declare.
1222 (set_gdb_breakpoint): Update declaration.
1223 (clear_breakpoint_conditions_and_commands): Likewise.
1224 (add_breakpoint_condition): Likewise.
1225 (add_breakpoint_commands): Likewise.
1226 * server.c (process_point_options): Change parameter type to
1227 'struct gdb_breakpoint *'.
1228
811f8301
YQ
12292016-07-21 Yao Qi <yao.qi@linaro.org>
1230
1231 * mem-break.c (set_breakpoint_at): Rename it to ...
1232 (set_breakpoint_type_at): ... it.
1233 (set_breakpoint_at): Call set_breakpoint_type_at.
1234 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1235 * mem-break.h (set_breakpoint_at): Update comments.
1236
b1c51e36
CLT
12372016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1238
1239 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1240 to buf parameter.
1241 (nios2_store_gregset): Likewise.
1242
ced2dffb
PA
12432016-07-01 Pedro Alves <palves@redhat.com>
1244 Antoine Tremblay <antoine.tremblay@ericsson.com>
1245
1246 * linux-low.c: Change interface to take the target lwp_info
1247 pointer directly and return void. Handle detaching from a zombie
1248 thread.
1249 (linux_detach_lwp_callback): New function.
1250 (linux_detach): Detach from the leader thread after detaching from
1251 the clone threads.
1252
2ac09a5b
YQ
12532016-06-28 Yao Qi <yao.qi@linaro.org>
1254
1255 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1256 for variable new_offset.
1257 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1258 (aarch64_ftrace_insn_reloc_cb): Likewise.
1259 (aarch64_ftrace_insn_reloc_tb): Likewise.
1260 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1261 PRIx64 instead of PRIx32.
1262
79e7fd4f
YQ
12632016-06-28 Yao Qi <yao.qi@linaro.org>
1264
1265 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1266 (the_low_target): Install arm_get_syscall_trapinfo.
1267
061fc021
YQ
12682016-06-28 Yao Qi <yao.qi@linaro.org>
1269
1270 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1271 function.
1272 (the_low_target): Install aarch64_get_syscall_trapinfo.
1273
4cc32bec
YQ
12742016-06-28 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1277 Callers updated.
1278 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1279 Remove parameter sysno.
1280 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1281 sysret.
1282
782c1122
AA
12832016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1284
1285 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1286 (s390_emit_ne_goto): Likewise.
1287 (s390_emit_lt_goto): Likewise.
1288 (s390_emit_le_goto): Likewise.
1289 (s390_emit_gt_goto): Likewise.
1290 (s390_emit_ge_goto): Likewise.
1291 (s390x_emit_eq_goto): Likewise.
1292 (s390x_emit_ne_goto): Likewise.
1293 (s390x_emit_lt_goto): Likewise.
1294 (s390x_emit_le_goto): Likewise.
1295 (s390x_emit_gt_goto): Likewise.
1296 (s390x_emit_ge_goto): Likewise.
1297 (s390_emit_ops_impl): Mark variable static.
1298 (s390x_emit_ops): Likewise.
1299
2e7b624b
YQ
13002016-06-17 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-low.c (handle_extended_wait): Call
1303 uninsert_reinsert_breakpoints for the parent process. Remove
1304 reinsert breakpoints from the child process. Reinsert them to
1305 the parent process when vfork is done.
1306 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1307 (reinsert_reinsert_breakpoints): New function.
1308 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1309 (reinsert_reinsert_breakpoints): Declare.
1310
8a81c5d7
YQ
13112016-06-17 Yao Qi <yao.qi@linaro.org>
1312
1313 * linux-low.c (handle_extended_wait): If the parent is doing
1314 step-over, remove the reinsert breakpoints from the forked child.
1315
f50bf8e5
YQ
13162016-06-17 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-low.c (unsuspend_all_lwps): Declare.
1319 (linux_low_filter_event): If thread exited, call finish_step_over.
1320 If step-over is finished, unsuspend other threads.
1321
8376a3cb
YQ
13222016-06-17 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-low.c (linux_resume_one_lwp_throw): Assert
1325 has_reinsert_breakpoints returns false.
1326 * mem-break.c (delete_disabled_breakpoints): Assert
1327 bp type isn't reinsert_breakpoint.
1328
f79b145d
YQ
13292016-06-17 Yao Qi <yao.qi@linaro.org>
1330
1331 * linux-low.c (maybe_hw_step): New function.
1332 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1333 (finish_step_over): Switch current_thread to lwp temporarily,
1334 and assert has_reinsert_breakpoints returns true.
1335 (proceed_one_lwp): Call maybe_hw_step.
1336 * mem-break.c (has_reinsert_breakpoints): New function.
1337 * mem-break.h (has_reinsert_breakpoints): Declare.
1338
0ae534d2
JT
13392016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1340
1341 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1342
fcdad592
YQ
13432016-05-17 Yao Qi <yao.qi@linaro.org>
1344
1345 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1346 instead of find_inferior.
1347
9e784964
YQ
13482016-05-05 Yao Qi <yao.qi@linaro.org>
1349
1350 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1351 Initialize res to zero.
1352
cf2ebb6e
YQ
13532016-05-05 Yao Qi <yao.qi@linaro.org>
1354
1355 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1356 to uint32_t.
1357
c1aebf87
UW
13582016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1359
1360 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1361 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1362 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1363
35fd2deb 13642016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1365 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1366
1367 * tracepoint.c (write_inferior_int8): New function.
1368 (cmd_qtenable_disable): Write enable flag using
1369 write_inferior_int8.
1370
484b3c32
YQ
13712016-04-25 Yao Qi <yao.qi@linaro.org>
1372
1373 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1374 (need_step_over_p): Return zero if the LWP has pending signals
1375 can be delivered on software single step target.
1376
85ba7d86
YQ
13772016-04-25 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1380 return instead of error.
1381
3539aa13
YQ
13822016-04-22 Yao Qi <yao.qi@linaro.org>
1383
1384 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1385 to 23.
1386
5b061e98
YQ
13872016-04-22 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1390 signal when stepping over breakpoint with software single
1391 step.
1392
3451269c
PA
13932016-04-21 Pedro Alves <palves@redhat.com>
1394
1395 * linux-s390-low.c (s390_collect_ptrace_register)
1396 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1397 add casts.
1398 (s390_check_regset): Use void * instead of gdb_byte *.
1399
a2358508
PA
14002016-04-20 Pedro Alves <palves@redhat.com>
1401
1402 * configure: Renegerate.
1403
6885166d
YQ
14042016-04-20 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1407 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1408 number 16.
1409 (arm_store_gregset): Likewise.
1410
2b863f51
WT
14112016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1412
1413 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1414 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1415 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1416 (amd64-avx-mpx-linux.c): New rules.
1417 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1418 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1419 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1420 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1421 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1422 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1423 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1424 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1425 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1426 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1427 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1428 * linux-x86-low.c (x86_linux_read_description): Add case for
1429 X86_XSTATE_AVX_MPX_MASK.
1430 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1431 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1432 init_registers_i386_avx_mpx_linux.
1433 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1434 (initialize_low_tracepoint): Call
1435 init_registers_i386_avx_mpx_linux.
1436 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1437 (initialize_low_tracepoint): Call
1438 init_registers_amd64_avx_mpx_linux.
1439 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1440 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1441 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1442 declarations.
1443
9b30624b
PA
14442016-04-18 Pedro Alves <palves@redhat.com>
1445
1446 * configure: Regenerate.
1447
45e3745e
AT
14482016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1449
1450 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1451 (aarch64_emit_sub): Likewise.
1452
2afc13ff
PA
14532016-04-12 Pedro Alves <palves@redhat.com>
1454
1455 * utils.c (prepare_to_throw_exception): Delete.
1456
6e774b13
SM
14572016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1460
4dca19f8
MK
14612016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1462
1463 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1464
d0a9981f
MK
14652016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1466
1467 * linux-aarch64-ipa.c: Add <elf.h> include.
1468 * linux-ppc-ipa.c: Add <elf.h> include.
1469 * linux-s390-ipa.c: Add <elf.h> include.
1470
252db07e
MK
14712016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1472
1473 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1474 (get_raw_reg_ptr): Likewise.
1475 (get_trace_state_variable_value_ptr): Likewise.
1476 (set_trace_state_variable_value_ptr): Likewise.
1477 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1478 char *.
1479
14e2b6d9
MK
14802016-03-31 Wei-cheng Wang <cole945@gmail.com>
1481 Marcin Kościelnicki <koriakin@0x04.net>
1482
1483 PR/17221
1484 * linux-ppc-low.c (emit_insns): New function.
1485 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1486 (ppc_emit_prologue): New function.
1487 (ppc_emit_epilogue): New function.
1488 (ppc_emit_add): New function.
1489 (ppc_emit_sub): New function.
1490 (ppc_emit_mul): New function.
1491 (ppc_emit_lsh): New function.
1492 (ppc_emit_rsh_signed): New function.
1493 (ppc_emit_rsh_unsigned): New function.
1494 (ppc_emit_ext): New function.
1495 (ppc_emit_zero_ext): New function.
1496 (ppc_emit_log_not): New function.
1497 (ppc_emit_bit_and): New function.
1498 (ppc_emit_bit_or): New function.
1499 (ppc_emit_bit_xor): New function.
1500 (ppc_emit_bit_not): New function.
1501 (ppc_emit_equal): New function.
1502 (ppc_emit_less_signed): New function.
1503 (ppc_emit_less_unsigned): New function.
1504 (ppc_emit_ref): New function.
1505 (ppc_emit_const): New function.
1506 (ppc_emit_reg): New function.
1507 (ppc_emit_pop): New function.
1508 (ppc_emit_stack_flush): New function.
1509 (ppc_emit_swap): New function.
1510 (ppc_emit_stack_adjust): New function.
1511 (ppc_emit_call): New function.
1512 (ppc_emit_int_call_1): New function.
1513 (ppc_emit_void_call_2): New function.
1514 (ppc_emit_if_goto): New function.
1515 (ppc_emit_goto): New function.
1516 (ppc_emit_eq_goto): New function.
1517 (ppc_emit_ne_goto): New function.
1518 (ppc_emit_lt_goto): New function.
1519 (ppc_emit_le_goto): New function.
1520 (ppc_emit_gt_goto): New function.
1521 (ppc_emit_ge_goto): New function.
1522 (ppc_write_goto_address): New function.
1523 (ppc_emit_ops_impl): New static variable.
1524 (ppc64v1_emit_prologue): New function.
1525 (ppc64v2_emit_prologue): New function.
1526 (ppc64_emit_epilogue): New function.
1527 (ppc64_emit_add): New function.
1528 (ppc64_emit_sub): New function.
1529 (ppc64_emit_mul): New function.
1530 (ppc64_emit_lsh): New function.
1531 (ppc64_emit_rsh_signed): New function.
1532 (ppc64_emit_rsh_unsigned): New function.
1533 (ppc64_emit_ext): New function.
1534 (ppc64_emit_zero_ext): New function.
1535 (ppc64_emit_log_not): New function.
1536 (ppc64_emit_bit_and): New function.
1537 (ppc64_emit_bit_or): New function.
1538 (ppc64_emit_bit_xor): New function.
1539 (ppc64_emit_bit_not): New function.
1540 (ppc64_emit_equal): New function.
1541 (ppc64_emit_less_signed): New function.
1542 (ppc64_emit_less_unsigned): New function.
1543 (ppc64_emit_ref): New function.
1544 (ppc64_emit_const): New function.
1545 (ppc64v1_emit_reg): New function.
1546 (ppc64v2_emit_reg): New function.
1547 (ppc64_emit_pop): New function.
1548 (ppc64_emit_stack_flush): New function.
1549 (ppc64_emit_swap): New function.
1550 (ppc64v1_emit_call): New function.
1551 (ppc64v2_emit_call): New function.
1552 (ppc64v1_emit_int_call_1): New function.
1553 (ppc64v2_emit_int_call_1): New function.
1554 (ppc64v1_emit_void_call_2): New function.
1555 (ppc64v2_emit_void_call_2): New function.
1556 (ppc64_emit_if_goto): New function.
1557 (ppc64_emit_eq_goto): New function.
1558 (ppc64_emit_ne_goto): New function.
1559 (ppc64_emit_lt_goto): New function.
1560 (ppc64_emit_le_goto): New function.
1561 (ppc64_emit_gt_goto): New function.
1562 (ppc64_emit_ge_goto): New function.
1563 (ppc64v1_emit_ops_impl): New static variable.
1564 (ppc64v2_emit_ops_impl): New static variable.
1565 (ppc_emit_ops): New function.
1566 (linux_low_target): Wire in ppc_emit_ops.
1567
a2174ba4
MK
15682016-03-31 Wei-cheng Wang <cole945@gmail.com>
1569 Marcin Kościelnicki <koriakin@0x04.net>
1570
1571 PR/17221
1572 * Makefile.in: Add powerpc-*-ipa.o
1573 * configure.srv: Add ipa_obj for powerpc*-linux.
1574 * linux-ppc-ipa.c: New file.
1575 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1576 includes.
1577 (PPC_FIELD): New macro.
1578 (PPC_SEXT): New macro.
1579 (PPC_OP6): New macro.
1580 (PPC_BO): New macro.
1581 (PPC_LI): New macro.
1582 (PPC_BD): New macro.
1583 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1584 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1585 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1586 (ppc_get_thread_area): New function.
1587 (is_elfv2_inferior): New function.
1588 (gen_ds_form): New function.
1589 (GEN_STD): New macro.
1590 (GEN_STDU): New macro.
1591 (GEN_LD): New macro.
1592 (GEN_LDU): New macro.
1593 (gen_d_form): New function.
1594 (GEN_ADDI): New macro.
1595 (GEN_ADDIS): New macro.
1596 (GEN_LI): New macro.
1597 (GEN_LIS): New macro.
1598 (GEN_ORI): New macro.
1599 (GEN_ORIS): New macro.
1600 (GEN_LWZ): New macro.
1601 (GEN_STW): New macro.
1602 (GEN_STWU): New macro.
1603 (gen_xfx_form): New function.
1604 (GEN_MFSPR): New macro.
1605 (GEN_MTSPR): New macro.
1606 (GEN_MFCR): New macro.
1607 (GEN_MTCR): New macro.
1608 (GEN_SYNC): New macro.
1609 (GEN_LWSYNC): New macro.
1610 (gen_x_form): New function.
1611 (GEN_OR): New macro.
1612 (GEN_MR): New macro.
1613 (GEN_LWARX): New macro.
1614 (GEN_STWCX): New macro.
1615 (GEN_CMPW): New macro.
1616 (gen_md_form): New function.
1617 (GEN_RLDICL): New macro.
1618 (GEN_RLDICR): New macro.
1619 (gen_i_form): New function.
1620 (GEN_B): New macro.
1621 (GEN_BL): New macro.
1622 (gen_b_form): New function.
1623 (GEN_BNE): New macro.
1624 (GEN_LOAD): New macro.
1625 (GEN_STORE): New macro.
1626 (gen_limm): New function.
1627 (gen_atomic_xchg): New function.
1628 (gen_call): New function.
1629 (ppc_relocate_instruction): New function.
1630 (ppc_install_fast_tracepoint_jump_pad): New function.
1631 (ppc_get_min_fast_tracepoint_insn_len): New function.
1632 (ppc_get_ipa_tdesc_idx): New function.
1633 (the_low_target): Wire in the new functions.
1634 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1635 tdescs.
1636 * linux-ppc-tdesc.h: New file.
1637
a13c4696
MK
16382016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1639
1640 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1641 (alloc_jump_pad_buffer): New function.
1642 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1643 (alloc_jump_pad_buffer): New function.
1644 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1645 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1646 (alloc_jump_pad_buffer): New function.
1647 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1648 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1649 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1650 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1651
1cda1512
MK
16522016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1653
1654 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1655 * linux-amd64-ipa.c: Likewise.
1656 * linux-i386-ipa.c: Likewise.
1657 * linux-s390-ipa.c: Likewise.
1658 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1659 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1660 set_trace_state_variable_value_ptr.
1661 (struct ipa_sym_addresses): Likewise.
1662 (symbol_list): Likewise.
1663 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1664 accessing gdb_collect directly.
1665 (gdb_collect_ptr_type): New typedef.
1666 (get_raw_reg_ptr_type): New typedef.
1667 (get_trace_state_variable_value_ptr_type): New typedef.
1668 (set_trace_state_variable_value_ptr_type): New typedef.
1669 (gdb_collect_ptr): New global.
1670 (get_raw_reg_ptr): New global.
1671 (get_trace_state_variable_value_ptr): New global.
1672 (set_trace_state_variable_value_ptr): New global.
1673 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1674 accessing get_raw_reg directly.
1675 (get_get_tsv_func_addr): Likewise for
1676 get_trace_state_variable_value_ptr.
1677 (get_set_tsv_func_addr): Likewise for
1678 set_trace_state_variable_value_ptr.
1679 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1680
72fb5488
SM
16812016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1682
1683 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1684
28170b88
MK
16852016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1686
1687 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1688 packets.
1689 (relocate_instruction): Remove own_buf.
1690 * server.c (own_buf): Make global.
1691 (handle_v_requests): Make global.
1692 * server.h (own_buf): New declaration.
1693 (handle_v_requests): New prototype.
1694
f39e8743
MK
16952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1696
1697 PR 18377
1698 * linux-s390-low.c (add_insns): New function.
1699 (s390_emit_prologue): New function.
1700 (s390_emit_epilogue): New function.
1701 (s390_emit_add): New function.
1702 (s390_emit_sub): New function.
1703 (s390_emit_mul): New function.
1704 (s390_emit_lsh): New function.
1705 (s390_emit_rsh_signed): New function.
1706 (s390_emit_rsh_unsigned): New function.
1707 (s390_emit_ext): New function.
1708 (s390_emit_log_not): New function.
1709 (s390_emit_bit_and): New function.
1710 (s390_emit_bit_or): New function.
1711 (s390_emit_bit_xor): New function.
1712 (s390_emit_bit_not): New function.
1713 (s390_emit_equal): New function.
1714 (s390_emit_less_signed): New function.
1715 (s390_emit_less_unsigned): New function.
1716 (s390_emit_ref): New function.
1717 (s390_emit_if_goto): New function.
1718 (s390_emit_goto): New function.
1719 (s390_write_goto_address): New function.
1720 (s390_emit_litpool): New function.
1721 (s390_emit_const): New function.
1722 (s390_emit_call): New function.
1723 (s390_emit_reg): New function.
1724 (s390_emit_pop): New function.
1725 (s390_emit_stack_flush): New function.
1726 (s390_emit_zero_ext): New function.
1727 (s390_emit_swap): New function.
1728 (s390_emit_stack_adjust): New function.
1729 (s390_emit_set_r2): New function.
1730 (s390_emit_int_call_1): New function.
1731 (s390_emit_void_call_2): New function.
1732 (s390_emit_eq_goto): New function.
1733 (s390_emit_ne_goto): New function.
1734 (s390_emit_lt_goto): New function.
1735 (s390_emit_le_goto): New function.
1736 (s390_emit_gt_goto): New function.
1737 (s390_emit_ge_goto): New function.
1738 (s390x_emit_prologue): New function.
1739 (s390x_emit_epilogue): New function.
1740 (s390x_emit_add): New function.
1741 (s390x_emit_sub): New function.
1742 (s390x_emit_mul): New function.
1743 (s390x_emit_lsh): New function.
1744 (s390x_emit_rsh_signed): New function.
1745 (s390x_emit_rsh_unsigned): New function.
1746 (s390x_emit_ext): New function.
1747 (s390x_emit_log_not): New function.
1748 (s390x_emit_bit_and): New function.
1749 (s390x_emit_bit_or): New function.
1750 (s390x_emit_bit_xor): New function.
1751 (s390x_emit_bit_not): New function.
1752 (s390x_emit_equal): New function.
1753 (s390x_emit_less_signed): New function.
1754 (s390x_emit_less_unsigned): New function.
1755 (s390x_emit_ref): New function.
1756 (s390x_emit_if_goto): New function.
1757 (s390x_emit_const): New function.
1758 (s390x_emit_call): New function.
1759 (s390x_emit_reg): New function.
1760 (s390x_emit_pop): New function.
1761 (s390x_emit_stack_flush): New function.
1762 (s390x_emit_zero_ext): New function.
1763 (s390x_emit_swap): New function.
1764 (s390x_emit_stack_adjust): New function.
1765 (s390x_emit_int_call_1): New function.
1766 (s390x_emit_void_call_2): New function.
1767 (s390x_emit_eq_goto): New function.
1768 (s390x_emit_ne_goto): New function.
1769 (s390x_emit_lt_goto): New function.
1770 (s390x_emit_le_goto): New function.
1771 (s390x_emit_gt_goto): New function.
1772 (s390x_emit_ge_goto): New function.
1773 (s390_emit_ops): New function.
1774 (struct linux_target_ops): Fill in emit_ops hook.
1775
abd9baf9
MK
17762016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1777
1778 PR 18377
1779 * Makefile.in: Add s390 IPA files.
1780 * configure.srv: Build IPA for s390.
1781 * linux-s390-ipa.c: New file.
1782 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1783 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1784 (tdesc_s390_linux32): Likewise.
1785 (init_registers_s390_linux32v1): Likewise.
1786 (tdesc_s390_linux32v1): Likewise.
1787 (init_registers_s390_linux32v2): Likewise.
1788 (tdesc_s390_linux32v2): Likewise.
1789 (init_registers_s390_linux64): Likewise.
1790 (tdesc_s390_linux64): Likewise.
1791 (init_registers_s390_linux64v1): Likewise.
1792 (tdesc_s390_linux64v1): Likewise.
1793 (init_registers_s390_linux64v2): Likewise.
1794 (tdesc_s390_linux64v2): Likewise.
1795 (init_registers_s390_te_linux64): Likewise.
1796 (tdesc_s390_te_linux64): Likewise.
1797 (init_registers_s390_vx_linux64): Likewise.
1798 (tdesc_s390_vx_linux64): Likewise.
1799 (init_registers_s390_tevx_linux64): Likewise.
1800 (tdesc_s390_tevx_linux64): Likewise.
1801 (init_registers_s390x_linux64): Likewise.
1802 (tdesc_s390x_linux64): Likewise.
1803 (init_registers_s390x_linux64v1): Likewise.
1804 (tdesc_s390x_linux64v1): Likewise.
1805 (init_registers_s390x_linux64v2): Likewise.
1806 (tdesc_s390x_linux64v2): Likewise.
1807 (init_registers_s390x_te_linux64): Likewise.
1808 (tdesc_s390x_te_linux64): Likewise.
1809 (init_registers_s390x_vx_linux64): Likewise.
1810 (tdesc_s390x_vx_linux64): Likewise.
1811 (init_registers_s390x_tevx_linux64): Likewise.
1812 (tdesc_s390x_tevx_linux64): Likewise.
1813 (have_hwcap_s390_vx): New static variable.
1814 (s390_arch_setup): Fill have_hwcap_s390_vx.
1815 (s390_get_thread_area): New function.
1816 (s390_ft_entry_gpr_esa): New const.
1817 (s390_ft_entry_gpr_zarch): New const.
1818 (s390_ft_entry_misc): New const.
1819 (s390_ft_entry_fr): New const.
1820 (s390_ft_entry_vr): New const.
1821 (s390_ft_main_31): New const.
1822 (s390_ft_main_64): New const.
1823 (s390_ft_exit_fr): New const.
1824 (s390_ft_exit_vr): New const.
1825 (s390_ft_exit_misc): New const.
1826 (s390_ft_exit_gpr_esa): New const.
1827 (s390_ft_exit_gpr_zarch): New const.
1828 (append_insns): New function.
1829 (s390_relocate_instruction): New function.
1830 (s390_install_fast_tracepoint_jump_pad): New function.
1831 (s390_get_min_fast_tracepoint_insn_len): New function.
1832 (s390_get_ipa_tdesc_idx): New function.
1833 (struct linux_target_ops): Wire in the above functions.
1834 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1835 * linux-s390-tdesc.h: New file.
1836
a4105d04
MK
18372016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1838
1839 * linux-s390-low.c (s390_supports_tracepoints): New function.
1840 (struct linux_target_ops): Fill supports_tracepoints hook.
1841
35ac8b3e
YQ
18422016-03-18 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-low.c (lwp_signal_can_be_delivered): New function.
1845 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1846
94610ec4
YQ
18472016-03-18 Yao Qi <yao.qi@linaro.org>
1848
1849 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1850 0 if signal is enqueued. Remove 'signal' from one debugging
1851 message. Move one debugging message to some lines below.
1852 Remove code setting 'signal' to 0.
1853
80aea927
YQ
18542016-03-18 Yao Qi <yao.qi@linaro.org>
1855
1856 * linux-low.c (linux_low_filter_event): Remove redundant
1857 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1858
b04fd3be
MK
18592016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1860
1861 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1862 (struct linux_target_ops): Wire in the above.
1863
c40c8d4b
YQ
18642016-03-03 Yao Qi <yao.qi@linaro.org>
1865
1866 * linux-low.c: Update comments to start_step_over.
1867
0f8288ae
YQ
18682016-03-03 Yao Qi <yao.qi@linaro.org>
1869
1870 PR server/19736
1871 * linux-low.c (handle_extended_wait): Set child suspended
1872 if event_lwp->bp_reinsert isn't zero.
1873
fdbd04a8
YQ
18742016-03-02 Yao Qi <yao.qi@linaro.org>
1875
1876 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1877 enqueue_pending_signal.
1878
6896a8fa
MK
18792016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1880
1881 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1882 is actually loaded.
1883
ab503087
MK
18842016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1885
1886 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1887 (s390_regmap_3264) [!__s390x__]: New global.
1888 (s390_collect_ptrace_register): Skip map entries containing -1.
1889 (s390_supply_ptrace_register): Ditto.
1890 (s390_fill_gprs_high): New function.
1891 (s390_store_gprs_high): New function.
1892 (s390_regsets): Add NT_S390_HIGH_GPRS.
1893 (s390_get_hwcap): Enable on 31-bit.
1894 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1895 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1896 Detect NT_S390_HIGH_GPRS.
1897 (s390_usrregs_info_3264): Enable on 31-bit.
1898 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1899 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1900
ae91f625
MK
19012016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1902
1903 PR gdb/13808
1904 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1905 * configure.srv: Ditto.
1906 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1907 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1908 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1909 (init_registers_amd64_linux): Remove prototype.
1910 (tdesc_amd64_linux): Remove declaration.
1911 (get_ipa_tdesc): New function.
1912 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1913 initialize remaining tdescs.
1914 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1915 (init_registers_i386_linux): Remove prototype.
1916 (tdesc_i386_linux): Remove declaration.
1917 (get_ipa_tdesc): New function.
1918 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1919 initialize remaining tdescs.
1920 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1921 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1922 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1923 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1924 (x86_get_ipa_tdesc_idx): New function.
1925 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1926 * linux-x86-tdesc.h: New file.
1927 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1928 (target_get_ipa_tdesc_idx): New macro.
1929 * tracepoint.c (ipa_tdesc_idx): New macro.
1930 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1931 (symbol_list): Add ipa_tdesc_idx.
1932 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1933 (ipa_tdesc): Remove.
1934 (ipa_tdesc_idx): New variable.
1935 (get_context_regcache): Use get_ipa_tdesc.
1936 (gdb_collect): Ditto.
1937 (gdb_probe): Ditto.
1938 * tracepoint.h (get_ipa_tdesc): New prototype.
1939 (ipa_tdesc): Remove.
1940
e7ad2f14
PA
19412016-02-24 Pedro Alves <palves@redhat.com>
1942
1943 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1944 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1945 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1946 Factor out common code between the USE_SIGTRAP_SIGINFO and
1947 !USE_SIGTRAP_SIGINFO blocks.
1948 (linux_low_filter_event): Call save_stop_reason instead of
1949 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1950 Update comments.
1951 (linux_wait_1): Update comments.
1952
657f9cde
WW
19532016-02-24 Wei-cheng Wang <cole945@gmail.com>
1954
1955 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1956 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1957 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1958 ppc_insert_point, ppc_remove_point.
1959
b00b61e1
MK
19602016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1961
1962 * linux-s390-low.c (s390_supports_z_point_type): New function.
1963 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1964
553cb527
YQ
19652016-02-16 Yao Qi <yao.qi@linaro.org>
1966
1967 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1968 PC. Get pc from regcache_read_pc.
1969
a5652c21
YQ
19702016-02-12 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1973 or linux_get_pc_32bit.
1974 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1975
ed443b61
YQ
19762016-02-12 Yao Qi <yao.qi@linaro.org>
1977
1978 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1979 arm_linux_get_next_pcs_fixup.
1980
020ecd38
MK
19812016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1982
1983 * tracepoint.c (x_tracepoint_action_download): Change
1984 write_inferior_data_ptr to write_inferior_data_pointer.
1985 (cmd_qtstart): Likewise.
1986 (write_inferior_data_ptr): Remove.
1987 (download_agent_expr): Change write_inferior_data_ptr to
1988 write_inferior_data_pointer.
1989 (download_tracepoint_1): Likewise.
1990 (download_tracepoint): Likewise.
1991 (download_trace_state_variables): Likewise.
1992
7cae9051
WW
19932016-02-11 Wei-cheng Wang <cole945@gmail.com>
1994 Marcin Kościelnicki <koriakin@0x04.net>
1995
1996 * tracepoint.c (struct tracepoint_action_ops): Remove.
1997 (struct tracepoint_action): Remove ops.
1998 (m_tracepoint_action_download, r_tracepoint_action_download)
1999 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2000 size and offset accordingly.
2001 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2002 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2003 (tracepoint_action_send, tracepoint_action_download): New functions.
2004 Helpers for trace action handlers.
2005 (add_tracepoint_action): Remove setup actions ops.
2006 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2007
9f6a71b4
YQ
20082016-02-10 Yao Qi <yao.qi@linaro.org>
2009
2010 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2011
1e94266c
SM
20122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2015 to AC_OUTPUT.
2016 * configure: Regenerate.
2017
8adce034
SM
20182016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2019
2020 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2021 void * to gdb_byte *.
2022 * linux-low.c (siginfo_fixup): Likewise.
2023 (linux_xfer_siginfo): Likewise.
2024 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2025 Likewise.
2026 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2027
93813b37
WT
20282016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2029
2030 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2031 to srv_tgtobj.
2032 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2033 to srv_tgtobj.
2034 * linux-x86-low.c [__x86_64__]: Include
2035 "nat/amd64-linux-siginfo.h".
2036 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2037 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2038 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2039 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2040 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2041 (cpt_si_fd, si_timerid, si_overrun): Move from
2042 nat/amd64-linux-siginfo.c.
2043 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2044
8424cc97
SM
20452016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * server.c (skip_to_semicolon): Remove.
2048 (process_point_options): Use strchrnul instead of
2049 skip_to_semicolon.
2050
4d18591b
YQ
20512016-01-26 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2054 * linux-low.c (install_software_single_step_breakpoints): Don't
2055 call regcache_read_pc.
2056 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2057 argument pc.
2058
d8020970
YQ
20592016-01-26 Yao Qi <yao.qi@linaro.org>
2060
2061 * linux-low.c (install_software_single_step_breakpoints): Call
2062 regcache_read_pc instead of get_pc.
2063
8b207339
YQ
20642016-01-26 Yao Qi <yao.qi@linaro.org>
2065
2066 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2067 (unblock_async_io): Rename to ...
2068 (block_unblock_async_io): ... it. New function.
2069 (enable_async_io): Don't install SIGIO handler. Unblock it
2070 instead.
2071 (disable_async_io): Don't ignore SIGIO. Block it instead.
2072 (initialize_async_io): Install SIGIO handler. Don't call
2073 unblock_async_io.
2074
18879fef
YQ
20752016-01-26 Yao Qi <yao.qi@linaro.org>
2076
2077 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2078 first character is '\003', call *the_target->request_interrupt.
2079
a0f8e08a
YQ
20802016-01-25 Yao Qi <yao.qi@linaro.org>
2081
2082 * remote-utils.c (new_thread_notify): Remove.
2083 (dead_thread_notify): Likewise.
2084 * remote-utils.h (new_thread_notify): Remove declaration.
2085 (dead_thread_notify): Likewise.
2086
cc5fd9ab
MK
20872016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2088
2089 * gdb.trace/pending.exp: Fix expected message on continue.
2090
99e8eb11
MK
20912016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2092
2093 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2094 it works properly on big-endian machines where sizeof (CORE_ADDR)
2095 != sizeof (void *).
2096
a994041d
PA
20972016-01-21 Pedro Alves <palves@redhat.com>
2098
2099 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2100 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2101 * configure: Regenerate.
2102
f7a6a40d
YQ
21032016-01-21 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2106 is_thumb and set it according to CPSR saved on the stack.
2107 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2108 arm_sigreturn_next_pc.
2109
6f69e520
YQ
21102016-01-18 Yao Qi <yao.qi@linaro.org>
2111
2112 * linux-low.c (linux_set_pc_64bit): New function.
2113 (linux_get_pc_64bit): New function.
2114 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2115 Declare.
2116 * linux-sparc-low.c (debug_threads): Remove declaration.
2117 (sparc_get_pc): Remove.
2118 (the_low_target): Use linux_get_pc_64bit instead of
2119 sparc_get_pc.
2120 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2121 (the_low_target): Use linux_get_pc_64bit and
2122 linux_set_pc_64bit.
2123
276d4552
YQ
21242016-01-18 Yao Qi <yao.qi@linaro.org>
2125
2126 * linux-arm-low.c (debug_threads): Remove declaration.
2127 (arm_get_pc, arm_set_pc): Remove.
2128 (the_low_target): Use linux_get_pc_32bit and
2129 linux_set_pc_32bit.
2130 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2131 (the_low_target): Use linux_get_pc_32bit and
2132 linux_set_pc_32bit.
2133 * linux-cris-low.c (debug_threads): Remove declaration.
2134 (cris_get_pc, cris_set_pc,): Remove.
2135 (the_low_target): Use linux_get_pc_32bit and
2136 linux_set_pc_32bit.
2137 * linux-crisv32-low.c (debug_threads): Remove declaration.
2138 (cris_get_pc, cris_set_pc): Remove.
2139 (the_low_target): Use linux_get_pc_32bit and
2140 linux_set_pc_32bit.
2141 * linux-low.c: Include inttypes.h.
2142 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2143 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2144 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2145 (the_low_target): Use linux_get_pc_32bit and
2146 linux_set_pc_32bit.
2147 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2148 (the_low_target): Use linux_get_pc_32bit and
2149 linux_set_pc_32bit.
2150 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2151 (the_low_target): Use linux_get_pc_32bit and
2152 linux_set_pc_32bit.
2153 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2154 (the_low_target): Use linux_get_pc_32bit and
2155 linux_set_pc_32bit.
2156 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2157 (the_low_target): Use linux_get_pc_32bit and
2158 linux_set_pc_32bit.
2159
eb0edac8
GB
21602016-01-18 Gary Benson <gbenson@redhat.com>
2161
2162 * configure.ac (AC_FUNC_FORK): New check.
2163 * config.in: Regenerate.
2164 * configure: Likewise.
2165
1b451dda
YQ
21662016-01-14 Yao Qi <yao.qi@linaro.org>
2167
2168 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2169 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2170 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2171 arm_get_next_pcs_ctor.
2172
82075af2
JS
21732016-01-12 Josh Stone <jistone@redhat.com>
2174 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2175
2176 * inferiors.h: Include "gdb_vecs.h".
2177 (struct process_info): Add syscalls_to_catch.
2178 * inferiors.c (remove_process): Free syscalls_to_catch.
2179 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2180 syscall_return stops.
2181 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2182 * server.c (handle_general_set): Handle QCatchSyscalls.
2183 (handle_query): Report support for QCatchSyscalls.
2184 * target.h (struct target_ops): Add supports_catch_syscall.
2185 (target_supports_catch_syscall): New macro.
2186 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2187 (struct lwp_info): Add syscall_state.
2188 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2189 Maintain syscall_state and syscalls_to_catch across exec.
2190 (get_syscall_trapinfo): New function, proxy to the_low_target.
2191 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2192 (linux_low_filter_event): Toggle syscall_state entry/return for
2193 syscall traps, and set it ignored for all others.
2194 (gdb_catching_syscalls_p): New function.
2195 (gdb_catch_this_syscall_p): New function.
2196 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2197 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2198 (linux_supports_catch_syscall): New function.
2199 (linux_target_ops): Install it.
2200 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2201 (the_low_target): Install it.
2202
8f13a3ce
MF
22032016-01-12 Mike Frysinger <vapier@gentoo.org>
2204
2205 * acinclude.m4: Include new ../warning.m4 file.
2206 * configure: Regenerated.
2207 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2208
5b3da067
MF
22092016-01-12 Mike Frysinger <vapier@gentoo.org>
2210
2211 * ax.c (is_goto_target): Mark static.
2212 * linux-low.c (register_addr): Likewise.
2213 (linux_fetch_registers, linux_store_registers): Likewise.
2214 * mem-break.c (any_persistent_commands): Fix old prototype.
2215 (add_commands_to_breakpoint): Mark static.
2216 * regcache.c (find_register_by_name): Delete unused func.
2217 * remote-utils.c (hex_or_minus_one): Mark static.
2218 * server.c (monitor_show_help): Mark static.
2219 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2220 handle_v_requests): Likewise.
2221
bc504a31
PA
22222016-01-12 Pedro Alves <palves@redhat.com>
2223
2224 Remove use of the registered trademark symbol throughout.
2225
5a0dd67a
YQ
22262016-01-08 Yao Qi <yao.qi@linaro.org>
2227
2228 * remote-utils.c (getpkt): If c is '\003', call target hook
2229 request_interrupt.
2230
b2ca446f
YQ
22312016-01-06 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2234 linux-aarch32-low.c.
2235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2236 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2237 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2238 (thumb2_breakpoint): Declare.
2239 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2240 linux-aarch32-low.h.
2241 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2242 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2243 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2244
edd88788
JB
22452016-01-01 Joel Brobecker <brobecker@adacore.com>
2246
2247 * gdbreplay.c (gdbreplay_version): Change copyright year in
2248 version message.
2249 * server.c (gdbserver_version): Likewise.
2250
65da7f14
PP
22512015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2252
2253 * server.c (crc32_table): Delete.
2254 (crc32): Use libiberty's xcrc32 function.
2255
4abd5ed2
JB
22562015-12-22 Joel Brobecker <brobecker@adacore.com>
2257
2258 * lynx-low.c (lynx_delete_thread_callback): New function.
2259 (lynx_mourn): Properly delete our process and all of its
2260 threads. Remove call to clear_inferiors.
2261
0e50fe5c
JB
22622015-12-22 Joel Brobecker <brobecker@adacore.com>
2263
2264 * target.c (thread_search_callback): Add check that
2265 the thread_stopped target callback is not NULL before
2266 calling it.
2267
35adc03f
YQ
22682015-12-21 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2271 arm breakpoint.
2272
bd2b2909
AT
22732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2274
2275 * server.c (handle_query): Call target_supports_software_single_step.
2276
7fe5e27e
AT
22772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2278
2279 * linux-low.c (single_step): New function.
2280 (linux_resume_one_lwp_throw): Call single_step.
2281 (start_step_over): Likewise.
2282
d9311bfa
AT
22832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2284
2285 * Makefile.in (SFILES): Append arch/arm-linux.c,
2286 arch/arm-get-next-pcs.c.
2287 (arm-linux.o): New rule.
2288 (arm-get-next-pcs.o): New rule.
2289 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2290 arm-linux.o.
2291 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2292 to linux-aarch32-low.c.
2293 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2294 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2295 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2296 (thumb2_breakpoint_len): Likewise.
2297 (arm_is_thumb_mode): Make non-static.
2298 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2299 from linux-aarch32-low.c.
2300 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2301 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2302 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2303 (thumb2_breakpoint_len): Likewise.
2304 (arm_is_thumb_mode): New declaration.
2305 * linux-arm-low.c: Include arch/arm-linux.h
2306 aarch/arm-get-next-pcs.h, sys/syscall.h.
2307 (get_next_pcs_ops): New struct.
2308 (get_next_pcs_addr_bits_remove): New function.
2309 (get_next_pcs_is_thumb): New function.
2310 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2311 (arm_sigreturn_next_pc): Likewise.
2312 (get_next_pcs_syscall_next_pc): Likewise.
2313 (arm_gdbserver_get_next_pcs): Likewise.
2314 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2315 Initialize.
2316 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2317 * server.h: Include gdb_vecs.h.
2318
68ce2059
AT
23192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2320
2321 * Makefile.in (SFILES): Append common/common-regcache.c.
2322 (OBS): Append common-regcache.o.
2323 (common-regcache.o): New rule.
2324 * regcache.c (init_register_cache): Initialize cache to
2325 REG_UNAVAILABLE.
2326 (regcache_raw_read_unsigned): New function.
2327 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2328 register_status enum.
2329
fa5308bd
AT
23302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2331
2332 * linux-aarch64-low.c (the_low_targets): Rename
2333 breakpoint_reinsert_addr to get_next_pcs.
2334 * linux-arm-low.c (the_low_targets): Likewise.
2335 * linux-bfin-low.c (the_low_targets): Likewise.
2336 * linux-cris-low.c (the_low_targets): Likewise.
2337 * linux-crisv32-low.c (the_low_targets): Likewise.
2338 * linux-low.c (can_software_single_step): Likewise.
2339 (install_software_single_step_breakpoints): New function.
2340 (start_step_over): Use install_software_single_step_breakpoints.
2341 * linux-low.h: New CORE_ADDR vector.
2342 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2343 get_next_pcs.
2344 * linux-mips-low.c (the_low_targets): Likewise.
2345 * linux-nios2-low.c (the_low_targets): Likewise.
2346 * linux-sparc-low.c (the_low_targets): Likewise.
2347
4a6ed09b
PA
23482015-12-17 Pedro Alves <palves@redhat.com>
2349
2350 * linux-low.c (linux_kill_one_lwp): Remove references to
2351 LinuxThreads.
2352 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2353 to 'kill'.
2354 (linux_init_signals): Delete.
2355 (initialize_low): Adjust.
2356 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2357
7544db95
PA
23582015-12-16 Pedro Alves <palves@redhat.com>
2359
2360 * configure.ac (compiler warning flags): When testing a
2361 -Wno-foo option, check whether -Wfoo works instead.
2362 * configure: Regenerate.
2363
8020350c
DB
23642015-12-11 Don Breazeal <donb@codesourcery.com>
2365
2366 * server.c (process_serial_event): Don't exit from gdbserver
2367 in remote mode if there are still active inferiors.
2368
db91f502
YQ
23692015-12-11 Yao Qi <yao.qi@linaro.org>
2370
2371 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2372 arm_breakpoint_at if the process is 32-bit.
2373
b37a6290
YQ
23742015-12-11 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2377 arm breakpoint.
2378
17b1509a
YQ
23792015-12-07 Yao Qi <yao.qi@linaro.org>
2380
2381 * configure.srv: Append arm.o to srv_tgtobj for
2382 aarch64*-*-linux* target.
2383 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2384 from linux-arm-low.c.
2385 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2386 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2387 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2388 (thumb2_breakpoint_len): Likewise.
2389 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2390 (arm_breakpoint_kinds): Likewise.
2391 (arm_breakpoint_kind_from_pc): Likewise.
2392 (arm_sw_breakpoint_from_kind): Likewise.
2393 (arm_breakpoint_kind_from_current_state): Likewise.
2394 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2395 (arm_sw_breakpoint_from_kind): Declare.
2396 (arm_breakpoint_kind_from_current_state): Declare.
2397 (arm_breakpoint_at): Declare.
2398 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2399 arm_sw_breakpoint_from_kind if process is 32-bit.
2400 (aarch64_breakpoint_kind_from_pc): New function.
2401 (aarch64_breakpoint_kind_from_current_state): New function.
2402 (the_low_target): Initialize fields breakpoint_kind_from_pc
2403 and breakpoint_kind_from_current_state.
2404 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2405 linux-aarch32-low.c.
2406 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2407 (arm_breakpoint, arm_breakpoint_len): Likewise.
2408 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2409 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2410 (arm_is_thumb_mode): Likewise.
2411 (arm_breakpoint_at): Likewise.
2412 (arm_breakpoint_kind_from_pc): Likewise.
2413 (arm_sw_breakpoint_from_kind): Likewise.
2414 (arm_breakpoint_kind_from_current_state): Likewise.
2415
2416 Revert:
2417 2015-08-04 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2420 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2421 * server.c (extended_protocol): Remove "static".
2422 * server.h (extended_protocol): Declare it.
2423
ece66d65
JS
24242015-12-04 Josh Stone <jistone@redhat.com>
2425
2426 * target.h (struct target_ops) <arch_setup>: Rename to ...
2427 (struct target_ops) <post_create_inferior>: ... this.
2428 (target_arch_setup): Rename to ...
2429 (target_post_create_inferior): ... this, calling post_create_inferior.
2430 * server.c (start_inferior): Update target_arch_setup calls to
2431 target_post_create_inferior.
2432 * linux-low.c (linux_low_ptrace_options): Forward declare.
2433 (linux_arch_setup): Update its comment for general use.
2434 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2435 (struct linux_target_ops): Use linux_post_create_inferior.
2436 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2437 to post_create_inferior.
2438 * nto-low.c (struct nto_target_ops): Likewise.
2439 * spu-low.c (struct spu_target_ops): Likewise.
2440 * win32-low.c (struct win32_target_ops): Likewise.
2441
e58c48b4
AT
24422015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2443
2444 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2445
fbec8956
AT
24462015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2447
2448 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2449 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2450 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2451 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2452 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2453 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2454 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2455 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2456 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2457 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2458 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2459 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2460
9b4c5f87
AT
24612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2462
2463 * linux-low.c (linux_look_up_symbols): Don't call
2464 linux_supports_traceclone.
2465 * linux-low.h (thread_db_init): Remove use_events argument.
2466 * thread-db.c (thread_db_use_event): Remove global variable.
2467 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2468 (struct thread_db) <td_create_bp>: Remove field.
2469 (thread_db_create_event): Remove function.
2470 (thread_db_enable_reporting): Likewise.
2471 (find_one_thread): Don't check for thread_db_use_events.
2472 (attach_thread): Likewise.
2473 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2474 (try_thread_db_load_1): Don't check for thread_db_use_events.
2475 (thread_db_init): Remove use_events argument and thread events
2476 handling.
2477 (remove_thread_event_breakpoints): Remove function.
2478 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2479
7d00775e
AT
24802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2481
2482 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2483 New function.
2484 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2485 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2487 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2488 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2489 Initialize.
2490 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2491 New function.
2492 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2493 * linux-low.c (can_hardware_single_step): Use
2494 supports_hardware_single_step.
2495 (can_software_single_step): New function.
2496 (start_step_over): Call can_software_single_step.
2497 (linux_supports_hardware_single_step): New function.
2498 (struct target_ops) <supports_software_single_step>: Initialize.
2499 * linux-low.h (struct linux_target_ops)
2500 <supports_hardware_single_step>: Initialize.
2501 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2502 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2503 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2504 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2505 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2506 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2507 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2509 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2510 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2511 Initialize.
2512 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2513 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2514 Initialize.
2515 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2516 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2517 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2518 New function.
2519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2520 * target.h (struct target_ops): <supports_software_single_step>:
2521 New field.
2522 (target_supports_software_single_step): New macro.
2523
2d97cd35
AT
25242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2525
2526 * linux-low.c (linux_wait_1): Fix pc advance condition.
2527 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2528 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2529
769ef81f
AT
25302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2531
2532 * linux-arm-low.c (arm_is_thumb_mode): New function.
2533 (arm_breakpoint_at): Use arm_is_thumb_mode.
2534 (arm_breakpoint_kind_from_current_state): New function.
2535 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2536 Initialize.
2537 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2538 (linux_breakpoint_kind_from_current_state): New function.
2539 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2540 * linux-low.h (struct linux_target_ops)
2541 <breakpoint_kind_from_current_state>: New field.
2542 * target.h (struct target_ops): Likewise.
2543 (target_breakpoint_kind_from_current_state): New macro.
2544
1bebeeca
PA
25452015-11-30 Pedro Alves <palves@redhat.com>
2546
2547 * linux-low.c (linux_resume): Wake up the event loop before
2548 returning.
2549
a67a9fae
PA
25502015-11-30 Pedro Alves <palves@redhat.com>
2551
2552 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2553 check.
2554 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2555 to -1.
2556 * target.c (struct thread_search): New structure.
2557 (thread_search_callback): New function.
2558 (prev_general_thread): New global.
2559 (prepare_to_access_memory, done_accessing_memory): New functions.
2560 * target.h (prepare_to_access_memory, done_accessing_memory):
2561 Replace macros with function declarations.
2562
f2faf941
PA
25632015-11-30 Pedro Alves <palves@redhat.com>
2564
2565 PR 14618
2566 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2567 report TARGET_WAITKIND_NO_RESUMED.
2568 * remote-utils.c (prepare_resume_reply): Handle
2569 TARGET_WAITKIND_NO_RESUMED.
2570 * server.c (report_no_resumed): New global.
2571 (handle_query) <qSupported>: Handle "no-resumed+". Report
2572 "no-resumed+" support.
2573 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2574 return error if the client doesn't support no-resumed events.
2575 (push_stop_notification): New function.
2576 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2577 events if the client supports them.
2578
a681f9c9
PA
25792015-11-30 Pedro Alves <palves@redhat.com>
2580
2581 * linux-low.c (thread_still_has_status_pending_p): Don't check
2582 vCont;t here.
2583 (lwp_resumed): New function.
2584 (status_pending_p_callback): Return early if the LWP is not
2585 supposed to be resumed.
2586
65706a29
PA
25872015-11-30 Pedro Alves <palves@redhat.com>
2588
2589 * linux-low.c (handle_extended_wait): Assert that the LWP's
2590 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2591 thread create events, leave the new child's status pending.
2592 (linux_low_filter_event): If GDB wants to hear about thread exit
2593 events, leave the LWP marked dead and don't delete it.
2594 (linux_wait_for_event_filtered): Don't check for thread exit.
2595 (filter_exit_event): New function.
2596 (linux_wait_1): Use it, when returning an exit event.
2597 (linux_resume_one_lwp_throw): Assert that the LWP's
2598 waitstatus is TARGET_WAITKIND_IGNORE.
2599 * remote-utils.c (prepare_resume_reply): Handle
2600 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2601 * server.c (report_thread_events): New global.
2602 (handle_general_set): Handle QThreadEvents.
2603 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2604 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2605 TARGET_WAITKIND_THREAD_EXITED.
2606 * server.h (report_thread_events): Declare.
2607
56cf4bed
PA
26082015-11-30 Pedro Alves <palves@redhat.com>
2609
2610 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2611 the thread's last_resume_kind was resume_stop.
2612
500c1d85
PA
26132015-11-30 Pedro Alves <palves@redhat.com>
2614
2615 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2616 before returning.
2617
de979965
PA
26182015-11-30 Pedro Alves <palves@redhat.com>
2619
2620 * server.c (handle_v_requests): Handle vCtrlC.
2621
34c65914
PA
26222015-11-30 Pedro Alves <palves@redhat.com>
2623
2624 * gdbthread.h (find_any_thread_of_pid): Declare.
2625 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2626 functions.
2627 * server.c (handle_query): If current_thread is NULL, look for
2628 another thread of the selected process.
2629
79efa585 26302015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2631 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2632
2633 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2634 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2635 name in reply.
2636 * target.h (struct target_ops) <thread_name>: New field.
2637 (target_thread_name): New macro.
2638
80d82c19
JB
26392015-11-23 Joel Brobecker <brobecker@adacore.com>
2640
2641 * regcache.h (regcache_invalidate_pid): Add declaration.
2642 * regcache.c (regcache_invalidate_pid): New function, extracted
2643 from regcache_invalidate.
2644 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2645 Add trivial documentation comment.
2646 * lynx-low.c: Use regcache_invalidate_pid instead of
2647 regcache_invalidate.
2648
64da5dd5
JB
26492015-11-23 Joel Brobecker <brobecker@adacore.com>
2650
2651 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2652 and Elf64_auxv_t if the target is Android.
2653
37ce4055
DE
26542015-11-22 Doug Evans <xdje42@gmail.com>
2655
2656 * target.h: #include <sys/types.h>.
2657
06e03fff
PA
26582015-11-19 Pedro Alves <palves@redhat.com>
2659
2660 * linux-low.c (linux_process_qsupported): Change prototype.
2661 Adjust.
2662 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2663 Change prototype.
2664 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2665 and adjust to loop over all features.
2666 * server.c (handle_query) <qSupported>: Adjust to call
2667 target_process_qsupported once, passing it a vector of unprocessed
2668 features.
2669 * target.h (struct target_ops) <process_qsupported>: Change
2670 prototype.
2671 (target_process_qsupported): Adjust.
2672
9a084706
PA
26732015-11-19 Pedro Alves <palves@redhat.com>
2674
2675 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2676 mode.
2677 * configure: Regenerate.
2678
dad44a1f
PA
26792015-11-19 Pedro Alves <palves@redhat.com>
2680
2681 * configure: Regenerate.
2682
231c0592
YQ
26832015-11-19 Yao Qi <yao.qi@linaro.org>
2684
2685 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2686 type to uint32_t.
2687
6c1c9a8b
YQ
26882015-11-19 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2691 (struct aarch64_operand): Move enum out.
2692
9caa3311
YQ
26932015-11-19 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2696 struct user_fpsimd_state *.
2697 (aarch64_store_fpregset): Likewise.
2698
6a69a054
YQ
26992015-11-19 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2702 struct user_pt_regs *.
2703 (aarch64_store_gregset): Likewise.
2704
1798301e
PA
27052015-11-18 Pedro Alves <palves@redhat.com>
2706
2707 * Makefile.in (all_object_files): Add $IPA_OBJS.
2708
ce7715e2
PA
27092015-11-17 Pedro Alves <palves@redhat.com>
2710
2711 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2712 GDB_SIGNAL_0 and gdb_signal_to_string.
2713
c0879059
PA
27142015-11-17 Pedro Alves <palves@redhat.com>
2715
2716 * win32-low.c (handle_output_debug_string): Remove parameter.
2717 (win32_kill): Remove our_status local and adjust call to
2718 handle_output_debug_string.
2719 (get_child_debug_event): Adjust call to
2720 handle_output_debug_string.
2721
1996e237
SM
27222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2723
2724 * linux-mips-low.c (mips_fill_gregset): Add cast.
2725 (mips_store_gregset): Likewise.
2726 (mips_fill_fpregset): Likewise.
2727 (mips_store_fpregset): Likewise.
2728
cbec665b
SM
27292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2730
2731 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2732 priv.
2733
eb3e3c67
SM
27342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2735
2736 * linux-mips-low.c (mips_linux_new_thread): Change type of
2737 watch_type to enum target_hw_bp_type.
2738
171de4b8
SM
27392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2740
2741 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2742 Change return type to arm_hwbp_type.
2743
04248ead
SM
27442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2745
2746 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2747 (arm_store_gregset): Likewise.
2748 * linux-arm-low.c (arm_get_hwcap): Likewise.
2749 (arm_read_description): Likewise.
2750
04b3479c
SM
27512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2752
2753 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2754
2bc84e8a
SM
27552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2756
2757 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2758 (ppc_fill_vsxregset): Likewise.
2759 (ppc_store_vsxregset): Likewise.
2760 (ppc_fill_vrregset): Likewise.
2761 (ppc_store_vrregset): Likewise.
2762 (ppc_fill_evrregset): Likewise.
2763 (ppc_store_evrregset): Likewise.
2764
e6c5bb05
SM
27652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2766
2767 * linux-ppc-low.c (ppc_usrregs_info): Remove
2768 forward-declaration.
2769 (ppc_arch_setup): Move lower in file.
2770
7ea45d72
SM
27712015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2772
2773 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2774 (ps_pdwrite): Likewise.
2775
69291610
HW
27762015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2777
2778 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2779 to after assert checks.
2780
b42945fd
SM
27812015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2782
2783 * proc-service.c (ps_pdread): Add/adjust casts.
2784 (ps_pdwrite): Add/adjust casts.
2785
d6f85c84
SM
27862015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2787
2788 * server.c (handle_search_memory_1): Cast return value of
2789 memmem.
2790
f98cd059
SM
27912015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2792
2793 * server.c (write_qxfer_response): Change type of data to
2794 gdb_byte *.
2795
d2412fa5
PA
27962015-10-29 Pedro Alves <palves@redhat.com>
2797
2798 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2799
c17414a2
PA
28002015-10-29 Pedro Alves <palves@redhat.com>
2801
2802 * tracepoint.c (clear_installed_tracepoints): Add casts.
2803
e053fbc4
PA
28042015-10-29 Pedro Alves <palves@redhat.com>
2805
2806 * server.c (handle_v_cont, process_serial_event): Add enum
2807 gdb_signal casts to signal parsing code.
2808
add67df8
PA
28092015-10-29 Pedro Alves <palves@redhat.com>
2810
2811 * linux-low.h (NULL_REGSET): Define.
2812 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2813 * linux-arm-low.c (arm_regsets): Likewise.
2814 * linux-crisv32-low.c (cris_regsets): Likewise.
2815 * linux-m68k-low.c (m68k_regsets): Likewise.
2816 * linux-mips-low.c (mips_regsets): Likewise.
2817 * linux-nios2-low.c (nios2_regsets): Likewise.
2818 * linux-ppc-low.c (ppc_regsets): Likewise.
2819 * linux-s390-low.c (s390_regsets): Likewise.
2820 * linux-sh-low.c (sh_regsets): Likewise.
2821 * linux-sparc-low.c (sparc_regsets): Likewise.
2822 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2823 * linux-tile-low.c (tile_regsets): Likewise.
2824 * linux-x86-low.c (x86_regsets): Likewise.
2825 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2826
50bc912a
PA
28272015-10-29 Pedro Alves <palves@redhat.com>
2828
2829 * linux-low.h (NULL_REGSET): Define.
2830 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2831 * linux-arm-low.c (arm_regsets): Likewise.
2832 * linux-crisv32-low.c (cris_regsets): Likewise.
2833 * linux-m68k-low.c (m68k_regsets): Likewise.
2834 * linux-mips-low.c (mips_regsets): Likewise.
2835 * linux-nios2-low.c (nios2_regsets): Likewise.
2836 * linux-ppc-low.c (ppc_regsets): Likewise.
2837 * linux-s390-low.c (s390_regsets): Likewise.
2838 * linux-sh-low.c (sh_regsets): Likewise.
2839 * linux-sparc-low.c (sparc_regsets): Likewise.
2840 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2841 * linux-tile-low.c (tile_regsets): Likewise.
2842 * linux-x86-low.c (x86_regsets): Likewise.
2843 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2844
682b2546
DE
28452015-10-26 Doug Evans <dje@google.com>
2846
2847 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2848
963843d4
DE
28492015-10-26 Doug Evans <dje@google.com>
2850
2851 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2852
d41401ac
DE
28532015-10-26 Doug Evans <dje@google.com>
2854
2855 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2856 for debug_printf.
2857 (attach_thread, find_new_threads_callback): Ditto.
2858
3db28855
AT
28592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2860
2861 * mem-break.h (set_breakpoint_data): Remove.
2862
fb78e89c
AT
28632015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2864
2865 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2866 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2867 (initialize_low): Remove set_breakpoint_data call.
2868 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2869 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2870 (initialize_low): Remove set_breakpoint_data call.
2871 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2872 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2873 (initialize_low): Remove set_breakpoint_data call.
2874
2e6ee069
AT
28752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2876
2877 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2878 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2879 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2880 * target.h (target_breakpoint_kind_from_pc): New macro.
2881
1652a986
AT
28822015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2883
2884 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2885 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2886 the default breakpoint kind.
2887
abeead09
AT
28882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2889
2890 * linux-arm-low.c (arm_supports_z_point_type): Add software
2891 breakpoint support.
2892
b0b4b501
AT
28932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2894
2895 * linux-arm-low.c: Refactor breakpoint definitions.
2896 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2897 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2898
8689682c
AT
28992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2900
2901 * Makefile.in: Add arm.c/o.
2902 * configure.srv: Likewise.
2903 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2904 (arm_breakpoint_kind_from_pc): New function.
2905 (arm_sw_breakpoint_from_kind): Return proper kind.
2906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2907
27165294
AT
29082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2909
2910 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2911 removal.
2912 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2913 (struct raw_breakpoint) <size>: Remove.
2914 (struct raw_breakpoint) <kind>: Add.
2915 (bp_size): New function.
2916 (bp_opcode): Likewise.
2917 (find_raw_breakpoint_at): Adjust for kind.
2918 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2919 (remove_memory_breakpoint): Adjust for kind call bp_size.
2920 (set_raw_breakpoint_at): Adjust for kind.
2921 (set_breakpoint): Likewise.
2922 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2923 (delete_raw_breakpoint): Adjust for kind.
2924 (delete_breakpoint): Likewise.
2925 (find_gdb_breakpoint): Likewise.
2926 (set_gdb_breakpoint_1): Likewise.
2927 (set_gdb_breakpoint): Likewise.
2928 (delete_gdb_breakpoint_1): Likewise.
2929 (delete_gdb_breakpoint): Likewise.
2930 (uninsert_raw_breakpoint): Likewise.
2931 (reinsert_raw_breakpoint): Likewise.
2932 (set_breakpoint_data): Remove.
2933 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2934 (check_mem_read): Adjust for kind call bp_size.
2935 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2936 (clone_one_breakpoint): Adjust for kind.
2937 * mem-break.h (set_gdb_breakpoint): Likewise.
2938 (delete_gdb_breakpoint): Likewise.
2939 * server.c (process_serial_event): Likewise.
2940
dd373349
AT
29412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2942
2943 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2944 (struct linux_target_ops) <breakpoint>: Remove.
2945 (struct linux_target_ops) <breakpoint_len>: Remove.
2946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2948 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2949 (arm_sw_breakpoint_from_kind): New function.
2950 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2951 (struct linux_target_ops) <breakpoint>: Remove.
2952 (struct linux_target_ops) <breakpoint_len>: Remove.
2953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2955 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2956 (struct linux_target_ops) <breakpoint>: Remove.
2957 (struct linux_target_ops) <breakpoint_len>: Remove.
2958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2960 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2961 (struct linux_target_ops) <breakpoint>: Remove.
2962 (struct linux_target_ops) <breakpoint_len>: Remove.
2963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2965 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2966 and sw_breakpoint_from_kind to increment the pc.
2967 (linux_breakpoint_kind_from_pc): New function.
2968 (linux_sw_breakpoint_from_kind): New function.
2969 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2970 (initialize_low): Call breakpoint_kind_from_pc and
2971 sw_breakpoint_from_kind to replace breakpoint_data/len.
2972 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2973 New field.
2974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2975 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2976 (struct linux_target_ops) <breakpoint>: Remove.
2977 (struct linux_target_ops) <breakpoint_len>: Remove.
2978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2980 * linux-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2996 (struct linux_target_ops) <breakpoint>: Remove.
2997 (struct linux_target_ops) <breakpoint_len>: Remove.
2998 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2999 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3000 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3001 (struct linux_target_ops) <breakpoint>: Remove.
3002 (struct linux_target_ops) <breakpoint_len>: Remove.
3003 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3004 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3005 * linux-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3021 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3022 (struct linux_target_ops) <breakpoint>: Remove.
3023 (struct linux_target_ops) <breakpoint_len>: Remove.
3024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3026 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3027 (struct linux_target_ops) <breakpoint>: Remove.
3028 (struct linux_target_ops) <breakpoint_len>: Remove.
3029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3030 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3031
4cd98a19
AT
30322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3033
3034 * linux-cris-low.c (cris_get_pc): Remove void arg.
3035
774ee6d2
AR
30362015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3037
3038 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3039 variable name.
3040
833dcd29
AR
30412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3042
3043 * inferiors.c (thread_pid_matches_callback): New function.
3044 (find_thread_process): New function.
3045 (remove_thread): Reset current_thread.
3046 (remove_process): Assert threads have been removed first.
3047
8d689ee5
YQ
30482015-10-15 Yao Qi <yao.qi@linaro.org>
3049
3050 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3051 if it is 3.
3052 (aarch64_remove_point): Likewise.
3053 * regcache.c (regcache_register_size): New function.
3054
1c2e1515
YQ
30552015-10-12 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-aarch64-low.c: Update all callers as emit_load_store
3058 is renamed to aarch64_emit_load_store.
3059
e1c587c3
YQ
30602015-10-12 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-aarch64-low.c: Update all callers of function renaming
3063 from emit_insn to aarch64_emit_insn.
3064
b6542f81
YQ
30652015-10-12 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3068 arch/aarch64-insn.h.
3069 (struct aarch64_memory_operand): Likewise.
3070 (ENCODE): Likewise.
3071 (emit_insn): Move to arch/aarch64-insn.c.
3072 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3073 (emit_load_store): Move to arch/aarch64-insn.c.
3074 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3075 (can_encode_int32): Remove.
3076
246994ce
YQ
30772015-10-12 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3080 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3081 (aarch64_relocate_instruction): Likewise.
3082 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3083 (struct aarch64_insn_visitor): Likewise.
3084
0badd99f
YQ
30852015-10-12 Yao Qi <yao.qi@linaro.org>
3086
3087 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3088 (struct aarch64_insn_visitor): New.
3089 (struct aarch64_insn_relocation_data): New.
3090 (aarch64_ftrace_insn_reloc_b): New function.
3091 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3092 (aarch64_ftrace_insn_reloc_cb): Likewise.
3093 (aarch64_ftrace_insn_reloc_tb): Likewise.
3094 (aarch64_ftrace_insn_reloc_adr): Likewise.
3095 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3096 (aarch64_ftrace_insn_reloc_others): Likewise.
3097 (visitor): New.
3098 (aarch64_relocate_instruction): Use visitor.
3099
dfaffe9d
YQ
31002015-10-12 Yao Qi <yao.qi@linaro.org>
3101
3102 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3103 int. Add argument buf.
3104 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3105 aarch64_relocate_instruction.
3106
70b439f0
YQ
31072015-10-12 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3110 argument insn. Remove local variable insn. Don't call
3111 target_read_uint32.
3112 (aarch64_install_fast_tracepoint_jump_pad): Call
3113 target_read_uint32.
3114
7781c06f
YQ
31152015-09-30 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3118 (emit_load_store_pair): Likewise.
3119
9a3c8263
SM
31202015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3121
3122 * dll.c (match_dll): Add cast(s).
3123 (unloaded_dll): Likewise.
3124 * linux-low.c (second_thread_of_pid_p): Likewise.
3125 (delete_lwp_callback): Likewise.
3126 (count_events_callback): Likewise.
3127 (select_event_lwp_callback): Likewise.
3128 (linux_set_resume_request): Likewise.
3129 * server.c (accumulate_file_name_length): Likewise.
3130 (emit_dll_description): Likewise.
3131 (handle_qxfer_threads_worker): Likewise.
3132 (visit_actioned_threads): Likewise.
3133 * thread-db.c (any_thread_of): Likewise.
3134 * tracepoint.c (same_process_p): Likewise.
3135 (match_blocktype): Likewise.
3136 (build_traceframe_info_xml): Likewise.
3137
224c3ddb
SM
31382015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3141 assignment.
3142 (gdb_unparse_agent_expr): Likewise.
3143 * hostio.c (require_data): Likewise.
3144 (handle_pread): Likewise.
3145 * linux-low.c (disable_regset): Likewise.
3146 (fetch_register): Likewise.
3147 (store_register): Likewise.
3148 (get_dynamic): Likewise.
3149 (linux_qxfer_libraries_svr4): Likewise.
3150 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3151 (set_fast_tracepoint_jump): Likewise.
3152 (uninsert_fast_tracepoint_jumps_at): Likewise.
3153 (reinsert_fast_tracepoint_jumps_at): Likewise.
3154 (validate_inserted_breakpoint): Likewise.
3155 (clone_agent_expr): Likewise.
3156 * regcache.c (init_register_cache): Likewise.
3157 * remote-utils.c (putpkt_binary_1): Likewise.
3158 (decode_M_packet): Likewise.
3159 (decode_X_packet): Likewise.
3160 (look_up_one_symbol): Likewise.
3161 (relocate_instruction): Likewise.
3162 (monitor_output): Likewise.
3163 * server.c (handle_search_memory): Likewise.
3164 (handle_qxfer_exec_file): Likewise.
3165 (handle_qxfer_libraries): Likewise.
3166 (handle_qxfer): Likewise.
3167 (handle_query): Likewise.
3168 (handle_v_cont): Likewise.
3169 (handle_v_run): Likewise.
3170 (captured_main): Likewise.
3171 * target.c (write_inferior_memory): Likewise.
3172 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3173 * tracepoint.c (init_trace_buffer): Likewise.
3174 (add_tracepoint_action): Likewise.
3175 (add_traceframe): Likewise.
3176 (add_traceframe_block): Likewise.
3177 (cmd_qtdpsrc): Likewise.
3178 (cmd_qtdv): Likewise.
3179 (cmd_qtstatus): Likewise.
3180 (response_source): Likewise.
3181 (response_tsv): Likewise.
3182 (cmd_qtnotes): Likewise.
3183 (gdb_collect): Likewise.
3184 (initialize_tracepoint): Likewise.
3185
afbe19f8
PL
31862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3187
3188 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3189 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3190 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3191 <NOP>: New.
3192 (enum aarch64_condition_codes): New enum.
3193 (w0): New static global.
3194 (fp): Likewise.
3195 (lr): Likewise.
3196 (struct aarch64_memory_operand) <type>: New
3197 MEMORY_OPERAND_POSTINDEX type.
3198 (postindex_memory_operand): New helper function.
3199 (emit_ret): New function.
3200 (emit_load_store_pair): New function, factored out of emit_stp
3201 with support for MEMORY_OPERAND_POSTINDEX.
3202 (emit_stp): Rewrite using emit_load_store_pair.
3203 (emit_ldp): New function.
3204 (emit_load_store): Likewise.
3205 (emit_ldr): Mention post-index instruction in comment.
3206 (emit_ldrh): New function.
3207 (emit_ldrb): New function.
3208 (emit_ldrsw): Mention post-index instruction in comment.
3209 (emit_str): Likewise.
3210 (emit_subs): New function.
3211 (emit_cmp): Likewise.
3212 (emit_and): Likewise.
3213 (emit_orr): Likewise.
3214 (emit_orn): Likewise.
3215 (emit_eor): Likewise.
3216 (emit_mvn): Likewise.
3217 (emit_lslv): Likewise.
3218 (emit_lsrv): Likewise.
3219 (emit_asrv): Likewise.
3220 (emit_mul): Likewise.
3221 (emit_sbfm): Likewise.
3222 (emit_sbfx): Likewise.
3223 (emit_ubfm): Likewise.
3224 (emit_ubfx): Likewise.
3225 (emit_csinc): Likewise.
3226 (emit_cset): Likewise.
3227 (emit_nop): Likewise.
3228 (emit_ops_insns): New helper function.
3229 (emit_pop): Likewise.
3230 (emit_push): Likewise.
3231 (aarch64_emit_prologue): New function.
3232 (aarch64_emit_epilogue): Likewise.
3233 (aarch64_emit_add): Likewise.
3234 (aarch64_emit_sub): Likewise.
3235 (aarch64_emit_mul): Likewise.
3236 (aarch64_emit_lsh): Likewise.
3237 (aarch64_emit_rsh_signed): Likewise.
3238 (aarch64_emit_rsh_unsigned): Likewise.
3239 (aarch64_emit_ext): Likewise.
3240 (aarch64_emit_log_not): Likewise.
3241 (aarch64_emit_bit_and): Likewise.
3242 (aarch64_emit_bit_or): Likewise.
3243 (aarch64_emit_bit_xor): Likewise.
3244 (aarch64_emit_bit_not): Likewise.
3245 (aarch64_emit_equal): Likewise.
3246 (aarch64_emit_less_signed): Likewise.
3247 (aarch64_emit_less_unsigned): Likewise.
3248 (aarch64_emit_ref): Likewise.
3249 (aarch64_emit_if_goto): Likewise.
3250 (aarch64_emit_goto): Likewise.
3251 (aarch64_write_goto_address): Likewise.
3252 (aarch64_emit_const): Likewise.
3253 (aarch64_emit_call): Likewise.
3254 (aarch64_emit_reg): Likewise.
3255 (aarch64_emit_pop): Likewise.
3256 (aarch64_emit_stack_flush): Likewise.
3257 (aarch64_emit_zero_ext): Likewise.
3258 (aarch64_emit_swap): Likewise.
3259 (aarch64_emit_stack_adjust): Likewise.
3260 (aarch64_emit_int_call_1): Likewise.
3261 (aarch64_emit_void_call_2): Likewise.
3262 (aarch64_emit_eq_goto): Likewise.
3263 (aarch64_emit_ne_goto): Likewise.
3264 (aarch64_emit_lt_goto): Likewise.
3265 (aarch64_emit_le_goto): Likewise.
3266 (aarch64_emit_gt_goto): Likewise.
3267 (aarch64_emit_ge_got): Likewise.
3268 (aarch64_emit_ops_impl): New static global variable.
3269 (aarch64_emit_ops): New target function, return
3270 &aarch64_emit_ops_impl.
3271 (struct linux_target_ops): Install it.
3272
bb903df0
PL
32732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3274
3275 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3276 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3277 aarch64-ipa.o.
3278 * linux-aarch64-ipa.c: New file.
3279 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3280 and endian.h.
3281 (aarch64_get_thread_area): New target method.
3282 (extract_signed_bitfield): New helper function.
3283 (aarch64_decode_ldr_literal): New function.
3284 (enum aarch64_opcodes): New enum.
3285 (struct aarch64_register): New struct.
3286 (struct aarch64_operand): New struct.
3287 (x0): New static global.
3288 (x1): Likewise.
3289 (x2): Likewise.
3290 (x3): Likewise.
3291 (x4): Likewise.
3292 (w2): Likewise.
3293 (ip0): Likewise.
3294 (sp): Likewise.
3295 (xzr): Likewise.
3296 (aarch64_register): New helper function.
3297 (register_operand): Likewise.
3298 (immediate_operand): Likewise.
3299 (struct aarch64_memory_operand): New struct.
3300 (offset_memory_operand): New helper function.
3301 (preindex_memory_operand): Likewise.
3302 (enum aarch64_system_control_registers): New enum.
3303 (ENCODE): New macro.
3304 (emit_insn): New helper function.
3305 (emit_b): New function.
3306 (emit_bcond): Likewise.
3307 (emit_cb): Likewise.
3308 (emit_tb): Likewise.
3309 (emit_blr): Likewise.
3310 (emit_stp): Likewise.
3311 (emit_ldp_q_offset): Likewise.
3312 (emit_stp_q_offset): Likewise.
3313 (emit_load_store): Likewise.
3314 (emit_ldr): Likewise.
3315 (emit_ldrsw): Likewise.
3316 (emit_str): Likewise.
3317 (emit_ldaxr): Likewise.
3318 (emit_stxr): Likewise.
3319 (emit_stlr): Likewise.
3320 (emit_data_processing_reg): Likewise.
3321 (emit_data_processing): Likewise.
3322 (emit_add): Likewise.
3323 (emit_sub): Likewise.
3324 (emit_mov): Likewise.
3325 (emit_movk): Likewise.
3326 (emit_mov_addr): Likewise.
3327 (emit_mrs): Likewise.
3328 (emit_msr): Likewise.
3329 (emit_sevl): Likewise.
3330 (emit_wfe): Likewise.
3331 (append_insns): Likewise.
3332 (can_encode_int32_in): New helper function.
3333 (aarch64_relocate_instruction): New function.
3334 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3335 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3336 (struct linux_target_ops): Install aarch64_get_thread_area,
3337 aarch64_install_fast_tracepoint_jump_pad and
3338 aarch64_get_min_fast_tracepoint_insn_len.
3339
787749ea
PL
33402015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3341
3342 * Makefile.in (aarch64-insn.o): New rule.
3343 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3344
9812b2e6
YQ
33452015-09-21 Yao Qi <yao.qi@linaro.org>
3346
3347 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3348
18fe412b
YQ
33492015-09-21 Yao Qi <yao.qi@linaro.org>
3350
3351 * tracepoint.c (max_jump_pad_size): Remove.
3352
a0cc84cd
YQ
33532015-09-18 Yao Qi <yao.qi@linaro.org>
3354
3355 * linux-aarch64-low.c: Don't include sys/uio.h.
3356 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3357
d78908cf
WW
33582015-09-16 Wei-cheng Wang <cole945@gmail.com>
3359
3360 * tracepoint.c (eval_result_type): Change prototype.
3361 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3362
d57e0d50
PA
33632015-09-15 Pedro Alves <palves@redhat.com>
3364
3365 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3366 Check whether to report exec events instead of checking whether
3367 multiprocess is enabled.
3368
5a676acc
PA
33692015-09-15 Pedro Alves <palves@redhat.com>
3370
3371 PR remote/18965
3372 * remote-utils.c (prepare_resume_reply): Merge
3373 TARGET_WAITKIND_VFORK_DONE switch case with the
3374 TARGET_WAITKIND_FORKED case.
3375
7c5d0fad
YQ
33762015-09-15 Yao Qi <yao.qi@linaro.org>
3377
3378 * server.c (handle_query): Check string comparison using
3379 "else if" instead of "if".
3380
750ce8d1
YQ
33812015-09-15 Yao Qi <yao.qi@linaro.org>
3382
3383 * server.c (vCont_supported): New global variable.
3384 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3385 matches. Append ";vContSupported+" to own_buf.
3386 (handle_v_requests): Append ";s;S" to own_buf if target supports
3387 hardware single step or vCont_supported is false.
3388 (capture_main): Set vCont_supported to zero.
3389
70b90b91
YQ
33902015-09-15 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3393 it to ...
3394 (linux_supports_hardware_single_step): ... New function.
3395 (linux_target_ops): Update.
3396 * lynx-low.c (lynx_target_ops): Set field
3397 supports_hardware_single_step to target_can_do_hardware_single_step.
3398 * nto-low.c (nto_target_ops): Likewise.
3399 * spu-low.c (spu_target_ops): Likewise.
3400 * win32-low.c (win32_target_ops): Likewise.
3401 * target.c (target_can_do_hardware_single_step): New function.
3402 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3403 Remove. <supports_hardware_single_step>: New field.
3404 (target_supports_conditional_breakpoints): Remove.
3405 (target_supports_hardware_single_step): New macro.
3406 (target_can_do_hardware_single_step): Declare.
3407 * server.c (handle_query): Use target_supports_hardware_single_step
3408 instead of target_supports_conditional_breakpoints.
3409
ade90bde
YQ
34102015-09-15 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3413 function.
3414 (struct linux_target_ops the_low_target): Install
3415 aarch64_linux_siginfo_fixup.
3416
94585166
DB
34172015-09-11 Don Breazeal <donb@codesourcery.com>
3418 Luis Machado <lgustavo@codesourcery.com>
3419
3420 * linux-low.c (linux_mourn): Static declaration.
3421 (linux_arch_setup): Move in front of
3422 handle_extended_wait.
3423 (linux_arch_setup_thread): New function.
3424 (handle_extended_wait): Handle exec events. Call
3425 linux_arch_setup_thread. Make event_lwp argument a
3426 pointer-to-a-pointer.
3427 (check_zombie_leaders): Do not check stopped threads.
3428 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3429 (linux_low_filter_event): Add lwp and thread for exec'ing
3430 non-leader thread if leader thread has been deleted.
3431 Refactor code into linux_arch_setup_thread and call it.
3432 Pass child lwp pointer by reference to handle_extended_wait.
3433 (linux_wait_for_event_filtered): Update comment.
3434 (linux_wait_1): Prevent clobbering exec event status.
3435 (linux_supports_exec_events): New function.
3436 (linux_target_ops) <supports_exec_events>: Initialize new member.
3437 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3438 new member.
3439 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3440 * server.c (report_exec_events): New global variable.
3441 (handle_query): Handle qSupported query for exec-events feature.
3442 (captured_main): Initialize report_exec_events.
3443 * server.h (report_exec_events): Declare new global variable.
3444 * target.h (struct target_ops) <supports_exec_events>: New
3445 member.
3446 (target_supports_exec_events): New macro.
3447 * win32-low.c (win32_target_ops) <supports_exec_events>:
3448 Initialize new member.
3449
0568462b
MM
34502015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3451
3452 * linux-low.c (linux_low_enable_btrace): Remove.
3453 (linux_target_ops): Replace linux_low_enable_btrace with
3454 linux_enable_btrace.
3455
39edd165
YQ
34562015-09-03 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-aarch64-low.c (aarch64_insert_point): Call
3459 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3460 returns true.
3461
1db33b5a
UW
34622015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3463
3464 * linux-low.c (check_stopped_by_breakpoint): Use
3465 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3466
ab290430
PA
34672015-08-27 Pedro Alves <palves@redhat.com>
3468
3469 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3470
8d749320
SM
34712015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3472
6711b7f8
SM
3473 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3474 the XNEW-family equivalent.
8d749320
SM
3475 (compile_bytecodes): Likewise.
3476 * dll.c (loaded_dll): Likewise.
3477 * event-loop.c (append_callback_event): Likewise.
3478 (create_file_handler): Likewise.
3479 (create_file_event): Likewise.
3480 * hostio.c (handle_open): Likewise.
3481 * inferiors.c (add_thread): Likewise.
3482 (add_process): Likewise.
3483 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3484 * linux-arm-low.c (arm_new_process): Likewise.
3485 (arm_new_thread): Likewise.
3486 * linux-low.c (add_to_pid_list): Likewise.
3487 (linux_add_process): Likewise.
3488 (handle_extended_wait): Likewise.
3489 (add_lwp): Likewise.
3490 (enqueue_one_deferred_signal): Likewise.
3491 (enqueue_pending_signal): Likewise.
3492 (linux_resume_one_lwp_throw): Likewise.
3493 (linux_resume_one_thread): Likewise.
3494 (linux_read_memory): Likewise.
3495 (linux_write_memory): Likewise.
3496 * linux-mips-low.c (mips_linux_new_process): Likewise.
3497 (mips_linux_new_thread): Likewise.
3498 (mips_add_watchpoint): Likewise.
3499 * linux-x86-low.c (initialize_low_arch): Likewise.
3500 * lynx-low.c (lynx_add_process): Likewise.
3501 * mem-break.c (set_raw_breakpoint_at): Likewise.
3502 (set_breakpoint): Likewise.
3503 (add_condition_to_breakpoint): Likewise.
3504 (add_commands_to_breakpoint): Likewise.
3505 (clone_agent_expr): Likewise.
3506 (clone_one_breakpoint): Likewise.
3507 * regcache.c (new_register_cache): Likewise.
3508 * remote-utils.c (look_up_one_symbol): Likewise.
3509 * server.c (queue_stop_reply): Likewise.
3510 (start_inferior): Likewise.
3511 (queue_stop_reply_callback): Likewise.
3512 (handle_target_event): Likewise.
3513 * spu-low.c (fetch_ppc_memory): Likewise.
3514 (store_ppc_memory): Likewise.
3515 * target.c (set_target_ops): Likewise.
3516 * thread-db.c (thread_db_load_search): Likewise.
3517 (try_thread_db_load_1): Likewise.
3518 * tracepoint.c (add_tracepoint): Likewise.
3519 (add_tracepoint_action): Likewise.
3520 (create_trace_state_variable): Likewise.
3521 (cmd_qtdpsrc): Likewise.
3522 (cmd_qtro): Likewise.
3523 (add_while_stepping_state): Likewise.
3524 * win32-low.c (child_add_thread): Likewise.
3525 (get_image_name): Likewise.
3526
ed8b7b42
YQ
35272015-08-25 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3530
db3cb7cb
YQ
35312015-08-25 Yao Qi <yao.qi@linaro.org>
3532
3533 * Makefile.in (aarch64-linux.o): New rule.
3534 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3535 srv_tgtobj.
3536 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3537 (aarch64_init_debug_reg_state): Make it extern.
3538 (aarch64_linux_prepare_to_resume): Remove.
3539
f6011a1c
YQ
35402015-08-25 Yao Qi <yao.qi@linaro.org>
3541
3542 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3543 lwp_arch_private_info and ptid_of_lwp.
3544
88e2cf7e
YQ
35452015-08-25 Yao Qi <yao.qi@linaro.org>
3546
3547 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3548 Find proc_info by find_process_pid. All callers updated.
3549
5e35436e
YQ
35502015-08-25 Yao Qi <yao.qi@linaro.org>
3551
3552 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3553 Remove.
3554 (debug_reg_change_callback): Remove.
3555 (aarch64_notify_debug_reg_change): Remove.
3556
4a8a7965
YQ
35572015-08-25 Yao Qi <yao.qi@linaro.org>
3558
3559 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3560 Call current_lwp_ptid.
3561
32a271ee
YQ
35622015-08-25 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch64-low.c (debug_reg_change_callback): Use
3565 debug_printf.
3566
0d51c8d7
YQ
35672015-08-25 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3570
31a43dd5
YQ
35712015-08-25 Yao Qi <yao.qi@linaro.org>
3572
3573 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3574
8ee52567
YQ
35752015-08-25 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3578 the code.
3579
ff3f0f45
YQ
35802015-08-25 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3583 Remove.
3584 (debug_reg_change_callback): Remove argument entry and add argument
3585 lwp. Remove local variable thread. Don't print thread id in the
3586 debugging output. Don't check whether pid of thread equals to pid.
3587 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3588 iterate_over_lwps instead find_inferior.
3589
3d40fbb5
PA
35902015-08-24 Pedro Alves <palves@redhat.com>
3591
3592 * inferiors.c (get_first_process): New function.
3593 * inferiors.h (get_first_process): New declaration.
3594 * remote-utils.c (read_ptid): Default to the first process in the
3595 list, instead of to the current thread's process.
3596
438e1e42
PA
35972015-08-24 Pedro Alves <palves@redhat.com>
3598
3599 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3600 * event-loop.c: Likewise.
3601 * remote-utils.c: Likewise.
3602 * tracepoint.c: Likewise.
3603
a8c6d4fc
PA
36042015-08-24 Pedro Alves <palves@redhat.com>
3605
3606 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3607 ptid_get_lwp.
3608
99b0bb12
PA
36092015-08-21 Pedro Alves <palves@redhat.com>
3610
3611 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3612 instead of literal 1.
3613
f8904751
PA
36142015-08-21 Pedro Alves <palves@redhat.com>
3615
3616 * tdesc.c (default_description): Explicitly zero-initialize.
3617
465a859e
PA
36182015-08-21 Pedro Alves <palves@redhat.com>
3619
3620 PR gdb/18749
3621 * inferiors.c (remove_thread): Discard any pending stop reply for
3622 this thread.
3623 * server.c (remove_all_on_match_pid): Rename to ...
3624 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3625 instead of a pid.
3626 (discard_queued_stop_replies): Change parameter to a ptid. Now
3627 extern.
3628 (handle_v_kill, kill_inferior_callback, captured_main)
3629 (process_serial_event): Adjust.
3630 * server.h (discard_queued_stop_replies): Declare.
3631
f0db101d
PA
36322015-08-21 Pedro Alves <palves@redhat.com>
3633
3634 * linux-low.c (wait_for_sigstop): Always switch to no thread
3635 selected if the previously current thread dies.
3636 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3637 process instead of the current thread's.
3638 * remote-utils.c (input_interrupt): Don't check if there's no
3639 current thread.
3640 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3641 current thread to the general thread fails, error out.
3642 (handle_qxfer_auxv, handle_qxfer_libraries)
3643 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3644 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3645 (handle_query): Check if there's a thread selected instead of
3646 checking whether there's any thread in the thread list.
3647 (handle_qxfer_threads, handle_qxfer_btrace)
3648 (handle_qxfer_btrace_conf): Don't error out early if there's no
3649 thread in the thread list.
3650 (handle_v_cont, myresume): Don't set the current thread to the
3651 continue thread.
3652 (process_serial_event) <Hg handling>: Also set thread_id if the
3653 previous general thread is still alive.
3654 (process_serial_event) <g/G handling>: If setting the current
3655 thread to the general thread fails, error out.
3656 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3657 thread's lwp instead of the current thread's.
3658 * target.c (set_desired_thread): If the desired thread was not
3659 found, leave the current thread pointing to NULL. Return an int
3660 (boolean) indicating success.
3661 * target.h (set_desired_thread): Change return type to int.
3662
40045d91
MF
36632015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3664
3665 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3666 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3667 #includes.
3668 (ps_get_thread_area): New function.
3669
45face3b
GB
36702015-08-19 Gary Benson <gbenson@redhat.com>
3671
3672 * hostio.c (handle_pread): Do not attempt to read more data
3673 than hostio_reply_with_data can fit in a packet.
3674
16d5f642
JB
36752015-08-18 Joel Brobecker <brobecker@adacore.com>
3676
3677 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3678
a738da3a
MF
36792015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3680
3681 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3682
33ebda9d
PA
36832015-08-06 Pedro Alves <palves@redhat.com>
3684
3685 * tracepoint.c (expr_eval_result): Now an int.
3686
a44892be
PA
36872015-08-06 Pedro Alves <palves@redhat.com>
3688
3689 * gdbthread.h (struct regcache): Forward declare.
3690 (struct thread_info) <regcache_data>: Now a struct regcache
3691 pointer.
3692 * inferiors.c (inferior_regcache_data)
3693 (set_inferior_regcache_data): Now work with struct regcache
3694 pointers.
3695 * inferiors.h (struct regcache): Forward declare.
3696 (inferior_regcache_data, set_inferior_regcache_data): Now work
3697 with struct regcache pointers.
3698 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3699 (free_register_cache_thread): Remove struct regcache pointer
3700 casts.
3701
608a1e46
PA
37022015-08-06 Pedro Alves <palves@redhat.com>
3703
3704 * server.c (captured_main): On error, print the exception message
3705 to stderr, and if run_once is set, throw a quit.
3706
f0ce0d3a
PA
37072015-08-06 Pedro Alves <palves@redhat.com>
3708
3709 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3710 the current thread.
3711
bf47e248
PA
37122015-08-06 Pedro Alves <palves@redhat.com>
3713
3714 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3715 reading beyond the passed in buffer length.
3716
b6b9ffcc
PL
37172015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3718
3719 * tracepoint.c (symbol_list) <required>: Remove.
3720
863d01bd
PA
37212015-08-06 Pedro Alves <palves@redhat.com>
3722
3723 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3724 count if stopping and suspending threads.
3725 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3726 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3727 (linux_detach): Complete an ongoing step-over.
3728 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3729 throughout.
3730 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3731 (linux_wait_1): If passing a signal to the inferior after
3732 finishing a step-over, unsuspend and re-resume all lwps. If we
3733 see a single-step event but the thread should be continuing, don't
3734 pass the trap to gdb.
3735 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3736 internal_error instead of gdb_assert.
3737 (enqueue_pending_signal): New function.
3738 (check_ptrace_stopped_lwp_gone): Add debug output.
3739 (start_step_over): Use internal_error instead of gdb_assert.
3740 (complete_ongoing_step_over): New function.
3741 (linux_resume_one_thread): Don't resume a suspended thread.
3742 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3743 it stepping.
3744
00db26fa
PA
37452015-08-06 Pedro Alves <palves@redhat.com>
3746
3747 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3748 (linux_thread_alive): Use lwp_is_marked_dead.
3749 (extended_event_reported): Delete.
3750 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3751 instead of extended_event_reported.
3752 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3753 as well.
3754 (lwp_is_marked_dead): New function.
3755 (lwp_running): Use lwp_is_marked_dead.
3756 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3757 comment.
3758
ad071a30
PA
37592015-08-06 Pedro Alves <palves@redhat.com>
3760
3761 * linux-low.c (linux_wait_1): Move fork event output out of the
3762 !report_to_gdb check. Pass event_child->waitstatus to
3763 target_waitstatus_to_string instead of ourstatus.
3764
524b57e6
YQ
37652015-08-04 Yao Qi <yao.qi@linaro.org>
3766
3767 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3768 if current_thread is 32 bit.
3769
6085d6f6
YQ
37702015-08-04 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3773 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3774 * server.c (extended_protocol): Remove "static".
3775 * server.h (extended_protocol): Declare it.
3776
8a7e4587
YQ
37772015-08-04 Yao Qi <yao.qi@linaro.org>
3778
3779 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3780 both aarch64 and aarch32.
3781 (aarch64_set_pc): Likewise.
3782
3b53ae99
YQ
37832015-08-04 Yao Qi <yao.qi@linaro.org>
3784
3785 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3786 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3787 arm-with-neon.xml to srv_xmlfiles.
3788 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3789 (is_64bit_tdesc): New function.
3790 (aarch64_linux_read_description): New function.
3791 (aarch64_arch_setup): Call aarch64_linux_read_description.
3792 (regs_info): Rename to regs_info_aarch64.
3793 (aarch64_regs_info): Return right regs_info.
3794 (initialize_low_arch): Call initialize_low_arch_aarch32.
3795
bd9e6534
YQ
37962015-08-04 Yao Qi <yao.qi@linaro.org>
3797
3798 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3799 * linux-aarch32-low.c: New file.
3800 * linux-aarch32-low.h: New file.
3801 * linux-arm-low.c (arm_fill_gregset): Move it to
3802 linux-aarch32-low.c.
3803 (arm_store_gregset): Likewise.
3804 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3805 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3806 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3807 (regs_info): Rename to regs_info_arm.
3808 (arm_regs_info): Return regs_info_aarch32 if
3809 have_ptrace_getregset is 1 and target description is
3810 arm_with_neon or arm_with_vfpv3.
3811 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3812 Call initialize_low_arch_aarch32 instead.
3813
ded48a5e
YQ
38142015-08-04 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3817 * linux-low.c: ... here.
3818 * linux-low.h (have_ptrace_getregset): Declare it.
3819
96e9210f
PA
38202015-08-04 Pedro Alves <palves@redhat.com>
3821
3822 * thread-db.c (struct thread_db): Use new typedefs.
3823 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3824 CHK calls.
3825 (disable_thread_event_reporting): Cast result of dlsym to
3826 destination function pointer type.
3827 (thread_db_mourn): Use td_ta_delete_ftype.
3828
af60a1ef
SL
38292015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3830
3831 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3832 arch variant.
3833 (CDX_BREAKPOINT): Define for R2.
3834 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3835 (the_low_target): Add comments.
3836
e8b41681
YQ
38372015-07-30 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-arm-low.c (arm_hwcap): Remove it.
3840 (arm_read_description): New local variable arm_hwcap. Don't
3841 set arm_hwcap to zero.
3842
89abb039
YQ
38432015-07-30 Yao Qi <yao.qi@linaro.org>
3844
3845 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3846 Use regcache->tdesc instead.
3847 (arm_store_wmmxregset): Likewise.
3848 (arm_fill_vfpregset): Likewise.
3849 (arm_store_vfpregset): Likewise.
3850
deca266c
YQ
38512015-07-30 Yao Qi <yao.qi@linaro.org>
3852
3853 * linux-arm-low.c: Include arch/arm.h.
3854 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3855 (arm_store_gregset): Likewise.
3856
aa58a496
SM
38572015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3858
3859 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3860 ptrace's 4th parameter.
3861
50904b25
YQ
38622015-07-27 Yao Qi <yao.qi@linaro.org>
3863
3864 * configure.srv (case aarch64*-*-linux*): Don't set
3865 srv_linux_usrregs.
3866
5826e159
PA
38672015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3868
3869 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3870 sys/ptrace.h.
3871 * linux-arm-low.c: Likewise.
3872 * linux-cris-low.c: Likewise.
3873 * linux-crisv32-low.c: Likewise.
3874 * linux-low.c: Likewise.
3875 * linux-m68k-low.c: Likewise.
3876 * linux-mips-low.c: Likewise.
3877 * linux-nios2-low.c: Likewise.
3878 * linux-s390-low.c: Likewise.
3879 * linux-sparc-low.c: Likewise.
3880 * linux-tic6x-low.c: Likewise.
3881 * linux-tile-low.c: Likewise.
3882 * linux-x86-low.c: Likewise.
3883
54019719
PA
38842015-07-24 Pedro Alves <palves@redhat.com>
3885
3886 * config.in: Regenerate.
3887 * configure: Regenerate.
3888
eb7aa561
PA
38892015-07-24 Pedro Alves <palves@redhat.com>
3890
3891 * acinclude.m4: Include ../ptrace.m4.
3892 * configure.ac: Call GDB_AC_PTRACE.
3893 * config.in, configure: Regenerate.
3894
55d7b841
YQ
38952015-07-24 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-low.c (linux_create_inferior): Remove setting to
3898 proc->priv->new_inferior.
3899 (linux_attach): Likewise.
3900 (linux_low_filter_event): Likewise.
3901 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3902
c06cbd92
YQ
39032015-07-24 Yao Qi <yao.qi@linaro.org>
3904
3905 * linux-low.c (linux_arch_setup): New function.
3906 (linux_low_filter_event): If proc->tdesc is NULL and
3907 proc->attached is true, call the_low_target.arch_setup.
3908 Otherwise, keep status pending, and return.
3909 (linux_resume_one_lwp_throw): Don't call get_pc if
3910 thread->while_stepping isn't NULL. Don't call
3911 get_thread_regcache if proc->tdesc is NULL.
3912 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3913 (linux_target_ops): Install arch_setup.
3914 * server.c (start_inferior): Call the_target->arch_setup.
3915 * target.h (struct target_ops) <arch_setup>: New field.
3916 (target_arch_setup): New marco.
3917 * lynx-low.c (lynx_target_ops): Update.
3918 * nto-low.c (nto_target_ops): Update.
3919 * spu-low.c (spu_target_ops): Update.
3920 * win32-low.c (win32_target_ops): Update.
3921
5ae3ebba
YQ
39222015-07-24 Yao Qi <yao.qi@linaro.org>
3923
3924 * linux-low.c (linux_add_process): Don't set
3925 proc->priv->new_inferior.
3926 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3927 (linux_attach): Likewise.
3928
eb97750b
YQ
39292015-07-24 Yao Qi <yao.qi@linaro.org>
3930
3931 * server.c (start_inferior): Code refactor.
3932
51aee833
YQ
39332015-07-24 Yao Qi <yao.qi@linaro.org>
3934
3935 * server.c (process_serial_event): Set general_thread.
3936
af1b22f3
YQ
39372015-07-21 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3940 aarch64_linux_get_debug_reg_capacity.
3941
554717a3
YQ
39422015-07-17 Yao Qi <yao.qi@linaro.org>
3943
3944 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3945 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3946 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3947 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3948 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3949 (AARCH64_HWP_ALIGNMENT): Likewise.
3950 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3951 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3952 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3953 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3954 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3955 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3956 (struct aarch64_debug_reg_state): Likewise.
3957 (struct arch_lwp_info): Likewise.
3958 (aarch64_align_watchpoint): Likewise.
3959 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3960 (aarch64_watchpoint_length): Likewise.
3961 (aarch64_point_encode_ctrl_reg): Likewise
3962 (aarch64_point_is_aligned): Likewise.
3963 (aarch64_align_watchpoint): Likewise.
3964 (aarch64_linux_set_debug_regs):
3965 (aarch64_dr_state_insert_one_point): Likewise.
3966 (aarch64_dr_state_remove_one_point): Likewise.
3967 (aarch64_handle_breakpoint): Likewise.
3968 (aarch64_handle_aligned_watchpoint): Likewise.
3969 (aarch64_handle_unaligned_watchpoint): Likewise.
3970 (aarch64_handle_watchpoint): Likewise.
3971
c67ca4de
YQ
39722015-07-17 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3975 and don't aarch64_get_debug_reg_state. All callers update.
3976 (aarch64_handle_aligned_watchpoint): Likewise.
3977 (aarch64_handle_unaligned_watchpoint): Likewise.
3978 (aarch64_handle_watchpoint): Likewise.
3979 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3980 (aarch64_remove_point): Likewise.
3981
25abf979
YQ
39822015-07-17 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3985 debug_printf.
3986 (aarch64_handle_unaligned_watchpoint): Likewise.
3987
db1ff28b
JK
39882015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3989
3990 Revert the previous 3 commits:
3991 Move gdb_regex* to common/
3992 Move linux_find_memory_regions_full & co.
3993 gdbserver build-id attribute generator
3994
700ca40f
JK
39952015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3996 Jan Kratochvil <jan.kratochvil@redhat.com>
3997
3998 gdbserver build-id attribute generator.
3999 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4000 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4001 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4002 (find_phdr): New.
4003 (get_dynamic): Use find_pdhr to traverse program headers.
4004 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4005 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4006 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4007 (get_hex_build_id): New.
4008 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4009 to reply XML document.
4010
9904185c
JK
40112015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4012 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 * target.c: Include target/target-utils.h and fcntl.h.
4015 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4016 (target_fileio_read_stralloc): New functions.
4017
6e5b4429
JK
40182015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4019
4020 * Makefile.in (OBS): Add gdb_regex.o.
4021 (gdb_regex.o): New.
4022 * config.in: Rebuilt.
4023 * configure: Rebuilt.
4024
ddc98fbf
JK
40252015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4026 Jan Kratochvil <jan.kratochvil@redhat.com>
4027
4028 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4029 * Makefile.in (OBS): Add target-utils.o.
4030 (linux-maps.o, target-utils.o): New.
4031 * configure.srv (srv_linux_obj): Add linux-maps.o.
4032
e57bb7a0
PL
40332015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4034
4035 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4036 function, return 1.
4037 (the_low_target): Install it.
4038
586b02a9
PA
40392015-07-14 Pedro Alves <palves@redhat.com>
4040
4041 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4042 Instead, ignore ECHILD, and throw an error for other errnos.
4043
58c1b36c
PA
40442015-07-10 Pedro Alves <palves@redhat.com>
4045
4046 * event-loop.c (struct callback_event) <data>: Change type to
4047 gdb_client_data instance instead of gdb_client_data pointer.
4048 (append_callback_event): Adjust.
4049
421530db
PL
40502015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4051
4052 * linux-aarch64-low.c: Add comments for each linux_target_ops
4053 method. Remove comments already covered in target_ops and
4054 linux_target_ops definitions.
4055 (the_low_target): Add comments for each unimplemented method.
4056
c2d65f38
YQ
40572015-07-09 Yao Qi <yao.qi@linaro.org>
4058
4059 * linux-aarch64-low.c (aarch64_regmap): Remove.
4060 (aarch64_usrregs_info): Remove.
4061 (regs_info): Set field usrregs to NULL.
4062
b20a6524
MM
40632015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4064
4065 * linux-low.c: Include "rsp-low.h"
4066 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4067 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4068 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4069 (handle_btrace_enable_pt): New.
4070 (handle_btrace_general_set): Support "pt".
4071 (handle_btrace_conf_general_set): Support "pt:size".
4072
96c97461
PL
40732015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4074
4075 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4076 Z_PACKET_SW_BP.
4077
37d66942
PL
40782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4079
4080 * linux-aarch64-low.c: Remove comment about endianness.
4081 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4082 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4083 memcmp.
4084
dc06243f
GB
40852015-06-24 Gary Benson <gbenson@redhat.com>
4086
4087 * linux-i386-ipa.c (stdint.h): Do not include.
4088 * lynx-i386-low.c (stdint.h): Likewise.
4089 * lynx-ppc-low.c (stdint.h): Likewise.
4090 * mem-break.c (stdint.h): Likewise.
4091 * thread-db.c (stdint.h): Likewise.
4092 * tracepoint.c (stdint.h): Likewise.
4093 * win32-low.c (stdint.h): Likewise.
4094
124e13d9
SM
40952015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * server.c (write_qxfer_response): Update call to
4098 remote_escape_output.
4099
909c2cda
JK
41002015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4101 Jan Kratochvil <jan.kratochvil@redhat.com>
4102
4103 Merge multiple hex conversions.
4104 * gdbreplay.c (tohex): Rename to 'fromhex'.
4105 (logchar): Use fromhex.
4106
24c05f46
JK
41072015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4108
4109 * server.c (handle_qxfer_libraries): Set `version' attribute for
4110 <library-list>.
4111
14d2069a
GB
41122015-06-10 Gary Benson <gbenson@redhat.com>
4113
4114 * target.h (struct target_ops) <multifs_open>: New field.
4115 <multifs_unlink>: Likewise.
4116 <multifs_readlink>: Likewise.
4117 * linux-low.c (nat/linux-namespaces.h): New include.
4118 (linux_target_ops): Initialize the_target->multifs_open,
4119 the_target->multifs_unlink and the_target->multifs_readlink.
4120 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4121 * hostio.c (hostio_fs_pid): New static variable.
4122 (hostio_handle_new_gdb_connection): New function.
4123 (handle_setfs): Likewise.
4124 (handle_open): Use the_target->multifs_open as appropriate.
4125 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4126 (handle_readlink): Use the_target->multifs_readlink as
4127 appropriate.
4128 (handle_vFile): Handle vFile:setfs packets.
4129 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4130 after target_handle_new_gdb_connection.
4131
4b8b5e72
GB
41322015-06-10 Gary Benson <gbenson@redhat.com>
4133
4134 * configure.ac (AC_CHECK_FUNCS): Add setns.
4135 * config.in: Regenerate.
4136 * configure: Likewise.
4137 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4138 (linux-namespaces.o): New rule.
4139 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4140
3ac2e371
GB
41412015-06-09 Gary Benson <gbenson@redhat.com>
4142
4143 * hostio.c (handle_open): Process mode argument with
4144 fileio_to_host_mode.
4145
ca9b78ce
YQ
41462015-06-01 Yao Qi <yao.qi@linaro.org>
4147
4148 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4149 * linux-x86-low.c: Likewise.
4150
bfacd19d
DB
41512015-05-28 Don Breazeal <donb@codesourcery.com>
4152
4153 * linux-low.c (handle_extended_wait): Initialize
4154 thread_info.last_resume_kind for new fork children.
4155
452003ef
PA
41562015-05-15 Pedro Alves <palves@redhat.com>
4157
4158 * target.h (target_handle_new_gdb_connection): Rewrite using if
4159 wrapped in do/while.
4160
1041a03c
JB
41612015-05-14 Joel Brobecker <brobecker@adacore.com>
4162
4163 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4164 * configure, config.in: Regenerate.
4165 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4166 Declare typedef.
4167
c269dbdb
DB
41682015-05-12 Don Breazeal <donb@codesourcery.com>
4169
4170 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4171 PTRACE_EVENT_VFORK_DONE.
4172 (linux_low_ptrace_options, extended_event_reported): Add vfork
4173 events.
4174 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4175 and "vforkdone" for RSP 'T' Stop Reply Packet.
4176 * server.h (report_vfork_events): Declare
4177 global variable.
4178
3a8a0396
DB
41792015-05-12 Don Breazeal <donb@codesourcery.com>
4180
4181 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4182 (the_low_target) <new_fork>: Initialize new member.
4183 * linux-arm-low.c (arm_new_fork): New function.
4184 (the_low_target) <new_fork>: Initialize new member.
4185 * linux-low.c (handle_extended_wait): Call new target function
4186 new_fork.
4187 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4188 * linux-mips-low.c (mips_add_watchpoint): New function
4189 extracted from mips_insert_point.
4190 (the_low_target) <new_fork>: Initialize new member.
4191 (mips_linux_new_fork): New function.
4192 (mips_insert_point): Call mips_add_watchpoint.
4193 * linux-x86-low.c (x86_linux_new_fork): New function.
4194 (the_low_target) <new_fork>: Initialize new member.
4195
de0d863e
DB
41962015-05-12 Don Breazeal <donb@codesourcery.com>
4197
4198 * linux-low.c (handle_extended_wait): Implement return value,
4199 rename argument 'event_child' to 'event_lwp', handle
4200 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4201 (linux_low_ptrace_options): New function.
4202 (linux_low_filter_event): Call linux_low_ptrace_options,
4203 use different argument fo linux_enable_event_reporting,
4204 use return value from handle_extended_wait.
4205 (extended_event_reported): New function.
4206 (linux_wait_1): Call extended_event_reported and set
4207 status to report fork events.
4208 (linux_write_memory): Add pid to debug message.
4209 (reset_lwp_ptrace_options_callback): New function.
4210 (linux_handle_new_gdb_connection): New function.
4211 (linux_target_ops): Initialize new structure member.
4212 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4213 * lynx-low.c: Initialize new structure member.
4214 * remote-utils.c (prepare_resume_reply): Implement stop reason
4215 "fork" for "T" stop message.
4216 * server.c (handle_query): Call handle_new_gdb_connection.
4217 * server.h (report_fork_events): Declare global flag.
4218 * target.h (struct target_ops) <handle_new_gdb_connection>:
4219 New member.
4220 (target_handle_new_gdb_connection): New macro.
4221 * win32-low.c: Initialize new structure member.
4222
ddcbc397
DB
42232015-05-12 Don Breazeal <donb@codesourcery.com>
4224
4225 * mem-break.c (APPEND_TO_LIST): Define macro.
4226 (clone_agent_expr): New function.
4227 (clone_one_breakpoint): New function.
4228 (clone_all_breakpoints): New function.
4229 * mem-break.h: Declare new functions.
4230
89245bc0
DB
42312015-05-12 Don Breazeal <donb@codesourcery.com>
4232
4233 * linux-low.c (linux_supports_fork_events): New function.
4234 (linux_supports_vfork_events): New function.
4235 (linux_target_ops): Initialize new structure members.
4236 (initialize_low): Call linux_check_ptrace_features.
4237 * lynx-low.c (lynx_target_ops): Initialize new structure
4238 members.
4239 * server.c (report_fork_events, report_vfork_events):
4240 New global flags.
4241 (handle_query): Add new features to qSupported packet and
4242 response.
4243 (captured_main): Initialize new global variables.
4244 * target.h (struct target_ops) <supports_fork_events>:
4245 New member.
4246 <supports_vfork_events>: New member.
4247 (target_supports_fork_events): New macro.
4248 (target_supports_vfork_events): New macro.
4249 * win32-low.c (win32_target_ops): Initialize new structure
4250 members.
4251
835205d0
GB
42522015-05-12 Gary Benson <gbenson@redhat.com>
4253
4254 * server.c (handle_qxfer_exec_file): Use current process
4255 if annex is empty.
4256
21e94bd9
SL
42572015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4258
4259 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4260 Remove HAVE_PTRACE_GETREGS conditionals.
4261 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4262 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4263
45614f15
YQ
42642015-05-08 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-low.c (linux_supports_conditional_breakpoints): New
4267 function.
4268 (linux_target_ops): Install new target method.
4269 * lynx-low.c (lynx_target_ops): Install NULL hook for
4270 supports_conditional_breakpoints.
4271 * nto-low.c (nto_target_ops): Likewise.
4272 * spu-low.c (spu_target_ops): Likewise.
4273 * win32-low.c (win32_target_ops): Likewise.
4274 * server.c (handle_query): Check
4275 target_supports_conditional_breakpoints.
4276 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4277 New field.
4278 (target_supports_conditional_breakpoints): New macro.
4279
80ad801e
PA
42802015-05-06 Pedro Alves <palves@redhat.com>
4281
4282 PR server/18081
4283 * server.c (start_inferior): If the process exits, mourn it.
4284
819843c7
GB
42852015-04-21 Gary Benson <gbenson@redhat.com>
4286
4287 * hostio.c (fileio_open_flags_to_host): Factored out to
4288 fileio_to_host_openflags in common/fileio.c. Single use
4289 updated.
4290
a2d5a9d7
MF
42912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4292
4293 * linux-xtensa-low.c (xtensa_fill_gregset)
4294 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4295 XCHAL_HAVE_LOOP.
4296
deb44829
MF
42972015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4298
4299 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4300 (regs_info): Replace usrregs pointer with NULL.
4301
e57f1de3
GB
43022015-04-17 Gary Benson <gbenson@redhat.com>
4303
4304 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4305 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4306 * server.c (handle_qxfer_exec_file): New function.
4307 (qxfer_packets): Add exec-file entry.
4308 (handle_query): Report qXfer:exec-file:read as supported packet.
4309
62828379
RN
43102015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4311
4312 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4313
b88bb450
GB
43142015-04-09 Gary Benson <gbenson@redhat.com>
4315
4316 * hostio-errno.c (errno_to_fileio_error): Remove function.
4317 Update caller to use remote_fileio_to_fio_error.
4318
c8f4bfdd
YQ
43192015-04-09 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-low.c (linux_insert_point): Call
4322 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4323 (linux_remove_point): Call remove_memory_breakpoint if type is
4324 raw_bkpt_type_sw.
4325 * linux-x86-low.c (x86_insert_point): Don't call
4326 insert_memory_breakpoint.
4327 (x86_remove_point): Don't call remove_memory_breakpoint.
4328
41f98f02
PA
43292015-04-01 Pedro Alves <palves@redhat.com>
4330 Cleber Rosa <crosa@redhat.com>
4331
4332 * server.c (gdbserver_usage): Reorganize and extend the usage
4333 message.
4334
2bf6fb9d
PA
43352015-03-24 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4338 output. Also dump TRAP_TRACE.
4339 (linux_low_filter_event): In debug output, distinguish a
4340 resume_stop SIGSTOP from a delayed SIGSTOP.
4341
369f6daa
GB
43422015-03-24 Gary Benson <gbenson@redhat.com>
4343
4344 * linux-x86-low.c (x86_linux_new_thread): Moved to
4345 nat/x86-linux.c.
4346 (x86_linux_prepare_to_resume): Likewise.
4347
8e5d4070
GB
43482015-03-24 Gary Benson <gbenson@redhat.com>
4349
4350 * Makefile.in (x86-linux-dregs.o): New rule.
4351 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4352 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4353 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4354 (x86_linux_dr_get): Likewise.
4355 (x86_linux_dr_set): Likewise.
4356 (update_debug_registers_callback): Likewise.
4357 (x86_linux_dr_set_addr): Likewise.
4358 (x86_linux_dr_get_addr): Likewise.
4359 (x86_linux_dr_set_control): Likewise.
4360 (x86_linux_dr_get_control): Likewise.
4361 (x86_linux_dr_get_status): Likewise.
4362 (x86_linux_update_debug_registers): Likewise.
4363
2b95d440
GB
43642015-03-24 Gary Benson <gbenson@redhat.com>
4365
4366 * linux-x86-low.c (x86_linux_update_debug_registers):
4367 New function, factored out from...
4368 (x86_linux_prepare_to_resume): ...this.
4369
14b0bc68
GB
43702015-03-24 Gary Benson <gbenson@redhat.com>
4371
4372 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4373 (x86_linux_dr_set): Likewise.
4374 (update_debug_registers_callback): Likewise.
4375 (x86_linux_dr_set_addr): Likewise.
4376 (x86_linux_dr_get_addr): Likewise.
4377 (x86_linux_dr_set_control): Likewise.
4378 (x86_linux_dr_get_control): Likewise.
4379 (x86_linux_dr_get_status): Likewise.
4380 (x86_linux_prepare_to_resume): Likewise.
4381
5dfe6ca8
GB
43822015-03-24 Gary Benson <gbenson@redhat.com>
4383
4384 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4385 Use perror_with_name. Pass string through gettext.
4386 (x86_linux_dr_set): Likewise.
4387
d33472ad
GB
43882015-03-24 Gary Benson <gbenson@redhat.com>
4389
4390 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4391 (x86_linux_dr_set_addr): ...this.
4392 (x86_dr_low_get_addr): Rename to...
4393 (x86_linux_dr_get_addr): ...this.
4394 (x86_dr_low_set_control): Rename to...
4395 (x86_linux_dr_set_control): ...this.
4396 (x86_dr_low_get_control): Rename to...
4397 (x86_linux_dr_get_control): ...this.
4398 (x86_dr_low_get_status): Rename to...
4399 (x86_linux_dr_get_status): ...this.
4400 (x86_dr_low): Update with new function names.
4401
4b134ca1
GB
44022015-03-24 Gary Benson <gbenson@redhat.com>
4403
4404 * Makefile.in (x86-linux.o): New rule.
4405 * configure.srv: Add x86-linux.o to relevant targets.
4406 * linux-low.c (lwp_set_arch_private_info): New function.
4407 (lwp_arch_private_info): Likewise.
4408 * linux-x86-low.c: Include nat/x86-linux.h.
4409 (arch_lwp_info): Removed structure.
4410 (update_debug_registers_callback):
4411 Use lwp_set_debug_registers_changed.
4412 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4413 and lwp_set_debug_registers_changed.
4414 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4415
34c703da
GB
44162015-03-24 Gary Benson <gbenson@redhat.com>
4417
4418 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4419 * linux-arm-low.c (arm_new_thread): Likewise.
4420 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4421 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4422 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4423 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4424
cff068da
GB
44252015-03-24 Gary Benson <gbenson@redhat.com>
4426
4427 * linux-low.c (ptid_of_lwp): New function.
4428 (lwp_is_stopped): Likewise.
4429 (lwp_stop_reason): Likewise.
4430 * linux-x86-low.c (update_debug_registers_callback):
4431 Use lwp_is_stopped.
4432 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4433 lwp_stop_reason.
4434
b2f7c7e8
GB
44352015-03-24 Gary Benson <gbenson@redhat.com>
4436
4437 * linux-low.h (linux_stop_lwp): Remove declaration.
4438
6d4ee8c6
GB
44392015-03-24 Gary Benson <gbenson@redhat.com>
4440
4441 * linux-low.h: Include nat/linux-nat.h.
4442 * linux-low.c (iterate_over_lwps_args): New structure.
4443 (iterate_over_lwps_filter): New function.
4444 (iterate_over_lwps): Likewise.
4445 * linux-x86-low.c (update_debug_registers_callback):
4446 Update signature to what iterate_over_lwps expects.
4447 Remove PID check that iterate_over_lwps now performs.
4448 (x86_dr_low_set_addr): Use iterate_over_lwps.
4449 (x86_dr_low_set_control): Likewise.
4450
70a0bb6b
GB
44512015-03-24 Gary Benson <gbenson@redhat.com>
4452
4453 * linux-x86-low.c (x86_debug_reg_state): New function.
4454 (x86_linux_prepare_to_resume): Use the above.
4455
7b669087
GB
44562015-03-24 Gary Benson <gbenson@redhat.com>
4457
4458 * linux-low.c (current_lwp_ptid): New function.
4459 * linux-x86-low.c: Include nat/linux-nat.h.
4460 (x86_dr_low_get_addr): Use current_lwp_ptid.
4461 (x86_dr_low_get_control): Likewise.
4462 (x86_dr_low_get_status): Likewise.
4463
eef49a3d
PA
44642015-03-20 Pedro Alves <palves@redhat.com>
4465
4466 * tracepoint.c (cmd_qtstatus): Make "str" const.
4467
b2333d22
PA
44682015-03-20 Pedro Alves <palves@redhat.com>
4469
4470 * server.c (handle_general_set): Make "req_str" const.
4471
23f238d3
PA
44722015-03-19 Pedro Alves <palves@redhat.com>
4473
4474 * linux-low.c (linux_resume_one_lwp): Rename to ...
4475 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4476 instead call perror_with_name.
4477 (check_ptrace_stopped_lwp_gone): New function.
4478 (linux_resume_one_lwp): Reimplement as wrapper around
4479 linux_resume_one_lwp_throw that swallows errors if the LWP is
4480 gone.
4481
91baf43f
PA
44822015-03-19 Pedro Alves <palves@redhat.com>
4483
4484 * linux-low.c (count_events_callback, select_event_lwp_callback):
4485 No longer check whether the thread has resume_stop as last resume
4486 kind.
4487
8bf3b159
PA
44882015-03-19 Pedro Alves <palves@redhat.com>
4489
4490 * linux-low.c (count_events_callback, select_event_lwp_callback):
4491 Use the lwp's status_pending_p field, not the thread's.
4492
b90fc188
PA
44932015-03-19 Pedro Alves <palves@redhat.com>
4494
4495 * linux-low.c (select_event_lwp_callback): Update comments to
4496 no longer mention SIGTRAP.
4497
464b0089
GB
44982015-03-18 Gary Benson <gbenson@redhat.com>
4499
4500 * server.c (handle_query): Do not report vFile:fstat as supported.
4501
aa9e327f
GB
45022015-03-11 Gary Benson <gbenson@redhat.com>
4503
4504 * hostio.c (sys/types.h): New include.
4505 (sys/stat.h): Likewise.
4506 (common-remote-fileio.h): Likewise.
4507 (handle_fstat): New function.
4508 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4509
791c0056
GB
45102015-03-11 Gary Benson <gbenson@redhat.com>
4511
4512 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4513 struct stat.st_blocks and struct stat.st_blksize.
4514 * configure: Regenerate.
4515 * config.in: Likewise.
4516 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4517 (OBS): Add common-remote-fileio.o.
4518 (common-remote-fileio.o): New rule.
4519
9a9df970
PA
45202015-03-09 Pedro Alves <palves@redhat.com>
4521
4522 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4523 'struct sockaddr' pointer in 'accept' call.
4524
9eb1356e
PA
45252015-03-09 Pedro Alves <palves@redhat.com>
4526
4527 Revert:
4528 2015-03-07 Pedro Alves <palves@redhat.com>
4529 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4530 or <winsock2.h> here. Instead include "gdb_socket.h".
4531 (remote_open): Use union gdb_sockaddr_u.
4532 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4533 or <winsock2.h> here. Instead include "gdb_socket.h".
4534 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4535 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4536 or <sys/un.h>.
4537 (init_named_socket, gdb_agent_helper_thread): Use union
4538 gdb_sockaddr_u.
4539
aac331e4
PA
45402015-03-07 Pedro Alves <palves@redhat.com>
4541
4542 * configure.ac (build_warnings): Move
4543 -Wdeclaration-after-statement to the C-specific set.
4544 * configure: Regenerate.
4545
366c75fc
PA
45462015-03-07 Pedro Alves <palves@redhat.com>
4547
4548 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4549 or <winsock2.h> here. Instead include "gdb_socket.h".
4550 (remote_open): Use union gdb_sockaddr_u.
4551 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4552 or <winsock2.h> here. Instead include "gdb_socket.h".
4553 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4554 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4555 or <sys/un.h>.
4556 (init_named_socket, gdb_agent_helper_thread): Use union
4557 gdb_sockaddr_u.
4558
492d29ea
PA
45592015-03-07 Pedro Alves <palves@redhat.com>
4560
4561 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4562 instead.
4563
60a191ed
YQ
45642015-03-06 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (aarch64_insert_point): Use
4567 show_debug_regs as a boolean.
4568 (aarch64_remove_point): Likewise.
4569
f5771b1d
PA
45702015-03-05 Pedro Alves <palves@redhat.com>
4571
4572 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4573 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4574 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4575 * nto-low.c (nto_target_ops): Likewise.
4576 * spu-low.c (spu_target_ops): Likewise.
4577 * win32-low.c (win32_target_ops): Likewise.
4578
3e572f71
PA
45792015-03-04 Pedro Alves <palves@redhat.com>
4580
72f4393d 4581 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4582 Decide whether a breakpoint triggered based on the SIGTRAP's
4583 siginfo.si_code.
72f4393d
L
4584 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4585 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4586 (linux_low_filter_event): Check for breakpoints before checking
4587 watchpoints.
4588 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4589 siginfo.si_code.
72f4393d
L
4590 (linux_stopped_by_sw_breakpoint)
4591 (linux_supports_stopped_by_sw_breakpoint)
4592 (linux_stopped_by_hw_breakpoint)
4593 (linux_supports_stopped_by_hw_breakpoint): New functions.
4594 (linux_target_ops): Install new target methods.
3e572f71 4595
1ec68e26
PA
45962015-03-04 Pedro Alves <palves@redhat.com>
4597
4598 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4599 * server.c (swbreak_feature, hwbreak_feature): New globals.
4600 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4601 (captured_main): Clear swbreak_feature and hwbreak_feature.
4602 * server.h (swbreak_feature, hwbreak_feature): Declare.
4603 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4604 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4605 supports_stopped_by_hw_breakpoint>: New fields.
4606 (target_supports_stopped_by_sw_breakpoint)
4607 (target_stopped_by_sw_breakpoint)
4608 (target_supports_stopped_by_hw_breakpoint)
4609 (target_stopped_by_hw_breakpoint): Declare.
4610
15c66dd6
PA
46112015-03-04 Pedro Alves <palves@redhat.com>
4612
4613 enum lwp_stop_reason -> enum target_stop_reason
4614 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4615 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4616 (linux_wait_1, stuck_in_jump_pad_callback)
4617 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4618 (linux_stopped_by_watchpoint):
4619 * linux-low.h (enum lwp_stop_reason): Delete.
4620 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4621 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4622
98fc70d6
YQ
46232015-03-04 Yao Qi <yao.qi@linaro.org>
4624
4625 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4626
dd2ac174
GB
46272015-03-03 Gary Benson <gbenson@redhat.com>
4628
4629 * hostio.c (handle_vFile): Fix prefix lengths.
4630
d68e53f4
MM
46312015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4632
4633 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4634 ptr_bits.
4635
bf2d68ab
AA
46362015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4637
4638 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4639 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4640 (clean): Add "rm -f" for above C files.
4641 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4642 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4643 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4644 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4645 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4646 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4647 (init_registers_s390x_vx_linux64)
4648 (init_registers_s390x_tevx_linux64)
4649 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4650 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4651 declarations.
4652 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4653 (s390_store_vxrs_high): New functions.
4654 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4655 NT_S390_VXRS_HIGH.
4656 (s390_arch_setup): Add logic for selecting one of the new target
4657 descriptions. Activate the new vector regsets if applicable.
4658 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4659 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4660 and init_registers_s390x_tevx_linux64.
4661
c966a859
PA
46622015-03-01 Pedro Alves <palves@redhat.com>
4663
4664 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4665 parameter.
4666
4180215b
PA
46672015-02-27 Pedro Alves <palves@redhat.com>
4668
4669 * linux-x86-low.c (u_debugreg_offset): New function.
4670 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4671
749bab01
PA
46722015-02-27 Pedro Alves <palves@redhat.com>
4673
4674 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4675 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4676 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4677 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4678 (ps_lsetfpregs, ps_getpid)
4679 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4680 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4681 (ps_lsetxregs, ps_plog): Declare.
4682
3c14e5a3
PA
46832015-02-27 Pedro Alves <palves@redhat.com>
4684
4685 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4686 IP_AGENT_EXPORT_FUNC.
4687 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4688 IP_AGENT_EXPORT_FUNC.
4689 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4690 (IP_AGENT_EXPORT): Delete.
4691 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4692 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4693 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4694 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4695 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4696 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4697 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4698 (traceframe_read_count, traceframe_write_count)
4699 (traceframes_created, trace_state_variables, get_raw_reg)
4700 (get_trace_state_variable_value, set_trace_state_variable_value)
4701 (ust_loaded, helper_thread_id, cmd_buf): Use
4702 IPA_SYM_EXPORTED_NAME.
4703 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4704 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4705 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4706 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4707 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4708 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4709 EXTERN_C_PUSH/EXTERN_C_POP.
4710 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4711 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4712 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4713 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4714 (traceframe_write_count, traceframe_read_count)
4715 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4716 (about_to_request_buffer_space, get_trace_state_variable_value)
4717 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4718 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4719 EXTERN_C_PUSH/EXTERN_C_POP.
4720 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4721 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4722 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4723 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4724 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4725 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4726 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4727 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4728 Define.
4729 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4730 (IP_AGENT_EXPORT_VAR_DECL): Define.
4731 (tracing): Declare.
4732 (gdb_agent_get_raw_reg): Declare.
4733
fe978cb0
PA
47342015-02-27 Tom Tromey <tromey@redhat.com>
4735 Pedro Alves <palves@redhat.com>
4736
4737 Rename symbols whose names are reserved C++ keywords throughout.
4738
3bc3d82a
PA
47392015-02-27 Pedro Alves <palves@redhat.com>
4740
4741 * Makefile.in (COMPILER): New, get it from autoconf.
4742 (CXX): Get from autoconf instead.
4743 (COMPILE.pre): Use COMPILER.
4744 (CC-LD): Rename to ...
4745 (CC_LD): ... this. Use COMPILER.
4746 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4747 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4748 * acinclude.m4: Include build-with-cxx.m4.
4749 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4750 Disable -Werror by default if building in C++ mode.
4751 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4752 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4753 the C++ compiler. Save/restore CXXFLAGS too.
4754 * configure: Regenerate.
4755
07697489
PA
47562015-02-27 Pedro Alves <palves@redhat.com>
4757
4758 * acinclude.m4: Include libiberty.m4.
4759 * configure.ac: Call libiberty_INIT.
4760 * config.in, configure: Regenerate.
4761
9beb7c4e
PA
47622015-02-26 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.c (linux_wait_1): When incrementing the PC past a
4765 program breakpoint always use the_low_target.breakpoint_len as
4766 increment, rather than the maximum between that and
4767 the_low_target.decr_pc_after_break.
4768
8090aef2
PA
47692015-02-23 Pedro Alves <palves@redhat.com>
4770
4771 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4772 thread was doing a step-over; always adjust the PC if
4773 we stepped over a permanent breakpoint.
4774 (linux_wait_1): If we stepped over breakpoint that was on top of a
4775 permanent breakpoint, manually advance the PC past it.
4776
bc9540e8
PA
47772015-02-23 Pedro Alves <palves@redhat.com>
4778
4779 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4780 modes.
4781 (x86_fill_gregset, x86_store_gregset): Use it when handling
4782 $orig_eax.
4783
2db9a427
PA
47842015-02-20 Pedro Alves <palves@redhat.com>
4785
4786 * thread-db.c: Include "nat/linux-procfs.h".
4787 (thread_db_init): Skip listing new threads if the kernel supports
4788 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4789
afa8d396
PA
47902015-02-20 Pedro Alves <palves@redhat.com>
4791
4792 * linux-low.c (status_pending_p_callback): Use ptid_match.
4793
c9587f88
AT
47942015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4795
4796 PR breakpoints/16812
4797 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4798 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4799 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4800
b05ec7a5
AT
48012015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4802
4803 PR breakpoints/15956
4804 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4805
d33501a5
MM
48062015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4807
4808 * linux-low.c (linux_low_btrace_conf): Print size.
4809 * server.c (handle_btrace_conf_general_set): New.
4810 (hanle_general_set): Call handle_btrace_conf_general_set.
4811 (handle_query): Report Qbtrace-conf:bts:size as supported.
4812
f4abbc16
MM
48132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4814
4815 * linux-low.c (linux_low_enable_btrace): Update parameters.
4816 (linux_low_btrace_conf): New.
4817 (linux_target_ops)<to_btrace_conf>: Initialize.
4818 * server.c (current_btrace_conf): New.
4819 (handle_btrace_enable): Rename to ...
4820 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4821 to target_enable_btrace. Update comment. Update users.
4822 (handle_qxfer_btrace_conf): New.
4823 (qxfer_packets): Add btrace-conf entry.
4824 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4825 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4826 (target_ops)<read_btrace_conf>: New.
4827 (target_enable_btrace): Update parameters.
4828 (target_read_btrace_conf): New.
4829
043c3577
MM
48302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4831
4832 * server.c (handle_btrace_general_set): Remove call to
4833 target_supports_btrace.
4834 (supported_btrace_packets): New.
4835 (handle_query): Call supported_btrace_packets.
4836 * target.h: include btrace-common.h.
4837 (btrace_target_info): Removed.
4838 (supports_btrace, target_supports_btrace): Update parameters.
4839
734b0e4b
MM
48402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4841
4842 * Makefile.in (SFILES): Add common/btrace-common.c.
4843 (OBS): Add common/btrace-common.o.
4844 (btrace-common.o): Add build rules.
4845 * linux-low: Include btrace-common.h.
4846 (linux_low_read_btrace): Use struct btrace_data. Call
4847 btrace_data_init and btrace_data_fini.
4848
d6c146e9
PA
48492015-02-06 Pedro Alves <palves@redhat.com>
4850
4851 * thread-db.c (find_new_threads_callback): Add debug output.
4852
20ba1ce6
PA
48532015-02-04 Pedro Alves <palves@redhat.com>
4854
4855 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4856 (resume_stopped_resumed_lwps): New function.
4857 (linux_wait_for_event_filtered): Use it.
4858
8cc73a39
SDJ
48592015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4860
4861 * Makefile.in (SFILES): Add linux-personality.c.
4862 (linux-personality.o): New rule.
4863 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4864 list of objects to be built.
4865 * linux-low.c: Include nat/linux-personality.h.
4866 (linux_create_inferior): Remove code to disable address space
4867 randomization (moved to ../nat/linux-personality.c). Create
4868 cleanup to disable address space randomization.
4869
fb23d554
SDJ
48702015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4871
4872 * Makefile.in (posix-strerror.o): New rule.
4873 (mingw-strerror.o): Likewise.
4874 * configure: Regenerated.
4875 * configure.ac: Source file ../common/common.host. Initialize new
4876 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4877
cdf43629
YQ
48782015-01-14 Yao Qi <yao@codesourcery.com>
4879
4880 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4881 (ppc-linux.o): New rule.
4882 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4883 * configure.ac: AC_CHECK_FUNCS(getauxval).
4884 * config.in: Re-generated.
4885 * configure: Re-generated.
4886 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4887 ppc64_64bit_inferior_p
4888
514c5338
YQ
48892015-01-14 Yao Qi <yao@codesourcery.com>
4890
4891 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4892 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4893 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4894 (PT_ORIG_R3, PT_TRAP): Likewise.
4895 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4896 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4897 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4898
3368c1e5
JB
48992015-01-10 Joel Brobecker <brobecker@adacore.com>
4900
4901 * i387-fp.c (i387_cache_to_xsave): In look over
4902 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4903 zmmh_low_space field by use of zmmh_high_space.
4904
582511be
PA
49052015-01-09 Pedro Alves <palves@redhat.com>
4906
4907 * linux-low.c (step_over_bkpt): Move higher up in the file.
4908 (handle_extended_wait): Don't store the stop_pc here.
4909 (get_stop_pc): Adjust comments and rename to ...
4910 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4911 stopped for a software breakpoint or hardware breakpoint.
4912 (thread_still_has_status_pending_p): New function.
4913 (status_pending_p_callback): Use
4914 thread_still_has_status_pending_p. If the event is no longer
4915 interesting, resume the LWP.
4916 (handle_tracepoints): Add assert.
4917 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4918 (wstatus_maybe_breakpoint): New function.
4919 (cancel_breakpoint): Delete function.
4920 (check_stopped_by_watchpoint): New function, factored out from
4921 linux_low_filter_event.
4922 (lp_status_maybe_breakpoint): Delete function.
4923 (linux_low_filter_event): Remove filter_ptid argument.
4924 Leave thread group exits pending here. Store the LWP's stop PC.
4925 Always leave events pending.
4926 (linux_wait_for_event_filtered): Pull all events out of the
4927 kernel, and leave them all pending.
4928 (count_events_callback, select_event_lwp_callback): Consider all
4929 events.
4930 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4931 (select_event_lwp): Only give preference to the stepping LWP in
4932 all-stop mode. Adjust comments.
4933 (ignore_event): New function.
4934 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4935 references to cancel_breakpoints. Adjust to renames. Also give
4936 equal priority to all LWPs that have had events in non-stop mode.
4937 If reporting a software breakpoint event, unadjust the LWP's PC.
4938 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4939 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4940 Adjust.
4941 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4942 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4943 (linux_stopped_by_watchpoint): Adjust.
4944 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4945 * linux-low.h (enum lwp_stop_reason): New.
4946 (struct lwp_info) <stop_pc>: Adjust comment.
4947 <stopped_by_watchpoint>: Delete field.
4948 <stop_reason>: New field.
4949 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4950 * mem-break.c (software_breakpoint_inserted_here)
4951 (hardware_breakpoint_inserted_here): New function.
4952 * mem-break.h (software_breakpoint_inserted_here)
4953 (hardware_breakpoint_inserted_here): Declare.
4954 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4955 (cancel_breakpoints): Delete.
4956 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4957 (upload_fast_traceframes): Remove references to
4958 cancel_breakpoints.
4959
a33e3959
PA
49602015-01-09 Pedro Alves <palves@redhat.com>
4961
4962 * thread-db.c (find_new_threads_callback): Ignore thread if the
4963 kernel thread ID is -1.
4964
8784d563
PA
49652015-01-09 Pedro Alves <palves@redhat.com>
4966
4967 * linux-low.c (linux_attach_fail_reason_string): Move to
4968 nat/linux-ptrace.c, and rename.
4969 (linux_attach_lwp): Update comment.
4970 (attach_proc_task_lwp_callback): New function.
4971 (linux_attach): Adjust to rename and use
4972 linux_proc_attach_tgid_threads.
4973 (linux_attach_fail_reason_string): Delete declaration.
4974
76f2b779
JB
49752015-01-01 Joel Brobecker <brobecker@adacore.com>
4976
4977 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4978 * server.c (gdbserver_version): Likewise.
4979
fafcc06a
SDJ
49802014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4981
4982 * remote-utils.c: Include ctype.h.
4983 (input_interrupt): Explicitly handle the case when the char
4984 received is the NUL byte. Improve the printing of non-ASCII
4985 characters.
4986
beed38b8
JB
49872014-12-16 Joel Brobecker <brobecker@adacore.com>
4988
4989 * linux-low.c (linux_low_filter_event): Update call to
4990 linux_enable_event_reporting following the addition of
4991 a new parameter to that function.
4992
bf330350
CU
49932014-12-16 Catalin Udma <catalin.udma@freescale.com>
4994
4995 PR server/17457
4996 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4997 (AARCH64_FPCR_REGNO): Likewise.
4998 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4999 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5000 (aarch64_store_fpregset): Likewise.
5001
5227d625
JB
50022014-12-15 Joel Brobecker <brobecker@adacore.com>
5003
5004 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5005 Remove FIXME comment about assumption about N.
5006
f93b65a0
JB
50072014-12-13 Joel Brobecker <brobecker@adacore.com>
5008
5009 * configure.ac: If large-file support is disabled in GDBserver,
5010 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5011 * configure: Regenerate.
5012
e5a9158d
AA
50132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5014
5015 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5016 warning upon ENODATA from ptrace.
5017 * linux-s390-low.c (s390_store_tdb): New.
5018 (s390_regsets): Add regset for NT_S390_TDB.
5019
feea5f36
AA
50202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5021
5022 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5023 without a fill_function.
5024 * linux-s390-low.c (s390_fill_last_break): Remove.
5025 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5026 (s390_arch_setup): Use regset's size instead of fill_function for
5027 loop end condition.
5028
098dbe61
AA
50292014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5030
5031 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5032 the regset's store function when ptrace returned an error.
5033 * regcache.c (get_thread_regcache): Invalidate register cache
5034 before fetching inferior's registers.
5035
28eef672
AA
50362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5037
5038 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5039 while-loop as for-loop.
5040 (regsets_store_inferior_registers): Likewise.
5041
bdca27a2
YQ
50422014-11-28 Yao Qi <yao@codesourcery.com>
5043
5044 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5045 * config.in, configure: Re-generate.
5046 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5047 is defined.
5048
9c232dda
YQ
50492014-11-21 Yao Qi <yao@codesourcery.com>
5050
5051 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5052 (AC_CHECK_HEADERS): Remove malloc.h.
5053 * configure: Re-generated.
5054 * config.in: Re-generated.
5055 * server.h: Don't include alloca.h and malloc.h.
5056 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5057 Don't include malloc.h.
5058
43968415
JB
50592014-11-17 Joel Brobecker <brobecker@adacore.com>
5060
5061 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5062 corresponding ERRNO check in same block.
5063
40e91bc7
PA
50642014-11-12 Pedro Alves <palves@redhat.com>
5065
5066 * server.c (cont_thread): Update comment.
5067 (start_inferior, attach_inferior): No longer clear cont_thread.
5068 (handle_v_cont): No longer set cont_thread.
5069 (captured_main): Clear cont_thread each time a GDB connects.
5070
c2c118cf
PA
50712014-11-12 Pedro Alves <palves@redhat.com>
5072
5073 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5074 thread, and don't resume all threads if the Hc thread has exited.
5075
78708b7c
PA
50762014-11-12 Pedro Alves <palves@redhat.com>
5077
5078 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5079 the process group instead of to a specific LWP.
5080
a2abc7de
PA
50812014-10-15 Pedro Alves <palves@redhat.com>
5082
5083 PR server/17487
5084 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5085 parameter.
5086 (arm_set_thread_context): Delete.
5087 (the_low_target): Adjust.
5088 * win32-i386-low.c (debug_registers_changed)
5089 (debug_registers_used): Delete.
5090 (update_debug_registers_callback): New function.
5091 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5092 needing to update their debug registers.
5093 (win32_get_current_dr): New function.
5094 (x86_dr_low_get_addr, x86_dr_low_get_control)
5095 (x86_dr_low_get_status): Fetch the debug register from the thread
5096 record's context.
5097 (i386_initial_stuff): Adjust.
5098 (i386_get_thread_context): Remove current_event parameter. Don't
5099 clear debug_registers_changed nor copy DR values to
5100 debug_reg_state.
5101 (i386_set_thread_context): Delete.
5102 (i386_prepare_to_resume): New function.
5103 (i386_thread_added): Mark the thread as needing to update irs
5104 debug registers.
5105 (the_low_target): Remove i386_set_thread_context and install
5106 i386_prepare_to_resume.
5107 * win32-low.c (win32_get_thread_context): Adjust.
5108 (win32_set_thread_context): Use SetThreadContext
5109 directly.
5110 (win32_prepare_to_resume): New function.
5111 (win32_require_context): New function, factored out from ...
5112 (thread_rec): ... this.
5113 (continue_one_thread): Call win32_prepare_to_resume on each thread
5114 we're about to continue.
5115 (win32_resume): Call win32_prepare_to_resume on the event thread.
5116 * win32-low.h (struct win32_thread_info)
5117 <debug_registers_changed>: New field.
5118 (struct win32_target_ops): Change prototype of set_thread_context,
5119 delete set_thread_context and add prepare_to_resume.
5120 (win32_require_context): New declaration.
5121
a442d071
GB
51222014-10-08 Gary Benson <gbenson@redhat.com>
5123
5124 * server.h: Do not include common-exceptions.h.
5125
6f1947e8
GB
51262014-10-08 Gary Benson <gbenson@redhat.com>
5127
5128 * server.h: Do not include cleanups.h.
5129
63b434a4
JH
51302014-09-30 James Hogan <james.hogan@imgtec.com>
5131
5132 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5133 mips64-dsp-linux.c.
5134
c4d9ceb6
YQ
51352014-09-23 Yao Qi <yao@codesourcery.com>
5136
5137 * linux-low.c (lp_status_maybe_breakpoint): New function.
5138 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5139 (count_events_callback): Likewise.
5140 (select_event_lwp_callback): Likewise.
5141 (cancel_breakpoints_callback): Likewise.
5142
89a5711c
DB
51432014-09-19 Don Breazeal <donb@codesourcery.com>
5144
5145 * linux-low.c (handle_extended_wait): Call
5146 linux_ptrace_get_extended_event.
5147 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5148 linux_is_extended_waitstatus.
5149
bffc0964
JB
51502014-09-16 Joel Brobecker <brobecker@adacore.com>
5151
5152 * Makefile.in (CPPFLAGS): Define.
5153 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5154 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5155
0bfdf32f
GB
51562014-09-16 Gary Benson <gbenson@redhat.com>
5157
5158 * inferiors.h (current_inferior): Renamed as...
5159 (current_thread): New variable. All uses updated.
5160 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5161 (maybe_move_out_of_jump_pad): Likewise.
5162 (cancel_breakpoint): Likewise.
5163 (linux_low_filter_event): Likewise.
5164 (wait_for_sigstop): Likewise.
5165 (linux_resume_one_lwp): Likewise.
5166 (need_step_over_p): Likewise.
5167 (start_step_over): Likewise.
5168 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5169 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5170 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5171 and save_inferior as saved_thread.
5172 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5173 saved_thread.
5174 (regcache_invalidate_thread): Likewise.
5175 * remote-utils.c (prepare_resume_reply): Likewise.
5176 * thread-db.c (thread_db_get_tls_address): Likewise.
5177 (disable_thread_event_reporting): Likewise.
5178 (remove_thread_event_breakpoints): Likewise.
5179 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5180 as saved_thread.
5181 * target.h (set_desired_inferior): Renamed as...
5182 (set_desired_thread): New declaration. All uses updated.
5183 * server.c (myresume): Updated comment to reference thread instead
5184 of inferior.
5185 (handle_serial_event): Likewise.
5186 (handle_target_event): Likewise.
5187
361c8ade
GB
51882014-09-12 Tom Tromey <tromey@redhat.com>
5189 Gary Benson <gbenson@redhat.com>
5190
5191 * regcache.h: Include common-regcache.h.
5192 (regcache_read_pc): Don't declare.
5193 * regcache.c (get_thread_regcache_for_ptid): New function.
5194
bd9269f7
GB
51952014-09-11 Tom Tromey <tromey@redhat.com>
5196 Gary Benson <gbenson@redhat.com>
5197
5198 * symbol.c: New file.
5199 * Makefile.in (SFILES): Add symbol.c.
5200 (OBS): Add symbol.o.
5201
f8c1d06b
GB
52022014-09-11 Gary Benson <gbenson@redhat.com>
5203
5204 * target.c (target_stop_ptid, target_continue_ptid): New
5205 functions.
5206
721ec300
GB
52072014-09-11 Tom Tromey <tromey@redhat.com>
5208 Gary Benson <gbenson@redhat.com>
5209
5210 * target.h: Include target/target.h.
5211 * target.c (target_read_memory, target_read_uint32)
5212 (target_write_memory): New functions.
5213
c5e92cca
GB
52142014-09-11 Gary Benson <gbenson@redhat.com>
5215
5216 * server.h (debug_hw_points): Don't declare.
5217 * server.c (debug_hw_points): Don't define. Replace all uses
5218 with show_debug_regs.
5219 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5220 all uses with show_debug_regs.
5221
2e4bb98a
EBM
52222014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5223
5224 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5225 endianness into account.
5226 (ppc_supply_ptrace_register): Likewise.
5227
ac740bc7
JH
52282014-09-03 James Hogan <james.hogan@imgtec.com>
5229
5230 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5231 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5232
97ea6506
GB
52332014-09-03 Gary Benson <gbenson@redhat.com>
5234
5235 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5236 ALL_DEBUG_ADDRESS_REGISTERS.
5237
df7e5265
GB
52382014-09-02 Gary Benson <gbenson@redhat.com>
5239
5240 * i386-low.h: Renamed as...
5241 * x86-low.h: New file. All type, function and variable name
5242 prefixes changed from "i386_" to "x86_". All references updated.
5243 * i386-low.c: Renamed as...
5244 * x86-low.c: New file. All type, function and variable name
5245 prefixes changed from "i386_" to "x86_". All references updated.
5246
ed859da7
GB
52472014-09-02 Gary Benson <gbenson@redhat.com>
5248
5249 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5250 (x86_linux_new_thread): Likewise.
5251
860789c7
GB
52522014-08-29 Gary Benson <gbenson@redhat.com>
5253
5254 * server.h (setjmp.h): Do not include.
5255 (toplevel): Do not declare.
5256 (common-exceptions.h): Include.
5257 (cleanups.h): Likewise.
5258 * server.c (toplevel): Do not define.
5259 (exit_code): New static global.
5260 (detach_or_kill_for_exit_cleanup): New function.
5261 (main): New function. Original main renamed to...
5262 (captured_main): New function.
5263 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5264
ff55e1b5
GB
52652014-08-29 Gary Benson <gbenson@redhat.com>
5266
5267 * Makefile.in (SFILES): Add common/common-exceptions.c.
5268 (OBS): Add common-exceptions.o.
5269 (common-exceptions.o): New rule.
5270 * utils.c (prepare_to_throw_exception): New function.
5271
e9bcb658
GB
52722014-08-29 Gary Benson <gbenson@redhat.com>
5273
5274 * config.in: Regenerate.
5275 * configure: Likewise.
5276
e3180625
GB
52772014-08-29 Gary Benson <gbenson@redhat.com>
5278
5279 * Makefile.in (SFILES): Add common/cleanups.c.
5280 (OBS): cleanups.o.
5281 (cleanups.o): New rule.
5282
e3d6ba5d
GB
52832014-08-29 Gary Benson <gbenson@redhat.com>
5284
5285 * utils.c (internal_vwarning): New function.
5286
7096e886
GB
52872014-08-28 Gary Benson <gbenson@redhat.com>
5288
5289 * utils.h (fatal): Remove declaration.
5290 * utils.c (fatal): Remove function.
5291
14ce3192
GB
52922014-08-28 Gary Benson <gbenson@redhat.com>
5293
5294 * tracepoint.c (gdb_agent_init): Replace fatal with
5295 perror_with_name.
5296 (initialize_tracepoint): Likewise.
5297
50278d59
GB
52982014-08-28 Gary Benson <gbenson@redhat.com>
5299
5300 * remote-utils.c (remote_prepare): Replace fatal with error.
5301
aa96c426
GB
53022014-08-28 Gary Benson <gbenson@redhat.com>
5303
5304 * linux-low.c (linux_async): Replace fatal with warning.
5305 Tidy up and return.
5306 (linux_start_non_stop): Return -1 if linux_async failed.
5307
f7160e97
GB
53082014-08-28 Gary Benson <gbenson@redhat.com>
5309
5310 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5311 gdb_assert.
5312 (i386_dr_low_get_addr): Remove vague comment.
5313 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5314 gdb_assert.
5315
38e08fca
GB
53162014-08-28 Gary Benson <gbenson@redhat.com>
5317
5318 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5319 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5320 internal_error.
5321 (linux_resume_one_lwp): Likewise.
5322 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5323 gdb_assert.
5324 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5325 with internal_error.
5326 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5327 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5328 (find_register_by_name): Replace fatal with internal_error.
5329 (find_regno): Likewise.
5330 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5331 * thread-db.c (thread_db_create_event): Likewise.
5332 (thread_db_load_search): Likewise.
5333 (try_thread_db_load_1): Likewise.
5334 * tracepoint.c (get_jump_space_head): Replace fatal with
5335 internal_error.
5336 (claim_trampoline_space): Likewise.
5337 (have_fast_tracepoint_trampoline_buffer): Likewise.
5338 (cmd_qtstart): Likewise.
5339 (stop_tracing): Likewise.
5340 (fast_tracepoint_collecting): Likewise.
5341 (target_malloc): Likewise.
5342 (download_tracepoint): Likewise.
5343 (download_trace_state_variables): Replace check with gdb_assert.
5344 (upload_fast_traceframes): Replace fatal with internal_error.
5345
34abf635
GB
53462014-08-19 Tom Tromey <tromey@redhat.com>
5347 Gary Benson <gbenson@redhat.com>
5348
5349 * Makefile.in (SFILES): Add common/common-debug.c.
5350 (OBS): Add common-debug.o.
5351 (common-debug.o): New rule.
5352 * debug.h (debug_printf): Don't declare.
5353 * debug.c (debug_printf): Renamed and rewritten as...
5354 (debug_vprintf): New function.
5355
f6e94d78
GB
53562014-08-19 Gary Benson <gbenson@redhat.com>
5357
5358 * utils.h: Do not include print-utils.h.
5359
9239eeab
GB
53602014-08-19 Tom Tromey <tromey@redhat.com>
5361 Gary Benson <gbenson@redhat.com>
5362
5363 * server.h: Add static assertion.
5364 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5365
ef87c8bb
GB
53662014-08-19 Tom Tromey <tromey@redhat.com>
5367 Gary Benson <gbenson@redhat.com>
5368
5369 * Makefile.in (SFILES): Add common/errors.c.
5370 (OBS): Add errors.o.
5371 (IPA_OBS): Add errors-ipa.o.
5372 (errors.o): New rule.
5373 (errors-ipa.o): Likewise.
5374 * utils.h (perror_with_name, error, warning): Don't declare.
5375 * utils.c (warning): Renamed and rewritten as...
5376 (vwarning): New function.
5377 (error): Renamed and rewritten as...
5378 (verror): New function.
5379 (internal_error): Renamed and rewritten as...
5380 (internal_verror): New function.
5381
bb974a24
GB
53822014-08-07 Gary Benson <gbenson@redhat.com>
5383
5384 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5385 * configure: Regenerate.
5386 * config.in: Likewise.
5387 * server.h: Do not include errno.h.
5388 * event-loop.c: Likewise.
5389 * hostio-errno.c: Likewise.
5390 * linux-low.c: Likewise.
5391 * remote-utils.c: Likewise.
5392 * spu-low.c: Likewise.
5393 * utils.c: Likewise.
5394 * gdbreplay.c: Unconditionally include errno.h.
5395
6d3d12eb
GB
53962014-08-07 Gary Benson <gbenson@redhat.com>
5397
5398 * server.h: Do not include string.h.
5399 * event-loop.c: Likewise.
5400 * linux-low.c: Likewise.
5401 * regcache.c: Likewise.
5402 * remote-utils.c: Likewise.
5403 * spu-low.c: Likewise.
5404 * utils.c: Likewise.
5405
dccbb609
GB
54062014-08-07 Gary Benson <gbenson@redhat.com>
5407
5408 * server.h: Do not include gdb_assert.h.
5409
e76df0d0
GB
54102014-08-07 Gary Benson <gbenson@redhat.com>
5411
5412 * server.h: Do not include common-utils.h.
5413
4cb9c816
GB
54142014-08-07 Gary Benson <gbenson@redhat.com>
5415
5416 * server.h: Do not include ptid.h.
5417 * notif.h: Likewise.
5418
3995eeee
GB
54192014-08-07 Gary Benson <gbenson@redhat.com>
5420
5421 * server.h: Do not include gdb_locale.h.
5422
cb9f1a9b
GB
54232014-08-07 Gary Benson <gbenson@redhat.com>
5424
5425 * server.h: Do not include gdb/signals.h.
5426 * win32-low.c: Likewise.
5427
a5fceff8
GB
54282014-08-07 Gary Benson <gbenson@redhat.com>
5429
5430 * server.h: Do not include pathmax.h.
5431
b9391142
GB
54322014-08-07 Gary Benson <gbenson@redhat.com>
5433
5434 * server.h: Do not include libiberty.h.
5435 * linux-bfin-low.c: Likewise.
5436
0e443c87
GB
54372014-08-07 Gary Benson <gbenson@redhat.com>
5438
5439 * server.h: Do not include ansidecl.h.
5440
8ebb3f56
GB
54412014-08-07 Gary Benson <gbenson@redhat.com>
5442
5443 * linux-x86-low.c: Do not include stddef.h.
5444 * lynx-ppc-low.c: Likewise.
5445 * tracepoint.c: Likewise.
5446
8980bdf6
GB
54472014-08-07 Gary Benson <gbenson@redhat.com>
5448
5449 * server.h: Do not include stdarg.h.
5450 * nto-low.c: Likewise.
5451
d7096f71
GB
54522014-08-07 Gary Benson <gbenson@redhat.com>
5453
5454 * server.h: Do not include stdlib.h.
5455 * inferiors.c: Likewise.
5456 * linux-low.c: Likewise.
5457 * regcache.c: Likewise.
5458 * spu-low.c: Likewise.
5459 * tracepoint.c: Likewise.
5460 * utils.c: Likewise.
5461
d02f550d
GB
54622014-08-07 Gary Benson <gbenson@redhat.com>
5463
5464 * server.h: Do not include stdio.h.
5465 * linux-low.c: Likewise.
5466 * remote-utils.c: Likewise.
5467 * spu-low.c: Likewise.
5468 * utils.c: Likewise.
5469 * wincecompat.c: Likewise.
5470
87f6c4e3
GB
54712014-08-06 Gary Benson <gbenson@redhat.com>
5472
5473 * regcache.c (init_register_cache): Move conditionals inside if.
5474
7089dca4
GB
54752014-08-06 Gary Benson <gbenson@redhat.com>
5476
5477 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5478
462f517e
GB
54792014-07-31 Gary Benson <gbenson@redhat.com>
5480
5481 * ax.h: Do not include server.h.
5482 * gdbthread.h: Likewise.
5483 * lynx-low.h: Likewise.
5484 * notif.h: Likewise.
5485
976411d6
GB
54862014-07-30 Gary Benson <gbenson@redhat.com>
5487
5488 * server.h: Include common-defs.h.
5489 Do not include config.h or build-gnulib-gdbserver/config.h.
5490
d41f6d8e
GB
54912014-07-30 Gary Benson <gbenson@redhat.com>
5492
5493 * hostio-errno.c: Move server.h to top of includes list.
5494 * inferiors.c: Likewise.
5495 * linux-x86-low.c: Likewise.
5496 * notif.c: Include server.h.
5497
314c6a35
TT
54982014-07-24 Tom Tromey <tromey@redhat.com>
5499 Gary Benson <gbenson@redhat.com>
5500
5501 * server.h (CORE_ADDR): Now unsigned.
5502
69ff6be5
PA
55032014-07-16 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5506
ce9e3fe7
PA
55072014-07-15 Pedro Alves <palves@redhat.com>
5508
5509 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5510 copy.
5511
e76126e8
PA
55122014-07-11 Pedro Alves <palves@redhat.com>
5513
5514 * linux-low.c (kill_wait_lwp): New function, based on
5515 kill_one_lwp_callback, but use my_waitpid directly.
5516 (kill_one_lwp_callback, linux_kill): Use it.
5517
8e9db26e
PA
55182014-06-23 Pedro Alves <palves@redhat.com>
5519
5520 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5521 before setting DR0..DR3.
5522
698b3e08
GB
55232014-06-20 Gary Benson <gbenson@redhat.com>
5524
5525 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5526 * configure: Regenerated.
5527 * config.in: Likewise.
5528
125f8a3d
GB
55292014-06-20 Gary Benson <gbenson@redhat.com>
5530
5531 * Makefile.in (SFILES): Update locations for files moved
5532 from common to nat.
5533 (object file files): Reordered.
5534
42995dbd
GB
55352014-06-20 Gary Benson <gbenson@redhat.com>
5536
5537 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5538 (i386_dr_low_set_addr): Likewise.
5539 (i386_dr_low_get_addr): Likewise.
5540 (i386_dr_low_can_set_control): Likewise.
5541 (i386_dr_low_set_control): Likewise.
5542 (i386_dr_low_get_control): Likewise.
5543 (i386_dr_low_get_status): Likewise.
5544 (i386_get_debug_register_length): Likewise.
5545 * linux-x86-low.c (i386_dr_low_set_addr):
5546 Changed signature. Made static.
5547 (i386_dr_low_get_addr): Likewise.
5548 (i386_dr_low_set_control): Likewise.
5549 (i386_dr_low_get_control): Likewise.
5550 (i386_dr_low_get_status): Likewise.
5551 (i386_dr_low): New global variable.
5552 * win32-i386-low.c (i386_dr_low_set_addr):
5553 Changed signature. Made static.
5554 (i386_dr_low_get_addr): Likewise.
5555 (i386_dr_low_set_control): Likewise.
5556 (i386_dr_low_get_control): Likewise.
5557 (i386_dr_low_get_status): Likewise.
5558 (i386_dr_low): New global variable.
5559
e1d2394b
MS
55602014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5561
5562 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5563 * Makefile.in (AR, AR_FLAGS): Define.
5564 * configure: Regenerate.
5565
3a8ee006
GB
55662014-06-19 Gary Benson <gbenson@redhat.com>
5567
5568 * Makefile.in (i386-dregs.o): New rule.
5569 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5570 * i386-low.c (target.h): Remove include.
5571 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5572 (DR_CONTROL_SHIFT): Likewise.
5573 (DR_CONTROL_SIZE): Likewise.
5574 (DR_RW_EXECUTE): Likewise.
5575 (DR_RW_WRITE): Likewise.
5576 (DR_RW_READ): Likewise.
5577 (DR_RW_IORW): Likewise.
5578 (DR_LEN_1): Likewise.
5579 (DR_LEN_2): Likewise.
5580 (DR_LEN_4): Likewise.
5581 (DR_LEN_8): Likewise.
5582 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5583 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5584 (DR_ENABLE_SIZE): Likewise.
5585 (DR_LOCAL_SLOWDOWN): Likewise.
5586 (DR_GLOBAL_SLOWDOWN): Likewise.
5587 (DR_CONTROL_RESERVED): Likewise.
5588 (I386_DR_CONTROL_MASK): Likewise.
5589 (I386_DR_VACANT): Likewise.
5590 (I386_DR_LOCAL_ENABLE): Likewise.
5591 (I386_DR_GLOBAL_ENABLE): Likewise.
5592 (I386_DR_DISABLE): Likewise.
5593 (I386_DR_SET_RW_LEN): Likewise.
5594 (I386_DR_GET_RW_LEN): Likewise.
5595 (I386_DR_WATCH_HIT): Likewise.
5596 (i386_wp_op_t): Likewise.
5597 (i386_show_dr): Likewise.
5598 (i386_length_and_rw_bits): Likewise.
5599 (i386_insert_aligned_watchpoint): Likewise.
5600 (i386_remove_aligned_watchpoint): Likewise.
5601 (i386_handle_nonaligned_watchpoint): Likewise.
5602 i386_update_inferior_debug_regs(): Likewise.
5603 (i386_dr_insert_watchpoint): Likewise.
5604 (i386_dr_remove_watchpoint): Likewise.
5605 (i386_dr_region_ok_for_watchpoint): Likewise.
5606 (i386_dr_stopped_data_address): Likewise.
5607 (i386_dr_stopped_by_watchpoint): Likewise.
5608
8f26655c
GB
56092014-06-19 Gary Benson <gbenson@redhat.com>
5610
5611 * i386-low.c (i386_dr_show): Renamed to
5612 i386_show_dr and made static. All uses updated.
5613 (i386_dr_length_and_rw_bits): Renamed to
5614 i386_length_and_rw_bits and made static.
5615 All uses updated.
5616 (i386_dr_insert_aligned_watchpoint): Renamed to
5617 i386_insert_aligned_watchpoint and made static.
5618 All uses updated.
5619 (i386_dr_remove_aligned_watchpoint): Renamed to
5620 i386_remove_aligned_watchpoint and made static.
5621 All uses updated.
5622 (i386_dr_update_inferior_debug_regs): Renamed to
5623 i386_update_inferior_debug_regs and made static.
5624 All uses updated.
5625
b9228891
GB
56262014-06-18 Gary Benson <gbenson@redhat.com>
5627
5171def3
GB
5628 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5629 (i386_dr_low_can_set_control): Likewise.
5630 (i386_get_debug_register_length): Likewise.
5631 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5632 (i386_dr_low_can_set_control): Likewise.
5633 (i386_get_debug_register_length): Likewise.
5634
56352014-06-17 Gary Benson <gbenson@redhat.com>
5636
b9228891
GB
5637 * i386-low.h (i386-dregs.h): New include.
5638 (DR_FIRSTADDR): Now in i386-dregs.h.
5639 (DR_LASTADDR): Likewise.
5640 (DR_NADDR): Likewise.
5641 (DR_STATUS): Likewise.
5642 (DR_CONTROL): Likewise.
5643 (i386_debug_reg_state): Likewise.
5644 (i386_dr_insert_watchpoint): Likewise.
5645 (i386_dr_remove_watchpoint): Likewise.
5646 (i386_dr_region_ok_for_watchpoint): Likewise.
5647 (i386_dr_stopped_data_address): Likewise.
5648 (i386_dr_stopped_by_watchpoint): Likewise.
5649 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5650
4be83cc2
GB
56512014-06-18 Gary Benson <gbenson@redhat.com>
5652
5653 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5654 i386_dr_insert_watchpoint.
5655 (i386_low_remove_watchpoint): Renamed to
5656 i386_dr_remove_watchpoint.
5657 (i386_low_region_ok_for_watchpoint): Renamed to
5658 i386_dr_region_ok_for_watchpoint.
5659 (i386_low_stopped_data_address): Renamed to
5660 i386_dr_stopped_data_address.
5661 (i386_low_stopped_by_watchpoint): Renamed to
5662 i386_dr_stopped_by_watchpoint.
5663 * i386-low.c (i386_show_dr): Renamed to
5664 i386_dr_show and made nonstatic. All uses updated.
5665 (i386_length_and_rw_bits): Renamed to
5666 i386_dr_length_and_rw_bits and made nonstatic.
5667 All uses updated.
5668 (i386_insert_aligned_watchpoint): Renamed to
5669 i386_dr_insert_aligned_watchpoint and made nonstatic.
5670 All uses updated.
5671 (i386_remove_aligned_watchpoint): Renamed to
5672 i386_dr_remove_aligned_watchpoint and made nonstatic.
5673 All uses updated.
5674 (i386_update_inferior_debug_regs): Renamed to
5675 i386_dr_update_inferior_debug_regs and made nonstatic.
5676 All uses updated.
5677 (i386_low_insert_watchpoint): Renamed to
5678 i386_dr_insert_watchpoint. All uses updated.
5679 (i386_low_remove_watchpoint): Renamed to
5680 i386_dr_remove_watchpoint. All uses updated.
5681 (i386_low_region_ok_for_watchpoint): Renamed to
5682 i386_dr_region_ok_for_watchpoint. All uses updated.
5683 (i386_low_stopped_data_address): Renamed to
5684 i386_dr_stopped_data_address. All uses updated.
5685 (i386_low_stopped_by_watchpoint): Renamed to
5686 i386_dr_stopped_by_watchpoint. All uses updated.
5687
131aa0d4
GB
56882014-06-18 Gary Benson <gbenson@redhat.com>
5689
5690 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5691 (i386_dr_low_can_set_control): Likewise.
5692 (i386_insert_aligned_watchpoint): New check.
5693
d9305f7f
GB
56942014-06-18 Gary Benson <gbenson@redhat.com>
5695
5696 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5697 Renamed to state.
5698
e927c9fc
GB
56992014-06-18 Gary Benson <gbenson@redhat.com>
5700
5701 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5702 instead of fatal and error.
5703 (i386_handle_nonaligned_watchpoint): Likewise.
5704
1b6d4134
GB
57052014-06-18 Gary Benson <gbenson@redhat.com>
5706
5707 * i386-low.c (i386_get_debug_register_length): New macro.
5708 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5709 (i386_show_dr): Use debug_printf instead of fprintf. Use
5710 phex to format values.
5711
6e62758f
GB
57122014-06-18 Gary Benson <gbenson@redhat.com>
5713
5714 * i386-low.h: Comment changes.
5715 * i386-low.c: Likewise.
5716
fc6e2f03
GB
57172014-06-18 Gary Benson <gbenson@redhat.com>
5718
5719 * i386-low.c: Whitespace changes.
5720
f9d1eeed
TT
57212014-06-12 Tom Tromey <tromey@redhat.com>
5722
5723 * utils.c (freeargv): Remove.
5724
0b04e523
TT
57252014-06-12 Tom Tromey <tromey@redhat.com>
5726
5727 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5728 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5729 (parse_debug_format_options): Likewise.
5730 (gdbserver_usage): Likewise.
5731 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5732 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5733 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5734 against libiberty.
5735 ($(LIBGNU)): Depend on libiberty.
5736 (all-lib): Recurse into all subdirs.
5737 (install-only): Invoke "install" target in subdirs.
5738 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5739 targets.
5740 * configure: Rebuild.
5741 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5742 for vasprintf, vsnprintf, or gettimeofday.
5743 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5744 srv_tgtobj.
5745
270c9937
JB
57462014-06-05 Joel Brobecker <brobecker@adacore.com>
5747
5748 * development.sh: Delete.
5749 * Makefile.in (config.status): Adjust dependency on development.sh.
5750 * configure.ac: Adjust development.sh source call.
5751 * configure: Regenerate.
5752
0a261ed8
PA
57532014-06-02 Pedro Alves <palves@redhat.com>
5754
5755 * ax.c (gdb_free_agent_expr): New function.
5756 * ax.h (gdb_free_agent_expr): New declaration.
5757 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5758 list.
5759 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5760 static.
5761 (clear_breakpoint_conditions_and_commands): New function.
5762 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5763 (clear_breakpoint_conditions_and_commands): New declaration.
5764
e9dae05e
RR
57652014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5766
5767 * linux-aarch64-low.c (asm/ptrace.h): Include.
5768
5876f503
JK
57692014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5770
5771 Fix TLS access for -static -pthread.
5772 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5773 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5774 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5775
802e8e6d
PA
57762014-05-20 Pedro Alves <palves@redhat.com>
5777
5778 * linux-aarch64-low.c (aarch64_insert_point)
5779 (aarch64_remove_point): No longer check whether the type is
5780 supported here. Adjust to new interface.
5781 (the_low_target): Install aarch64_supports_z_point_type as
5782 supports_z_point_type method.
5783 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5784 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5785 instead of a Z packet char. Adjust.
5786 (arm_supports_z_point_type): New function.
5787 (arm_insert_point, arm_remove_point): Adjust to new interface.
5788 (the_low_target): Install arm_supports_z_point_type.
5789 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5790 (cris_insert_point, cris_remove_point): Adjust to new interface.
5791 Don't check whether the type is supported here.
5792 (the_low_target): Install cris_supports_z_point_type.
5793 * linux-low.c (linux_supports_z_point_type): New function.
5794 (linux_insert_point, linux_remove_point): Adjust to new interface.
5795 * linux-low.h (struct linux_target_ops) <insert_point,
5796 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5797 raw_breakpoint pointer parameter.
5798 <supports_z_point_type>: New method.
5799 * linux-mips-low.c (mips_supports_z_point_type): New function.
5800 (mips_insert_point, mips_remove_point): Adjust to new interface.
5801 Use mips_supports_z_point_type.
5802 (the_low_target): Install mips_supports_z_point_type.
5803 * linux-ppc-low.c (the_low_target): Install NULL as
5804 supports_z_point_type method.
5805 * linux-s390-low.c (the_low_target): Install NULL as
5806 supports_z_point_type method.
5807 * linux-sparc-low.c (the_low_target): Install NULL as
5808 supports_z_point_type method.
5809 * linux-x86-low.c (x86_supports_z_point_type): New function.
5810 (x86_insert_point): Adjust to new insert_point interface. Use
5811 insert_memory_breakpoint. Adjust to new
5812 i386_low_insert_watchpoint interface.
5813 (x86_remove_point): Adjust to remove_point interface. Use
5814 remove_memory_breakpoint. Adjust to new
5815 i386_low_remove_watchpoint interface.
5816 (the_low_target): Install x86_supports_z_point_type.
5817 * lynx-low.c (lynx_target_ops): Install NULL as
5818 supports_z_point_type callback.
5819 * nto-low.c (nto_supports_z_point_type): New.
5820 (nto_insert_point, nto_remove_point): Adjust to new interface.
5821 (nto_target_ops): Install nto_supports_z_point_type.
5822 * mem-break.c: Adjust intro comment.
5823 (struct raw_breakpoint) <raw_type, size>: New fields.
5824 <inserted>: Update comment.
5825 <shlib_disabled>: Delete field.
5826 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5827 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5828 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5829 (raw_bkpt_type_to_target_hw_bp_type): New function.
5830 (find_enabled_raw_code_breakpoint_at): New function.
5831 (find_raw_breakpoint_at): New type and size parameters. Use them.
5832 (insert_memory_breakpoint): New function, based off
5833 set_raw_breakpoint_at.
5834 (remove_memory_breakpoint): New function.
5835 (set_raw_breakpoint_at): Reimplement.
5836 (set_breakpoint): New, based on set_breakpoint_at.
5837 (set_breakpoint_at): Reimplement.
5838 (delete_raw_breakpoint): Go through the_target->remove_point
5839 instead of assuming memory breakpoints.
5840 (find_gdb_breakpoint_at): Delete.
5841 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5842 (find_gdb_breakpoint): New function.
5843 (set_gdb_breakpoint_at): Delete.
5844 (z_type_supported): New function.
5845 (set_gdb_breakpoint_1): New function, loosely based off
5846 set_gdb_breakpoint_at.
5847 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5848 (delete_gdb_breakpoint_at): Delete.
5849 (delete_gdb_breakpoint_1): New function, loosely based off
5850 delete_gdb_breakpoint_at.
5851 (delete_gdb_breakpoint): New function.
5852 (clear_gdb_breakpoint_conditions): Rename to ...
5853 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5854 breakpoint.
5855 (add_condition_to_breakpoint): Make static.
5856 (add_breakpoint_condition): Take a struct breakpoint pointer
5857 instead of an address. Adjust.
5858 (gdb_condition_true_at_breakpoint): Rename to ...
5859 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5860 z_type parameter.
5861 (gdb_condition_true_at_breakpoint): Reimplement.
5862 (add_breakpoint_commands): Take a struct breakpoint pointer
5863 instead of an address. Adjust.
5864 (gdb_no_commands_at_breakpoint): Rename to ...
5865 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5866 parameter. Return true if no breakpoint was found. Change debug
5867 output.
5868 (gdb_no_commands_at_breakpoint): Reimplement.
5869 (run_breakpoint_commands): Rename to ...
5870 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5871 and change return type to boolean.
5872 (run_breakpoint_commands): New function.
5873 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5874 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5875 breakpoint. Go through the_target->remove_point instead of
5876 assuming memory breakpoint.
5877 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5878 software and hardware breakpoints.
5879 (reinsert_raw_breakpoint): Go through the_target->insert_point
5880 instead of assuming memory breakpoint.
5881 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5882 software and hardware breakpoints.
5883 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5884 Check both software and hardware breakpoints.
5885 (validate_inserted_breakpoint): Assert the breakpoint is a
5886 software breakpoint. Set the inserted flag to -1 instead of
5887 setting shlib_disabled.
5888 (delete_disabled_breakpoints): Adjust.
5889 (validate_breakpoints): Only validate software breakpoints.
5890 Adjust to inserted flag change.
5891 (check_mem_read, check_mem_write): Skip breakpoint types other
5892 than software breakpoints. Adjust to inserted flag change.
5893 * mem-break.h (enum raw_bkpt_type): New enum.
5894 (raw_breakpoint, struct process_info): Forward declare.
5895 (Z_packet_to_target_hw_bp_type): Delete declaration.
5896 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5897 (set_gdb_breakpoint, delete_gdb_breakpoint)
5898 (clear_breakpoint_conditions): New declarations.
5899 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5900 (breakpoint_inserted_here): Update comment.
5901 (add_breakpoint_condition, add_breakpoint_commands): Replace
5902 address parameter with a breakpoint pointer parameter.
5903 (gdb_breakpoint_here): Update comment.
5904 (delete_gdb_breakpoint_at): Delete.
5905 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5906 * server.c (process_point_options): Take a struct breakpoint
5907 pointer instead of an address. Adjust.
5908 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5909 delete_gdb_breakpoint.
5910 * spu-low.c (spu_target_ops): Install NULL as
5911 supports_z_point_type method.
5912 * target.h: Include mem-break.h.
5913 (struct target_ops) <prepare_to_access_memory>: Update comment.
5914 <supports_z_point_type>: New field.
5915 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5916 instead of a char. Also take a raw breakpoint pointer.
5917 * win32-arm-low.c (the_low_target): Install NULL as
5918 supports_z_point_type.
5919 * win32-i386-low.c (i386_supports_z_point_type): New function.
5920 (i386_insert_point, i386_remove_point): Adjust to new interface.
5921 (the_low_target): Install i386_supports_z_point_type.
5922 * win32-low.c (win32_supports_z_point_type): New function.
5923 (win32_insert_point, win32_remove_point): Adjust to new interface.
5924 (win32_target_ops): Install win32_supports_z_point_type.
5925 * win32-low.h (struct win32_target_ops):
5926 <supports_z_point_type>: New method.
5927 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5928 instead of a char. Also take a raw breakpoint pointer.
5929
932539e3
PA
59302014-05-20 Pedro Alves <palves@redhat.com>
5931
5932 * mem-break.h: Include break-common.h.
5933 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5934 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5935 (Z_packet_to_target_hw_bp_type): New declaration.
5936 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5937 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5938 (Z_PACKET_ACCESS_WP): Delete macros.
5939 (Z_packet_to_hw_type): Delete function.
5940 * i386-low.h: Don't include break-common.h here.
5941 (Z_packet_to_hw_type): Delete declaration.
5942 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5943 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5944 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5945 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5946 * linux-aarch64-low.c: Don't include break-common.h here.
5947 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5948 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5949 (Z_packet_to_target_hw_bp_type): Delete function.
5950 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5951 function.
5952 (mips_insert_point, mips_remove_point): Use
5953 Z_packet_to_target_hw_bp_type.
5954
4ff0d3d8
PA
59552014-05-20 Pedro Alves <palves@redhat.com>
5956
5957 * linux-aarch64-low.c: Include break-common.h.
5958 (enum target_point_type): Delete.
5959 (Z_packet_to_point_type): Rename to ...
5960 (Z_packet_to_target_hw_bp_type): ... this, and return a
5961 target_hw_bp_type instead.
5962 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5963 instead of an enum target_point_type.
5964 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5965 breakpoint type.
5966 (aarch64_dr_state_insert_one_point)
5967 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5968 (aarch64_handle_aligned_watchpoint)
5969 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5970 Take an enum target_hw_bp_type instead of an enum
5971 target_point_type.
5972 (aarch64_supports_z_point_type): New function.
5973 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5974 use Z_packet_to_target_hw_bp_type.
5975
786dc519
JB
59762014-05-20 Joel Brobecker <brobecker@adacore.com>
5977
5978 * configure.ac: Only use -Werror by default when DEVELOPMENT
5979 is true.
5980 * configure: Regenerate.
5981
9e0aa64f
JK
59822014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5983
5984 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5985 * linux-x86-low.c (X86_64_USER_REGS): New.
5986 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5987
2b577b92
YQ
59882014-04-28 Yao Qi <yao@codesourcery.com>
5989
5990 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5991 name.
5992
94611da2
PA
59932014-04-25 Pedro Alves <palves@redhat.com>
5994
5995 PR server/16255
5996 * linux-low.c (linux_attach_fail_reason_string): New function.
5997 (linux_attach_lwp): Delete.
5998 (linux_attach_lwp_1): Rename to ...
5999 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6000 argument. Remove "initial" parameter. Return int instead of
6001 void. Don't error or warn here.
6002 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6003 failure to attach to the tgid. Call warning when failing to
6004 attach to an lwp.
6005 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6006 argument. Remove "initial" parameter. Return int instead of
6007 void. Don't error or warn here.
6008 (linux_attach_fail_reason_string): New declaration.
6009 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6010 interface change. Use linux_attach_fail_reason_string.
6011
01f9f808
MS
60122014-04-24 Michael Sturm <michael.sturm@mintel.com>
6013 Walfred Tedeschi <walfred.tedeschi@intel.com>
6014
6015 * Makefile.in: Added rules to handle new files
6016 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6017 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6018 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6019 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6020 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6021 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6022 x32-avx512-linux.o.
6023 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6024 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6025 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6026 i386/x32-avx512.xml.
6027 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6028 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6029 i386/x32-avx512-linux.xml.
6030 * i387-fp.c (num_avx512_k_registers): New constant for number
6031 of K registers.
6032 (num_avx512_zmmh_low_registers): New constant for number of
6033 lower ZMM registers (0-15).
6034 (num_avx512_zmmh_high_registers): New constant for number of
6035 higher ZMM registers (16-31).
6036 (num_avx512_ymmh_registers): New contant for number of higher
6037 YMM registers (ymm16-31 added by avx521 on x86_64).
6038 (num_avx512_xmm_registers): New constant for number of higher
6039 XMM registers (xmm16-31 added by AVX512 on x86_64).
6040 (struct i387_xsave): Add space for AVX512 registers.
6041 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6042 Add code to handle AVX512 registers.
6043 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6044 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6045 prototypei from generated file.
6046 (tdesc_amd64_avx512_linux): Likewise.
6047 (init_registers_x32_avx512_linux): Likewise.
6048 (tdesc_x32_avx512_linux): Likewise.
6049 (init_registers_i386_avx512_linux): Likewise.
6050 (tdesc_i386_avx512_linux): Likewise.
6051 (x86_64_regmap): Add AVX512 registers.
6052 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6053 mask.
6054 (initialize_low_arch): Add code to initialize AVX512 registers.
6055
51aa91f9
PA
60562014-04-23 Pedro Alves <palves@redhat.com>
6057
6058 * mem-break.c (find_gdb_breakpoint_at): Make static.
6059 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6060
a4165e94
PA
60612014-04-23 Pedro Alves <palves@redhat.com>
6062
6063 * i386-low.c: Don't include break-common.h here.
6064 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6065 prototype to take target_hw_bp_type as argument instead of a Z
6066 packet char.
6067 * i386-low.h: Include break-common.h here.
6068 (Z_packet_to_hw_type): Declare.
6069 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6070 prototypes.
6071 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6072 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6073 (x86_remove_point): Convert the packet number to a
6074 target_hw_bp_type before calling i386_low_remove_watchpoint.
6075 * win32-i386-low.c (i386_insert_point): Convert the packet number
6076 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6077 (i386_remove_point): Convert the packet number to a
6078 target_hw_bp_type before calling i386_low_remove_watchpoint.
6079
b8acf843
PA
60802014-04-23 Pedro Alves <palves@redhat.com>
6081
6082 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6083
d708bcd1
PA
60842014-04-10 Pedro Alves <palves@redhat.com>
6085
6086 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6087 Check if the condition or command is NULL before checking if the
6088 breakpoint is known. On success, return true.
6089 * mem-break.h (add_breakpoint_condition): Document return.
6090 (add_breakpoint_commands): Add describing comment.
6091 * server.c (skip_to_semicolon): New function.
6092 (process_point_options): Use it.
6093
2eec7d5b
PA
60942014-04-09 Pedro Alves <palves@redhat.com>
6095
6096 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6097 to lwpid_of.
6098
fa96cb38
PA
60992014-02-27 Pedro Alves <palves@redhat.com>
6100
6101 PR 12702
6102 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6103 macros.
6104 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6105 output.
6106 (last_thread_of_process_p): Take a PID argument instead of a
6107 thread pointer.
6108 (linux_wait_for_lwp): Delete.
6109 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6110 functions.
6111 (linux_low_filter_event): New function, party factored out from
6112 linux_wait_for_event.
6113 (linux_wait_for_event): Rename to ...
6114 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6115 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6116 sigsuspend. Check for zombie leaders.
6117 (linux_wait_for_event): Reimplement as wrapper around
6118 linux_wait_for_event_filtered.
6119 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6120 a normal or signal exit is seen, it's the whole process exiting.
6121 (wait_for_sigstop): No longer a for_each_inferior callback.
6122 Rewrite on top of linux_wait_for_event_filtered.
6123 (stop_all_lwps): Call wait_for_sigstop directly.
6124 * server.c (resume, handle_target_event): Handle
6125 TARGET_WAITKIND_NO_RESUMED.
6126
d763de10
JB
61272014-02-26 Joel Brobecker <brobecker@adacore.com>
6128
6129 * win32-low.c (psapi_get_dll_name,
6130 * win32_CreateToolhelp32Snapshot): Delete.
6131 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6132 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6133 Delete.
6134 (handle_load_dll): Add function description.
6135 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6136
850a0f76
JB
61372014-02-26 Joel Brobecker <brobecker@adacore.com>
6138
6139 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6140 Add comment.
6141 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6142 base address when calling win32_add_one_solib.
6143 (handle_load_dll): Delete local variable load_addr.
6144 Remove 0x1000 offset applied to DLL base address when calling
6145 win32_add_one_solib.
6146 (handle_unload_dll): Add comment.
6147
f25b3fc3
JB
61482014-02-26 Joel Brobecker <brobecker@adacore.com>
6149
6150 * win32-low.c (win32_add_all_dlls): Renames
6151 win32_ensure_ntdll_loaded. Rewrite function documentation.
6152 Adjust implementation to always load all DLLs.
6153 Add 0x1000 offset to DLL base address when calling
6154 win32_add_one_solib.
6155 (child_initialization_done): New static global.
6156 (do_initial_child_stuff): Set child_initialization_done to
6157 zero during child initialization, and 1 after. Replace call
6158 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6159 Add comment.
6160 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6161 (handle_unload_dll): Add function documentation.
6162 (get_child_debug_event): Ignore load and unload DLL events
6163 during child initialization.
6164
d86d4aaf
DE
61652014-02-20 Doug Evans <dje@google.com>
6166
3bc32da3 6167 Remove global all_lwps.
d86d4aaf
DE
6168 * inferiors.h (ptid_of): Move here from linux-low.h.
6169 (pid_of, lwpid_of): Ditto.
6170 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6171 parameter is a struct thread_info * now.
6172 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6173 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6174 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6175 directly.
6176 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6177 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6178 * linux-arm-low.c (update_registers_callback): Update, "entry"
6179 parameter is a struct thread_info * now.
6180 Fetch lwpid from current_inferior directly.
6181 (arm_insert_point): Pass &all_threads to find_inferior instead of
6182 &all_lwps.
6183 (arm_remove_point): Ditto.
6184 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6185 (arm_prepare_to_resume): Fetch pid from thread.
6186 (arm_read_description): Fetch lwpid from current_inferior directly.
6187 * linux-low.c (all_lwps): Delete.
6188 (delete_lwp): Delete call to remove_inferior.
6189 (handle_extended_wait): Fetch lwpid from thread.
6190 (add_lwp): Don't set lwp->entry.id. Remove call to
6191 add_inferior_to_list.
6192 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6193 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6194 (kill_one_lwp_callback): Ditto.
6195 (linux_kill): Don't dereference NULL pointer.
6196 Fetch ptid,lwpid from thread.
6197 (get_detach_signal): Fetch ptid from thread.
6198 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6199 Simplify call to regcache_invalidate_thread.
6200 (delete_lwp_callback): Update, "entry" parameter is a
6201 struct thread_info * now. Fetch pid from thread.
6202 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6203 (status_pending_p_callback): Update, "entry" parameter is a
6204 struct thread_info * now. Fetch ptid from thread.
6205 (find_lwp_pid): Update, "entry" parameter is a
6206 struct thread_info * now.
6207 (linux_wait_for_lwp): Fetch pid from thread.
6208 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6209 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6210 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6211 (dequeue_one_deferred_signal): Ditto.
6212 (cancel_breakpoint): Fetch ptid from current_inferior.
6213 (linux_wait_for_event): Pass &all_threads to find_inferior,
6214 not &all_lwps. Fetch ptid, lwpid from thread.
6215 (count_events_callback): Update, "entry" parameter is a
6216 struct thread_info * now.
6217 (select_singlestep_lwp_callback): Ditto.
6218 (select_event_lwp_callback): Ditto.
6219 (cancel_breakpoints_callback): Ditto.
6220 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6221 not &all_lwps.
6222 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6223 (unsuspend_one_lwp): Update, "entry" parameter is a
6224 struct thread_info * now.
6225 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6226 not &all_lwps.
6227 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6228 Fetch lwpid from thread, not lwp.
6229 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6230 Pass &all_threads to find_inferior, not &all_lwps.
6231 (send_sigstop): Fetch lwpid from thread, not lwp.
6232 (send_sigstop_callback): Update, "entry" parameter is a
6233 struct thread_info * now.
6234 (suspend_and_send_sigstop_callback): Ditto.
6235 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6236 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6237 struct thread_info * now.
6238 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6239 from thread, lwp.
6240 (lwp_running): Update, "entry" parameter is a
6241 struct thread_info * now.
6242 (stop_all_lwps): Fetch ptid from thread.
6243 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6244 (linux_resume_one_lwp): Fetch lwpid from thread.
6245 (linux_set_resume_request): Update, "entry" parameter is a
6246 struct thread_info * now. Fetch pid, lwpid from thread.
6247 (resume_status_pending_p): Update, "entry" parameter is a
6248 struct thread_info * now.
6249 (need_step_over_p): Ditto. Fetch lwpid from thread.
6250 (start_step_over): Fetch lwpid from thread.
6251 (linux_resume_one_thread): Update, "entry" parameter is a
6252 struct thread_info * now. Fetch lwpid from thread.
6253 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6254 (proceed_one_lwp): Update, "entry" parameter is a
6255 struct thread_info * now. Fetch lwpid from thread.
6256 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6257 struct thread_info * now.
6258 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6259 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6260 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6261 directly.
6262 (regsets_store_inferior_registers): Ditto.
6263 (fetch_register, store_register): Ditto.
6264 (linux_read_memory, linux_write_memory): Ditto.
6265 (linux_request_interrupt): Ditto.
6266 (linux_read_auxv): Ditto.
6267 (linux_xfer_siginfo): Ditto.
6268 (linux_qxfer_spu): Ditto.
6269 (linux_qxfer_libraries_svr4): Ditto.
6270 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6271 moved to inferiors.h.
6272 (get_lwp): Delete.
6273 (get_thread_lwp): Update.
6274 (struct lwp_info): Delete member "entry". Simplify comment for
6275 member "thread".
6276 (all_lwps): Delete.
6277 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6278 current_inferior directly.
6279 (update_watch_registers_callback): Update, "entry" parameter is a
6280 struct thread_info * now. Fetch pid from thread.
6281 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6282 (mips_insert_point): Fetch lwpid from current_inferior.
6283 Pass &all_threads to find_inferior, not &all_lwps.
6284 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6285 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6286 directly.
6287 (mips_stopped_data_address): Ditto.
6288 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6289 directly.
6290 * linux-tile-low.c (tile_arch_setup): Ditto.
6291 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6292 (update_debug_registers_callback): Update, "entry" parameter is a
6293 struct thread_info * now. Fetch pid from thread.
6294 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6295 Pass &all_threads to find_inferior, not &all_lwps.
6296 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6297 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6298 Pass &all_threads to find_inferior, not &all_lwps.
6299 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6300 (i386_dr_low_get_status): Ditto.
6301 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6302 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6303 (x86_linux_read_description): Ditto.
6304 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6305
3b8361aa
DE
63062014-02-20 Doug Evans <dje@google.com>
6307
6308 * inferiors.c (get_first_inferior): Fix buglet.
6309
f7667f0d
DE
63102014-02-19 Doug Evans <dje@google.com>
6311
6312 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6313 * inferiors.c (add_thread): Change result type to struct thread_info *.
6314 All callers updated.
6315 (add_lwp): Call add_thread here instead of in callers.
6316 All callers updated.
6317 * linux-low.h (get_lwp_thread): Rewrite.
6318 (struct lwp_info): New member "thread".
6319
b3312d80
DE
63202014-02-19 Doug Evans <dje@google.com>
6321
6322 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6323 All callers updated.
6324
ecc6f45c
DE
63252014-02-19 Doug Evans <dje@google.com>
6326
6327 * inferiors.c (add_thread): Fix whitespace.
6328
649ebbca
DE
63292014-02-19 Doug Evans <dje@google.com>
6330
6331 * dll.c (clear_dlls): Replace accessing list implemention details
6332 with API function.
6333 * gdbthread.h (get_first_thread): Declare.
6334 * inferiors.c (for_each_inferior_with_data): New function.
6335 (get_first_thread): New function.
6336 (find_thread_ptid): Simplify.
6337 (get_first_inferior): New function.
6338 (clear_list): Delete.
6339 (one_inferior_p): New function.
6340 (clear_inferior_list): New function.
6341 (clear_inferiors): Update.
6342 * inferiors.h (for_each_inferior_with_data): Declare.
6343 (clear_inferior_list): Declare.
6344 (one_inferior_p): Declare.
6345 (get_first_inferior): Declare.
6346 * linux-low.c (linux_wait_for_event): Replace accessing list
6347 implemention details with API function.
6348 * server.c (target_running): Ditto.
6349 (accumulate_file_name_length): New function.
6350 (emit_dll_description): New function.
6351 (handle_qxfer_libraries): Replace accessing list implemention
6352 details with API function.
6353 (handle_qxfer_threads_worker): New function.
6354 (handle_qxfer_threads_proper): Replace accessing list implemention
6355 details with API function.
6356 (handle_query): Ditto.
6357 (visit_actioned_threads_callback_ftype): New typedef.
6358 (visit_actioned_threads_data): New struct.
6359 (visit_actioned_threads): Rewrite to be find_inferior callback.
6360 (resume): Call find_inferior.
6361 (handle_status): Replace accessing list implemention
6362 details with API function.
6363 (process_serial_event): Replace accessing list implemention details
6364 with API function.
6365 * target.c (set_desired_inferior): Replace accessing list implemention
6366 details with API function.
6367 * tracepoint.c (same_process_p): New function.
6368 (gdb_agent_about_to_close): Replace accessing list implemention
6369 details with API function.
6370 * win32-low.c (child_delete_thread): Replace accessing list
6371 implemention details with API function.
6372 (match_dll_by_basename): New function.
6373 (dll_is_loaded_by_basename): New function.
6374 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6375 details call to dll_is_loaded_by_basename.
6376
80894984
DE
63772014-02-19 Doug Evans <dje@google.com>
6378
6379 * dll.h (struct dll_info): Add comment.
6380 * gdbthread.h (struct thread_info): Add comment.
6381 (current_ptid): Simplify.
6382 * inferiors.c (add_process): Update.
6383 (remove_process): Update.
6384 * inferiors.h (struct process_info): Rename member "head" to "entry".
6385 * linux-low.c (delete_lwp): Update.
6386 (add_lwp): Update.
6387 (last_thread_of_process_p): Update.
6388 (kill_one_lwp_callback, linux_kill): Update.
6389 (status_pending_p_callback): Update.
6390 (wait_for_sigstop): Update. Simplify read of ptid.
6391 (start_step_over): Update.
6392 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6393 (get_lwp_thread): Update.
6394 (struct lwp_info): Rename member "head" to "entry".
6395 * regcache.h (inferior_list_entry): Delete.
6396 * server.c (kill_inferior_callback): Update.
6397 (detach_or_kill_inferior_callback): Update.
6398 (print_started_pid): Update.
6399 (print_attached_pid): Update.
6400 (process_serial_event): Simplify read of ptid.
6401 * thread-db.c (thread_db_create_event): Update.
6402 (thread_db_get_tls_address): Update.
6403 * win32-low.c (current_inferior_ptid): Simplify.
6404
46917d26
TT
64052014-02-19 Tom Tromey <tromey@redhat.com>
6406
6407 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6408 argument.
6409 (target_supports_btrace): Update.
6410
0759a81e
YQ
64112014-02-14 Yao Qi <yao@codesourcery.com>
6412
6413 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6414 (rsp-low-ipa.o): New target.
6415
a7191e8b
TT
64162014-02-12 Tom Tromey <tromey@redhat.com>
6417
6418 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6419 convert_ascii_to_int.
6420 * regcache.c (registers_to_string): Likewise.
6421 * remote-utils.c (decode_M_packet): Likewise.
6422 * server.c (process_serial_event): Likewise.
6423
ff0e980e
TT
64242014-02-12 Tom Tromey <tromey@redhat.com>
6425
6426 * server.c (handle_query, handle_v_run): Use hex2bin, not
6427 unhexify.
6428 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6429
e9371aff
TT
64302014-02-12 Tom Tromey <tromey@redhat.com>
6431
6432 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6433 convert_int_to_ascii.
6434 * regcache.c (registers_to_string, collect_register_as_string):
6435 Likewise.
6436 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6437 Likewise.
6438 * server.c (process_serial_event): Likewise.
6439 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6440 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6441
971dc0b8
TT
64422014-02-12 Tom Tromey <tromey@redhat.com>
6443
6444 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6445 bin2hex, not hexify.
6446 * tracepoint.c (cmd_qtstatus): Likewise.
6447
0a822afb
TT
64482014-02-12 Tom Tromey <tromey@redhat.com>
6449
6450 * remote-utils.c (monitor_output): Pass explicit length to
6451 hexify.
6452
9c3d6531
TT
64532014-02-12 Tom Tromey <tromey@redhat.com>
6454
6455 * tracepoint.c: Include rsp-low.h.
6456 * server.c: Include rsp-low.h.
6457 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6458 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6459 declare.
6460 * remote-utils.c: Include rsp-low.h.
6461 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6462 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6463 (convert_int_to_ascii, convert_ascii_to_int): Move to
6464 common/rsp-low.c.
6465 * regcache.c: Include rsp-low.h.
6466 * ax.c: Include rsp-low.h.
6467 * Makefile.in (SFILES): Add common/rsp-low.c.
6468 (OBS): Add rsp-low.o.
6469 (rsp-low.o): New target.
6470
01fd3ea5
TT
64712014-02-12 Tom Tromey <tromey@redhat.com>
6472
6473 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6474 Include print-utils.h.
6475 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6476 (plongest, thirty_two, phex_nz): Remove.
6477 * Makefile.in (SFILES): Add common/print-utils.c.
6478 (OBS): Add print-utils.o.
6479 (print-utils-ipa.o): New target.
6480 (print-utils.o): New target.
6481 (IPA_OBJS): Add print-utils-ipa.o.
6482
e99dc820
TT
64832014-02-06 Tom Tromey <tromey@redhat.com>
6484
6485 * Makefile.in (SFILES): Fix indentation.
6486
ee1e2d4f
DE
64872014-02-05 Doug Evans <dje@google.com>
6488
6489 * linux-low.c (linux_wait_for_event): Improve comment.
6490 (linux_wait_1): Keep current_inferior in sync with event_child.
6491
f5a02773
DE
64922014-01-22 Doug Evans <dje@google.com>
6493
6494 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6495
87ce2a04
DE
64962014-01-22 Doug Evans <dje@google.com>
6497
6498 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6499 * configure: Regenerate.
6500 * config.in: Regenerate.
6501 * Makefile.in (SFILES): Add debug.c.
6502 (OBS): Add debug.o.
6503 * debug.c: New file.
6504 * debug.h: New file.
6505 * linux-aarch64-low.c (*): Update all debugging printfs to use
6506 debug_printf instead of fprintf.
6507 * linux-arm-low.c (*): Ditto.
6508 * linux-cris-low.c (*): Ditto.
6509 * linux-crisv32-low.c (*): Ditto.
6510 * linux-m32r-low.c (*): Ditto.
6511 * linux-sparc-low.c (*): Ditto.
6512 * linux-x86.c (*): Ditto.
6513 * linux-low.c (*): Ditto.
6514 (linux_wait_1): Add calls to debug_enter, debug_exit.
6515 (linux_wait): Remove redundant debugging printf.
6516 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6517 (linux_resume, unstop_all_lwps): Ditto.
6518 * mem-break.c (*): Update all debugging printfs to use
6519 debug_printf instead of fprintf.
6520 * remote-utils.c (*): Ditto.
6521 * thread-db.c (*): Ditto.
6522 * server.c #include <ctype.h>, "gdb_vecs.h".
6523 (debug_threads): Moved to debug.c.
6524 (*): Update all debugging printfs to use debug_printf instead of
6525 fprintf.
6526 (start_inferior): Replace call to fflush with call to debug_flush.
6527 (monitor_show_help): Mention set debug-format.
6528 (parse_debug_format_options): New function.
6529 (handle_monitor_command): Handle "monitor set debug-format".
6530 (gdbserver_usage): Mention --debug-format.
6531 (main): Parse --debug-format.
6532 * server.h (debug_threads): Declaration moved to debug.h.
6533 #include "debug.h".
6534 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6535 trace_debug_1 that uses debug_printf.
6536 (tracepoint_look_up_symbols): Update all debugging printfs to use
6537 debug_printf instead of fprintf.
6538
e671835b
BS
65392014-01-20 Baruch Siach <baruch@tkos.co.il>
6540
6541 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6542 sys/ptrace.h.
6543
b5737fa9
PA
65442014-01-17 Pedro Alves <palves@redhat.com>
6545
ea38d2a9 6546 PR build/16445
c7faa97a
PA
6547 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6548 defined after including gdb_proc_service.h.
b5737fa9 6549
40ed484e
DE
65502014-01-16 Doug Evans <dje@google.com>
6551
6552 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6553 (match_dll): Use it.
6554
969c39fb
MM
65552014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6556
6557 * target.h (target_ops) <read_btrace>: Change parameters and
6558 return type to allow error reporting.
6559 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6560 trace reading errors on.
6561 * linux-low.c (linux_low_read_btrace): Pass trace reading
6562 errors on.
6563 (linux_low_disable_btrace): New.
6564
ab7f45ba
DE
65652014-01-15 Doug Evans <dje@google.com>
6566
6567 * inferiors.c (thread_id_to_gdb_id): Delete.
6568 * inferiors.h (thread_id_to_gdb_id): Delete.
6569
66af0f44
EZ
65702014-01-13 Eli Zaretskii <eliz@gnu.org>
6571
6572 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6573 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6574 versions.
6575
9939e131
PA
65762014-01-08 Pedro Alves <palves@redhat.com>
6577
6578 * server.c (handle_status): Don't discard previous queued stop
6579 replies or thread's pending status here.
6580 (main) <disconnection>: Do it here instead.
6581
b7ea362b
PA
65822014-01-08 Pedro Alves <palves@redhat.com>
6583
6584 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6585 * server.c (visit_actioned_threads, handle_pending_status): New
6586 function.
6587 (handle_v_cont): Factor out parts to ...
6588 (resume): ... this new function. If in all-stop, and a thread
6589 being resumed has a pending status, report it without actually
6590 resuming.
6591 (myresume): Adjust to use the new 'resume' function.
6592 (clear_pending_status_callback, set_pending_status_callback)
6593 (find_status_pending_thread_callback): New functions.
6594 (handle_status): Handle the case of multiple threads having
6595 interesting statuses to report. Report threads' real last signal
6596 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6597 with an interesting thread to report the status for, instead of
6598 always reporting the status of the first thread.
6599
28498c42
JB
66002014-01-01 Joel Brobecker <brobecker@adacore.com>
6601
6602 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6603 * gdbreplay.c (gdbreplay_version): Likewise.
6604
f45c82da
YZ
66052013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6606
6607 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6608 iov.iov_len with the real length in use.
6609
379a5e2d
JB
66102013-12-13 Joel Brobecker <brobecker@adacore.com>
6611
6612 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6613 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6614 for all targets that use win32-low.c.
6615 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6616 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6617
4210d83e
PA
66182013-12-13 Pedro Alves <palves@redhat.com>
6619
6620 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6621 if equal to TARGET_WAITKIND_LOADED.
6622 * win32-low.c (cached_status): New static global.
6623 (win32_wait): Add declaration.
6624 (do_initial_child_stuff): Flush all initial pending debug events
6625 up to the initial breakpoint.
6626 (win32_wait): If CACHED_STATUS was set, return that instead
6627 of doing a real wait. Remove the code resuming the execution
6628 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6629 during the initial phase. Also remove the code changing
6630 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6631 TARGET_WAITKIND_STOPPED.
6632
e7f0d979
YQ
66332013-12-11 Yao Qi <yao@codesourcery.com>
6634
6635 * notif.c (handle_notif_ack): Return 0 if no notification
6636 matches.
6637
ebcf782c
DE
66382013-11-20 Doug Evans <dje@google.com>
6639
6640 * linux-low.c (linux_set_resume_request): Fix comment.
6641
20ad9378
DE
66422013-11-20 Doug Evans <dje@google.com>
6643
6644 * linux-low.c (resume_status_pending_p): Tweak comment.
6645
a196ebeb
WT
66462013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6647
6648 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6649 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6650 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6651 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6652 (srv_amd64_regobj): Add amd64-mpx.o.
6653 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6654 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6655 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6656 * i387-fp.c (num_pl_bnd_register) Added constant.
6657 (num_pl_bnd_cfg_registers) Added constant.
6658 (struct i387_xsave) Added reserved area and MPX fields.
6659 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6660 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6661 function.
6662 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6663 (init_registers_amd64_mpx_linux): Declare new function.
6664 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6665 (x86_64_regmap): Add MPX registers.
6666 (x86_linux_read_description): Add MPX case.
6667 (initialize_low_arch): Initialize MPX targets.
6668
0080a2f6
TT
66692013-11-18 Tom Tromey <tromey@redhat.com>
6670
6671 * configure: Rebuild.
6672 * configure.ac: Don't check for stdlib.h.
6673 * gdbreplay.c: Unconditionally include stdlib.h.
6674
2978b111
TT
66752013-11-18 Tom Tromey <tromey@redhat.com>
6676
6677 * config.in: Rebuild.
6678 * configure: Rebuild.
6679 * configure.ac: Don't use AC_HEADER_DIRENT.
6680
a3d08894
TT
66812013-11-18 Tom Tromey <tromey@redhat.com>
6682
6683 * server.h: Don't check HAVE_STRING_H.
6684 * gdbreplay.c: Don't check HAVE_STRING_H.
6685 * configure: Rebuild.
6686
0a5dd17d
TT
66872013-11-18 Tom Tromey <tromey@redhat.com>
6688
6689 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6690 LIBGNU.
6691
1bd2f0ba
TT
66922013-11-08 Tom Tromey <tromey@redhat.com>
6693
6694 * configure, config.in: Rebuild.
6695 * configure.ac: Remove unused configury.
6696
3266f10b
TT
66972013-11-08 Tom Tromey <tromey@redhat.com>
6698
6699 * acinclude.m4: Include common.m4, codeset.m4.
6700 * configure, config.in: Rebuild.
6701 * configure.ac: Use GDB_AC_COMMON.
6702
6682d959
AA
67032013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6704
6705 * linux-s390-low.c (HWCAP_S390_TE): New define.
6706 (s390_arch_setup): Consider the TE field in the HWCAP for
6707 determining 'have_regset_tdb'.
6708
fd0a4d76
SDJ
67092013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6710
6711 PR gdb/16014
6712 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6713 call to sizeof.
6714
1a3d890b
PA
67152013-10-02 Pedro Alves <palves@redhat.com>
6716
6717 * server.c (process_serial_event): Don't output "GDBserver
6718 exiting" if GDB is connected through stdio.
6719 * target.c (mywait): Likewise, be silent if GDB is connected
6720 through stdio.
6721
97ad4581
JB
67222013-10-01 Joel Brobecker <brobecker@adacore.com>
6723
6724 * lynx-low.c (lynx_add_threads_after_attach): New function.
6725 (lynx_attach): Remove call to add_thread. Add call to
6726 lynx_add_threads_after_attach instead.
6727
5b4e221c
MF
67282013-09-28 Mike Frysinger <vapier@gentoo.org>
6729
6730 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6731 * config.in, configure: Regenerated.
6732
ee47b2f8
YQ
67332013-09-18 Yao Qi <yao@codesourcery.com>
6734
6735 PR server/15959
6736 * server.c (start_inferior): Clear 'resume_info'.
6737
d6707650 67382013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6739
d6707650
JW
6740 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6741 for each register.
6742
9243dd0e 67432013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6744
9243dd0e
JW
6745 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6746 linux-tile-low.o to srv_tgtobj.
6747
c623a6ef
WN
67482013-09-16 Will Newton <will.newton@linaro.org>
6749
6750 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6751 out regs.
6752
fb71d39e
PA
67532013-09-06 Pedro Alves <palves@redhat.com>
6754
6755 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6756 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6757 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6758 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6759 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6760 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6761
8e7e9910
PA
67622013-09-06 Pedro Alves <palves@redhat.com>
6763
6764 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6765 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6766
7c3a12ca
PA
67672013-09-06 Pedro Alves <palves@redhat.com>
6768
6769 * linux-amd64-ipa.c: Include tracepoint.h.
6770 * linux-i386-ipa.c: Include tracepoint.h.
6771
8eb3d7b6
RW
67722013-09-06 Ricard Wanderlof <ricardw@axis.com>
6773
6774 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6775 (ps_get_thread_area): New function.
6776
eddddb9d
RW
67772013-09-06 Ricard Wanderlof <ricardw@axis.com>
6778
6779 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6780 (initialize_low_arch): Call init_registers_crisv32 rather than
6781 init_register_crisv32.
6782
533b0600
PA
67832013-09-05 Pedro Alves <palves@redhat.com>
6784
6785 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6786 to ...
6787 * hostio.h: ... this new file.
6788 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6789 win32-low.c: Include hostio.h.
6790
0ce3d3b5
PA
67912013-09-05 Pedro Alves <palves@redhat.com>
6792
6793 * server.h (gdb_client_data, handler_func, callback_handler_func)
6794 (delete_file_handler, add_file_handler, append_callback_event)
6795 (delete_callback_event, start_event_loop, initialize_event_loop):
6796 Move to event-loop.h and include it.
6797 * event-loop.h: New file.
6798
799cdc37
PA
67992013-09-05 Pedro Alves <palves@redhat.com>
6800
6801 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6802 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6803 (loaded_dll, unloaded_dll): Move to ...
6804 * dll.h: ... this new file.
6805 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6806
6a6bbd9d
PA
68072013-09-05 Pedro Alves <palves@redhat.com>
6808
6809 * server.h (current_process, get_thread_process, all_processes)
6810 (add_inferior_to_list, for_each_inferior, current_inferior)
6811 (remove_inferior, add_process, remove_process, find_process_pid)
6812 (have_started_inferiors_p, have_attached_inferiors_p)
6813 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6814 (clear_inferiors, find_inferior, find_inferior_id)
6815 (inferior_target_data, set_inferior_target_data)
6816 (inferior_regcache_data, set_inferior_regcache_data): Move to
6817 inferiors.h, and include it.
6818 * inferiors.h: New file.
6819
f699aaba
PA
68202013-09-05 Pedro Alves <palves@redhat.com>
6821
6822 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6823 Move ...
72f4393d 6824 * ax.h: ... here.
f699aaba 6825
c144c7a0
PA
68262013-09-05 Pedro Alves <palves@redhat.com>
6827
6828 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6829 tracepoint.h.
6830 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6831 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6832 (handle_tracepoint_general_set, handle_tracepoint_query)
6833 (tracepoint_finished_step, tracepoint_was_hit)
6834 (release_while_stepping_state_list, current_traceframe)
6835 (in_readonly_region, traceframe_read_mem)
6836 (fetch_traceframe_registers, traceframe_read_sdata)
6837 (traceframe_read_info, struct fast_tpoint_collect_status)
6838 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6839 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6840 (supply_fast_tracepoint_registers)
6841 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6842 (ipa_tdesc, claim_trampoline_space)
6843 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6844 (agent_mem_read, agent_get_trace_state_variable_value)
6845 (agent_set_trace_state_variable_value, agent_tsv_read)
6846 (agent_mem_read_string, get_raw_reg_func_addr)
6847 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6848 * tracepoint.h: ... this new file.
6849
ff42e6ab
PA
68502013-09-05 Pedro Alves <palves@redhat.com>
6851
6852 * server.h (perror_with_name, error, fatal, warning, paddress)
6853 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6854 include it.
6855 * utils.h: New file.
6856
541af0f4
PA
68572013-09-05 Pedro Alves <palves@redhat.com>
6858
6859 * server.h (remote_debug, noack_mode, transport_is_reliable)
6860 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6861 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6862 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6863 (write_enn, initialize_async_io, enable_async_io)
6864 (disable_async_io, check_remote_input_interrupt_request)
6865 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6866 (dead_thread_notify, prepare_resume_reply)
6867 (decode_address_to_semicolon, decode_address, decode_m_packet)
6868 (decode_M_packet, decode_X_packet, decode_xfer_write)
6869 (decode_search_memory_packet, unhexify, hexify)
6870 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6871 (look_up_one_symbol, relocate_instruction)
6872 (monitor_output): Move to remote-utils.h, and include it.
6873 * remote-utils.h: New file.
6874
eebdf26b
PA
68752013-09-05 Pedro Alves <palves@redhat.com>
6876
6877 * server.h (_): Delete.
6878
3aafd2ff
PA
68792013-09-02 Pedro Alves <palves@redhat.com>
6880
6881 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6882 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6883 allocated.
6884 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6885
cee83bcb
PM
68862013-09-02 Pierre Muller <muller@sourceware.org>
6887
6888 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6889 or WriteProcessMemory complete successfully and handle
6890 ERROR_PARTIAL_COPY error.
6891
9a13b2fa
PA
68922013-09-02 Pedro Alves <palves@redhat.com>
6893
6894 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6895 error instead of EIO.
6896
602e3198
JK
68972013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6898
6899 PR server/15604
6900 * linux-low.c: Include filestuff.h.
6901 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6902 * lynx-low.c: Include filestuff.h.
6903 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6904 * server.c: Include filestuff.h.
6905 (main): Call notice_open_fds.
6906 * spu-low.c: Include filestuff.h.
6907 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6908
96d7229d
LM
69092013-08-22 Luis Machado <lgustavo@codesourcery.com>
6910
6911 * Makefile.in: Explain why ../target and ../nat are not
6912 listed as include file search paths.
6913 (linux-waitpid.o): New object file rule.
6914 * configure.srv (srv_native_linux_obj): New variable.
6915 Replace all occurrences of linux native object files with
6916 $srv_native_linux_obj.
6917 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6918 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6919 (linux_enable_event_reporting): Remove declaration.
6920 (my_waitpid): Moved to common/linux-waitpid.c.
6921 (linux_wait_for_event): Pass ptid when calling
6922 linux_enable_event_reporting.
6923 (linux_supports_tracefork_flag): Remove.
6924 (linux_enable_event_reporting): Likewise.
6925 (linux_tracefork_grandchild): Remove.
6926 (STACK_SIZE): Moved to common/linux-ptrace.c.
6927 (linux_tracefork_child): Remove.
6928 (linux_test_for_tracefork): Remove.
6929 (linux_look_up_symbols): Call linux_supports_traceclone.
6930 (initialize_low): Remove call to linux_test_for_tracefork.
6931 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6932 common/linux-ptrace.h.
6933 (PTRACE_TYPE_ARG4): Likewise.
6934 Include linux-ptrace.h.
6935
32940073
PA
69362013-08-21 Pedro Alves <palves@redhat.com>
6937
6938 * config.in: Renegerate.
6939
33b60d58 69402013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6941
33b60d58
LM
6942 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6943 (SFILES): Remove $(srcdir)/common/target-common.c and
6944 add $(srcdir)/target/waitstatus.c.
6945 (OBS): Remove target-common.o and add waitstatus.o.
6946 (server_h): Remove $(srcdir)/../common/target-common.h and
6947 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6948 and $(srcdir)/../target/waitstatus.h.
6949 (target-common.o): Remove.
6950 (waitstatus.o): New target object file.
6951 * target.h: Do not include target-common.h and
6952 include target/resume.h, target/wait.h and
6953 target/waitstatus.h.
6954
b8e1b30e
LM
69552013-08-13 Luis Machado <lgustavo@codesourcery.com>
6956
6957 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6958 to PTRACE_TYPE_ARG3.
6959 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6960 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6961 PTRACE_TYPE_ARG4.
6962 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6963 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6964
7a60ad40
YQ
69652013-07-27 Jie Zhang <jie@codesourcery.com>
6966 Daniel Jacobowitz <dan@codesourcery.com>
6967 Yao Qi <yao@codesourcery.com>
6968
6969 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6970 (mips-linux-watch.o): New rule.
6971 (mips_linux_watch_h): New variable.
6972 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6973 srv_tgtobj.
6974 * linux-mips-low.c: Include mips-linux-watch.h.
6975 (struct arch_process_info, struct arch_lwp_info): New.
6976 (update_watch_registers_callback): New function.
6977 (mips_linux_new_process, mips_linux_new_thread) New functions.
6978 (mips_linux_prepare_to_resume, mips_insert_point): New
6979 functions.
6980 (mips_remove_point, mips_stopped_by_watchpoint): New
6981 functions.
6982 (rsp_bp_type_to_target_hw_bp_type): New function.
6983 (mips_stopped_data_address): New function.
6984 (the_low_target): Add watchpoint support functions.
6985
de6f69ad
YQ
69862013-07-27 Yao Qi <yao@codesourcery.com>
6987
6988 * i386-low.c: Include break-common.h.
6989 (enum target_hw_bp_type): Remove.
6990
3360c0bf
LM
69912013-07-24 Luis Machado <lgustavo@codesourcery.com>
6992
6993 * Makefile.in (SFILES): /common/target-common.c.
6994 (OBS): Add target-common.o.
6995 (server_h): Add $(srcdir)/../common/target-common.h.
6996 (target-common.o): New target.
6997 * server.c (queue_stop_reply_callback): Free
6998 status string after use.
6999 * target.c (target_waitstatus_to_string): Remove.
7000 * target.h: Include target-common.h.
7001 (resume_kind): Likewise.
7002 (target_waitkind): Likewise.
7003 (target_waitstatus): Likewise.
7004 (TARGET_WNOHANG): Likewise.
7005
bd885420
YQ
70062013-07-04 Yao Qi <yao@codesourcery.com>
7007
7008 * Makefile.in (host_alias): Use @host_noncanonical@.
7009 (target_alias): Use @target_noncanonical@.
7010 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7011 ACX_NONCANONICAL_HOST.
7012 * configure: Regenerated.
7013
7014 Revert:
7015 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7016
7017 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7018 * configure: Rebuild.
7019 * Makefile.in (version_host, version_target): Get from configure.
7020 (version.c): Use $(version_host) and $(version_target).
7021
17ef446e
PA
70222013-07-03 Pedro Alves <palves@redhat.com>
7023
7024 * Makefile.in (config.status): Depend on development.sh.
7025 * acinclude.m4: Include libmcheck.m4.
7026 * configure: Regenerate.
7027
7a9a7487
MG
70282013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7029
7030 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7031 attribute inside the parentheses.
7032 (winapi_DebugSetProcessKillOnExit): Ditto.
7033 (winapi_DebugBreakProcess): Ditto.
7034 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7035
49b64de6
MG
70362013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7037
7038 * notif.h (notif_event): Add a dummy member to avoid compiler
7039 errors.
7040
d5749ee7
PA
70412013-07-01 Pedro Alves <palves@redhat.com>
7042
7043 * hostio.c (HOSTIO_PATH_MAX): Define.
7044 (require_filename, handle_open, handle_unlink, handle_readlink):
7045 Use it.
7046
d8d2a3ee
PA
70472013-07-01 Pedro Alves <palves@redhat.com>
7048
7049 * server.h: Include "pathmax.h".
7050 * linux-low.c: Don't include sys/param.h.
7051 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7052 MAXPATHLEN.
7053 * win32-low.c: Don't include sys/param.h.
7054 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7055
bc7dea8d
PA
70562013-07-01 Pedro Alves <palves@redhat.com>
7057
7058 * event-loop.c: Don't check HAVE_UNISTD_H before including
7059 <unistd.h>.
7060 * gdbreplay.c: Likewise.
7061 * remote-utils.c: Likewise.
7062 * server.c: Likewise.
7063 * configure.ac: Don't check for unistd.h.
7064 * configure: Regenerate.
7065
d6c2da54
TT
70662013-06-28 Tom Tromey <tromey@redhat.com>
7067
7068 * Makefile.in (version.c): Use version.in, not
7069 common/version.in.
7070
257b6bec
MG
70712013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7072
7073 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7074 * configure: Rebuild.
7075 * Makefile.in (version_host, version_target): Get from configure.
7076 (version.c): Use $(version_host) and $(version_target).
7077
86ebe149
DK
70782013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7079
7080 Fix trace-status to output user name without trailing colon.
7081 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7082
f30aa5af
DK
70832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7084
7085 Fix trace-status to output proper start-time and stop-time.
7086 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7087 output start time and stop time in hex as gdb expects.
7088
28a93511
YQ
70892013-06-26 Pedro Alves <pedro@codesourcery.com>
7090
7091 * tracepoint.c (build_traceframe_info_xml): Output trace state
7092 variables present in the trace buffer.
7093
01208463
TT
70942013-06-24 Tom Tromey <tromey@redhat.com>
7095
7096 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7097 create-version.sh.
7098 (version.o): Remove.
7099 * gdbreplay.c: Include version.h.
7100 (version, host_name): Don't declare.
7101 * server.h: Include version.h.
7102 (version, host_name): Don't declare.
7103
760256f9
PA
71042013-06-12 Pedro Alves <palves@redhat.com>
7105
7106 * linux-x86-low.c (linux_is_elf64): Delete global.
7107 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7108 with local linux_pid_exe_is_elf_64_file use.
7109
030031ee
PA
71102013-06-11 Pedro Alves <palves@redhat.com>
7111
7112 * linux-low.c (regset_disabled, disable_regset): New functions.
7113 (regsets_fetch_inferior_registers)
7114 (regsets_store_inferior_registers): Use them.
7115 (initialize_regsets_info); Don't allocate the disabled_regsets
7116 array here.
7117 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7118 comment.
7119
5da6eb0a
PA
71202013-06-11 Pedro Alves <palves@redhat.com>
7121
7122 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7123 xmalloc.
7124
7e5aaa09
PA
71252013-06-11 Pedro Alves <palves@redhat.com>
7126
7127 * linux-x86-low.c (initialize_low_arch): Call
7128 init_registers_x32_avx_linux.
7129
d878444c
JK
71302013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7131
7132 Fix compatibility with Android Bionic.
7133 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7134 it is not empty.
7135
3aee8918
PA
71362013-06-07 Pedro Alves <palves@redhat.com>
7137
5f2b57b5 7138 PR server/14823
3aee8918
PA
7139 * Makefile.in (OBS): Add tdesc.o.
7140 (IPA_OBJS): Add tdesc-ipa.o.
7141 (tdesc-ipa.o): New rule.
7142 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7143 interface.
7144 * linux-low.c (new_inferior): Delete.
7145 (disabled_regsets, num_regsets): Delete.
7146 (linux_add_process): Adjust to set the new per-process
7147 new_inferior flag.
7148 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7149 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7150 was a stop. When calling arch_setup, switch the current inferior
7151 to the thread that got an event.
7152 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7153 (regsets_fetch_inferior_registers)
7154 (regsets_store_inferior_registers): New regsets_info parameter.
7155 Adjust to use it.
7156 (linux_register_in_regsets): New regs_info parameter. Adjust to
7157 use it.
7158 (register_addr, fetch_register, store_register): New usrregs_info
7159 parameter. Adjust to use it.
7160 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7161 parameter regs_info. Adjust to use it.
7162 (linux_fetch_registers): Get the current inferior's regs_info, and
7163 adjust to use it.
7164 (linux_store_registers): Ditto.
7165 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7166 (initialize_low): Don't initialize the target_regsets here. Call
7167 initialize_low_arch.
7168 * linux-low.h (target_regsets): Delete declaration.
7169 (struct regsets_info): New.
7170 (struct usrregs_info): New.
7171 (struct regs_info): New.
7172 (struct process_info_private) <new_inferior>: New field.
7173 (struct linux_target_ops): Delete the num_regs, regmap, and
7174 regset_bitmap fields. New field regs_info.
7175 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7176 * i387-fp.c (num_xmm_registers): Delete.
7177 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7178 calls to new interface.
7179 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7180 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7181 Infer the number of xmm registers from the regcache's target
7182 description.
7183 * i387-fp.h (num_xmm_registers): Delete.
7184 * inferiors.c (add_thread): Don't install the thread's regcache
7185 here.
7186 * proc-service.c (gregset_info): Fetch the current inferior's
7187 regs_info. Adjust to use it.
7188 * regcache.c: Include tdesc.h.
7189 (register_bytes, reg_defs, num_registers)
7190 (gdbserver_expedite_regs): Delete.
7191 (get_thread_regcache): If the thread doesn't have a regcache yet,
7192 create one, instead of aborting gdbserver.
7193 (regcache_invalidate_one): Rename to ...
7194 (regcache_invalidate_thread): ... this.
7195 (regcache_invalidate_one): New.
7196 (regcache_invalidate): Only invalidate registers of the current
7197 process.
7198 (init_register_cache): Add target_desc parameter, and use it.
7199 (new_register_cache): Ditto. Assert the target description has a
7200 non zero registers_size.
7201 (regcache_cpy): Add assertions. Adjust.
7202 (realloc_register_cache, set_register_cache): Delete.
7203 (registers_to_string, registers_from_string): Adjust.
7204 (find_register_by_name, find_regno, find_register_by_number)
7205 (register_cache_size): Add target_desc parameter, and use it.
7206 (free_register_cache_thread, free_register_cache_thread_one)
7207 (regcache_release, register_cache_size): New.
7208 (register_size): Add target_desc parameter, and use it.
7209 (register_data, supply_register, supply_register_zeroed)
7210 (supply_regblock, supply_register_by_name, collect_register)
7211 (collect_register_as_string, collect_register_by_name): Adjust.
7212 * regcache.h (struct target_desc): Forward declare.
7213 (struct regcache) <tdesc>: New field.
7214 (init_register_cache, new_register_cache): Add target_desc
7215 parameter.
7216 (regcache_invalidate_thread): Declare.
7217 (regcache_invalidate_one): Delete declaration.
7218 (regcache_release): Declare.
7219 (find_register_by_number, register_cache_size, register_size)
7220 (find_regno): Add target_desc parameter.
7221 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7222 declarations.
7223 * remote-utils.c: Include tdesc.h.
7224 (outreg, prepare_resume_reply): Adjust.
7225 * server.c: Include tdesc.h.
7226 (gdbserver_xmltarget): Delete declaration.
7227 (get_features_xml, process_serial_event): Adjust.
7228 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7229 declare.
7230 (struct process_info) <tdesc>: New field.
7231 (ipa_tdesc): Declare.
7232 * tdesc.c: New file.
7233 * tdesc.h: New file.
7234 * tracepoint.c: Include tdesc.h.
7235 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7236 (get_context_regcache): Adjust to pass ipa_tdesc down.
7237 (do_action_at_tracepoint): Adjust to get the register cache size
7238 from the context regcache's description.
7239 (traceframe_walk_blocks): Adjust to get the register cache size
7240 from the current trace frame's description.
7241 (traceframe_get_pc): Adjust to get current trace frame's
7242 description and pass it down.
7243 (gdb_collect): Adjust to get the register cache size from the
7244 IPA's description.
7245 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7246 (gdbserver_xmltarget): Delete.
7247 (initialize_low_tracepoint): Set the ipa's target description.
7248 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7249 (initialize_low_tracepoint): Set the ipa's target description.
7250 * linux-x86-low.c: Include tdesc.h.
7251 [__x86_64__] (is_64bit_tdesc): New.
7252 (ps_get_thread_area, x86_get_thread_area): Use it.
7253 (i386_cannot_store_register): Rename to ...
7254 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7255 (i386_cannot_fetch_register): Rename to ...
7256 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7257 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7258 to new interface.
7259 (target_regsets): Rename to ...
7260 (x86_regsets): ... this.
7261 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7262 interface.
7263 (x86_siginfo_fixup): Use is_64bit_tdesc.
7264 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7265 (tdesc_x32_avx_linux, tdesc_x32_linux)
7266 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7267 Declare.
7268 (x86_linux_update_xmltarget): Delete.
7269 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7270 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7271 (AMD64_LINUX_USER64_CS): New.
7272 (x86_linux_read_description): New, based on
7273 x86_linux_update_xmltarget.
7274 (same_process_callback): New.
7275 (x86_arch_setup_process_callback): New.
7276 (x86_linux_update_xmltarget): New.
7277 (x86_regsets_info): New.
7278 (amd64_linux_regs_info): New.
7279 (i386_linux_usrregs_info): New.
7280 (i386_linux_regs_info): New.
7281 (x86_linux_regs_info): New.
7282 (x86_arch_setup): Reimplement.
7283 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7284 (x86_emit_ops): Ditto.
7285 (the_low_target): Adjust. Install x86_linux_regs_info,
7286 x86_cannot_fetch_register, and x86_cannot_store_register.
7287 (initialize_low_arch): New.
7288 * linux-ia64-low.c (tdesc_ia64): Declare.
7289 (ia64_fetch_register): Adjust.
7290 (ia64_usrregs_info, regs_info): New globals.
7291 (ia64_regs_info): New function.
7292 (the_low_target): Adjust.
7293 (initialize_low_arch): New function.
7294 * linux-sparc-low.c (tdesc_sparc64): Declare.
7295 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7296 Adjust.
7297 (sparc_arch_setup): New function.
7298 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7299 (the_low_target): Adjust.
7300 (initialize_low_arch): New function.
7301 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7302 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7303 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7304 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7305 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7306 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7307 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7308 (tdesc_powerpc_isa205_vsx64l): Declare.
7309 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7310 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7311 (ppc_set_pc, ppc_get_hwcap): Adjust.
7312 (ppc_usrregs_info): Forward declare.
7313 (!__powerpc64__) ppc_regmap_adjusted: New global.
7314 (ppc_arch_setup): Adjust to the current process'es target
7315 description.
7316 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7317 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7318 (ppc_store_evrregset): Adjust.
7319 (target_regsets): Rename to ...
7320 (ppc_regsets): ... this, and make static.
7321 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7322 (ppc_regs_info): New function.
7323 (the_low_target): Adjust.
7324 (initialize_low_arch): New function.
7325 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7326 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7327 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7328 (tdesc_s390x_linux64v2): Declare.
7329 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7330 (s390_fill_gregset, s390_store_last_break): Adjust.
7331 (target_regsets): Rename to ...
7332 (s390_regsets): ... this, and make static.
7333 (s390_get_pc, s390_set_pc): Adjust.
7334 (s390_get_hwcap): New target_desc parameter, and use it.
7335 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7336 (s390_arch_setup): Adjust to set the current process'es target
7337 description. Don't adjust the regmap.
7338 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7339 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7340 (regs_info_3264): New globals.
7341 (s390_regs_info): New function.
7342 (the_low_target): Adjust.
7343 (initialize_low_arch): New function.
7344 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7345 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7346 [__mips64] (init_registers_mips_linux)
7347 (init_registers_mips_dsp_linux): Delete defines.
7348 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7349 (have_dsp): New global.
7350 (mips_read_description): New, based on mips_arch_setup.
7351 (mips_arch_setup): Reimplement.
7352 (get_usrregs_info): New function.
7353 (mips_cannot_fetch_register, mips_cannot_store_register)
7354 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7355 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7356 (target_regsets): Rename to ...
7357 (mips_regsets): ... this, and make static.
7358 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7359 (dsp_regs_info, regs_info): New globals.
7360 (mips_regs_info): New function.
7361 (the_low_target): Adjust.
7362 (initialize_low_arch): New function.
7363 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7364 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7365 Declare.
7366 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7367 (arm_read_description): New, with bits factored from
7368 arm_arch_setup.
7369 (arm_arch_setup): Reimplement.
7370 (target_regsets): Rename to ...
7371 (arm_regsets): ... this, and make static.
7372 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7373 (arm_regs_info): New function.
7374 (the_low_target): Adjust.
7375 (initialize_low_arch): New function.
7376 * linux-m68k-low.c (tdesc_m68k): Declare.
7377 (target_regsets): Rename to ...
7378 (m68k_regsets): ... this, and make static.
7379 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7380 (m68k_regs_info): New function.
7381 (m68k_arch_setup): New function.
7382 (the_low_target): Adjust.
7383 (initialize_low_arch): New function.
7384 * linux-sh-low.c (tdesc_sharch): Declare.
7385 (target_regsets): Rename to ...
7386 (sh_regsets): ... this, and make static.
7387 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7388 (sh_regs_info, sh_arch_setup): New functions.
7389 (the_low_target): Adjust.
7390 (initialize_low_arch): New function.
7391 * linux-bfin-low.c (tdesc_bfin): Declare.
7392 (bfin_arch_setup): New function.
7393 (bfin_usrregs_info, regs_info): New globals.
7394 (bfin_regs_info): New function.
7395 (the_low_target): Adjust.
7396 (initialize_low_arch): New function.
7397 * linux-cris-low.c (tdesc_cris): Declare.
7398 (cris_arch_setup): New function.
7399 (cris_usrregs_info, regs_info): New globals.
7400 (cris_regs_info): New function.
7401 (the_low_target): Adjust.
7402 (initialize_low_arch): New function.
7403 * linux-cris-low.c (tdesc_crisv32): Declare.
7404 (cris_arch_setup): New function.
7405 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7406 (cris_regs_info): New function.
7407 (the_low_target): Adjust.
7408 (initialize_low_arch): New function.
7409 * linux-m32r-low.c (tdesc_m32r): Declare.
7410 (m32r_arch_setup): New function.
7411 (m32r_usrregs_info, regs_info): New globals.
7412 (m32r_regs_info): Adjust.
7413 (initialize_low_arch): New function.
7414 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7415 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7416 (tic6x_usrregs_info): Forward declare.
7417 (tic6x_read_description): New function, based on ...
7418 (tic6x_arch_setup): ... this. Reimplement.
7419 (target_regsets): Rename to ...
7420 (tic6x_regsets): ... this, and make static.
7421 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7422 (tic6x_regs_info): New function.
7423 (the_low_target): Adjust.
7424 (initialize_low_arch): New function.
7425 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7426 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7427 (target_regsets): Rename to ...
7428 (xtensa_regsets): ... this, and make static.
7429 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7430 globals.
7431 (xtensa_arch_setup, xtensa_regs_info): New functions.
7432 (the_low_target): Adjust.
7433 (initialize_low_arch): New function.
7434 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7435 (nios2_arch_setup): Set the current process'es tdesc.
7436 (target_regsets): Rename to ...
7437 (nios2_regsets): ... this.
7438 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7439 (nios2_regs_info): New function.
7440 (the_low_target): Adjust.
7441 (initialize_low_arch): New function.
a261b8f5
PA
7442 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7443 (aarch64_arch_setup): Set the current process'es tdesc.
7444 (target_regsets): Rename to ...
7445 (aarch64_regsets): ... this.
7446 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7447 (aarch64_regs_info): New function.
7448 (the_low_target): Adjust.
7449 (initialize_low_arch): New function.
3aee8918
PA
7450 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7451 globals.
7452 (target_regsets): Rename to ...
7453 (tile_regsets): ... this.
7454 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7455 (tile_regs_info): New function.
7456 (tile_arch_setup): Set the current process'es tdesc.
7457 (the_low_target): Adjust.
7458 (initialize_low_arch): New function.
7459 * spu-low.c (tdesc_spu): Declare.
7460 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7461 * win32-arm-low.c (tdesc_arm): Declare.
7462 (arm_arch_setup): New function.
7463 (the_low_target): Install arm_arch_setup instead of
7464 init_registers_arm.
7465 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7466 (init_windows_x86): Rename to ...
7467 (i386_arch_setup): ... this. Set `win32_tdesc'.
7468 (the_low_target): Adjust.
7469 * win32-low.c (win32_tdesc): New global.
7470 (child_add_thread): Don't create the thread cache here.
7471 (do_initial_child_stuff): Set the new process'es tdesc.
7472 * win32-low.h (struct target_desc): Forward declare.
7473 (win32_tdesc): Declare.
7474 * lynx-i386-low.c (tdesc_i386): Declare global.
7475 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7476 * lynx-low.c (lynx_tdesc): New global.
7477 (lynx_add_process): Set the new process'es tdesc.
7478 * lynx-low.h (struct target_desc): Forward declare.
7479 (lynx_tdesc): Declare global.
7480 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7481 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7482 * nto-low.c (nto_tdesc): New global.
7483 (do_attach): Set the new process'es tdesc.
7484 * nto-low.h (struct target_desc): Forward declare.
7485 (nto_tdesc): Declare.
7486 * nto-x86-low.c (tdesc_i386): Declare.
7487 (nto_x86_arch_setup): Set `nto_tdesc'.
7488
b1fbec62
GB
74892013-06-04 Gary Benson <gbenson@redhat.com>
7490
7491 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7492 to qSupported response when appropriate.
7493 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7494 with nonzero-length annex.
7495 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7496 arguments supplied in annex.
7497
d1ec4ce7
DE
74982013-05-31 Doug Evans <dje@google.com>
7499
ac44adcb 7500 PR server/15594
d1ec4ce7
DE
7501 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7502 64 bits in 64-cross-32 environment.
7503
9b25f2d3
PA
75042013-05-28 Pedro Alves <palves@redhat.com>
7505
7506 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7507 (aarch64-without-fpu.c): Delete rule.
7508 * configure.srv (aarch64*-*-linux*): Remove references to
7509 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7510 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7511 declaration.
7512
6740dc9c
PA
75132013-05-24 Pedro Alves <palves@redhat.com>
7514
7515 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7516 instead of strchr/decode_address. Error if the range isn't split
7517 with a ','. Don't assume there's be a ':' in the action.
7518
c2d6af84
PA
75192013-05-23 Yao Qi <yao@codesourcery.com>
7520 Pedro Alves <palves@redhat.com>
7521
7522 * linux-low.c (lwp_in_step_range): New function.
7523 (linux_wait_1): If the thread was range stepping and stopped
7524 outside the stepping range, report the stop to GDB. Otherwise,
7525 continue stepping. Add range stepping debug output.
7526 (linux_set_resume_request): Copy the step range from the resume
7527 request to the lwp.
7528 (linux_supports_range_stepping): New.
7529 (linux_target_ops) <supports_range_stepping>: Set to
7530 linux_supports_range_stepping.
7531 * linux-low.h (struct linux_target_ops)
7532 <supports_range_stepping>: New field.
7533 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7534 * linux-x86-low.c (x86_supports_range_stepping): New.
7535 (the_low_target) <supports_range_stepping>: Set to
7536 x86_supports_range_stepping.
7537 * server.c (handle_v_cont): Handle 'r' action.
7538 (handle_v_requests): Append ";r" if the target supports range
7539 stepping.
7540 * target.h (struct thread_resume) <step_range_start,
7541 step_range_end>: New fields.
7542 (struct target_ops) <supports_range_stepping>:
7543 New field.
7544 (target_supports_range_stepping): New macro.
7545
58794e1a
JB
75462013-05-17 Joel Brobecker <brobecker@adacore.com>
7547
7548 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7549 confusion in comment.
7550
d631c5a7
JB
75512013-05-17 Joel Brobecker <brobecker@adacore.com>
7552
7553 * lynx-low.c (struct process_info_private): New type.
7554 (lynx_add_process): New function.
7555 (lynx_create_inferior, lynx_attach): Replace calls to
7556 add_process by calls to lynx_add_process.
7557 (lynx_resume): If PTID is null, then try using
7558 current_process()->private->last_wait_event_ptid.
7559 Add comments.
7560 (lynx_clear_inferiors): Delete. The contents of that function
7561 has been inlined in lynx_mourn;
7562 (lynx_wait_1): Save the ptid in the process's private data.
7563 (lynx_mourn): Free the process' private data. Replace call
7564 to lynx_clear_inferiors by call to clear_inferiors.
7565
96f7a20f
YQ
75662013-05-17 Yao Qi <yao@codesourcery.com>
7567
7568 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7569 the right place.
7570
db0dfaa0
LM
75712013-05-16 Luis Machado <lgustavo@codesourcery.com>
7572
7573 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7574 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7575 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7576 PT_TEXT_END_ADDR guards. Update comments.
7577 (linux_target_op) <read_offsets>: Conditionally define to
7578 linux_read_offsets if the target is UCLIBC and if it defines
7579 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7580
68f5f838
SL
75812013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7582 Andrew Jenner <andrew@codesourcery.com>
7583
7584 * Makefile.in (SFILES): Add linux-nios2-low.c.
7585 (clean): Add action to delete nios2-linux.c.
7586 (nios2-linux.c): New rule.
7587 * configure.srv: Add nios2*-*-linux*.
7588 * linux-nios2-low.c: New.
7589
1ebff1fd
HAQ
75902013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7591
7592 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7593
f6150862
HZ
75942013-04-25 Hui Zhu <hui@codesourcery.com>
7595
7596 PR gdb/15186
f6150862
HZ
7597 * ax.c (ax_printf): Add fflush.
7598
614c279d
TT
75992013-04-22 Tom Tromey <tromey@redhat.com>
7600
7601 * Makefile.in (SFILES): Add filestuff.c.
7602 (OBS): Add filestuff.o.
7603 (filestuff.o): New target.
7604 * config.in, configure: Rebuild.
7605 * configure.ac: Check for fdwalk, pipe2.
7606
7d4e5717
PA
76072013-04-17 Pedro Alves <palves@redhat.com>
7608
7609 * configure.ac (USE_THREAD_DB): Delete variable.
7610 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7611 Don't AC_SUBST USE_THREAD_DB.
7612 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7613 * config.in, configure: Regenerate.
7614
d5c93e41
PA
76152013-04-16 Pedro Alves <palves@redhat.com>
7616
7617 * linux-low.h (struct lwp_info) <thread_known>: Move under
7618 the USE_THREAD_DB #ifdef.
7619
04f5fe89
PA
76202013-04-16 Pedro Alves <palves@redhat.com>
7621
7622 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7623 (linux-low.o): Delete rule.
7624 * linux-low.h: Always include "gdb_thread_db.h" instead of
7625 conditionally including thread_db.h.
7626 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7627 HAVE_THREAD_DB_H.
7628
480b27bf
JK
76292013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7630
7631 * Makefile.in (install-only): Fix make install regression.
7632
43662968
JK
76332013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7634
7635 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7636 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7637 installation.
7638 * gdbserver.1: Remove.
7639
3e74e146
PA
76402013-03-22 Pedro Alves <palves@redhat.com>
7641
7642 * linux-low.c (handle_extended_wait): Don't call
7643 linux_enable_event_reporting.
7644
a8347a2a
TT
76452013-03-15 Tony Theodore <tonyt@logyst.com>
7646
7647 PR build/9098:
7648 * Makefile.in (SHELL): Use @SHELL@.
7649
eeb56fa7
SDJ
76502013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7651
7652 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7653 compiler warning.
7654
4fa7e2ff
JB
76552013-03-13 Joel Brobecker <brobecker@adacore.com>
7656
7657 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7658 Remove extraneous NULL element.
7659
8ddb1965
YQ
76602013-03-13 Yao Qi <yao@codesourcery.com>
7661
7662 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7663 'V' block in trace frame.
7664
9accd112
MM
76652013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7666
7667 * target.h (struct target_ops): Add btrace ops.
7668 (target_supports_btrace): New macro.
7669 (target_enable_btrace): New macro.
7670 (target_disable_btrace): New macro.
7671 (target_read_btrace): New macro.
7672 * gdbthread.h (struct thread_info): Add btrace field.
7673 * server.c: Include btrace-common.h.
7674 (handle_btrace_general_set): New function.
7675 (handle_btrace_enable): New function.
7676 (handle_btrace_disable): New function.
7677 (handle_general_set): Call handle_btrace_general_set.
7678 (handle_qxfer_btrace): New function.
7679 (struct qxfer qxfer_packets[]): Add btrace entry.
7680 * inferiors.c (remove_thread): Disable btrace.
7681 * linux-low: Include linux-btrace.h.
7682 (linux_low_enable_btrace): New function.
7683 (linux_low_read_btrace): New function.
7684 (linux_target_ops): Add btrace ops.
7685 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7686 Add srv_linux_btrace=yes.
7687 (x86_64-*-linux*): Add linux-btrace.o.
7688 Add srv_linux_btrace=yes.
7689 * configure.ac: Define HAVE_LINUX_BTRACE.
7690 * config.in: Regenerated.
7691 * configure: Regenerated.
7692
5cc22e4c
MM
76932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7694
7695 * server.c (handle_qxfer): Preserve error message if -3 is
7696 returned.
7697 (qxfer): Document the -3 return value.
7698
7c97f91e
MM
76992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7700
7701 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7702 (linux_btrace_h): New variable.
7703 (linux-btrace.o): New rule.
7704
be9a119c 77052013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7706 Hafiz Abid Qadeer <abidh@codesourcery.com>
7707
7708 * tracepoint.c (trace_buffer_size): New global.
7709 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7710 (init_trace_buffer): Change to one-argument function. Allocate
7711 trace buffer memory.
7712 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7713 handle QTBuffer:size packet.
7714 (cmd_bigqtbuffer_size): New function.
7715 (initialize_tracepoint): Call init_trace_buffer with
7716 DEFAULT_TRACE_BUFFER_SIZE.
7717 * server.c (handle_query): Add QTBuffer:size in the
7718 supported packets.
7719
e64f7499
YQ
77202013-03-07 Yao Qi <yao@codesourcery.com>
7721
7722 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7723 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7724 of -1.
7725 (cmd_qtsp): Adjust condition. Do post increment.
7726 Set cur_action and cur_step_action back to 0.
7727
f0ae6fc3
PA
77282013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7729
7730 PR server/15236
7731 * linux-low.c (linux_write_memory): Return early success if LEN is
7732 zero.
7733
b5b0b0af
CV
77342013-03-05 Corinna Vinschen <vinschen@redhat.de>
7735
334ad4a8 7736 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7737
589bc927
TT
77382013-02-28 Tom Tromey <tromey@redhat.com>
7739
7740 * configure.ac: Invoke AC_SYS_LARGEFILE.
7741 * configure, config.in: Rebuild.
7742
dfe07582
CV
77432013-02-28 Corinna Vinschen <vinschen@redhat.com>
7744
7745 * win32-low.c: Throughout, fix format strings and casts of
7746 printf-like functions to avoid type related warnings on all
7747 platforms.
7748 (get_child_debug_event): Print dwDebugEventCode as hex since
7749 that's how it's usually documented.
7750
736cd585
YQ
77512013-02-28 Yao Qi <yao@codesourcery.com>
7752
7753 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7754 pulongest.
7755
e1f58301
JW
77562013-02-27 Jiong Wang <jiwang@tilera.com>
7757
7758 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7759 (reg-tilegx32.c): New rule.
7760 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7761 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7762 different register info initializer according to elf class.
7763 (init_registers_tilgx32): New function. The tilegx32 register info
7764 initializer.
7765 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7766 (tile_store_gregset): Likewise.
7767
d171ca78
YQ
77682013-02-27 Yao Qi <yao@codesourcery.com>
7769
7770 * server.c (process_point_options): Print debug message when
7771 debug_threads is true.
7772
282bbdf3
YQ
77732013-02-26 Yao Qi <yao@codesourcery.com>
7774
7775 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7776
aca22551
PA
77772013-02-19 Pedro Alves <palves@redhat.com>
7778 Kai Tietz <ktietz@redhat.com>
7779
7780 PR gdb/15161
7781
7782 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7783 instead of strtoul to extract address from packet.
7784 (process_serial_event) <'z'>: Likewise.
7785
4f3cee1c
YQ
77862013-02-18 Yao Qi <yao@codesourcery.com>
7787
7788 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7789
8e1d55a3
PA
77902013-02-14 Pedro Alves <palves@redhat.com>
7791
7792 Plug memory leak.
7793
7794 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7795 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7796
458820da
PA
77972013-02-14 Pedro Alves <palves@redhat.com>
7798
7799 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7800
baea0dae
PA
78012013-02-14 Pedro Alves <palves@redhat.com>
7802
7803 * tracepoint.c (save_string): Delete.
7804 (add_tracepoint_action): Use savestring instead of save_string.
7805
0b1afbb3
PA
78062013-02-12 Pedro Alves <palves@redhat.com>
7807
7808 * linux-xtensa-low.c: Ditto.
7809 * xtensa-xtregs.c: Ditto.
7810
8a4ac37e
PA
78112013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7812
7813 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7814 thread_db.
7815
148de6bb
MS
78162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7817
7818 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7819 aarch64_num_wp_regs and aarch64_num_bp_regs to
7820 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7821
55fac6e0
MS
78222013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7823
7824 * linux-aarch64-low.c (ps_get_thread_area): Replace
7825 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7826
176eb98c
MS
78272013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7828 Marcus Shawcroft <marcus.shawcroft@arm.com>
7829 Nigel Stephens <nigel.stephens@arm.com>
7830 Yufeng Zhang <yufeng.zhang@arm.com>
7831
7832 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7833 (aarch64.c, aarch64-without-fpu.c): New targets.
7834 * configure.srv (aarch64*-*-linux*): New.
7835 * linux-aarch64-low.c: New file.
7836
56f7af9c
MS
78372013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7838
43aaf8b6 7839 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7840 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7841 (dequeue_one_deferred_signal, linux_resume_one_thread)
7842 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7843 (linux_tracefork_grandchild, linux_test_for_tracefork)
7844 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7845 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7846 where the argument is 0.
7847
60f662b0
YQ
78482013-01-25 Yao Qi <yao@codesourcery.com>
7849
7850 * event-loop.c: Include "queue.h".
7851 (gdb_event_p): New typedef.
7852 (struct gdb_event) <next_event>: Remove.
7853 (event_queue): Change to QUEUE(gdb_event_p).
7854 (async_queue_event): Remove.
7855 (gdb_event_xfree): New.
7856 (initialize_event_loop): New.
7857 (process_event): Use API from QUEUE.
7858 (wait_for_event): Likewise.
7859 * server.c (main): Call initialize_event_loop.
7860 * server.h (initialize_event_loop): Declare.
7861
5ae4861a
YQ
78622013-01-18 Yao Qi <yao@codesourcery.com>
7863
7864 * ax.h (struct eval_agent_expr_context): New.
7865 (gdb_eval_agent_expr): Update declaration.
7866 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7867 TFRAME. Add new argument CTX.
7868 * server.h (struct eval_agent_expr_context): Declare.
7869 (agent_mem_read, agent_tsv_read): Update declaration.
7870 (agent_mem_read_string): Likewise.
7871 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7872 (add_traceframe_block): Add new argument TPOINT.
7873 Increase TPOINT->traceframe_usage.
7874 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7875 eval_tracepoint_agent_expr.
7876 (condition_true_at_tracepoint): Likewise.
7877 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7878 (agent_mem_read_string, agent_tsv_read): Likewise.
7879
85e00e85
YQ
78802013-01-16 Yao Qi <yao@codesourcery.com>
7881
7882 * linux-low.c (linux_resume_one_lwp): Don't check
7883 'lwp->bp_reinsert != 0'.
7884
4039cf45
JB
78852013-01-07 Joel Brobecker <brobecker@adacore.com>
7886 Pedro Alves <palves@redhat.com>
7887
7888 * lynx-low.c (ptrace_request_to_str): Define a temporary
7889 macro and use it to simplify this function's implementation.
7890
9044dee2
JB
78912013-01-07 Joel Brobecker <brobecker@adacore.com>
7892
7893 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7894 sets errno.
7895
e6352c8f
JB
78962013-01-07 Joel Brobecker <brobecker@adacore.com>
7897
7898 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7899
50681a27
JB
79002013-01-07 Joel Brobecker <brobecker@adacore.com>
7901
7902 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7903
3f6e77ef
JB
79042013-01-07 Joel Brobecker <brobecker@adacore.com>
7905
7906 * lynx-low.c (lynx_resume): Use the resume_info parameter
7907 to determine the ptid for the lynx_ptrace call, unless
7908 it is equal to minus_one_ptid, in which case we use the
7909 ptid of the current_inferior.
7910 (lynx_wait_1): After having received a thread create/exit
7911 event, resume the inferior's execution using the signaling
7912 thread's ptid, rather than the old ptid.
7913
7fda33ae
JB
79142013-01-07 Joel Brobecker <brobecker@adacore.com>
7915
7916 * lynx-low.c (lynx_resume): Delete variable ret.
7917
b9786c74
JB
79182013-01-01 Joel Brobecker <brobecker@adacore.com>
7919
7920 * gdbreplay.c (gdbreplay_version): Update copyright year.
7921 * server.c (gdbserver_version): Likewise.
7922
8b93d60f
JB
79232012-12-17 Joel Brobecker <brobecker@adacore.com>
7924
7925 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7926 new thread.
7927
037335a7
JB
79282012-12-17 Joel Brobecker <brobecker@adacore.com>
7929
7930 * lynx-low.c (ptrace_request_to_str): Add handling for
7931 PTRACE_GETTRACESIG.
7932
52d4cbd8
JB
79332012-12-17 Joel Brobecker <brobecker@adacore.com>
7934
7935 * lynx-low.c (lynx_attach): Delete variable new_process.
7936
ab8f6ca9
JB
79372012-12-17 Joel Brobecker <brobecker@adacore.com>
7938
7939 * lynx-low.c (lynx_create_inferior): Delete variable
7940 new_process.
7941
78cbc024
JB
79422012-12-17 Joel Brobecker <brobecker@adacore.com>
7943
7944 * lynx-low.c (ptrace_request_to_str): Do not handle
7945 PTRACE_GETTHREADLIST if this macro does not exist.
7946
14a00470
YQ
79472012-12-15 Yao Qi <yao@codesourcery.com>
7948
7949 * Makefile.in (OBS): Add notif.o.
7950 * notif.c, notif.h: New.
7951 * server.c: Include "notif.h".
7952 (struct vstop_notif) <next>: Remove.
7953 <base>: New field.
7954 (queue_stop_reply): Update.
7955 (push_event, send_next_stop_reply): Remove.
7956 (discard_queued_stop_replies): Update.
7957 (notif_stop): New variable.
7958 (handle_v_stopped): Remove.
7959 (handle_v_requests): Don't call handle_v_stopped. Call
7960 handle_ack_notif instead.
7961 (queue_stop_reply_callback): Call notif_event_enque instead
7962 of queue_stop_reply.
7963 (handle_status): Don't call send_next_stop_reply, call
7964 notif_write_event instead.
7965 (kill_inferior_callback): Likewise.
7966 (detach_or_kill_inferior_callback): Likewise.
7967 (main): Call initialize_notif.
7968 (process_serial_event): Call QUEUE_is_empty.
7969 (handle_target_event): Call notif_push instead of push event.
7970 * server.h (push_event): Remove declaration.
7971
61c125b9
TT
79722012-12-10 Tom Tromey <tromey@redhat.com>
7973
7974 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7975 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7976 macros.
7977 (.c.o): Rewrite.
7978 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7979 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7980 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7981 (amd64-linux-ipa.o, ax.o): Rewrite.
7982 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7983 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7984 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7985 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7986 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7987 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7988 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7989 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7990 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7991 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7992 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7993 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7994 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7995 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7996 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7997 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7998 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7999 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8000 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8001 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8002 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8003 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8004 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8005 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8006 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8007 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8008 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8009 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8010 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8011 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8012 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8013 (reg-tilegx.o): Remove.
8014 (all_object_files): New macro.
8015 Include .deps files.
8016 * aclocal.m4, configure: Rebuild.
8017 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8018 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8019 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8020
e90e9ad9
TT
80212012-12-05 Tom Tromey <tromey@redhat.com>
8022
8023 PR gdb/14917:
8024 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8025
02d403bf 80262012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8027
8028 * configure.ac: Check for linux/perf_event.h.
8029 * config.in: Regenerated.
8030 * configure: Regenerated.
8031
0270a750
PA
80322012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8033
8034 * hostio.c (handle_readlink): Decrease buffer size
8035 parameter passed to readlink by one byte.
8036
8c29b58e
YQ
80372012-11-26 Yao Qi <yao@codesourcery.com>
8038
8039 * configure.ac (build_warnings): Append '-Wempty-body'.
8040 * configure: Regenerated.
8041 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8042 body.
8043
8bdce1ff
PM
80442012-11-15 Pierre Muller <muller@sourceware.org>
8045
8046 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8047 * config.in: Regenerate.
8048 * configure: Regenerate.
8049 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8050 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8051 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8052 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8053 header.
8054 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8055 instead of <sys/wait.h> header.
8056 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8057
02d403bf 80582012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8059
8060 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8061 (various make rules): Remove -DGDBSERVER
8062
fbd5db48
YQ
80632012-11-09 Yao Qi <yao@codesourcery.com>
8064
8065 * spu-low.c (current_ptid): Move it to ..
8066 * gdbthread.h: ... here. New.
8067 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8068 * server.c (myresume, process_serial_event): Likewise.
8069 * thread-db.c (thread_db_find_new_threads): Likewise.
8070 * tracepoint.c (run_inferior_command): Likewise.
8071
b3dc46ff
AB
80722012-10-01 Andrew Burgess <aburgess@broadcom.com>
8073
8074 * server.c (handle_search_memory_1): Include access length in
8075 warning message.
8076
07c04788
HPN
80772012-09-05 Michael Brandt <michael.brandt@axis.com>
8078
8079 * linux-crisv32-low.c: Fix compile errors.
8080
918d227b
YQ
80812012-09-04 Yao Qi <yao@codesourcery.com>
8082
8083 * tracepoint.c (cmd_qtsv): Adjust debug message.
8084 Don't check CUR_TPOINT.
8085
18c1b81a
YQ
80862012-08-28 Yao Qi <yao@codesourcery.com>
8087
8088 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8089 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8090 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8091 Remove declarations of xmalloc, xreallloc, xstrdup and
8092 freeargv.
8093 * Makefile.in (libiberty_h): New.
8094 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8095 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8096
dc82f37b
YQ
80972012-08-23 Yao Qi <yao@codesourcery.com>
8098
8099 * server.h: Remove declaration of 'xsnprintf'.
8100
406b1477
KS
81012012-08-22 Keith Seitz <keiths@redhat.com>
8102
8103 * server.h: Include build-gnulib-gbserver/config.h.
8104 * gdbreplay.c: Likewise.
8105
e6712ff1
DE
81062012-08-08 Doug Evans <dje@google.com>
8107
8108 * Makefile.in (SFILES): Add gdb_vecs.c.
8109 (OBS): Add gdb_vecs.o.
8110 (gdb_vecs_h, host_defs_h): New variables.
8111 (thread-db.o): Add $(gdb_vecs_h) dependency.
8112 (gdb_vecs.o): New rule.
8113 * thread-db.c: #include "gdb_vecs.h".
8114 (thread_db_load_search): Use a vector to iterate over path elements.
8115 Handle text appearing after "$pdir".
8116
8117 * configure.ac: Add check for strstr.
8118 * config.in: Regenerate.
8119 * configure: Regenerate.
8120
7c3270ae
UW
81212012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8122
8123 * hostio.c (handle_pread): If pread fails, fall back to attempting
8124 lseek/read.
8125 (handle_pwrite): Likewise for pwrite.
8126
b62e2b27
UW
81272012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8128
8129 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8130 between unsupported TYPE and unimplementable ADDR/LEN combination.
8131 (arm_insert_point): Act on new return value.
8132
78a99e91
PA
81332012-07-31 Pedro Alves <palves@redhat.com>
8134
8135 * server.c (process_point_options): Only skip tokens if we find
8136 one that is unrecognized. Don't treat 'X' specially while
8137 skipping unrecognized tokens.
8138
fcf303ab
UW
81392012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8140
8141 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8142 to 4-byte-align HW breakpoint addresses for Thumb.
8143
7255706c
YQ
81442012-07-27 Yao Qi <yao@codesourcery.com>
8145
8146 PR remote/14161.
8147
8148 * server.h: Declare gdb_agent_about_to_close.
8149 * target.c (kill_inferior): Include "agent.h".
8150 New. Send command 'kill'.
8151 * target.h (kill_inferior): Removed macro.
8152 * tracepoint.c (gdb_agent_about_to_close): New.
8153 (gdb_agent_helper_thread): Handle command 'close'.
8154 Wait endlessly until the inferior stops.
8155 Install gdb_agent_remove_socket to atexit hook.
8156 (agent_socket_name): New static variable.
8157 (gdb_agent_socket_init): Replace local variable 'name' with
8158 'agent_socket_name'.
8159 (gdb_agent_remove_socket): New.
8160
5a3f286f
YQ
81612012-07-27 Yao Qi <yao@codesourcery.com>
8162
8163 * server.c (process_point_options): Stop at 'X' when parsing.
8164
961bd387
ME
81652012-07-19 Michael Eager <eager@eagercon.com>
8166
a261b8f5 8167 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8168 to hw_execute.
8169 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8170 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8171 hardware breakpoint.
8172
aa7c7447
JK
81732012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8174
8175 * gdbserver/linux-low.c (initialize_low): Call
8176 linux_ptrace_init_warnings.
8177
7f216e7c
DE
81782012-07-02 Doug Evans <dje@google.com>
8179
8180 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8181 pointer to int.
8182
d3ce09f5
SS
81832012-07-02 Stan Shebs <stan@codesourcery.com>
8184
8185 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8186 (ax.o): Add it to build rule.
8187 (ax-ipa.o): Ditto.
8188 (OBS): Add format.o.
8189 (IPA_OBS): Add format.o.
8190 * server.c (handle_query): Claim support for breakpoint commands.
8191 (process_point_options): Add command case.
8192 (process_serial_event): Leave running if there are printfs in
8193 effect.
8194 * mem-break.h (any_persistent_commands): Declare.
8195 (add_breakpoint_commands): Declare.
8196 (gdb_no_commands_at_breakpoint): Declare.
8197 (run_breakpoint_commands): Declare.
8198 * mem-break.c (struct point_command_list): New struct.
8199 (struct breakpoint): New field command_list.
8200 (any_persistent_commands): New function.
8201 (add_commands_to_breakpoint): New function.
8202 (add_breakpoint_commands): New function.
8203 (gdb_no_commands_at_breakpoint): New function.
8204 (run_breakpoint_commands): New function.
8205 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8206 locally.
8207 * ax.c: Include format.h.
8208 (ax_printf): New function.
8209 (gdb_eval_agent_expr): Add printf opcode.
8210
2f8f6aed
YQ
82112012-06-13 Yao Qi <yao@codesourcery.com>
8212
8213 * server.c (start_inferior): Remove duplicated writes to fields
8214 'last_resume_kind' and 'last_status' of 'current_inferior'.
8215
0c9070b3
YQ
82162012-06-12 Yao Qi <yao@codesourcery.com>
8217 Pedro Alves <palves@redhat.com>
8218
8219 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8220 comment.
8221 * server.c (handle_v_cont): Extend comment.
8222
c52daf70
YQ
82232012-06-11 Yao Qi <yao@codesourcery.com>
8224
8225 * linux-low.c (linux_attach): Add 'static'.
8226
d38bbb0a
YQ
82272012-06-06 Yao Qi <yao@codesourcery.com>
8228
8229 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8230
89dc0afd
JK
82312012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8232
8233 Fix gcc -flto compilation warning.
8234 * server.c (main): Make variable multi_mode and attach volatile.
8235
75f62ce7
TJB
82362012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8237
8238 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8239 if the platform doesn't know about it.
8240
65f479b6
PA
82412012-05-30 Jeff Kenton <jkenton@tilera.com>
8242
8243 * Makefile.in (SFILES): Add linux-tile-low.c.
8244 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8245 * configure.srv: Handle tilegx-*-linux*.
8246 * linux-tile-low.c: New file.
8247
0c5bf5a9
JK
82482012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8249
8250 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8251
a493e3e2
PA
82522012-05-24 Pedro Alves <palves@redhat.com>
8253
8254 PR gdb/7205
8255
43aaf8b6 8256 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8257
2ea28649
PA
82582012-05-24 Pedro Alves <palves@redhat.com>
8259
8260 PR gdb/7205
8261
8262 Replace target_signal with gdb_signal throughout.
8263
8d409d16
MR
82642012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8265
8266 * linux-low.c (linux_store_registers): Avoid the copying sequence
8267 when no data has been retrieved by ptrace.
8268
23512c01
MGD
82692012-05-22 Will Deacon <will.deacon@arm.com>
8270
8271 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8272 Include asm/ptrace.h.
8273 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8274 already defined.
8275
4934b29e
MR
82762012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8277
8278 * linux-low.c (linux_store_registers): Don't re-retrieve data
8279 with ptrace that has already been obtained from /proc. Always
8280 copy any data retrieved with ptrace to the buffer supplied.
8281
bde24c0a
PA
82822012-05-11 Yao Qi <yao@codesourcery.com>
8283 Pedro Alves <palves@redhat.com>
8284
8285 * linux-low.c (enum stopping_threads_kind): New.
8286 (stopping_threads): Change type to `enum stopping_threads_kind'.
8287 (handle_extended_wait): If stopping and suspending threads, leave
8288 the new_lwp suspended too.
8289 (linux_wait_for_event): Adjust.
8290 (stop_all_lwps): Set `stopping_threads' to
8291 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8292 whether we're suspending threads or just stopping them. Assert no
8293 recursion happens.
8294
623b6bdf
YQ
82952012-04-29 Yao Qi <yao@codesourcery.com>
8296
8297 * server.h: Move some code to ...
8298 * gdbthread.h: ... here. New.
8299 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8300 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8301 (nto-low.o, win32-low.o): Likewise.
8302 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8303 * regcache.c, remote-utils.c, server.c: Likewise.
8304 * target.c, tracepoint.c, win32-low.c: Likewise.
8305
f15f9948
TJB
83062012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8307
8308 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8309 (PTRACE_ARG4_TYPE): Likewise.
8310 (PTRACE_XFER_TYPE): Likewise.
8311 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8312 ptrace to PTRACE_ARG3_TYPE.
8313 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8314 (PTRACE_ARG4_TYPE): Likewise.
8315 (PTRACE_XFER_TYPE): Likewise.
8316 (linux_detach_one_lwp): Cast fourth argument of
8317 ptrace to long then PTRACE_ARG4_TYPE.
8318 (regsets_fetch_inferior_registers): Cast third argument of
8319 ptrace to long then PTRACE_ARG3_TYPE.
8320 (regsets_store_inferior_registers): Likewise.
8321
38ea300a
PA
83222012-04-20 Pedro Alves <palves@redhat.com>
8323
8324 * configure: Regenerate.
8325
c971b7fa
PA
83262012-04-19 Pedro Alves <palves@redhat.com>
8327
43aaf8b6 8328 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8329 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8330 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8331 (all, install-only, uninstall, clean-info, all-lib, clean): No
8332 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8333 (maintainer-clean realclean distclean): Use subdir_do.
8334 (subdir_do): New.
8335 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8336 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8337 * acinclude.m4: Include acx_configure_dir.m4.
8338 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8339 calls. Call AC_PROG_RANLIB. Configure gnulib using
8340 ACX_CONFIGURE_DIR.
8341 (GNULIB): New.
8342 (GNULIB_STDINT_H): Adjust.
8343 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8344 * gdbreplay.c: Include build-gnulib/config.h.
8345 * server.h: Likewise.
8346 * aclocal.m4: Regenerate.
8347 * config.in: Regenerate.
8348 * configure: Regenerate.
c971b7fa 8349
809277f8
PA
83502012-04-19 Pedro Alves <palves@redhat.com>
8351
8352 * Makefile.in (LIBGNU, INCGNU): Adjust.
8353 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8354 (all, install-only, uninstall, clean-info, all-lib, clean)
8355 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8356 * configure.ac: Adjust AC_OUTPUT output.
8357 * aclocal.m4: Regenerate.
8358 * configure: Regenerate.
8359
fd9bb8b8
PA
83602012-04-19 Pedro Alves <palves@redhat.com>
8361
8362 * Makefile.in (generated_files): New.
8363 (server_h): Remove the explicit dependency on config.h, and depend
8364 on $generated_files.
8365
1c298c66
PA
83662012-04-19 Pedro Alves <palves@redhat.com>
8367
8368 * Makefile.in (INCGNU): Add -Ignulib.
8369
57c4b50b
PA
83702012-04-19 Pedro Alves <palves@redhat.com>
8371
8372 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8373 (INCGNU): ... this, and spell out -I here.
8374 (GNULIB_LIB): Rename to ...
8375 (LIBGNU): ... this.
8376 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8377
1030e047
PA
83782012-04-19 Pedro Alves <palves@redhat.com>
8379
8380 * config.in: Regenerate.
8381
447d4319
PA
83822012-04-19 Pedro Alves <palves@redhat.com>
8383
8384 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8385 * server.h (memmem): Remove declaration.
8386 * config.in: Regenerate.
8387 * configure: Regenerate.
8388
aad9eab9
YQ
83892012-04-19 Yao Qi <yao@codesourcery.com>
8390
8391 * Makefile.in (SFILES): Add common/vec.c.
8392 (OBS): Add vec.o.
8393 (vec.o): New rule.
8394
3e10640f
YQ
83952012-04-19 Yao Qi <yao@codesourcery.com>
8396
8397 * remote-utils.c (prepare_resume_reply): Replace with macro
8398 target_core_of_thread.
8399 * server.c (handle_qxfer_threads_proper): Likewise.
8400 * target.h (traget_core_of_thread): New macro.
8401
71622373
PA
84022012-04-18 Pedro Alves <palves@redhat.com>
8403
8404 * aclocal.m4: Regenerate.
8405 * configure: Regenerate.
8406
80d26939
YQ
84072012-04-16 Yao Qi <yao@codesourcery.com>
8408
8409 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8410 duplicated on address.
8411
42476b70
YQ
84122012-04-16 Yao Qi <yao@codesourcery.com>
8413
8414 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8415 (struct tracepoint_action_ops) <send>: New field.
8416 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8417 (agent_expr_send, x_tracepoint_action_send): New.
8418 (l_tracepoint_action_send): New.
8419 (cmd_qtdp): Download and install tracepoint
8420 according to `use_agent'.
8421 (run_inferior_command): Add one more parameter `len'.
8422 Update callers.
8423 (tracepoint_send_agent): New.
8424 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8425
7bc83639
YQ
84262012-04-16 Yao Qi <yao@codesourcery.com>
8427
8428 * tracepoint.c (download_tracepoints): Moved to ...
8429 (cmd_qtstart): ... here.
8430
5f18041e
YQ
84312012-04-14 Yao Qi <yao@codesourcery.com>
8432
8433 * tracepoint.c: Include inttypes.h.
8434 (struct collect_memory_action): Use sized types.
8435 (struct tracepoint): Likewise.
8436 (cmd_qtdp, stop_tracing): Update print specifiers.
8437 (cmd_qtp, response_tracepoint): Likewise.
8438 (collect_data_at_tracepoint): Likewise.
8439 (collect_data_at_step): Likewise.
8440
55a8c076
YQ
84412012-04-14 Yao Qi <yao@codesourcery.com>
8442
8443 Import gnulib module inttypes.
8444 * aclocal.m4, config.in, configure: Regenerated.
8445
dc750257
YQ
84462012-04-14 Yao Qi <yao@codesourcery.com>
8447
8448 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8449 Makefile and config.status at last.
8450
0ab5faf9
YQ
84512012-04-13 Yao Qi <yao@codesourcery.com>
8452
8453 * tracepoint.c: Include stdint.h unconditionally.
8454
18f5fd81
TJB
84552012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8456
8457 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8458 on BFD_HAVE_SYS_PROCFS_TYPE.
8459 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8460 * configure: Regenerate.
8461 * config.in: Likewise.
8462
4d47af5c
L
84632012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8464
8465 * Makefile.in (clean): Also remove x32.c x32-linux.c
8466 x32-avx.c x32-avx-linux.c.
8467 (x32.o): New target.
8468 (x32.c): Likewise.
8469 (x32-linux.o): Likewise.
8470 (x32-linux.c): Likewise.
8471 (x32-avx.o): Likewise.
8472 (x32-avx.c): Likewise.
8473 (x32-avx-linux.o): Likewise.
8474 (x32-avx-linux.c): Likewise.
8475
8476 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8477 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8478 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8479 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8480 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8481 i386/x32-avx-linux.xml.
8482
8483 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8484 (init_registers_x32_avx_linux): Likwise.
8485 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8486 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8487
ecedbe58
PA
84882012-04-13 Pedro Alves <palves@redhat.com>
8489
8490 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8491 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8492 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8493 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8494 the sub-make.
8495
c92b5177
L
84962012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8497
8498 * linux-x86-low.c (compat_x32_clock_t): New.
8499 (compat_x32_siginfo_t): Likewise.
8500 (compat_x32_siginfo_from_siginfo): Likewise.
8501 (siginfo_from_compat_x32_siginfo): Likewise.
8502 (linux_is_elf64): Likewise.
8503 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8504 and siginfo_from_compat_x32_siginfo for x32.
8505 (x86_arch_setup): Set linux_is_elf64.
8506
214d508e
L
85072012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8508
8509 PR gdb/13969
8510 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8511 e_machine field.
8512 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8513 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8514 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8515 compatible with process.
8516
c9a1864a
YQ
85172012-04-12 Yao Qi <yao@codesourcery.com>
8518
8519 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8520 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8521 (install-only, install-info, clean): Handle sub dir gnulib.
8522 (all-lib, am--refresh): New targets.
8523 (memmem.o): Remove target.
8524 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8525 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8526 (AC_REPLACE_FUNCS): Remove memmem.
8527 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8528 (AC_OUTPUT): Generate Makefile in gnulib/.
8529 * aclocal.m4, config.in, configure: Regenerated.
8530
367ba2c2
MR
85312012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8532
8533 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8534
9d236627
PA
85352012-04-05 Pedro Alves <palves@redhat.com>
8536
8537 -Werror=strict-aliasing
8538
8539 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8540 pointer.
8541
111217b3
PA
85422012-04-04 Pedro Alves <palves@redhat.com>
8543
8544 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8545 (sparc_store_gregset_from_stack, sparc_store_gregset)
8546 (sparc_breakpoint_at): Fix formatting.
8547
8365dcf5
TJB
85482012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8549
8550 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8551 are available.
8552 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8553 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8554 * config.in: Regenerate.
8555 * configure: Likewise.
8556
689cc2ae
PA
85572012-03-29 Pedro Alves <palves@redhat.com>
8558
8559 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8560 Correct ptrace arguments.
8561
c14dfd32
PA
85622012-03-28 Pedro Alves <palves@redhat.com>
8563
8564 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8565 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8566 (IA64_FR1_REGNUM): New defines.
8567 (ia64_fetch_register): New.
8568 (the_low_target): Install it.
8569 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8570 field.
8571 * linux-low.c (linux_fetch_registers): Try the
8572 the_low_target.fetch_register hook first.
8573
8574 * linux-arm-low.c (the_low_target): Adjust.
8575 * linux-bfin-low.c (the_low_target): Adjust.
8576 * linux-cris-low.c (the_low_target): Adjust.
8577 * linux-crisv32-low.c (the_low_target): Adjust.
8578 * linux-m32r-low.c (the_low_target): Adjust.
8579 * linux-m68k-low.c (the_low_target): Adjust.
8580 * linux-mips-low.c (the_low_target): Adjust.
8581 * linux-ppc-low.c (the_low_target): Adjust.
8582 * linux-s390-low.c (the_low_target): Adjust.
8583 * linux-sh-low.c (the_low_target): Adjust.
8584 * linux-sparc-low.c (the_low_target): Adjust.
8585 * linux-tic6x-low.c (the_low_target): Adjust.
8586 * linux-x86-low.c (the_low_target): Adjust.
8587 * linux-xtensa-low.c (the_low_target): Adjust.
8588
63c88e13
PA
85892012-03-26 Pedro Alves <palves@redhat.com>
8590
8591 * server.c (handle_qxfer_libraries): Don't bail early if
8592 the_target->qxfer_libraries_svr4 is not NULL.
8593
fb723180
PA
85942012-03-26 Pedro Alves <palves@redhat.com>
8595
8596 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8597
0afae3cf
PA
85982012-03-23 Pedro Alves <palves@redhat.com>
8599
8600 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8601 "library-list-svr4" element's start tag when the the DSO list is
8602 empty.
8603
485f1ee4
PA
86042012-03-23 Pedro Alves <palves@redhat.com>
8605
8606 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8607 a variable whose type size is the same as the inferior's pointer
8608 size.
8609
a5362b9a
TS
86102012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8611
8612 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8613 struct siginfo.
8614 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8615 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8616 * linux-low.h: Include <signal.h>.
8617 (struct siginfo): Remove forward declaration.
8618 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8619 struct siginfo.
8620
d226c142
MF
86212012-03-21 Mike Frysinger <vapier@gentoo.org>
8622
8623 * .gitignore: Ignore more files.
8624
122f36ef
PA
86252012-03-19 Pedro Alves <palves@redhat.com>
8626 Jan Kratochvil <jan.kratochvil@redhat.com>
8627
8628 * server.c (cont_thread, general_thread): Add describing comments.
8629 (start_inferior): Clear `cont_thread'.
8630 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8631 of a process.
8632
fc3e5175
YQ
86332012-03-15 Yao Qi <yao@codesourcery.com>
8634
8635 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8636 handling to ...
8637 (cmd_qtdp): ... here.
8638
8d0d92cd
YQ
86392012-03-15 Yao Qi <yao@codesourcery.com>
8640
8641 * tracepoint.c (struct tracepoint_action_ops): New.
8642 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8643 (m_tracepoint_action_download): New.
8644 (r_tracepoint_action_download): New.
8645 (x_tracepoint_action_download): New.
8646 (l_tracepoint_action_download): New.
8647 (add_tracepoint_action): Install `action->ops' according type.
8648 (download_tracepoint_1): Move code `download' function pointer
8649 of various tracepoint_action_ops.
8650
87b0bb13
JK
86512012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8652
8653 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8654 linux_ptrace_attach_warnings.
8655
5f572dec
JK
86562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8657
8658 * Makefile.in (linux-ptrace.o): New.
8659 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8660 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8661 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8662 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8663 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8664 of these targets.
8665 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8666
f4647387
YQ
86672012-03-08 Yao Qi <yao@codesourcery.com>
8668 Pedro Alves <palves@redhat.com>
8669
8670 Fix PR server/13392.
8671 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8672 offset of JMP insn.
8673 * tracepoint.c (remove_tracepoint): New.
8674 (cmd_qtdp): Call remove_tracepoint when failed to install.
8675
9b224c5e
PA
86762012-03-07 Pedro Alves <palves@redhat.com>
8677
8678 * linux-low.c (get_detach_signal): New.
8679 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8680 Pass on pending signals to PTRACE_DETACH. Check the result of the
8681 ptrace call.
8682 * server.c (program_signals, program_signals_p): New.
8683 (handle_general_set): Handle QProgramSignals.
8684 * server.h (program_signals, program_signals_p): Declare.
8685
e237a7e2
JK
86862012-03-05 Pedro Alves <palves@redhat.com>
8687 Jan Kratochvil <jan.kratochvil@redhat.com>
8688
8689 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8690 New comment why.
8691
5808517f
YQ
86922012-03-03 Yao Qi <yao@codesourcery.com>
8693
8694 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8695 agent_look_up_symbols.
8696
58b4daa5
YQ
86972012-03-03 Yao Qi <yao@codesourcery.com>
8698
8699 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8700 (linux-x86-low.o): Likewise.
8701 * server.h: Remove in_process_agent_loaded.
8702 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8703 common/agent.c.
8704 Update callers.
8705
8ffcbaaf
YQ
87062012-03-03 Yao Qi <yao@codesourcery.com>
8707
8708 * tracepoint.c (gdb_agent_capability): New global.
8709 (in_process_agent_loaded_ust): Renamed to
8710 `in_process_agent_supports_ust'.
8711 Update callers.
8712 (in_process_agent_supports_ust): Call agent_capability_check.
8713 (clear_installed_tracepoints): Assert that agent supports
8714 agent.
8715
d1feda86
YQ
87162012-03-03 Yao Qi <yao@codesourcery.com>
8717
8718 * linux-low.c (linux_supports_agent): New.
8719 (linux_target_ops): Initialize field `supports_agent' with
8720 linux_supports_agent.
8721 * target.h (struct target_ops) <supports_agent>: New.
8722 (target_supports_agent): New macro.
8723 * server.c (handle_general_set): Handle packet 'QAgent'.
8724 (handle_query): Send `QAgent+'.
8725 * Makefile.in (server.o): Depends on agent.h.
8726
2fa291ac
YQ
87272012-03-03 Yao Qi <yao@codesourcery.com>
8728
8729 * Makefile.in (OBS): Add agent.o.
8730 Add new rule for agent.o.
8731 Track dependence of tracepoint.c on agent.h.
8732 * tracepoint.c (run_inferior_command_1):
8733 (run_inferior_command): Call agent_run_command.
8734 (gdb_ust_connect_sync_socket): Deleted. Move it to
8735 common/agent.c.
8736 (resume_thread, stop_thread): Likewise.
8737 (gdb_ust_socket_init): Renamed to ...
8738 (gdb_agent_socket_init): ... New.
8739 (gdb_ust_thread): Renamed to ...
8740 (gdb_agent_helper_thread): ... New.
8741 (gdb_ust_init): Move some code to ...
8742 (gdb_agent_init): ... here. New.
8743 [HAVE_UST]: Call gdb_ust_init.
8744 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8745 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8746 * config.in, configure: Regenerated.
8747
05044653
PA
87482012-03-02 Pedro Alves <palves@redhat.com>
8749
8750 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8751 * linux-low.c (struct simple_pid_list): New.
8752 (stopped_pids): New a struct simple_pid_list pointer.
8753 (add_to_pid_list, pull_pid_from_list): New.
8754 (handle_extended_wait): Don't assume the first signal new children
8755 report is SIGSTOP. Adjust call to pull_pid_from_list.
8756 (linux_wait_for_lwp): Adjust.
8757
8d00225b
YQ
87582012-03-02 Yao Qi <yao@codesourcery.com>
8759
8760 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8761 debug log.
8762
19560ba5
YQ
87632012-03-02 Yao Qi <yao@codesourcery.com>
8764
8765 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8766 `stop_pc' and `tpoint'. Update caller.
8767
1faeff08
MR
87682012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8769
8770 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8771 * linux-low.c (use_linux_regsets): New macro.
8772 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8773 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8774 (linux_register_in_regsets): New function.
8775 (usr_fetch_inferior_registers): Skip registers covered by
8776 regsets.
8777 (usr_store_inferior_registers): Likewise.
8778 (usr_fetch_inferior_registers): New macro.
8779 (usr_store_inferior_registers): Likewise.
8780 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8781 (linux_store_registers): Likewise.
8782 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8783 prototype.
8784 (init_registers_mips64_dsp_linux): Likewise.
8785 (init_registers_mips_linux): New macro.
8786 (init_registers_mips_dsp_linux): Likewise.
8787 (mips_dsp_num_regs): Likewise.
8788 (DSP_BASE, DSP_CONTROL): New fallback macros.
8789 (mips_base_regs): New macro.
8790 (mips_regmap): Use it. Fix the size.
8791 (mips_dsp_regmap): New variable.
8792 (mips_dsp_regset_bitmap): Likewise.
8793 (mips_arch_setup): New function.
8794 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8795 than mips_regmap.
8796 (mips_cannot_store_register): Likewise.
8797 (the_low_target): Update .arch_setup, .num_regs and .regmap
8798 initializers. Add .regset_bitmap initializer.
8799 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8800 initializer.
8801 * linux-bfin-low.c (the_low_target): Likewise.
8802 * linux-cris-low.c (the_low_target): Likewise.
8803 * linux-crisv32-low.c (the_low_target): Likewise.
8804 * linux-ia64-low.c (the_low_target): Likewise.
8805 * linux-m32r-low.c (the_low_target): Likewise.
8806 * linux-m68k-low.c (the_low_target): Likewise.
8807 * linux-ppc-low.c (the_low_target): Likewise.
8808 * linux-s390-low.c (the_low_target): Likewise.
8809 * linux-sh-low.c (the_low_target): Likewise.
8810 * linux-sparc-low.c (the_low_target): Likewise.
8811 * linux-tic6x-low.c (the_low_target): Likewise.
8812 * linux-x86-low.c (the_low_target): Likewise.
8813 * linux-xtensa-low.c (the_low_target): Likewise.
8814 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8815 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8816 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8817 srv_xmlfiles.
8818 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8819 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8820
c03e6ccc
YQ
88212012-02-29 Yao Qi <yao@codesourcery.com>
8822 Pedro Alves <palves@redhat.com>
8823
8824 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8825 `step_over_finished' is true.
8826
644cebc9
PA
88272012-02-27 Pedro Alves <palves@redhat.com>
8828
8829 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8830 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8831
c14d7ab2
PA
88322012-02-27 Pedro Alves <palves@redhat.com>
8833
8834 PR server/9684
8835 * linux-low.c (pid_is_stopped): New.
8836 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8837
412c89dd
LM
88382012-02-25 Luis Machado <lgustavo@codesourcery.com>
8839
8840 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8841 of conditions.
8842
b745defe
MR
88432012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8844
8845 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8846
9f3a5c85
LM
88472012-02-24 Luis Machado <lgustavo@codesourcery>
8848
8849 * server.c (handle_query): Advertise support for target-side
8850 breakpoint condition evaluation.
8851 (process_point_options): New function.
8852 (process_serial_event): When inserting a breakpoint, check for
8853 a target-side condition that should be evaluated.
8854
8855 * mem-break.c: Include regcache.h and ax.h.
8856 (point_cond_list_t): New data structure.
8857 (breakpoint) <cond_list>: New field.
8858 (find_gdb_breakpoint_at): Make non-static.
8859 (delete_gdb_breakpoint_at): Clear any target-side
8860 conditions.
8861 (clear_gdb_breakpoint_conditions): New function.
8862 (add_condition_to_breakpoint): Likewise.
8863 (add_breakpoint_condition): Likewise.
8864 (gdb_condition_true_at_breakpoint): Likewise.
8865 (gdb_breakpoint_here): Return result directly instead
8866 of going through a local variable.
8867
8868 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8869 (clear_gdb_breakpoint_conditions): Likewise.
8870 (add_breakpoint_condition): Likewise.
8871 (gdb_condition_true_at_breakpoint): Likewise.
8872
8873 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8874 (need_step_over_p): Take target-side breakpoint condition into
8875 consideration.
8876
5e1dc496
LM
88772012-02-24 Luis Machado <lgustavo@codesourcery>
8878
8879 * server.h: Include tracepoint.h.
8880 (agent_mem_read, agent_get_trace_state_variable_value,
8881 agent_set_trace_state_variable_value,
8882 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8883 get_set_tsv_func_addr): New prototypes.
8884
8885 * ax.h: New include file.
8886 * ax.c: New source file.
8887
8888 * tracepoint.c: Include ax.h.
8889 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8890 agent_expr, eval_result_type): Move to ax.h.
8891 (parse_agent_expr): Rename to ...
8892 (gdb_parse_agent_expr): ... this, make it non-static and move
8893 to ax.h.
8894 (unparse_agent_expr) Rename to ...
8895 (gdb_unparse_agent_expr): ... this, make it non-static and move
8896 to ax.h.
8897 (eval_agent_expr): Rename to ...
8898 (eval_tracepoint_agent_expr): ... this.
8899 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8900 forward declarations.
8901 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8902 (agent_get_trace_state_variable_value): New function.
8903 (agent_set_trace_state_variable_value): New function.
8904 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8905 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8906 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8907 (condition_true_at_tracepoint): Likewise.
8908 (parse_agent_expr): Rename to ...
8909 (gdb_parse_agent_expr): ... this and move to ax.c.
8910 (unparse_agent_expr): Rename to ...
8911 (gdb_unparse_agent_expr): ... this and move to ax.c.
8912 (gdb_agent_op_name): Move to ax.c.
8913 (eval_agent_expr): Rename to ...
8914 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8915 and move to ax.c.
8916 (eval_tracepoint_agent_expr): New function.
8917 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8918 non-static.
5e1dc496
LM
8919 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8920 ax.c.
8921 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8922 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8923 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8924 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8925 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8926 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8927 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8928 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8929 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8930 (compile_bytecodes): Remove forward declaration.
8931 (is_goto_target): Move to ax.c.
8932 (compile_bytecodes): Move to ax.c and call
8933 agent_get_trace_state_variable_value (...) and
8934 agent_set_trace_state_variable_value (...).
8935
8936 * Makefile.in: Update ax.c and IPA dependencies.
8937
277e4e52
PA
89382012-02-24 Pedro Alves <palves@redhat.com>
8939
8940 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8941 (cmd_bigqtbuffer_circular): ... this. Only handle
8942 'QTBuffer:circular:'.
8943 (handle_tracepoint_general_set): Adjust.
8944
bf4c19f7
YQ
89452012-02-16 Yao Qi <yao@codesourcery.com>
8946
8947 * inferiors.c: Move code to ...
8948 * dll.c: .... here. New.
8949 * server.h: Declare clear_dlls.
8950 * Makefile.in (SFILES): Add dll.c.
8951 (OBS): Add dll.o
8952 (dll.o): New rule.
8953
d73f2619
YQ
89542012-02-11 Yao Qi <yao@codesourcery.com>
8955
8956 * server.c: (handle_monitor_command): Add a new parameter
8957 `own_buf'.
8958 (handle_query): Update caller.
8959
f8255c2a
JB
89602012-02-09 Joel Brobecker <brobecker@adacore.com>
8961
8962 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8963 * configure, config.in: Regenerate.
8964 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8965 is not defined.
8966
da84f473
PA
89672012-02-02 Pedro Alves <palves@redhat.com>
8968
8969 Try SIGKILL first, then PTRACE_KILL.
8970 * linux-low.c (linux_kill_one_lwp): New.
8971 (linux_kill_one_lwp): Rename to ...
8972 (kill_one_lwp_callback): ... this. Use the new
8973 linux_kill_one_lwp.
8974
e886a173
PA
89752012-02-02 Pedro Alves <palves@redhat.com>
8976
8977 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8978 inferior.
8979
be07f1a2
PA
89802012-01-27 Pedro Alves <palves@redhat.com>
8981
8982 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8983 (elf_64_file_p): Make static.
8984 (linux_pid_exe_is_elf_64_file): New.
8985 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8986 Delete declarations.
8987 (linux_pid_exe_is_elf_64_file): Declare.
8988 * linux-x86-low.c (x86_arch_setup): Use
8989 linux_pid_exe_is_elf_64_file.
8990
d8301ad1
JK
89912012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8992
8993 * linux-low.c (linux_wait_for_event_1): Rename to ...
8994 (linux_wait_for_event): ... here and merge it with former
8995 linux_wait_for_event - new variable wait_ptid, use it.
8996 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8997
01b17894
PA
89982012-01-23 Pedro Alves <palves@redhat.com>
8999
9000 * server.c (main): Avoid yet another case of infinite loop while
9001 detaching/killing after a longjmp.
9002
e825046f
JK
90032012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9004
9005 Code cleanup.
9006 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9007
b9e7b9c3
UW
90082012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9009
9010 * hostio.c (handle_readlink): New function.
9011 (handle_vFile): Call it to handle "vFile:readlink" packets.
9012
901f9912
UW
90132012-01-20 Pedro Alves <palves@redhat.com>
9014 Ulrich Weigand <ulrich.weigand@linaro.org>
9015
9016 * server.c (handle_v_requests): Only support vAttach and vRun to
9017 start multiple processes when in extended protocol mode.
9018
fc1ab1a0
PA
90192012-01-17 Pedro Alves <palves@redhat.com>
9020
9021 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9022 memalign plus mprotect to allocate the scratch buffer.
9023
7d5d4e98
PA
90242012-01-13 Pedro Alves <palves@redhat.com>
9025
9026 * server.c (attach_inferior): Clear `cont_thread'.
9027
f128d5e9
PA
90282012-01-13 Pedro Alves <palves@redhat.com>
9029
9030 * server.c (main): Avoid infinite loop while detaching/killing
9031 after a longjmp.
9032
06db92f0
DE
90332012-01-09 Doug Evans <dje@google.com>
9034
9035 * server.c (start_inferior): Set last_ptid in --wrapper case.
9036
32d92999
YQ
90372012-01-06 Yao Qi <yao@codesourcery.com>
9038
9039 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9040 defined.
9041 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9042
5e0a92a9
YQ
90432012-01-04 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c (cmd_qtdp): Print debug message
9046 for static tracepoint.
9047
ae639e8c
YQ
90482012-01-04 Yao Qi <yao@codesourcery.com>
9049
9050 * tracepoint.c (trace_vdebug): Differentiate debug message
9051 between gdbserver and IPA.
9052
f72429c5
YQ
90532012-01-03 Yao Qi <yao@codesourcery.com>
9054
9055 * tracepoint.c (tracepoint_was_hit): Don't collect for
9056 static tracepoint.
9057
12c3e59c
JB
90582012-01-02 Joel Brobecker <brobecker@adacore.com>
9059
9060 * terminal.h: Reformat copyright header.
9061
67827812
JB
90622012-01-02 Joel Brobecker <brobecker@adacore.com>
9063
9064 * server.c (gdbserver_version): Update copyright year.
9065 * gdbreplay.c (gdbreplay_version): Likewise.
9066
3e52c33d
JK
90672011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9068
9069 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9070
9071 Revert:
9072 2011-12-18 Hui Zhu <teawater@gmail.com>
9073 * linux-low.c (linux_create_inferior): Save return value to ret.
9074
66f1260e
HZ
90752011-12-18 Hui Zhu <teawater@gmail.com>
9076
9077 * linux-low.c (linux_create_inferior): Save return value to ret.
9078
e77616d7
DE
90792011-12-16 Doug Evans <dje@google.com>
9080
e7b06c57
DE
9081 * linux-low.c (linux_create_inferior): If stdio connection,
9082 redirect stdin from /dev/null, stdout to stderr.
9083 * remote-utils.c (remote_is_stdio): New static global.
9084 (remote_connection_is_stdio): New function.
9085 (remote_prepare): Handle stdio connection.
9086 (remote_open): Ditto.
9087 (remote_close): Don't close stdin for stdio connections.
9088 (read_prim,write_prim): New functions. Replace all calls to
9089 read/write to these.
9090 * server.c (main): Watch for "-" argument. Move call to
9091 remote_prepare before start_inferior.
9092 * server.h (STDIO_CONNECTION_NAME): New macro.
9093 (remote_connection_is_stdio): Declare.
9094
e77616d7
DE
9095 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9096 in debugging output.
9097
82067193
YQ
90982011-12-15 Yao Qi <yao@codesourcery.com>
9099
9100 * tracepoint.c: Include sys/syscall.h.
9101 (gdb_ust_thread): Remove preprocessor conditional.
9102
82bfbe7e
PA
91032011-12-14 Pedro Alves <pedro@codesourcery.com>
9104
9105 * linux-low.c (linux_detach_one_lwp): Call
9106 the_low_target.prepare_to_resume before detaching.
9107
712c6575
YQ
91082011-12-14 Yao Qi <yao@codesourcery.com>
9109
9110 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9111 of write.
9112
d54d1edf
YQ
91132011-12-14 Yao Qi <yao@codesourcery.com>
9114
9115 * i386-low.c (i386_low_stopped_data_address): Initialize local
9116 variable `control'.
9117
6210a125
PA
91182011-12-13 Pedro Alves <pedro@codesourcery.com>
9119
9120 PR remote/13492
9121
9122 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9123 DR_CONTROL unless necessary. Extend comments.
9124 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9125 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9126
2ece8244
YQ
91272011-12-13 Yao Qi <yao@codesourcery.com>
9128
9129 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9130 macros.
9131 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9132
784867a5
JK
91332011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9134
9135 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9136 Print new debug message for such case.
9137
6bf36717
JK
91382011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9139
9140 Fix overlapping memcpy.
9141 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9142 the read_inferior_memory transfer.
9143 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9144 write_inferior_memory transfer.
9145 (set_fast_tracepoint_jump): New variable buf. Use it for the
9146 read_inferior_memory and write_inferior_memory transfers.
9147 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9148 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9149 Use it for the write_inferior_memory transfer.
9150 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9151 buffers.
9152
50275556
MR
91532011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9154
9155 * linux-low.c (fetch_register, store_register): Make code
9156 consistent, fix formatting.
9157
7325beb4
MR
91582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9159
9160 * linux-low.c (usr_store_inferior_registers): Factor out code
9161 to handle individual registers into...
9162 (store_register): ... this new function.
9163
c642a434
UW
91642011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9165
9166 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9167 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9168 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9169 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9170 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9171 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9172 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9173 (srv_xmlfiles): Add new XML files.
9174
9175 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9176 and <sys/uio.h>.
9177 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9178 (init_registers_s390_linux32v1): Add prototype.
9179 (init_registers_s390_linux32v2): Likewise.
9180 (init_registers_s390_linux64v1): Likewise.
9181 (init_registers_s390_linux64v2): Likewise.
9182 (init_registers_s390x_linux64v1): Likewise.
9183 (init_registers_s390x_linux64v2): Likewise.
9184 (s390_num_regs): Increment to 52.
9185 (s390_regmap): Add orig_r2 register.
9186 (s390_num_regs_3264): Increment to 68.
9187 (s390_regmap_3264): Add orig_r2 register.
9188 (s390_collect_ptrace_register): Handle orig_r2 register.
9189 (s390_supply_ptrace_register): Likewise.
9190 (s390_fill_last_break): New function.
9191 (s390_store_last_break): Likewise.
9192 (s390_fill_system_call): New function.
9193 (s390_store_system_call): Likewise.
9194 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9195 register sets.
9196 (s390_check_regset): New function.
9197 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9198 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9199 Update target_regsets for available register sets.
9200
2268b414
JK
92012011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9202 Jan Kratochvil <jan.kratochvil@redhat.com>
9203
9204 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9205 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9206 New.
9207 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9208 * linux-low.h (struct process_info_private): New member r_debug.
9209 * server.c (handle_qxfer_libraries): Call
9210 the_target->qxfer_libraries_svr4.
9211 (handle_qxfer_libraries_svr4): New function.
9212 (qxfer_packets): New entry "libraries-svr4".
9213 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9214 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9215 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9216 PACKET_qXfer_libraries_svr4.
9217
d6db1fab
UW
92182011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9219
9220 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9221 PSW address/mask between 8-byte and 16-byte formats.
9222 (s390_supply_ptrace_register): Likewise.
9223 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9224 basic addressing mode bit.
9225
242f5f1c
SS
92262011-11-24 Stan Shebs <stan@codesourcery.com>
9227
9228 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9229
f196051f
SS
92302011-11-17 Stan Shebs <stan@codesourcery.com>
9231
9232 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9233 (tracing_start_time): New global.
9234 (tracing_stop_time): New global.
9235 (tracing_user_name): New global.
9236 (tracing_notes): New global.
9237 (tracing_stop_note): New global.
9238 (cmd_qtstart): Set traceframe_usage, start_time.
9239 (stop_tracing): Set stop_time.
9240 (cmd_qtstatus): Report additional status.
9241 (cmd_qtp): New function.
9242 (handle_tracepoint_query): Call it.
9243 (cmd_qtnotes): New function.
9244 (handle_tracepoint_general_set): Call it.
9245 (get_timestamp): Rename from tsv_get_timestamp.
9246
405f8e94
SS
92472011-11-14 Stan Shebs <stan@codesourcery.com>
9248 Kwok Cheung Yeung <kcy@codesourcery.com>
9249
9250 * linux-x86-low.c (small_jump_insn): New.
9251 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9252 trampoline and error message, build a trampoline and issue a small
9253 jump instruction to it.
9254 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9255 trampoline and error message.
9256 (x86_get_min_fast_tracepoint_insn_len): New.
9257 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9258 * linux-low.h (struct linux_target_ops): Add arguments to
9259 install_fast_tracepoint_jump_pad operation, add new operation.
9260 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9261 arguments.
9262 (linux_get_min_fast_tracepoint_insn_len): New function.
9263 (linux_target_op): Add new operation.
9264 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9265 (gdb_trampoline_buffer_end): Ditto.
9266 (gdb_trampoline_buffer_error): Ditto.
9267 (struct ipa_sym_addresses): Add fields for new IPA variables.
9268 (symbol_list): Add entries for new IPA variables.
9269 (struct tracepoint): Add fields to hold the address range of the
9270 trampoline used by the tracepoint.
9271 (trampoline_buffer_head): New static variable.
9272 (trampoline_buffer_tail): Ditto.
9273 (claim_trampoline_space): New function.
9274 (have_fast_tracepoint_trampoline_buffer): New function.
9275 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9276 structure.
9277 (install_fast_tracepoint): Ditto, also add error buffer argument.
9278 (cmd_qtminftpilen): New function.
9279 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9280 (fast_tracepoint_from_trampoline_address): New function.
9281 (fast_tracepoint_collecting): Handle trampoline as part of jump
9282 pad space.
9283 (set_trampoline_buffer_space): New function.
9284 (initialize_tracepoint): Initialize new IPA variables.
9285 * target.h (struct target_ops): Add arguments to
9286 install_fast_tracepoint_jump_pad operation, add new
9287 get_min_fast_tracepoint_insn_len operation.
9288 (target_get_min_fast_tracepoint_insn_len): New.
9289 (install_fast_tracepoint_jump_pad): Add arguments.
9290 * server.h (IPA_BUFSIZ): Define.
9291 * linux-i386-ipa.c: Include extra header files.
9292 (initialize_fast_tracepoint_trampoline_buffer): New function.
9293 (initialize_low_tracepoint): Call it.
9294 * server.h (set_trampoline_buffer_space): Declare.
9295 (claim_trampoline_space): Ditto.
9296 (have_fast_tracepoint_trampoline_buffer): Ditto.
9297
1e4d1764
YQ
92982011-11-14 Yao Qi <yao@codesourcery.com>
9299
9300 * server.c (handle_query): Handle InstallInTrace for qSupported.
9301 * tracepoint.c (add_tracepoint): Sort list.
9302 (install_tracepoint, download_tracepoint): New.
9303 (cmd_qtdp): Call them to install and download tracepoints.
9304 (sort_tracepoints): Removed.
9305 (cmd_qtstart): Update.
9306
5c73ff4e
YQ
93072011-11-14 Yao Qi <yao@codesourcery.com>
9308
9309 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9310 * mem-break.h: Declare.
9311 * tracepoint.c (cmd_qtstart): Move some code to ...
9312 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9313 New.
9314 (download_tracepoints): Move some code to ...
9315 (download_tracepoint_1): ... here. New.
9316
86a30030
YQ
93172011-11-08 Yao Qi <yao@codesourcery.com>
9318
9319 * remote-utils.c (relocate_instruction): A comment fix.
9320
8d26e50c
JB
93212011-11-07 Joel Brobecker <brobecker@adacore.com>
9322
9323 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9324 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9325 dr_status_mirror and dr_control_mirror from debug_reg_state.
9326 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9327 (i386_initial_stuff): Remove use of deleted globals.
9328 (i386_get_thread_context, i386_set_thread_context,
9329 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9330 from debug_reg_state.
9331
a59306a3
YQ
93322011-11-05 Yao Qi <yao@codesourcery.com>
9333
9334 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9335 address as TPOINT's.
9336
3065dfb6
SS
93372011-11-02 Stan Shebs <stan@codesourcery.com>
9338
9339 * tracepoint.c (agent_mem_read_string): New function.
9340 (eval_agent_expr): Call it for tracenz.
9341 * server.c (handle_query): Report support for tracenz.
9342
fd0d8c7c
YQ
93432011-11-02 Yao Qi <yao@codesourcery.com>
9344
9345 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9346
609086b1
YQ
93472011-11-02 Yao Qi <yao@codesourcery.com>
9348
9349 * target.h: Fix a typo in comment.
9350
b9fd1791
PA
93512011-10-31 Pedro Alves <pedro@codesourcery.com>
9352
9353 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9354 clobber the breakpoints' shadows with fast tracepoint jumps.
9355 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9356 * target.c (write_inferior_memory): Also pass MYADDR down to
9357 check_mem_write.
9358
03583c20
UW
93592011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9360
9361 * configure.ac: Check support for personality routine.
9362 * configure: Regenerate.
9363 * config.in: Likewise.
9364 * linux-low.c: Include <sys/personality.h>.
9365 Define ADDR_NO_RANDOMIZE if necessary.
9366 (linux_create_inferior): Disable address space randomization when
9367 forking inferior, if requested.
9368 (linux_supports_disable_randomization): New function.
9369 (linux_target_ops): Install it.
9370 * server.h (disable_randomization): Declare.
9371 * server.c (disable_randomization): New global variable.
9372 (handle_general_set): Handle QDisableRandomization.
9373 (handle_query): Likewise for qSupported.
9374 (main): Support --disable-randomization and --no-disable-randomization
9375 command line arguments.
9376 * target.h (struct target_ops): Add supports_disable_randomization.
9377 (target_supports_disable_randomization): New macro.
9378
723b724b
MF
93792011-09-29 Mike Frysinger <vapier@gentoo.org>
9380
9381 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9382 ifdef check.
9383 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9384 [!PT_GETDSBT] (target_loadmap): New definition.
9385 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9386 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9387 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9388 and PT_GETDSBT to LINUX_LOADMAP.
9389 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9390 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9391
55329a5c 93922011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9393
9394 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9395 (arm_linux_hwbp_cap): New static variable.
9396 (arm_linux_get_hwbp_cap): Replace by ...
9397 (arm_linux_init_hwbp_cap): ... this new function.
9398 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9399 (arm_linux_get_hw_watchpoint_count): Likewise.
9400 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9401 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9402 (arm_prepare_to_resume): Use perror_with_name instead of error.
9403
55329a5c 94042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9405
9406 * linux-arm-low.c: Include <signal.h>.
9407 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9408 (struct arm_linux_hwbp_cap): New data type.
9409 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9410 (struct arm_linux_hw_breakpoint): New data type.
9411 (MAX_BPTS, MAX_WPTS): Define.
9412 (struct arch_process_info, struct arch_lwp_info): New data types.
9413 (arm_linux_get_hwbp_cap): New function.
9414 (arm_linux_get_hw_breakpoint_count): Likewise.
9415 (arm_linux_get_hw_watchpoint_count): Likewise.
9416 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9417 (arm_hwbp_control_initialize): Likewise.
9418 (arm_hwbp_control_is_enabled): Likewise.
9419 (arm_hwbp_control_is_initialized): Likewise.
9420 (arm_hwbp_control_disable): Likewise.
9421 (arm_linux_hw_breakpoint_equal): Likewise.
9422 (arm_linux_hw_point_initialize): Likewise.
9423 (struct update_registers_data): New data structure.
9424 (update_registers_callback: New function.
9425 (arm_insert_point): Likewise.
9426 (arm_remove_point): Likewise.
9427 (arm_stopped_by_watchpoint): Likewise.
9428 (arm_stopped_data_address): Likewise.
9429 (arm_new_process): Likewise.
9430 (arm_new_thread): Likewise.
9431 (arm_prepare_to_resume): Likewise.
9432 (the_low_target): Register arm_insert_point, arm_remove_point,
9433 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9434 arm_new_thread, and arm_prepare_to_resume.
9435
6b9801d4
SS
94362011-09-15 Stan Shebs <stan@codesourcery.com>
9437
9438 * server.h (struct emit_ops): Add compare-goto fields.
9439 * tracepoint.c (gdb_agent_op_sizes): New table.
9440 (emit_eq_goto): New function.
9441 (emit_ne_goto): New function.
9442 (emit_lt_goto): New function.
9443 (emit_le_goto): New function.
9444 (emit_gt_goto): New function.
9445 (emit_ge_goto): New function.
9446 (is_goto_target): New function.
9447 (compile_bytecodes): Recognize special cases of compare-goto
9448 combinations and call specialized emitters for them.
9449 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9450 (amd64_emit_ne_goto): New function.
9451 (amd64_emit_lt_goto): New function.
9452 (amd64_emit_le_goto): New function.
9453 (amd64_emit_gt_goto): New function.
9454 (amd64_emit_ge_goto): New function.
9455 (amd64_emit_ops): Add the new functions.
9456 (i386_emit_eq_goto): New function.
9457 (i386_emit_ne_goto): New function.
9458 (i386_emit_lt_goto): New function.
9459 (i386_emit_le_goto): New function.
9460 (i386_emit_gt_goto): New function.
9461 (i386_emit_ge_goto): New function.
9462 (i386_emit_ops): Add the new functions.
9463
bf15cbda
SS
94642011-09-08 Stan Shebs <stan@codesourcery.com>
9465
9466 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9467 (i386_emit_epilogue): Restore %ebx.
9468
943ca1dd
JZ
94692011-08-31 Jie Zhang <jzhang918@gmail.com>
9470
9471 * server.c (step_thread): Remove definition.
9472 (process_serial_event): Don't handle Hs.
9473 * server.h (step_thread): Remove declaration.
9474 * target.c (set_desired_inferior): Remove use of step_thread.
9475
e3deef73
LM
94762011-08-24 Luis Machado <lgustavo@codesourcery.com>
9477
9478 * linux-low.c: Include linux-procfs.h.
9479 (linux_attach_lwp_1): Update comments.
9480 (linux_attach): Scan for existing threads when attaching to a
9481 process that is the tgid.
9482 * Makefile.in: Update dependencies.
9483
13da1c97
LM
94842011-08-24 Luis Machado <lgustavo@codesourcery.com>
9485
9486 * configure.srv: Add linux-procfs.o dependencies.
9487
881127c9
YQ
94882011-08-14 Yao Qi <yao@codesourcery.com>
9489
9490 * target.h (struct target_ops): Fix indent.
9491 * win32-low.c (win32_target_ops): Fix comment.
9492
58dbd541
YQ
94932011-08-14 Andrew Jenner <andrew@codesourcery.com>
9494 Yao Qi <yao@codesourcery.com>
9495
9496 * Makefile.in (clean): Remove tic6x-*.c files.
9497 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9498 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9499 (tic6x-c64xp-linux.c): Likewise.
9500 * configure.srv: Add support for tic6x-*-uclinux.
9501 * linux-tic6x-low.c: New.
9502 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9503
78d85199
YQ
95042011-08-14 Andrew Stubbs <ams@codesourcery.com>
9505 Yao Qi <yao@codesourcery.com>
9506
9507 * target.h (struct target_ops): Add read_loadmap.
9508 * linux-low.c (struct target_loadseg): New type.
9509 (struct target_loadmap): New type.
9510 (linux_read_loadmap): New function.
9511 (linux_target_ops): Add linux_read_loadmap.
9512 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9513 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9514 to NULL.
78d85199 9515
a959a88d
EZ
95162011-08-05 Eli Zaretskii <eliz@gnu.org>
9517
9518 * win32-low.c: Include <stdint.h>.
9519
1ced966e
PA
95202011-07-22 Pedro Alves <pedro@codesourcery.com>
9521
9522 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9523 to the inferior here.
9524 (i386_remove_aligned_watchpoint): Ditto.
9525 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9526 fit part of the watchpoint in the debug registers.
9527 (i386_update_inferior_debug_regs): New.
9528 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9529 registers, and only update the inferior on success.
9530 (i386_low_remove_watchpoint): Ditto.
9531
d26e3629
KY
95322011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9533
9534 * linux-low.c (compare_ints, unique, list_threads, show_process,
9535 linux_core_of_thread): Delete.
9536 (linux_target_ops): Change linux_core_of_thread to
9537 linux_common_core_of_thread.
9538 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9539 * utils.c (malloc_failure): Change type of argument.
9540 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9541 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9542 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9543 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9544 (IPA_OBJS): Add common-utils-ipa.o.
9545 (ptid_h, linux_osdata_h): New macros.
9546 (server_h): Add common/common-utils.h, common/xml-utils.h,
9547 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9548 common/ptid.h.
9549 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9550 ptid.o, buffer.o): New rules.
9551 (linux-low.o): Add common/linux-osdata.h as a dependency.
9552 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9553 * configure.ac: Add AC_HEADER_DIRENT check.
9554 * config.in: Regenerate.
9555 * configure: Regenerate.
9556 * remote-utils.c (xml_escape_text): Delete.
9557 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9558 buffer_xml_printf): Move to common/buffer.c.
9559 * server.c (main): Remove call to initialize_inferiors.
9560 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9561 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9562 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9563 internal_error, gdb_assert, gdb_assert_fail): Delete.
9564 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9565 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9566 common/buffer.h.
9567 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9568 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9569 initialize_inferiors): Delete.
9570
2275a1a7
PA
95712011-07-20 Pedro Alves <pedro@codesourcery.com>
9572
9573 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9574 symbol error.
9575
0a5b1e09
PA
95762011-05-31 Pedro Alves <pedro@codesourcery.com>
9577
9578 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9579 assertion.
9580 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9581
6938fd34
YQ
95822011-05-26 Yao Qi <yao@codesourcery.com>
9583
9584 * Makefile.in (thread-db.o): Track dependence to
9585 common/gdb_thread_db.h.
9586 * thread-db.c: include gdb_thread_db.h from right place.
9587
b481f9e0
TT
95882011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9589
9590 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9591 __FILE__ and __LINE__ to internal_error.
9592
98a5dd13
DE
95932011-05-13 Doug Evans <dje@google.com>
9594
9595 * thread-db.c (try_thread_db_load_from_sdir): New function.
9596 (try_thread_db_load_from_dir): New function.
9597 (thread_db_load_search): Handle $sdir, ignore $pdir.
9598 Remove trying of system directories if search of
9599 libthread-db-search-path fails, that is now done via $sdir.
9600
d248b706
KY
96012011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9602
9603 * server.c (handle_query): Add EnableDisableTracepoints to the list
9604 of supported features.
43aaf8b6 9605 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9606 tracepoints.
43aaf8b6
PA
9607 (cmd_qtenable_disable): New.
9608 (cmd_qtstart): Install tracepoints even if disabled.
9609 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9610 receiving a QTEnable or QTDisable packet.
9611 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9612 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9613 tracepoints.
9614 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9615
84e578fb
DE
96162011-05-10 Doug Evans <dje@google.com>
9617
9618 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9619
71f55dd8
DE
96202011-05-04 Doug Evans <dje@google.com>
9621
9622 * linux-low.c (linux_join): Skip process lookup.
9623 * spu-low.c (spu_join): Ditto.
9624 * server.c (join_inferiors_callback): Delete.
9625 (process_serial_event): For 'D' packet (detach) call join_inferior
9626 directly.
9627
4d393d60
JM
96282011-05-04 Joseph Myers <joseph@codesourcery.com>
9629
9630 * README: Don't mention xscale*-*-linux*.
9631 * configure.srv (xscale*-*-linux*): Don't handle target.
9632
b00ad6ff
NF
96332011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9634
9635 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9636 casting pointers.
9637 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9638 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9639 (i386_emit_void_call_2): Likewise.
9640
af96c192
YQ
96412011-04-26 Yao Qi <yao@codesourcery.com>
9642
43aaf8b6
PA
9643 * linux-low.c: Move common macros to linux-ptrace.h.
9644 Include linux-ptrace.h.
af96c192
YQ
9645 * Makefile.in (linux_ptrace_h): New.
9646 (linux-low.o): Depends on linux-ptrace.h.
9647
03f2bd59
JK
96482011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9649
9650 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9651 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9652 (remote_prepare): New function with most of the TCP code from ...
9653 (remote_open): ... here. Detect PORT here unconditionally. Move also
9654 setting transport_is_reliable.
9655 * server.c (run_once): New variable.
9656 (gdbserver_usage): Document it.
9657 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9658 the first run if RUN_ONCE.
9659 * server.h (run_once, remote_prepare): New declarations.
9660
7a9dd1b2
TT
96612011-04-19 Tom Tromey <tromey@redhat.com>
9662
9663 * win32-low.c (handle_load_dll): Remove duplicate "the".
9664
81239425
PM
96652011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9666
9667 Remove support for old Cygwin 1.5 versions.
9668 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9669 function to avoid warning.
9670 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9671 warning.
9672
9e0627f1
PM
96732011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9674
9675 * gdbserver/server.h (Macro _): Define it if not available.
9676
588eebee
MS
96772011-03-14 Michael Snyder <msnyder@vmware.com>
9678
348af9f7 9679 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9680
43f70d4c
JB
96812011-03-10 Joel Brobecker <brobecker@adacore.com>
9682
9683 * Makefile.in (maintainer-clean realclean distclean): Remove
9684 "make ... subdir_do" command.
9685
348af9f7
MS
96862011-03-10 Michael Snyder <msnyder@vmware.com>
9687
9688 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9689
9690 * server.c (handle_v_run): Free alloced buffer on early return.
9691
e637a4f5
YQ
96922011-03-09 Yao Qi <yao@codesourcery.com>
9693
9694 Revert:
9695 2011-03-04 Yao Qi <yao@codesourcery.com>
9696
9697 * Makefile.in: Remove GNU make feature --directory.
9698
9699 2011-03-05 Yao Qi <yao@codesourcery.com>
9700
9701 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9702 (subdir_do): New make target. Copied from gdb/Makefile.
9703 (maintainer-clean, realclean, distclean, clean): Call corresponding
9704 make targets in common/Makefile.
9705
9706 2011-02-11 Yao Qi <yao@codesourcery.com>
9707
9708 * configure.ac: Call AC_PROG_RANLIB.
9709 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9710 * configure: Regenerate.
9711
e6edda56
JK
97122011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9713
9714 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9715
e5141119
JB
97162011-03-06 Yao Qi <yao@codesourcery.com>
9717
9718 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9719
64794aa4
JB
97202011-03-05 Yao Qi <yao@codesourcery.com>
9721
9722 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9723 (subdir_do): New make target. Copied from gdb/Makefile.
9724 (maintainer-clean, realclean, distclean, clean): Call corresponding
9725 make targets in common/Makefile.
9726
7a762829
YQ
97272011-03-04 Yao Qi <yao@codesourcery.com>
9728
9729 * Makefile.in: Remove GNU make feature --directory.
9730
348af9f7
MS
97312011-03-04 Michael Snyder <msnyder@vmware.com>
9732
9733 * server.c (queue_stop_reply): Call xmalloc not malloc.
9734
97352011-03-02 Michael Snyder <msnyder@vmware.com>
9736
9737 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9738
9f72fee2
MS
97392011-02-28 Michael Snyder <msnyder@vmware.com>
9740
588eebee
MS
9741 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9742 (cmd_qtframe): Ditto.
9743 (cmd_qtbuffer): Ditto.
9744 (cmd_bigqtbuffer): Ditto.
9745
9f72fee2
MS
9746 * utils.c (decimal2str): Initialize 'width' to nine, then
9747 don't mess with it.
9748
8040bd49
UW
97492011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9750
9751 * hostio.c (require_data): Free *data, not data.
9752
7e52cbd0
JK
97532011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9754
9755 * hostio.c (require_data): Use free, not xfree.
9756
9130f83e
MS
97572011-02-27 Michael Snyder <msnyder@vmware.com>
9758
4b812f4e
MS
9759 * server.c (handle_query): Discard unused value.
9760
9130f83e
MS
9761 * hostio.c (require_data): Free malloc memory before returning
9762 error.
9763
69d37113
MS
97642011-02-26 Michael Snyder <msnyder@vmware.com>
9765
9766 * linux-low.c (list_threads): Call closedir for dirent.
9767
35f5825a
MS
97682011-02-27 Michael Snyder <msnyder@vmware.com>
9769
2a589cef
MS
9770 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9771 a case statement falls through.
9772
0adea5f7
MS
9773 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9774
35f5825a
MS
9775 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9776 in comparison.
9777
238f1c74
MS
97782011-02-26 Michael Snyder <msnyder@vmware.com>
9779
9780 * utils.c (decimal2str): Eliminate dead code and dead param.
9781 (pulongest): Drop dead param from call to decimal2str.
9782 (plongest): Ditto.
9783
633ff500
JB
97842011-02-24 Joel Brobecker <brobecker@adacore.com>
9785
9786 Revert the following patch (not approved yet):
9787 2011-02-21 Hui Zhu <teawater@gmail.com>
9788 * tracepoint.c (tp_printf): New function.
9789 (eval_agent_expr): Handle gdb_agent_op_printf.
9790
f9c6ff72
HZ
97912011-02-21 Hui Zhu <teawater@gmail.com>
9792
9793 * tracepoint.c (tp_printf): New function.
9794 (eval_agent_expr): Handle gdb_agent_op_printf.
9795
94d5e490
TT
97962011-02-18 Tom Tromey <tromey@redhat.com>
9797
9798 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9799 (tracepoint.o): Likewise.
9800 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9801 (gdb_agent_op_names): Likewise.
9802
c7f96d2b
TT
98032011-02-18 Tom Tromey <tromey@redhat.com>
9804
9805 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9806 gdb_agent_op_rot>: New constants.
9807 (gdb_agent_op_names): Add pick and roll.
9808 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9809 cases.
9810
0feedb2c
JK
98112011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9812
9813 * aclocal.m4: Regenerated with aclocal-1.11.1.
9814
b3b9301e
PA
98152011-02-14 Pedro Alves <pedro@codesourcery.com>
9816
9817 * server.c (handle_qxfer_traceframe_info): New.
9818 (qxfer_packets): Register "traceframe-info".
9819 (handle_query): Report support for qXfer:traceframe-info:read+.
9820 * tracepoint.c (match_blocktype): New.
9821 (traceframe_find_block_type): Rename to ...
9822 (traceframe_walk_blocks): ... this. Add callback filter argument,
9823 and use it.
9824 (traceframe_find_block_type): New, reimplemented on top of
9825 traceframe_walk_blocks.
9826 (build_traceframe_info_xml): New.
9827 (traceframe_read_info): New.
9828 * server.h (traceframe_read_info): Declare.
9829
4f3e6fb7
YQ
98302011-02-11 Yao Qi <yao@codesourcery.com>
9831
9832 * configure.ac: Call AC_PROG_RANLIB.
9833 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9834 * configure: Regenerate.
9835
764880b7
PA
98362011-02-07 Pedro Alves <pedro@codesourcery.com>
9837
9838 * server.c (gdb_read_memory): Change return semantics to allow
9839 partial transfers.
9840 (handle_search_memory_1): Adjust.
9841 (process_serial_event) <'m' packet>: Handle partial transfers.
9842 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9843
1c79eb8a
PA
98442011-01-28 Pedro Alves <pedro@codesourcery.com>
9845
9846 * regcache.c (init_register_cache): Initialize
9847 regcache->register_status.
9848 (free_register_cache): Release regcache->register_status.
9849 (regcache_cpy): Copy register_status.
9850 (registers_to_string): Print 'x's for unavailable registers.
9851 (supply_register): Mark the register's status valid or
9852 unavailable, depending on whether a buffer was passed in or not.
9853 (supply_register_zeroed): New.
9854 (supply_regblock): Mark the registers' status valid or
9855 unavailable, depending on whether a buffer was passed in or not.
9856 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9857 (struct regcache): New `register_status' field.
9858 (supply_register_zeroed): Declare.
9859 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9860 supply_register_zeroed, rather than passing a NULL buffer to
9861 supply_register.
9862 * tracepoint.c (fetch_traceframe_registers): Update comment.
9863
85724a0e
PA
98642011-01-28 Pedro Alves <pedro@codesourcery.com>
9865
9866 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9867 buffer explicit.
9868
d08aafef
PA
98692011-01-25 Pedro Alves <pedro@codesourcery.com>
9870
9871 * server.h (decode_xfer_write): Change prototype.
9872 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9873 and don't extract the annex here.
9874 * server.c (decode_xfer_read): Remove `annex' parameter,
9875 and don't extract the annex here.
9876 (decode_xfer): New.
9877 (struct qxfer): New.
9878 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9879 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9880 (handle_qxfer_statictrace): New functions, abstracted out from
9881 handle_query, and made to use the struct qxfer interface.
9882 (handle_threads_qxfer_proper): Rename to ...
9883 (handle_qxfer_threads_proper): ... this.
9884 (handle_threads_qxfer): Rename to ...
9885 (handle_qxfer_threads): ... this. Adjust.
9886 (qxfer_packets): New array.
9887 (handle_qxfer): New function.
9888 (handle_query): Use handle_qxfer.
9889
493e2a69
MS
98902011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9891
9892 * gdbreplay.c: Shorten lines of >= 80 columns.
9893 * linux-low.c: Ditto.
9894 * linux-ppc-low.c: Ditto.
9895 * linux-s390-low.c: Ditto.
9896 * linux-sparc-low.c: Ditto.
9897 * linux-x86-low.c: Ditto.
9898 * linux-xtensa-low.c: Ditto.
9899 * mem-break.c: Ditto.
9900 * nto-low.c: Ditto.
9901 * regcache.h: Ditto.
9902 * remote-utils.c: Ditto.
9903 * server.c: Ditto.
9904 * server.h: Ditto.
9905 * thread-db.c: Ditto.
9906 * tracepoint.c: Ditto.
9907 * utils.c: Ditto.
9908 * win32-low.h: Ditto.
9909
44944448
JB
99102011-01-05 Joel Brobecker <brobecker@adacore.com>
9911
9912 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9913 update.
9914
71ce852c
JB
99152011-01-01 Joel Brobecker <brobecker@adacore.com>
9916
9917 * server.c (gdbserver_version): Update copyright year in version
9918 output.
9919 * gdbreplay.c (gdbreplay_version): Ditto.
9920
eb826dc6
MF
99212010-12-29 Jie Zhang <jie.zhang@analog.com>
9922
9923 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9924 * linux-bfin-low.c: New file.
9925 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9926 PT_DATA_ADDR for BFIN targets.
9927 * Makefile.in (SFILES): Add linux-bfin-low.c.
9928 (clean): Remove reg-bfin.c.
9929 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9930 * README: Mention supported Blackfin targets.
9931
39ab222a
MF
99322010-12-23 Mike Frysinger <vapier@gentoo.org>
9933
9934 * .gitignore: New file.
9935
a1f2ce7d
MF
99362010-11-16 Mike Frysinger <vapier@gentoo.org>
9937
9938 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9939
f474844c
JZ
99402010-10-22 Jie Zhang <jie@codesourcery.com>
9941
9942 * Makefile.in: Add FLAGS_TO_PASS variable.
9943 (install): Remove dependency of install-only and recursively
9944 invoke make for install-only.
9945
f1048712
DE
99462010-10-04 Doug Evans <dje@google.com>
9947
9948 * Makefile.in (uninstall): Use $(DESTDIR).
9949
b53a1623
PA
99502010-09-24 Pedro Alves <pedro@codesourcery.com>
9951
e6ee044d
PA
9952 PR gdb/11842
9953
b53a1623
PA
9954 * linux-x86-low.c (compat_siginfo_from_siginfo)
9955 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9956 si_code is < 0. Check for si_code == SI_TIMER before checking for
9957 si_code < 0.
9958
fa1bd1e4
JB
99592010-09-13 Joel Brobecker <brobecker@adacore.com>
9960
9961 * lynx-i386-low.c: New file.
9962 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9963
47fac8f8
JB
99642010-09-13 Joel Brobecker <brobecker@adacore.com>
9965
9966 * lynx-low.c (ptrace_request_to_str): Remove handling for
9967 request values that have been removed in LynxOS 5.x.
9968
1adfc54d
JB
99692010-09-13 Joel Brobecker <brobecker@adacore.com>
9970
9971 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9972 <ptrace.h>
9973
c2a66c29
NS
99742010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9975
9976 * configure.ac: Add --enable-inprocess-agent option.
9977 * configure: Rebuilt.
9978
32fcada3
YQ
99792010-09-06 Yao Qi <yao@codesourcery.com>
9980
9981 * linux-low.c (linux_kill): Remove unused variable.
9982 (linux_stabilize_threads): Likewise.
9983 * server.c (start_inferior): Likewise.
9984 (queue_stop_reply_callback): Likewise.
9985 * tracepoint.c (do_action_at_tracepoint): Likewise.
9986
0cccb683
YQ
99872010-09-06 Yao Qi <yao@codesourcery.com>
9988
9989 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9990 on return.
9991
423ec54c
JK
99922010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9993
9994 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9995
12ac6819
PA
99962010-09-06 Pedro Alves <pedro@codesourcery.com>
9997
9998 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9999 "$(IPA_DEPFILES)".
10000
8ed54b31
JB
100012010-09-01 Joel Brobecker <brobecker@adacore.com>
10002
10003 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10004 gdbserver/lynx-ppc-low.c: New files.
10005 * Makefile.in (lynx_low_h): New variable.
10006 (lynx-low.o, lynx-ppc-low.o): New rules.
10007 * configure.ac: On LynxOS, link with -lnetinet.
10008 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10009 * configure: regenerate.
10010
bb0116a4
JB
100112010-09-01 Joel Brobecker <brobecker@adacore.com>
10012
10013 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10014 * configure.ac: Add check for vasprintf and vsnprintf.
10015 * configure, config.in: Regenerate.
10016 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10017
a778ab81 100182010-09-01 Joel Brobecker <brobecker@adacore.com>
10019
10020 * gdbreplay.c: Move include of alloca.h up, next to include of
10021 malloc.h.
10022 * server.h: Add include of malloc.h.
10023 * mem-break.c: Remove include of malloc.h.
10024 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10025
8b034a19 100262010-09-01 Joel Brobecker <brobecker@adacore.com>
10027
10028 * Makefile.in (memmem.o): Build with -Wno-error.
10029
100302010-09-01 Joel Brobecker <brobecker@adacore.com>
10031
10032 * utils.c (xsnprintf): Make non-static.
10033 * server.h: Add xsnprintf declaration.
10034 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10035 replace calls to snprintf by calls to xsnprintf throughout.
10036
100372010-09-01 Joel Brobecker <brobecker@adacore.com>
10038
10039 * configure.ac: Add configure check for alloca.
10040 * configure, config.in: Regenerate.
10041 * server.h: Include alloca.h if it exists.
10042 * gdbreplay.c: Include alloca.h if it exists.
10043
1a981360
PA
100442010-08-28 Pedro Alves <pedro@codesourcery.com>
10045
10046 * linux-low.c (__SIGRTMIN): Define if not already defined.
10047 (linux_create_inferior): Check for __ANDROID__ rather than
10048 __SIGRTMIN.
10049 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10050 are already deferred.
10051 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10052 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10053 stopped and already has a pending signal to report.
10054 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10055 a pending signal to report or is moving out of a jump pad.
10056 (linux_init_signals): Check for __ANDROID__ rather than
10057 __SIGRTMIN.
10058
b4d51a55
PA
100592010-08-28 Pedro Alves <pedro@codesourcery.com>
10060
10061 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10062 debug_threads check. Avoid a linear search when not doing debug
10063 output.
10064
ec48365d
PA
100652010-08-27 Pedro Alves <pedro@codesourcery.com>
10066
10067 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10068 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10069 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10070 (process_event): Change local fd's type to gdb_fildes_t.
10071 (create_file_handler): Adjust prototype.
10072 (delete_file_handler): Adjust prototype.
10073 (handle_file_event): Adjust prototype. Use pfildes.
10074 (create_file_event): Adjsut prototype.
10075 * remote-utils.c (remote_desc, listen_desc): Change type to
10076 gdb_fildes_t.
10077 * server.h: New gdb_fildes_t typedef.
10078 [USE_WIN32API]: Include winsock2.h.
10079 (delete_file_handler, add_file_handler): Adjust prototypes.
10080 (pfildes): Declare.
10081 * utils.c (pfildes): New.
10082
854d88f0
PA
100832010-08-27 Pedro Alves <pedro@codesourcery.com>
10084
10085 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10086 * configure: Regenerate.
10087
0146f85b
PA
100882010-08-27 Pedro Alves <pedro@codesourcery.com>
10089
10090 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10091 (linux_done_accessing_memory): ... this.
10092 (linux_target_ops): Adjust.
10093 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10094 * nto-low.c (nto_target_ops): Adjust comment.
10095 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10096 * spu-low.c (spu_target_ops): Adjust comment.
10097 * target.h (target_ops): Rename unprepare_to_access_memory field
10098 to done_accessing_memory.
10099 (unprepare_to_access_memory): Rename to ...
10100 (done_accessing_memory): ... this.
10101
90d74c30
PA
101022010-08-26 Pedro Alves <pedro@codesourcery.com>
10103
10104 * linux-low.c (linux_prepare_to_access_memory): New.
10105 (linux_unprepare_to_access_memory): New.
10106 (linux_target_ops): Install them.
10107 * server.c (read_memory): Rename to ...
10108 (gdb_read_memory): ... this. Use
10109 prepare_to_access_memory/prepare_to_access_memory.
10110 (write_memory): Rename to ...
10111 (gdb_write_memory): ... this. Use
10112 prepare_to_access_memory/prepare_to_access_memory.
10113 (handle_search_memory_1): Adjust.
10114 (process_serial_event): Adjust.
10115 * target.h (struct target_ops): New fields
10116 prepare_to_access_memory and unprepare_to_access_memory.
10117 (prepare_to_access_memory, unprepare_to_access_memory): New.
10118 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10119 prepare_to_access_memory/prepare_to_access_memory.
10120 * nto-low.c (nto_target_ops): Adjust.
10121 * spu-low.c (spu_target_ops): Adjust.
10122 * win32-low.c (win32_target_ops): Adjust.
10123
fd467969
PA
101242010-08-26 Pedro Alves <pedro@codesourcery.com>
10125
10126 * Makefile.in (WARN_CFLAGS): Get it from configure.
10127 (WERROR_CFLAGS): New.
10128 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10129 * configure.ac: Introduce --enable-werror, which adds -Werror to
10130 the compiler command line. Enabled by default. Disable with
10131 --disable-werror. Add -Wdeclaration-after-statement
10132 Wpointer-arith and -Wformat-nonliteral to warning flags.
10133 * configure: Regenerate.
10134
331e2f5f
PA
101352010-08-26 Pedro Alves <pedro@codesourcery.com>
10136
10137 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10138
e581f2b4
PA
101392010-08-26 Pedro Alves <pedro@codesourcery.com>
10140
10141 * gdbreplay.c (remote_error): New.
10142 (gdbchar): New.
10143 (expect): Use gdbchar. Check for error reading from GDB.
10144 Clarify sync error output.
10145 (play): Check for errors writing to GDB.
10146 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10147 * remote-utils.c (getpkt): Check for errors writing to the remote
10148 descriptor.
10149
3c11dd79
PA
101502010-08-25 Pedro Alves <pedro@codesourcery.com>
10151
10152 * linux-low.c (linux_wait_1): Move non-debugging code out of
10153 `debug_threads' control.
10154
d20a8ad9
PA
101552010-08-25 Pedro Alves <pedro@codesourcery.com>
10156
10157 * linux-low.c (linux_wait_1): Don't set last_status here.
10158 * server.c (push_event, queue_stop_reply_callback): Assert we're
10159 not pushing a TARGET_WAITKIND_IGNORE event.
10160 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10161 (myresume, handle_target_event): Set the thread's last_resume_kind
10162 and last_status from the target returned status.
10163
964e4306
PA
101642010-08-25 Pedro Alves <pedro@codesourcery.com>
10165
10166 PR threads/10729
10167
10168 * linux-x86-low.c (update_debug_registers_callback): New.
10169 (i386_dr_low_set_addr): Use it.
10170 (i386_dr_low_get_addr): New.
10171 (i386_dr_low_set_control): Use update_debug_registers_callback.
10172 (i386_dr_low_get_control): New.
10173 (i386_dr_low_get_status): Adjust.
10174 * linux-low.c (linux_stop_lwp): New.
10175 * linux-low.h (linux_stop_lwp): Declare.
10176
10177 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10178 argument instead of a i386_debug_reg_state.
10179 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10180 a i386_debug_reg_state.
10181 (i386_insert_aligned_watchpoint): Adjust.
10182 (i386_remove_aligned_watchpoint): Adjust.
10183 (i386_low_stopped_data_address): Read the debug registers from the
10184 inferior instead of from the mirrors.
10185 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10186 (i386_dr_low_get_addr): Declare.
10187 (i386_dr_low_get_control): Declare.
10188 (i386_dr_low_get_status): Change prototype.
10189
10190 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10191 (i386_dr_low_get_addr): New.
10192 (i386_dr_low_get_control): New.
10193 (i386_dr_low_get_status): Adjust prototype. Return
10194 dr_status_mirror.
10195 (i386_initial_stuff): Clear dr_status_mirror and
10196 dr_control_mirror.
10197 (i386_get_thread_context): Adjust.
10198 (i386_set_thread_context): Adjust.
10199 (i386_thread_added): Adjust.
10200
5f21a75b
PA
102012010-08-24 Pedro Alves <pedro@codesourcery.com>
10202
10203 * linux-low.h (linux_thread_area): Delete declaration.
10204
3e4c1235
TS
102052010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10206
10207 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10208 after its termination.
10209
1971b033
PA
102102010-08-09 Pedro Alves <pedro@codesourcery.com>
10211
10212 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10213 (gdb_wants_all_stopped): Delete.
10214 (linux_wait_1): Don't call them.
10215 * server.c (handle_v_cont): Tag all threads as want-stopped.
10216 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10217 stopped as "client-wants-stopped".
10218
310444ac
PA
102192010-07-31 Pedro Alves <pedro@codesourcery.com>
10220
10221 * Makefile.in (signals_h): New.
10222 (server_h): Depend on it.
10223 (server.o): Don't depend on $(signals_def).
10224 (signals.o): Depend on $(signals_def).
10225
a19cae16
JK
102262010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10227
10228 * Makefile.in (signals_def): New.
10229 (server_h): Append include/gdb/signals.h and signals_def.
10230 (server.o): Append signals_def.
10231
30d50328
JK
102322010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10233
10234 * server.c (handle_target_event): Use target_signal_to_host for
10235 resume_info.sig initialization.
10236 * target.h (struct thread_resume) <sig>: New comment.
10237
5c3216e2
OS
102382010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10239
c6f46ca0
OS
10240 * server.c (handle_query): strcpy() the returned string from paddress()
10241 instead of sprintf().
5c3216e2
OS
10242 * utils.c (paddress): Return phex_nz().
10243
6bd31874
JB
102442010-07-07 Joel Brobecker <brobecker@adacore.com>
10245
10246 * server.c (handle_v_cont): Call mourn_inferior if process
10247 just exited.
10248 (myresume): Likewise.
10249
0fb4aa4b
PA
102502010-07-01 Pedro Alves <pedro@codesourcery.com>
10251
10252 Static tracepoints, and integration with UST.
10253
10254 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10255 * mem-break.c (uninsert_all_breakpoints)
10256 (reinsert_all_breakpoints): New.
10257 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10258 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10259 (gdb_agent_ust_loaded, helper_thread_id)
10260 (gdb_agent_helper_thread_id): New macros.
10261 (struct ipa_sym_addresses): Add addr_ust_loaded,
10262 addr_helper_thread_id, addr_cmd_buf.
10263 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10264 (in_process_agent_loaded_ust): New.
10265 (write_e_ust_not_loaded): New.
10266 (maybe_write_ipa_ust_not_loaded): New.
10267 (struct collect_static_trace_data_action): New.
10268 (enum tracepoint_type) <static_tracepoint>: New.
10269 (struct tracepoint) <handle>: Mention static tracepoints.
10270 (struct static_tracepoint_ctx): New.
10271 (CMD_BUF_SIZE): New.
10272 (add_tracepoint_action): Handle static tracepoint actions.
10273 (unprobe_marker_at): New.
10274 (clear_installed_tracepoints): Handle static tracepoints.
10275 (cmd_qtdp): Handle static tracepoints.
10276 (probe_marker_at): New.
10277 (cmd_qtstart): Handle static tracepoints.
10278 (response_tracepoint): Handle static tracepoints.
10279 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10280 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10281 (get_context_regcache): Handle static tracepoints.
10282 (do_action_at_tracepoint): Handle static tracepoint actions.
10283 (traceframe_find_block_type): Handle static trace data blocks.
10284 (traceframe_read_sdata): New.
10285 (download_tracepoints): Download static tracepoint actions.
10286 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10287 (GDB_PROBE_NAME): New.
10288 (ust_ops): New.
10289 (GET_UST_SYM): New.
10290 (USTF): New.
10291 (dlsym_ust): New.
10292 (ust_marker_to_static_tracepoint): New.
10293 (gdb_probe): New.
10294 (collect_ust_data_at_tracepoint): New.
10295 (gdb_ust_probe): New.
10296 (UNIX_PATH_MAX, SOCK_DIR): New.
10297 (gdb_ust_connect_sync_socket): New.
10298 (resume_thread, stop_thread): New.
10299 (run_inferior_command): New.
10300 (init_named_socket): New.
10301 (gdb_ust_socket_init): New.
10302 (cstr_to_hexstr): New.
10303 (next_st): New.
10304 (first_marker, next_marker): New.
10305 (response_ust_marker): New.
10306 (cmd_qtfstm, cmd_qtsstm): New.
10307 (unprobe_marker_at, probe_marker_at): New.
10308 (cmd_qtstmat, gdb_ust_thread): New.
10309 (gdb_ust_init): New.
10310 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10311 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10312 (ST_REGENTRY): New.
10313 (x86_64_st_collect_regmap): New.
10314 (X86_64_NUM_ST_COLLECT_GREGS): New.
10315 (AMD64_RIP_REGNUM): New.
10316 (supply_static_tracepoint_registers): New.
10317 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10318 (ST_REGENTRY): New.
10319 (i386_st_collect_regmap): New.
10320 (i386_NUM_ST_COLLECT_GREGS): New.
10321 (supply_static_tracepoint_registers): New.
10322 * server.c (handle_query): Handle qXfer:statictrace:read.
10323 <qSupported>: Report support for StaticTracepoints, and
10324 qXfer:statictrace:read features.
10325 * server.h (traceframe_read_sdata)
10326 (supply_static_tracepoint_registers): Declare.
10327 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10328 (unpack_varlen_hex): Include in IPA build.
10329 * Makefile.in (ustlibs, ustinc): New.
10330 (IPA_OBJS): Add remote-utils-ipa.o.
10331 ($(IPA_LIB)): Link -ldl and -lpthread.
10332 (UST_CFLAGS): New.
10333 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10334 * config.in, configure: Regenerate.
10335
9e4344e5
PA
103362010-06-20 Ian Lance Taylor <iant@google.com>
10337 Pedro Alves <pedro@codesourcery.com>
10338
10339 * linux-x86-low.c (always_true): Delete.
10340 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10341 trying to fool the compiler with always_true.
10342
c6beb2cb
PA
103432010-06-20 Pedro Alves <pedro@codesourcery.com>
10344
10345 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10346 conditions in gdbserver.
10347
d2ed6730
UW
103482010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10349
10350 * spu-low.c (spu_read_memory): Wrap around local store limit.
10351 (spu_write_memory): Likewise.
10352
4e29fb54
PA
103532010-06-15 Pedro Alves <pedro@codesourcery.com>
10354
10355 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10356 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10357 LONGEST uses.
10358 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10359 uses.
10360 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10361 uses with LONGEST uses.
10362
6a271cae
PA
103632010-06-14 Stan Shebs <stan@codesourcery.com>
10364 Pedro Alves <pedro@codesourcery.com>
10365
10366 Bytecode compiler.
10367
10368 * linux-x86-low.c: Include limits.h.
10369 (add_insns): New.
10370 (always_true): New.
10371 (EMIT_ASM): New.
10372 (EMIT_ASM32): New.
10373 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10374 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10375 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10376 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10377 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10378 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10379 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10380 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10381 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10382 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10383 (amd64_emit_void_call_2): New.
10384 (amd64_emit_ops): New.
10385 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10386 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10387 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10388 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10389 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10390 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10391 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10392 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10393 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10394 (i386_emit_stack_adjust, i386_emit_int_call_1)
10395 (i386_emit_void_call_2): New.
10396 (i386_emit_ops): New.
10397 (x86_emit_ops): New.
10398 (the_low_target): Install x86_emit_ops.
10399 * server.h (struct emit_ops): New.
10400 (get_raw_reg_func_addr): Declare.
10401 (current_insn_ptr, emit_error): Declare.
10402 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10403 (set_trace_state_variable_value): New defines.
10404 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10405 addr_get_trace_state_variable_value and
10406 addr_set_trace_state_variable_value.
10407 (symbol_list): New fields for get_raw_reg,
10408 get_trace_state_variable_value and set_trace_state_variable_value.
10409 (condfn): New typedef.
10410 (struct tracepoint): New field `compiled_cond'.
10411 (do_action_at_tracepoint): Clear compiled_cond.
10412 (get_trace_state_variable_value, set_trace_state_variable_value):
10413 Export in the IPA.
10414 (condition_true_at_tracepoint): If there's a compiled condition,
10415 run that.
10416 (current_insn_ptr, emit_error): New globals.
10417 (struct bytecode_address): New.
10418 (get_raw_reg_func_addr): New.
10419 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10420 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10421 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10422 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10423 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10424 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10425 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10426 (compile_tracepoint_condition, compile_bytecodes): New.
10427 * target.h (emit_ops): Forward declare.
10428 (struct target_ops): New field emit_ops.
10429 (target_emit_ops): New.
10430 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10431 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10432 * linux-low.c (linux_emit_ops): New.
10433 (linux_target_ops): Install it.
10434 * linux-low.h (struct linux_target_ops): New field emit_ops.
10435
92b72907
UW
104362010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10437
10438 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10439 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10440
fa593d66
PA
104412010-06-01 Pedro Alves <pedro@codesourcery.com>
10442 Stan Shebs <stan@codesourcery.com>
10443
10444 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10445 (all): Depend on $(extra_libraries).
10446 (install-only): Install the IPA.
10447 (IPA_OBJS, IPA_LIB): New.
10448 (clean): Remove the IPA lib.
10449 (IPAGENT_CFLAGS): New.
10450 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10451 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10452 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10453 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10454 * configure.ac: Check for atomic builtins support in the compiler.
10455 (IPA_DEPFILES, extra_libraries): Define.
10456 * configure.srv (ipa_obj): Add description.
10457 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10458 (i[34567]86-*-linux*): Set ipa_obj.
10459 (x86_64-*-linux*): Set ipa_obj.
10460 * linux-low.c (stabilizing_threads): New.
10461 (supports_fast_tracepoints): New.
10462 (linux_detach): Stabilize threads before detaching.
10463 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10464 the lwp is either not stabilizing, or is moving out of a jump pad.
10465 (linux_fast_tracepoint_collecting): New.
10466 (maybe_move_out_of_jump_pad): New.
10467 (enqueue_one_deferred_signal): New.
10468 (dequeue_one_deferred_signal): New.
10469 (linux_wait_for_event_1): If moving out of a jump pad, defer
10470 pending signals to later.
10471 (linux_stabilize_threads): New.
10472 (linux_wait_1): Check if threads need moving out of jump pads, and
10473 do it if so.
10474 (stuck_in_jump_pad_callback): New.
10475 (move_out_of_jump_pad_callback): New.
10476 (lwp_running): New.
10477 (linux_resume_one_lwp): Handle moving out of jump pads.
10478 (linux_set_resume_request): Dequeue deferred signals.
10479 (need_step_over_p): Also step over fast tracepoint jumps.
10480 (start_step_over): Also uninsert fast tracepoint jumps.
10481 (finish_step_over): Also reinsert fast tracepoint jumps.
10482 (linux_install_fast_tracepoint_jump): New.
10483 (linux_target_ops): Install linux_stabilize_threads and
10484 linux_install_fast_tracepoint_jump_pad.
10485 * linux-low.h (linux_target_ops) <get_thread_area,
10486 install_fast_tracepoint_jump_pad>: New fields.
10487 (struct lwp_info) <collecting_fast_tracepoint,
10488 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10489 (linux_get_thread_area): Declare.
10490 * linux-x86-low.c (jump_insn): New.
10491 (x86_get_thread_area): New.
10492 (append_insns): New.
10493 (push_opcode): New.
10494 (amd64_install_fast_tracepoint_jump_pad): New.
10495 (i386_install_fast_tracepoint_jump_pad): New.
10496 (x86_install_fast_tracepoint_jump_pad): New.
10497 (the_low_target): Install x86_get_thread_area and
10498 x86_install_fast_tracepoint_jump_pad.
10499 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10500 (struct fast_tracepoint_jump): New.
10501 (fast_tracepoint_jump_insn): New.
10502 (fast_tracepoint_jump_shadow): New.
10503 (find_fast_tracepoint_jump_at): New.
10504 (fast_tracepoint_jump_here): New.
10505 (delete_fast_tracepoint_jump): New.
10506 (set_fast_tracepoint_jump): New.
10507 (uninsert_fast_tracepoint_jumps_at): New.
10508 (reinsert_fast_tracepoint_jumps_at): New.
10509 (set_breakpoint_at): Use write_inferior_memory.
10510 (uninsert_raw_breakpoint): Use write_inferior_memory.
10511 (check_mem_read): Mask out fast tracepoint jumps.
10512 (check_mem_write): Mask out fast tracepoint jumps.
10513 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10514 (set_fast_tracepoint_jump): Declare.
10515 (delete_fast_tracepoint_jump)
10516 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10517 (reinsert_fast_tracepoint_jumps_at): Declare.
10518 * regcache.c: Don't compile many functions when building the
10519 in-process agent library.
10520 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10521 the register buffer in the heap.
10522 (free_register_cache): If the register buffer isn't owned by the
10523 regcache, don't free it.
10524 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10525 pre-existing register caches.
10526 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10527 type.
10528 (convert_ascii_to_int): : Constify `from' parameter type.
10529 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10530 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10531 the needed buffer in-place.
10532 (relocate_instruction): New.
10533 * server.c (handle_query) <qSymbols>: If the target supports
10534 tracepoints, give it a chance of looking up symbols. Report
10535 support for fast tracepoints.
10536 (handle_status): Stabilize threads.
10537 (process_serial_event): Adjust.
10538 * server.h (struct fast_tracepoint_jump): Forward declare.
10539 (struct process_info) <fast_tracepoint_jumps>: New field.
10540 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10541 (decode_X_packet, decode_M_packet): Adjust.
10542 (relocate_instruction): Declare.
10543 (in_process_agent_loaded): Declare.
10544 (tracepoint_look_up_symbols): Declare.
10545 (struct fast_tpoint_collect_status): Declare.
10546 (fast_tracepoint_collecting): Declare.
10547 (force_unlock_trace_buffer): Declare.
10548 (handle_tracepoint_bkpts): Declare.
10549 (initialize_low_tracepoint)
10550 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10551 * target.h (struct target_ops) <stabilize_threads,
10552 install_fast_tracepoint_jump_pad>: New fields.
10553 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10554 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10555 [HAVE_STDINT_H]: Include stdint.h.
10556 (trace_debug_1): Rename to ...
10557 (trace_vdebug): ... this.
10558 (trace_debug): Rename to ...
10559 (trace_debug_1): ... this. Add `level' parameter.
10560 (trace_debug): New.
10561 (ATTR_USED, ATTR_NOINLINE): New.
10562 (IP_AGENT_EXPORT): New.
10563 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10564 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10565 (about_to_request_buffer_space, trace_buffer_is_full)
10566 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10567 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10568 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10569 (traceframe_write_count, traceframes_created)
10570 (trace_state_variables)
10571 New renaming defines.
10572 (struct ipa_sym_addresses): New.
10573 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10574 (symbol_list): New.
10575 (ipa_sym_addrs): New.
10576 (all_tracepoint_symbols_looked_up): New.
10577 (in_process_agent_loaded): New.
10578 (write_e_ipa_not_loaded): New.
10579 (maybe_write_ipa_not_loaded): New.
10580 (tracepoint_look_up_symbols): New.
10581 (debug_threads) [IN_PROCESS_AGENT]: New.
10582 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10583 (UNKNOWN_SIDE_EFFECTS): New.
10584 (stop_tracing): New.
10585 (flush_trace_buffer): New.
10586 (stop_tracing_bkpt): New.
10587 (flush_trace_buffer_bkpt): New.
10588 (read_inferior_integer): New.
10589 (read_inferior_uinteger): New.
10590 (read_inferior_data_pointer): New.
10591 (write_inferior_data_pointer): New.
10592 (write_inferior_integer): New.
10593 (write_inferior_uinteger): New.
10594 (struct collect_static_trace_data_action): Delete.
10595 (enum tracepoint_type): New.
10596 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10597 <actions_str, step_actions, step_actions_str>: Only include in
10598 GDBserver.
fa593d66
PA
10599 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10600 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10601 (tracepoints): Use IP_AGENT_EXPORT.
10602 (last_tracepoint): Don't include in the IPA.
10603 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10604 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10605 (alloced_trace_state_variables): New.
10606 (trace_state_variables): Use IP_AGENT_EXPORT.
10607 (traceframe_t): Delete unused variable.
10608 (circular_trace_buffer): Don't include in the IPA.
10609 (trace_buffer_start): Delete.
10610 (struct trace_buffer_control): New.
10611 (trace_buffer_free): Delete.
10612 (struct ipa_trace_buffer_control): New.
10613 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10614 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10615 New.
10616 (trace_buffer_ctrl): New.
10617 (TRACE_BUFFER_CTRL_CURR): New.
10618 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10619 Reimplement as macros.
10620 (trace_buffer_wrap): Delete.
10621 (traceframe_write_count, traceframe_read_count)
10622 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10623 (struct tracepoint_hit_ctx) <type>: New field.
10624 (struct fast_tracepoint_ctx): New.
10625 (memory_barrier): New.
10626 (cmpxchg): New.
10627 (record_tracepoint_error): Update atomically in the IPA.
10628 (clear_inferior_trace_buffer): New.
10629 (about_to_request_buffer_space): New.
10630 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10631 updating the same buffer.
10632 (add_tracepoint): Default the tracepoint's type to trap
10633 tracepoint, and orig_size to -1.
10634 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10635 internal variables.
10636 (create_trace_state_variable): New parameter `gdb'. Handle it.
10637 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10638 (cmd_qtdp): Handle fast tracepoints.
10639 (cmd_qtdv): Adjust.
10640 (max_jump_pad_size): New.
10641 (gdb_jump_pad_head): New.
10642 (get_jump_space_head): New.
10643 (claim_jump_space): New.
10644 (sort_tracepoints): New.
10645 (MAX_JUMP_SIZE): New.
10646 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10647 IPA.
10648 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10649 support. Upload fast traceframes, and delete internal IPA
10650 breakpoints.
10651 (stop_tracing_handler): New.
10652 (flush_trace_buffer_handler): New.
10653 (cmd_qtstop): Upload fast tracepoints.
10654 (response_tracepoint): Handle fast tracepoints.
10655 (tracepoint_finished_step): Upload fast traceframes. Set the
10656 tracepoint hit context's tracepoint type.
10657 (handle_tracepoint_bkpts): New.
10658 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10659 type. Add comment about fast tracepoints.
10660 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10661 non-existing action_str field.
10662 (get_context_regcache): Handle fast tracepoints.
10663 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10664 to the regcache.
10665 (fast_tracepoint_from_jump_pad_address): New.
10666 (fast_tracepoint_from_ipa_tpoint_address): New.
10667 (collecting_t): New.
10668 (force_unlock_trace_buffer): New.
10669 (fast_tracepoint_collecting): New.
10670 (collecting): New.
10671 (gdb_collect): New.
10672 (write_inferior_data_ptr): New.
10673 (target_tp_heap): New.
10674 (target_malloc): New.
10675 (download_agent_expr): New.
10676 (UALIGN): New.
10677 (download_tracepoints): New.
10678 (download_trace_state_variables): New.
10679 (upload_fast_traceframes): New.
10680 (IPA_FIRST_TRACEFRAME): New.
10681 (IPA_NEXT_TRACEFRAME_1): New.
10682 (IPA_NEXT_TRACEFRAME): New.
10683 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10684 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10685 (gdb_jump_pad_buffer_end): New.
10686 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10687 (initialize_tracepoint): Adjust.
10688 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10689 buffer. Initialize the low module.
10690 * utils.c (PREFIX, TOOLNAME): New.
10691 (malloc_failure): Use PREFIX.
10692 (error): In the IPA, an error causes an exit.
10693 (fatal, warning): Use PREFIX.
10694 (internal_error): Use TOOLNAME.
10695 (NUMCELLS): Increase to 10.
10696 * configure, config.in: Regenerate.
10697
d149dd1d
PA
106982010-06-01 Pedro Alves <pedro@codesourcery.com>
10699
10700 * server.c (handle_query) <qSupported>: Do two passes over the
10701 qSupported string to avoid nesting strtok.
10702
f6528abd
JK
107032010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10704
10705 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10706 (CDEPS): New.
10707 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10708 -Wl,--dynamic-list.
10709 * configure: Regenerate.
10710 * proc-service.list: New.
10711
ca2a87a0
JK
107122010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10713
10714 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10715 New comment.
10716
363a6e9f
OS
107172010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10718
10719 * gdbreplay.c (remote_open): Check error return from socket() call by
10720 its equality to -1 not by it being negative.
10721 * remote-utils.c (remote_open): Likewise.
10722
d23b6cb1
PA
107232010-05-23 Pedro Alves <pedro@codesourcery.com>
10724
10725 * config.h: Regenerate.
10726
28d3cf85
MK
107272010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10728
10729 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10730 doesn't provide PTRACE_GET_THREAD_AREA.
10731
fea36a59
MK
107322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10733
10734 * linux-m68k-low.c: Include <asm/ptrace.h>
10735 (ps_get_thread_area): Implement.
10736
24b066ba
DE
107372010-05-03 Doug Evans <dje@google.com>
10738
10739 * event-loop.c (struct callback_event): New struct.
10740 (callback_list): New global.
10741 (append_callback_event, delete_callback_event): New functions.
10742 (process_callback): New function.
10743 (start_event_loop): Call it.
10744 * remote-utils.c (NOT_SCHEDULED): Define.
10745 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10746 moved out of readchar.
10747 (readchar): Rewrite. Call reschedule before returning.
10748 (reset_readchar): New function.
10749 (remote_close): Call it.
10750 (process_remaining, reschedule): New functions.
10751 * server.h (callback_handler_func): New typedef.
10752 (append_callback_event, delete_callback_event): Declare.
10753
9836d6ea
PA
107542010-05-03 Pedro Alves <pedro@codesourcery.com>
10755
10756 * proc-service.c (ps_pglobal_lookup): Use
10757 thread_db_look_up_one_symbol.
10758 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10759 parameter. Use it instead of all_symbols_looked_up.
10760 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10761 field.
10762 (all_symbols_looked_up): Don't declare.
10763 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10764 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10765 field.
10766 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10767 Set all_symbols_looked_up here.
10768 (thread_db_look_up_one_symbol): New.
10769 (thread_db_get_tls_address): Adjust.
10770 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10771 thread_db object on the heap, and tentatively set it in the
10772 process structure.
10773 (thread_db_init): Don't set all_symbols_looked_up here.
10774 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10775
7984d532
PA
107762010-05-03 Pedro Alves <pedro@codesourcery.com>
10777
10778 * linux-low.c (linux_kill, linux_detach): Adjust.
10779 (status_pending_p_callback): Remove redundant statement. Check
10780 for !TARGET_WAITIKIND_IGNORE, instead of
10781 TARGET_WAITKIND_STOPPED.
10782 (handle_tracepoints): Make sure LWP is locked. Adjust.
10783 (linux_wait_for_event_1): Adjust.
10784 (linux_cancel_breakpoints): New.
10785 (unsuspend_one_lwp): New.
10786 (unsuspend_all_lwps): New.
10787 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10788 (send_sigstop_callback): Change return type to int, add new
10789 `except' parameter and handle it.
10790 (suspend_and_send_sigstop_callback): New.
10791 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10792 pass them down. If SUSPEND, also increment the lwp's suspend
10793 count.
10794 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10795 (need_step_over_p): Don't consider suspended LWPs.
10796 (start_step_over): Adjust.
10797 (proceed_one_lwp): Change return type to int, add new `except'
10798 parameter and handle it.
10799 (unsuspend_and_proceed_one_lwp): New.
10800 (proceed_all_lwps): Use find_inferior instead of
10801 for_each_inferior.
10802 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10803 also decrement the suspend count of LWPs. Pass `except' down,
10804 instead of hacking its suspend count.
10805 (linux_pause_all): Add `freeze' parameter. Adjust.
10806 (linux_unpause_all): New.
10807 (linux_target_ops): Install linux_unpause_all.
10808 * server.c (handle_status): Adjust.
10809 * target.h (struct target_ops): New fields `unpause_all' and
10810 `cancel_breakpoints'. Add new parameter to `pause_all'.
10811 (pause_all): Add new `freeze' parameter.
10812 (unpause_all): New.
10813 (cancel_breakpoints): New.
10814 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10815 cancel breakpoints.
10816 (cmd_qtstart): Pause threads.
10817 (stop_tracing): Pause threads, and cancel breakpoints.
10818 * win32-low.c (win32_target_ops): Adjust.
10819
e471f25b
PA
108202010-05-03 Pedro Alves <pedro@codesourcery.com>
10821
10822 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10823 the inferior right away from here...
10824 (linux_wait_1): ... to here, and adjust to check the thread's
10825 last_resume_kind instead of the lwp's step or stop_expected flags.
10826
1915ef4f
PA
108272010-05-02 Pedro Alves <pedro@codesourcery.com>
10828
10829 * README: Use consistent `GDB' and `GDBserver' spellings.
10830
f9e39928
PA
108312010-05-02 Pedro Alves <pedro@codesourcery.com>
10832
10833 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10834 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10835 (linux_detach_one_lwp): Assume the lwp is stopped.
10836 (any_thread_of): Delete.
10837 (linux_detach): Stop all lwps here. Don't blindly delete all
10838 breakpoints.
10839 (delete_lwp_callback): New.
10840 (linux_mourn): Delete all lwps of the process that is gone.
10841 (linux_wait_1): Don't delete the last lwp of the process here.
10842 * mem-break.h (mark_breakpoints_out): Declare.
10843 * mem-break.c (mark_breakpoints_out): New.
10844 (free_all_breakpoints): Use it.
10845 * server.c (handle_target_event): If the process is gone, mark
10846 breakpoints out.
10847 * thread-db.c (struct thread_db) <create_bp>: New field.
10848 (thread_db_enable_reporting): Fix prototype. Store a thread event
10849 breakpoint reference in the thread_db struct.
10850 (thread_db_load_search): Clear the thread_db object.
10851 (try_thread_db_load_1): Ditto.
10852 (switch_to_process): New.
10853 (disable_thread_event_reporting): Use it.
10854 (remove_thread_event_breakpoints): New.
10855 (thread_db_detach, thread_db_mourn): Use it.
10856
1e7fc18c
PA
108572010-05-01 Pedro Alves <pedro@codesourcery.com>
10858
10859 * linux-low.c (linux_enable_event_reporting): New.
10860 (linux_wait_for_event_1, handle_extended_wait): Use it.
10861
02fc4de7
PA
108622010-04-30 Pedro Alves <pedro@codesourcery.com>
10863
10864 * linux-low.c (linux_kill_one_lwp, linux_kill)
10865 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10866 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10867 SIGSTOP even if the LWP is stopped.
10868 (send_sigstop_callback): New.
10869 (stop_all_lwps): Use send_sigstop_callback instead.
10870 (linux_resume_one_thread): Adjust.
10871 (proceed_one_lwp): Still proceed an LWP that the client has
10872 requested to stop, if we haven't reported it as stopped yet. Make
10873 sure that LWPs the client want stopped, have a pending SIGSTOP.
10874
bc3b5632
DE
108752010-04-26 Doug Evans <dje@google.com>
10876
ae1ada35
DE
10877 * server.c (handle_general_set): Make static.
10878
bc3b5632
DE
10879 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10880 Print received char after testing for error/eof instead of before.
10881 (input_interrupt): Tweak comment.
10882
65730243
DE
108832010-04-23 Doug Evans <dje@google.com>
10884
10885 * server.c (start_inferior): Print inferior argv if --debug.
10886
a8ae7dc0
AR
108872010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10888
10889 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10890 * nto-x86-low.c: Include server.h
10891
1c07cc19
PM
108922010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10893
10894 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10895 be consistent with other sources of this directory.
10896 (init_registers_amd64): Correct name of source file of this function
10897 in the comment.
10898
e0a61e09
PM
108992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10900
10901 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10902 64-bit executables.
10903
54709339
PM
109042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10905
10906 * win32-i386-low.c: Add 64-bit support.
10907 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10908 (init_registers_amd64): Declare.
10909 (mappings): Add 64-bit version of array.
10910 (init_windows_x86): New function.
10911 (the_low_target): Change init_arch field to init_windows_x86.
10912
e8f0053d
PM
109132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10914
10915 * win32-low.c: Adapt to support also 64-bit architecture.
10916 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10917 (get_image_name): Use SIZE_T type for local variable `done'.
10918 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10919 (toolhelp_get_dll_name): Idem.
10920 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10921 Use uintptr_t typecast to avoid warning.
10922 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10923 (handle_exception): Use phex_nz to avoid warning.
10924 (win32_wait): Remove unused local variable `process'.
10925
c481e77e
PM
109262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10927
10928 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10929 `amd64-avx.o'.
10930
12ea4b69
PM
109312010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10932
10933 * configure.ac: Use `ws2_32' library for srv_mingw.
10934 * configure: Regenerate.
10935 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10936 * remote-utils.c: Likewise.
10937
f6d1620c
L
109382010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10939
10940 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10941 if __x86_64__ is defined.
10942
8e642873
PM
109432010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10944
10945 * configure: Regenerate.
10946
711e434b
PM
109472010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10948
10949 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10950 * target.h (target_ops): New get_tib_address field.
10951 * win32-low.h (win32_thread_info): Add thread_local_base field.
10952 * win32-low.c (child_add_thread): Add tlb argument.
10953 Set thread_local_base field to TLB.
10954 (get_child_debug_event): Adapt to child_add_thread change.
10955 (win32_get_tib_address): New function.
10956 (win32_target_ops): Set get_tib_address field to
10957 win32_get_tib_address.
10958 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10959
505106cd
PA
109602010-04-12 Pedro Alves <pedro@codesourcery.com>
10961
505106cd
PA
10962 * linux-low.c (linux_mourn): Also remove the process.
10963 * server.c (handle_target_event): Don't remove the process here.
10964 * nto-low.c (nto_mourn): New.
10965 (nto_target_ops): Install it.
10966 * spu-low.c (spu_mourn): New.
10967 (spu_target_ops): Install it.
10968 * win32-low.c (win32_mourn): New.
10969 (win32_target_ops): Install it.
10970
e8470a06
PA
109712010-04-12 Pedro Alves <pedro@codesourcery.com>
10972
10973 * server.h (buffer_xml_printf): Remove redundant `;'.
10974
45ba0d02
PA
109752010-04-12 Pedro Alves <pedro@codesourcery.com>
10976
10977 * regcache.c (set_register_cache): Invalidate regcaches before
10978 changing the register cache layout.
10979 (regcache_invalidate_one): Allow a NULL regcache.
10980 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10981 regcaches before changing the register cache layout or the target
10982 regsets.
10983
59e04013
L
109842010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10985
10986 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10987 variable warning on Linux/x86-64.
10988
8336d594
PA
109892010-04-11 Pedro Alves <pedro@codesourcery.com>
10990
10991 GDBserver disconnected tracing support.
10992
10993 * linux-low.c (linux_remove_process): Delete.
10994 (add_lwp): Don't set last_resume_kind here.
10995 (linux_kill): Use `mourn'.
10996 (linux_detach): Use `thread_db_detach', and `mourn'.
10997 (linux_mourn): New.
10998 (linux_attach_lwp_1): Adjust comment.
10999 (linux_attach): last_resume_kind moved the thread_info; adjust.
11000 (status_pending_p_callback): Adjust.
11001 (linux_wait_for_event_1): Adjust.
11002 (count_events_callback, select_singlestep_lwp_callback)
11003 (select_event_lwp_callback, cancel_breakpoints_callback)
11004 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11005 (proceed_one_lwp): Adjust.
11006 (linux_async): Add debug output.
11007 (linux_thread_stopped): New.
11008 (linux_pause_all): New.
11009 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11010 linux_pause_all.
11011 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11012 (thread_db_free): Delete declaration.
11013 (thread_db_detach, thread_db_mourn): Declare.
11014 * thread-db.c (thread_db_init): Use thread_db_mourn.
11015 (thread_db_free): Delete, split in two.
11016 (disable_thread_event_reporting): New.
11017 (thread_db_detach): New.
11018 (thread_db_mourn): New.
11019
11020 * server.h (struct thread_info) <last_resume_kind>: New field.
11021 <attached>: Add comment.
11022 <gdb_detached>: New field.
11023 (handler_func): Change return type to int.
11024 (handle_serial_event, handle_target_event): Ditto.
11025 (gdb_connected): Declare.
11026 (tracing): Delete.
11027 (disconnected_tracing): Declare.
11028 (stop_tracing): Declare.
11029
11030 * server.c (handle_query) <qSupported>: Report support for
11031 disconnected tracing.
11032 (queue_stop_reply_callback): Account for running threads.
11033 (gdb_wants_thread_stopped): New.
11034 (gdb_wants_all_threads_stopped): New.
11035 (gdb_reattached_process): New.
11036 (handle_status): Clear the `gdb_detached' flag of all processes.
11037 In all-stop, stop all threads.
11038 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11039 (process_serial_event): If the remote connection breaks, or if an
11040 exit was forced with "monitor exit", force an event loop exit.
11041 Handle disconnected tracing on detach.
11042 (handle_serial_event): Adjust.
11043 (handle_target_event): If GDB isn't connected, forward events back
11044 to the inferior, unless the last process exited, in which case,
11045 exit gdbserver. Adjust interface.
11046
11047 * remote-utils.c (remote_open): Don't block in accept. Instead
11048 register an event loop source on the listen socket file
11049 descriptor. Refactor bits into ...
11050 (listen_desc): ... this new global.
11051 (gdb_connected): ... this new function.
11052 (enable_async_notification): ... this new function.
11053 (handle_accept_event): ... this new function.
11054 (remote_close): Clear remote_desc.
11055
11056 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11057
11058 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11059 New fields.
11060 (mourn_inferior): Define.
11061 (target_process_qsupported): Avoid the dangling else problem.
11062 (thread_stopped): Define.
11063 (pause_all): Define.
11064 (target_waitstatus_to_string): Declare.
11065 * target.c (target_waitstatus_to_string): New.
11066
11067 * tracepoint.c (tracing): Make extern.
11068 (disconnected_tracing): New.
11069 (stop_tracing): Make extern. Handle tracing stops due to GDB
11070 disconnecting.
11071 (cmd_qtdisconnected): New.
11072 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11073 (handle_tracepoint_general_set): Handle QTDisconnected.
11074
11075 * event-loop.c (event_handler_func): Change return type to int.
11076 (process_event): Bail out if the event handler wants the event
11077 loop to stop.
11078 (handle_file_event): Ditto.
11079 (start_event_loop): Bail out if the event handler wants the event
11080 loop to stop.
11081
11082 * nto-low.c (nto_target_ops): Adjust.
11083 * spu-low.c (spu_wait): Don't remove the process here.
11084 (spu_target_ops): Adjust.
11085 * win32-low.c (win32_wait): Don't remove the process here.
11086 (win32_target_ops): Adjust.
11087
5d267c4c
PA
110882010-04-11 Pedro Alves <pedro@codesourcery.com>
11089
11090 * regcache.c (realloc_register_cache): Invalidate inferior's
11091 regcache before recreating it.
11092
623ccd72
PA
110932010-04-09 Pedro Alves <pedro@codesourcery.com>
11094
11095 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11096
219f2f23
PA
110972010-04-09 Stan Shebs <stan@codesourcery.com>
11098 Pedro Alves <pedro@codesourcery.com>
11099
11100 * server.h (LONGEST): New.
11101 (struct thread_info) <while_stepping>: New field.
11102 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11103 Declare.
11104 (initialize_tracepoint, handle_tracepoint_general_set)
11105 (handle_tracepoint_query, tracepoint_finished_step)
11106 (tracepoint_was_hit, release_while_stepping_state_list):
11107 (current_traceframe): Declare.
11108 * server.c (handle_general_set): Handle tracepoint packets.
11109 (read_memory): New.
11110 (write_memory): New.
11111 (handle_search_memory_1): Use read_memory.
11112 (handle_query): Report support for conditional tracepoints, trace
11113 state variables, and tracepoint sources. Handle tracepoint
11114 queries.
11115 (main): Initialize the tracepoints module.
11116 (process_serial_event): Handle traceframe reads/writes.
11117
11118 * linux-low.c (handle_tracepoints): New.
11119 (linux_wait_1): Call it.
11120 (linux_resume_one_lwp): Handle while-stepping.
11121 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11122 (linux_target_ops): Install them.
11123 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11124 New field.
11125 * linux-x86-low.c (x86_supports_tracepoints): New.
11126 (the_low_target). Install it.
11127
11128 * mem-break.h (delete_breakpoint): Declare.
11129 * mem-break.c (delete_breakpoint): Make external.
11130
11131 * target.h (struct target_ops): Add `supports_tracepoints',
11132 `read_pc', and `write_pc' fields.
11133 (target_supports_tracepoints): Define.
11134 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11135 (phex_nz): New.
11136
11137 * regcache.h (struct regcache) <registers_owned>: New field.
11138 (init_register_cache, regcache_cpy): Declare.
11139 (regcache_read_pc, regcache_write_pc): Declare.
11140 (register_cache_size): Declare.
11141 (supply_regblock): Declare.
11142 * regcache.c (init_register_cache): New.
11143 (new_register_cache): Use it.
11144 (regcache_cpy): New.
11145 (register_cache_size): New.
11146 (supply_regblock): New.
11147 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11148
219f2f23
PA
11149 * tracepoint.c: New.
11150
11151 * Makefile.in (OBS): Add tracepoint.o.
11152 (tracepoint.o): New rule.
11153
3a13a53b
L
111542010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11155
11156 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11157 (i386-mmx.o): New.
11158 (i386-mmx.c): Likewise.
11159 (i386-mmx-linux.o): Likewise.
11160 (i386-mmx-linux.c): Likewise.
11161
11162 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11163 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11164 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11165 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11166
11167 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11168 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11169 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11170
1570b33e
L
111712010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11172
11173 * Makefile.in (clean): Updated.
11174 (i386-avx.o): New.
11175 (i386-avx.c): Likewise.
11176 (i386-avx-linux.o): Likewise.
11177 (i386-avx-linux.c): Likewise.
11178 (amd64-avx.o): Likewise.
11179 (amd64-avx.c): Likewise.
11180 (amd64-avx-linux.o): Likewise.
11181 (amd64-avx-linux.c): Likewise.
11182
11183 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11184 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11185 (srv_amd64_regobj): Add amd64-avx.o.
11186 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11187 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11188 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11189 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11190 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11191 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11192 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11193
11194 * i387-fp.c: Include "i386-xstate.h".
11195 (i387_xsave): New.
11196 (i387_cache_to_xsave): Likewise.
11197 (i387_xsave_to_cache): Likewise.
11198 (x86_xcr0): Likewise.
11199
11200 * i387-fp.h (i387_cache_to_xsave): Likewise.
11201 (i387_xsave_to_cache): Likewise.
11202 (x86_xcr0): Likewise.
11203
11204 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11205 * linux-crisv32-low.c (target_regsets): Likewise.
11206 * linux-m68k-low.c (target_regsets): Likewise.
11207 * linux-mips-low.c (target_regsets): Likewise.
11208 * linux-ppc-low.c (target_regsets): Likewise.
11209 * linux-s390-low.c (target_regsets): Likewise.
11210 * linux-sh-low.c (target_regsets): Likewise.
11211 * linux-sparc-low.c (target_regsets): Likewise.
11212 * linux-xtensa-low.c (target_regsets): Likewise.
11213
11214 * linux-low.c: Include <sys/uio.h>.
11215 (regsets_fetch_inferior_registers): Support nt_type.
11216 (regsets_store_inferior_registers): Likewise.
11217 (linux_process_qsupported): New.
11218 (linux_target_ops): Add linux_process_qsupported.
11219
11220 * linux-low.h (regset_info): Add nt_type.
11221 (linux_target_ops): Add process_qsupported.
11222
11223 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11224 and <sys/uio.h>.
11225 (init_registers_i386_avx_linux): New.
11226 (init_registers_amd64_avx_linux): Likewise.
11227 (xmltarget_i386_linux_no_xml): Likewise.
11228 (xmltarget_amd64_linux_no_xml): Likewise.
11229 (PTRACE_GETREGSET): Likewise.
11230 (PTRACE_SETREGSET): Likewise.
11231 (x86_fill_xstateregset): Likewise.
11232 (x86_store_xstateregset): Likewise.
11233 (use_xml): Likewise.
11234 (x86_linux_update_xmltarget): Likewise.
11235 (x86_linux_process_qsupported): Likewise.
11236 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11237 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11238 init_registers_i386_linux here. Call
11239 x86_linux_update_xmltarget.
11240 (the_low_target): Add x86_linux_process_qsupported.
11241
11242 * server.c (handle_query): Call target_process_qsupported.
11243
11244 * target.h (target_ops): Add process_qsupported.
11245 (target_process_qsupported): New.
11246
fc7238bb
PA
112472010-04-03 Pedro Alves <pedro@codesourcery.com>
11248
11249 * inferiors.c (add_thread): Set last_status kind to
11250 TARGET_WAITKIND_IGNORE.
11251 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11252 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11253 (linux_wait_1): Move `thread' local definition to block that uses
11254 it. Don't NULL initialize `event_child'.
11255 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11256 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11257 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11258
bdabb078
PA
112592010-04-01 Pedro Alves <pedro@codesourcery.com>
11260
11261 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11262 an extended waitstatus, or by a watchpoint.
11263 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11264 thread was stepping or has been stopped by a watchpoint.
11265
d3bbe7a0
PA
112662010-04-01 Pedro Alves <pedro@codesourcery.com>
11267
11268 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11269 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11270 of another, then delete the previous, and validate all
11271 breakpoints.
11272 (validate_inserted_breakpoint): New.
11273 (delete_disabled_breakpoints): New.
11274 (validate_breakpoints): New.
11275 (check_mem_read): Validate breakpoints before trusting their
11276 shadow. Delete disabled breakpoints.
11277 (check_mem_write): Validate breakpoints before trusting they
11278 should be inserted. Delete disabled breakpoints.
11279 * mem-break.h (validate_breakpoints):
11280 * server.c (handle_query): Validate breakpoints when we see a
11281 qSymbol query.
11282
8b07ae33
PA
112832010-04-01 Pedro Alves <pedro@codesourcery.com>
11284
11285 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11286 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11287 if we could tell there's a GDB breakpoint at stop_pc.
11288 (need_step_over_p): Don't do a step over if we find a GDB
11289 breakpoint at the resume PC.
11290
11291 * mem-break.c (struct raw_breakpoint): New.
11292 (enum bkpt_type): New type `gdb_breakpoint'.
11293 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11294 fields. New field `raw'.
11295 (find_raw_breakpoint_at): New.
11296 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11297 breakpoint instead.
11298 (set_breakpoint_at): Adjust.
11299 (delete_raw_breakpoint): New.
11300 (release_breakpoint): New.
11301 (delete_breakpoint): Rename to...
11302 (delete_breakpoint_1): ... this. Add proc parameter. Use
11303 release_breakpoint. Return ENOENT.
11304 (delete_breakpoint): Reimplement.
11305 (find_breakpoint_at): Delete.
11306 (find_gdb_breakpoint_at): New.
11307 (delete_breakpoint_at): Delete.
11308 (set_gdb_breakpoint_at): New.
11309 (delete_gdb_breakpoint_at): New.
11310 (gdb_breakpoint_here): New.
11311 (set_reinsert_breakpoint): Use release_breakpoint.
11312 (uninsert_breakpoint): Rename to ...
11313 (uninsert_raw_breakpoint): ... this.
11314 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11315 (reinsert_raw_breakpoint): Change parameter type to
11316 raw_breakpoint.
11317 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11318 instead.
11319 (check_breakpoints): Adjust. Use release_breakpoint.
11320 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11321 (breakpoint_inserted_here): Ditto.
11322 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11323 Don't trust the breakpoint's shadow if it is not inserted.
11324 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11325 (delete_all_breakpoints): Adjust.
11326 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11327 use delete_breakpoint_1.
11328
11329 * mem-break.h (breakpoints_supported): Delete declaration.
11330 (set_gdb_breakpoint_at): Declare.
11331 (gdb_breakpoint_here): Declare.
11332 (delete_breakpoint_at): Delete.
11333 (delete_gdb_breakpoint_at): Declare.
11334
11335 * server.h (struct raw_breakpoint): Forward declare.
11336 (struct process_info): New field `raw_breakpoints'.
11337
11338 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11339 breakpoints.
11340
6bf5e0ba
PA
113412010-03-24 Pedro Alves <pedro@codesourcery.com>
11342
11343 * linux-low.c (status_pending_p_callback): Fix comment.
11344 (linux_wait_for_event_1): Move most of the internal breakpoint
11345 handling from here...
11346 (linux_wait_1): ... to here.
11347 (count_events_callback): New.
11348 (select_singlestep_lwp_callback): New.
11349 (select_event_lwp_callback): New.
11350 (cancel_breakpoints_callback): New.
11351 (select_event_lwp): New.
11352 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11353 priority to all LWPs that have had events that should be reported
11354 to the client. Cancel breakpoints when about to reporting the
11355 event to the client, not while stopping lwps. No longer cancel
11356 finished single-steps here.
11357 (cancel_finished_single_step): Delete.
11358 (cancel_finished_single_steps): Delete.
11359
414a389f
PA
113602010-03-24 Pedro Alves <pedro@codesourcery.com>
11361
11362 * mem-break.c (enum bkpt_type): New.
11363 (struct breakpoint): New field `type'.
11364 (set_breakpoint_at): Change return type to struct breakpoint
11365 pointer. Set type to `other_breakpoint' by default.
11366 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11367 in the breakpoint list.
11368 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11369 (reinsert_breakpoint): Rename to ...
11370 (reinsert_raw_breakpoint): ... this.
11371 (reinsert_breakpoints_at): Adjust.
11372 * mem-break.h (struct breakpoint): Declare.
11373 (set_breakpoint_at): Change return type to struct breakpoint
11374 pointer.
11375
2280c721
PA
113762010-03-24 Pedro Alves <pedro@codesourcery.com>
11377
11378 * server.c (handle_query): Assign, not compare.
11379
d50171e4
PA
113802010-03-24 Pedro Alves <pedro@codesourcery.com>
11381
11382 Teach linux gdbserver to step-over-breakpoints.
11383
11384 * linux-low.c (can_hardware_single_step): New.
11385 (supports_breakpoints): New.
11386 (handle_extended_wait): If stopping threads, read the stop pc of
11387 the new cloned LWP.
11388 (get_pc): New.
11389 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11390 low target doesn't support retrieving the PC.
11391 (add_lwp): Set last_resume_kind to resume_continue.
11392 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11393 (linux_attach): Don't clear stop_expected. Set the lwp's
11394 last_resume_kind to resume_stop.
11395 (linux_detach_one_lwp): Don't check for removed breakpoints.
11396 (check_removed_breakpoint): Delete.
11397 (status_pending_p): Rename to ...
11398 (status_pending_p_callback): ... this. Don't check for removed
11399 breakpoints. Don't consider threads that are stopped from GDB's
11400 perspective.
11401 (linux_wait_for_lwp): Always read the stop_pc here.
11402 (cancel_breakpoint): New.
11403 (step_over_bkpt): New global.
11404 (linux_wait_for_event_1): Implement stepping over breakpoints.
11405 (gdb_wants_lwp_stopped): New.
11406 (gdb_wants_all_stopped): New.
11407 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11408 single-step traps here. Store the thread's last reported target
11409 wait status.
11410 (send_sigstop): Don't clear stop_expected. Always set it,
11411 instead.
11412 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11413 (cancel_finished_single_step): New.
11414 (cancel_finished_single_steps): New.
11415 (wait_for_sigstop): Don't cancel finished single-step traps here.
11416 (linux_resume_one_lwp): Don't check for removed breakpoints.
11417 Don't set `step' on non-hardware step archs.
11418 (linux_set_resume_request): Ignore resume_stop requests if already
11419 stopping or stopped. Set the lwp's last_resume_kind.
11420 (resume_status_pending_p): Don't check for removed breakpoints.
11421 (need_step_over_p): New.
11422 (start_step_over): New.
11423 (finish_step_over): New.
11424 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11425 requests. Clear the thread's last reported target waitstatus.
11426 Don't use the `suspended' flag. Don't consider pending breakpoints.
11427 (linux_resume): Start a step-over if necessary.
11428 (proceed_one_lwp): New.
11429 (proceed_all_lwps): New.
11430 (unstop_all_lwps): New.
11431 * linux-low.h (struct lwp_info): Rewrite comment for the
11432 `suspended' flag. Add the `stop_pc' field. Delete the
11433 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11434 Add `'last_resume_kind' and `need_step_over' fields.
11435 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11436 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11437 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11438 (set_raw_breakpoint_at): New.
11439 (set_breakpoint_at): Rewrite to use it.
11440 (reinsert_breakpoint_handler): Delete.
11441 (set_reinsert_breakpoint): New.
11442 (reinsert_breakpoint_by_bp): Delete.
11443 (delete_reinsert_breakpoints): New.
11444 (uninsert_breakpoint): Rewrite.
11445 (uninsert_breakpoints_at): New.
11446 (reinsert_breakpoint): Rewrite.
11447 (reinsert_breakpoints_at): New.
11448 (check_breakpoints): Rewrite.
11449 (breakpoint_here): New.
11450 (breakpoint_inserted_here): New.
11451 (check_mem_read): Adjust.
11452 * mem-break.h (breakpoints_supported, breakpoint_here)
11453 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11454 (reinsert_breakpoint_by_bp): Delete declaration.
11455 (delete_reinsert_breakpoints): Declare.
11456 (reinsert_breakpoint): Delete declaration.
11457 (reinsert_breakpoints_at): Declare.
11458 (uninsert_breakpoint): Delete declaration.
11459 (uninsert_breakpoints_at): Declare.
11460 (check_breakpoints): Adjust prototype.
11461 * server.h: Adjust include order.
11462 (struct thread_info): Declare here. Add a `last_status' field.
11463
30ba68cb
MS
114642010-03-23 Michael Snyder <msnyder@vmware.com>
11465
11466 * server.c (crc32): New function.
11467 (handle_query): Add handling for 'qCRC:' request.
11468
b9a881c2
PA
114692010-03-23 Pedro Alves <pedro@codesourcery.com>
11470
11471 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11472 lwp had been stopped by a watchpoint.
11473
e92d13d5
PA
114742010-03-16 Pedro Alves <pedro@codesourcery.com>
11475
11476 * server.h (internal_error): Declare.
11477 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11478 * utils.c (internal_error): New function.
11479
64daa791
AS
114802010-03-15 Andreas Schwab <schwab@redhat.com>
11481
11482 * configure.srv: Fix typo setting srv_regobj.
11483
f52cd8cd
PA
114842010-03-15 Pedro Alves <pedro@codesourcery.com>
11485
11486 * linux-low.c (fetch_register): Avoid passing a non string literal
11487 format to `error'.
11488 (usr_store_inferior_registers): Ditto.
11489
93ae6fdc
PA
114902010-03-14 Pedro Alves <pedro@codesourcery.com>
11491
11492 * linux-low.c (linux_write_memory): Bail out early if peeking
11493 memory failed.
11494
c3adc08c
PA
114952010-03-14 Pedro Alves <pedro@codesourcery.com>
11496
11497 * linux-low.h (struct lwp_info): New fields
11498 `stopped_by_watchpoint' and `stopped_data_address'.
11499 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11500 here, and cache them in the lwp object.
11501 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11502 directly.
11503 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11504 field.
11505 (linux_stopped_by_watchpoint): Rewrite.
11506 (linux_stopped_data_address): Rewrite.
11507
bce522a2
PA
115082010-03-06 Simo Melenius <simo.melenius@iki.fi>
11509
11510 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11511 switching the current inferior, not before.
11512
90884b2b
L
115132010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11514
11515 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11516 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11517 i386-linux.c and amd64-linux.c.
11518 (reg-i386.o): Removed.
11519 (reg-i386.c): Likewise.
11520 (reg-i386-linux.o): Likewise.
11521 (reg-i386-linux.c): Likewise.
11522 (reg-x86-64.o): Likewise.
11523 (reg-x86-64.c): Likewise.
11524 (reg-x86-64-linux.o): Likewise.
11525 (reg-x86-64-linux.c): Likewise.
11526 (i386.o): New.
11527 (i386.c): Likewise.
11528 (i386-linux.o): Likewise.
11529 (i386-linux.c): Likewise.
11530 (amd64.o): Likewise.
11531 (amd64.c): Likewise.
11532 (amd64-linux.o): Likewise.
11533 (amd64-linux.c): Likewise.
11534
11535 * configure.srv (srv_i386_regobj): New.
11536 (srv_i386_linux_regobj): Likewise.
11537 (srv_amd64_regobj): Likewise.
11538 (srv_amd64_linux_regobj): Likewise.
11539 (srv_i386_32bit_xmlfiles): Likewise.
11540 (srv_i386_64bit_xmlfiles): Likewise.
11541 (srv_i386_xmlfiles): Likewise.
11542 (srv_amd64_xmlfiles): Likewise.
11543 (srv_i386_linux_xmlfiles): Likewise.
11544 (srv_amd64_linux_xmlfiles): Likewise.
11545 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11546 srv_xmlfiles to $srv_i386_xmlfiles.
11547 (i[34567]86-*-mingw32ce*): Likewise.
11548 (i[34567]86-*-mingw*): Likewise.
11549 (i[34567]86-*-nto*): Likewise.
11550 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11551 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11552 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11553 (x86_64-*-linux*): Likewise.
11554
11555 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11556 (init_registers_amd64_linux): New.
11557 (x86_arch_setup): Replace init_registers_x86_64_linux with
11558 init_registers_amd64_linux.
11559
193f13e6
MK
115602010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11561
11562 * configure.ac: Check for libdl. If it is not available link against
11563 static libthread_db.
11564 * configure: Regenerate.
11565
85d721b8
PA
115662010-02-22 Pedro Alves <pedro@codesourcery.com>
11567
11568 PR9605
11569
11570 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11571 handing a read watchpoint.
11572 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11573
6076632b
DE
115742010-02-12 Doug Evans <dje@google.com>
11575
11576 * linux-low.c (linux_supports_tracefork_flag): Document.
11577 (linux_look_up_symbols): Add comment.
11578
3327ccf7
L
115792010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11580
11581 * regcache.c (supply_register): Clear regcache if buf is NULL.
11582
0718675c 115832010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11584 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11585
11586 * inferiors.c (find_inferior): Add function documentation.
11587 (unloaded_dll): Handle the case where the unloaded dll has not
11588 been previously registered in the dll list.
11589
177321bd
DJ
115902010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11593 (thumb2_breakpoint): New.
11594 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11595
2b009048
DJ
115962010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11597
11598 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11599 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11600 breakpoints.
11601
3be029c7
PA
116022010-01-21 Pedro Alves <pedro@codesourcery.com>
11603
11604 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11605
18f5de3b
JK
116062010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11607
11608 * linux-s390-low.c (s390_collect_ptrace_register)
11609 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11610
3743bb4f
DE
116112010-01-21 Doug Evans <dje@google.com>
11612
14ce3065
DE
11613 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11614 (PTRACE_ARG4_TYPE): New macro.
11615 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11616 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11617 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11618 (usr_store_inferior_registers): Ditto.
11619 (linux_read_memory, linux_write_memory): Ditto.
11620 (linux_test_for_tracefork): Ditto.
11621
3743bb4f
DE
11622 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11623 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11624
8b315be5
PA
116252010-01-21 Pedro Alves <pedro@codesourcery.com>
11626
11627 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11628 target.
11629
85492558
PA
116302010-01-21 Pedro Alves <pedro@codesourcery.com>
11631
11632 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11633 prototype to take a regcache. Adjust.
11634
442ea881
PA
116352010-01-20 Pedro Alves <pedro@codesourcery.com>
11636
11637 * regcache.h (struct thread_info): Forward declare.
11638 (struct regcache): New.
11639 (new_register_cache): Adjust prototype.
11640 (get_thread_regcache): Declare.
11641 (free_register_cache): Adjust prototype.
11642 (registers_to_string, registers_from_string): Ditto.
11643 (supply_register, supply_register_by_name, collect_register)
11644 (collect_register_as_string, collect_register_by_name): Ditto.
11645 * regcache.c (struct inferior_regcache_data): Delete.
11646 (get_regcache): Rename to ...
11647 (get_thread_regcache): ... this. Adjust. Switch inferior before
11648 fetching registers.
11649 (regcache_invalidate_one): Adjust.
11650 (regcache_invalidate): Fix prototype.
11651 (new_register_cache): Return the new register cache.
11652 (free_register_cache): Change prototype.
11653 (realloc_register_cache): Adjust.
11654 (registers_to_string): Change prototype to take a regcache. Adjust.
11655 (registers_from_string): Ditto.
11656 (register_data): Ditto.
11657 (supply_register): Ditto.
11658 (supply_register_by_name): Ditto.
11659 (collect_register): Ditto.
11660 (collect_register_as_string): Ditto.
11661 (collect_register_by_name): Ditto.
11662 * server.c (process_serial_event): Adjust.
11663 * linux-low.h (regset_fill_func, regset_store_func): Change
11664 prototype.
11665 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11666 Change prototype.
11667 * linux-low.c (get_stop_pc): Adjust.
11668 (check_removed_breakpoint): Adjust.
11669 (linux_wait_for_event): Adjust.
11670 (linux_resume_one_lwp): Adjust.
11671 (fetch_register): Add regcache parameter. Adjust.
11672 (usr_store_inferior_registers): Ditto.
11673 (regsets_fetch_inferior_registers): Ditto.
11674 (regsets_store_inferior_registers): Ditto.
11675 (linux_fetch_registers, linux_store_registers): Ditto.
11676 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11677 regcache. Adjust.
43aaf8b6
PA
11678 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11679 Ditto.
442ea881
PA
11680 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11681 prototype to take a regcache.
11682 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11683 * remote-utils.c (convert_ascii_to_int, outreg)
11684 (prepare_resume_reply): Change prototype to take a regcache.
11685 Adjust.
11686 * target.h (struct target_ops) <fetch_registers, store_registers>:
11687 Change prototype to take a regcache.
11688 (fetch_inferior_registers, store_inferior_registers): Change
11689 prototype to take a regcache. Adjust.
11690 * proc-service.c (ps_lgetregs): Adjust.
11691 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11692 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11693 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11694 take a regcache. Adjust.
11695 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11696 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11697 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11698 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11699 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11700 (cris_cannot_fetch_register):
11701 (cris_breakpoint_at): Change prototype to take a regcache.
11702 Adjust.
11703 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11704 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11705 to take a regcache. Adjust.
11706 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11707 Adjust.
11708 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11709 take a regcache. Adjust.
11710 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11711 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11712 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11713 * linux-mips-low.c (mips_get_pc):
11714 (mips_set_pc): Change prototype to take a regcache. Adjust.
11715 (mips_reinsert_addr): Adjust.
11716 (mips_collect_register): Change prototype to take a regcache.
11717 Adjust.
11718 (mips_supply_register):
11719 (mips_collect_register_32bit, mips_supply_register_32bit)
11720 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11721 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11722 * linux-ppc-low.c (ppc_supply_ptrace_register)
11723 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11724 (parse_spufs_run): Adjust.
11725 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11726 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11727 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11728 take a regcache. Adjust.
11729 * linux-s390-low.c (s390_collect_ptrace_register)
11730 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11731 (s390_set_pc): Change prototype to take a regcache. Adjust.
11732 (s390_arch_setup): Adjust.
11733 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11734 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11735 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11736 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11737 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11738 regcache. Adjust.
11739 (sparc_breakpoint_at): Adjust.
11740 * linux-xtensa-low.c (xtensa_fill_gregset):
11741 (xtensa_store_gregset):
11742 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11743 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11744 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11745 prototype to take a regcache. Adjust.
11746 * win32-arm-low.c (arm_fetch_inferior_register)
11747 (arm_store_inferior_register): Change prototype to take a
11748 regcache. Adjust.
11749 * win32-i386-low.c (i386_fetch_inferior_register)
11750 (i386_store_inferior_register): Change prototype to take a
11751 regcache. Adjust.
11752 * win32-low.c (child_fetch_inferior_registers)
11753 (child_store_inferior_registers): Change prototype to take a
11754 regcache. Adjust.
11755 (win32_wait): Adjust.
11756 (win32_fetch_inferior_registers): Change prototype to take a
11757 regcache. Adjust.
11758 (win32_store_inferior_registers): Adjust.
11759 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11760 store_inferior_register>: Change prototype to take a regcache.
11761
60c3d7b0
DE
117622010-01-20 Doug Evans <dje@google.com>
11763
11764 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11765 #ifdef.
11766 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11767 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11768
dc146f7c
VP
117692010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11770
11771 * linux-low.c (linux_core_of_thread): New.
11772 (compare_ints, show_process, list_threads): New.
11773 (linux_qxfer_osdata): Report threads and cores.
11774 (linux_target_op): Register linux_core_of_thread.
11775 * remote-utils.c (prepare_resume_reply): Report the core.
11776 (buffer_xml_printf): Support %d specifier.
11777 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11778 New.
11779 (handle_query): Handle qXfer:threads. Announce availability
11780 thereof.
11781 * target.h (struct target_ops): New field core_of_thread.
11782
7803799a
UW
117832010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11784
11785 * Makefile.in (clean): Remove new generated files.
11786 (reg-s390.o, reg-s390.c): Remove rules.
11787 (reg-s390x.o, reg-s390x.c): Likewise.
11788 (s390-linux32.o, s390-linux32.c): Add rules.
11789 (s390-linux64.o, s390-linux64.c): Likewise.
11790 (s390x-linux64.o, s390x-linux64.c): Likewise.
11791 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11792 * linux-s390-low.c: Include <elf.h>.
11793 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11794 (init_registers_s390): Remove prototype.
11795 (init_registers_s390x): Likewise.
11796 (init_registers_s390_linux32): Add prototype.
11797 (init_registers_s390_linux64): Likewise.
11798 (init_registers_s390x_linux64): Likewise.
11799 (s390_num_regs_3264): New define.
11800 (s390_regmap_3264): New global variable.
11801 (s390_cannot_fetch_register): Remove obsolete check.
11802 (s390_cannot_store_register): Likewise.
11803 (s390_collect_ptrace_register): Handle upper/lower register halves.
11804 (s390_supply_ptrace_register): Likewise.
11805 (s390_fill_gregset): Update to register number changes.
11806 (s390_get_hwcap): New routine.
11807 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11808 Install appropriate regmap and register set.
11809
6e7ffa39
JB
118102010-01-01 Joel Brobecker <brobecker@adacore.com>
11811
11812 * server.c (gdbserver_version): Update copyright year to 2010.
11813 * gdbreplay.c (gdbreplay_version): Likewise.
11814
957f3f49
DE
118152009-12-28 Doug Evans <dje@google.com>
11816
11817 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11818 elf/external.h. Include <elf.h> instead but only if necessary.
11819
ca5c370d
PA
118202009-12-28 Pedro Alves <pedro@codesourcery.com>
11821
11822 * linux-low.c (linux_remove_process): Remove `detaching'
11823 parameter. Don't release/detach from thread_db here.
11824 (linux_kill): Release/detach from thread_db here, ...
11825 (linux_detach): ... and here, before actually detaching.
11826 (linux_wait_1): ... and here, when a process exits.
11827 * thread-db.c (any_thread_of): New.
11828 (thread_db_free): Switch the current inferior to a thread of the
11829 passed in process.
11830
4ee62156
DE
118312009-12-21 Doug Evans <dje@google.com>
11832
d90e6a88
DE
11833 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11834
c5f62d5f
DE
11835 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11836 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11837 warning ifndef __NR_tkill. Move setting of errno there too.
11838 Delete unnecessary resetting of errno after syscall.
11839 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11840
10e86dd7
DE
11841 * configure.ac: Check for dladdr.
11842 * config.in: Regenerate.
11843 * configure: Regenerate.
11844 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11845 (try_thread_db_load): Update.
11846
4ee62156
DE
11847 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11848
00f515da
DE
118492009-12-18 Doug Evans <dje@google.com>
11850
e9464885
DE
11851 * event-loop.c: Include unistd.h if it exists.
11852
07d4f67e
DE
11853 * linux-low.c (my_waitpid): Move definition away from being in
11854 between linux_tracefork_child/linux_test_for_tracefork.
11855
00f515da
DE
11856 * gdb_proc_service.h (psaddr_t): Fix type.
11857 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11858 signature to match glibc.
11859
1de1badb
DE
118602009-12-16 Doug Evans <dje@google.com>
11861
11862 * linux-low.c (linux_read_memory): Fix argument to read.
11863
aeeb81d1
PA
118642009-11-26 Pedro Alves <pedro@codesourcery.com>
11865
11866 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11867 events, don't leave current_inferior pointing at null.
11868
10357975
PA
118692009-11-26 Pedro Alves <pedro@codesourcery.com>
11870
11871 * win32-low.c (LOG): Delete.
11872 (OUTMSG): Output to stderr.
11873 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11874 on compile time LOG macro.
11875 (win32_wait): Fix debug output.
11876
cf6e3471
PA
118772009-11-26 Pedro Alves <pedro@codesourcery.com>
11878
11879 * win32-low.c (win32_add_one_solib): If the dll name is
11880 "ntdll.dll", prepend the system directory to the dll path.
11881
0c85e18e
MK
118822009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11883
11884 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11885
9ac544ce 118862009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11887 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11888
11889 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11890 * configure.ac: Check for __mcoldfire__ and set
11891 gdb_cv_m68k_is_coldfire.
11892 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11893 reg-cf.o and reg-m68k.o.
11894 * configure: Regenerated.
11895
fd7dd3e6
PA
118962009-11-16 Pedro Alves <pedro@codesourcery.com>
11897
11898 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11899 Pass it to thread_db_free.
11900 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11901 proper `detaching' argument to linux_remove_process.
11902 * linux-low.h (thread_db_free): Add `detaching' parameter.
11903 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11904 to thread_db_free.
11905 (thread_db_free): Add `detaching' parameter. Only
11906 call td_ta_clear_event if detaching from process.
11907
75aa492e
MK
119082009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11909
11910 * thread-db.c (thread_db_free): Fix typo.
11911
21e1bee4
PP
119122009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11913
11914 PR gdb/10838
11915 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11916
8838b45e
NS
119172009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11918
11919 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11920 with an i686 compiler.
11921 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11922 needed.
11923 * configure: Rebuilt.
11924
8a35fb51
SL
119252009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11926
11927 PR gdb/10783
11928
11929 * server.c (handle_search_memory_1): Correct read_addr initialization
11930 in loop for searching subsequent chunks.
11931
96f15937
PP
119322009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11933
11934 * configure.ac: New --with-libthread-db option.
11935 * thread-db.c: Allow direct dependence on libthread_db.
11936 (thread_db_free): Adjust.
11937 * config.in: Regenerate.
11938 * configure: Likewise.
889bf7c5 11939
5f7d1694
PP
119402009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11941
11942 PR gdb/10757
11943 * thread-db.c (attach_thread): New function.
11944 (maybe_attach_thread): Return success/failure.
11945 (find_new_threads_callback): Adjust.
889bf7c5
PA
11946 (thread_db_find_new_threads): Loop until no new threads.
11947
88e3b899
PA
119482009-10-13 Pedro Alves <pedro@codesourcery.com>
11949
11950 * proc-service.c (ps_lgetregs): Formatting.
11951
cdbfd419
PP
119522009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11953
11954 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11955 * configure.ac: Adjust.
11956 * linux-low.h (struct process_info_private): Move members to struct
11957 thread_db.
11958 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11959 * linux-low.c (linux_remove_process): Adjust.
11960 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11961 * server.c (handle_query): Move code ...
11962 (handle_monitor_command): ... here. New function.
11963 * target.h (struct target_ops): New member.
11964 * thread-db.c (struct thread_db): New.
11965 (libthread_db_search_path): New variable.
11966 (thread_db_create_event, thread_db_enable_reporting)
11967 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11968 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11969 (try_thread_db_load_1, dladdr_to_soname): New functions.
11970 (try_thread_db_load, thread_db_load_search): New functions.
11971 (thread_db_init): Search for libthread_db.
11972 (thread_db_free): New function.
11973 (thread_db_handle_monitor_command): Likewise.
11974 * config.in: Regenerate.
11975 * configure: Regenerate.
889bf7c5 11976
4168d2d6
UW
119772009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11978
11979 * spu-low.c (spu_kill): Wait for inferior to terminate.
11980 Call clear_inferiors.
11981 (spu_detach): Call clear_inferiors.
11982
81ecdfbb
RW
119832009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11984
11985 * aclocal.m4: Regenerate.
11986 * config.in: Likewise.
11987 * configure: Likewise.
11988
0b9ff2c0
UW
119892009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11990
11991 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11992 (parse_spufs_run): New function.
11993 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11994 (ppc_breakpoint_at): Handle SPU breakpoints.
11995
efcbbd14
UW
119962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11997
11998 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11999 (SPUFS_MAGIC): Define.
12000 (spu_enumerate_spu_ids): New function.
12001 (linux_qxfer_spu): New function.
12002 (linux_target_ops): Install linux_qxfer_spu.
12003
f4d9bade
UW
120042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12005
12006 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12007 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12008 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12009 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12010 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12011 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12012 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12013 (init_registers_powerpc_cell32l): Add prototype.
12014 (init_registers_powerpc_cell64l): Likewise.
12015 (ppc_arch_setup): Detect Cell/B.E. architecture.
12016
96e946ca
RW
120172009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12018
12019 * Makefile.in (datarootdir): New variable.
12020
58d6951d
DJ
120212009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12022
12023 * linux-low.c (linux_write_memory): Update debugging output.
12024 * Makefile.in (clean): Add new descriptions.
12025 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12026 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12027 * configure.srv: Add new files for arm*-*-linux*.
12028 * linux-arm-low.c: Add new declarations.
12029 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12030 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12031 (HWCAP_VFPv3D16): New.
12032 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12033 instead of __IWMMXT__.
12034 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12035 (arm_arch_setup): New.
12036 (target_regsets): Remove #ifdef. Add VFP regset.
12037 (the_low_target): Use arm_arch_setup.
12038
12b42a12
DJ
120392009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12040
12041 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12042 the main thread again.
12043
ac8c974e
AR
120442009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12045
12046 Adding Neutrino gdbserver.
12047 * configure: Regenerated.
12048 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12049 * configure.srv (i[34567]86-*-nto*): New target.
12050 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12051 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12052 (nto_comctrl) [__QNX__]: New function.
12053 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12054
4424e0c3 120552009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12056
12057 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12058 srv_tgtobj.
12059
912cf4ba
PA
120602009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12061 Pedro Alves <pedro@codesourcery.com>
12062
12063 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12064 don't support CONTEXT_EXTENDED_REGISTERS.
12065 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12066 (the_low_target): Install them.
12067 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12068 failing with ERROR_PIPE_NOT_CONNECTED.
12069
aa5ca48f
DE
120702009-06-30 Doug Evans <dje@google.com>
12071 Pierre Muller <muller@ics.u-strasbg.fr>
12072
12073 Add h/w watchpoint support to x86-linux, win32-i386.
12074 * Makefile.in (SFILES): Add i386-low.c
12075 (i386_low_h): Define.
12076 (i386-low.o): Add dependencies.
12077 (linux-x86-low.o): Add i386-low.h dependency.
12078 (win32-i386-low.o): Ditto.
12079 * i386-low.c: New file.
12080 * i386-low.h: New file.
12081 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12082 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12083 * linux-low.c (linux_add_process): Initialize arch_private.
12084 (linux_remove_process): Free arch_private.
12085 (add_lwp): Initialize arch_private.
12086 (delete_lwp): Free arch_private.
12087 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12088 provided.
12089 * linux-low.h (process_info_private): New member arch_private.
12090 (lwp_info): New member arch_private.
12091 (linux_target_ops): New members new_process, new_thread,
12092 prepare_to_resume.
12093 (ptid_of): New macro.
12094 * linux-x86-low.c: Include stddef.h, i386-low.h.
12095 (arch_process_info): New struct.
12096 (arch_lwp_info): New struct.
12097 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12098 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12099 (i386_dr_low_get_status): New function.
12100 (x86_insert_point, x86_remove_point): New functions.
12101 (x86_stopped_by_watchpoint): New function.
12102 (x86_stopped_data_address): New function.
12103 (x86_linux_new_process, x86_linux_new_thread): New functions.
12104 (x86_linux_prepare_to_resume): New function.
12105 (the_low_target): Add entries for insert_point, remove_point,
12106 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12107 prepare_to_resume.
12108 * server.c (debug_hw_points): New global.
12109 (monitor_show_help): Document set debug-hw-points.
12110 (handle_query): Process "set debug-hw-points".
12111 * server.h (debug_hw_points): Declare.
12112 (paddress): Declare.
12113 * utils.c (NUMCELLS, CELLSIZE): New macros.
12114 (get_sell, xsnprintf, paddress): New functions.
12115 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12116 remove_point, stopped_by_watchpoint, stopped_data_address.
12117 * win32-i386-low.c: Include i386-low.h.
12118 (debug_reg_state): Replaces dr.
12119 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12120 (i386_dr_low_get_status): New function.
12121 (i386_insert_point, i386_remove_point): New functions.
12122 (i386_stopped_by_watchpoint): New function.
12123 (i386_stopped_data_address): New function.
12124 (i386_initial_stuff): Update.
12125 (get_thread_context,set_thread_context,i386_thread_added): Update.
12126 (the_low_target): Add entries for insert_point,
12127 remove_point, stopped_by_watchpoint, stopped_data_address.
12128 * win32-low.c (win32_insert_watchpoint): New function.
12129 (win32_remove_watchpoint): New function.
12130 (win32_stopped_by_watchpoint): New function.
12131 (win32_stopped_data_address): New function.
12132 (win32_target_ops): Add entries for insert_watchpoint,
12133 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12134 * win32-low.h (win32_target_ops): New members insert_point,
12135 remove_point, stopped_by_watchpoint, stopped_data_address.
12136
d993e290
PA
121372009-06-25 Pedro Alves <pedro@codesourcery.com>
12138
12139 * server.c (process_serial_event): Re-return unsupported, not
12140 error, if the type isn't recognized. Re-allow supporting only
12141 insert or remove packets. Also call require_running for
12142 breakpoints. Add missing break statement to default case. Tidy.
12143 * target.h (struct target_ops): Rename insert_watchpoint to
12144 insert_point, and remove_watchpoint to remove_point.
12145
12146 * linux-low.h (struct linux_target_ops): Likewise.
12147 * linux-low.c (linux_insert_watchpoint): Rename to ...
12148 (linux_insert_point): ... this. Adjust.
12149 (linux_remove_watchpoint): Rename to ...
12150 (linux_remove_point): ... this. Adjust.
12151 (linux_target_ops): Adjust.
12152 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12153 (cris_insert_point): ... this.
12154 (cris_remove_watchpoint): Rename to ...
12155 (cris_remove_point): ... this.
12156 (the_low_target): Adjust.
12157
0f54c268
PM
121582009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12159
12160 * server.c (handle_v_kill): Pass signal_pid to
12161 kill_inferior if multi_process is zero.
12162
c6314022
AR
121632009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12164
12165 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12166 * target.h (target_ops): Comment for *_watchpoint to make it clear
12167 the functions can get types '0' and '1'.
12168
4463ce24
AR
121692009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12170
12171 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12172 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12173 * regcache.c (get_regcache): Likewise.
12174 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12175 * win32-low.c (child_fetch_inferior_registers): Remove check for
12176 regno 0.
12177
cf8fd78b
PA
121782009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12179 Pedro Alves <pedro@codesourcery.com>
12180
12181 * target.h (struct target_ops) <supports_multi_process>: New
12182 callback.
12183 (target_supports_multi_process): New.
12184 * server.c (handle_query): Even if GDB reports support, only
12185 enable multi-process if the target also supports it. Report
12186 multi-process support only if the target backend supports it.
12187 * linux-low.c (linux_supports_multi_process): New function.
12188 (linux_target_ops): Install it as target_supports_multi_process
12189 callback.
12190
47c0c975
DE
121912009-05-24 Doug Evans <dje@google.com>
12192
e09875d4
DE
12193 Global renaming of find_thread_pid to find_thread_ptid.
12194 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12195 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12196 All callers updated.
12197
e27d73f6
DE
12198 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12199 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12200 directly.
12201
47c0c975
DE
12202 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12203 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12204 (linux_resume_one_lwp): Ditto.
12205
2acc282a
DE
122062009-05-23 Doug Evans <dje@google.com>
12207
12208 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12209 from struct inferior_list_entry * to struct lwp_info *.
12210 All callers updated.
12211
9f1036c1
DE
122122009-05-13 Doug Evans <dje@google.com>
12213
12214 * linux-x86-low.c: Don't include assert.h.
12215 (x86_siginfo_fixup): Use fatal, not assert.
12216 (x86_arch_setup): Fix comment.
12217
d0722149
DE
122182009-05-12 Doug Evans <dje@google.com>
12219
12220 Biarch support for i386/amd64 gdbserver.
12221 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12222 Add linux-x86-low.c.
12223 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12224 (linux-x86-low.o): Add.
12225 * linux-x86-64-low.c: Delete.
12226 * linux-i386-low.c: Delete.
12227 * linux-x86-low.c: New file.
12228 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12229 linux-x86-low.o.
12230 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12231 linux-x86-low.o.
12232 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12233 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12234 (linux_child_pid_to_exec_file): New function.
12235 (elf_64_header_p, elf_64_file_p): New functions.
12236 (siginfo_fixup): New function.
12237 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12238 give target a chance to convert layout.
12239 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12240 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12241
fdeb2a12
DE
122422009-05-07 Doug Evans <dje@google.com>
12243
12244 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12245 (regsets_store_inferior_registers): Ditto.
12246
a6dbe5df
PA
122472009-05-06 Pedro Alves <pedro@codesourcery.com>
12248
12249 PR server/10048
12250
12251 * linux-low.c (must_set_ptrace_flags): Delete.
12252 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12253 of the global.
12254 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12255 `lwp->must_set_ptrace_flags' instead.
ba42693b 12256 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12257 (linux_wait_1): ... not here.
12258
5091eb23
DE
122592009-04-30 Doug Evans <dje@google.com>
12260
9f767825
DE
12261 * inferiors.c (started_inferior_callback): New function.
12262 (attached_inferior_callback): New function.
12263 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12264 * server.c (print_started_pid, print_attached_pid): New functions.
12265 (detach_or_kill_for_exit): New function.
12266 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12267 * server.h (have_started_inferiors_p): Declare.
12268 (have_attached_inferiors_p): Declare.
12269
5091eb23
DE
12270 * inferiors.c (remove_process): Fix memory leak, free process.
12271 * linux-low.c (linux_remove_process): New function.
12272 (linux_kill): Call it instead of remove_process.
12273 (linux_detach, linux_wait_1): Ditto.
12274
155c8968
PA
122752009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12276
12277 * configure.srv: Add x86 Windows CE target.
12278
7fe519cb
UW
122792009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12280
12281 * inferiors.c (get_thread_process): Make global.
12282 * server.h (get_thread_process): Add prototype.
12283 * thread-db.c (find_one_thread): Use get_thread_process
12284 instead of current_process.
12285 (thread_db_get_tls_address): Do not crash if called when
12286 thread layer is not yet initialized.
12287
5472f405
UW
122882009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12289
12290 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12291 * spu-low.c (current_tid): Rename to ...
12292 (current_ptid): ... this.
12293 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12294 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12295 ptid_get_lwp (current_ptid) instead of current_tid.
12296 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12297 instead of current_tid. Use find_process_pid to verify pid
12298 argument is valid. Pass proper argument to remove_process.
12299 (spu_thread_alive): Compare current_ptid instead of current_tid.
12300 (spu_resume): Likewise.
12301
55ac2b99
PA
123022009-04-02 Pedro Alves <pedro@codesourcery.com>
12303
12304 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12305 variable.
12306
95954743
PA
123072009-04-01 Pedro Alves <pedro@codesourcery.com>
12308
12309 Implement the multiprocess extensions, and add linux multiprocess
12310 support.
12311
12312 * server.h (ULONGEST): Declare.
12313 (struct ptid, ptid_t): New.
12314 (minus_one_ptid, null_ptid): Declare.
12315 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12316 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12317 (struct inferior_list_entry): Change `id' type from unsigned from
12318 to ptid_t.
12319 (struct sym_cache, struct breakpoint, struct
12320 process_info_private): Forward declare.
12321 (struct process_info): Declare.
12322 (current_process): Declare.
12323 (all_processes): Declare.
12324 (initialize_inferiors): Declare.
12325 (add_thread): Adjust to use ptid_t.
12326 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12327 (add_process, remove_process, find_thread_pid): Declare.
12328 (find_inferior_id): Adjust to use ptid_t.
12329 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12330 (multi_process): Declare.
12331 (push_event): Adjust to use ptid_t.
12332 (read_ptid, write_ptid): Declare.
12333 (prepare_resume_reply): Adjust to use ptid_t.
12334 (clear_symbol_cache): Declare.
12335 * inferiors.c (all_processes): New.
12336 (null_ptid, minus_one_ptid): New.
12337 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12338 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12339 (add_thread): Change unsigned long to ptid. Remove gdb_id
12340 parameter. Adjust.
12341 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12342 (gdb_id_to_thread): Rename to ...
12343 (find_thread_pid): ... this. Change unsigned long to ptid.
12344 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12345 (loaded_dll, pull_pid_from_list): Adjust.
12346 (add_process, remove_process, find_process_pid)
12347 (get_thread_process, current_process, initialize_inferiors): New.
12348 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12349 (struct target_waitstatus) <related_pid>: Ditto.
12350 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12351 return type to int.
12352 (struct target_ops) <join>: Add `pid' argument.
12353 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12354 (struct target_ops) <wait>: Add `ptid' field. Change return type
12355 to ptid.
12356 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12357 (mywait): Add `ptid' argument. Change return type to ptid_t.
12358 (target_pid_to_str): Declare.
12359 * target.c (set_desired_inferior): Adjust to use ptids.
12360 (mywait): Add new `ptid' argument. Adjust.
12361 (target_pid_to_str): New.
12362 * mem-break.h (free_all_breakpoints): Declare.
12363 * mem-break.c (breakpoints): Delelete.
12364 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12365 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12366 to use per-process breakpoint list.
12367 (free_all_breakpoints): New.
12368 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12369 (symbol_cache, all_symbols_looked_up): Delete.
12370 (hexchars): New.
12371 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12372 read_ptid): New.
12373 (prepare_resume_reply): Change ptid argument's type from unsigned
12374 long to ptid_t. Adjust. Implement W;process and X;process.
12375 (free_sym_cache, clear_symbol_cache): New.
12376 (look_up_one_symbol): Adjust to per-process symbol cache. *
12377 * server.c (cont_thread, general_thread, step_thread): Change type
12378 to ptid_t.
12379 (attached): Delete.
12380 (multi_process): New.
12381 (last_ptid): Change type to ptid_t.
12382 (struct vstop_notif) <ptid>: Change type to ptid_t.
12383 (queue_stop_reply, push_event): Change `ptid' argument's type to
12384 ptid_t.
12385 (discard_queued_stop_replies): Add `pid' argument.
12386 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12387 changes. Don't reference the `attached' global.
12388 (attach_inferior): Adjust to mywait interface changes.
12389 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12390 features. Handle and report "multiprocess+". Handle
12391 "qAttached:PID".
12392 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12393 changes.
12394 (handle_v_kill): New.
12395 (handle_v_stopped): Adjust to use target_pid_to_str.
12396 (handle_v_requests): Allow multiple attaches and runs when
12397 multiprocess extensions are in effect. Handle "vKill".
12398 (myresume): Adjust to use ptids.
12399 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12400 (handle_status): Adjust to discard_queued_stop_replies interface
12401 change.
12402 (first_thread_of, kill_inferior_callback)
12403 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12404 (main): Call initialize_inferiors. Adjust to use ptids, killing
12405 and detaching from all inferiors. Handle multiprocess packet
12406 variants.
12407 * linux-low.h: Include gdb_proc_service.h.
12408 (struct process_info_private): New.
12409 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12410 <lwpid_of>: Use ptid_get_lwp.
12411 (get_lwp_thread): Adjust.
12412 (struct lwp_info): Add `dead' member.
12413 (find_lwp_pid): Declare.
12414 * linux-low.c (thread_db_active): Delete.
12415 (new_inferior): Adjust comment.
12416 (inferior_pid): Delete.
12417 (linux_add_process): New.
12418 (handle_extended_wait): Adjust.
12419 (add_lwp): Change unsigned long to ptid.
12420 (linux_create_inferior): Add process to processes table. Adjust
12421 to use ptids. Don't set new_inferior here.
12422 (linux_attach_lwp): Rename to ...
12423 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12424 it. Adjust to use ptids.
12425 (linux_attach_lwp): New.
12426 (linux_attach): Add process to processes table. Don't set
12427 new_inferior here.
12428 (struct counter): New.
12429 (second_thread_of_pid_p, last_thread_of_process_p): New.
12430 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12431 multiple processes.
12432 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12433 processes. Remove process from process table.
12434 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12435 to multiple processes.
12436 (any_thread_of): New.
12437 (linux_detach): Add `pid' argument, and handle it. Remove process
12438 from processes table.
12439 (linux_join): Add `pid' argument. Handle it.
12440 (linux_thread_alive): Change unsighed long argument to ptid_t.
12441 Consider dead lwps as not being alive.
12442 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12443 threads we're not interested in.
12444 (same_lwp, find_lwp_pid): New.
12445 (linux_wait_for_lwp): Change `pid' argument's type from int to
12446 ptid_t. Adjust.
12447 (linux_wait_for_event): Rename to ...
12448 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12449 from int to ptid_t. Adjust.
12450 (linux_wait_for_event): New.
12451 (linux_wait_1): Add `ptid' argument. Change return type to
12452 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12453 that exit from the process table.
12454 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12455 Adjust.
12456 (mark_lwp_dead): New.
12457 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12458 stopping all threads, mark its main lwp as dead.
12459 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12460 ptids.
12461 (fetch_register, usr_store_inferior_registers)
12462 (regsets_fetch_inferior_registers)
12463 (regsets_store_inferior_registers, linux_read_memory)
12464 (linux_write_memory): Inline `inferior_pid'.
12465 (linux_look_up_symbols): Adjust to use per-process
12466 `thread_db_active'.
12467 (linux_request_interrupt): Adjust to use ptids.
12468 (linux_read_auxv): Inline `inferior_pid'.
12469 (initialize_low): Don't reference thread_db_active.
12470 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12471 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12472 (ps_getpid): Return the pid of the current inferior.
12473 * thread-db.c (proc_handle, thread_agent): Delete.
12474 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12475 per-process data.
12476 (find_one_thread): Change argument type to ptid_t. Adjust to
12477 per-process data.
12478 (maybe_attach_thread): Adjust to per-process data and ptids.
12479 (thread_db_find_new_threads): Ditto.
12480 (thread_db_init): Ditto.
12481 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12482 processes table. Adjust to use ptids.
12483 (spu_kill, spu_detach): Adjust interface. Remove process from
12484 processes table.
12485 (spu_join, spu_thread_alive): Adjust interface.
12486 (spu_wait): Adjust interface. Remove process from processes
12487 table. Adjust to use ptids.
12488 * win32-low.c (current_inferior_tid): Delete.
12489 (current_inferior_ptid): New.
12490 (debug_event_ptid): New.
12491 (thread_rec): Take a ptid. Adjust.
12492 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12493 (child_delete_thread): Ditto.
12494 (do_initial_child_stuff): Add `attached' argument. Add process to
12495 processes table.
12496 (child_fetch_inferior_registers, child_store_inferior_registers):
12497 Adjust.
12498 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12499 (win32_attach): Pass 1 to do_initial_child_stuff.
12500 (win32_kill): Adjust interface. Remove process from processes
12501 table.
12502 (win32_detach): Ditto.
12503 (win32_join): Adjust interface.
12504 (win32_thread_alive): Take a ptid.
12505 (win32_resume): Adjust to use ptids.
12506 (get_child_debug_event): Ditto.
12507 (win32_wait): Adjust interface. Remove exiting process from
12508 processes table.
12509
bd99dc85
PA
125102009-04-01 Pedro Alves <pedro@codesourcery.com>
12511
12512 Non-stop mode support.
12513
12514 * server.h (non_stop): Declare.
12515 (gdb_client_data, handler_func): Declare.
12516 (delete_file_handler, add_file_handler, start_event_loop):
12517 Declare.
12518 (handle_serial_event, handle_target_event, push_event)
12519 (putpkt_notif): Declare.
12520 * target.h (enum resume_kind): New.
12521 (struct thread_resume): Replace `step' field by `kind' field.
12522 (TARGET_WNOHANG): Define.
12523 (struct target_ops) <wait>: Add `options' argument.
12524 <supports_non_stop, async, start_non_stop>: New fields.
12525 (target_supports_non_stop, target_async): New.
12526 (start_non_stop): Declare.
12527 (mywait): Add `options' argument.
12528 * target.c (mywait): Add `options' argument. Print child exit
12529 notifications here.
12530 (start_non_stop): New.
12531 * server.c (non_stop, own_buf, mem_buf): New globals.
12532 (struct vstop_notif): New.
12533 (notif_queue): New global.
12534 (queue_stop_reply, push_event, discard_queued_stop_replies)
12535 (send_next_stop_reply): New.
12536 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12537 interface changes.
12538 (attach_inferior): In non-stop mode, don't wait for the target
12539 here.
12540 (handle_general_set): Handle QNonStop.
12541 (handle_query): When handling qC, return the current general
12542 thread, instead of the first thread of the list.
12543 (handle_query): If the backend supports non-stop mode, include
12544 QNonStop+ in the qSupported query response.
12545 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12546 and non-stop mode.
12547 (handle_v_attach, handle_v_run): Handle non-stop mode.
12548 (handle_v_stopped): New.
12549 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12550 (myresume): Adjust to use resume_kind. Handle non-stop.
12551 (queue_stop_reply_callback): New.
12552 (handle_status): Handle non-stop mode.
12553 (main): Clear non_stop flag on reconnection. Use the event-loop.
12554 Refactor serial protocol handling from here ...
12555 (process_serial_event): ... to this new function. When GDB
12556 selects any thread, select one here. In non-stop mode, wait until
12557 GDB acks all pending events before exiting.
12558 (handle_serial_event, handle_target_event): New.
12559 * remote-utils.c (remote_open): Install remote_desc in the event
12560 loop.
12561 (remote_close): Remove remote_desc from the event loop.
12562 (putpkt_binary): Rename to...
12563 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12564 (putpkt_binary): New as wrapper around putpkt_binary_1.
12565 (putpkt_notif): New.
12566 (prepare_resume_reply): In non-stop mode, don't change the
12567 general_thread.
12568 * event-loop.c: New.
12569 * Makefile.in (OBJ): Add event-loop.o.
12570 (event-loop.o): New rule.
12571
12572 * linux-low.h (pid_of): Moved here.
12573 (lwpid_of): New.
12574 (get_lwp_thread): Use lwpid_of.
12575 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12576 * linux-low.c (pid_of): Delete.
12577 (inferior_pid): Use lwpid_of.
12578 (linux_event_pipe): New.
12579 (target_is_async_p): New.
12580 (delete_lwp): New.
12581 (handle_extended_wait): Use lwpid_of.
12582 (add_lwp): Don't set lwpid field.
12583 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12584 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12585 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12586 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12587 first. Adjust to linux_wait_for_event interface changes. Use
12588 lwpid_of.
12589 (linux_detach): Don't delete the main lwp here.
12590 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12591 (status_pending_p): Don't consider explicitly suspended lwps.
12592 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12593 pointer. Add OPTIONS argument. Change return type to int. Use
12594 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12595 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12596 pointer. Add status pointer argument. Return a pid instead of a
12597 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12598 changes. In non-stop mode, don't switch to a random thread.
12599 (linux_wait): Rename to...
12600 (linux_wait_1): ... this. Add target_options argument, and handle
12601 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12602 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12603 clean exit and signal exit code. Don't stop all threads in
12604 non-stop mode. In all-stop mode, only stop all threads when
12605 reporting a stop to GDB. Handle explicit thread stop requests.
12606 (async_file_flush, async_file_mark): New.
12607 (linux_wait): New.
12608 (send_sigstop): Use lwpid_of.
12609 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12610 interface changes. In non-stop mode, don't switch to a random
12611 thread.
12612 (linux_resume_one_lwp): Use lwpid_of.
12613 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12614 (linux_resume_one_thread): ... this. Handle resume_stop. In
12615 non-stop mode, don't look for pending flag in all threads.
12616 (resume_status_pending_p): Don't consider explicitly suspended
12617 threads.
12618 (my_waitpid): Reimplement. Emulate __WALL.
12619 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12620 Use lwpid_of.
12621 (sigchld_handler, linux_supports_non_stop, linux_async)
12622 (linux_start_non_stop): New.
12623 (linux_target_ops): Register linux_supports_non_stop, linux_async
12624 and linux_start_non_stop.
12625 (initialize_low): Install SIGCHLD handler.
12626 * thread-db.c (thread_db_create_event, find_one_thread)
12627 (thread_db_get_tls_address): Use lwpid_of.
12628 * win32-low.c (win32_detach): Adjust to use resume_kind.
12629 (win32_wait): Add `options' argument.
12630 * spu-low.c (spu_resume): Adjust to use resume_kind.
12631 (spu_wait): Add `options' argument.
12632
5b1c542e
PA
126332009-04-01 Pedro Alves <pedro@codesourcery.com>
12634
12635 Decouple target code from remote protocol.
12636
12637 * target.h (enum target_waitkind): New.
12638 (struct target_waitstatus): New.
12639 (struct target_ops) <wait>: Return an unsigned long. Take a
12640 target_waitstatus pointer instead of a char pointer.
12641 (mywait): Likewise.
12642 * target.c (mywait): Change prototype to return an unsigned long.
12643 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12644 * server.h (thread_from_wait, old_thread_from_wait): Delete
12645 declarations.
12646 (prepare_resume_reply): Change prototype to take a
12647 target_waitstatus.
12648 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12649 (last_status, last_ptid): New.
12650 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12651 pid instead of a signal.
12652 (attach_inferior): Remove "status" and "signal" parameters.
12653 Adjust.
12654 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12655 not as an address.
12656 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12657 (handle_v_requests, myresume): Remove "status" and "signal"
12658 parameters. Adjust.
12659 (handle_status): New.
12660 (main): Delete local `status'. Adjust.
12661 * remote-utils.c: Include target.h.
12662 (prepare_resume_reply): Change prototype to take a
12663 target_waitstatus. Adjust.
12664
12665 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12666 interface.
12667 * spu-low.c (spu_wait): Adjust.
12668 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12669 Delete.
12670 (win32_wait): Adjust.
12671
2bd7c093
PA
126722009-04-01 Pedro Alves <pedro@codesourcery.com>
12673
12674 * target.h (struct thread_resume): Delete leave_stopped member.
12675 (struct target_ops): Add a `n' argument to the `resume' callback.
12676 * server.c (start_inferior): Adjust.
12677 (handle_v_cont, myresume): Adjust.
12678 * linux-low.c (check_removed_breakpoint): Adjust to resume
12679 interface change, and to removed leave_stopped field.
12680 (resume_ptr): Delete.
12681 (struct thread_resume_array): New.
12682 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12683 resume interface change.
12684 (linux_continue_one_thread, linux_queue_one_thread)
12685 (resume_status_pending_p): Check if the resume field is NULL
12686 instead of checking the leave_stopped member.
12687 (linux_resume): Adjust to the target resume interface change.
12688 * spu-low.c (spu_resume): Adjust to the target resume interface
12689 change.
12690 * win32-low.c (win32_detach, win32_resume): Ditto.
12691
c35fafde
PA
126922009-04-01 Pedro Alves <pedro@codesourcery.com>
12693
12694 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12695 flag.
12696 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12697 pending.
12698 (linux_continue_one_thread): Only preserve the stepping flag if
12699 there's a pending breakpoint.
12700
0a59d50b
PA
127012009-03-31 Pedro Alves <pedro@codesourcery.com>
12702
12703 * server.c (main): After the inferior having exited, call
12704 remote_close before exiting gdbserver.
12705
f04c6d38
TJB
127062009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12707
12708 Fix size of FPSCR in Power 7 processors.
12709 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12710 (PPC_FEATURE_HAS_DFP): New #define.
12711 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12712 size of the FPSCR.
12713
78e5cee6
PA
127142009-03-23 Pedro Alves <pedro@codesourcery.com>
12715
12716 * server.c (handle_query) Whitespace and formatting.
12717
1b3f6016
PA
127182009-03-22 Pedro Alves <pedro@codesourcery.com>
12719
12720 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12721 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12722 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12723 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12724 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12725 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12726 Makefile.in, configure.ac: Fix whitespace throughout.
12727 * configure: Regenerate.
12728
a07b2135
PA
127292009-03-22 Pedro Alves <pedro@codesourcery.com>
12730
12731 * inferiors.c (find_inferior): Make it safe for the callback
12732 function to delete the currently iterated inferior.
12733
67cc2626
PA
127342009-03-22 Pedro Alves <pedro@codesourcery.com>
12735
12736 * Makefile.in (linuw_low_h): Move higher.
12737 (thread-db.o): Depend on $(linux_low_h).
12738
54a0b537
PA
127392009-03-17 Pedro Alves <pedro@codesourcery.com>
12740
12741 Rename "process" to "lwp" throughout.
12742
12743 * linux-low.c (all_processes): Rename to...
12744 (all_lwps): ... this.
12745 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12746 (add_process): Rename to ...
12747 (add_lwp): ... this. Adjust.
12748 (linux_create_inferior): Adjust.
12749 (linux_attach_lwp): Adjust.
12750 (linux_attach): Adjust.
12751 (linux_kill_one_process): Rename to ...
12752 (linux_kill_one_lwp): ... this. Adjust.
12753 (linux_kill): Adjust.
12754 (linux_detach_one_process): Rename to ...
12755 (linux_detach_one_lwp): ... this. Adjust.
12756 (linux_detach): Adjust.
12757 (check_removed_breakpoint): Adjust.
12758 (status_pending_p): Adjust.
12759 (linux_wait_for_process): Rename to ...
12760 (linux_wait_for_lwp): ... this. Adjust.
12761 (linux_wait_for_event): Adjust.
12762 (send_sigstop): Adjust.
12763 (wait_for_sigstop): Adjust.
12764 (stop_all_processes): Rename to ...
12765 (stop_all_lwps): ... this.
12766 (linux_resume_one_process): Rename to ...
12767 (linux_resume_one_lwp): ... this. Adjust.
12768 (linux_set_resume_request, linux_continue_one_thread)
12769 (linux_queue_one_thread, resume_status_pending_p)
12770 (usr_store_inferior_registers, regsets_store_inferior_registers)
12771 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12772 Adjust.
12773 * linux-low.h (get_process): Rename to ...
12774 (get_lwp): ... this. Adjust.
12775 (get_thread_process): Rename to ...
12776 (get_thread_lwp): ... this. Adjust.
12777 (get_process_thread): Rename to ...
12778 (get_lwp_thread): ... this. Adjust.
12779 (struct process_info): Rename to ...
12780 (struct lwp_info): ... this.
12781 (all_processes): Rename to ...
12782 (all_lwps): ... this.
12783 * proc-service.c (ps_lgetregs): Adjust.
12784 * thread-db.c (thread_db_create_event, find_one_thread)
12785 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12786
0b16c5cf
PA
127872009-03-14 Pedro Alves <pedro@codesourcery.com>
12788
12789 * server.c (handle_query): Handle "qAttached".
12790
32de4b9d
NS
127912009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12792
12793 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12794 GPLv3, update license URL.
12795
2aecd87f
DE
127962009-03-01 Doug Evans <dje@google.com>
12797
93efd302 12798 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12799 (server_h): Add gdb_signals.h.
12800 (signals.o): Update.
12801 * server.h (target_signal_from_host,target_signal_to_host_p)
12802 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12803
86b1f9c5
PM
128042009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12805
12806 * remote-utils.c (getpkt): Also generate remote-debug
12807 information if noack_mode is set.
12808
4aa995e1
PA
128092009-02-06 Pedro Alves <pedro@codesourcery.com>
12810
12811 * server.c (handle_query): Report qXfer:siginfo:read and
12812 qXfer:siginfo:write as supported and handle them.
12813 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12814 * linux-low.c (linux_xfer_siginfo): New.
12815 (linux_target_ops): Set it.
12816
62709adf
PA
128172009-01-26 Pedro Alves <pedro@codesourcery.com>
12818
12819 * server.c (gdbserver_usage): Mention --remote-debug.
12820 (main): Accept '--remote-debug' switch.
12821
aef93bd7
DE
128222009-01-18 Doug Evans <dje@google.com>
12823
12824 * regcache.c (new_register_cache): No need to check result of xcalloc.
12825 * server.c (handle_search_memory): Back out calls to xmalloc,
12826 result is checked and error is returned to user upon failure.
12827 (handle_query): Ditto. Add more checks for result of malloc.
12828 (handle_v_cont): Check result of malloc, report error back to
12829 user upon failure.
12830 (handle_v_run): Ditto. Call freeargv.
12831 * server.h (freeargv): Declare.
12832 * utils.c (freeargv): New fn.
12833
54363045
DE
128342009-01-15 Doug Evans <dje@google.com>
12835
f626972c
DE
12836 * gdbreplay.c (perror_with_name): Make arg const char *.
12837 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12838 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12839 * utils.c (perror_with_name): Make arg const char *.
54363045 12840
18aae699
PA
128412009-01-14 Pedro Alves <pedro@codesourcery.com>
12842
12843 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12844 when handling a EXIT_PROCESS_DEBUG_EVENT.
12845
ff703abe
JB
128462009-01-06 Joel Brobecker <brobecker@adacore.com>
12847
12848 * gdbreplay.c (gdbreplay_version): Update copyright year.
12849 * server.c (gdbserver_version): Likewise.
12850
f21cc1a2 128512009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12852
12853 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12854 (handle_extended_wait): Improve comment.
0e21c1ec 12855
bca929d3
DE
128562008-12-13 Doug Evans <dje@google.com>
12857
12858 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12859 * server.h (ATTR_MALLOC): New macro.
12860 (xmalloc,xcalloc,xstrdup): Declare.
12861 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12862 * inferiors.c: Ditto.
12863 * linux-low.c: Ditto.
12864 * mem-break.c: Ditto.
12865 * regcache.c: Ditto.
12866 * remote-utils.c: Ditto.
12867 * server.c: Ditto.
12868 * target.c: Ditto.
12869 * win32-low.c: Ditto.
12870
97438e3f
DE
128712008-12-12 Doug Evans <dje@google.com>
12872
896c7fbb
DE
12873 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12874 in debugging printf.
12875
97438e3f
DE
12876 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12877
e3b886f8
DE
128782008-12-09 Doug Evans <dje@google.com>
12879
12880 * linux-low.h (struct process_info): Delete member tid, unused.
12881 * thread-db.c (find_one_thread): Update.
12882 (maybe_attach_thread): Update.
12883
07e059b5
VP
128842008-12-02 Pedro Alves <pedro@codesourcery.com>
12885
889bf7c5
PA
12886 * target.h (struct target_ops): Add qxfer_osdata member.
12887 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12888 and dirent.h.
12889 (linux_qxfer_osdata): New functions.
12890 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12891 callback.
12892 * server.c (handle_query): Handle "qXfer:osdata:read:".
12893 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12894 (buffer_xml_printf): New functions.
12895 * server.h (struct buffer): New.
12896 (buffer_grow_str, buffer_grow_str0): New macros.
12897 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12898 (buffer_xml_printf): Declare.
07e059b5 12899
4cab47ab
DE
129002008-11-24 Doug Evans <dje@google.com>
12901
12902 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12903
f142445f
DJ
129042008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12905
12906 * server.c (handle_v_run): Always use the supplied argument list.
12907
d0107bb6 129082008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12909
d0107bb6
BW
12910 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12911 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12912
2c4ad781
TJB
129132008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12914
12915 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12916 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12917 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12918 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12919 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12920 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12921 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12922 XML target descriptions.
12923 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12924 when inferior is running on an ISA 2.05 or later processor. Add
12925 special case to return offset for full 64-bit slot of FPSCR when
12926 in 32-bits.
12927
dfb64f85
DJ
129282008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12929
12930 * Makefile.in (SFILES, clean): Added sparc64 files.
12931 (reg-sparc64.o, reg-sparc64.c): New.
12932 * configure.srv (sparc*-*-linux*): New configuration.
12933 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12934 syscall arguments for SPARC.
12935 (regsets_store_inferior_registers): Likewise.
12936 * linux-sparc-low.c: New file.
12937
66b6e1dd
DE
129382008-10-21 Doug Evans <dje@google.com>
12939
12940 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12941 (READLINE_DIR,READLINE_DEP): Delete.
12942 (INTERNAL_CFLAGS): Update.
12943 (LINTFLAGS): Update.
12944
9b710a42
PA
129452008-10-10 Pedro Alves <pedro@codesourcery.com>
12946
12947 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12948 whole argv from the last run, not just argv[0].
12949
5822d809
PA
129502008-09-08 Pedro Alves <pedro@codesourcery.com>
12951
12952 * regcache.c (new_register_cache): Return NULL if the register
12953 cache size isn't known yet.
12954 (free_register_cache): Avoid dereferencing a NULL regcache.
12955
74aac56f
DJ
129562008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12957
12958 * configure.srv: Merge MIPS and MIPS64.
12959
400b20f5
MR
129602008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12961
12962 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12963
677c5bb1
LM
129642008-08-18 Luis Machado <luisgpm@br.ibm.com>
12965
12966 * Makefile.in: Add required vsx dependencies.
12967
12968 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12969 Declare init_registers_powerpc_vsx32l.
12970 Declare init_registers_powerpc_vsx64l.
12971 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12972 (ppc_arch_setup): Check for VSX in hwcap.
12973 (ppc_fill_vsxregset): New function.
12974 (ppc_store_vsxregset): New function.
12975 Add new VSX entry in regset_info target_regsets.
12976
12977 * configure.srv: Add new VSX dependencies.
12978
a6f3e723
SL
129792008-08-12 Pedro Alves <pedro@codesourcery.com>
12980
12981 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12982 (remote_open): Set or clear transport_is_reliable.
12983 (putpkt_binary): Don't expect acks in noack mode.
12984 (getpkt): Don't send ack/nac in noack mode.
12985 * server.c (handle_general_set): Handle QStartNoAckMode.
12986 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12987 qSupported.
12988 (main): Reset noack_mode on every connection.
12989 * server.h (noack_mode): Declare.
12990
a417dc56
RW
129912008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12992
12993 * Makefile.in (GDBREPLAY_OBS): New variable.
12994 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12995
3221518c
UW
129962008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12997 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13000 (usr_store_inferior_registers): Likewise.
13001 (regsets_store_inferior_registers): Likewise.
13002
ec56be1b
PA
130032008-07-31 Rolf Jansen <rj@surtec.com>
13004 Pedro Alves <pedro@codesourcery.com>
13005
13006 * configure.ac: Check for memmem declaration.
13007 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13008 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13009 (disable_packet_qfThreadInfo): Unconditionally compile.
13010 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13011 * configure, config.in: Regenerate.
13012
2fe5e3ff
DE
130132008-07-28 Doug Kwan <dougkwan@google.com>
13014
13015 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13016 (linux_write_memory): Remove declaration of errno.
13017
836acd6d
UW
130182008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13019
13020 * linux-low.c (handle_extended_wait): Do not use "status"
13021 variable uninitialized.
13022
aeba519e
PA
130232008-07-07 Pedro Alves <pedro@codesourcery.com>
13024
13025 * server.c (handle_v_attach): Inhibit reporting dll changes.
13026
db42f210
PA
130272008-06-27 Pedro Alves <pedro@codesourcery.com>
13028
13029 * remote-utils.c (prepare_resume_reply): If requested, don't
13030 output "thread:TID" in the T stop reply.
13031
13032 * server.c (disable_packet_vCont, disable_packet_Tthread)
13033 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13034 (handle_query): If requested, disable support for qC, qfThreadInfo
13035 and qsThreadInfo.
13036 (handle_v_requests): If requested, disable support for vCont.
13037 (gdbserver_show_disableable): New.
13038 (main): Handle --disable-packet and --disable-packet=LIST.
13039
13040 * server.h (disable_packet_vCont, disable_packet_Tthread)
13041 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13042
8e4c5421
CD
130432008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13044
13045 * server.c (gdbserver_usage): Mention --version.
13046
6e23a804
DJ
130472008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * Makefile.in (gdbreplay.o): New rule.
13050
90aa6a40
JM
130512008-06-06 Joseph Myers <joseph@codesourcery.com>
13052
13053 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13054 message, not gdbserver.
13055
c16158bc 130562008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13057 Nathan Sidwell <nathan@codesourcery.com>
13058 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13059
13060 * acinclude.m4: Include ../../config/acx.m4.
13061 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13062 * configure, config.in: Regenerate.
13063 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13064 * server.c (gdbserver_version): Print PKGVERSION.
13065 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13066 (main): Adjust gdbserver_usage calls.
13067 * gdbreplay.c (version, host_name): Add declarations.
13068 (gdbreplay_version, gdbreplay_usage): New.
13069 (main): Accept --version and --help options.
13070
aeb75bf5
DJ
130712008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13072
13073 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13074 (arm_breakpoint_at): Handle Thumb.
13075 (the_low_target): Add comment.
13076
76b233dd
UW
130772008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13078
13079 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13080
08388c79
DE
130812008-05-09 Doug Evans <dje@google.com>
13082
a3c83fae
DE
13083 * server.h (decode_search_memory_packet): Declare.
13084 * remote-utils.c (decode_search_memory_packet): New fn.
13085 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13086 (handle_search_memory): New fn.
13087 (handle_query): Process qSearch:memory packets.
13088
bb9c3d36
UW
130892008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13090
13091 * regcache.c (registers_length): Remove.
13092 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13093 full register packet.
13094 * regcache.h (registers_length): Remove prototype.
13095 * server.h (PBUFSIZ): Define to 16384.
13096
7284e1be
UW
130972008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13098
13099 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13100 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13101 powerpc-64l.o, and powerpc-altivec64l.o.
13102 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13103 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13104 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13105 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13106 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13107 to srv_xmlfiles.
13108
13109 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13110 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13111 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13112 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13113 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13114 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13115 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13116 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13117 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13118 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13119 (clean): Update.
13120
13121 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13122 (init_registers_powerpc_32l): ... this new prototype.
13123 (init_registers_powerpc_32): Remove, replace by ...
13124 (init_registers_powerpc_altivec32l): ... this new prototype.
13125 (init_registers_powerpc_e500): Remove, replace by ...
13126 (init_registers_powerpc_e500l): ... this new prototype.
13127 (init_registers_ppc64): Remove, replace by ...
13128 (init_registers_powerpc_64l): ... this new prototype.
13129 (init_registers_powerpc_64): Remove, replace by ...
13130 (init_registers_powerpc_altivec64l): ... this new prototype.
13131 (ppc_num_regs): Set to 73.
13132 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13133 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13134 (ppc_cannot_store_register): Handle orig_r3 and trap.
13135 (ppc_arch_setup): Update init_registers_... calls.
13136 (ppc_fill_gregset): Handle orig_r3 and trap.
13137
13138 * inferiors.c (clear_inferiors): Reset current_inferior.
13139
fdc59709
PB
131402008-04-23 Paolo Bonzini <bonzini@gnu.org>
13141
889bf7c5
PA
13142 * acinclude.m4: Add override.m4.
13143 * configure: Regenerate.
fdc59709 13144
c9b2f845
UW
131452008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13148 initial call to init_register_ppc64.
13149
550512b8
UW
131502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13151
43aaf8b6
PA
13152 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13153 single powerpc*-*-linux* case.
550512b8
UW
13154 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13155
b6430ec3
UW
131562008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13157
13158 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13159 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13160 from reg_xmlfiles.
13161 * linux-ppc-low.c: Include <elf.h>.
13162 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13163 (ppc_hwcap): New global variable.
13164 (ppc_regmap): Remove __SPE__ #ifdef sections.
13165 (ppc_regmap_e500): New global variable.
13166 (ppc_cannot_store_register): Update __SPE__ special case.
13167 (ppc_get_hwcap): New function.
13168 (ppc_arch_setup): Use it to determine whether inferior supports
13169 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13170 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13171 Do not access registers if target does not support AltiVec.
13172 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13173 Do not access registers if target does not support SPE.
13174 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13175
52fa2412
UW
131762008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * linux-low.c (disabled_regsets, num_regsets): New.
13179 (use_regsets_p): Delete.
13180 (linux_wait_for_process): Clear disabled_regsets.
13181 (regsets_fetch_inferior_registers): Check and set it.
13182 (regsets_store_inferior_registers): Likewise.
13183 (linux_fetch_registers, linux_store_registers): Do not use
13184 use_regsets_p.
13185 (initialize_low): Allocate disabled_regsets.
13186
e28b3332
DJ
131872008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13188
13189 * Makefile.in (LIBOBJS): New.
13190 (OBS): Use LIBOBJS.
13191 (memmem.o): New rule.
13192 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13193 * configure: Regenerated.
13194
4536995d
UW
131952008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13196
13197 * server.c (handle_query): Never return "unsupported" for
13198 qXfer:features:read queries.
13199
221c031f
UW
132002008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13201
13202 * server.c (get_features_xml): Fix inverted condition.
13203 (handle_query): Always support qXfer:feature:read.
13204
ccd213ac
DJ
132052008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13206
13207 * server.c (wrapper_argv): New.
13208 (start_inferior): Handle wrapper_argv. If set, expect an extra
13209 trap.
13210 (gdbserver_usage): Document --wrapper.
13211 (main): Parse --wrapper.
13212
6fe305f7
UW
132132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13214
13215 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13216 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13217 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13218 (ppc_set_pc): Likewise.
13219 (ppc_arch_setup): New function.
13220 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13221 of collect_register.
889bf7c5 13222 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13223
5b0a002e
UW
132242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13227 instead of linux-ppc64-low.o.
13228 * linux-ppc64-low.c: Remove file.
13229 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13230 (linux-ppc64-low.o): Remove rule.
13231
13232 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13233 (init_registers_powerpc_64): Likewise.
13234 (ppc_regmap): Conditionally define depending on __powerpc64__.
13235 (ppc_cannot_store_register): Do not special-case "fpscr" when
13236 compiled on __powerpc64__.
13237 (ppc_collect_ptrace_register): New function.
13238 (ppc_supply_ptrace_register): New function.
13239 (ppc_breakpoint): Change type to "unsigned int".
13240 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13241 (the_low_target): Conditionally provide initializers for the
889bf7c5 13242 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13243 collect_ptrace_register and supply_ptrace_register members.
13244
9b4b61c8
UW
132452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13246
13247 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13248 * server.c (gdbserver_xmltarget): Define.
13249 (get_features_xml): Use it to replace "target.xml" and arch_string.
13250
13251 * configure.srv: Remove srv_xmltarget. Add XML files that were
13252 mentioned there to srv_xmlfiles instead. Remove conditional tests
13253 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13254 srv_xmlfiles and srv_regobj to include all possible choices.
13255 * configure.ac (srv_xmltarget): Remove.
13256 (srv_xmlfiles): Do not add "target.xml".
13257 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13258 checks for supplementary target information.
13259 * configure: Regenerate.
13260 * Makefile.in (XML_TARGET): Remove.
13261 (target.xml): Remove rule.
13262 (clean): Do not clean up target.xml.
13263 (.PRECIOUS): Do not mention target.xml.
13264
13265 * target.h (struct target_ops): Remove arch_string member.
13266 * linux-low.c (linux_arch_string): Remove.
13267 (linux_target_ops): Remove arch_string initializer.
13268 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13269 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13270 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13271 * spu-low.c (spu_arch_string): Remove.
13272 (spu_target_ops): Remove arch_string initializer.
13273 * win32-low.c (win32_arch_string): Remove.
13274 (win32_target_ops): Remove arch_string initializer.
13275 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13276 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13277 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13278
ee1a7ae4
UW
132792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13280
13281 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13282 by collect_ptrace_register and supply_ptrace_register hooks.
13283 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13284 instead of checking for the_low_target.left_pad_xfer.
13285 (usr_store_inferior_registers): Use collect_ptrace_register callback
13286 instead of checking for the_low_target.left_pad_xfer.
13287
13288 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13289 (s390_supply_ptrace_register): Likewise.
13290 (s390_fill_gregset): Call s390_collect_ptrace_register.
13291 (the_low_target): Update.
13292
13293 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13294 (ppc_supply_ptrace_register): Likewise.
13295 (the_low_target): Update.
13296
13297 * linux-i386-low.c (the_low_target): Update.
13298 * linux-x86-64-low.c (the_low_target): Update.
13299
d61ddec4
UW
133002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13301
13302 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13303 reg-s390.o and reg-s390x.o.
13304
13305 * linux-low.c (new_inferior): New global variable.
13306 (linux_create_inferior, linux_attach): Set it.
13307 (linux_wait_for_process): Call the_low_target.arch_setup after the
13308 target has stopped for the first time.
13309 (initialize_low): Do not call the_low_target.arch_setup.
13310
13311 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13312 (s390_set_pc): Likewise.
13313 (s390_arch_setup): New function.
13314 (the_low_target): Use s390_arch_setup as arch_setup routine.
13315
13316 * regcache.c (realloc_register_cache): New function.
13317 (set_register_cache): Call it for each existing regcache.
13318
d05b4ac3
UW
133192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13320
13321 * server.h (init_registers): Remove prototype.
13322
13323 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13324 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13325 instead of init_registers ().
13326 * linux-arm-low.c (init_registers_arm): Add prototype.
13327 (init_registers_arm_with_iwmmxt): Likewise.
13328 (the_low_target): Add initializer for arch_setup field.
13329 * linux-cris-low.c (init_registers_cris): Add prototype.
13330 (the_low_target): Add initializer for arch_setup field.
13331 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13332 (the_low_target): Add initializer for arch_setup field.
13333 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13334 (the_low_target): Add initializer for arch_setup field.
13335 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13336 (the_low_target): Add initializer for arch_setup field.
13337 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13338 (the_low_target): Add initializer for arch_setup field.
13339 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13340 (the_low_target): Add initializer for arch_setup field.
13341 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13342 (init_registers_mips64_linux): Likewise.
13343 (the_low_target): Add initializer for arch_setup field.
13344 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13345 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13346 (the_low_target): Add initializer for arch_setup field.
13347 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13348 (init_registers_powerpc_64): Likewise.
13349 (the_low_target): Add initializer for arch_setup field.
13350 * linux-s390-low.c (init_registers_s390): Add prototype.
13351 (init_registers_s390x): Likewise.
13352 (the_low_target): Add initializer for arch_setup field.
13353 * linux-sh-low.c (init_registers_sh): Add prototype.
13354 (the_low_target): Add initializer for arch_setup field.
13355 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13356 (the_low_target): Add initializer for arch_setup field.
13357 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13358 (the_low_target): Add initializer for arch_setup field.
13359
13360 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13361 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13362 instead of init_registers ().
13363 * win32-arm-low.c (init_registers_arm): Add prototype.
13364 (the_low_target): Add initializer for arch_setup field.
13365 * win32-i386-low.c (init_registers_i386): Add prototype.
13366 (the_low_target): Add initializer for arch_setup field.
13367
13368 * spu-low.c (init_registers_spu): Add prototype.
13369 (initialize_low): Call initialie_registers_spu () instead of
13370 initialize_registers ().
13371
fd96d250
PA
133722008-02-19 Pedro Alves <pedro@codesourcery.com>
13373
13374 * server.c (handle_v_requests): When handling the vRun and vAttach
13375 packets, if already debugging a process, don't kill it. Return an
13376 error instead.
13377
d41b6bb4
DJ
133782008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13379
13380 * server.c (handle_query): Correct length check.
13381
5ac588cf
PA
133822008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13383
13384 * win32-low.c (do_initial_child_stuff): Add process handle
13385 parameter. Set current_process_handle and current_process_id from the
13386 parameters. Clear globals.
13387 (win32_create_inferior): Don't set current_process_handle and
13388 current_process_id here. Instead pass them on the call to
13389 do_initial_child_stuff.
13390 (win32_attach): Likewise.
13391 (win32_clear_inferiors): New.
13392 (win32_kill): Don't close the current process handle or the
13393 current thread handle here. Instead call win32_clear_inferiors.
13394 (win32_detach): Don't open a new handle to the process. Call
13395 win32_clear_inferiors.
13396 (win32_join): Don't rely on current_process_handle; open a new
13397 handle using the process id.
13398 (win32_wait): Call win32_clear_inferiors when the inferior process
13399 has exited.
13400
ecd7ecbc
DJ
134012008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13402
13403 * server.c (monitor_show_help): Add "exit".
13404
1525d545
MG
134052008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13406
ecd7ecbc 13407 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13408 (clean): Add reg-xtensa.c.
13409 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13410 * configure.srv (xtensa*-*-linux*) New target.
13411 * linux-xtensa-low.c: New.
13412 * xtensa-xtregs.c: New.
1525d545 13413
59a016f0
PA
134142008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13415
13416 * hostio.c: Don't include errno.h.
13417 (errno_to_fileio_errno): Move to hostio-errno.
13418 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13419 error number outputting to the target->hostio_last_error callback.
13420 (hostio_packet_error): Use FILEIO_EINVAL directly.
13421 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13422 calls to hostio_error.
13423 * hostio-errno.c: New.
13424 * server.h (hostio_last_error_from_errno): Declare.
13425 * target.h (target_ops): Add hostio_last_error member.
13426 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13427 as hostio_last_error handler.
889bf7c5 13428 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13429 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13430 (wince_hostio_last_error): New functions.
13431 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13432 as hostio_last_error handler.
13433 (win32_target_ops) [!_WIN32_WCE]: Register
13434 hostio_last_error_from_errno as hostio_last_error handler.
13435 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13436 (hostio-errno.o): New rule.
13437 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13438 * configure.srv (srv_hostio_err_objs): New variable. Default to
13439 hostio-errno.o.
13440 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13441 * configure: Regenerate.
13442
2d717e4f
DJ
134432008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13444
13445 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13446 (linux_kill, linux_detach): Clean up the process list.
13447 * remote-utils.c (remote_open): Improve port number parsing.
13448 (putpkt_binary, input_interrupt): Only send interrupts if the target
13449 is running.
13450 * server.c (extended_protocol): Make static.
13451 (attached): Define earlier.
13452 (exit_requested, response_needed, program_argv): New variables.
13453 (target_running): New.
13454 (start_inferior): Clear attached here.
13455 (attach_inferior): Set attached here.
13456 (require_running): Define.
13457 (handle_query): Use require_running and target_running. Implement
13458 "monitor exit".
13459 (handle_v_attach, handle_v_run): New.
13460 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13461 (gdbserver_usage): Update.
13462 (main): Redo argument parsing. Handle --debug and --multi. Handle
13463 --attach along with other options or after the port. Save
13464 program_argv. Support no initial program. Resynchronize
13465 communication with GDB after an error. Handle "monitor exit".
13466 Use require_running and target_running. Always allow the extended
13467 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13468 restart in extended mode.
13469 * README: Refer to the GDB manual. Update --attach usage.
13470
7407e2de
AS
134712007-12-20 Andreas Schwab <schwab@suse.de>
13472
13473 * linux-low.c (STACK_SIZE): Define.
13474 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13475 (linux_test_for_tracefork): Likewise.
13476
b65d95c5
DJ
134772007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13478
13479 * linux-low.c (linux_wait_for_event): Update messages. Do not
13480 reinsert auto-delete breakpoints.
13481 * mem-break.c (struct breakpoint): Change return type of handler to
13482 int.
13483 (set_breakpoint_at): Update handler type.
13484 (reinsert_breakpoint_handler): Return 1 instead of calling
13485 delete_breakpoint.
13486 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13487 setting a new one.
13488 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13489 * mem-break.h (set_breakpoint_at): Update handler type.
13490 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13491 * win32-low.c (auto_delete_breakpoint): New.
13492 (get_child_debug_event): Use it.
13493
4e799345
DJ
134942007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13495
13496 * configure.ac: Check for pread and pwrite.
13497 * hostio.c (handle_pread): Fall back to lseek and read.
13498 (handle_pwrite): Fall back to lseek and write.
13499 * config.in, configure: Regenerated.
13500
27524b67
DJ
135012007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13502
13503 * server.c (myresume): Add own_buf argument.
13504 (main): Update calls.
13505
a20d5e98
DJ
135062007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13507
13508 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13509 * remote-utils.c (remote_open): Do not call disable_async_io.
13510 (block_async_io): Delete.
13511 (unblock_async_io): Make static.
13512 (initialize_async_io): New.
13513 * server.c (handle_v_cont): Handle async I/O here.
13514 (myresume): Likewise. Move other common resume tasks here...
13515 (main): ... from here. Call initialize_async_io. Disable async
13516 I/O before the main loop.
13517 * server.h (initialize_async_io): Declare.
13518 (block_async_io, unblock_async_io): Delete prototypes.
13519 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13520
b79d787e
DJ
135212007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13522
13523 * remote-utils.c (readchar): Allow binary data in received messages.
13524
d97903b2
PA
135252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13526
13527 * win32-low.c (attaching): New global.
13528 (win32_create_inferior): Clear the `attaching' global.
13529 (win32_attach): Set the `attaching' global.
13530 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13531 attaching. Only set a breakpoint at the entry point if not
13532 attaching.
13533
311de423
PA
135342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13535
13536 * server.c (main): Don't report dll events on the initial
13537 connection on attaches.
13538
6c2d16d2
PA
135392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13540
13541 * server.c (main): Relax numerical bases supported for the pid of
13542 the --attach command line argument.
13543
5ca906e6
PA
135442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13545
13546 * win32-low.c (win32_attach): Call OpenProcess before
13547 DebugActiveProcess, not after. Add last error output to error
13548 call.
13549
9c6c8194
PA
135502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13551
13552 * win32-low.c (win32_get_thread_context)
13553 (win32_set_thread_context): New functions.
13554 (thread_rec): Use win32_get_thread_context.
13555 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13556 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13557 field.
13558
4d5d1aaa
PA
135592007-12-03 Leo Zayas
13560 Pedro Alves <pedro_alves@portugalmail.pt>
13561
13562 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13563 global variables.
13564 (child_add_thread): Minor cleanup.
13565 (child_continue): Resume artificially suspended threads before
13566 calling ContinueDebugEvent.
13567 (suspend_one_thread): New.
13568 (fake_breakpoint_event): New.
13569 (get_child_debug_event): Change return type to int. Check here if
13570 gdb sent an interrupt request. If a soft interrupt was requested,
13571 fake a breakpoint event. Return 0 if there is no event to handle,
13572 and 1 otherwise.
13573 (win32_wait): Don't check here if gdb sent an interrupt request.
13574 Ensure there is a valid event to handle.
13575 (win32_request_interrupt): Add soft interruption method as last
13576 resort.
13577
c436e841
PA
135782007-12-03 Leo Zayas
13579 Pedro Alves <pedro_alves@portugalmail.pt>
13580
13581 * win32-low.h (win32_thread_info): Add descriptions to the
13582 structure members. Replace `suspend_count' counter by a
13583 `suspended' flag.
13584 * win32-low.c (thread_rec): Update condition of when to get the
13585 context from the inferior. Rely on ContextFlags being set if it
13586 has already been retrieved. Only suspend the inferior thread if
13587 we haven't already. Warn if that fails.
13588 (continue_one_thread): s/suspend_count/suspended/. Only call
13589 ResumeThread once. Warn if that fails.
13590
e7b5fa67
PA
135912007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13592
13593 * win32-low.c (win32_wait): Don't read from the inferior when it
13594 has already exited.
13595
a385171d
PA
135962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13597
13598 * Makefile.in (win32_low_h): New variable.
13599 (win32-low.o): Add dependency on $(win32_low_h).
13600 (win32-arm-low.o, win32-i386-low.o): New rules.
13601
f80c84b3
DJ
136022007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * hostio.c: Correct copyright year.
13605
a6b151f1
DJ
136062007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * Makefile.in (OBS): Add hostio.o.
13609 (hostio.o): New rule.
13610 * server.h (handle_vFile): Declare.
13611 * hostio.c: New file.
13612 * server.c (handle_v_requests): Take packet_len and new_packet_len
13613 for binary packets. Call handle_vFile.
13614 (main): Update call to handle_v_requests.
13615
f9387fc3
DJ
136162007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13617
13618 * linux-low.c: Include <sched.h>.
13619
51c2684e
DJ
136202007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13621
13622 * linux-low.c (linux_tracefork_grandchild): New.
13623 (linux_tracefork_child): Use clone.
13624 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13625
75f83163
JB
136262007-10-31 Joel Brobecker <brobecker@adacore.com>
13627
13628 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13629
da5898ce
DJ
136302007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13631
13632 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13633
24a09b5f
DJ
136342007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13635
13636 * inferiors.c (change_inferior_id): Delete.
13637 (add_pid_to_list, pull_pid_from_list): New.
13638 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13639 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13640 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13641 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13642 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13643 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13644 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13645 (using_threads): Always set to 1.
13646 (handle_extended_wait): New.
13647 (add_process): Do not set TID.
13648 (linux_create_inferior): Set must_set_ptrace_flags.
13649 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13650 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13651 (linux_thread_alive): Rename TID argument to LWPID.
13652 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13653 (linux_wait_for_event): Do not use TID or check using_threads. Update
13654 call to dead_thread_notify. Call handle_extended_wait.
13655 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13656 (send_sigstop): Delete sigstop_sent.
13657 (wait_for_sigstop): Avoid TID.
13658 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13659 (linux_test_for_tracefork): New.
13660 (linux_lookup_signals): Use thread_db_active and
13661 linux_supports_tracefork_flag.
13662 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13663 * linux-low.h (get_process_thread): Avoid TID.
13664 (struct process_ifo): Move thread_known and tid to the end. Remove
13665 sigstop_sent.
13666 (linux_attach_lwp, thread_db_init): Update prototypes.
13667 * server.h (change_inferior_id): Delete prototype.
13668 (add_pid_to_list, pull_pid_from_list): New prototypes.
13669 * thread-db.c (thread_db_use_events): New.
13670 (find_first_thread): Rename to...
13671 (find_one_thread): ...this. Update callers and messages. Do not
13672 call fatal. Check thread_db_use_events. Do not call
13673 change_inferior_id or new_thread_notify.
13674 (maybe_attach_thread): Update. Do not call new_thread_notify.
13675 (thread_db_init): Set thread_db_use_events. Check use_events.
13676 * utils.c (fatal, warning): Correct message prefix.
13677
30ed0a8f
DJ
136782007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * Makefile.in (clean): Remove new files.
13681 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13682 (powerpc-64.o, powerpc-64.c): New rules.
13683 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13684 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13685 with SPE.
13686 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13687 SPE targets.
13688 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13689 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13690 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13691 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13692 (target_regsets): Add AltiVec and SPE register sets.
13693 * configure.ac: Check for AltiVec and SPE.
13694 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13695 (ppc_fill_vrregset, ppc_store_vrregset): New.
13696 (target_regsets): Add AltiVec register set.
13697 * configure: Regenerated.
13698
fd462a61
DJ
136992007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * linux-low.c (O_LARGEFILE): Define.
13702 (linux_read_memory): Use /proc/PID/mem.
13703 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13704 * configure, config.in: Regenerated.
13705
69f223ed
DJ
137062007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13707
13708 * linux-low.c (linux_wait_for_event): Do not pass signals while
13709 single-stepping.
13710
aec18585
PA
137112007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13712
13713 * win32-low.c (create_process): New.
13714 (win32_create_inferior): Use create_process instead of
13715 CreateProcess. If create_process failed retry appending an ".exe"
13716 suffix. Store the GetLastError result immediatelly after
13717 create_process calls and use it on the call to error.
13718
34d86ddd
PA
137192007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13720
13721 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13722
5a0e3bd0
JB
137232007-08-23 Joel Brobecker <brobecker@adacore.com>
13724
13725 * configure.ac: Switch license to GPLv3.
13726
f88c79e6
MS
137272007-08-01 Michael Snyder <msnyder@access-company.com>
13728
13729 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13730
6b3d9b83
PA
137312007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13732
13733 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13734 typedef.
13735 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13736 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13737 CloseToolhelp32Snapshot.
13738 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13739 CloseToolhelp32Snapshot.
13740
c588c53c
MS
137412007-07-27 Michael Snyder <michael.snyder@access-company.com>
13742
13743 * server.c (main): Check for inferior exit before main loop.
13744
aa0403d9
PA
137452007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13746
13747 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13748 instead of on tmp_desc.
13749
255e7678
DJ
137502007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13751 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13754 (add_thread): Minor cleanups.
13755 (clear_inferiors): Move lower in the file. Clear the DLL
13756 list.
13757 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13758 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13759 (xml_escape_text): New.
13760 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13761 for qSupported.
13762 (handle_v_cont): Report errors.
13763 (gdbserver_version): Update.
13764 (main): Correct size of own_buf. Do not report initial DLL events.
13765 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13766 (unloaded_dll, xml_escape_text): New.
13767 * win32-low.c (enum target_waitkind): Update comments.
13768 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13769 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13770 (win32_EnumProcessModules, win32_GetModuleInformation)
13771 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13772 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13773 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13774 (win32_Module32First, win32_Module32Next, load_toolhelp)
13775 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13776 (get_child_debug_event): Handle DLL events.
13777 (win32_wait): Likewise.
13778
0d37add9
DJ
137792007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13782 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13783
45e2715e
PA
137842007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13785
13786 * win32-low.c (handle_output_debug_string): Ignore event if not
13787 waiting.
13788
c5674cf1
PA
137892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13790
13791 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13792
2bbe3cc1
DJ
137932007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13794
13795 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13796
ae13219e
DJ
137972007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * inferiors.c (change_inferior_id): Add comment.
13800 * linux-low.c (check_removed_breakpoint): Add an early
13801 prototype. Improve debug output.
13802 (linux_attach): Doc update.
13803 (linux_detach_one_process, linux_detach): Clean up before releasing
13804 each process.
13805 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13806 * linux-low.h (struct process_info): Doc improvement.
13807 * mem-break.c (delete_all_breakpoints): New.
13808 * mem-break.h (delete_all_breakpoints): New prototype.
13809 * thread-db.c (find_first_thread): New.
13810 (thread_db_create_event): Call it instead of
13811 thread_db_find_new_threads. Clean up unused variables.
13812 (maybe_attach_thread): Remove first thread handling.
13813 (thread_db_find_new_threads): Use find_first_thread.
13814 (thread_db_get_tls_address): Likewise.
13815
4105de34
DJ
138162007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13817
13818 * thread-db.c (thread_db_find_new_threads): Add prototype.
13819 (thread_db_create_event): Check for the main thread before adding
13820 a new thread.
13821 (maybe_attach_thread): Only enable event reporting if TID == 0.
13822 (thread_db_get_tls_address): Check for new threads.
13823
2b876972
DJ
138242007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13825
13826 * linux-low.c (linux_create_inferior): Try execv before execvp.
13827 * spu-low.c (spu_create_inferior): Likewise.
13828
7a245884
DJ
138292007-06-13 Mike Frysinger <vapier@gentoo.org>
13830
13831 * linux-low.c (linux_create_inferior): Change execv to execvp.
13832 * spu-low.c (spu_create_inferior): Likewies.
13833
117ce543
DJ
138342007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13835
13836 * Makefile.in (clean): Clean new files instead of deleted ones.
13837 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13838 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13839 rules.
13840 * configure.srv: Specify XML files and new regformats for MIPS and
13841 MIPS64 GNU/Linux.
13842 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13843 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13844 an entry for the restart register.
13845 (mips_cannot_fetch_register, mips_cannot_store_register)
13846 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13847 register names to match the XML descriptions.
13848 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13849 restart register instead of $0.
13850
0e7f50da
UW
138512007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13852 Markus Deuling <deuling@de.ibm.com>
13853
13854 * remote-utils.c (decode_xfer_write): New function.
13855 * server.h (decode_xfer_write): Add prototype.
13856 * server.c (handle_query): Add PACKET_LEN argument. Support
13857 qXfer:spu:read and qXfer:spu:write packets.
13858 (main): Pass packet_len to handle_query.
13859 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13860 * target.h (target_ops): Add qxfer_spu.
13861
374c1d38
UW
138622007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13863
13864 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13865 accessing non-seekable spufs files.
13866
bb63802a
UW
138672007-05-16 Markus Deuling <deuling@de.ibm.com>
13868
889bf7c5 13869 * server.c (handle_query): Add reply for qC packet.
bb63802a 13870
7390519e
PA
138712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13872 Leo Zayas <lerele@champenstudios@com>
13873
13874 * server.h (check_remote_input_interrupt_request): New function.
13875 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13876 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13877 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13878 (check_remote_input_interrupt_request): New function.
13879 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13880 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13881 winapi_GenerateConsoleCtrlEvent): New typedefs.
13882 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13883 to 250 ms.
13884 (win32_wait): Check for remote interrupt request
13885 with check_remote_input_interrupt_request.
13886 (win32_request_interrupt): New function.
13887 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13888
34b34921
PA
138892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13890
13891 * win32-low.c (debug_registers_changed,
13892 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13893 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13894 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13895 (thread_rec): Get context using the low target.
13896 (child_add_thread): Call thread_added on the low target,
13897 which does the same thing.
13898 (regptr): Delete.
13899 (do_initial_child_stuff): Remove debug registers references.
13900 Set context using the low target. Resume threads after
13901 setting the contexts.
13902 (child_continue): Remove dead variable. Remove debug
13903 registers references.
13904 (child_fetch_inferior_registers): Go through the low target.
13905 (do_child_store_inferior_registers): Remove.
13906 (child_store_inferior_registers): Go through the low target.
13907 (win32_resume): Remove debug registers references.
13908 Set context using the low target.
13909 (handle_exception): Change return type to void. Don't record
13910 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13911 first chance exception.
889bf7c5 13912 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13913 goto loop. Always return after waiting for debug event.
13914 (win32_wait): Convert to switch statement. Handle spurious
13915 events.
13916
13917 * win32-i386-low.c (debug_registers_changed,
13918 debug_registers_used): New.
13919 (initial_stuff): Rename to ...
13920 (i386_initial_stuff): ... this. Clear debug registers
13921 state variables.
13922 (store_debug_registers): Delete.
13923 (i386_get_thread_context): New.
13924 (load_debug_registers): Delete.
13925 (i386_set_thread_context): New.
13926 (i386_thread_added): New.
13927 (single_step): Rename to ...
13928 (i386_single_step): ... this.
13929 (do_fetch_inferior_registers): Rename to ...
13930 (i386_fetch_inferior_register): ... this.
13931 (i386_store_inferior_register): New.
13932 (the_low_target): Adapt to new interface.
13933
13934 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13935 (arm_get_thread_context): New.
13936 (arm_set_thread_context): New.
13937 (regptr): New.
13938 (do_fetch_inferior_registers): Rename to ...
13939 (arm_fetch_inferior_register): ... this.
13940 (arm_store_inferior_register): New.
13941 (arm_wince_breakpoint): Reimplement as unsigned long.
13942 (arm_wince_breakpoint_len): Define.
13943 (the_low_target): Adapt to new interface.
13944
13945 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13946 load_debug_registers. Add get_thread_context, set_thread_context,
13947 thread_added and store_inferior_register. Rename
13948 fetch_inferior_registers to fetch_inferior_register.
13949 (regptr): Remove declaration.
13950
dd6953e1
PA
139512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13952
13953 * linux-low.c (linux_detach): Change return type to int. Return 0.
13954 * spu-low.c (spu_detach): Likewise.
13955
444d6139
PA
139562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13957
13958 * target.h (target_ops): Change return type of detach to int.
13959 Add join.
13960 (join_inferior): New.
13961 * server.c (main): Don't skip detach support on mingw32.
13962 If the inferior doesn't support detaching return error.
13963 Call join_inferior instead of using waitpid.
13964 * linux-low.c (linux_join): New.
13965 (linux_target_op): Add linux_join.
13966 * spu-low.c (spu_join): New.
13967 (spu_target_ops): Add spu_join.
13968 * win32-low.c (win32_detach): Adapt to new interface.
13969 Reopen current_process_handle before detaching. Issue a child
13970 resume before detaching.
13971 (win32_join): New.
13972 (win32_target_op): Add win32_join.
13973
1d5315fe
PA
139742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13975
13976 * win32-low.c (win32-attach): Fix return value.
13977 * target.h (target_ops): Describe ATTACH return values.
13978
bf914831
PA
139792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13980
13981 * win32-low.c (GETPROCADDRESS): Define.
13982 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13983 (winapi_DebugSetProcessKillOnExit): Likewise.
13984 (win32_create_inferior): Force usage of ansi CreateProcessA.
13985 (win32_attach): Use GETPROCADDRESS.
13986 (win32_detach): Likewise.
13987
f72f3e60
PA
139882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13989
13990 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13991
ed50f18f
PA
139922007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13993
13994 * win32-low.c: Commit leftover changes from 2007-03-29.
13995
0c2ead7e
DJ
139962007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13997
13998 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13999 fields short instead of int. Add explicit padding.
14000 (i387_cache_to_fsave): Remove unnecessary casts.
14001 (i387_fsave_to_cache): Doc fix.
14002 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14003
73725ff3
DJ
140042007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14007 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14008
d99f33d8
PA
140092007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14010
14011 * configure.srv (arm*-*-mingw32ce*): Move near the other
14012 arm targets.
14013
68070c10
PA
140142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14015
2482afc6 14016 * configure.ac: Add errno checking.
68070c10
PA
14017 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14018 sys/file.h and malloc.h.
14019 (AC_CHECK_DECLS): Add perror.
14020 (srv_mingwce): Handle.
2482afc6 14021 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14022 win32-i386-low.o to srv_tgtobj.
14023 (i[34567]86-*-mingw*): Likewise.
14024 (arm*-*-mingw32ce*): Add case.
14025 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14026 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14027 [__MINGW32CE__] (strerror): New function.
14028 [__MINGW32CE__] (errno): Define to GetLastError.
14029 [__MINGW32CE__] (COUNTOF): New macro.
14030 (remote_open): Remove extra close call.
14031 * mem-break.c (delete_breakpoint_at): New function.
14032 * mem-break.h (delete_breakpoint_at): Declare.
14033 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14034 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14035 [USE_WIN32API] (read, write): Add char* casts.
14036 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14037 * server.h: Include wincecompat.h on Windows CE.
14038 [HAVE_ERRNO_H]: Check.
14039 (perror): Declare if not declared.
14040 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14041 (perror_with_name): Remove errno declaration.
14042 * wincecompat.h: New.
14043 * wincecompat.c: New.
14044 * win32-low.h: New.
14045 * win32-arm-low.c: New.
14046 * win32-i386-low.c: New.
14047 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14048 (OUTMSG2): Make it safe.
14049 (_T): New macro.
14050 (COUNTOF): New macro.
14051 (NUM_REGS): Get it from the low target.
14052 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14053 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14054 (thread_rec): Let low target handle debug registers.
14055 (child_add_thread): Likewise.
14056 (child_init_thread_list): Likewise.
14057 (continue_one_thread): Likewise.
14058 (regptr): New.
14059 (do_child_fetch_inferior_registers): Move to ...
14060 * win32-i386-low.c: ... here, and rename to ...
14061 (do_fetch_inferior_registers): ... this.
889bf7c5 14062 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14063 Go through the low target.
14064 (do_child_store_inferior_registers): Use regptr.
14065 (strwinerror): New function.
14066 (win32_create_inferior): Handle Windows CE.
14067 Use strwinerror instead of strerror on Windows error
14068 codes. Add program to the error output.
14069 Don't close the main thread handle on Windows CE.
14070 (win32_attach): Use coredll.dll on Windows CE.
14071 (win32_kill): Close current process and current
14072 thread handles.
14073 (win32_detach): Use coredll.dll on Windows CE.
14074 (win32_resume): Let low target handle debug registers, and
14075 step request.
14076 (handle_exception): Add/Remove initial breakpoint. Avoid
14077 non-existant WSTOPSIG on Windows CE.
14078 (win32_read_inferior_memory): Cast to remove warning.
14079 (win32_arch_string): Go through the low target.
14080 (initialize_low): Call set_breakpoint_data with the low
14081 target's breakpoint.
14082 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14083 FOP_REGNUM, mappings): Move to ...
14084 * win32-i386-low.c: ... here.
14085 * win32-low.c (win32_thread_info): Move to ...
14086 * win32-low.h: ... here.
14087 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14088 win32-arm-low.c and wincecompat.c.
14089 (all:): Add $EXEEXT.
14090 (install-only:): Likewise.
14091 (gdbserver:): Likewise.
14092 (gdbreplay:): Likewise.
14093 * config.in: Regenerate.
14094 * configure: Regenerate.
14095
41093d81
PA
140962007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14097
14098 * win32-low.c: Rename typedef thread_info to
14099 win32_thread_info throughout.
14100
544afa54
PA
141012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14102
14103 * win32-i386-low.c: Rename to ...
14104 * win32-low.c: ... this.
14105 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14106 * Makefile.in: Likewise.
14107
bce7165d
PA
141082007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14109
14110 * remote-utils.c (monitor_output): Constify msg parameter.
14111 * server.h (monitor_output): Likewise.
14112 * win32-i386-low.c (handle_output_debug_string): New.
14113 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14114 handle_output_debug_string.
14115 (get_child_debug_event): Likewise.
14116
506c7aa0
DJ
141172007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14118
14119 * server.c (main): Correct strtoul check.
14120
42c81e2a
DJ
141212007-03-27 Jon Ringle <jon@ringle.org>
14122
14123 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14124
9453113a
DJ
141252007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14126
14127 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14128
64a69107
DJ
141292007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * terminal.h: Check HAVE_SGTTY_H.
14132
141332007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14134
14135 * remote-utils.c (remote_open): Print out the assigned port number.
14136
c74d0ad8
DJ
141372007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * remote-utils.c (monitor_output): New function.
14140 * server.c (debug_threads): Define here.
14141 (monitor_show_help): New function.
14142 (handle_query): Handle qRcmd.
14143 (main): Do not handle 'd' packet.
14144 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14145 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14146 of debug_threads.
14147
de7c3b4a
PA
141482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14149
14150 * Makefile.in (EXEEXT): New.
14151 (clean): Use $(EXEEXT).
14152
ef57601b
PA
141532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14154
14155 * target.h (target_ops): Rename send_signal to request_interrupt,
14156 and remove enum target_signal parameter.
14157 * linux-low.c (linux_request_interrupt): Rename from
14158 linux_send_signal, and always send SIGINT.
14159 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14160 and always send SIGINT.
14161 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14162 of send_signal.
14163 (input_interrupt): Likewise.
14164
820f2bda
PA
141652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14166
14167 * server.c (get_features_xml): Check if target implemented
14168 arch_string.
14169 * win32-i386-low.c (win32_arch_string): New.
14170 (win32_target_ops): Add win32_arch_string as arch_string member.
14171
ab39bf24
UW
141722007-02-22 Markus Deuling <deuling@de.ibm.com>
14173
14174 * spu-low.c (spu_arch_string): New.
14175 (spu_target_ops): Add spu_arch_string.
14176
61ff6e04
DJ
141772007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14180 * configure.ac: Do not check for terminal.h.
14181 * configure, config.in: Regenerated.
14182
fb1e4ffc
DJ
141832007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * Makefile.in (OBS): Add $(XML_BUILTIN).
14186 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14187 (clean): Update.
14188 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14189 (arm-with-iwmmxt.c): New.
14190 * config.in, configure: Regenerate.
14191 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14192 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14193 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14194 (arm*-*-linux*): Add iWMMXt and regset support.
14195 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14196 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14197 (arm_store_wmmxregset, target_regsets): New.
14198 * server.c (get_features_xml): Take annex argument. Check builtin
14199 XML documents.
14200 (handle_query): Handle multiple annexes.
14201
0f48aa01
DJ
142022007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * remote-utils.c [USE_WIN32API] (read, write): Define.
14205 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14206 write.
14207
23181151
DJ
142082007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-i386-low.c (the_low_target): Set arch_string.
14211 * linux-x86-64-low.c (the_low_target): Likewise.
14212 * linux-low.c (linux_arch_string): New.
14213 (linux_target_ops): Add it.
14214 * linux-low.h (struct linux_target_ops): Add arch_string.
14215 * server.c (write_qxfer_response): Use const void * for DATA.
14216 (get_features_xml): New.
14217 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14218 * target.h (struct target_ops): Add arch_string method.
14219
9d606399
DJ
142202007-01-03 Denis Pilat <denis.pilat@st.com>
14221 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * linux-low.c (linux_kill): Handle being called with no threads.
14224 * win32-i386-low.c (win32_kill): Likewise.
14225 (get_child_debug_event): Clear current_process_handle.
14226
142272006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14228 Daniel Jacobowitz <dan@codesourcery.com>
14229
14230 * remote-utils.c (remote_open): Check the type of specified
14231 serial port devices before opening them.
14232 * server.c (main): Kill the inferior if an error occurs during
14233 the first remote_open.
14234
a5e13d24
DJ
142352006-12-05 Markus Deuling <deuling@de.ibm.com>
14236
14237 * README: Update supported targets.
14238
186947f7
DJ
142392006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14240
14241 * Makefile.in (clean): Remove reg-mips64.c.
14242 (reg-mips64.c, reg-mips64.o): New rules.
14243 * configure.srv: Handle mips64. Include regset support for mips.
14244 * linux-mips-low.c (union mips_register): New.
14245 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14246 (mips_breakpoint, mips_breakpoint_at): Use int.
14247 (mips_collect_register, mips_supply_register)
14248 (mips_collect_register_32bit, mips_supply_register_32bit)
14249 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14250 (mips_store_fpregset, target_regsets): New.
14251 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14252
a13e2c95
UW
142532006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14254
14255 * configure.srv: Add target "spu*-*-*".
14256 * Makefile.in (clean): Remove reg-spu.c.
14257 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14258 * spu-low.c: New file.
14259
cb7283db
DJ
142602006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14261
14262 * configure.ac: Correct td_thr_tls_get_addr test.
14263 * configure: Regenerated.
14264
89be2091
DJ
142652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * linux-low.c (linux_wait_for_event): Reformat. Use the
14268 pass_signals array.
14269 * remote-utils.c (decode_address_to_semicolon): New.
14270 * server.c (pass_signals, handle_general_set): New.
14271 (handle_query): Mention QPassSignals for qSupported.
14272 (main): Call handle_general_set.
14273 * server.h (pass_signals, decode_address_to_semicolon): New.
14274
000ef4f0
DJ
142752006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * server.c (handle_query): Correct error handling for read_auxv.
14278
b7149293
UW
142792005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14280
14281 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14282 and srv_linux_thread_db to yes.
14283 * linux-s390-low.c (s390_fill_gregset): New function.
14284 (target_regsets): Define data structure.
14285
dae5f5cf
DJ
142862006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14289 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14290 * config.in, configure: Regenerated.
14291 * inferiors.c (gdb_id_to_thread): New function.
14292 (gdb_id_to_thread_id): Use it.
14293 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14294 * linux-low.h (struct process_info): Add th member.
14295 (thread_db_get_tls_address): New prototype.
14296 * remote-utils.c (decode_address): Make non-static.
14297 * server.c (handle_query): Handle qGetTLSAddr.
14298 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14299 * target.h (struct target_ops): Add get_tls_address.
14300 * thread-db.c (maybe_attach_thread): Save the thread handle.
14301 (thread_db_get_tls_address): New.
14302
32ca6d61
DJ
143032006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14304
14305 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14306 (linux_resume_one_process): Take a siginfo_t *. Update all
14307 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14308 (struct pending_signals): Add a siginfo_t.
14309 (linux_wait_for_process): Always set last_status.
14310 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14311 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14312 * linux-low.h (struct process_info): Add last_status.
14313
5ffff7c1
DJ
143142006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * remote-utils.c (try_rle): New function.
14317 (putpkt_binary): Use it.
14318
8695c747
DJ
143192006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14322 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14323 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14324 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14325 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14326 point registers.
14327
290fadea
RS
143282006-08-08 Richard Sandiford <richard@codesourcery.com>
14329
14330 * server.c (terminal_fd): New variable.
14331 (old_foreground_pgrp): Likewise.
14332 (restore_old_foreground_pgrp): New function.
14333 (start_inferior): Record the terminal file descriptor in terminal_fd
14334 and its original foreground group in old_foreground_pgrp. Register
14335 restore_old_foreground_pgrp with atexit().
14336
9f2e1e63
DJ
143372006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * server.c (handle_query): Correct qPart to qXfer.
14340
b80864fb
DJ
143412006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * configure.ac: Check for more headers which are missing on
14344 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14345 * configure.srv: Add Cygwin and mingw32.
14346 * remote-utils.c: Don't include headers unconditionally which
14347 are missing on mingw32. Include <winsock.h> for mingw32.
14348 (remote_open): Adjust for mingw32 support. Flush
14349 standard error after writing to it.
14350 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14351 (unblock_async_io, enable_async_io, disable_async_io)
14352 (readchar, getpkt): Update for Winsock support.
14353 (prepare_resume_reply): Expect a protocol signal number.
14354 * server.c: Disable <sys/wait.h> on mingw32.
14355 (start_inferior): Adjust for mingw32 support. Flush
14356 standard error after writing to it.
14357 (attach_inferior): Likewise. Use protocol signal
14358 numbers.
14359 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14360 and names.
14361 * win32-i386-low.c: New file.
14362 * Makefile.in (XM_CLIBS): Set.
14363 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14364 (win32-i386-low.o): New dependency rule.
14365 * linux-low.c (linux_wait): Use target signal numbers.
14366 * target.h (struct target_ops): Doc fix.
14367 * server.h (target_signal_to_name): New prototype.
14368 * gdbreplay.c: Don't include headers unconditionally which
14369 are missing on mingw32. Include <winsock.h> for mingw32.
14370 (remote_close, remote_open): Adjust for Winsock support.
14371 * configure, config.in: Regenerated.
14372
0876f84a
DJ
143732006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14374
14375 * server.c (decode_xfer_read, write_qxfer_response): New.
14376 (handle_query): Take a packet length argument. Handle
14377 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14378 the qSupported response.
14379 (main): Update call to handle_query.
14380
01f9e8fa
DJ
143812006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14382
14383 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14384 (putpkt_binary): Renamed from putpkt and adjusted for binary
14385 data.
14386 (putpkt): New wrapper for putpkt_binary.
14387 (readchar): Don't mask off the high bit.
14388 (decode_X_packet): New function.
14389 * server.c (main): Call putpkt_binary if a handler sets the packet
14390 length. Save the length of the incoming packet. Handle 'X'.
14391 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14392
be2a5f71
DJ
143932006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14394
14395 * server.c (handle_query): Handle qSupported.
14396
ea025f5f
DJ
143972006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * remote-utils.c (all_symbols_looked_up): New variable.
14400 (look_up_one_symbol): Check it.
14401 * server.h (look_up_one_symbol): New declaration.
14402 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14403
9308fc88
DJ
144042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14405
14406 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14407 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14408 (PTRACE_GET_THREAD_AREA): Define.
14409 (ps_get_thread_area): New function.
14410
52fb6437
NS
144112006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14412
14413 * configure.srv (m68k*-*-uclinux*): New target.
14414 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14415 (linux_resume_one_process): Remove extraneous cast.
14416 (linux_read_offsets): New.
14417 (linux_target_op): Add linux_read_offsets on mmuless systems.
14418 * server.c (handle_query): Add qOffsets logic.
14419 * target.h (struct target_ops): Add read_offsets.
14420
21b0f40c
DJ
144212006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14424 (PTRACE_GET_THREAD_AREA): Define.
14425 (ps_get_thread_area): New function.
14426 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14427 (linux-x86-64-low.o): Update.
14428
0050a760
DJ
144292006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14430
14431 * configure.ac: Remove checks for prfpregset_t.
14432 * gdb_proc_service.h: New file.
14433 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14434 new "gdb_proc_service.h".
14435 * proc-service.c: Likewise.
14436 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14437 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14438 * Makefile.in (gdb_proc_service_h): Updated.
14439 * configure, config.in: Regenerated.
14440
b92a518e
DJ
144412006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * remote-utils.c (prepare_resume_reply): Move declaration
14444 of gdb_id_from_wait to the top of the block.
14445
545587ee
DJ
144462006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * linux-low.c (regsets_store_inferior_registers): Read the regset
14449 from the target before filling it.
14450
9db87ebd
DJ
144512006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14452
14453 * server.c (attach_inferior): Return SIGTRAP for a successful
14454 attach.
14455
dd24457d
DJ
144562006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14457
14458 * Makefile.in (OBS): Add version.o.
14459 (STAGESTUFF): Delete.
14460 (version.o): Add dependencies.
14461 (version.c): Replace rule.
14462 (clean): Remove version.c.
14463 * server.c (gdbserver_version): New.
14464 (gdbserver_usage): Use printf.
14465 (main): Handle --version and --help.
14466 * server.h (version, host_name): Add declarations.
14467
6f0f660e
EZ
144682005-12-23 Eli Zaretskii <eliz@gnu.org>
14469
889bf7c5
PA
14470 * linux-arm-low.c:
14471 * linux-arm-low.c:
14472 * inferiors.c:
14473 * i387-fp.h:
14474 * i387-fp.c:
14475 * gdbreplay.c:
14476 * regcache.c:
14477 * proc-service.c:
14478 * mem-break.h:
14479 * mem-break.c:
14480 * linux-x86-64-low.c:
14481 * linux-sh-low.c:
14482 * linux-s390-low.c:
14483 * linux-ppc64-low.c:
14484 * linux-ppc-low.c:
14485 * linux-mips-low.c:
14486 * linux-m68k-low.c:
14487 * linux-m32r-low.c:
14488 * linux-low.h:
14489 * linux-low.c:
14490 * linux-ia64-low.c:
14491 * linux-i386-low.c:
14492 * linux-crisv32-low.c:
14493 * thread-db.c:
14494 * terminal.h:
14495 * target.h:
14496 * target.c:
14497 * server.h:
14498 * server.c:
14499 * remote-utils.c:
14500 * regcache.h:
14501 * utils.c:
14502 * Makefile.in:
14503 * configure.ac:
6f0f660e
EZ
14504 * gdbserver.1: Add (C) after Copyright. Update the FSF
14505 address.
14506
9d1fb177
DJ
145072005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14508
14509 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14510 (arm_breakpoint_at): Recognize both breakpoints.
14511 (the_low_target): Use the correct breakpoint instruction.
14512
011a70c2
DJ
145132005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14516 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14517 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14518 (the_low_target): Update.
14519
7fb85e41
AS
145202005-10-25 Andreas Schwab <schwab@suse.de>
14521
14522 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14523
14524 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14525 (ia64_num_regs): Reduce to 462.
14526
3db0444b
DJ
145272005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * acinclude.m4: Correct quoting.
14530 * aclocal.m4: Regenerated.
14531
14532 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14533 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14534 (thread_db_init): Call thread_db_err_str.
14535 * configure.ac: Check for TD_VERSION.
14536 * config.in, configure: Regenerated.
14537
bee0189a
DJ
145382005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14539
14540 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14541
e9d25b98
DJ
145422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14543
14544 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14545 is not available. Define HAVE_PTRACE_GETREGS if it is.
14546 * config.in, configure: Regenerated.
14547 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14548 * linux-i386-low.c, linux-m68k-low.c: Update to use
14549 HAVE_PTRACE_GETREGS.
14550 * linux-low.c (regsets_fetch_inferior_registers)
14551 (regsets_store_inferior_registers): Only return 0 if we processed
14552 GENERAL_REGS.
14553 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14554 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14555
a06660f7
DJ
145562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14557
14558 * inferiors.c (struct thread_info): Add gdb_id.
14559 (add_thread): Add gdb_id argument.
14560 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14561 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14562 calls to add_thread.
14563 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14564 * server.c (handle_query): Use thread_to_gdb_id.
14565 (handle_v_cont, main): Use gdb_id_to_thread_id.
14566 * server.h (add_thread): Update prototype.
14567 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14568 prototypes.
14569
5a1f5858
DJ
145702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14571
14572 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14573 left-padded registers.
14574 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14575 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14576
e122f1f5
SE
145772005-07-01 Steve Ellcey <sje@cup.hp.com>
14578
14579 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14580 * configure: Regenerate.
14581 * config.in: Regenerate.
14582 * server.h (NEED_DECLARATION_STRERROR):
14583 Replace with !HAVE_DECL_STRERROR.
14584
d592fa2f
DJ
145852005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * linux-low.c (linux_wait, linux_send_signal): Don't test
14588 an unsigned long variable for > 0 if it could be MAX_ULONG.
14589 * server.c (myresume): Likewise.
14590 * target.c (set_desired_inferior): Likewise.
14591
ccbd4912
MK
145922005-06-13 Mark Kettenis <kettenis@gnu.org>
14593
14594 * configure.ac: Simplify and improve check for socklen_t.
14595 * configure, config.in: Regenerate.
14596
f450004a
DJ
145972005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14598
14599 * acconfig.h: Remove.
14600 * configure.ac: Add a test for socklen_t. Use three-argument
14601 AC_DEFINE throughout.
14602 * config.in: Regenerated using autoheader 2.59.
14603 * configure: Regenerated.
14604
14605 * gdbreplay.c (socklen_t): Provide a default.
14606 (remote_open): Use socklen_t.
14607 * remote-utils.c (socklen_t): Provide a default.
14608 (remote_open): Use socklen_t.
14609 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14610 unsigned char.
14611
14612 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14613 char for buffers.
14614 * linux-low.c (linux_read_memory, linux_write_memory)
14615 (linux_read_auxv): Likewise.
14616 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14617 (check_mem_write): Likewise.
14618 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14619 Likewise.
14620 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14621 (registers_from_string, register_data): Likewise.
14622 * server.c (handle_query, main): Likewise.
14623 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14624 (decode_M_packet): Likewise.
14625 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14626 * target.h (struct target_ops): Update read_memory, write_memory,
14627 and read_auxv.
14628 (read_inferior_memory, write_inferior_memory): Update.
14629 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14630 to unsigned char *.
14631 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14632 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14633 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14634 linux-s390-low.c, linux-sh-low.c: Update for changes in
14635 read_inferior_memory and the_low_target->breakpoint.
14636
eee84df1
DJ
146372005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14638
14639 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14640 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14641 * configure.srv: Add powerpc64-*-linux*.
14642 * linux-ppc64-low.c: New file.
14643
45b134e5
OF
146442005-05-23 Orjan Friberg <orjanf@axis.com>
14645
14646 * linux-cris-low.c: New file with support for CRIS.
14647 * linux-crisv32-low.c: Ditto for CRISv32.
14648 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14649 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14650 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14651 reg-crisv32.o, and reg-crisv32.c to make rules.
14652 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14653 recognized targets.
14654
48d93c75
UW
146552005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14656
14657 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14658 of sizeof (PTRACE_XFER_TYPE).
14659 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14660
e013ee27
OF
146612005-05-12 Orjan Friberg <orjanf@axis.com>
14662
889bf7c5 14663 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14664 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14665 pointers for hardware watchpoint support.
14666 * linux-low.h (struct linux_target_ops): Ditto.
14667 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14668 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14669 to linux_target_ops.
14670 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14671 reply packet.
14672 * server.c (main): Recognize 'Z' and 'z' packets.
14673
b0ded00b
UW
146742005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14675
14676 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14677 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14678 (the_low_target): Add new members.
14679
8643e2ad
DJ
146802005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * proc-service.c (ps_lgetregs): Search all_processes instead of
14683 all_threads.
14684
fc620387
DJ
146852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * server.c (start_inferior): Change return type to int.
14688 (attach_inferior): Change sigptr to int *.
14689 (handle_v_cont, handle_v_requests): Change signal to int *.
14690 (main): Change signal to int.
14691
146922005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14693
14694 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14695 * configure.srv: Add m32r*-*-linux*.
14696 * linux-m32r-low.c: New file.
14697
e0e76420
DJ
146982005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14701
a1928bad
DJ
147022005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14705 Take unsigned long arguments for PIDs.
14706 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14707 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14708 (wait_for_sigstop, linux_resume_one_process)
14709 (regsets_fetch_inferior_registers, linux_send_signal)
14710 (linux_read_auxv): Likewise. Update the types of variables holding
14711 PIDs. Update format string specifiers.
14712 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14713 * remote-utils.c (prepare_resume_reply): Likewise.
14714 * server.c (cont_thread, general_thread, step_thread)
14715 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14716 unsigned long.
14717 (handle_query): Update format specifiers.
14718 (handle_v_cont, main): Use strtoul for thread IDs.
14719 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14720 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14721 (general_thread, step_thread, thread_from_wait)
14722 (old_thread_from_wait): Update.
14723 * target.h (struct thread_resume): Use unsigned long for THREAD.
14724 (struct target_ops): Use unsigned long for arguments to attach and
14725 thread_alive.
14726
dcdb98d2
DJ
147272005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14728
14729 * acinclude.m4: Include bfd/bfd.m4 directly.
14730 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14731 <agriffis@toolchain.org>.
14732 * aclocal.m4, configure: Regenerated.
14733
bec39cab
AC
147342005-01-07 Andrew Cagney <cagney@gnu.org>
14735
14736 * configure.ac: Rename configure.in, require autoconf 2.59.
14737 * configure: Re-generate.
14738
434c4c77
DJ
147392004-12-08 Daniel Jacobowitz <dan@debian.org>
14740
14741 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14742 LIBS when finished.
14743 * aclocal.m4: Regenerated.
14744 * configure: Regenerated.
14745
db1d3e1b
AS
147462004-11-21 Andreas Schwab <schwab@suse.de>
14747
14748 * linux-m68k-low.c (m68k_num_gregs): Define.
14749 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14750 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14751 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14752 (m68k_breakpoint_at): New. Add to the_low_target.
14753
14754 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14755 srv_linux_thread_db to yes.
14756
43360365
JB
147572004-10-20 Joel Brobecker <brobecker@gnat.com>
14758
14759 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14760 (ARCH_SET_FS): Likewise.
14761 (ARCH_GET_FS): Likewise.
14762 (ARCH_GET_GS): Likewise.
14763
fd500816
DJ
147642004-10-16 Daniel Jacobowitz <dan@debian.org>
14765
14766 * linux-i386-low.c (ps_get_thread_area): New.
14767 * linux-x86-64-low.c (ps_get_thread_area): New.
14768 * linux-low.c: Include <sys/syscall.h>.
14769 (linux_kill_one_process): Don't kill the first thread here.
14770 (linux_kill): Kill the first thread here.
14771 (kill_lwp): New function.
14772 (send_sigstop, linux_send_signal): Use it.
14773 * proc-service.c: Clean up #ifdefs.
14774 (fpregset_info): Delete.
14775 (ps_lgetregs): Update and enable implementation.
14776 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14777 implementations.
14778 * remote-utils.c (struct sym_cache, symbol_cache): New.
14779 (input_interrupt): Print a clearer message.
14780 (async_io_enabled): New variable.
14781 (enable_async_io, disable_async_io): Use it. Update comments.
14782 (look_up_one_symbol): Use the symbol cache.
14783 * thread-db.c (thread_db_look_up_symbols): New function.
14784 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14785
f6de3c42
DJ
147862004-10-16 Daniel Jacobowitz <dan@debian.org>
14787
14788 * configure.in: Test for -rdynamic.
14789 * configure: Regenerated.
14790 * Makefile (INTERNAL_LDFLAGS): New.
14791 (gdbserver, gdbreplay): Use it.
14792
2c0fc042
AC
147932004-09-02 Andrew Cagney <cagney@gnu.org>
14794
14795 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14796
075b3282
DJ
147972004-03-23 Daniel Jacobowitz <drow@mvista.com>
14798
14799 * linux-low.c (linux_wait): Clear all_processes list also.
14800
fa6a77dc
DJ
148012004-03-12 Daniel Jacobowitz <drow@mvista.com>
14802
14803 * linux-low.c: Include <errno.h>. Remove extern declaration of
14804 errno.
14805
6d782a97
DJ
148062004-03-12 Daniel Jacobowitz <drow@mvista.com>
14807
14808 * gdbreplay.c, server.h, utils.c: Update copyright years.
14809
3a7fb99b
DJ
148102004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14811
14812 * server.c (main): Print child status or termination signal from
14813 variable 'signal', not 'sig'.
14814
c3e735a6
DJ
148152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14816
14817 * linux-low.c (linux_read_memory): Change return type to
14818 int. Check for and return error from ptrace().
14819 * target.c (read_inferior_memory): Change return type to int. Pass
14820 back return status from the_target->read_memory().
14821 * target.h (struct target_ops): Adapt *read_memory() prototype.
14822 Update comment.
14823 (read_inferior_memory): Adapt prototype.
14824 * server.c (main): Return an error packet if
14825 read_inferior_memory() returns an error.
14826
a59d1c82
DJ
148272004-03-04 Daniel Jacobowitz <drow@mvista.com>
14828
14829 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14830 Unify with other clean targets.
14831
dc3f8883
DJ
148322004-02-29 Daniel Jacobowitz <drow@mvista.com>
14833
14834 * server.c (handle_v_cont): Call set_desired_inferior.
14835
89a208da
DJ
148362004-02-29 Daniel Jacobowitz <drow@mvista.com>
14837
14838 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14839
62ea82f5
DJ
148402004-02-29 Daniel Jacobowitz <drow@mvista.com>
14841
14842 * linux-low.c (linux_wait): Unblock async I/O.
14843 (linux_resume): Block and enable async I/O.
14844 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14845 * server.h (block_async_io, unblock_async_io): Add prototypes.
14846
6910d122
DJ
148472004-02-29 Daniel Jacobowitz <drow@mvista.com>
14848
14849 * remote-utils.c (remote_open): Print a status notice after
14850 opening a TCP port.
14851 * server.c (attach_inferior): Print a status notice after
14852 attaching.
14853
148542004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14855
14856 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14857
c89dc5d4
DJ
148582004-02-26 Daniel Jacobowitz <drow@mvista.com>
14859
14860 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14861 error packet.
14862 * server.c, target.h: Update copyright years.
14863
4b8dad4a
RM
148642004-02-25 Roland McGrath <roland@redhat.com>
14865
14866 * target.h (struct target_ops): New member `read_auxv'.
14867 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14868 * linux-low.c (linux_read_auxv): New function.
14869 (linux_target_ops): Initialize `read_auxv' member to that.
14870
d7446758
JB
148712004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14872
14873 Committed by Jim Blandy <jimb@redhat.com>.
14874
14875 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14876 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14877 instead of GPR_SIZE to distiguish s390 and s390x targets.
14878
5544ad89
DJ
148792004-01-31 Daniel Jacobowitz <drow@mvista.com>
14880
14881 * linux-low.c: Update copyright year.
14882 (check_removed_breakpoint): Clear pending_is_breakpoint.
14883 (linux_set_resume_request, linux_queue_one_thread)
14884 (resume_status_pending_p): New functions.
14885 (linux_continue_one_thread): Use process->resume.
14886 (linux_resume): Only resume threads if there are no pending events.
14887 * linux-low.h (struct process_info): Add resume request
14888 pointer.
14889
2a68b70e
DJ
148902004-01-30 Daniel Jacobowitz <drow@mvista.com>
14891
14892 * regcache.c (new_register_cache): Clear the allocated register
14893 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14894
64386c31
DJ
148952003-10-13 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * linux-low.c (linux_resume): Take a struct thread_resume *
14898 argument.
14899 (linux_wait): Update call.
14900 (resume_ptr): New static variable.
14901 (linux_continue_one_thread): Renamed from
14902 linux_continue_one_process. Use resume_ptr.
14903 (linux_resume): Use linux_continue_one_thread.
14904 * server.c (handle_v_cont, handle_v_requests): New functions.
14905 (myresume): New function.
14906 (main): Handle 'v' case.
14907 * target.h (struct thread_resume): New type.
14908 (struct target_ops): Change argument of "resume" to struct
14909 thread_resume *.
14910 (myresume): Delete macro.
14911
c938e9b0
L
149122003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14913
14914 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14915 (uninstall): Support DESTDIR.
14916
7f313d07
BC
14917Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14918
14919 * configure.srv: Add xscale*linux copy of arm*linux entry.
14920
3b2fc2ea
DJ
149212003-07-24 Daniel Jacobowitz <drow@mvista.com>
14922
14923 * linux-arm-low.c (arm_reinsert_addr): New function.
14924 (the_low_target): Add arm_reinsert_addr.
14925
1c0a559e
MK
149262003-07-08 Mark Kettenis <kettenis@gnu.org>
14927
14928 * mem-break.c: Remove whitespace at end of file.
14929
43d5792c
DJ
149302003-06-28 Daniel Jacobowitz <drow@mvista.com>
14931
14932 * configure.in: Check whether we need to prototype strerror.
14933 * server.h: Optionally prototype strerror.
14934 * gdbreplay.c (perror_with_name): Use strerror.
14935 * linux-low.c (linux_attach_lwp): Use strerror.
14936 * utils.c (perror_with_name): Use strerror.
14937 * config.in, configure: Regenerated.
14938
c8a86edf
DJ
149392003-06-28 Daniel Jacobowitz <drow@mvista.com>
14940
14941 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14942 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14943
73d37363
DJ
149442003-06-20 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * Makefile.in (SFILES): Update.
14947 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14948 low-sun3.c: Remove files.
14949
6ad8ae5c
DJ
149502003-06-17 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14953 (linux_detach_one_process, linux_detach): New functions.
14954 (linux_target_ops): Add linux_detach.
14955 * server.c (main): Handle 'D' packet.
14956 * target.h (struct target_ops): Add "detach" member.
14957 (detach_inferior): Define.
14958
1581182a
MK
149592003-06-13 Mark Kettenis <kettenis@gnu.org>
14960
14961 From Kelley Cook <kelleycook@wideopenwest.com>:
14962 * configure.srv: Accept i[34567]86 variants.
14963
e5379b03
DJ
149642003-06-05 Daniel Jacobowitz <drow@mvista.com>
14965
14966 * linux-low.c (linux_wait_for_event): Correct comment typos.
14967 (linux_resume_one_process): Call check_removed_breakpoint.
14968 (linux_send_signal): New function.
14969 (linux_target_ops): Add linux_send_signal.
14970 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14971 of kill.
14972 * target.h (struct target_ops): Add send_signal.
14973
2ff29de4
JB
149742003-05-29 Jim Blandy <jimb@redhat.com>
14975
14976 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14977 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14978 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14979 away part of the register's value.
14980
254787d4
DJ
149812003-03-26 Daniel Jacobowitz <drow@mvista.com>
14982
14983 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14984 (linux_wait_for_event, linux_init_signals): Likewise.
14985
94e10508
DJ
149862003-03-17 Daniel Jacobowitz <drow@mvista.com>
14987
14988 * configure.in: Check for stdlib.h.
14989 * configure: Regenerated.
14990 * config.in: Regenerated.
14991
4c0711e0
DJ
149922003-01-04 Andreas Schwab <schwab@suse.de>
14993
14994 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14995
ef66e766
AC
149962003-01-02 Andrew Cagney <ac131313@redhat.com>
14997
14998 * Makefile.in: Remove obsolete code.
14999
a1358604
DJ
150002002-11-20 Daniel Jacobowitz <drow@mvista.com>
15001
15002 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15003 defined(PT_FPR0_HI).
15004
23ce3b1c
DJ
150052002-11-17 Stuart Hughes <seh@zee2.com>
15006
15007 * linux-arm-low.c (arm_num_regs): Increase.
15008 (arm_regmap): Include status register.
15009
150102002-11-17 Daniel Jacobowitz <drow@mvista.com>
15011
15012 * linux-low.c (register_addr): Remove incorrect -1 check.
15013
a9fa9f7d
DJ
150142002-08-29 Daniel Jacobowitz <drow@mvista.com>
15015
15016 * linux-low.c (linux_create_inferior): Call setpgid. Return
15017 the new PID.
15018 (unstopped_p, linux_signal_pid): Remove.
15019 (linux_target_ops): Remove linux_signal_pid.
15020 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15021 global instead of target method.
15022 * target.h (struct target_ops): Remove signal_pid. Update comment
15023 for create_inferior.
15024 * server.c (signal_pid): New variable.
15025 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15026 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15027 (attach_inferior): Set signal_pid.
15028
17574093
DJ
150292002-08-23 Daniel Jacobowitz <drow@mvista.com>
15030
15031 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15032
150332002-08-20 Jim Blandy <jimb@redhat.com>
15034
15035 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15036 default for this.
15037
150382002-08-01 Andrew Cagney <cagney@redhat.com>
15039
15040 * Makefile.in: Make chill references obsolete.
15041
150422002-07-24 Kevin Buettner <kevinb@redhat.com>
15043
15044 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15045 * configure: Regenerate.
15046 * config.in: Regenerate.
15047
150482002-07-09 David O'Brien <obrien@FreeBSD.org>
15049
15050 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15051 (perror_with_name, remote_close, remote_open, expect, play): Static.
15052
150532002-07-04 Michal Ludvig <mludvig@suse.cz>
15054
4b8dad4a 15055 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15056 byte offsets instead of an array of indexes.
15057 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15058
150592002-06-13 Daniel Jacobowitz <drow@mvista.com>
15060
15061 * regcache.c: Add comment.
15062
150632002-06-11 Daniel Jacobowitz <drow@mvista.com>
15064
15065 * thread-db.c: New file.
15066 * proc-service.c: New file.
15067 * acinclude.m4: New file.
15068 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15069 proc-service.o, and thread-db.o.
15070 (linux-low.o): Add USE_THREAD_DB.
15071 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15072 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15073 * aclocal.m4: Regenerated.
15074 * config.in: Regenerated.
15075 * configure: Regenerated.
15076 * configure.in: Check for proc_service.h, sys/procfs.h,
15077 thread_db.h, and linux/elf.h headrs.
15078 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15079 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15080 Check for -lthread_db and thread support.
15081 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15082 PowerPC, and SuperH.
15083 * i387-fp.c: Constify arguments.
15084 * i387-fp.h: Likewise.
15085 * inferiors.c: (struct thread_info): Renamed from
15086 `struct inferior_info'. Remove PID member. Use generic inferior
15087 list header. All uses updated.
15088 (inferiors, signal_pid): Removed.
15089 (all_threads): New variable.
15090 (get_thread): Define.
15091 (add_inferior_to_list): New function.
15092 (for_each_inferior): New function.
15093 (change_inferior_id): New function.
15094 (add_inferior): Removed.
15095 (remove_inferior): New function.
15096 (add_thread): New function.
15097 (free_one_thread): New function.
15098 (remove_thread): New function.
15099 (clear_inferiors): Use for_each_inferior and free_one_thread.
15100 (find_inferior): New function.
15101 (find_inferior_id): New function.
15102 (inferior_target_data): Update argument type.
15103 (set_inferior_target_data): Likewise.
15104 (inferior_regcache_data): Likewise.
15105 (set_inferior_regcache_data): Likewise.
15106 * linux-low.c (linux_bp_reinsert): Remove.
15107 (all_processes, stopping_threads, using_thrads)
15108 (struct pending_signals, debug_threads, pid_of): New.
15109 (inferior_pid): Replace with macro.
15110 (struct inferior_linux_data): Remove.
15111 (get_stop_pc, add_process): New functions.
15112 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15113 Use add_process and add_thread.
15114 (linux_attach_lwp): New function, based on old linux_attach. Use
15115 add_process and add_thread. Set stop_expected for new threads.
15116 (linux_attach): New function.
15117 (linux_kill_one_process): New function.
15118 (linux_kill): Kill all LWPs.
15119 (linux_thread_alive): Use find_inferior_id.
15120 (check_removed_breakpoints, status_pending_p): New functions.
15121 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15122 Update. Use WNOHANG. Wait for cloned processes also. Update process
15123 struct for the found process.
15124 (linux_wait_for_event): New function.
15125 (linux_wait): Use it. Support LWPs.
15126 (send_sigstop, wait_for_sigstop, stop_all_processes)
15127 (linux_resume_one_process, linux_continue_one_process): New functions.
15128 (linux_resume): Support LWPs.
15129 (REGISTER_RAW_SIZE): Remove.
15130 (fetch_register): Use register_size instead. Call supply_register.
15131 (usr_store_inferior_registers): Likewise. Call collect_register.
15132 Fix recursive case.
15133 (regsets_fetch_inferior_registers): Improve error message.
15134 (regsets_store_inferior_registers): Add debugging.
15135 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15136 (unstopped_p, linux_signal_pid): New functions.
15137 (linux_target_ops): Add linux_signal_pid.
15138 (linux_init_signals): New function.
15139 (initialize_low): Call it. Initialize using_threads.
15140 * regcache.c (inferior_regcache_data): Add valid
15141 flag.
15142 (get_regcache): Fetch registers lazily. Add fetch argument
15143 and update all callers.
15144 (regcache_invalidate_one, regcache_invalidate): New
15145 functions.
15146 (new_register_cache): Renamed from create_register_cache.
15147 Return the new regcache.
15148 (free_register_cache): Change argument to a void *.
15149 (registers_to_string, registers_from_string): Call get_regcache
15150 with fetch flag set.
15151 (register_data): Make static. Pass fetch flag to get_regcache.
15152 (supply_register): Call get_regcache with fetch flag clear.
15153 (collect_register): Call get_regcache with fetch flag set.
15154 (collect_register_as_string): New function.
15155 * regcache.h: Update.
15156 * remote-utils.c (putpkt): Flush after debug output and use
15157 stderr.
15158 Handle input interrupts while waiting for an ACK.
15159 (input_interrupt): Use signal_pid method.
15160 (getpkt): Flush after debug output and use stderr.
15161 (outreg): Use collect_register_as_string.
15162 (new_thread_notify, dead_thread_notify): New functions.
15163 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15164 and general_thread.
15165 (look_up_one_symbol): Flush after debug output.
15166 * server.c (step_thread, server_waiting): New variables.
15167 (start_inferior): Don't use signal_pid. Update call to mywait.
15168 (attach_inferior): Update call to mywait.
15169 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15170 (main): Don't fetch/store registers explicitly. Use
15171 set_desired_inferior. Support proposed ``Hs'' packet. Update
15172 calls to mywait.
15173 * server.h: Update.
15174 (struct inferior_list, struct_inferior_list_entry): New.
15175 * target.c (set_desired_inferior): New.
15176 (write_inferior_memory): Constify.
15177 (mywait): New function.
15178 * target.h: Update.
15179 (struct target_ops): New signal_pid method.
15180 (mywait): Removed macro, added prototype.
15181
15182 * linux-low.h (regset_func): Removed.
15183 (regset_fill_func, regset_store_func): New.
15184 (enum regset_type): New.
15185 (struct regset_info): Add type field. Use new operation types.
15186 (struct linux_target_ops): stop_pc renamed to get_pc.
15187 Add decr_pc_after_break and breakpoint_at.
15188 (get_process, get_thread_proess, get_process_thread)
15189 (strut process_info, all_processes, linux_attach_lwp)
15190 (thread_db_init): New.
15191
15192 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15193 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15194 (the_low_target): Add new members.
15195 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15196 (i386_store_fpxregset): Constify.
15197 (target_regsets): Add new kind identifier.
15198 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15199 (i386_set_pc): Add debugging.
15200 (i386_breakpoint_at): New function.
15201 (the_low_target): Add new members.
15202 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15203 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15204 (mips_breakpoint_at): New.
15205 (the_low_target): Add new members.
15206 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15207 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15208 (the_low_target): Add new members.
15209 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15210 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15211 (the_low_target): Add new members.
15212 * linux-x86-64-low.c (target_regsets): Add new kind
15213 identifier.
15214
152152002-05-15 Daniel Jacobowitz <drow@mvista.com>
15216
15217 From Martin Pool <mbp@samba.org>:
15218 * server.c (gdbserver_usage): New function.
15219 (main): Call it.
15220
152212002-05-14 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15224 stop_at -> stop_pc.
15225
152262002-05-04 Andrew Cagney <ac131313@redhat.com>
15227
15228 * Makefile.in: Remove obsolete code.
15229
152302002-04-24 Michal Ludvig <mludvig@suse.cz>
15231
15232 * linux-low.c (regsets_fetch_inferior_registers),
15233 (regsets_store_inferior_registers): Removed cast to int from
15234 ptrace() calls.
15235 * regcache.h: Added declaration of struct inferior_info.
15236
152372002-04-20 Daniel Jacobowitz <drow@mvista.com>
15238
15239 * inferiors.c (struct inferior_info): Add regcache_data.
15240 (add_inferior): Call create_register_cache.
15241 (clear_inferiors): Call free_register_cache.
15242 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15243 * regcache.c (struct inferior_regcache_data): New.
15244 (registers): Remove.
15245 (get_regcache): New function.
15246 (create_register_cache, free_register_cache): New functions.
15247 (set_register_cache): Don't initialize the register cache here.
15248 (registers_to_string, registers_from_string, register_data): Call
15249 get_regcache.
15250 * regcache.h: Add prototypes.
15251 * server.h: Likewise.
15252
152532002-04-20 Daniel Jacobowitz <drow@mvista.com>
15254
15255 * mem-break.c: New file.
15256 * mem-break.h: New file.
15257 * Makefile.in: Add mem-break.o rule; update server.h
15258 dependencies.
15259 * inferiors.c (struct inferior_info): Add target_data
15260 member.
15261 (clear_inferiors): Free target_data member if set.
15262 (inferior_target_data, set_inferior_target_data): New functions.
15263 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15264 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15265 * linux-low.c (linux_bp_reinsert): New variable.
15266 (struct inferior_linux_data): New.
15267 (linux_create_inferior): Use set_inferior_target_data.
15268 (linux_attach): Likewise. Call add_inferior.
15269 (linux_wait_for_one_inferior): New function.
15270 (linux_wait): Call it.
15271 (linux_write_memory): Add const.
15272 (initialize_low): Call set_breakpoint_data.
15273 * linux-low.h (struct linux_target_ops): Add breakpoint
15274 handling members.
15275 * server.c (attach_inferior): Remove extra add_inferior
15276 call.
15277 * server.h: Include mem-break.h. Update inferior.c
15278 prototypes.
15279 * target.c (read_inferior_memory)
15280 (write_inferior_memory): New functions.
15281 * target.h (read_inferior_memory)
15282 (write_inferior_memory): Change macros to prototypes.
15283 (struct target_ops): Update comments. Add const to write_memory
15284 definition.
15285
152862002-04-11 Daniel Jacobowitz <drow@mvista.com>
15287
15288 * linux-low.c (usr_store_inferior_registers): Support
15289 registers which are allowed to fail to store.
15290 * linux-low.h (linux_target_ops): Likewise.
15291 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15292 (ppc_cannot_store_register): FPSCR may not be storable.
15293
152942002-04-09 Daniel Jacobowitz <drow@mvista.com>
15295
15296 * server.h: Include <string.h> if HAVE_STRING_H.
15297 * ChangeLog: Correct paths in last ChangeLog entry.
15298
152992002-04-09 Daniel Jacobowitz <drow@mvista.com>
15300
15301 * linux-low.h: Remove obsolete prototypes.
15302 (struct linux_target_ops): New.
15303 (extern the_low_target): New.
15304 * linux-low.c (num_regs, regmap): Remove declarations.
15305 (register_addr): Use the_low_target explicitly.
15306 (fetch_register): Likewise.
15307 (usr_fetch_inferior_registers): Likewise.
15308 (usr_store_inferior_registers): Likewise.
15309 * linux-arm-low.c (num_regs): Remove.
15310 (arm_num_regs): Define.
15311 (arm_regmap): Renamed from regmap, made static.
15312 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15313 made static.
15314 (arm_cannot_store_register): Renamed from cannot_store_register,
15315 made static.
15316 (the_low_target): New.
15317 * linux-i386-low.c (num_regs): Remove.
15318 (i386_num_regs): Define.
15319 (i386_regmap): Renamed from regmap, made static.
15320 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15321 made static.
15322 (i386_cannot_store_register): Renamed from cannot_store_register,
15323 made static.
15324 (the_low_target): New.
15325 * linux-ia64-low.c (num_regs): Remove.
15326 (ia64_num_regs): Define.
15327 (ia64_regmap): Renamed from regmap, made static.
15328 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15329 made static.
15330 (ia64_cannot_store_register): Renamed from cannot_store_register,
15331 made static.
15332 (the_low_target): New.
15333 * linux-m68k-low.c (num_regs): Remove.
15334 (m68k_num_regs): Define.
15335 (m68k_regmap): Renamed from regmap, made static.
15336 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15337 made static.
15338 (m68k_cannot_store_register): Renamed from cannot_store_register,
15339 made static.
15340 (the_low_target): New.
15341 * linux-mips-low.c (num_regs): Remove.
15342 (mips_num_regs): Define.
15343 (mips_regmap): Renamed from regmap, made static.
15344 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15345 made static.
15346 (mips_cannot_store_register): Renamed from cannot_store_register,
15347 made static.
15348 (the_low_target): New.
15349 * linux-ppc-low.c (num_regs): Remove.
15350 (ppc_num_regs): Define.
15351 (ppc_regmap): Renamed from regmap, made static.
15352 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15353 made static.
15354 (ppc_cannot_store_register): Renamed from cannot_store_register,
15355 made static.
15356 (the_low_target): New.
15357 * linux-s390-low.c (num_regs): Remove.
15358 (s390_num_regs): Define.
15359 (s390_regmap): Renamed from regmap, made static.
15360 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15361 made static.
15362 (s390_cannot_store_register): Renamed from cannot_store_register,
15363 made static.
15364 (the_low_target): New.
15365 * linux-sh-low.c (num_regs): Remove.
15366 (sh_num_regs): Define.
15367 (sh_regmap): Renamed from regmap, made static.
15368 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15369 made static.
15370 (sh_cannot_store_register): Renamed from cannot_store_register,
15371 made static.
15372 (the_low_target): New.
15373 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15374 (the_low_target): New.
15375
153762002-04-09 Daniel Jacobowitz <drow@mvista.com>
15377
15378 * Makefile.in: Add stamp-h target.
15379 * configure.in: Create stamp-h.
15380 * configure: Regenerated.
15381
153822002-04-09 Daniel Jacobowitz <drow@mvista.com>
15383
15384 * inferiors.c: New file.
15385 * target.c: New file.
15386 * target.h: New file.
15387 * Makefile.in: Add target.o and inferiors.o. Update
15388 dependencies.
15389 * linux-low.c (inferior_pid): New static variable,
15390 moved from server.c.
15391 (linux_create_inferior): Renamed from create_inferior.
15392 Call add_inferior. Return 0 on success instead of a PID.
15393 (linux_attach): Renamed from myattach.
15394 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15395 (linux_thread_alive): Renamed from mythread_alive.
15396 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15397 child dies.
15398 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15399 (regsets_store_inferior_registers): Correct error message.
15400 Add missing ``return 0''.
15401 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15402 (linux_store_registers): Renamed from store_inferior_registers.
15403 (linux_read_memory): Renamed from read_inferior_memory.
15404 (linux_write_memory): Renamed from write_inferior_memory.
15405 (linux_target_ops): New structure.
15406 (initialize_low): Call set_target_ops ().
15407 * remote-utils.c (unhexify): New function.
15408 (hexify): New function.
15409 (input_interrupt): Send signals to ``signal_pid''.
15410 * server.c (inferior_pid): Remove.
15411 (start_inferior): Update create_inferior call.
15412 (attach_inferior): Call add_inferior.
15413 (handle_query): New function.
15414 (main): Call handle_query for `q' packets.
15415 * server.h: Include "target.h". Remove obsolete prototypes.
15416 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15417
154182002-04-09 Daniel Jacobowitz <drow@mvista.com>
15419
15420 * Makefile.in: Add WARN_CFLAGS. Update configury
15421 dependencies.
15422 * configure.in: Check for <string.h>
15423 * configure: Regenerate.
15424 * config.in: Regenerate.
15425 * gdbreplay.c: Include needed system headers.
15426 (remote_open): Remove strchr prototype.
15427 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15428 * regcache.c (supply_register): Change buf argument to const void *.
15429 (supply_register_by_name): Likewise.
15430 (collect_register): Change buf argument to void *.
15431 (collect_register_by_name): Likewise.
15432 * regcache.h: Add missing prototypes.
15433 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15434 * server.c (handle_query): New function.
15435 (attached): New static variable, moved out of main.
15436 (main): Quiet longjmp clobber warnings.
15437 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15438 * utils.c (error): Remove NORETURN.
15439 (fatal): Likewise.