S390: Add guarded-storage register support to GDB
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
cc4d742f
SM
12017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2
3 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4
f6327dcb
KB
52017-09-21 Kevin Buettner <kevinb@redhat.com>
6
7 * linux-low.h (struct lwp_info): Add new field, thread_handle.
8 (thread_db_thread_handle): Declare.
9 * linux-low.c (linux_target_ops): Initialize thread_handle.
10 * server.c (handle_qxfer_threads_worker): Add support for
11 "handle" attribute.
12 * target.h (struct target_ops): Add new function pointer,
13 thread_handle.
14 (target_thread_handle): Define.
15 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
16 field in lwp.
17 (thread_db_thread_handle): New function.
18
86299109
KB
192017-09-21 Kevin Buettner <kevinb@redhat.com>
20
21 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
22 * linux-low.h (thread_db_notice_clone): Declare.
23 * thread-db.c (thread_db_notice_clone): New function.
24
f557a88a
PA
252017-09-21 Pedro Alves <palves@redhat.com>
26
27 * server.c (gdb_read_memory, handle_status, process_serial_event)
28 (handle_serial_event, handle_target_event): Adjust to
29 set_desired_thread prototype change.
30 * target.c (set_desired_thread): Remove 'use_general' parameter
31 and adjust.
32 * target.h (set_desired_thread): Remove 'use_general' parameter.
33
223ffa71
TT
342017-09-20 Tom Tromey <tom@tromey.com>
35
36 * target.c (target_terminal::terminal_state): Define.
37 (target_terminal::init): Rename from target_terminal_init.
38 (target_terminal::inferior): Rename from
39 target_terminal_inferior.
40 (target_terminal::ours): Rename from target_terminal_ours.
41 (target_terminal::ours_for_output, target_terminal::info): New.
42
04fd3ba9
SM
432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
44
45 * server.c (accumulate_file_name_length): Remove.
46 (emit_dll_description): Adjust to std::string change.
47 (handle_qxfer_libraries): Use std::string to hold document.
48
5e187554
SM
492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
50
51 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
52 return type of xml_escape_text.
53 * server.c (emit_dll_description): Likewise.
54
1526853e
SM
552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
56
57 * server.c (captured_main): Accept argument for --selftest.
58 Update run_tests call.
59 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
60 when registering selftests.
61
c4dfafab
SDJ
622017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
63
64 * regcache.c (get_thread_regcache): Update code to use "std::vector"
65 instead of "VEC" for "target_desc.reg_defs".
66 (regcache_cpy): Likewise.
67 (registers_to_string): Likewise.
68 (registers_from_string): Likewise.
69 (find_regno): Likewise.
70 (supply_regblock): Likewise.
71 (regcache_raw_read_unsigned): Likewise.
72 * tdesc.c (init_target_desc): Likewise.
73 (tdesc_create_reg): Likewise.
74 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
75 (struct target_desc) <reg_defs>: Convert to "std::vector".
76 (target_desc): Do not initialize "reg_defs".
77 (~target_desc): Update code to use "std::vector" instead of "VEC"
78 for "target_desc.reg_defs".
79 (operator==): Likewise.
80
124aceb4
SM
812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
82
83 * inferiors.h (thread_to_gdb_id): Remove.
84 * inferiors.c (thread_to_gdb_id): Remove.
85 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
86 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
87 lynx_store_registers, lynx_read_memory, lynx_write_memory):
88 Likewise.
89 * nto-low.c (nto_fetch_registers, nto_store_registers,
90 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
91
96cde54f
SM
922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
93
94 * inferiors.h (gdb_id_to_thread_id): Remove.
95 * inferiors.c (gdb_id_to_thread_id): Remove.
96 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
97 removal. Move pid declaration closer to where it's used.
98
e8ca139e
SM
992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
100
101 * server.c (handle_detach): New function.
102 (process_serial_event): Move code out, call handle_detach.
103
f8a4e119
SM
1042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
105
106 * server.c (require_running): Rename to ...
107 (require_running_or_return): ... this ...
108 (require_running_or_break): ... and this.
109 (handle_query, process_serial_event): Adjust.
110
0eb0a407
SM
1112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
112
113 * linux-low.c (linux_set_resume_request): Remove unused
114 variables.
115
785922a5
SM
1162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
117
118 * server.c (first_thread_of): Remove.
119 (process_serial_event): Replace usage of first_thread_of with
120 find_any_thread_of_pid.
121 * tracepoint.c (same_process_p): Remove.
122 (gdb_agent_about_to_close): Replace usage of same_process_p with
123 find_any_thread_of_pid.
124 * linux-x86-low.c (same_process_callback): Remove.
125 (x86_arch_setup_process_callback): Replace usage of
126 same_process_callback with find_any_thread_of_pid.
127 * thread-db.c (any_thread_of): Remove.
128 (switch_to_process): Replace usage of any_thread_of with
129 find_any_thread_of_pid.
130 * inferiors.c (thread_pid_matches_callback): Remove.
131 (find_thread_process): Adjust to use find_any_thread_of_pid.
132
a059f00c
SDJ
1332017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
134
135 * regcache.c (get_thread_regcache): Guard calls to "memset"
136 with "!VEC_empty".
137
cc397f3a
SDJ
1382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
139
140 * linux-low.c (handle_extended_wait): Use
141 "allocate_target_description" instead of "XNEW".
142 * linux-x86-low.c (initialize_low_arch): Likewise.
143
22916b07
YQ
1442017-09-05 Yao Qi <yao.qi@linaro.org>
145
146 * configure.srv (srv_i386_regobj): Remove.
147 (srv_amd64_regobj): Remove.
148 (srv_regobj): Set it to "" for x86 non-linux targets.
149 * linux-x86-tdesc.c (i386_linux_read_description):
150 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
151 (init_registers_i386): Remove the declaration.
152 (tdesc_i386): Remove the declaration.
153 (lynx_i386_arch_setup): Call i386_create_target_description.
154 * nto-x86-low.c: Likewise.
155 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
156 [!__x86_64__]: include arch/i386.h.
157 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
158
38602d55
YQ
1592017-09-05 Yao Qi <yao.qi@linaro.org>
160
161 * configure.srv (srv_amd64_linux_xmlfiles): Remove
162 i386/amd64-XXX-linux from it.
163
44b886ff
YQ
1642017-09-05 Yao Qi <yao.qi@linaro.org>
165
166 * configure.srv: Empty srv_amd64_linux_regobj if $development is
167 false.
168 (ipa_amd64_linux_regobj): Remove.
169 (ipa_x32_linux_regobj): Remove.
170
b4570e4b
YQ
1712017-09-05 Yao Qi <yao.qi@linaro.org>
172
173 * Makefile.in (arch-amd64.o): New rule.
174 * configure.srv: Append arch-amd64.o.
175 * linux-amd64-ipa.c: Include common/x86-xstate.h.
176 (get_ipa_tdesc): Call amd64_linux_read_description.
177 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
178 and init_registers_amd64_XXX.
179 * linux-x86-low.c (x86_linux_read_description): Call
180 amd64_linux_read_description.
181 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
182 (initialize_low_arch): Don't call init_registers_x32_XXX and
183 init_registers_amd64_XXX.
184 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
185 and tdesc_amd64_XXX.
186 [__x86_64__] (amd64_tdesc_test): New function.
187 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
188 and init_registers_amd64_XXX.
189 * linux-x86-tdesc.c: Include arch/amd64.h.
190 (xcr0_to_tdesc_idx): New function.
191 (i386_linux_read_description): New function.
192 (amd64_get_ipa_tdesc_idx): New function.
193 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
194 (amd64_get_ipa_tdesc): Declare.
195
d1f28ea2
YQ
1962017-09-05 Yao Qi <yao.qi@linaro.org>
197
198 * configure.srv (srv_i386_linux_xmlfiles): Remove
199 i386/i386-XXX-linux.xml from it.
200
25a93583
YQ
2012017-09-05 Yao Qi <yao.qi@linaro.org>
202
203 * configure.srv: Set srv_i386_linux_regobj empty if $development
204 is false.
205 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
206 initialize_low_tdesc.
207 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
208 with #if initialize_low_tdesc.
209 * linux-x86-tdesc-selftest.c: New file.
210 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
211
5f035c07
YQ
2122017-09-05 Yao Qi <yao.qi@linaro.org>
213
214 * Makefile.in (arch-i386.o): New rule.
215 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
216 (x86_64-*-linux*): Likewise.
217 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
218 include arch/i386.h.
219 (i386_linux_read_description): Remove code and call
220 i386_create_target_description.
221 * tdesc.c (allocate_target_description): New function.
222 * tdesc.h (set_tdesc_architecture): Remove declaration.
223 (set_tdesc_osabi): Likewise.
224
0abe8a89
YQ
2252017-09-05 Yao Qi <yao.qi@linaro.org>
226
227 * linux-x86-tdesc.c: Don't include <inttypes.h>.
228 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
229 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
230 .xmltarget.
231 * server.c (get_features_xml): Call tdesc_get_features_xml.
232 * tdesc.c (set_tdesc_architecture): New function.
233 (set_tdesc_osabi): New function.
234 (tdesc_get_features_xml): New function.
235 (tdesc_create_feature): Add an argument.
236 * tdesc.h (struct target_desc) <features>: New field.
237 <arch, osabi>: New field.
238 (~target_desc): xfree features, arch, and osabi.
239 (target_desc::oerator==): Don't compare .xmltarget.
240 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
241 (set_tdesc_osabi): Likewise.
242 (tdesc_get_features_xml): Likewise.
243
0a188386
YQ
2442017-09-05 Yao Qi <yao.qi@linaro.org>
245
246 * linux-x86-tdesc.c: Include selftest.h.
247 (i386_tdesc_test): New function.
248 (initialize_low_tdesc): Call selftests::register_test.
249 * tdesc.h: Include regdef.h.
250 (target_desc): Override operator == and !=.
251
f49ff000
YQ
2522017-09-05 Yao Qi <yao.qi@linaro.org>
253
254 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
255 (ipa_obj): Likewise.
256 * linux-i386-ipa.c: Include common/x86-xstate.h
257 (get_ipa_tdesc): Call i386_linux_read_description.
258 (initialize_low_tracepoint): Don't call init_registers_XXX
259 functions, call initialize_low_tdesc instead.
260 * linux-x86-low.c (x86_linux_read_description): Call
261 i386_linux_read_description.
262 (initialize_low_arch): Don't call init_registers_i386_XXX
263 functions, call initialize_low_tdesc.
264 * linux-x86-tdesc.c: New file.
265 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
266 (i386_get_ipa_tdesc_idx): Declare.
267 (i386_get_ipa_tdesc): Declare.
268 (initialize_low_tdesc): Declare.
269
2b68ef2f
YQ
2702017-09-05 Yao Qi <yao.qi@linaro.org>
271
272 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
273 instead of 0.
274
f7000548
YQ
2752017-09-05 Yao Qi <yao.qi@linaro.org>
276
277 * Makefile.in (IPA_OBJS): Add vec-ipa.o
278 * regcache.c (get_thread_regcache): Use VEC_length.
279 (init_register_cache): Likewise.
280 (regcache_cpy): Likewise.
281 (registers_to_string): Iterate reg_defs via VEC_iterate.
282 (find_regno): Likewise.
283 (find_register_by_number): Use VEC_index.
284 (register_size): Call find_register_by_number.
285 (register_data): Call find_register_by_number.
286 (supply_regblock): Use VEC_length.
287 (regcache_raw_read_unsigned): Likewise.
288 * tdesc.c (init_target_desc): Iterate reg_defs via
289 VEC_iterate.
290 (default_description): Update initializer.
291 (copy_target_description): Don't update field num_registers.
292 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
293 <num_registers>: Remove.
294
50a421ac
SM
2952017-09-04 Simon Marchi <simon.marchi@ericsson.com>
296
297 * Makefile.in (.SECONDARY): Define target.
298
23fdd69e
SM
2992017-09-03 Simon Marchi <simon.marchi@ericsson.com>
300
301 * linux-low.c (linux_wait_1): Adjust.
302 * server.c (queue_stop_reply_callback): Adjust.
303
0a2dde4a
SDJ
3042017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
305
306 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
307 QEnvironmentUnset and QEnvironmentReset packets.
308 (handle_query): Inform remote that QEnvironmentHexEncoded,
309 QEnvironmentUnset and QEnvironmentReset are supported.
310
6afd337d
SM
3112017-08-25 Simon Marchi <simon.marchi@ericsson.com>
312
313 * inferiors.h (inferior_target_data): Rename to ...
314 (thread_target_data): ... this.
315 (inferior_regcache_data): Rename to ...
316 (thread_regcache_data): ... this.
317 (set_inferior_regcache_data): Rename to ...
318 (set_thread_regcache_data): ... this.
319 * inferiors.c (inferior_target_data): Rename to ...
320 (thread_target_data): ... this.
321 (inferior_regcache_data): Rename to ...
322 (thread_regcache_data): ... this.
323 (set_inferior_regcache_data): Rename to ...
324 (set_thread_regcache_data): ... this.
325 (free_one_thread): Update.
326 * linux-low.h (get_thread_lwp): Update.
327 * regcache.c (get_thread_regcache): Update.
328 (regcache_invalidate_thread): Update.
329 (free_register_cache_thread): Update.
330 * win32-i386-low.c (update_debug_registers_callback): Update.
331 (win32_get_current_dr): Update.
332 * win32-low.c (thread_rec): Update.
333 (delete_thread_info): Update.
334 (continue_one_thread): Update.
335 (suspend_one_thread): Update.
336
a160cc46
SM
3372017-08-24 Simon Marchi <simon.marchi@ericsson.com>
338
339 * inferiors.c (set_inferior_target_data): Remove.
340 * inferiors.h (set_inferior_target_data): Remove.
341
6d580b63
YQ
3422017-08-18 Yao Qi <yao.qi@linaro.org>
343
344 * Makefile.in (OBS): Add selftest.o.
345 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
346 * configure, config.in: Re-generated.
347 * server.c: Include common/sefltest.h.
348 (captured_main): Handle option --selftest.
349
f5a29eb0
YQ
3502017-08-09 Yao Qi <yao.qi@linaro.org>
351
352 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
353 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
354 i386-avx-mpx.o and i386-mmx.o.
355 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
356 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
357 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
358 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
359 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
360 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
361 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
362 i386/amd64-avx-mpx.xml.
363
57757c2f
YQ
3642017-08-09 Yao Qi <yao.qi@linaro.org>
365
366 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
367 and x32-avx-avx512.o.
368 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
369 i386/x32-avx-avx512.xml.
370
229d26fc
SM
3712017-07-26 Simon Marchi <simon.marchi@ericsson.com>
372
373 * tracepoint.h (enum class fast_tpoint_collect_result): New
374 enumeration.
375 (fast_tracepoint_collecting): Change return type to
376 fast_tpoint_collect_result.
377 * tracepoint.c (fast_tracepoint_collecting): Likewise.
378 * linux-low.h: Include tracepoint.h.
379 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
380 fast_tpoint_collect_result.
381 * linux-low.c (handle_tracepoints): Adjust.
382 (linux_fast_tracepoint_collecting): Change return type to
383 fast_tpoint_collect_result.
384 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
385 linux_wait_1, stuck_in_jump_pad_callback,
386 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
387 proceed_one_lwp): Adjust to type change.
388
2e1e43e1
YQ
3892017-07-10 Yao Qi <yao.qi@linaro.org>
390
391 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
392
adc764e7
YQ
3932017-06-29 Yao Qi <yao.qi@linaro.org>
394
395 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
396 Remove.
397 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
398
a206891a
SM
3992017-06-20 Simon Marchi <simon.marchi@ericsson.com>
400
401 * Makefile.in (IPA_OBJS): Sort and format one item per line.
402
9a6c7d9c
SDJ
4032017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
404
405 * linux-low.c (linux_create_inferior): Adjust code to access the
406 environment information via 'gdb_environ' class.
407 * lynx-low.c (lynx_create_inferior): Likewise.
408 * server.c (our_environ): Make it an instance of 'gdb_environ'.
409 (get_environ): Return a pointer to 'our_environ'.
410 (captured_main): Initialize 'our_environ'.
411 * server.h (get_environ): Adjust prototype.
412 * spu-low.c (spu_create_inferior): Adjust code to access the
413 environment information via 'gdb_environ' class.
414
ae3e2ccf
SM
4152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
416
417 * linux-low.c (linux_read_memory, linux_write_memory): Remove
418 usage of "register" keyword.
419
3e019bdc
SM
4202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
421
422 * configure: Re-generate.
423
8465943a
SM
4242017-06-17 Simon Marchi <simon.marchi@ericsson.com>
425
426 * configure: Re-generate.
427
cf0dd6f0
SM
4282017-06-17 Simon Marchi <simon.marchi@ericsson.com>
429
430 * Makefile.in (COMPILE.pre): Add "-x c++".
431
9845682b
SDJ
4322017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
433
434 * fork-child.c: Conditionally include <signal.h>.
435
aefd8b33
SDJ
4362017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
437
438 * server.c (handle_general_set): Handle new packet
439 "QStartupWithShell".
440 (handle_query): Add "QStartupWithShell" to the list of supported
441 packets.
442 (gdbserver_usage): Add help text explaining the
443 new "--startup-with-shell" and "--no-startup-with-shell" CLI
444 options.
445 (captured_main): Recognize and act upon the presence of the new
446 CLI options.
447
2090129c
SDJ
4482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
449 Pedro Alves <palves@redhat.com>
450
451 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
452 * configure: Regenerate.
453 * configure.srv (srv_linux_obj): Add "fork-child.o" and
454 "fork-inferior.o".
455 (i[34567]86-*-lynxos*): Likewise.
456 (spu*-*-*): Likewise.
457 * fork-child.c: New file.
458 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
459 and "environ.h".
460 (linux_ptrace_fun): New function.
461 (linux_create_inferior): Adjust function prototype to reflect
462 change on "target.h". Adjust function code to use
463 "fork_inferior".
464 (linux_request_interrupt): Delete "signal_pid".
465 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
466 (lynx_ptrace_fun): New function.
467 (lynx_create_inferior): Adjust function prototype to reflect
468 change on "target.h". Adjust function code to use
469 "fork_inferior".
470 * nto-low.c (nto_create_inferior): Adjust function prototype and
471 code to reflect change on "target.h". Update comments.
472 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
473 "common-terminal.h" and "environ.h".
474 (terminal_fd): Moved to fork-child.c.
475 (old_foreground_pgrp): Likewise.
476 (restore_old_foreground_pgrp): Likewise.
477 (last_status): Make it global.
478 (last_ptid): Likewise.
479 (our_environ): New variable.
480 (startup_with_shell): Likewise.
481 (program_name): Likewise.
482 (program_argv): Rename to...
483 (program_args): ...this.
484 (wrapper_argv): New variable.
485 (start_inferior): Delete function.
486 (get_exec_wrapper): New function.
487 (get_exec_file): Likewise.
488 (get_environ): Likewise.
489 (prefork_hook): Likewise.
490 (post_fork_inferior): Likewise.
491 (postfork_hook): Likewise.
492 (postfork_child_hook): Likewise.
493 (handle_v_run): Update code to deal with arguments coming from the
494 remote host. Update calls from "start_inferior" to
495 "create_inferior".
496 (captured_main): Likewise. Initialize environment variable. Call
497 "have_job_control".
498 * server.h (post_fork_inferior): New prototype.
499 (get_environ): Likewise.
500 (last_status): Declare.
501 (last_ptid): Likewise.
502 (signal_pid): Likewise.
503 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
504 (spu_ptrace_fun): New function.
505 (spu_create_inferior): Adjust function prototype to reflect change
506 on "target.h". Adjust function code to use "fork_inferior".
507 * target.c (target_terminal_init): New function.
508 (target_terminal_inferior): Likewise.
509 (target_terminal_ours): Likewise.
510 * target.h: Include <vector>.
511 (struct target_ops) <create_inferior>: Update prototype.
512 (create_inferior): Update macro.
513 * utils.c (gdb_flush_out_err): New function.
514 * win32-low.c (win32_create_inferior): Adjust function prototype
515 and code to reflect change on "target.h".
516
043a4934
SDJ
5172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
518
519 * inferiors.c (switch_to_thread): New function.
520
15652511
SDJ
5212017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
522
523 * Makefile.in (SFILE): Add "common/job-control.c".
524 (OBS): Add "job-control.o".
525
21ea5acd
SDJ
5262017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
527
528 * Makefile: Remove "@host_makefile_frag@".
529
e13cb306
PA
5302017-05-05 Pedro Alves <palves@redhat.com>
531
532 * configure: Regenerate.
533
c94fee56
SDJ
5342017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
535
536 * configure: Regenerate.
537
a0ff9e1a
SM
5382017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
539
540 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
541 software_single_step change of return type to
542 std::vector<CORE_ADDR>.
543 * linux-low.c (install_software_single_step_breakpoints):
544 Likewise.
545 * linux-low.h (install_software_single_step_breakpoints):
546 Likewise.
547
be628ab8
SDJ
5482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
549
550 * remote-utils.c: Include "gdb_termios.h" instead of
551 "terminal.h".
552 * terminal.h: Delete file.
553
7c5ded6a
SDJ
5542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
555
556 * server.c: Include <vector>.
557 <program_argv, wrapper_argv>: Convert to std::vector.
558 (start_inferior): Rewrite function to use C++.
559 (handle_v_run): Likewise. Update code that calculates the argv
560 based on the vRun packet; use C++.
561 (captured_main): Likewise.
562
436252de
SM
5632017-04-06 Simon Marchi <simon.marchi@ericsson.com>
564
565 * server.c (handle_v_cont): Initialize thread_resume::thread
566 with null_ptid.
567
9bf2a700
PA
5682017-04-05 Pedro Alves <palves@redhat.com>
569
570 * configure: Regenerate.
571
a121b7c1
PA
5722017-04-05 Pedro Alves <palves@redhat.com>
573
574 * gdbreplay.c (sync_error): Constify.
575 * linux-x86-low.c (push_opcode): Constify.
576
21c8a587
PA
5772017-04-05 Pedro Alves <palves@redhat.com>
578
579 * win32-low.c (get_child_debug_event)
580 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
581 Report TARGET_WAITKIND_SPURIOUS instead.
582
fb32b4f7
PA
5832017-04-05 Pedro Alves <palves@redhat.com>
584
585 * remote-utils.c (remote_prepare, remote_open): Constify.
586 * remote-utils.h (remote_prepare, remote_open): Constify.
587 * server.c (captured_main): Constify 'port' handling.
588
65dd1e59
SM
5892017-04-04 Simon Marchi <simon.marchi@ericsson.com>
590
591 * Makefile.in (clean): Clear .deps.
592
8fa5b777
SM
5932017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
594
595 * .gitignore: Remove generated files, replace with wildcard.
596 * (clean): Replace removal of generated files with wildcard.
597 (version.c): Replace with...
598 (version-generated.c): ...this.
599 (xml-builtin.c): Replace with...
600 (xml-builtin-generated.c): ...this.
601 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
602 (%.c: *regformats*): Replace with...
603 (%-generated.c: *regformats*): ...this.
604
a12e714b
MF
6052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
606
607 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
608 (xtensa_fill_gregset): Call collect_register_by_name for
609 threadptr register.
610 (xtensa_store_gregset): Call supply_register_by_name for
611 threadptr register.
612
1a09b50a
MF
6132017-03-27 Max Filippov <jcmvbkbc@gmail.com>
614
615 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
616 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
617 (xtensa_store_gregset): Call supply_register for all registers in
618 a0_regnum..a0_regnum + C0_NREGS range.
619
1a01e7c6
SM
6202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
621
622 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
623 (ax-ipa.o: ax.c): Remove.
624 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
625 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
626 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
627 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
628 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
629
36bc18a8
SM
6302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
631
632 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
633 (print-utils-ipa.o: ../common/print-utils.c): Remove.
634 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
635 (errors-ipa.o: ../common/errors.c): Remove.
636 (format-ipa.o: ../common/format.c): Remove.
637 (common-utils-ipa.o: ../common/common-utils.c): Remove.
638
a8ebe3d5
SM
6392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
640
641 * Makefile.in (%-ipa.o: %.c): New rule.
642 (tracepoint-ipa.o: tracepoint.c): Remove.
643 (utils-ipa.o: utils.c): Remove.
644 (remote-utils-ipa.o: remote-utils.c): Remove.
645 (regcache-ipa.o: regcache.c): Remove.
646 (i386-linux-ipa.o: i386-linux.c): Remove.
647 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
648 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
649 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
650 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
651 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
652 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
653 (amd64-linux-ipa.o: amd64-linux.c): Remove.
654 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
655 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
656 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
657 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
658 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
659 (aarch64-ipa.o: aarch64.c): Remove.
660 (s390-linux32-ipa.o: s390-linux32.c): Remove.
661 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
662 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
663 (s390-linux64-ipa.o: s390-linux64.c): Remove.
664 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
665 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
666 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
667 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
668 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
669 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
670 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
671 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
672 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
673 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
674 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
675 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
676 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
677 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
678 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
679 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
680 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
681 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
682 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
683 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
684 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
685 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
686 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
687 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
688 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
689 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
690 (tdesc-ipa.o: tdesc.c): Remove.
691 (x32-linux-ipa.o: x32-linux.c): Remove.
692 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
693 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
694
50cfacb7
SM
6952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
696
697 * Makefile.in (%.o: ../arch/%.c): New rule.
698 (arm.o: ../arch/arm.c): Remove.
699 (arm-linux.o: ../arch/arm-linux.c): Remove.
700 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
701 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
702
c5a22423
SM
7032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * Makefile.in (%.o: ../nat/%.c): New rule.
706 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
707 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
708 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
709 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
710 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
711 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
712 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
713 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
714 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
715 (linux-personality.o: ../nat/linux-personality.c): Remove.
716 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
717 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
718 (x86-linux.o: ../nat/x86-linux.c): Remove.
719 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
720 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
721
6bda016b
SM
7222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
723
724 * Makefile.in (%.o: ../common/%.c): New rule.
725 (signals.o: ../common/signals.c): Remove.
726 (print-utils.o: ../common/print-utils.c): Remove.
727 (rsp-low.o: ../common/rsp-low.c): Remove.
728 (common-utils.o: ../common/common-utils.c): Remove.
729 (posix-strerror.o: ../common/posix-strerror.c): Remove.
730 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
731 (vec.o: ../common/vec.c): Remove.
732 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
733 (xml-utils.o: ../common/xml-utils.c): Remove.
734 (ptid.o: ../common/ptid.c): Remove.
735 (buffer.o: ../common/buffer.c): Remove.
736 (format.o: ../common/format.c): Remove.
737 (filestuff.o: ../common/filestuff.c): Remove.
738 (agent.o: ../common/agent.c): Remove.
739 (errors.o: ../common/errors.c): Remove.
740 (environ.o: ../common/environ.c): Remove.
741 (common-debug.o: ../common/common-debug.c): Remove.
742 (cleanups.o: ../common/cleanups.c): Remove.
743 (common-exceptions.o: ../common/common-exceptions.c): Remove.
744 (fileio.o: ../common/fileio.c): Remove.
745 (common-regcache.o: ../common/common-regcache.c): Remove.
746 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
747 (new-op.o: ../common/new-op.c): Remove.
748 (btrace-common.o: ../common/btrace-common.c): Remove.
749
21122961
SM
7502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
751
752 * Makefile.in (%.o: ../target/%.c): New rule.
753 (waitstatus.o: ../target/waitstatus.c): Remove.
754
c362e621
SM
7552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
756
757 * Makefile.in
758 (%.c: ../regformats/%.dat,
759 (%.c: ../regformats/arm/%.dat,
760 (%.c: ../regformats/i386/%.dat,
761 (%.c: ../regformats/rs6000/%.dat): New rules.
762 (aarch64.c): Remove.
763 (reg-arm.c): Remove.
764 (arm-with-iwmmxt.c): Remove.
765 (arm-with-vfpv2.c): Remove.
766 (arm-with-vfpv3.c): Remove.
767 (arm-with-neon.c): Remove.
768 (reg-bfin.c): Remove.
769 (reg-cris.c): Remove.
770 (reg-crisv32.c): Remove.
771 (i386.c): Remove.
772 (i386-linux.c): Remove.
773 (i386-avx.c): Remove.
774 (i386-avx-linux.c): Remove.
775 (i386-avx-avx512.c): Remove.
776 (i386-avx-avx512-linux.c): Remove.
777 (i386-mpx.c): Remove.
778 (i386-mpx-linux.c): Remove.
779 (i386-avx-mpx-avx512-pku.c): Remove.
780 (i386-avx-mpx-avx512-pku-linux.c): Remove.
781 (i386-avx-mpx.c): Remove.
782 (i386-avx-mpx-linux.c): Remove.
783 (i386-mmx.c): Remove.
784 (i386-mmx-linux.c): Remove.
785 (reg-ia64.c): Remove.
786 (reg-m32r.c): Remove.
787 (reg-m68k.c): Remove.
788 (reg-cf.c): Remove.
789 (mips-linux.c): Remove.
790 (mips-dsp-linux.c): Remove.
791 (mips64-linux.c): Remove.
792 (mips64-dsp-linux.c): Remove.
793 (nios2-linux.c): Remove.
794 (powerpc-32.c): Remove.
795 (powerpc-32l.c): Remove.
796 (powerpc-altivec32l.c): Remove.
797 (powerpc-cell32l.c): Remove.
798 (powerpc-vsx32l.c): Remove.
799 (powerpc-isa205-32l.c): Remove.
800 (powerpc-isa205-altivec32l.c): Remove.
801 (powerpc-isa205-vsx32l.c): Remove.
802 (powerpc-e500l.c): Remove.
803 (powerpc-64l.c): Remove.
804 (powerpc-altivec64l.c): Remove.
805 (powerpc-cell64l.c): Remove.
806 (powerpc-vsx64l.c): Remove.
807 (powerpc-isa205-64l.c): Remove.
808 (powerpc-isa205-altivec64l.c): Remove.
809 (powerpc-isa205-vsx64l.c): Remove.
810 (s390-linux32.c): Remove.
811 (s390-linux32v1.c): Remove.
812 (s390-linux32v2.c): Remove.
813 (s390-linux64.c): Remove.
814 (s390-linux64v1.c): Remove.
815 (s390-linux64v2.c): Remove.
816 (s390-te-linux64.c): Remove.
817 (s390-vx-linux64.c): Remove.
818 (s390-tevx-linux64.c): Remove.
819 (s390x-linux64.c): Remove.
820 (s390x-linux64v1.c): Remove.
821 (s390x-linux64v2.c): Remove.
822 (s390x-te-linux64.c): Remove.
823 (s390x-vx-linux64.c): Remove.
824 (s390x-tevx-linux64.c): Remove.
825 (tic6x-c64xp-linux.c): Remove.
826 (tic6x-c64x-linux.c): Remove.
827 (tic6x-c62x-linux.c): Remove.
828 (reg-sh.c): Remove.
829 (reg-sparc64.c): Remove.
830 (reg-spu.c): Remove.
831 (amd64.c): Remove.
832 (amd64-linux.c): Remove.
833 (amd64-avx.c): Remove.
834 (amd64-avx-linux.c): Remove.
835 (amd64-avx-avx512.c): Remove.
836 (amd64-avx-avx512-linux.c): Remove.
837 (amd64-mpx.c): Remove.
838 (amd64-mpx-linux.c): Remove.
839 (amd64-avx-mpx-avx512-pku.c): Remove.
840 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
841 (amd64-avx-mpx.c): Remove.
842 (amd64-avx-mpx-linux.c): Remove.
843 (x32.c): Remove.
844 (x32-linux.c): Remove.
845 (x32-avx.c): Remove.
846 (x32-avx-linux.c): Remove.
847 (x32-avx-avx512.c): Remove.
848 (x32-avx-avx512-linux.c): Remove.
849 (reg-xtensa.c): Remove.
850 (reg-tilegx.c): Remove.
851 (reg-tilegx32.c): Remove.
852
1672e0d9
SDJ
8532017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
854
855 * Makefile.in (SFILES): Add "common/environ.c".
856 (OBJS): Add "common/environ.h".
857
239b6d10
WT
8582017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
859
860 * configure.ac: Check if the fs_base and gs_base members of
861 `struct user_regs_struct' exist.
862 * config.in: Regenerated.
863 * configure: Likewise.
864
694b382c
AT
8652017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
866
867 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
868 target_read_memory.
869 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
870 (get_next_pcs_syscall_next_pc): Likewise.
871
7dc53023
LM
8722016-12-23 Luis Machado <lgustavo@codesourcery.com>
873
874 * win32-i386-low.c: Fix incorrect reference to a couple source files.
875 * nto-x86-low.c: Likewise.
876
ad02e4fe
SM
8772016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
878
879 * Makefile.in: Include disable-implicit-rules.mk.
880
dcb07cfa
PA
8812016-11-23 Pedro Alves <palves@redhat.com>
882
883 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
884 (debug_vprintf): Use std::chrono::steady_clock instead of
885 gettimeofday. Use '.' instead of ':'.
886 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
887 (get_timestamp): Use std::chrono::steady_clock instead of
888 gettimeofday.
889
8629c02c
SM
8902016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
891
892 * Makefile.in: Fix whitespace formatting.
893
b593ecca
SM
8942016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
895
896 * Makefile.in (SFILES, OBS): Flatten list and order
897 alphabetically.
898
9986ba08
PA
8992016-11-23 Pedro Alves <palves@redhat.com>
900
901 * event-loop.c (handle_file_event): Use warning.
902 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
903 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
904 Use warning.
905
4eefa7bc
PA
9062016-11-23 Pedro Alves <palves@redhat.com>
907
908 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
909 output.
910 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
911 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
912 debug_printf and debug_flush for debug output.
913 * server.c (handle_general_set): Likewise.
914 * thread-db.c (try_thread_db_load): Use debug_printf for debug
915 output.
916
5443506e
SM
9172016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * Makefile.in (.c.o): Replace rule with ...
920 (%.o: %.c): ... this one.
921
3b165252
SM
9222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
923
924 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
925 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
926 make.
927 * configure.ac: Remove checks for the make program.
928 * configure: Re-generate.
929
0bcda685
PA
9302016-10-28 Pedro Alves <palves@redhat.com>
931
932 * Makefile.in (CXX_DIALECT): Get from configure.
933 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
934 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
935 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
936 * config.in: Regenerate.
937 * configure: Regenerate.
938
c3805894
YQ
9392016-10-27 Yao Qi <yao.qi@linaro.org>
940
941 * linux-low.c (linux_supports_range_stepping): Return true if
942 can_software_single_step return true.
943
89342618
YQ
9442016-10-27 Yao Qi <yao.qi@linaro.org>
945
946 * inferiors.c (find_inferior_in_random): New function.
947 * inferiors.h (find_inferior_in_random): Declare.
948 * linux-low.c (linux_wait_for_event_filtered): Call
949 find_inferior_in_random instead of find_inferior.
950
e3652c84
YQ
9512016-10-27 Yao Qi <yao.qi@linaro.org>
952
953 * linux-low.c (linux_wait_1): If single-step breakpoints are
954 inserted, remove them.
955
5a04c4cf
PA
9562016-10-26 Pedro Alves <palves@redhat.com>
957
958 * linux-low.c (handle_extended_wait): Link parent/child fork
959 threads.
960 (linux_wait_1): Unlink them.
961 (linux_set_resume_request): Ignore resume requests for
962 already-resumed and unhandled fork child threads.
963 * linux-low.h (struct lwp_info) <fork_relative>: New field.
964 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
965 New functions.
966 (handle_v_requests) <vCont>: Don't call require_running.
967 * server.h (in_queued_stop_replies): New declaration.
968
cb93dc7f
YQ
9692016-10-24 Yao Qi <yao.qi@linaro.org>
970
971 PR server/20733
972 * linux-aarch64-low.c (append_insns): Cast the return value to
973 'uint32_t *'.
974
a1078bea
YQ
9752016-10-10 Yao Qi <yao.qi@linaro.org>
976
977 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
978
1fb77080
SDJ
9792016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
980
981 * target.c (target_supports_multi_process): New function, moved
982 from...
983 * target.h (target_supports_multi_process): ... here. Remove
984 macro.
985
39b5a3b9
TT
9862016-10-05 Tom Tromey <tom@tromey.com>
987
988 PR remote/20655:
989 * tracepoint.c (handle_tracepoint_bkpts): Check
990 ipa_error_tracepoint, not ipa_stopping_tracepoint.
991
c1d0b70a
YQ
9922016-10-05 Yao Qi <yao.qi@linaro.org>
993
994 * configure.srv: Update the path of arm-*.xml files.
995
0a69eedb
YQ
9962016-10-05 Terry Guo <terry.guo@arm.com>
997 Yao Qi <yao.qi@linaro.org>
998
999 * Makefile.in: Adjust the path of rules.
1000 * configure.srv: Update the path of xml files.
1001 * regformats/arm-with-iwmmxt.dat: Regenerated.
1002 * regformats/arm-with-neon.dat: Likewise.
1003 * regformats/arm-with-vfpv2.dat: Likewise.
1004 * regformats/arm-with-vfpv3.dat Likewise.
1005
17e16485
YQ
10062016-09-30 Yao Qi <yao.qi@linaro.org>
1007
1008 PR gdbserver/20627
1009 * target.c (target_stop_and_wait): Don't call
1010 target_continue_no_signal, use resume_stop instead.
1011
edeeb602
YQ
10122016-09-26 Yao Qi <yao.qi@linaro.org>
1013
1014 * linux-low.c (linux_wait_1): Call debug_exit.
1015
503b1c39
PA
10162016-09-23 Pedro Alves <palves@redhat.com>
1017
1018 * Makefile.in (SFILES): Add common/new-op.c.
1019 (OBS): Add common/new-op.o.
1020 (new-op.o): New rule.
1021
74172ecf
SM
10222016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * .gitinore: Ignore more files.
1025
fc6cda2e
YQ
10262016-09-21 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1029 23.
1030
bc1e6c81
SDJ
10312016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1032
1033 * server.c (start_inferior): Call target_mourn_inferior instead of
1034 mourn_inferior; pass ptid_t argument to it.
1035 (resume): Likewise.
1036 (handle_target_event): Likewise.
1037 * target.c (target_mourn_inferior): New function.
1038 * target.h (mourn_inferior): Delete macro.
1039
0e00e962
AA
10402016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1041
1042 * linux-low.c (lwp_is_stepping): New function.
1043
1d8cb77d
CL
10442016-09-06 Carl Love <cel@us.ibm.com>
1045
1046 * server.c (start_inferior): Fixed comment, requested comment change
1047 didn't get updated correctly. Removed reference to ptrace () call as
1048 it is only true on Linux systems.
1049
7313bced
CL
10502016-09-06 Carl Love <cel@us.ibm.com>
1051
1052 * server.c (start_inferior): Do not call
1053 function target_post_create_inferior () if the
1054 inferior process has already exited.
1055
cf6de44d
PA
10562016-09-05 Pedro Alves <palves@redhat.com>
1057
1058 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1059 (COMPILE.pre, CC_LD): Use CXX directly.
1060 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1061 * acinclude.m4: Don't include build-with-cxx.m4.
1062 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1063 * configure: Regenerate.
1064
c1da6748
AT
10652016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1066
1067 PR gdb/19495
1068 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1069 call writing data to own_buf.
1070
f2b9e3df
SDJ
10712016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1072
1073 * target.c (mywait): Call target_wait instead of
1074 the_target->wait.
1075 (target_wait): New function.
1076
049a8570
SDJ
10772016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1078
1079 * server.c (start_inferior): New variable 'ptid'. Replace calls
1080 to the_target->resume by target_continue{,_no_signal}, depending
1081 on the case.
1082 * target.c (target_stop_and_wait): Call target_continue_no_signal
1083 instead of the_target->resume.
1084 (target_continue): New function.
1085
3aa5cfa0
AT
10862016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1087
1088 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1089
754653a7
AZ
10902016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1091
1092 PR server/20491
1093 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1094 ps_prochandle.
1095 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1096 * linux-arm-low.c (ps_get_thread_area): Likewise.
1097 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1098 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1099 * linux-mips-low.c (ps_get_thread_area): Likewise.
1100 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1101 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1102 * linux-x86-low.c (ps_get_thread_area): Likewise.
1103 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1104
ed036b40
PA
11052016-08-19 Pedro Alves <palves@redhat.com>
1106
1107 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1108
c8ef42ee
PA
11092016-08-19 Pedro Alves <palves@redhat.com>
1110
1111 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1112 comment. Use memcpy instead of casting through unsigned long.
1113
9c235a72
PA
11142016-08-19 Pedro Alves <palves@redhat.com>
1115
1116 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1117 allocating around 0x80000000.
1118
201506da
PA
11192016-08-19 Pedro Alves <palves@redhat.com>
1120
1121 PR gdb/20415
1122 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1123 (x32-avx512-linux-ipa.o): New rules.
1124 * configure.ac (x86_64-*-linux*): New x32 check.
1125 * configure.srv (ipa_x32_linux_regobj): New.
1126 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1127 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1128 descriptions.
1129 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1130 descriptions.
1131 * configure: Regenerate.
1132
f348d89a
PA
11332016-08-09 Pedro Alves <palves@redhat.com>
1134
1135 PR gdb/18653
1136 * Makefile.in (OBS): Add signals-state-save-restore.o.
1137 (signals-state-save-restore.o): New rule.
1138 * config.in: Regenerate.
1139 * configure: Regenerate.
1140 * linux-low.c: Include "signals-state-save-restore.h".
1141 (linux_create_inferior): Call
1142 restore_original_signals_state.
1143 * server.c: Include "dispositions-save-restore.h".
1144 (captured_main): Call save_original_signals_state.
1145
1baf5149
PA
11462016-08-05 Pedro Alves <palves@redhat.com>
1147
1148 * configure: Regenerate.
1149
fcd4a73d
YQ
11502016-08-04 Yao Qi <yao.qi@linaro.org>
1151
1152 * linux-low.c (regsets_fetch_inferior_registers): Check
1153 errno is ESRCH or not.
1154
979659d0
YQ
11552016-08-02 Yao Qi <yao.qi@linaro.org>
1156
1157 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1158 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1159 (thread_db_load_search): Update.
1160 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1161 td_ta_set_event and td_ta_event_getmsg.
1162
6598661d
PA
11632016-07-26 Pedro Alves <palves@redhat.com>
1164
1165 PR server/20414
1166 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1167 of unsigned long for 64-bit registers and use uint32_t instead of
1168 unsigned int for 32-bit registers.
1169
9cf12d57
PA
11702016-07-26 Pedro Alves <palves@redhat.com>
1171
1172 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1173 to 'ptrace'.
1174
305450ed
TT
11752016-07-21 Tom Tromey <tom@tromey.com>
1176
1177 * configure: Rebuild.
1178
2583da7c
YQ
11792016-07-21 Yao Qi <yao.qi@linaro.org>
1180
1181 * mem-break.c (find_gdb_breakpoint): Cast bp to
1182 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1183
21536b36
YQ
11842016-07-21 Yao Qi <yao.qi@linaro.org>
1185
1186 * server.c (handle_v_requests): Support s and S actions
1187 if target_supports_software_single_step return true.
1188
8901d193
YQ
11892016-07-21 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1192 is resume_step, call maybe_hw_step.
1193 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1194 and unstop them.
1195 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1196 breakpoints or not.
1197 (proceed_one_lwp): If resume request is resume_step, install
1198 reinsert breakpoints and call maybe_hw_step.
1199
0e9a339e
YQ
12002016-07-21 Yao Qi <yao.qi@linaro.org>
1201
1202 * linux-low.c (proceed_one_lwp): Declare.
1203 (linux_resume_one_thread): Remove local variable 'step'.
1204 Lift code enqueue signal. Call proceed_one_lwp instead of
1205 linux_resume_one_lwp.
1206
4281b351
YQ
12072016-07-21 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-low.c (linux_resume_one_thread): Call
1210 enqueue_pending_signal.
1211
984a2c04
YQ
12122016-07-21 Yao Qi <yao.qi@linaro.org>
1213
1214 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1215 * inferiors.c (do_restore_current_thread_cleanup): New function.
1216 (make_cleanup_restore_current_thread): Likewise.
1217 * linux-low.c (install_software_single_step_breakpoints): Call
1218 make_cleanup_restore_current_thread. Switch current_thread to
1219 thread.
1220
bec903c9
YQ
12212016-07-21 Yao Qi <yao.qi@linaro.org>
1222
1223 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1224 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1225 (clone_one_breakpoint): Likewise.
1226 (delete_reinsert_breakpoints): Change parameter to thread.
1227 Callers updated.
1228 (has_reinsert_breakpoints): Likewise.
1229 (uninsert_reinsert_breakpoints): Likewise.
1230 (reinsert_reinsert_breakpoints): Likewise.
1231 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1232 (delete_reinsert_breakpoints): Likewise.
1233 (reinsert_reinsert_breakpoints): Likewise.
1234 (uninsert_reinsert_breakpoints): Likewise.
1235 (has_reinsert_breakpoints): Likewise.
1236
63c40ec7
YQ
12372016-07-21 Yao Qi <yao.qi@linaro.org>
1238
1239 * inferiors.c (get_thread_process): Make parameter const.
1240 * inferiors.h (get_thread_process): Update declaration.
1241 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1242 Add new parameters child_thread and parent_thread. Callers
1243 updated.
1244 * mem-break.h (clone_all_breakpoints): Update declaration.
1245
9aa76cd0
YQ
12462016-07-21 Yao Qi <yao.qi@linaro.org>
1247
1248 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1249 <command_list, handler>: Remove.
1250 (struct gdb_breakpoint): New.
1251 (struct other_breakpoint): New.
1252 (struct reinsert_breakpoint): New.
1253 (is_gdb_breakpoint): New function.
1254 (any_persistent_commands): Update command_list if
1255 is_gdb_breakpoint returns true.
1256 (set_breakpoint): Create breakpoints according to their types.
1257 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1258 (set_gdb_breakpoint_1): Likewise.
1259 (set_gdb_breakpoint): Likewise.
1260 (clear_breakpoint_conditions): Change parameter type to
1261 'struct gdb_breakpoint *'.
1262 (clear_breakpoint_commands): Likewise.
1263 (clear_breakpoint_conditions_and_commands): Likewise.
1264 (add_condition_to_breakpoint): Likewise.
1265 (add_breakpoint_condition): Likewise.
1266 (add_commands_to_breakpoint): Likewise.
1267 (check_breakpoints): Check other_breakpoint.
1268 (clone_one_breakpoint): Clone breakpopint according to its type.
1269 * mem-break.h (struct gdb_breakpoint): Declare.
1270 (set_gdb_breakpoint): Update declaration.
1271 (clear_breakpoint_conditions_and_commands): Likewise.
1272 (add_breakpoint_condition): Likewise.
1273 (add_breakpoint_commands): Likewise.
1274 * server.c (process_point_options): Change parameter type to
1275 'struct gdb_breakpoint *'.
1276
811f8301
YQ
12772016-07-21 Yao Qi <yao.qi@linaro.org>
1278
1279 * mem-break.c (set_breakpoint_at): Rename it to ...
1280 (set_breakpoint_type_at): ... it.
1281 (set_breakpoint_at): Call set_breakpoint_type_at.
1282 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1283 * mem-break.h (set_breakpoint_at): Update comments.
1284
b1c51e36
CLT
12852016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1286
1287 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1288 to buf parameter.
1289 (nios2_store_gregset): Likewise.
1290
ced2dffb
PA
12912016-07-01 Pedro Alves <palves@redhat.com>
1292 Antoine Tremblay <antoine.tremblay@ericsson.com>
1293
1294 * linux-low.c: Change interface to take the target lwp_info
1295 pointer directly and return void. Handle detaching from a zombie
1296 thread.
1297 (linux_detach_lwp_callback): New function.
1298 (linux_detach): Detach from the leader thread after detaching from
1299 the clone threads.
1300
2ac09a5b
YQ
13012016-06-28 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1304 for variable new_offset.
1305 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1306 (aarch64_ftrace_insn_reloc_cb): Likewise.
1307 (aarch64_ftrace_insn_reloc_tb): Likewise.
1308 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1309 PRIx64 instead of PRIx32.
1310
79e7fd4f
YQ
13112016-06-28 Yao Qi <yao.qi@linaro.org>
1312
1313 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1314 (the_low_target): Install arm_get_syscall_trapinfo.
1315
061fc021
YQ
13162016-06-28 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1319 function.
1320 (the_low_target): Install aarch64_get_syscall_trapinfo.
1321
4cc32bec
YQ
13222016-06-28 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1325 Callers updated.
1326 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1327 Remove parameter sysno.
1328 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1329 sysret.
1330
782c1122
AA
13312016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1332
1333 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1334 (s390_emit_ne_goto): Likewise.
1335 (s390_emit_lt_goto): Likewise.
1336 (s390_emit_le_goto): Likewise.
1337 (s390_emit_gt_goto): Likewise.
1338 (s390_emit_ge_goto): Likewise.
1339 (s390x_emit_eq_goto): Likewise.
1340 (s390x_emit_ne_goto): Likewise.
1341 (s390x_emit_lt_goto): Likewise.
1342 (s390x_emit_le_goto): Likewise.
1343 (s390x_emit_gt_goto): Likewise.
1344 (s390x_emit_ge_goto): Likewise.
1345 (s390_emit_ops_impl): Mark variable static.
1346 (s390x_emit_ops): Likewise.
1347
2e7b624b
YQ
13482016-06-17 Yao Qi <yao.qi@linaro.org>
1349
1350 * linux-low.c (handle_extended_wait): Call
1351 uninsert_reinsert_breakpoints for the parent process. Remove
1352 reinsert breakpoints from the child process. Reinsert them to
1353 the parent process when vfork is done.
1354 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1355 (reinsert_reinsert_breakpoints): New function.
1356 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1357 (reinsert_reinsert_breakpoints): Declare.
1358
8a81c5d7
YQ
13592016-06-17 Yao Qi <yao.qi@linaro.org>
1360
1361 * linux-low.c (handle_extended_wait): If the parent is doing
1362 step-over, remove the reinsert breakpoints from the forked child.
1363
f50bf8e5
YQ
13642016-06-17 Yao Qi <yao.qi@linaro.org>
1365
1366 * linux-low.c (unsuspend_all_lwps): Declare.
1367 (linux_low_filter_event): If thread exited, call finish_step_over.
1368 If step-over is finished, unsuspend other threads.
1369
8376a3cb
YQ
13702016-06-17 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-low.c (linux_resume_one_lwp_throw): Assert
1373 has_reinsert_breakpoints returns false.
1374 * mem-break.c (delete_disabled_breakpoints): Assert
1375 bp type isn't reinsert_breakpoint.
1376
f79b145d
YQ
13772016-06-17 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (maybe_hw_step): New function.
1380 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1381 (finish_step_over): Switch current_thread to lwp temporarily,
1382 and assert has_reinsert_breakpoints returns true.
1383 (proceed_one_lwp): Call maybe_hw_step.
1384 * mem-break.c (has_reinsert_breakpoints): New function.
1385 * mem-break.h (has_reinsert_breakpoints): Declare.
1386
0ae534d2
JT
13872016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1388
1389 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1390
fcdad592
YQ
13912016-05-17 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1394 instead of find_inferior.
1395
9e784964
YQ
13962016-05-05 Yao Qi <yao.qi@linaro.org>
1397
1398 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1399 Initialize res to zero.
1400
cf2ebb6e
YQ
14012016-05-05 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1404 to uint32_t.
1405
c1aebf87
UW
14062016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1407
1408 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1409 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1410 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1411
35fd2deb 14122016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1413 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1414
1415 * tracepoint.c (write_inferior_int8): New function.
1416 (cmd_qtenable_disable): Write enable flag using
1417 write_inferior_int8.
1418
484b3c32
YQ
14192016-04-25 Yao Qi <yao.qi@linaro.org>
1420
1421 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1422 (need_step_over_p): Return zero if the LWP has pending signals
1423 can be delivered on software single step target.
1424
85ba7d86
YQ
14252016-04-25 Yao Qi <yao.qi@linaro.org>
1426
1427 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1428 return instead of error.
1429
3539aa13
YQ
14302016-04-22 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1433 to 23.
1434
5b061e98
YQ
14352016-04-22 Yao Qi <yao.qi@linaro.org>
1436
1437 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1438 signal when stepping over breakpoint with software single
1439 step.
1440
3451269c
PA
14412016-04-21 Pedro Alves <palves@redhat.com>
1442
1443 * linux-s390-low.c (s390_collect_ptrace_register)
1444 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1445 add casts.
1446 (s390_check_regset): Use void * instead of gdb_byte *.
1447
a2358508
PA
14482016-04-20 Pedro Alves <palves@redhat.com>
1449
1450 * configure: Renegerate.
1451
6885166d
YQ
14522016-04-20 Yao Qi <yao.qi@linaro.org>
1453
1454 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1455 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1456 number 16.
1457 (arm_store_gregset): Likewise.
1458
2b863f51
WT
14592016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1460
1461 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1462 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1463 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1464 (amd64-avx-mpx-linux.c): New rules.
1465 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1466 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1467 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1468 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1469 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1470 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1471 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1472 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1473 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1474 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1475 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1476 * linux-x86-low.c (x86_linux_read_description): Add case for
1477 X86_XSTATE_AVX_MPX_MASK.
1478 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1479 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1480 init_registers_i386_avx_mpx_linux.
1481 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1482 (initialize_low_tracepoint): Call
1483 init_registers_i386_avx_mpx_linux.
1484 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1485 (initialize_low_tracepoint): Call
1486 init_registers_amd64_avx_mpx_linux.
1487 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1488 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1489 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1490 declarations.
1491
9b30624b
PA
14922016-04-18 Pedro Alves <palves@redhat.com>
1493
1494 * configure: Regenerate.
1495
45e3745e
AT
14962016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1497
1498 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1499 (aarch64_emit_sub): Likewise.
1500
2afc13ff
PA
15012016-04-12 Pedro Alves <palves@redhat.com>
1502
1503 * utils.c (prepare_to_throw_exception): Delete.
1504
6e774b13
SM
15052016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1508
4dca19f8
MK
15092016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1512
d0a9981f
MK
15132016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1514
1515 * linux-aarch64-ipa.c: Add <elf.h> include.
1516 * linux-ppc-ipa.c: Add <elf.h> include.
1517 * linux-s390-ipa.c: Add <elf.h> include.
1518
252db07e
MK
15192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1520
1521 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1522 (get_raw_reg_ptr): Likewise.
1523 (get_trace_state_variable_value_ptr): Likewise.
1524 (set_trace_state_variable_value_ptr): Likewise.
1525 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1526 char *.
1527
14e2b6d9
MK
15282016-03-31 Wei-cheng Wang <cole945@gmail.com>
1529 Marcin Kościelnicki <koriakin@0x04.net>
1530
1531 PR/17221
1532 * linux-ppc-low.c (emit_insns): New function.
1533 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1534 (ppc_emit_prologue): New function.
1535 (ppc_emit_epilogue): New function.
1536 (ppc_emit_add): New function.
1537 (ppc_emit_sub): New function.
1538 (ppc_emit_mul): New function.
1539 (ppc_emit_lsh): New function.
1540 (ppc_emit_rsh_signed): New function.
1541 (ppc_emit_rsh_unsigned): New function.
1542 (ppc_emit_ext): New function.
1543 (ppc_emit_zero_ext): New function.
1544 (ppc_emit_log_not): New function.
1545 (ppc_emit_bit_and): New function.
1546 (ppc_emit_bit_or): New function.
1547 (ppc_emit_bit_xor): New function.
1548 (ppc_emit_bit_not): New function.
1549 (ppc_emit_equal): New function.
1550 (ppc_emit_less_signed): New function.
1551 (ppc_emit_less_unsigned): New function.
1552 (ppc_emit_ref): New function.
1553 (ppc_emit_const): New function.
1554 (ppc_emit_reg): New function.
1555 (ppc_emit_pop): New function.
1556 (ppc_emit_stack_flush): New function.
1557 (ppc_emit_swap): New function.
1558 (ppc_emit_stack_adjust): New function.
1559 (ppc_emit_call): New function.
1560 (ppc_emit_int_call_1): New function.
1561 (ppc_emit_void_call_2): New function.
1562 (ppc_emit_if_goto): New function.
1563 (ppc_emit_goto): New function.
1564 (ppc_emit_eq_goto): New function.
1565 (ppc_emit_ne_goto): New function.
1566 (ppc_emit_lt_goto): New function.
1567 (ppc_emit_le_goto): New function.
1568 (ppc_emit_gt_goto): New function.
1569 (ppc_emit_ge_goto): New function.
1570 (ppc_write_goto_address): New function.
1571 (ppc_emit_ops_impl): New static variable.
1572 (ppc64v1_emit_prologue): New function.
1573 (ppc64v2_emit_prologue): New function.
1574 (ppc64_emit_epilogue): New function.
1575 (ppc64_emit_add): New function.
1576 (ppc64_emit_sub): New function.
1577 (ppc64_emit_mul): New function.
1578 (ppc64_emit_lsh): New function.
1579 (ppc64_emit_rsh_signed): New function.
1580 (ppc64_emit_rsh_unsigned): New function.
1581 (ppc64_emit_ext): New function.
1582 (ppc64_emit_zero_ext): New function.
1583 (ppc64_emit_log_not): New function.
1584 (ppc64_emit_bit_and): New function.
1585 (ppc64_emit_bit_or): New function.
1586 (ppc64_emit_bit_xor): New function.
1587 (ppc64_emit_bit_not): New function.
1588 (ppc64_emit_equal): New function.
1589 (ppc64_emit_less_signed): New function.
1590 (ppc64_emit_less_unsigned): New function.
1591 (ppc64_emit_ref): New function.
1592 (ppc64_emit_const): New function.
1593 (ppc64v1_emit_reg): New function.
1594 (ppc64v2_emit_reg): New function.
1595 (ppc64_emit_pop): New function.
1596 (ppc64_emit_stack_flush): New function.
1597 (ppc64_emit_swap): New function.
1598 (ppc64v1_emit_call): New function.
1599 (ppc64v2_emit_call): New function.
1600 (ppc64v1_emit_int_call_1): New function.
1601 (ppc64v2_emit_int_call_1): New function.
1602 (ppc64v1_emit_void_call_2): New function.
1603 (ppc64v2_emit_void_call_2): New function.
1604 (ppc64_emit_if_goto): New function.
1605 (ppc64_emit_eq_goto): New function.
1606 (ppc64_emit_ne_goto): New function.
1607 (ppc64_emit_lt_goto): New function.
1608 (ppc64_emit_le_goto): New function.
1609 (ppc64_emit_gt_goto): New function.
1610 (ppc64_emit_ge_goto): New function.
1611 (ppc64v1_emit_ops_impl): New static variable.
1612 (ppc64v2_emit_ops_impl): New static variable.
1613 (ppc_emit_ops): New function.
1614 (linux_low_target): Wire in ppc_emit_ops.
1615
a2174ba4
MK
16162016-03-31 Wei-cheng Wang <cole945@gmail.com>
1617 Marcin Kościelnicki <koriakin@0x04.net>
1618
1619 PR/17221
1620 * Makefile.in: Add powerpc-*-ipa.o
1621 * configure.srv: Add ipa_obj for powerpc*-linux.
1622 * linux-ppc-ipa.c: New file.
1623 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1624 includes.
1625 (PPC_FIELD): New macro.
1626 (PPC_SEXT): New macro.
1627 (PPC_OP6): New macro.
1628 (PPC_BO): New macro.
1629 (PPC_LI): New macro.
1630 (PPC_BD): New macro.
1631 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1632 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1633 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1634 (ppc_get_thread_area): New function.
1635 (is_elfv2_inferior): New function.
1636 (gen_ds_form): New function.
1637 (GEN_STD): New macro.
1638 (GEN_STDU): New macro.
1639 (GEN_LD): New macro.
1640 (GEN_LDU): New macro.
1641 (gen_d_form): New function.
1642 (GEN_ADDI): New macro.
1643 (GEN_ADDIS): New macro.
1644 (GEN_LI): New macro.
1645 (GEN_LIS): New macro.
1646 (GEN_ORI): New macro.
1647 (GEN_ORIS): New macro.
1648 (GEN_LWZ): New macro.
1649 (GEN_STW): New macro.
1650 (GEN_STWU): New macro.
1651 (gen_xfx_form): New function.
1652 (GEN_MFSPR): New macro.
1653 (GEN_MTSPR): New macro.
1654 (GEN_MFCR): New macro.
1655 (GEN_MTCR): New macro.
1656 (GEN_SYNC): New macro.
1657 (GEN_LWSYNC): New macro.
1658 (gen_x_form): New function.
1659 (GEN_OR): New macro.
1660 (GEN_MR): New macro.
1661 (GEN_LWARX): New macro.
1662 (GEN_STWCX): New macro.
1663 (GEN_CMPW): New macro.
1664 (gen_md_form): New function.
1665 (GEN_RLDICL): New macro.
1666 (GEN_RLDICR): New macro.
1667 (gen_i_form): New function.
1668 (GEN_B): New macro.
1669 (GEN_BL): New macro.
1670 (gen_b_form): New function.
1671 (GEN_BNE): New macro.
1672 (GEN_LOAD): New macro.
1673 (GEN_STORE): New macro.
1674 (gen_limm): New function.
1675 (gen_atomic_xchg): New function.
1676 (gen_call): New function.
1677 (ppc_relocate_instruction): New function.
1678 (ppc_install_fast_tracepoint_jump_pad): New function.
1679 (ppc_get_min_fast_tracepoint_insn_len): New function.
1680 (ppc_get_ipa_tdesc_idx): New function.
1681 (the_low_target): Wire in the new functions.
1682 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1683 tdescs.
1684 * linux-ppc-tdesc.h: New file.
1685
a13c4696
MK
16862016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1687
1688 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1689 (alloc_jump_pad_buffer): New function.
1690 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1691 (alloc_jump_pad_buffer): New function.
1692 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1693 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1694 (alloc_jump_pad_buffer): New function.
1695 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1696 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1697 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1698 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1699
1cda1512
MK
17002016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1701
1702 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1703 * linux-amd64-ipa.c: Likewise.
1704 * linux-i386-ipa.c: Likewise.
1705 * linux-s390-ipa.c: Likewise.
1706 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1707 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1708 set_trace_state_variable_value_ptr.
1709 (struct ipa_sym_addresses): Likewise.
1710 (symbol_list): Likewise.
1711 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1712 accessing gdb_collect directly.
1713 (gdb_collect_ptr_type): New typedef.
1714 (get_raw_reg_ptr_type): New typedef.
1715 (get_trace_state_variable_value_ptr_type): New typedef.
1716 (set_trace_state_variable_value_ptr_type): New typedef.
1717 (gdb_collect_ptr): New global.
1718 (get_raw_reg_ptr): New global.
1719 (get_trace_state_variable_value_ptr): New global.
1720 (set_trace_state_variable_value_ptr): New global.
1721 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1722 accessing get_raw_reg directly.
1723 (get_get_tsv_func_addr): Likewise for
1724 get_trace_state_variable_value_ptr.
1725 (get_set_tsv_func_addr): Likewise for
1726 set_trace_state_variable_value_ptr.
1727 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1728
72fb5488
SM
17292016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1730
1731 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1732
28170b88
MK
17332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1734
1735 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1736 packets.
1737 (relocate_instruction): Remove own_buf.
1738 * server.c (own_buf): Make global.
1739 (handle_v_requests): Make global.
1740 * server.h (own_buf): New declaration.
1741 (handle_v_requests): New prototype.
1742
f39e8743
MK
17432016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1744
1745 PR 18377
1746 * linux-s390-low.c (add_insns): New function.
1747 (s390_emit_prologue): New function.
1748 (s390_emit_epilogue): New function.
1749 (s390_emit_add): New function.
1750 (s390_emit_sub): New function.
1751 (s390_emit_mul): New function.
1752 (s390_emit_lsh): New function.
1753 (s390_emit_rsh_signed): New function.
1754 (s390_emit_rsh_unsigned): New function.
1755 (s390_emit_ext): New function.
1756 (s390_emit_log_not): New function.
1757 (s390_emit_bit_and): New function.
1758 (s390_emit_bit_or): New function.
1759 (s390_emit_bit_xor): New function.
1760 (s390_emit_bit_not): New function.
1761 (s390_emit_equal): New function.
1762 (s390_emit_less_signed): New function.
1763 (s390_emit_less_unsigned): New function.
1764 (s390_emit_ref): New function.
1765 (s390_emit_if_goto): New function.
1766 (s390_emit_goto): New function.
1767 (s390_write_goto_address): New function.
1768 (s390_emit_litpool): New function.
1769 (s390_emit_const): New function.
1770 (s390_emit_call): New function.
1771 (s390_emit_reg): New function.
1772 (s390_emit_pop): New function.
1773 (s390_emit_stack_flush): New function.
1774 (s390_emit_zero_ext): New function.
1775 (s390_emit_swap): New function.
1776 (s390_emit_stack_adjust): New function.
1777 (s390_emit_set_r2): New function.
1778 (s390_emit_int_call_1): New function.
1779 (s390_emit_void_call_2): New function.
1780 (s390_emit_eq_goto): New function.
1781 (s390_emit_ne_goto): New function.
1782 (s390_emit_lt_goto): New function.
1783 (s390_emit_le_goto): New function.
1784 (s390_emit_gt_goto): New function.
1785 (s390_emit_ge_goto): New function.
1786 (s390x_emit_prologue): New function.
1787 (s390x_emit_epilogue): New function.
1788 (s390x_emit_add): New function.
1789 (s390x_emit_sub): New function.
1790 (s390x_emit_mul): New function.
1791 (s390x_emit_lsh): New function.
1792 (s390x_emit_rsh_signed): New function.
1793 (s390x_emit_rsh_unsigned): New function.
1794 (s390x_emit_ext): New function.
1795 (s390x_emit_log_not): New function.
1796 (s390x_emit_bit_and): New function.
1797 (s390x_emit_bit_or): New function.
1798 (s390x_emit_bit_xor): New function.
1799 (s390x_emit_bit_not): New function.
1800 (s390x_emit_equal): New function.
1801 (s390x_emit_less_signed): New function.
1802 (s390x_emit_less_unsigned): New function.
1803 (s390x_emit_ref): New function.
1804 (s390x_emit_if_goto): New function.
1805 (s390x_emit_const): New function.
1806 (s390x_emit_call): New function.
1807 (s390x_emit_reg): New function.
1808 (s390x_emit_pop): New function.
1809 (s390x_emit_stack_flush): New function.
1810 (s390x_emit_zero_ext): New function.
1811 (s390x_emit_swap): New function.
1812 (s390x_emit_stack_adjust): New function.
1813 (s390x_emit_int_call_1): New function.
1814 (s390x_emit_void_call_2): New function.
1815 (s390x_emit_eq_goto): New function.
1816 (s390x_emit_ne_goto): New function.
1817 (s390x_emit_lt_goto): New function.
1818 (s390x_emit_le_goto): New function.
1819 (s390x_emit_gt_goto): New function.
1820 (s390x_emit_ge_goto): New function.
1821 (s390_emit_ops): New function.
1822 (struct linux_target_ops): Fill in emit_ops hook.
1823
abd9baf9
MK
18242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1825
1826 PR 18377
1827 * Makefile.in: Add s390 IPA files.
1828 * configure.srv: Build IPA for s390.
1829 * linux-s390-ipa.c: New file.
1830 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1831 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1832 (tdesc_s390_linux32): Likewise.
1833 (init_registers_s390_linux32v1): Likewise.
1834 (tdesc_s390_linux32v1): Likewise.
1835 (init_registers_s390_linux32v2): Likewise.
1836 (tdesc_s390_linux32v2): Likewise.
1837 (init_registers_s390_linux64): Likewise.
1838 (tdesc_s390_linux64): Likewise.
1839 (init_registers_s390_linux64v1): Likewise.
1840 (tdesc_s390_linux64v1): Likewise.
1841 (init_registers_s390_linux64v2): Likewise.
1842 (tdesc_s390_linux64v2): Likewise.
1843 (init_registers_s390_te_linux64): Likewise.
1844 (tdesc_s390_te_linux64): Likewise.
1845 (init_registers_s390_vx_linux64): Likewise.
1846 (tdesc_s390_vx_linux64): Likewise.
1847 (init_registers_s390_tevx_linux64): Likewise.
1848 (tdesc_s390_tevx_linux64): Likewise.
1849 (init_registers_s390x_linux64): Likewise.
1850 (tdesc_s390x_linux64): Likewise.
1851 (init_registers_s390x_linux64v1): Likewise.
1852 (tdesc_s390x_linux64v1): Likewise.
1853 (init_registers_s390x_linux64v2): Likewise.
1854 (tdesc_s390x_linux64v2): Likewise.
1855 (init_registers_s390x_te_linux64): Likewise.
1856 (tdesc_s390x_te_linux64): Likewise.
1857 (init_registers_s390x_vx_linux64): Likewise.
1858 (tdesc_s390x_vx_linux64): Likewise.
1859 (init_registers_s390x_tevx_linux64): Likewise.
1860 (tdesc_s390x_tevx_linux64): Likewise.
1861 (have_hwcap_s390_vx): New static variable.
1862 (s390_arch_setup): Fill have_hwcap_s390_vx.
1863 (s390_get_thread_area): New function.
1864 (s390_ft_entry_gpr_esa): New const.
1865 (s390_ft_entry_gpr_zarch): New const.
1866 (s390_ft_entry_misc): New const.
1867 (s390_ft_entry_fr): New const.
1868 (s390_ft_entry_vr): New const.
1869 (s390_ft_main_31): New const.
1870 (s390_ft_main_64): New const.
1871 (s390_ft_exit_fr): New const.
1872 (s390_ft_exit_vr): New const.
1873 (s390_ft_exit_misc): New const.
1874 (s390_ft_exit_gpr_esa): New const.
1875 (s390_ft_exit_gpr_zarch): New const.
1876 (append_insns): New function.
1877 (s390_relocate_instruction): New function.
1878 (s390_install_fast_tracepoint_jump_pad): New function.
1879 (s390_get_min_fast_tracepoint_insn_len): New function.
1880 (s390_get_ipa_tdesc_idx): New function.
1881 (struct linux_target_ops): Wire in the above functions.
1882 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1883 * linux-s390-tdesc.h: New file.
1884
a4105d04
MK
18852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1886
1887 * linux-s390-low.c (s390_supports_tracepoints): New function.
1888 (struct linux_target_ops): Fill supports_tracepoints hook.
1889
35ac8b3e
YQ
18902016-03-18 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-low.c (lwp_signal_can_be_delivered): New function.
1893 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1894
94610ec4
YQ
18952016-03-18 Yao Qi <yao.qi@linaro.org>
1896
1897 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1898 0 if signal is enqueued. Remove 'signal' from one debugging
1899 message. Move one debugging message to some lines below.
1900 Remove code setting 'signal' to 0.
1901
80aea927
YQ
19022016-03-18 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-low.c (linux_low_filter_event): Remove redundant
1905 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1906
b04fd3be
MK
19072016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1908
1909 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1910 (struct linux_target_ops): Wire in the above.
1911
c40c8d4b
YQ
19122016-03-03 Yao Qi <yao.qi@linaro.org>
1913
1914 * linux-low.c: Update comments to start_step_over.
1915
0f8288ae
YQ
19162016-03-03 Yao Qi <yao.qi@linaro.org>
1917
1918 PR server/19736
1919 * linux-low.c (handle_extended_wait): Set child suspended
1920 if event_lwp->bp_reinsert isn't zero.
1921
fdbd04a8
YQ
19222016-03-02 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1925 enqueue_pending_signal.
1926
6896a8fa
MK
19272016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1928
1929 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1930 is actually loaded.
1931
ab503087
MK
19322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1933
1934 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1935 (s390_regmap_3264) [!__s390x__]: New global.
1936 (s390_collect_ptrace_register): Skip map entries containing -1.
1937 (s390_supply_ptrace_register): Ditto.
1938 (s390_fill_gprs_high): New function.
1939 (s390_store_gprs_high): New function.
1940 (s390_regsets): Add NT_S390_HIGH_GPRS.
1941 (s390_get_hwcap): Enable on 31-bit.
1942 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1943 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1944 Detect NT_S390_HIGH_GPRS.
1945 (s390_usrregs_info_3264): Enable on 31-bit.
1946 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1947 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1948
ae91f625
MK
19492016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1950
1951 PR gdb/13808
1952 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1953 * configure.srv: Ditto.
1954 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1955 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1956 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1957 (init_registers_amd64_linux): Remove prototype.
1958 (tdesc_amd64_linux): Remove declaration.
1959 (get_ipa_tdesc): New function.
1960 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1961 initialize remaining tdescs.
1962 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1963 (init_registers_i386_linux): Remove prototype.
1964 (tdesc_i386_linux): Remove declaration.
1965 (get_ipa_tdesc): New function.
1966 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1967 initialize remaining tdescs.
1968 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1969 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1970 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1971 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1972 (x86_get_ipa_tdesc_idx): New function.
1973 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1974 * linux-x86-tdesc.h: New file.
1975 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1976 (target_get_ipa_tdesc_idx): New macro.
1977 * tracepoint.c (ipa_tdesc_idx): New macro.
1978 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1979 (symbol_list): Add ipa_tdesc_idx.
1980 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1981 (ipa_tdesc): Remove.
1982 (ipa_tdesc_idx): New variable.
1983 (get_context_regcache): Use get_ipa_tdesc.
1984 (gdb_collect): Ditto.
1985 (gdb_probe): Ditto.
1986 * tracepoint.h (get_ipa_tdesc): New prototype.
1987 (ipa_tdesc): Remove.
1988
e7ad2f14
PA
19892016-02-24 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1992 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1993 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1994 Factor out common code between the USE_SIGTRAP_SIGINFO and
1995 !USE_SIGTRAP_SIGINFO blocks.
1996 (linux_low_filter_event): Call save_stop_reason instead of
1997 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1998 Update comments.
1999 (linux_wait_1): Update comments.
2000
657f9cde
WW
20012016-02-24 Wei-cheng Wang <cole945@gmail.com>
2002
2003 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2004 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2005 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2006 ppc_insert_point, ppc_remove_point.
2007
b00b61e1
MK
20082016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2009
2010 * linux-s390-low.c (s390_supports_z_point_type): New function.
2011 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2012
553cb527
YQ
20132016-02-16 Yao Qi <yao.qi@linaro.org>
2014
2015 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2016 PC. Get pc from regcache_read_pc.
2017
a5652c21
YQ
20182016-02-12 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2021 or linux_get_pc_32bit.
2022 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2023
ed443b61
YQ
20242016-02-12 Yao Qi <yao.qi@linaro.org>
2025
2026 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2027 arm_linux_get_next_pcs_fixup.
2028
020ecd38
MK
20292016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2030
2031 * tracepoint.c (x_tracepoint_action_download): Change
2032 write_inferior_data_ptr to write_inferior_data_pointer.
2033 (cmd_qtstart): Likewise.
2034 (write_inferior_data_ptr): Remove.
2035 (download_agent_expr): Change write_inferior_data_ptr to
2036 write_inferior_data_pointer.
2037 (download_tracepoint_1): Likewise.
2038 (download_tracepoint): Likewise.
2039 (download_trace_state_variables): Likewise.
2040
7cae9051
WW
20412016-02-11 Wei-cheng Wang <cole945@gmail.com>
2042 Marcin Kościelnicki <koriakin@0x04.net>
2043
2044 * tracepoint.c (struct tracepoint_action_ops): Remove.
2045 (struct tracepoint_action): Remove ops.
2046 (m_tracepoint_action_download, r_tracepoint_action_download)
2047 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2048 size and offset accordingly.
2049 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2050 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2051 (tracepoint_action_send, tracepoint_action_download): New functions.
2052 Helpers for trace action handlers.
2053 (add_tracepoint_action): Remove setup actions ops.
2054 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2055
9f6a71b4
YQ
20562016-02-10 Yao Qi <yao.qi@linaro.org>
2057
2058 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2059
1e94266c
SM
20602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2063 to AC_OUTPUT.
2064 * configure: Regenerate.
2065
8adce034
SM
20662016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2067
2068 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2069 void * to gdb_byte *.
2070 * linux-low.c (siginfo_fixup): Likewise.
2071 (linux_xfer_siginfo): Likewise.
2072 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2073 Likewise.
2074 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2075
93813b37
WT
20762016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2077
2078 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2079 to srv_tgtobj.
2080 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2081 to srv_tgtobj.
2082 * linux-x86-low.c [__x86_64__]: Include
2083 "nat/amd64-linux-siginfo.h".
2084 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2085 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2086 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2087 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2088 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2089 (cpt_si_fd, si_timerid, si_overrun): Move from
2090 nat/amd64-linux-siginfo.c.
2091 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2092
8424cc97
SM
20932016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * server.c (skip_to_semicolon): Remove.
2096 (process_point_options): Use strchrnul instead of
2097 skip_to_semicolon.
2098
4d18591b
YQ
20992016-01-26 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2102 * linux-low.c (install_software_single_step_breakpoints): Don't
2103 call regcache_read_pc.
2104 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2105 argument pc.
2106
d8020970
YQ
21072016-01-26 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-low.c (install_software_single_step_breakpoints): Call
2110 regcache_read_pc instead of get_pc.
2111
8b207339
YQ
21122016-01-26 Yao Qi <yao.qi@linaro.org>
2113
2114 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2115 (unblock_async_io): Rename to ...
2116 (block_unblock_async_io): ... it. New function.
2117 (enable_async_io): Don't install SIGIO handler. Unblock it
2118 instead.
2119 (disable_async_io): Don't ignore SIGIO. Block it instead.
2120 (initialize_async_io): Install SIGIO handler. Don't call
2121 unblock_async_io.
2122
18879fef
YQ
21232016-01-26 Yao Qi <yao.qi@linaro.org>
2124
2125 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2126 first character is '\003', call *the_target->request_interrupt.
2127
a0f8e08a
YQ
21282016-01-25 Yao Qi <yao.qi@linaro.org>
2129
2130 * remote-utils.c (new_thread_notify): Remove.
2131 (dead_thread_notify): Likewise.
2132 * remote-utils.h (new_thread_notify): Remove declaration.
2133 (dead_thread_notify): Likewise.
2134
cc5fd9ab
MK
21352016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2136
2137 * gdb.trace/pending.exp: Fix expected message on continue.
2138
99e8eb11
MK
21392016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2140
2141 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2142 it works properly on big-endian machines where sizeof (CORE_ADDR)
2143 != sizeof (void *).
2144
a994041d
PA
21452016-01-21 Pedro Alves <palves@redhat.com>
2146
2147 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2148 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2149 * configure: Regenerate.
2150
f7a6a40d
YQ
21512016-01-21 Yao Qi <yao.qi@linaro.org>
2152
2153 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2154 is_thumb and set it according to CPSR saved on the stack.
2155 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2156 arm_sigreturn_next_pc.
2157
6f69e520
YQ
21582016-01-18 Yao Qi <yao.qi@linaro.org>
2159
2160 * linux-low.c (linux_set_pc_64bit): New function.
2161 (linux_get_pc_64bit): New function.
2162 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2163 Declare.
2164 * linux-sparc-low.c (debug_threads): Remove declaration.
2165 (sparc_get_pc): Remove.
2166 (the_low_target): Use linux_get_pc_64bit instead of
2167 sparc_get_pc.
2168 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2169 (the_low_target): Use linux_get_pc_64bit and
2170 linux_set_pc_64bit.
2171
276d4552
YQ
21722016-01-18 Yao Qi <yao.qi@linaro.org>
2173
2174 * linux-arm-low.c (debug_threads): Remove declaration.
2175 (arm_get_pc, arm_set_pc): Remove.
2176 (the_low_target): Use linux_get_pc_32bit and
2177 linux_set_pc_32bit.
2178 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2179 (the_low_target): Use linux_get_pc_32bit and
2180 linux_set_pc_32bit.
2181 * linux-cris-low.c (debug_threads): Remove declaration.
2182 (cris_get_pc, cris_set_pc,): Remove.
2183 (the_low_target): Use linux_get_pc_32bit and
2184 linux_set_pc_32bit.
2185 * linux-crisv32-low.c (debug_threads): Remove declaration.
2186 (cris_get_pc, cris_set_pc): Remove.
2187 (the_low_target): Use linux_get_pc_32bit and
2188 linux_set_pc_32bit.
2189 * linux-low.c: Include inttypes.h.
2190 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2191 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2192 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2193 (the_low_target): Use linux_get_pc_32bit and
2194 linux_set_pc_32bit.
2195 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2196 (the_low_target): Use linux_get_pc_32bit and
2197 linux_set_pc_32bit.
2198 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2199 (the_low_target): Use linux_get_pc_32bit and
2200 linux_set_pc_32bit.
2201 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2202 (the_low_target): Use linux_get_pc_32bit and
2203 linux_set_pc_32bit.
2204 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2205 (the_low_target): Use linux_get_pc_32bit and
2206 linux_set_pc_32bit.
2207
eb0edac8
GB
22082016-01-18 Gary Benson <gbenson@redhat.com>
2209
2210 * configure.ac (AC_FUNC_FORK): New check.
2211 * config.in: Regenerate.
2212 * configure: Likewise.
2213
1b451dda
YQ
22142016-01-14 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2217 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2218 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2219 arm_get_next_pcs_ctor.
2220
82075af2
JS
22212016-01-12 Josh Stone <jistone@redhat.com>
2222 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2223
2224 * inferiors.h: Include "gdb_vecs.h".
2225 (struct process_info): Add syscalls_to_catch.
2226 * inferiors.c (remove_process): Free syscalls_to_catch.
2227 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2228 syscall_return stops.
2229 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2230 * server.c (handle_general_set): Handle QCatchSyscalls.
2231 (handle_query): Report support for QCatchSyscalls.
2232 * target.h (struct target_ops): Add supports_catch_syscall.
2233 (target_supports_catch_syscall): New macro.
2234 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2235 (struct lwp_info): Add syscall_state.
2236 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2237 Maintain syscall_state and syscalls_to_catch across exec.
2238 (get_syscall_trapinfo): New function, proxy to the_low_target.
2239 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2240 (linux_low_filter_event): Toggle syscall_state entry/return for
2241 syscall traps, and set it ignored for all others.
2242 (gdb_catching_syscalls_p): New function.
2243 (gdb_catch_this_syscall_p): New function.
2244 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2245 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2246 (linux_supports_catch_syscall): New function.
2247 (linux_target_ops): Install it.
2248 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2249 (the_low_target): Install it.
2250
8f13a3ce
MF
22512016-01-12 Mike Frysinger <vapier@gentoo.org>
2252
2253 * acinclude.m4: Include new ../warning.m4 file.
2254 * configure: Regenerated.
2255 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2256
5b3da067
MF
22572016-01-12 Mike Frysinger <vapier@gentoo.org>
2258
2259 * ax.c (is_goto_target): Mark static.
2260 * linux-low.c (register_addr): Likewise.
2261 (linux_fetch_registers, linux_store_registers): Likewise.
2262 * mem-break.c (any_persistent_commands): Fix old prototype.
2263 (add_commands_to_breakpoint): Mark static.
2264 * regcache.c (find_register_by_name): Delete unused func.
2265 * remote-utils.c (hex_or_minus_one): Mark static.
2266 * server.c (monitor_show_help): Mark static.
2267 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2268 handle_v_requests): Likewise.
2269
bc504a31
PA
22702016-01-12 Pedro Alves <palves@redhat.com>
2271
2272 Remove use of the registered trademark symbol throughout.
2273
5a0dd67a
YQ
22742016-01-08 Yao Qi <yao.qi@linaro.org>
2275
2276 * remote-utils.c (getpkt): If c is '\003', call target hook
2277 request_interrupt.
2278
b2ca446f
YQ
22792016-01-06 Yao Qi <yao.qi@linaro.org>
2280
2281 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2282 linux-aarch32-low.c.
2283 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2284 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2285 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2286 (thumb2_breakpoint): Declare.
2287 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2288 linux-aarch32-low.h.
2289 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2290 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2291 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2292
edd88788
JB
22932016-01-01 Joel Brobecker <brobecker@adacore.com>
2294
2295 * gdbreplay.c (gdbreplay_version): Change copyright year in
2296 version message.
2297 * server.c (gdbserver_version): Likewise.
2298
65da7f14
PP
22992015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2300
2301 * server.c (crc32_table): Delete.
2302 (crc32): Use libiberty's xcrc32 function.
2303
4abd5ed2
JB
23042015-12-22 Joel Brobecker <brobecker@adacore.com>
2305
2306 * lynx-low.c (lynx_delete_thread_callback): New function.
2307 (lynx_mourn): Properly delete our process and all of its
2308 threads. Remove call to clear_inferiors.
2309
0e50fe5c
JB
23102015-12-22 Joel Brobecker <brobecker@adacore.com>
2311
2312 * target.c (thread_search_callback): Add check that
2313 the thread_stopped target callback is not NULL before
2314 calling it.
2315
35adc03f
YQ
23162015-12-21 Yao Qi <yao.qi@linaro.org>
2317
2318 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2319 arm breakpoint.
2320
bd2b2909
AT
23212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2322
2323 * server.c (handle_query): Call target_supports_software_single_step.
2324
7fe5e27e
AT
23252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2326
2327 * linux-low.c (single_step): New function.
2328 (linux_resume_one_lwp_throw): Call single_step.
2329 (start_step_over): Likewise.
2330
d9311bfa
AT
23312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2332
2333 * Makefile.in (SFILES): Append arch/arm-linux.c,
2334 arch/arm-get-next-pcs.c.
2335 (arm-linux.o): New rule.
2336 (arm-get-next-pcs.o): New rule.
2337 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2338 arm-linux.o.
2339 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2340 to linux-aarch32-low.c.
2341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2342 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2343 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2344 (thumb2_breakpoint_len): Likewise.
2345 (arm_is_thumb_mode): Make non-static.
2346 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2347 from linux-aarch32-low.c.
2348 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2349 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2350 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2351 (thumb2_breakpoint_len): Likewise.
2352 (arm_is_thumb_mode): New declaration.
2353 * linux-arm-low.c: Include arch/arm-linux.h
2354 aarch/arm-get-next-pcs.h, sys/syscall.h.
2355 (get_next_pcs_ops): New struct.
2356 (get_next_pcs_addr_bits_remove): New function.
2357 (get_next_pcs_is_thumb): New function.
2358 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2359 (arm_sigreturn_next_pc): Likewise.
2360 (get_next_pcs_syscall_next_pc): Likewise.
2361 (arm_gdbserver_get_next_pcs): Likewise.
2362 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2363 Initialize.
2364 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2365 * server.h: Include gdb_vecs.h.
2366
68ce2059
AT
23672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2368
2369 * Makefile.in (SFILES): Append common/common-regcache.c.
2370 (OBS): Append common-regcache.o.
2371 (common-regcache.o): New rule.
2372 * regcache.c (init_register_cache): Initialize cache to
2373 REG_UNAVAILABLE.
2374 (regcache_raw_read_unsigned): New function.
2375 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2376 register_status enum.
2377
fa5308bd
AT
23782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2379
2380 * linux-aarch64-low.c (the_low_targets): Rename
2381 breakpoint_reinsert_addr to get_next_pcs.
2382 * linux-arm-low.c (the_low_targets): Likewise.
2383 * linux-bfin-low.c (the_low_targets): Likewise.
2384 * linux-cris-low.c (the_low_targets): Likewise.
2385 * linux-crisv32-low.c (the_low_targets): Likewise.
2386 * linux-low.c (can_software_single_step): Likewise.
2387 (install_software_single_step_breakpoints): New function.
2388 (start_step_over): Use install_software_single_step_breakpoints.
2389 * linux-low.h: New CORE_ADDR vector.
2390 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2391 get_next_pcs.
2392 * linux-mips-low.c (the_low_targets): Likewise.
2393 * linux-nios2-low.c (the_low_targets): Likewise.
2394 * linux-sparc-low.c (the_low_targets): Likewise.
2395
4a6ed09b
PA
23962015-12-17 Pedro Alves <palves@redhat.com>
2397
2398 * linux-low.c (linux_kill_one_lwp): Remove references to
2399 LinuxThreads.
2400 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2401 to 'kill'.
2402 (linux_init_signals): Delete.
2403 (initialize_low): Adjust.
2404 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2405
7544db95
PA
24062015-12-16 Pedro Alves <palves@redhat.com>
2407
2408 * configure.ac (compiler warning flags): When testing a
2409 -Wno-foo option, check whether -Wfoo works instead.
2410 * configure: Regenerate.
2411
8020350c
DB
24122015-12-11 Don Breazeal <donb@codesourcery.com>
2413
2414 * server.c (process_serial_event): Don't exit from gdbserver
2415 in remote mode if there are still active inferiors.
2416
db91f502
YQ
24172015-12-11 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2420 arm_breakpoint_at if the process is 32-bit.
2421
b37a6290
YQ
24222015-12-11 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2425 arm breakpoint.
2426
17b1509a
YQ
24272015-12-07 Yao Qi <yao.qi@linaro.org>
2428
2429 * configure.srv: Append arm.o to srv_tgtobj for
2430 aarch64*-*-linux* target.
2431 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2432 from linux-arm-low.c.
2433 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2434 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2435 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2436 (thumb2_breakpoint_len): Likewise.
2437 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2438 (arm_breakpoint_kinds): Likewise.
2439 (arm_breakpoint_kind_from_pc): Likewise.
2440 (arm_sw_breakpoint_from_kind): Likewise.
2441 (arm_breakpoint_kind_from_current_state): Likewise.
2442 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2443 (arm_sw_breakpoint_from_kind): Declare.
2444 (arm_breakpoint_kind_from_current_state): Declare.
2445 (arm_breakpoint_at): Declare.
2446 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2447 arm_sw_breakpoint_from_kind if process is 32-bit.
2448 (aarch64_breakpoint_kind_from_pc): New function.
2449 (aarch64_breakpoint_kind_from_current_state): New function.
2450 (the_low_target): Initialize fields breakpoint_kind_from_pc
2451 and breakpoint_kind_from_current_state.
2452 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2453 linux-aarch32-low.c.
2454 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2455 (arm_breakpoint, arm_breakpoint_len): Likewise.
2456 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2457 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2458 (arm_is_thumb_mode): Likewise.
2459 (arm_breakpoint_at): Likewise.
2460 (arm_breakpoint_kind_from_pc): Likewise.
2461 (arm_sw_breakpoint_from_kind): Likewise.
2462 (arm_breakpoint_kind_from_current_state): Likewise.
2463
2464 Revert:
2465 2015-08-04 Yao Qi <yao.qi@linaro.org>
2466
2467 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2468 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2469 * server.c (extended_protocol): Remove "static".
2470 * server.h (extended_protocol): Declare it.
2471
ece66d65
JS
24722015-12-04 Josh Stone <jistone@redhat.com>
2473
2474 * target.h (struct target_ops) <arch_setup>: Rename to ...
2475 (struct target_ops) <post_create_inferior>: ... this.
2476 (target_arch_setup): Rename to ...
2477 (target_post_create_inferior): ... this, calling post_create_inferior.
2478 * server.c (start_inferior): Update target_arch_setup calls to
2479 target_post_create_inferior.
2480 * linux-low.c (linux_low_ptrace_options): Forward declare.
2481 (linux_arch_setup): Update its comment for general use.
2482 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2483 (struct linux_target_ops): Use linux_post_create_inferior.
2484 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2485 to post_create_inferior.
2486 * nto-low.c (struct nto_target_ops): Likewise.
2487 * spu-low.c (struct spu_target_ops): Likewise.
2488 * win32-low.c (struct win32_target_ops): Likewise.
2489
e58c48b4
AT
24902015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2491
2492 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2493
fbec8956
AT
24942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2495
2496 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2497 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2498 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2499 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2500 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2501 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2502 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2503 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2504 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2505 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2506 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2507 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2508
9b4c5f87
AT
25092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * linux-low.c (linux_look_up_symbols): Don't call
2512 linux_supports_traceclone.
2513 * linux-low.h (thread_db_init): Remove use_events argument.
2514 * thread-db.c (thread_db_use_event): Remove global variable.
2515 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2516 (struct thread_db) <td_create_bp>: Remove field.
2517 (thread_db_create_event): Remove function.
2518 (thread_db_enable_reporting): Likewise.
2519 (find_one_thread): Don't check for thread_db_use_events.
2520 (attach_thread): Likewise.
2521 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2522 (try_thread_db_load_1): Don't check for thread_db_use_events.
2523 (thread_db_init): Remove use_events argument and thread events
2524 handling.
2525 (remove_thread_event_breakpoints): Remove function.
2526 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2527
7d00775e
AT
25282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2529
2530 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2531 New function.
2532 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2533 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2534 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2535 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2536 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2537 Initialize.
2538 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2539 New function.
2540 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2541 * linux-low.c (can_hardware_single_step): Use
2542 supports_hardware_single_step.
2543 (can_software_single_step): New function.
2544 (start_step_over): Call can_software_single_step.
2545 (linux_supports_hardware_single_step): New function.
2546 (struct target_ops) <supports_software_single_step>: Initialize.
2547 * linux-low.h (struct linux_target_ops)
2548 <supports_hardware_single_step>: Initialize.
2549 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2550 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2551 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2552 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2553 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2554 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2555 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2556 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2557 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2558 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2559 Initialize.
2560 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2561 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2562 Initialize.
2563 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2564 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2565 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2566 New function.
2567 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2568 * target.h (struct target_ops): <supports_software_single_step>:
2569 New field.
2570 (target_supports_software_single_step): New macro.
2571
2d97cd35
AT
25722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2573
2574 * linux-low.c (linux_wait_1): Fix pc advance condition.
2575 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2576 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2577
769ef81f
AT
25782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2579
2580 * linux-arm-low.c (arm_is_thumb_mode): New function.
2581 (arm_breakpoint_at): Use arm_is_thumb_mode.
2582 (arm_breakpoint_kind_from_current_state): New function.
2583 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2584 Initialize.
2585 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2586 (linux_breakpoint_kind_from_current_state): New function.
2587 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2588 * linux-low.h (struct linux_target_ops)
2589 <breakpoint_kind_from_current_state>: New field.
2590 * target.h (struct target_ops): Likewise.
2591 (target_breakpoint_kind_from_current_state): New macro.
2592
1bebeeca
PA
25932015-11-30 Pedro Alves <palves@redhat.com>
2594
2595 * linux-low.c (linux_resume): Wake up the event loop before
2596 returning.
2597
a67a9fae
PA
25982015-11-30 Pedro Alves <palves@redhat.com>
2599
2600 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2601 check.
2602 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2603 to -1.
2604 * target.c (struct thread_search): New structure.
2605 (thread_search_callback): New function.
2606 (prev_general_thread): New global.
2607 (prepare_to_access_memory, done_accessing_memory): New functions.
2608 * target.h (prepare_to_access_memory, done_accessing_memory):
2609 Replace macros with function declarations.
2610
f2faf941
PA
26112015-11-30 Pedro Alves <palves@redhat.com>
2612
2613 PR 14618
2614 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2615 report TARGET_WAITKIND_NO_RESUMED.
2616 * remote-utils.c (prepare_resume_reply): Handle
2617 TARGET_WAITKIND_NO_RESUMED.
2618 * server.c (report_no_resumed): New global.
2619 (handle_query) <qSupported>: Handle "no-resumed+". Report
2620 "no-resumed+" support.
2621 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2622 return error if the client doesn't support no-resumed events.
2623 (push_stop_notification): New function.
2624 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2625 events if the client supports them.
2626
a681f9c9
PA
26272015-11-30 Pedro Alves <palves@redhat.com>
2628
2629 * linux-low.c (thread_still_has_status_pending_p): Don't check
2630 vCont;t here.
2631 (lwp_resumed): New function.
2632 (status_pending_p_callback): Return early if the LWP is not
2633 supposed to be resumed.
2634
65706a29
PA
26352015-11-30 Pedro Alves <palves@redhat.com>
2636
2637 * linux-low.c (handle_extended_wait): Assert that the LWP's
2638 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2639 thread create events, leave the new child's status pending.
2640 (linux_low_filter_event): If GDB wants to hear about thread exit
2641 events, leave the LWP marked dead and don't delete it.
2642 (linux_wait_for_event_filtered): Don't check for thread exit.
2643 (filter_exit_event): New function.
2644 (linux_wait_1): Use it, when returning an exit event.
2645 (linux_resume_one_lwp_throw): Assert that the LWP's
2646 waitstatus is TARGET_WAITKIND_IGNORE.
2647 * remote-utils.c (prepare_resume_reply): Handle
2648 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2649 * server.c (report_thread_events): New global.
2650 (handle_general_set): Handle QThreadEvents.
2651 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2652 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2653 TARGET_WAITKIND_THREAD_EXITED.
2654 * server.h (report_thread_events): Declare.
2655
56cf4bed
PA
26562015-11-30 Pedro Alves <palves@redhat.com>
2657
2658 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2659 the thread's last_resume_kind was resume_stop.
2660
500c1d85
PA
26612015-11-30 Pedro Alves <palves@redhat.com>
2662
2663 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2664 before returning.
2665
de979965
PA
26662015-11-30 Pedro Alves <palves@redhat.com>
2667
2668 * server.c (handle_v_requests): Handle vCtrlC.
2669
34c65914
PA
26702015-11-30 Pedro Alves <palves@redhat.com>
2671
2672 * gdbthread.h (find_any_thread_of_pid): Declare.
2673 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2674 functions.
2675 * server.c (handle_query): If current_thread is NULL, look for
2676 another thread of the selected process.
2677
79efa585 26782015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2679 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2680
2681 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2682 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2683 name in reply.
2684 * target.h (struct target_ops) <thread_name>: New field.
2685 (target_thread_name): New macro.
2686
80d82c19
JB
26872015-11-23 Joel Brobecker <brobecker@adacore.com>
2688
2689 * regcache.h (regcache_invalidate_pid): Add declaration.
2690 * regcache.c (regcache_invalidate_pid): New function, extracted
2691 from regcache_invalidate.
2692 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2693 Add trivial documentation comment.
2694 * lynx-low.c: Use regcache_invalidate_pid instead of
2695 regcache_invalidate.
2696
64da5dd5
JB
26972015-11-23 Joel Brobecker <brobecker@adacore.com>
2698
2699 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2700 and Elf64_auxv_t if the target is Android.
2701
37ce4055
DE
27022015-11-22 Doug Evans <xdje42@gmail.com>
2703
2704 * target.h: #include <sys/types.h>.
2705
06e03fff
PA
27062015-11-19 Pedro Alves <palves@redhat.com>
2707
2708 * linux-low.c (linux_process_qsupported): Change prototype.
2709 Adjust.
2710 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2711 Change prototype.
2712 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2713 and adjust to loop over all features.
2714 * server.c (handle_query) <qSupported>: Adjust to call
2715 target_process_qsupported once, passing it a vector of unprocessed
2716 features.
2717 * target.h (struct target_ops) <process_qsupported>: Change
2718 prototype.
2719 (target_process_qsupported): Adjust.
2720
9a084706
PA
27212015-11-19 Pedro Alves <palves@redhat.com>
2722
2723 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2724 mode.
2725 * configure: Regenerate.
2726
dad44a1f
PA
27272015-11-19 Pedro Alves <palves@redhat.com>
2728
2729 * configure: Regenerate.
2730
231c0592
YQ
27312015-11-19 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2734 type to uint32_t.
2735
6c1c9a8b
YQ
27362015-11-19 Yao Qi <yao.qi@linaro.org>
2737
2738 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2739 (struct aarch64_operand): Move enum out.
2740
9caa3311
YQ
27412015-11-19 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2744 struct user_fpsimd_state *.
2745 (aarch64_store_fpregset): Likewise.
2746
6a69a054
YQ
27472015-11-19 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2750 struct user_pt_regs *.
2751 (aarch64_store_gregset): Likewise.
2752
1798301e
PA
27532015-11-18 Pedro Alves <palves@redhat.com>
2754
2755 * Makefile.in (all_object_files): Add $IPA_OBJS.
2756
ce7715e2
PA
27572015-11-17 Pedro Alves <palves@redhat.com>
2758
2759 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2760 GDB_SIGNAL_0 and gdb_signal_to_string.
2761
c0879059
PA
27622015-11-17 Pedro Alves <palves@redhat.com>
2763
2764 * win32-low.c (handle_output_debug_string): Remove parameter.
2765 (win32_kill): Remove our_status local and adjust call to
2766 handle_output_debug_string.
2767 (get_child_debug_event): Adjust call to
2768 handle_output_debug_string.
2769
1996e237
SM
27702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2771
2772 * linux-mips-low.c (mips_fill_gregset): Add cast.
2773 (mips_store_gregset): Likewise.
2774 (mips_fill_fpregset): Likewise.
2775 (mips_store_fpregset): Likewise.
2776
cbec665b
SM
27772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2780 priv.
2781
eb3e3c67
SM
27822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2783
2784 * linux-mips-low.c (mips_linux_new_thread): Change type of
2785 watch_type to enum target_hw_bp_type.
2786
171de4b8
SM
27872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2788
2789 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2790 Change return type to arm_hwbp_type.
2791
04248ead
SM
27922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2793
2794 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2795 (arm_store_gregset): Likewise.
2796 * linux-arm-low.c (arm_get_hwcap): Likewise.
2797 (arm_read_description): Likewise.
2798
04b3479c
SM
27992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2800
2801 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2802
2bc84e8a
SM
28032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2804
2805 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2806 (ppc_fill_vsxregset): Likewise.
2807 (ppc_store_vsxregset): Likewise.
2808 (ppc_fill_vrregset): Likewise.
2809 (ppc_store_vrregset): Likewise.
2810 (ppc_fill_evrregset): Likewise.
2811 (ppc_store_evrregset): Likewise.
2812
e6c5bb05
SM
28132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * linux-ppc-low.c (ppc_usrregs_info): Remove
2816 forward-declaration.
2817 (ppc_arch_setup): Move lower in file.
2818
7ea45d72
SM
28192015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2820
2821 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2822 (ps_pdwrite): Likewise.
2823
69291610
HW
28242015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2825
2826 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2827 to after assert checks.
2828
b42945fd
SM
28292015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2830
2831 * proc-service.c (ps_pdread): Add/adjust casts.
2832 (ps_pdwrite): Add/adjust casts.
2833
d6f85c84
SM
28342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2835
2836 * server.c (handle_search_memory_1): Cast return value of
2837 memmem.
2838
f98cd059
SM
28392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2840
2841 * server.c (write_qxfer_response): Change type of data to
2842 gdb_byte *.
2843
d2412fa5
PA
28442015-10-29 Pedro Alves <palves@redhat.com>
2845
2846 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2847
c17414a2
PA
28482015-10-29 Pedro Alves <palves@redhat.com>
2849
2850 * tracepoint.c (clear_installed_tracepoints): Add casts.
2851
e053fbc4
PA
28522015-10-29 Pedro Alves <palves@redhat.com>
2853
2854 * server.c (handle_v_cont, process_serial_event): Add enum
2855 gdb_signal casts to signal parsing code.
2856
add67df8
PA
28572015-10-29 Pedro Alves <palves@redhat.com>
2858
2859 * linux-low.h (NULL_REGSET): Define.
2860 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2861 * linux-arm-low.c (arm_regsets): Likewise.
2862 * linux-crisv32-low.c (cris_regsets): Likewise.
2863 * linux-m68k-low.c (m68k_regsets): Likewise.
2864 * linux-mips-low.c (mips_regsets): Likewise.
2865 * linux-nios2-low.c (nios2_regsets): Likewise.
2866 * linux-ppc-low.c (ppc_regsets): Likewise.
2867 * linux-s390-low.c (s390_regsets): Likewise.
2868 * linux-sh-low.c (sh_regsets): Likewise.
2869 * linux-sparc-low.c (sparc_regsets): Likewise.
2870 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2871 * linux-tile-low.c (tile_regsets): Likewise.
2872 * linux-x86-low.c (x86_regsets): Likewise.
2873 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2874
50bc912a
PA
28752015-10-29 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.h (NULL_REGSET): Define.
2878 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2879 * linux-arm-low.c (arm_regsets): Likewise.
2880 * linux-crisv32-low.c (cris_regsets): Likewise.
2881 * linux-m68k-low.c (m68k_regsets): Likewise.
2882 * linux-mips-low.c (mips_regsets): Likewise.
2883 * linux-nios2-low.c (nios2_regsets): Likewise.
2884 * linux-ppc-low.c (ppc_regsets): Likewise.
2885 * linux-s390-low.c (s390_regsets): Likewise.
2886 * linux-sh-low.c (sh_regsets): Likewise.
2887 * linux-sparc-low.c (sparc_regsets): Likewise.
2888 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2889 * linux-tile-low.c (tile_regsets): Likewise.
2890 * linux-x86-low.c (x86_regsets): Likewise.
2891 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2892
682b2546
DE
28932015-10-26 Doug Evans <dje@google.com>
2894
2895 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2896
963843d4
DE
28972015-10-26 Doug Evans <dje@google.com>
2898
2899 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2900
d41401ac
DE
29012015-10-26 Doug Evans <dje@google.com>
2902
2903 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2904 for debug_printf.
2905 (attach_thread, find_new_threads_callback): Ditto.
2906
3db28855
AT
29072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2908
2909 * mem-break.h (set_breakpoint_data): Remove.
2910
fb78e89c
AT
29112015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2912
2913 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2914 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2915 (initialize_low): Remove set_breakpoint_data call.
2916 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2917 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2918 (initialize_low): Remove set_breakpoint_data call.
2919 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2920 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2921 (initialize_low): Remove set_breakpoint_data call.
2922
2e6ee069
AT
29232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2924
2925 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2926 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2927 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2928 * target.h (target_breakpoint_kind_from_pc): New macro.
2929
1652a986
AT
29302015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2931
2932 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2933 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2934 the default breakpoint kind.
2935
abeead09
AT
29362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2937
2938 * linux-arm-low.c (arm_supports_z_point_type): Add software
2939 breakpoint support.
2940
b0b4b501
AT
29412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2942
2943 * linux-arm-low.c: Refactor breakpoint definitions.
2944 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2945 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2946
8689682c
AT
29472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2948
2949 * Makefile.in: Add arm.c/o.
2950 * configure.srv: Likewise.
2951 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2952 (arm_breakpoint_kind_from_pc): New function.
2953 (arm_sw_breakpoint_from_kind): Return proper kind.
2954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2955
27165294
AT
29562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2957
2958 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2959 removal.
2960 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2961 (struct raw_breakpoint) <size>: Remove.
2962 (struct raw_breakpoint) <kind>: Add.
2963 (bp_size): New function.
2964 (bp_opcode): Likewise.
2965 (find_raw_breakpoint_at): Adjust for kind.
2966 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2967 (remove_memory_breakpoint): Adjust for kind call bp_size.
2968 (set_raw_breakpoint_at): Adjust for kind.
2969 (set_breakpoint): Likewise.
2970 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2971 (delete_raw_breakpoint): Adjust for kind.
2972 (delete_breakpoint): Likewise.
2973 (find_gdb_breakpoint): Likewise.
2974 (set_gdb_breakpoint_1): Likewise.
2975 (set_gdb_breakpoint): Likewise.
2976 (delete_gdb_breakpoint_1): Likewise.
2977 (delete_gdb_breakpoint): Likewise.
2978 (uninsert_raw_breakpoint): Likewise.
2979 (reinsert_raw_breakpoint): Likewise.
2980 (set_breakpoint_data): Remove.
2981 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2982 (check_mem_read): Adjust for kind call bp_size.
2983 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2984 (clone_one_breakpoint): Adjust for kind.
2985 * mem-break.h (set_gdb_breakpoint): Likewise.
2986 (delete_gdb_breakpoint): Likewise.
2987 * server.c (process_serial_event): Likewise.
2988
dd373349
AT
29892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2990
2991 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2992 (struct linux_target_ops) <breakpoint>: Remove.
2993 (struct linux_target_ops) <breakpoint_len>: Remove.
2994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2996 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2997 (arm_sw_breakpoint_from_kind): New function.
2998 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2999 (struct linux_target_ops) <breakpoint>: Remove.
3000 (struct linux_target_ops) <breakpoint_len>: Remove.
3001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3003 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3004 (struct linux_target_ops) <breakpoint>: Remove.
3005 (struct linux_target_ops) <breakpoint_len>: Remove.
3006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3008 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3009 (struct linux_target_ops) <breakpoint>: Remove.
3010 (struct linux_target_ops) <breakpoint_len>: Remove.
3011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3013 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3014 and sw_breakpoint_from_kind to increment the pc.
3015 (linux_breakpoint_kind_from_pc): New function.
3016 (linux_sw_breakpoint_from_kind): New function.
3017 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3018 (initialize_low): Call breakpoint_kind_from_pc and
3019 sw_breakpoint_from_kind to replace breakpoint_data/len.
3020 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3021 New field.
3022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3023 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3024 (struct linux_target_ops) <breakpoint>: Remove.
3025 (struct linux_target_ops) <breakpoint_len>: Remove.
3026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3028 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3029 (struct linux_target_ops) <breakpoint>: Remove.
3030 (struct linux_target_ops) <breakpoint_len>: Remove.
3031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3033 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3034 (struct linux_target_ops) <breakpoint>: Remove.
3035 (struct linux_target_ops) <breakpoint_len>: Remove.
3036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3038 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3039 (struct linux_target_ops) <breakpoint>: Remove.
3040 (struct linux_target_ops) <breakpoint_len>: Remove.
3041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3042 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3043 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3044 (struct linux_target_ops) <breakpoint>: Remove.
3045 (struct linux_target_ops) <breakpoint_len>: Remove.
3046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3048 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3049 (struct linux_target_ops) <breakpoint>: Remove.
3050 (struct linux_target_ops) <breakpoint_len>: Remove.
3051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3053 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3054 (struct linux_target_ops) <breakpoint>: Remove.
3055 (struct linux_target_ops) <breakpoint_len>: Remove.
3056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3058 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3059 (struct linux_target_ops) <breakpoint>: Remove.
3060 (struct linux_target_ops) <breakpoint_len>: Remove.
3061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3063 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3064 (struct linux_target_ops) <breakpoint>: Remove.
3065 (struct linux_target_ops) <breakpoint_len>: Remove.
3066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3068 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3069 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3070 (struct linux_target_ops) <breakpoint>: Remove.
3071 (struct linux_target_ops) <breakpoint_len>: Remove.
3072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3074 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3075 (struct linux_target_ops) <breakpoint>: Remove.
3076 (struct linux_target_ops) <breakpoint_len>: Remove.
3077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3079
4cd98a19
AT
30802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3081
3082 * linux-cris-low.c (cris_get_pc): Remove void arg.
3083
774ee6d2
AR
30842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3085
3086 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3087 variable name.
3088
833dcd29
AR
30892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3090
3091 * inferiors.c (thread_pid_matches_callback): New function.
3092 (find_thread_process): New function.
3093 (remove_thread): Reset current_thread.
3094 (remove_process): Assert threads have been removed first.
3095
8d689ee5
YQ
30962015-10-15 Yao Qi <yao.qi@linaro.org>
3097
3098 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3099 if it is 3.
3100 (aarch64_remove_point): Likewise.
3101 * regcache.c (regcache_register_size): New function.
3102
1c2e1515
YQ
31032015-10-12 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-aarch64-low.c: Update all callers as emit_load_store
3106 is renamed to aarch64_emit_load_store.
3107
e1c587c3
YQ
31082015-10-12 Yao Qi <yao.qi@linaro.org>
3109
3110 * linux-aarch64-low.c: Update all callers of function renaming
3111 from emit_insn to aarch64_emit_insn.
3112
b6542f81
YQ
31132015-10-12 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3116 arch/aarch64-insn.h.
3117 (struct aarch64_memory_operand): Likewise.
3118 (ENCODE): Likewise.
3119 (emit_insn): Move to arch/aarch64-insn.c.
3120 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3121 (emit_load_store): Move to arch/aarch64-insn.c.
3122 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3123 (can_encode_int32): Remove.
3124
246994ce
YQ
31252015-10-12 Yao Qi <yao.qi@linaro.org>
3126
3127 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3128 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3129 (aarch64_relocate_instruction): Likewise.
3130 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3131 (struct aarch64_insn_visitor): Likewise.
3132
0badd99f
YQ
31332015-10-12 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3136 (struct aarch64_insn_visitor): New.
3137 (struct aarch64_insn_relocation_data): New.
3138 (aarch64_ftrace_insn_reloc_b): New function.
3139 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3140 (aarch64_ftrace_insn_reloc_cb): Likewise.
3141 (aarch64_ftrace_insn_reloc_tb): Likewise.
3142 (aarch64_ftrace_insn_reloc_adr): Likewise.
3143 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3144 (aarch64_ftrace_insn_reloc_others): Likewise.
3145 (visitor): New.
3146 (aarch64_relocate_instruction): Use visitor.
3147
dfaffe9d
YQ
31482015-10-12 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3151 int. Add argument buf.
3152 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3153 aarch64_relocate_instruction.
3154
70b439f0
YQ
31552015-10-12 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3158 argument insn. Remove local variable insn. Don't call
3159 target_read_uint32.
3160 (aarch64_install_fast_tracepoint_jump_pad): Call
3161 target_read_uint32.
3162
7781c06f
YQ
31632015-09-30 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3166 (emit_load_store_pair): Likewise.
3167
9a3c8263
SM
31682015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * dll.c (match_dll): Add cast(s).
3171 (unloaded_dll): Likewise.
3172 * linux-low.c (second_thread_of_pid_p): Likewise.
3173 (delete_lwp_callback): Likewise.
3174 (count_events_callback): Likewise.
3175 (select_event_lwp_callback): Likewise.
3176 (linux_set_resume_request): Likewise.
3177 * server.c (accumulate_file_name_length): Likewise.
3178 (emit_dll_description): Likewise.
3179 (handle_qxfer_threads_worker): Likewise.
3180 (visit_actioned_threads): Likewise.
3181 * thread-db.c (any_thread_of): Likewise.
3182 * tracepoint.c (same_process_p): Likewise.
3183 (match_blocktype): Likewise.
3184 (build_traceframe_info_xml): Likewise.
3185
224c3ddb
SM
31862015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3187
3188 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3189 assignment.
3190 (gdb_unparse_agent_expr): Likewise.
3191 * hostio.c (require_data): Likewise.
3192 (handle_pread): Likewise.
3193 * linux-low.c (disable_regset): Likewise.
3194 (fetch_register): Likewise.
3195 (store_register): Likewise.
3196 (get_dynamic): Likewise.
3197 (linux_qxfer_libraries_svr4): Likewise.
3198 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3199 (set_fast_tracepoint_jump): Likewise.
3200 (uninsert_fast_tracepoint_jumps_at): Likewise.
3201 (reinsert_fast_tracepoint_jumps_at): Likewise.
3202 (validate_inserted_breakpoint): Likewise.
3203 (clone_agent_expr): Likewise.
3204 * regcache.c (init_register_cache): Likewise.
3205 * remote-utils.c (putpkt_binary_1): Likewise.
3206 (decode_M_packet): Likewise.
3207 (decode_X_packet): Likewise.
3208 (look_up_one_symbol): Likewise.
3209 (relocate_instruction): Likewise.
3210 (monitor_output): Likewise.
3211 * server.c (handle_search_memory): Likewise.
3212 (handle_qxfer_exec_file): Likewise.
3213 (handle_qxfer_libraries): Likewise.
3214 (handle_qxfer): Likewise.
3215 (handle_query): Likewise.
3216 (handle_v_cont): Likewise.
3217 (handle_v_run): Likewise.
3218 (captured_main): Likewise.
3219 * target.c (write_inferior_memory): Likewise.
3220 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3221 * tracepoint.c (init_trace_buffer): Likewise.
3222 (add_tracepoint_action): Likewise.
3223 (add_traceframe): Likewise.
3224 (add_traceframe_block): Likewise.
3225 (cmd_qtdpsrc): Likewise.
3226 (cmd_qtdv): Likewise.
3227 (cmd_qtstatus): Likewise.
3228 (response_source): Likewise.
3229 (response_tsv): Likewise.
3230 (cmd_qtnotes): Likewise.
3231 (gdb_collect): Likewise.
3232 (initialize_tracepoint): Likewise.
3233
afbe19f8
PL
32342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3235
3236 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3237 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3238 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3239 <NOP>: New.
3240 (enum aarch64_condition_codes): New enum.
3241 (w0): New static global.
3242 (fp): Likewise.
3243 (lr): Likewise.
3244 (struct aarch64_memory_operand) <type>: New
3245 MEMORY_OPERAND_POSTINDEX type.
3246 (postindex_memory_operand): New helper function.
3247 (emit_ret): New function.
3248 (emit_load_store_pair): New function, factored out of emit_stp
3249 with support for MEMORY_OPERAND_POSTINDEX.
3250 (emit_stp): Rewrite using emit_load_store_pair.
3251 (emit_ldp): New function.
3252 (emit_load_store): Likewise.
3253 (emit_ldr): Mention post-index instruction in comment.
3254 (emit_ldrh): New function.
3255 (emit_ldrb): New function.
3256 (emit_ldrsw): Mention post-index instruction in comment.
3257 (emit_str): Likewise.
3258 (emit_subs): New function.
3259 (emit_cmp): Likewise.
3260 (emit_and): Likewise.
3261 (emit_orr): Likewise.
3262 (emit_orn): Likewise.
3263 (emit_eor): Likewise.
3264 (emit_mvn): Likewise.
3265 (emit_lslv): Likewise.
3266 (emit_lsrv): Likewise.
3267 (emit_asrv): Likewise.
3268 (emit_mul): Likewise.
3269 (emit_sbfm): Likewise.
3270 (emit_sbfx): Likewise.
3271 (emit_ubfm): Likewise.
3272 (emit_ubfx): Likewise.
3273 (emit_csinc): Likewise.
3274 (emit_cset): Likewise.
3275 (emit_nop): Likewise.
3276 (emit_ops_insns): New helper function.
3277 (emit_pop): Likewise.
3278 (emit_push): Likewise.
3279 (aarch64_emit_prologue): New function.
3280 (aarch64_emit_epilogue): Likewise.
3281 (aarch64_emit_add): Likewise.
3282 (aarch64_emit_sub): Likewise.
3283 (aarch64_emit_mul): Likewise.
3284 (aarch64_emit_lsh): Likewise.
3285 (aarch64_emit_rsh_signed): Likewise.
3286 (aarch64_emit_rsh_unsigned): Likewise.
3287 (aarch64_emit_ext): Likewise.
3288 (aarch64_emit_log_not): Likewise.
3289 (aarch64_emit_bit_and): Likewise.
3290 (aarch64_emit_bit_or): Likewise.
3291 (aarch64_emit_bit_xor): Likewise.
3292 (aarch64_emit_bit_not): Likewise.
3293 (aarch64_emit_equal): Likewise.
3294 (aarch64_emit_less_signed): Likewise.
3295 (aarch64_emit_less_unsigned): Likewise.
3296 (aarch64_emit_ref): Likewise.
3297 (aarch64_emit_if_goto): Likewise.
3298 (aarch64_emit_goto): Likewise.
3299 (aarch64_write_goto_address): Likewise.
3300 (aarch64_emit_const): Likewise.
3301 (aarch64_emit_call): Likewise.
3302 (aarch64_emit_reg): Likewise.
3303 (aarch64_emit_pop): Likewise.
3304 (aarch64_emit_stack_flush): Likewise.
3305 (aarch64_emit_zero_ext): Likewise.
3306 (aarch64_emit_swap): Likewise.
3307 (aarch64_emit_stack_adjust): Likewise.
3308 (aarch64_emit_int_call_1): Likewise.
3309 (aarch64_emit_void_call_2): Likewise.
3310 (aarch64_emit_eq_goto): Likewise.
3311 (aarch64_emit_ne_goto): Likewise.
3312 (aarch64_emit_lt_goto): Likewise.
3313 (aarch64_emit_le_goto): Likewise.
3314 (aarch64_emit_gt_goto): Likewise.
3315 (aarch64_emit_ge_got): Likewise.
3316 (aarch64_emit_ops_impl): New static global variable.
3317 (aarch64_emit_ops): New target function, return
3318 &aarch64_emit_ops_impl.
3319 (struct linux_target_ops): Install it.
3320
bb903df0
PL
33212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3322
3323 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3324 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3325 aarch64-ipa.o.
3326 * linux-aarch64-ipa.c: New file.
3327 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3328 and endian.h.
3329 (aarch64_get_thread_area): New target method.
3330 (extract_signed_bitfield): New helper function.
3331 (aarch64_decode_ldr_literal): New function.
3332 (enum aarch64_opcodes): New enum.
3333 (struct aarch64_register): New struct.
3334 (struct aarch64_operand): New struct.
3335 (x0): New static global.
3336 (x1): Likewise.
3337 (x2): Likewise.
3338 (x3): Likewise.
3339 (x4): Likewise.
3340 (w2): Likewise.
3341 (ip0): Likewise.
3342 (sp): Likewise.
3343 (xzr): Likewise.
3344 (aarch64_register): New helper function.
3345 (register_operand): Likewise.
3346 (immediate_operand): Likewise.
3347 (struct aarch64_memory_operand): New struct.
3348 (offset_memory_operand): New helper function.
3349 (preindex_memory_operand): Likewise.
3350 (enum aarch64_system_control_registers): New enum.
3351 (ENCODE): New macro.
3352 (emit_insn): New helper function.
3353 (emit_b): New function.
3354 (emit_bcond): Likewise.
3355 (emit_cb): Likewise.
3356 (emit_tb): Likewise.
3357 (emit_blr): Likewise.
3358 (emit_stp): Likewise.
3359 (emit_ldp_q_offset): Likewise.
3360 (emit_stp_q_offset): Likewise.
3361 (emit_load_store): Likewise.
3362 (emit_ldr): Likewise.
3363 (emit_ldrsw): Likewise.
3364 (emit_str): Likewise.
3365 (emit_ldaxr): Likewise.
3366 (emit_stxr): Likewise.
3367 (emit_stlr): Likewise.
3368 (emit_data_processing_reg): Likewise.
3369 (emit_data_processing): Likewise.
3370 (emit_add): Likewise.
3371 (emit_sub): Likewise.
3372 (emit_mov): Likewise.
3373 (emit_movk): Likewise.
3374 (emit_mov_addr): Likewise.
3375 (emit_mrs): Likewise.
3376 (emit_msr): Likewise.
3377 (emit_sevl): Likewise.
3378 (emit_wfe): Likewise.
3379 (append_insns): Likewise.
3380 (can_encode_int32_in): New helper function.
3381 (aarch64_relocate_instruction): New function.
3382 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3383 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3384 (struct linux_target_ops): Install aarch64_get_thread_area,
3385 aarch64_install_fast_tracepoint_jump_pad and
3386 aarch64_get_min_fast_tracepoint_insn_len.
3387
787749ea
PL
33882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3389
3390 * Makefile.in (aarch64-insn.o): New rule.
3391 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3392
9812b2e6
YQ
33932015-09-21 Yao Qi <yao.qi@linaro.org>
3394
3395 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3396
18fe412b
YQ
33972015-09-21 Yao Qi <yao.qi@linaro.org>
3398
3399 * tracepoint.c (max_jump_pad_size): Remove.
3400
a0cc84cd
YQ
34012015-09-18 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-aarch64-low.c: Don't include sys/uio.h.
3404 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3405
d78908cf
WW
34062015-09-16 Wei-cheng Wang <cole945@gmail.com>
3407
3408 * tracepoint.c (eval_result_type): Change prototype.
3409 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3410
d57e0d50
PA
34112015-09-15 Pedro Alves <palves@redhat.com>
3412
3413 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3414 Check whether to report exec events instead of checking whether
3415 multiprocess is enabled.
3416
5a676acc
PA
34172015-09-15 Pedro Alves <palves@redhat.com>
3418
3419 PR remote/18965
3420 * remote-utils.c (prepare_resume_reply): Merge
3421 TARGET_WAITKIND_VFORK_DONE switch case with the
3422 TARGET_WAITKIND_FORKED case.
3423
7c5d0fad
YQ
34242015-09-15 Yao Qi <yao.qi@linaro.org>
3425
3426 * server.c (handle_query): Check string comparison using
3427 "else if" instead of "if".
3428
750ce8d1
YQ
34292015-09-15 Yao Qi <yao.qi@linaro.org>
3430
3431 * server.c (vCont_supported): New global variable.
3432 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3433 matches. Append ";vContSupported+" to own_buf.
3434 (handle_v_requests): Append ";s;S" to own_buf if target supports
3435 hardware single step or vCont_supported is false.
3436 (capture_main): Set vCont_supported to zero.
3437
70b90b91
YQ
34382015-09-15 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3441 it to ...
3442 (linux_supports_hardware_single_step): ... New function.
3443 (linux_target_ops): Update.
3444 * lynx-low.c (lynx_target_ops): Set field
3445 supports_hardware_single_step to target_can_do_hardware_single_step.
3446 * nto-low.c (nto_target_ops): Likewise.
3447 * spu-low.c (spu_target_ops): Likewise.
3448 * win32-low.c (win32_target_ops): Likewise.
3449 * target.c (target_can_do_hardware_single_step): New function.
3450 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3451 Remove. <supports_hardware_single_step>: New field.
3452 (target_supports_conditional_breakpoints): Remove.
3453 (target_supports_hardware_single_step): New macro.
3454 (target_can_do_hardware_single_step): Declare.
3455 * server.c (handle_query): Use target_supports_hardware_single_step
3456 instead of target_supports_conditional_breakpoints.
3457
ade90bde
YQ
34582015-09-15 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3461 function.
3462 (struct linux_target_ops the_low_target): Install
3463 aarch64_linux_siginfo_fixup.
3464
94585166
DB
34652015-09-11 Don Breazeal <donb@codesourcery.com>
3466 Luis Machado <lgustavo@codesourcery.com>
3467
3468 * linux-low.c (linux_mourn): Static declaration.
3469 (linux_arch_setup): Move in front of
3470 handle_extended_wait.
3471 (linux_arch_setup_thread): New function.
3472 (handle_extended_wait): Handle exec events. Call
3473 linux_arch_setup_thread. Make event_lwp argument a
3474 pointer-to-a-pointer.
3475 (check_zombie_leaders): Do not check stopped threads.
3476 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3477 (linux_low_filter_event): Add lwp and thread for exec'ing
3478 non-leader thread if leader thread has been deleted.
3479 Refactor code into linux_arch_setup_thread and call it.
3480 Pass child lwp pointer by reference to handle_extended_wait.
3481 (linux_wait_for_event_filtered): Update comment.
3482 (linux_wait_1): Prevent clobbering exec event status.
3483 (linux_supports_exec_events): New function.
3484 (linux_target_ops) <supports_exec_events>: Initialize new member.
3485 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3486 new member.
3487 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3488 * server.c (report_exec_events): New global variable.
3489 (handle_query): Handle qSupported query for exec-events feature.
3490 (captured_main): Initialize report_exec_events.
3491 * server.h (report_exec_events): Declare new global variable.
3492 * target.h (struct target_ops) <supports_exec_events>: New
3493 member.
3494 (target_supports_exec_events): New macro.
3495 * win32-low.c (win32_target_ops) <supports_exec_events>:
3496 Initialize new member.
3497
0568462b
MM
34982015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3499
3500 * linux-low.c (linux_low_enable_btrace): Remove.
3501 (linux_target_ops): Replace linux_low_enable_btrace with
3502 linux_enable_btrace.
3503
39edd165
YQ
35042015-09-03 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch64-low.c (aarch64_insert_point): Call
3507 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3508 returns true.
3509
1db33b5a
UW
35102015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3511
3512 * linux-low.c (check_stopped_by_breakpoint): Use
3513 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3514
ab290430
PA
35152015-08-27 Pedro Alves <palves@redhat.com>
3516
3517 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3518
8d749320
SM
35192015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3520
6711b7f8
SM
3521 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3522 the XNEW-family equivalent.
8d749320
SM
3523 (compile_bytecodes): Likewise.
3524 * dll.c (loaded_dll): Likewise.
3525 * event-loop.c (append_callback_event): Likewise.
3526 (create_file_handler): Likewise.
3527 (create_file_event): Likewise.
3528 * hostio.c (handle_open): Likewise.
3529 * inferiors.c (add_thread): Likewise.
3530 (add_process): Likewise.
3531 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3532 * linux-arm-low.c (arm_new_process): Likewise.
3533 (arm_new_thread): Likewise.
3534 * linux-low.c (add_to_pid_list): Likewise.
3535 (linux_add_process): Likewise.
3536 (handle_extended_wait): Likewise.
3537 (add_lwp): Likewise.
3538 (enqueue_one_deferred_signal): Likewise.
3539 (enqueue_pending_signal): Likewise.
3540 (linux_resume_one_lwp_throw): Likewise.
3541 (linux_resume_one_thread): Likewise.
3542 (linux_read_memory): Likewise.
3543 (linux_write_memory): Likewise.
3544 * linux-mips-low.c (mips_linux_new_process): Likewise.
3545 (mips_linux_new_thread): Likewise.
3546 (mips_add_watchpoint): Likewise.
3547 * linux-x86-low.c (initialize_low_arch): Likewise.
3548 * lynx-low.c (lynx_add_process): Likewise.
3549 * mem-break.c (set_raw_breakpoint_at): Likewise.
3550 (set_breakpoint): Likewise.
3551 (add_condition_to_breakpoint): Likewise.
3552 (add_commands_to_breakpoint): Likewise.
3553 (clone_agent_expr): Likewise.
3554 (clone_one_breakpoint): Likewise.
3555 * regcache.c (new_register_cache): Likewise.
3556 * remote-utils.c (look_up_one_symbol): Likewise.
3557 * server.c (queue_stop_reply): Likewise.
3558 (start_inferior): Likewise.
3559 (queue_stop_reply_callback): Likewise.
3560 (handle_target_event): Likewise.
3561 * spu-low.c (fetch_ppc_memory): Likewise.
3562 (store_ppc_memory): Likewise.
3563 * target.c (set_target_ops): Likewise.
3564 * thread-db.c (thread_db_load_search): Likewise.
3565 (try_thread_db_load_1): Likewise.
3566 * tracepoint.c (add_tracepoint): Likewise.
3567 (add_tracepoint_action): Likewise.
3568 (create_trace_state_variable): Likewise.
3569 (cmd_qtdpsrc): Likewise.
3570 (cmd_qtro): Likewise.
3571 (add_while_stepping_state): Likewise.
3572 * win32-low.c (child_add_thread): Likewise.
3573 (get_image_name): Likewise.
3574
ed8b7b42
YQ
35752015-08-25 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3578
db3cb7cb
YQ
35792015-08-25 Yao Qi <yao.qi@linaro.org>
3580
3581 * Makefile.in (aarch64-linux.o): New rule.
3582 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3583 srv_tgtobj.
3584 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3585 (aarch64_init_debug_reg_state): Make it extern.
3586 (aarch64_linux_prepare_to_resume): Remove.
3587
f6011a1c
YQ
35882015-08-25 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3591 lwp_arch_private_info and ptid_of_lwp.
3592
88e2cf7e
YQ
35932015-08-25 Yao Qi <yao.qi@linaro.org>
3594
3595 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3596 Find proc_info by find_process_pid. All callers updated.
3597
5e35436e
YQ
35982015-08-25 Yao Qi <yao.qi@linaro.org>
3599
3600 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3601 Remove.
3602 (debug_reg_change_callback): Remove.
3603 (aarch64_notify_debug_reg_change): Remove.
3604
4a8a7965
YQ
36052015-08-25 Yao Qi <yao.qi@linaro.org>
3606
3607 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3608 Call current_lwp_ptid.
3609
32a271ee
YQ
36102015-08-25 Yao Qi <yao.qi@linaro.org>
3611
3612 * linux-aarch64-low.c (debug_reg_change_callback): Use
3613 debug_printf.
3614
0d51c8d7
YQ
36152015-08-25 Yao Qi <yao.qi@linaro.org>
3616
3617 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3618
31a43dd5
YQ
36192015-08-25 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3622
8ee52567
YQ
36232015-08-25 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3626 the code.
3627
ff3f0f45
YQ
36282015-08-25 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3631 Remove.
3632 (debug_reg_change_callback): Remove argument entry and add argument
3633 lwp. Remove local variable thread. Don't print thread id in the
3634 debugging output. Don't check whether pid of thread equals to pid.
3635 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3636 iterate_over_lwps instead find_inferior.
3637
3d40fbb5
PA
36382015-08-24 Pedro Alves <palves@redhat.com>
3639
3640 * inferiors.c (get_first_process): New function.
3641 * inferiors.h (get_first_process): New declaration.
3642 * remote-utils.c (read_ptid): Default to the first process in the
3643 list, instead of to the current thread's process.
3644
438e1e42
PA
36452015-08-24 Pedro Alves <palves@redhat.com>
3646
3647 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3648 * event-loop.c: Likewise.
3649 * remote-utils.c: Likewise.
3650 * tracepoint.c: Likewise.
3651
a8c6d4fc
PA
36522015-08-24 Pedro Alves <palves@redhat.com>
3653
3654 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3655 ptid_get_lwp.
3656
99b0bb12
PA
36572015-08-21 Pedro Alves <palves@redhat.com>
3658
3659 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3660 instead of literal 1.
3661
f8904751
PA
36622015-08-21 Pedro Alves <palves@redhat.com>
3663
3664 * tdesc.c (default_description): Explicitly zero-initialize.
3665
465a859e
PA
36662015-08-21 Pedro Alves <palves@redhat.com>
3667
3668 PR gdb/18749
3669 * inferiors.c (remove_thread): Discard any pending stop reply for
3670 this thread.
3671 * server.c (remove_all_on_match_pid): Rename to ...
3672 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3673 instead of a pid.
3674 (discard_queued_stop_replies): Change parameter to a ptid. Now
3675 extern.
3676 (handle_v_kill, kill_inferior_callback, captured_main)
3677 (process_serial_event): Adjust.
3678 * server.h (discard_queued_stop_replies): Declare.
3679
f0db101d
PA
36802015-08-21 Pedro Alves <palves@redhat.com>
3681
3682 * linux-low.c (wait_for_sigstop): Always switch to no thread
3683 selected if the previously current thread dies.
3684 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3685 process instead of the current thread's.
3686 * remote-utils.c (input_interrupt): Don't check if there's no
3687 current thread.
3688 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3689 current thread to the general thread fails, error out.
3690 (handle_qxfer_auxv, handle_qxfer_libraries)
3691 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3692 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3693 (handle_query): Check if there's a thread selected instead of
3694 checking whether there's any thread in the thread list.
3695 (handle_qxfer_threads, handle_qxfer_btrace)
3696 (handle_qxfer_btrace_conf): Don't error out early if there's no
3697 thread in the thread list.
3698 (handle_v_cont, myresume): Don't set the current thread to the
3699 continue thread.
3700 (process_serial_event) <Hg handling>: Also set thread_id if the
3701 previous general thread is still alive.
3702 (process_serial_event) <g/G handling>: If setting the current
3703 thread to the general thread fails, error out.
3704 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3705 thread's lwp instead of the current thread's.
3706 * target.c (set_desired_thread): If the desired thread was not
3707 found, leave the current thread pointing to NULL. Return an int
3708 (boolean) indicating success.
3709 * target.h (set_desired_thread): Change return type to int.
3710
40045d91
MF
37112015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3712
3713 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3714 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3715 #includes.
3716 (ps_get_thread_area): New function.
3717
45face3b
GB
37182015-08-19 Gary Benson <gbenson@redhat.com>
3719
3720 * hostio.c (handle_pread): Do not attempt to read more data
3721 than hostio_reply_with_data can fit in a packet.
3722
16d5f642
JB
37232015-08-18 Joel Brobecker <brobecker@adacore.com>
3724
3725 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3726
a738da3a
MF
37272015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3728
3729 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3730
33ebda9d
PA
37312015-08-06 Pedro Alves <palves@redhat.com>
3732
3733 * tracepoint.c (expr_eval_result): Now an int.
3734
a44892be
PA
37352015-08-06 Pedro Alves <palves@redhat.com>
3736
3737 * gdbthread.h (struct regcache): Forward declare.
3738 (struct thread_info) <regcache_data>: Now a struct regcache
3739 pointer.
3740 * inferiors.c (inferior_regcache_data)
3741 (set_inferior_regcache_data): Now work with struct regcache
3742 pointers.
3743 * inferiors.h (struct regcache): Forward declare.
3744 (inferior_regcache_data, set_inferior_regcache_data): Now work
3745 with struct regcache pointers.
3746 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3747 (free_register_cache_thread): Remove struct regcache pointer
3748 casts.
3749
608a1e46
PA
37502015-08-06 Pedro Alves <palves@redhat.com>
3751
3752 * server.c (captured_main): On error, print the exception message
3753 to stderr, and if run_once is set, throw a quit.
3754
f0ce0d3a
PA
37552015-08-06 Pedro Alves <palves@redhat.com>
3756
3757 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3758 the current thread.
3759
bf47e248
PA
37602015-08-06 Pedro Alves <palves@redhat.com>
3761
3762 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3763 reading beyond the passed in buffer length.
3764
b6b9ffcc
PL
37652015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3766
3767 * tracepoint.c (symbol_list) <required>: Remove.
3768
863d01bd
PA
37692015-08-06 Pedro Alves <palves@redhat.com>
3770
3771 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3772 count if stopping and suspending threads.
3773 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3774 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3775 (linux_detach): Complete an ongoing step-over.
3776 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3777 throughout.
3778 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3779 (linux_wait_1): If passing a signal to the inferior after
3780 finishing a step-over, unsuspend and re-resume all lwps. If we
3781 see a single-step event but the thread should be continuing, don't
3782 pass the trap to gdb.
3783 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3784 internal_error instead of gdb_assert.
3785 (enqueue_pending_signal): New function.
3786 (check_ptrace_stopped_lwp_gone): Add debug output.
3787 (start_step_over): Use internal_error instead of gdb_assert.
3788 (complete_ongoing_step_over): New function.
3789 (linux_resume_one_thread): Don't resume a suspended thread.
3790 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3791 it stepping.
3792
00db26fa
PA
37932015-08-06 Pedro Alves <palves@redhat.com>
3794
3795 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3796 (linux_thread_alive): Use lwp_is_marked_dead.
3797 (extended_event_reported): Delete.
3798 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3799 instead of extended_event_reported.
3800 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3801 as well.
3802 (lwp_is_marked_dead): New function.
3803 (lwp_running): Use lwp_is_marked_dead.
3804 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3805 comment.
3806
ad071a30
PA
38072015-08-06 Pedro Alves <palves@redhat.com>
3808
3809 * linux-low.c (linux_wait_1): Move fork event output out of the
3810 !report_to_gdb check. Pass event_child->waitstatus to
3811 target_waitstatus_to_string instead of ourstatus.
3812
524b57e6
YQ
38132015-08-04 Yao Qi <yao.qi@linaro.org>
3814
3815 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3816 if current_thread is 32 bit.
3817
6085d6f6
YQ
38182015-08-04 Yao Qi <yao.qi@linaro.org>
3819
3820 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3821 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3822 * server.c (extended_protocol): Remove "static".
3823 * server.h (extended_protocol): Declare it.
3824
8a7e4587
YQ
38252015-08-04 Yao Qi <yao.qi@linaro.org>
3826
3827 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3828 both aarch64 and aarch32.
3829 (aarch64_set_pc): Likewise.
3830
3b53ae99
YQ
38312015-08-04 Yao Qi <yao.qi@linaro.org>
3832
3833 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3834 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3835 arm-with-neon.xml to srv_xmlfiles.
3836 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3837 (is_64bit_tdesc): New function.
3838 (aarch64_linux_read_description): New function.
3839 (aarch64_arch_setup): Call aarch64_linux_read_description.
3840 (regs_info): Rename to regs_info_aarch64.
3841 (aarch64_regs_info): Return right regs_info.
3842 (initialize_low_arch): Call initialize_low_arch_aarch32.
3843
bd9e6534
YQ
38442015-08-04 Yao Qi <yao.qi@linaro.org>
3845
3846 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3847 * linux-aarch32-low.c: New file.
3848 * linux-aarch32-low.h: New file.
3849 * linux-arm-low.c (arm_fill_gregset): Move it to
3850 linux-aarch32-low.c.
3851 (arm_store_gregset): Likewise.
3852 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3853 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3854 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3855 (regs_info): Rename to regs_info_arm.
3856 (arm_regs_info): Return regs_info_aarch32 if
3857 have_ptrace_getregset is 1 and target description is
3858 arm_with_neon or arm_with_vfpv3.
3859 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3860 Call initialize_low_arch_aarch32 instead.
3861
ded48a5e
YQ
38622015-08-04 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3865 * linux-low.c: ... here.
3866 * linux-low.h (have_ptrace_getregset): Declare it.
3867
96e9210f
PA
38682015-08-04 Pedro Alves <palves@redhat.com>
3869
3870 * thread-db.c (struct thread_db): Use new typedefs.
3871 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3872 CHK calls.
3873 (disable_thread_event_reporting): Cast result of dlsym to
3874 destination function pointer type.
3875 (thread_db_mourn): Use td_ta_delete_ftype.
3876
af60a1ef
SL
38772015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3878
3879 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3880 arch variant.
3881 (CDX_BREAKPOINT): Define for R2.
3882 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3883 (the_low_target): Add comments.
3884
e8b41681
YQ
38852015-07-30 Yao Qi <yao.qi@linaro.org>
3886
3887 * linux-arm-low.c (arm_hwcap): Remove it.
3888 (arm_read_description): New local variable arm_hwcap. Don't
3889 set arm_hwcap to zero.
3890
89abb039
YQ
38912015-07-30 Yao Qi <yao.qi@linaro.org>
3892
3893 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3894 Use regcache->tdesc instead.
3895 (arm_store_wmmxregset): Likewise.
3896 (arm_fill_vfpregset): Likewise.
3897 (arm_store_vfpregset): Likewise.
3898
deca266c
YQ
38992015-07-30 Yao Qi <yao.qi@linaro.org>
3900
3901 * linux-arm-low.c: Include arch/arm.h.
3902 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3903 (arm_store_gregset): Likewise.
3904
aa58a496
SM
39052015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3906
3907 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3908 ptrace's 4th parameter.
3909
50904b25
YQ
39102015-07-27 Yao Qi <yao.qi@linaro.org>
3911
3912 * configure.srv (case aarch64*-*-linux*): Don't set
3913 srv_linux_usrregs.
3914
5826e159
PA
39152015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3916
3917 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3918 sys/ptrace.h.
3919 * linux-arm-low.c: Likewise.
3920 * linux-cris-low.c: Likewise.
3921 * linux-crisv32-low.c: Likewise.
3922 * linux-low.c: Likewise.
3923 * linux-m68k-low.c: Likewise.
3924 * linux-mips-low.c: Likewise.
3925 * linux-nios2-low.c: Likewise.
3926 * linux-s390-low.c: Likewise.
3927 * linux-sparc-low.c: Likewise.
3928 * linux-tic6x-low.c: Likewise.
3929 * linux-tile-low.c: Likewise.
3930 * linux-x86-low.c: Likewise.
3931
54019719
PA
39322015-07-24 Pedro Alves <palves@redhat.com>
3933
3934 * config.in: Regenerate.
3935 * configure: Regenerate.
3936
eb7aa561
PA
39372015-07-24 Pedro Alves <palves@redhat.com>
3938
3939 * acinclude.m4: Include ../ptrace.m4.
3940 * configure.ac: Call GDB_AC_PTRACE.
3941 * config.in, configure: Regenerate.
3942
55d7b841
YQ
39432015-07-24 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-low.c (linux_create_inferior): Remove setting to
3946 proc->priv->new_inferior.
3947 (linux_attach): Likewise.
3948 (linux_low_filter_event): Likewise.
3949 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3950
c06cbd92
YQ
39512015-07-24 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-low.c (linux_arch_setup): New function.
3954 (linux_low_filter_event): If proc->tdesc is NULL and
3955 proc->attached is true, call the_low_target.arch_setup.
3956 Otherwise, keep status pending, and return.
3957 (linux_resume_one_lwp_throw): Don't call get_pc if
3958 thread->while_stepping isn't NULL. Don't call
3959 get_thread_regcache if proc->tdesc is NULL.
3960 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3961 (linux_target_ops): Install arch_setup.
3962 * server.c (start_inferior): Call the_target->arch_setup.
3963 * target.h (struct target_ops) <arch_setup>: New field.
3964 (target_arch_setup): New marco.
3965 * lynx-low.c (lynx_target_ops): Update.
3966 * nto-low.c (nto_target_ops): Update.
3967 * spu-low.c (spu_target_ops): Update.
3968 * win32-low.c (win32_target_ops): Update.
3969
5ae3ebba
YQ
39702015-07-24 Yao Qi <yao.qi@linaro.org>
3971
3972 * linux-low.c (linux_add_process): Don't set
3973 proc->priv->new_inferior.
3974 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3975 (linux_attach): Likewise.
3976
eb97750b
YQ
39772015-07-24 Yao Qi <yao.qi@linaro.org>
3978
3979 * server.c (start_inferior): Code refactor.
3980
51aee833
YQ
39812015-07-24 Yao Qi <yao.qi@linaro.org>
3982
3983 * server.c (process_serial_event): Set general_thread.
3984
af1b22f3
YQ
39852015-07-21 Yao Qi <yao.qi@linaro.org>
3986
3987 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3988 aarch64_linux_get_debug_reg_capacity.
3989
554717a3
YQ
39902015-07-17 Yao Qi <yao.qi@linaro.org>
3991
3992 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3993 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3994 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3995 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3996 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3997 (AARCH64_HWP_ALIGNMENT): Likewise.
3998 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3999 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4000 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4001 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4002 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4003 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4004 (struct aarch64_debug_reg_state): Likewise.
4005 (struct arch_lwp_info): Likewise.
4006 (aarch64_align_watchpoint): Likewise.
4007 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4008 (aarch64_watchpoint_length): Likewise.
4009 (aarch64_point_encode_ctrl_reg): Likewise
4010 (aarch64_point_is_aligned): Likewise.
4011 (aarch64_align_watchpoint): Likewise.
4012 (aarch64_linux_set_debug_regs):
4013 (aarch64_dr_state_insert_one_point): Likewise.
4014 (aarch64_dr_state_remove_one_point): Likewise.
4015 (aarch64_handle_breakpoint): Likewise.
4016 (aarch64_handle_aligned_watchpoint): Likewise.
4017 (aarch64_handle_unaligned_watchpoint): Likewise.
4018 (aarch64_handle_watchpoint): Likewise.
4019
c67ca4de
YQ
40202015-07-17 Yao Qi <yao.qi@linaro.org>
4021
4022 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4023 and don't aarch64_get_debug_reg_state. All callers update.
4024 (aarch64_handle_aligned_watchpoint): Likewise.
4025 (aarch64_handle_unaligned_watchpoint): Likewise.
4026 (aarch64_handle_watchpoint): Likewise.
4027 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4028 (aarch64_remove_point): Likewise.
4029
25abf979
YQ
40302015-07-17 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4033 debug_printf.
4034 (aarch64_handle_unaligned_watchpoint): Likewise.
4035
db1ff28b
JK
40362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4037
4038 Revert the previous 3 commits:
4039 Move gdb_regex* to common/
4040 Move linux_find_memory_regions_full & co.
4041 gdbserver build-id attribute generator
4042
700ca40f
JK
40432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4044 Jan Kratochvil <jan.kratochvil@redhat.com>
4045
4046 gdbserver build-id attribute generator.
4047 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4048 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4049 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4050 (find_phdr): New.
4051 (get_dynamic): Use find_pdhr to traverse program headers.
4052 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4053 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4054 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4055 (get_hex_build_id): New.
4056 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4057 to reply XML document.
4058
9904185c
JK
40592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4060 Jan Kratochvil <jan.kratochvil@redhat.com>
4061
4062 * target.c: Include target/target-utils.h and fcntl.h.
4063 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4064 (target_fileio_read_stralloc): New functions.
4065
6e5b4429
JK
40662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4067
4068 * Makefile.in (OBS): Add gdb_regex.o.
4069 (gdb_regex.o): New.
4070 * config.in: Rebuilt.
4071 * configure: Rebuilt.
4072
ddc98fbf
JK
40732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4074 Jan Kratochvil <jan.kratochvil@redhat.com>
4075
4076 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4077 * Makefile.in (OBS): Add target-utils.o.
4078 (linux-maps.o, target-utils.o): New.
4079 * configure.srv (srv_linux_obj): Add linux-maps.o.
4080
e57bb7a0
PL
40812015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4082
4083 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4084 function, return 1.
4085 (the_low_target): Install it.
4086
586b02a9
PA
40872015-07-14 Pedro Alves <palves@redhat.com>
4088
4089 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4090 Instead, ignore ECHILD, and throw an error for other errnos.
4091
58c1b36c
PA
40922015-07-10 Pedro Alves <palves@redhat.com>
4093
4094 * event-loop.c (struct callback_event) <data>: Change type to
4095 gdb_client_data instance instead of gdb_client_data pointer.
4096 (append_callback_event): Adjust.
4097
421530db
PL
40982015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4099
4100 * linux-aarch64-low.c: Add comments for each linux_target_ops
4101 method. Remove comments already covered in target_ops and
4102 linux_target_ops definitions.
4103 (the_low_target): Add comments for each unimplemented method.
4104
c2d65f38
YQ
41052015-07-09 Yao Qi <yao.qi@linaro.org>
4106
4107 * linux-aarch64-low.c (aarch64_regmap): Remove.
4108 (aarch64_usrregs_info): Remove.
4109 (regs_info): Set field usrregs to NULL.
4110
b20a6524
MM
41112015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4112
4113 * linux-low.c: Include "rsp-low.h"
4114 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4115 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4116 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4117 (handle_btrace_enable_pt): New.
4118 (handle_btrace_general_set): Support "pt".
4119 (handle_btrace_conf_general_set): Support "pt:size".
4120
96c97461
PL
41212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4122
4123 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4124 Z_PACKET_SW_BP.
4125
37d66942
PL
41262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4127
4128 * linux-aarch64-low.c: Remove comment about endianness.
4129 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4130 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4131 memcmp.
4132
dc06243f
GB
41332015-06-24 Gary Benson <gbenson@redhat.com>
4134
4135 * linux-i386-ipa.c (stdint.h): Do not include.
4136 * lynx-i386-low.c (stdint.h): Likewise.
4137 * lynx-ppc-low.c (stdint.h): Likewise.
4138 * mem-break.c (stdint.h): Likewise.
4139 * thread-db.c (stdint.h): Likewise.
4140 * tracepoint.c (stdint.h): Likewise.
4141 * win32-low.c (stdint.h): Likewise.
4142
124e13d9
SM
41432015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4144
4145 * server.c (write_qxfer_response): Update call to
4146 remote_escape_output.
4147
909c2cda
JK
41482015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4149 Jan Kratochvil <jan.kratochvil@redhat.com>
4150
4151 Merge multiple hex conversions.
4152 * gdbreplay.c (tohex): Rename to 'fromhex'.
4153 (logchar): Use fromhex.
4154
24c05f46
JK
41552015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4156
4157 * server.c (handle_qxfer_libraries): Set `version' attribute for
4158 <library-list>.
4159
14d2069a
GB
41602015-06-10 Gary Benson <gbenson@redhat.com>
4161
4162 * target.h (struct target_ops) <multifs_open>: New field.
4163 <multifs_unlink>: Likewise.
4164 <multifs_readlink>: Likewise.
4165 * linux-low.c (nat/linux-namespaces.h): New include.
4166 (linux_target_ops): Initialize the_target->multifs_open,
4167 the_target->multifs_unlink and the_target->multifs_readlink.
4168 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4169 * hostio.c (hostio_fs_pid): New static variable.
4170 (hostio_handle_new_gdb_connection): New function.
4171 (handle_setfs): Likewise.
4172 (handle_open): Use the_target->multifs_open as appropriate.
4173 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4174 (handle_readlink): Use the_target->multifs_readlink as
4175 appropriate.
4176 (handle_vFile): Handle vFile:setfs packets.
4177 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4178 after target_handle_new_gdb_connection.
4179
4b8b5e72
GB
41802015-06-10 Gary Benson <gbenson@redhat.com>
4181
4182 * configure.ac (AC_CHECK_FUNCS): Add setns.
4183 * config.in: Regenerate.
4184 * configure: Likewise.
4185 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4186 (linux-namespaces.o): New rule.
4187 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4188
3ac2e371
GB
41892015-06-09 Gary Benson <gbenson@redhat.com>
4190
4191 * hostio.c (handle_open): Process mode argument with
4192 fileio_to_host_mode.
4193
ca9b78ce
YQ
41942015-06-01 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4197 * linux-x86-low.c: Likewise.
4198
bfacd19d
DB
41992015-05-28 Don Breazeal <donb@codesourcery.com>
4200
4201 * linux-low.c (handle_extended_wait): Initialize
4202 thread_info.last_resume_kind for new fork children.
4203
452003ef
PA
42042015-05-15 Pedro Alves <palves@redhat.com>
4205
4206 * target.h (target_handle_new_gdb_connection): Rewrite using if
4207 wrapped in do/while.
4208
1041a03c
JB
42092015-05-14 Joel Brobecker <brobecker@adacore.com>
4210
4211 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4212 * configure, config.in: Regenerate.
4213 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4214 Declare typedef.
4215
c269dbdb
DB
42162015-05-12 Don Breazeal <donb@codesourcery.com>
4217
4218 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4219 PTRACE_EVENT_VFORK_DONE.
4220 (linux_low_ptrace_options, extended_event_reported): Add vfork
4221 events.
4222 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4223 and "vforkdone" for RSP 'T' Stop Reply Packet.
4224 * server.h (report_vfork_events): Declare
4225 global variable.
4226
3a8a0396
DB
42272015-05-12 Don Breazeal <donb@codesourcery.com>
4228
4229 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4230 (the_low_target) <new_fork>: Initialize new member.
4231 * linux-arm-low.c (arm_new_fork): New function.
4232 (the_low_target) <new_fork>: Initialize new member.
4233 * linux-low.c (handle_extended_wait): Call new target function
4234 new_fork.
4235 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4236 * linux-mips-low.c (mips_add_watchpoint): New function
4237 extracted from mips_insert_point.
4238 (the_low_target) <new_fork>: Initialize new member.
4239 (mips_linux_new_fork): New function.
4240 (mips_insert_point): Call mips_add_watchpoint.
4241 * linux-x86-low.c (x86_linux_new_fork): New function.
4242 (the_low_target) <new_fork>: Initialize new member.
4243
de0d863e
DB
42442015-05-12 Don Breazeal <donb@codesourcery.com>
4245
4246 * linux-low.c (handle_extended_wait): Implement return value,
4247 rename argument 'event_child' to 'event_lwp', handle
4248 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4249 (linux_low_ptrace_options): New function.
4250 (linux_low_filter_event): Call linux_low_ptrace_options,
4251 use different argument fo linux_enable_event_reporting,
4252 use return value from handle_extended_wait.
4253 (extended_event_reported): New function.
4254 (linux_wait_1): Call extended_event_reported and set
4255 status to report fork events.
4256 (linux_write_memory): Add pid to debug message.
4257 (reset_lwp_ptrace_options_callback): New function.
4258 (linux_handle_new_gdb_connection): New function.
4259 (linux_target_ops): Initialize new structure member.
4260 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4261 * lynx-low.c: Initialize new structure member.
4262 * remote-utils.c (prepare_resume_reply): Implement stop reason
4263 "fork" for "T" stop message.
4264 * server.c (handle_query): Call handle_new_gdb_connection.
4265 * server.h (report_fork_events): Declare global flag.
4266 * target.h (struct target_ops) <handle_new_gdb_connection>:
4267 New member.
4268 (target_handle_new_gdb_connection): New macro.
4269 * win32-low.c: Initialize new structure member.
4270
ddcbc397
DB
42712015-05-12 Don Breazeal <donb@codesourcery.com>
4272
4273 * mem-break.c (APPEND_TO_LIST): Define macro.
4274 (clone_agent_expr): New function.
4275 (clone_one_breakpoint): New function.
4276 (clone_all_breakpoints): New function.
4277 * mem-break.h: Declare new functions.
4278
89245bc0
DB
42792015-05-12 Don Breazeal <donb@codesourcery.com>
4280
4281 * linux-low.c (linux_supports_fork_events): New function.
4282 (linux_supports_vfork_events): New function.
4283 (linux_target_ops): Initialize new structure members.
4284 (initialize_low): Call linux_check_ptrace_features.
4285 * lynx-low.c (lynx_target_ops): Initialize new structure
4286 members.
4287 * server.c (report_fork_events, report_vfork_events):
4288 New global flags.
4289 (handle_query): Add new features to qSupported packet and
4290 response.
4291 (captured_main): Initialize new global variables.
4292 * target.h (struct target_ops) <supports_fork_events>:
4293 New member.
4294 <supports_vfork_events>: New member.
4295 (target_supports_fork_events): New macro.
4296 (target_supports_vfork_events): New macro.
4297 * win32-low.c (win32_target_ops): Initialize new structure
4298 members.
4299
835205d0
GB
43002015-05-12 Gary Benson <gbenson@redhat.com>
4301
4302 * server.c (handle_qxfer_exec_file): Use current process
4303 if annex is empty.
4304
21e94bd9
SL
43052015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4306
4307 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4308 Remove HAVE_PTRACE_GETREGS conditionals.
4309 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4310 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4311
45614f15
YQ
43122015-05-08 Yao Qi <yao.qi@linaro.org>
4313
4314 * linux-low.c (linux_supports_conditional_breakpoints): New
4315 function.
4316 (linux_target_ops): Install new target method.
4317 * lynx-low.c (lynx_target_ops): Install NULL hook for
4318 supports_conditional_breakpoints.
4319 * nto-low.c (nto_target_ops): Likewise.
4320 * spu-low.c (spu_target_ops): Likewise.
4321 * win32-low.c (win32_target_ops): Likewise.
4322 * server.c (handle_query): Check
4323 target_supports_conditional_breakpoints.
4324 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4325 New field.
4326 (target_supports_conditional_breakpoints): New macro.
4327
80ad801e
PA
43282015-05-06 Pedro Alves <palves@redhat.com>
4329
4330 PR server/18081
4331 * server.c (start_inferior): If the process exits, mourn it.
4332
819843c7
GB
43332015-04-21 Gary Benson <gbenson@redhat.com>
4334
4335 * hostio.c (fileio_open_flags_to_host): Factored out to
4336 fileio_to_host_openflags in common/fileio.c. Single use
4337 updated.
4338
a2d5a9d7
MF
43392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4340
4341 * linux-xtensa-low.c (xtensa_fill_gregset)
4342 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4343 XCHAL_HAVE_LOOP.
4344
deb44829
MF
43452015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4346
4347 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4348 (regs_info): Replace usrregs pointer with NULL.
4349
e57f1de3
GB
43502015-04-17 Gary Benson <gbenson@redhat.com>
4351
4352 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4353 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4354 * server.c (handle_qxfer_exec_file): New function.
4355 (qxfer_packets): Add exec-file entry.
4356 (handle_query): Report qXfer:exec-file:read as supported packet.
4357
62828379
RN
43582015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4359
4360 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4361
b88bb450
GB
43622015-04-09 Gary Benson <gbenson@redhat.com>
4363
4364 * hostio-errno.c (errno_to_fileio_error): Remove function.
4365 Update caller to use remote_fileio_to_fio_error.
4366
c8f4bfdd
YQ
43672015-04-09 Yao Qi <yao.qi@linaro.org>
4368
4369 * linux-low.c (linux_insert_point): Call
4370 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4371 (linux_remove_point): Call remove_memory_breakpoint if type is
4372 raw_bkpt_type_sw.
4373 * linux-x86-low.c (x86_insert_point): Don't call
4374 insert_memory_breakpoint.
4375 (x86_remove_point): Don't call remove_memory_breakpoint.
4376
41f98f02
PA
43772015-04-01 Pedro Alves <palves@redhat.com>
4378 Cleber Rosa <crosa@redhat.com>
4379
4380 * server.c (gdbserver_usage): Reorganize and extend the usage
4381 message.
4382
2bf6fb9d
PA
43832015-03-24 Pedro Alves <palves@redhat.com>
4384
4385 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4386 output. Also dump TRAP_TRACE.
4387 (linux_low_filter_event): In debug output, distinguish a
4388 resume_stop SIGSTOP from a delayed SIGSTOP.
4389
369f6daa
GB
43902015-03-24 Gary Benson <gbenson@redhat.com>
4391
4392 * linux-x86-low.c (x86_linux_new_thread): Moved to
4393 nat/x86-linux.c.
4394 (x86_linux_prepare_to_resume): Likewise.
4395
8e5d4070
GB
43962015-03-24 Gary Benson <gbenson@redhat.com>
4397
4398 * Makefile.in (x86-linux-dregs.o): New rule.
4399 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4400 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4401 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4402 (x86_linux_dr_get): Likewise.
4403 (x86_linux_dr_set): Likewise.
4404 (update_debug_registers_callback): Likewise.
4405 (x86_linux_dr_set_addr): Likewise.
4406 (x86_linux_dr_get_addr): Likewise.
4407 (x86_linux_dr_set_control): Likewise.
4408 (x86_linux_dr_get_control): Likewise.
4409 (x86_linux_dr_get_status): Likewise.
4410 (x86_linux_update_debug_registers): Likewise.
4411
2b95d440
GB
44122015-03-24 Gary Benson <gbenson@redhat.com>
4413
4414 * linux-x86-low.c (x86_linux_update_debug_registers):
4415 New function, factored out from...
4416 (x86_linux_prepare_to_resume): ...this.
4417
14b0bc68
GB
44182015-03-24 Gary Benson <gbenson@redhat.com>
4419
4420 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4421 (x86_linux_dr_set): Likewise.
4422 (update_debug_registers_callback): Likewise.
4423 (x86_linux_dr_set_addr): Likewise.
4424 (x86_linux_dr_get_addr): Likewise.
4425 (x86_linux_dr_set_control): Likewise.
4426 (x86_linux_dr_get_control): Likewise.
4427 (x86_linux_dr_get_status): Likewise.
4428 (x86_linux_prepare_to_resume): Likewise.
4429
5dfe6ca8
GB
44302015-03-24 Gary Benson <gbenson@redhat.com>
4431
4432 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4433 Use perror_with_name. Pass string through gettext.
4434 (x86_linux_dr_set): Likewise.
4435
d33472ad
GB
44362015-03-24 Gary Benson <gbenson@redhat.com>
4437
4438 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4439 (x86_linux_dr_set_addr): ...this.
4440 (x86_dr_low_get_addr): Rename to...
4441 (x86_linux_dr_get_addr): ...this.
4442 (x86_dr_low_set_control): Rename to...
4443 (x86_linux_dr_set_control): ...this.
4444 (x86_dr_low_get_control): Rename to...
4445 (x86_linux_dr_get_control): ...this.
4446 (x86_dr_low_get_status): Rename to...
4447 (x86_linux_dr_get_status): ...this.
4448 (x86_dr_low): Update with new function names.
4449
4b134ca1
GB
44502015-03-24 Gary Benson <gbenson@redhat.com>
4451
4452 * Makefile.in (x86-linux.o): New rule.
4453 * configure.srv: Add x86-linux.o to relevant targets.
4454 * linux-low.c (lwp_set_arch_private_info): New function.
4455 (lwp_arch_private_info): Likewise.
4456 * linux-x86-low.c: Include nat/x86-linux.h.
4457 (arch_lwp_info): Removed structure.
4458 (update_debug_registers_callback):
4459 Use lwp_set_debug_registers_changed.
4460 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4461 and lwp_set_debug_registers_changed.
4462 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4463
34c703da
GB
44642015-03-24 Gary Benson <gbenson@redhat.com>
4465
4466 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4467 * linux-arm-low.c (arm_new_thread): Likewise.
4468 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4469 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4470 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4471 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4472
cff068da
GB
44732015-03-24 Gary Benson <gbenson@redhat.com>
4474
4475 * linux-low.c (ptid_of_lwp): New function.
4476 (lwp_is_stopped): Likewise.
4477 (lwp_stop_reason): Likewise.
4478 * linux-x86-low.c (update_debug_registers_callback):
4479 Use lwp_is_stopped.
4480 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4481 lwp_stop_reason.
4482
b2f7c7e8
GB
44832015-03-24 Gary Benson <gbenson@redhat.com>
4484
4485 * linux-low.h (linux_stop_lwp): Remove declaration.
4486
6d4ee8c6
GB
44872015-03-24 Gary Benson <gbenson@redhat.com>
4488
4489 * linux-low.h: Include nat/linux-nat.h.
4490 * linux-low.c (iterate_over_lwps_args): New structure.
4491 (iterate_over_lwps_filter): New function.
4492 (iterate_over_lwps): Likewise.
4493 * linux-x86-low.c (update_debug_registers_callback):
4494 Update signature to what iterate_over_lwps expects.
4495 Remove PID check that iterate_over_lwps now performs.
4496 (x86_dr_low_set_addr): Use iterate_over_lwps.
4497 (x86_dr_low_set_control): Likewise.
4498
70a0bb6b
GB
44992015-03-24 Gary Benson <gbenson@redhat.com>
4500
4501 * linux-x86-low.c (x86_debug_reg_state): New function.
4502 (x86_linux_prepare_to_resume): Use the above.
4503
7b669087
GB
45042015-03-24 Gary Benson <gbenson@redhat.com>
4505
4506 * linux-low.c (current_lwp_ptid): New function.
4507 * linux-x86-low.c: Include nat/linux-nat.h.
4508 (x86_dr_low_get_addr): Use current_lwp_ptid.
4509 (x86_dr_low_get_control): Likewise.
4510 (x86_dr_low_get_status): Likewise.
4511
eef49a3d
PA
45122015-03-20 Pedro Alves <palves@redhat.com>
4513
4514 * tracepoint.c (cmd_qtstatus): Make "str" const.
4515
b2333d22
PA
45162015-03-20 Pedro Alves <palves@redhat.com>
4517
4518 * server.c (handle_general_set): Make "req_str" const.
4519
23f238d3
PA
45202015-03-19 Pedro Alves <palves@redhat.com>
4521
4522 * linux-low.c (linux_resume_one_lwp): Rename to ...
4523 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4524 instead call perror_with_name.
4525 (check_ptrace_stopped_lwp_gone): New function.
4526 (linux_resume_one_lwp): Reimplement as wrapper around
4527 linux_resume_one_lwp_throw that swallows errors if the LWP is
4528 gone.
4529
91baf43f
PA
45302015-03-19 Pedro Alves <palves@redhat.com>
4531
4532 * linux-low.c (count_events_callback, select_event_lwp_callback):
4533 No longer check whether the thread has resume_stop as last resume
4534 kind.
4535
8bf3b159
PA
45362015-03-19 Pedro Alves <palves@redhat.com>
4537
4538 * linux-low.c (count_events_callback, select_event_lwp_callback):
4539 Use the lwp's status_pending_p field, not the thread's.
4540
b90fc188
PA
45412015-03-19 Pedro Alves <palves@redhat.com>
4542
4543 * linux-low.c (select_event_lwp_callback): Update comments to
4544 no longer mention SIGTRAP.
4545
464b0089
GB
45462015-03-18 Gary Benson <gbenson@redhat.com>
4547
4548 * server.c (handle_query): Do not report vFile:fstat as supported.
4549
aa9e327f
GB
45502015-03-11 Gary Benson <gbenson@redhat.com>
4551
4552 * hostio.c (sys/types.h): New include.
4553 (sys/stat.h): Likewise.
4554 (common-remote-fileio.h): Likewise.
4555 (handle_fstat): New function.
4556 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4557
791c0056
GB
45582015-03-11 Gary Benson <gbenson@redhat.com>
4559
4560 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4561 struct stat.st_blocks and struct stat.st_blksize.
4562 * configure: Regenerate.
4563 * config.in: Likewise.
4564 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4565 (OBS): Add common-remote-fileio.o.
4566 (common-remote-fileio.o): New rule.
4567
9a9df970
PA
45682015-03-09 Pedro Alves <palves@redhat.com>
4569
4570 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4571 'struct sockaddr' pointer in 'accept' call.
4572
9eb1356e
PA
45732015-03-09 Pedro Alves <palves@redhat.com>
4574
4575 Revert:
4576 2015-03-07 Pedro Alves <palves@redhat.com>
4577 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4578 or <winsock2.h> here. Instead include "gdb_socket.h".
4579 (remote_open): Use union gdb_sockaddr_u.
4580 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4581 or <winsock2.h> here. Instead include "gdb_socket.h".
4582 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4583 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4584 or <sys/un.h>.
4585 (init_named_socket, gdb_agent_helper_thread): Use union
4586 gdb_sockaddr_u.
4587
aac331e4
PA
45882015-03-07 Pedro Alves <palves@redhat.com>
4589
4590 * configure.ac (build_warnings): Move
4591 -Wdeclaration-after-statement to the C-specific set.
4592 * configure: Regenerate.
4593
366c75fc
PA
45942015-03-07 Pedro Alves <palves@redhat.com>
4595
4596 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4597 or <winsock2.h> here. Instead include "gdb_socket.h".
4598 (remote_open): Use union gdb_sockaddr_u.
4599 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4600 or <winsock2.h> here. Instead include "gdb_socket.h".
4601 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4602 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4603 or <sys/un.h>.
4604 (init_named_socket, gdb_agent_helper_thread): Use union
4605 gdb_sockaddr_u.
4606
492d29ea
PA
46072015-03-07 Pedro Alves <palves@redhat.com>
4608
4609 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4610 instead.
4611
60a191ed
YQ
46122015-03-06 Yao Qi <yao.qi@linaro.org>
4613
4614 * linux-aarch64-low.c (aarch64_insert_point): Use
4615 show_debug_regs as a boolean.
4616 (aarch64_remove_point): Likewise.
4617
f5771b1d
PA
46182015-03-05 Pedro Alves <palves@redhat.com>
4619
4620 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4621 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4622 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4623 * nto-low.c (nto_target_ops): Likewise.
4624 * spu-low.c (spu_target_ops): Likewise.
4625 * win32-low.c (win32_target_ops): Likewise.
4626
3e572f71
PA
46272015-03-04 Pedro Alves <palves@redhat.com>
4628
72f4393d 4629 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4630 Decide whether a breakpoint triggered based on the SIGTRAP's
4631 siginfo.si_code.
72f4393d
L
4632 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4633 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4634 (linux_low_filter_event): Check for breakpoints before checking
4635 watchpoints.
4636 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4637 siginfo.si_code.
72f4393d
L
4638 (linux_stopped_by_sw_breakpoint)
4639 (linux_supports_stopped_by_sw_breakpoint)
4640 (linux_stopped_by_hw_breakpoint)
4641 (linux_supports_stopped_by_hw_breakpoint): New functions.
4642 (linux_target_ops): Install new target methods.
3e572f71 4643
1ec68e26
PA
46442015-03-04 Pedro Alves <palves@redhat.com>
4645
4646 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4647 * server.c (swbreak_feature, hwbreak_feature): New globals.
4648 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4649 (captured_main): Clear swbreak_feature and hwbreak_feature.
4650 * server.h (swbreak_feature, hwbreak_feature): Declare.
4651 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4652 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4653 supports_stopped_by_hw_breakpoint>: New fields.
4654 (target_supports_stopped_by_sw_breakpoint)
4655 (target_stopped_by_sw_breakpoint)
4656 (target_supports_stopped_by_hw_breakpoint)
4657 (target_stopped_by_hw_breakpoint): Declare.
4658
15c66dd6
PA
46592015-03-04 Pedro Alves <palves@redhat.com>
4660
4661 enum lwp_stop_reason -> enum target_stop_reason
4662 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4663 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4664 (linux_wait_1, stuck_in_jump_pad_callback)
4665 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4666 (linux_stopped_by_watchpoint):
4667 * linux-low.h (enum lwp_stop_reason): Delete.
4668 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4669 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4670
98fc70d6
YQ
46712015-03-04 Yao Qi <yao.qi@linaro.org>
4672
4673 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4674
dd2ac174
GB
46752015-03-03 Gary Benson <gbenson@redhat.com>
4676
4677 * hostio.c (handle_vFile): Fix prefix lengths.
4678
d68e53f4
MM
46792015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4680
4681 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4682 ptr_bits.
4683
bf2d68ab
AA
46842015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4685
4686 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4687 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4688 (clean): Add "rm -f" for above C files.
4689 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4690 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4691 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4692 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4693 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4694 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4695 (init_registers_s390x_vx_linux64)
4696 (init_registers_s390x_tevx_linux64)
4697 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4698 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4699 declarations.
4700 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4701 (s390_store_vxrs_high): New functions.
4702 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4703 NT_S390_VXRS_HIGH.
4704 (s390_arch_setup): Add logic for selecting one of the new target
4705 descriptions. Activate the new vector regsets if applicable.
4706 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4707 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4708 and init_registers_s390x_tevx_linux64.
4709
c966a859
PA
47102015-03-01 Pedro Alves <palves@redhat.com>
4711
4712 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4713 parameter.
4714
4180215b
PA
47152015-02-27 Pedro Alves <palves@redhat.com>
4716
4717 * linux-x86-low.c (u_debugreg_offset): New function.
4718 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4719
749bab01
PA
47202015-02-27 Pedro Alves <palves@redhat.com>
4721
4722 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4723 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4724 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4725 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4726 (ps_lsetfpregs, ps_getpid)
4727 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4728 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4729 (ps_lsetxregs, ps_plog): Declare.
4730
3c14e5a3
PA
47312015-02-27 Pedro Alves <palves@redhat.com>
4732
4733 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4734 IP_AGENT_EXPORT_FUNC.
4735 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4736 IP_AGENT_EXPORT_FUNC.
4737 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4738 (IP_AGENT_EXPORT): Delete.
4739 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4740 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4741 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4742 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4743 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4744 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4745 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4746 (traceframe_read_count, traceframe_write_count)
4747 (traceframes_created, trace_state_variables, get_raw_reg)
4748 (get_trace_state_variable_value, set_trace_state_variable_value)
4749 (ust_loaded, helper_thread_id, cmd_buf): Use
4750 IPA_SYM_EXPORTED_NAME.
4751 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4752 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4753 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4754 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4755 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4756 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4757 EXTERN_C_PUSH/EXTERN_C_POP.
4758 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4759 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4760 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4761 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4762 (traceframe_write_count, traceframe_read_count)
4763 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4764 (about_to_request_buffer_space, get_trace_state_variable_value)
4765 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4766 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4767 EXTERN_C_PUSH/EXTERN_C_POP.
4768 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4769 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4770 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4771 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4772 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4773 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4774 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4775 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4776 Define.
4777 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4778 (IP_AGENT_EXPORT_VAR_DECL): Define.
4779 (tracing): Declare.
4780 (gdb_agent_get_raw_reg): Declare.
4781
fe978cb0
PA
47822015-02-27 Tom Tromey <tromey@redhat.com>
4783 Pedro Alves <palves@redhat.com>
4784
4785 Rename symbols whose names are reserved C++ keywords throughout.
4786
3bc3d82a
PA
47872015-02-27 Pedro Alves <palves@redhat.com>
4788
4789 * Makefile.in (COMPILER): New, get it from autoconf.
4790 (CXX): Get from autoconf instead.
4791 (COMPILE.pre): Use COMPILER.
4792 (CC-LD): Rename to ...
4793 (CC_LD): ... this. Use COMPILER.
4794 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4795 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4796 * acinclude.m4: Include build-with-cxx.m4.
4797 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4798 Disable -Werror by default if building in C++ mode.
4799 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4800 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4801 the C++ compiler. Save/restore CXXFLAGS too.
4802 * configure: Regenerate.
4803
07697489
PA
48042015-02-27 Pedro Alves <palves@redhat.com>
4805
4806 * acinclude.m4: Include libiberty.m4.
4807 * configure.ac: Call libiberty_INIT.
4808 * config.in, configure: Regenerate.
4809
9beb7c4e
PA
48102015-02-26 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (linux_wait_1): When incrementing the PC past a
4813 program breakpoint always use the_low_target.breakpoint_len as
4814 increment, rather than the maximum between that and
4815 the_low_target.decr_pc_after_break.
4816
8090aef2
PA
48172015-02-23 Pedro Alves <palves@redhat.com>
4818
4819 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4820 thread was doing a step-over; always adjust the PC if
4821 we stepped over a permanent breakpoint.
4822 (linux_wait_1): If we stepped over breakpoint that was on top of a
4823 permanent breakpoint, manually advance the PC past it.
4824
bc9540e8
PA
48252015-02-23 Pedro Alves <palves@redhat.com>
4826
4827 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4828 modes.
4829 (x86_fill_gregset, x86_store_gregset): Use it when handling
4830 $orig_eax.
4831
2db9a427
PA
48322015-02-20 Pedro Alves <palves@redhat.com>
4833
4834 * thread-db.c: Include "nat/linux-procfs.h".
4835 (thread_db_init): Skip listing new threads if the kernel supports
4836 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4837
afa8d396
PA
48382015-02-20 Pedro Alves <palves@redhat.com>
4839
4840 * linux-low.c (status_pending_p_callback): Use ptid_match.
4841
c9587f88
AT
48422015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843
4844 PR breakpoints/16812
4845 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4846 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4847 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4848
b05ec7a5
AT
48492015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850
4851 PR breakpoints/15956
4852 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4853
d33501a5
MM
48542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4855
4856 * linux-low.c (linux_low_btrace_conf): Print size.
4857 * server.c (handle_btrace_conf_general_set): New.
4858 (hanle_general_set): Call handle_btrace_conf_general_set.
4859 (handle_query): Report Qbtrace-conf:bts:size as supported.
4860
f4abbc16
MM
48612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4862
4863 * linux-low.c (linux_low_enable_btrace): Update parameters.
4864 (linux_low_btrace_conf): New.
4865 (linux_target_ops)<to_btrace_conf>: Initialize.
4866 * server.c (current_btrace_conf): New.
4867 (handle_btrace_enable): Rename to ...
4868 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4869 to target_enable_btrace. Update comment. Update users.
4870 (handle_qxfer_btrace_conf): New.
4871 (qxfer_packets): Add btrace-conf entry.
4872 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4873 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4874 (target_ops)<read_btrace_conf>: New.
4875 (target_enable_btrace): Update parameters.
4876 (target_read_btrace_conf): New.
4877
043c3577
MM
48782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4879
4880 * server.c (handle_btrace_general_set): Remove call to
4881 target_supports_btrace.
4882 (supported_btrace_packets): New.
4883 (handle_query): Call supported_btrace_packets.
4884 * target.h: include btrace-common.h.
4885 (btrace_target_info): Removed.
4886 (supports_btrace, target_supports_btrace): Update parameters.
4887
734b0e4b
MM
48882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4889
4890 * Makefile.in (SFILES): Add common/btrace-common.c.
4891 (OBS): Add common/btrace-common.o.
4892 (btrace-common.o): Add build rules.
4893 * linux-low: Include btrace-common.h.
4894 (linux_low_read_btrace): Use struct btrace_data. Call
4895 btrace_data_init and btrace_data_fini.
4896
d6c146e9
PA
48972015-02-06 Pedro Alves <palves@redhat.com>
4898
4899 * thread-db.c (find_new_threads_callback): Add debug output.
4900
20ba1ce6
PA
49012015-02-04 Pedro Alves <palves@redhat.com>
4902
4903 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4904 (resume_stopped_resumed_lwps): New function.
4905 (linux_wait_for_event_filtered): Use it.
4906
8cc73a39
SDJ
49072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4908
4909 * Makefile.in (SFILES): Add linux-personality.c.
4910 (linux-personality.o): New rule.
4911 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4912 list of objects to be built.
4913 * linux-low.c: Include nat/linux-personality.h.
4914 (linux_create_inferior): Remove code to disable address space
4915 randomization (moved to ../nat/linux-personality.c). Create
4916 cleanup to disable address space randomization.
4917
fb23d554
SDJ
49182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4919
4920 * Makefile.in (posix-strerror.o): New rule.
4921 (mingw-strerror.o): Likewise.
4922 * configure: Regenerated.
4923 * configure.ac: Source file ../common/common.host. Initialize new
4924 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4925
cdf43629
YQ
49262015-01-14 Yao Qi <yao@codesourcery.com>
4927
4928 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4929 (ppc-linux.o): New rule.
4930 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4931 * configure.ac: AC_CHECK_FUNCS(getauxval).
4932 * config.in: Re-generated.
4933 * configure: Re-generated.
4934 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4935 ppc64_64bit_inferior_p
4936
514c5338
YQ
49372015-01-14 Yao Qi <yao@codesourcery.com>
4938
4939 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4940 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4941 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4942 (PT_ORIG_R3, PT_TRAP): Likewise.
4943 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4944 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4945 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4946
3368c1e5
JB
49472015-01-10 Joel Brobecker <brobecker@adacore.com>
4948
4949 * i387-fp.c (i387_cache_to_xsave): In look over
4950 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4951 zmmh_low_space field by use of zmmh_high_space.
4952
582511be
PA
49532015-01-09 Pedro Alves <palves@redhat.com>
4954
4955 * linux-low.c (step_over_bkpt): Move higher up in the file.
4956 (handle_extended_wait): Don't store the stop_pc here.
4957 (get_stop_pc): Adjust comments and rename to ...
4958 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4959 stopped for a software breakpoint or hardware breakpoint.
4960 (thread_still_has_status_pending_p): New function.
4961 (status_pending_p_callback): Use
4962 thread_still_has_status_pending_p. If the event is no longer
4963 interesting, resume the LWP.
4964 (handle_tracepoints): Add assert.
4965 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4966 (wstatus_maybe_breakpoint): New function.
4967 (cancel_breakpoint): Delete function.
4968 (check_stopped_by_watchpoint): New function, factored out from
4969 linux_low_filter_event.
4970 (lp_status_maybe_breakpoint): Delete function.
4971 (linux_low_filter_event): Remove filter_ptid argument.
4972 Leave thread group exits pending here. Store the LWP's stop PC.
4973 Always leave events pending.
4974 (linux_wait_for_event_filtered): Pull all events out of the
4975 kernel, and leave them all pending.
4976 (count_events_callback, select_event_lwp_callback): Consider all
4977 events.
4978 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4979 (select_event_lwp): Only give preference to the stepping LWP in
4980 all-stop mode. Adjust comments.
4981 (ignore_event): New function.
4982 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4983 references to cancel_breakpoints. Adjust to renames. Also give
4984 equal priority to all LWPs that have had events in non-stop mode.
4985 If reporting a software breakpoint event, unadjust the LWP's PC.
4986 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4987 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4988 Adjust.
4989 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4990 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4991 (linux_stopped_by_watchpoint): Adjust.
4992 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4993 * linux-low.h (enum lwp_stop_reason): New.
4994 (struct lwp_info) <stop_pc>: Adjust comment.
4995 <stopped_by_watchpoint>: Delete field.
4996 <stop_reason>: New field.
4997 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4998 * mem-break.c (software_breakpoint_inserted_here)
4999 (hardware_breakpoint_inserted_here): New function.
5000 * mem-break.h (software_breakpoint_inserted_here)
5001 (hardware_breakpoint_inserted_here): Declare.
5002 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5003 (cancel_breakpoints): Delete.
5004 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5005 (upload_fast_traceframes): Remove references to
5006 cancel_breakpoints.
5007
a33e3959
PA
50082015-01-09 Pedro Alves <palves@redhat.com>
5009
5010 * thread-db.c (find_new_threads_callback): Ignore thread if the
5011 kernel thread ID is -1.
5012
8784d563
PA
50132015-01-09 Pedro Alves <palves@redhat.com>
5014
5015 * linux-low.c (linux_attach_fail_reason_string): Move to
5016 nat/linux-ptrace.c, and rename.
5017 (linux_attach_lwp): Update comment.
5018 (attach_proc_task_lwp_callback): New function.
5019 (linux_attach): Adjust to rename and use
5020 linux_proc_attach_tgid_threads.
5021 (linux_attach_fail_reason_string): Delete declaration.
5022
76f2b779
JB
50232015-01-01 Joel Brobecker <brobecker@adacore.com>
5024
5025 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5026 * server.c (gdbserver_version): Likewise.
5027
fafcc06a
SDJ
50282014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5029
5030 * remote-utils.c: Include ctype.h.
5031 (input_interrupt): Explicitly handle the case when the char
5032 received is the NUL byte. Improve the printing of non-ASCII
5033 characters.
5034
beed38b8
JB
50352014-12-16 Joel Brobecker <brobecker@adacore.com>
5036
5037 * linux-low.c (linux_low_filter_event): Update call to
5038 linux_enable_event_reporting following the addition of
5039 a new parameter to that function.
5040
bf330350
CU
50412014-12-16 Catalin Udma <catalin.udma@freescale.com>
5042
5043 PR server/17457
5044 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5045 (AARCH64_FPCR_REGNO): Likewise.
5046 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5047 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5048 (aarch64_store_fpregset): Likewise.
5049
5227d625
JB
50502014-12-15 Joel Brobecker <brobecker@adacore.com>
5051
5052 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5053 Remove FIXME comment about assumption about N.
5054
f93b65a0
JB
50552014-12-13 Joel Brobecker <brobecker@adacore.com>
5056
5057 * configure.ac: If large-file support is disabled in GDBserver,
5058 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5059 * configure: Regenerate.
5060
e5a9158d
AA
50612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5062
5063 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5064 warning upon ENODATA from ptrace.
5065 * linux-s390-low.c (s390_store_tdb): New.
5066 (s390_regsets): Add regset for NT_S390_TDB.
5067
feea5f36
AA
50682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5069
5070 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5071 without a fill_function.
5072 * linux-s390-low.c (s390_fill_last_break): Remove.
5073 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5074 (s390_arch_setup): Use regset's size instead of fill_function for
5075 loop end condition.
5076
098dbe61
AA
50772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5078
5079 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5080 the regset's store function when ptrace returned an error.
5081 * regcache.c (get_thread_regcache): Invalidate register cache
5082 before fetching inferior's registers.
5083
28eef672
AA
50842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5085
5086 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5087 while-loop as for-loop.
5088 (regsets_store_inferior_registers): Likewise.
5089
bdca27a2
YQ
50902014-11-28 Yao Qi <yao@codesourcery.com>
5091
5092 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5093 * config.in, configure: Re-generate.
5094 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5095 is defined.
5096
9c232dda
YQ
50972014-11-21 Yao Qi <yao@codesourcery.com>
5098
5099 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5100 (AC_CHECK_HEADERS): Remove malloc.h.
5101 * configure: Re-generated.
5102 * config.in: Re-generated.
5103 * server.h: Don't include alloca.h and malloc.h.
5104 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5105 Don't include malloc.h.
5106
43968415
JB
51072014-11-17 Joel Brobecker <brobecker@adacore.com>
5108
5109 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5110 corresponding ERRNO check in same block.
5111
40e91bc7
PA
51122014-11-12 Pedro Alves <palves@redhat.com>
5113
5114 * server.c (cont_thread): Update comment.
5115 (start_inferior, attach_inferior): No longer clear cont_thread.
5116 (handle_v_cont): No longer set cont_thread.
5117 (captured_main): Clear cont_thread each time a GDB connects.
5118
c2c118cf
PA
51192014-11-12 Pedro Alves <palves@redhat.com>
5120
5121 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5122 thread, and don't resume all threads if the Hc thread has exited.
5123
78708b7c
PA
51242014-11-12 Pedro Alves <palves@redhat.com>
5125
5126 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5127 the process group instead of to a specific LWP.
5128
a2abc7de
PA
51292014-10-15 Pedro Alves <palves@redhat.com>
5130
5131 PR server/17487
5132 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5133 parameter.
5134 (arm_set_thread_context): Delete.
5135 (the_low_target): Adjust.
5136 * win32-i386-low.c (debug_registers_changed)
5137 (debug_registers_used): Delete.
5138 (update_debug_registers_callback): New function.
5139 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5140 needing to update their debug registers.
5141 (win32_get_current_dr): New function.
5142 (x86_dr_low_get_addr, x86_dr_low_get_control)
5143 (x86_dr_low_get_status): Fetch the debug register from the thread
5144 record's context.
5145 (i386_initial_stuff): Adjust.
5146 (i386_get_thread_context): Remove current_event parameter. Don't
5147 clear debug_registers_changed nor copy DR values to
5148 debug_reg_state.
5149 (i386_set_thread_context): Delete.
5150 (i386_prepare_to_resume): New function.
5151 (i386_thread_added): Mark the thread as needing to update irs
5152 debug registers.
5153 (the_low_target): Remove i386_set_thread_context and install
5154 i386_prepare_to_resume.
5155 * win32-low.c (win32_get_thread_context): Adjust.
5156 (win32_set_thread_context): Use SetThreadContext
5157 directly.
5158 (win32_prepare_to_resume): New function.
5159 (win32_require_context): New function, factored out from ...
5160 (thread_rec): ... this.
5161 (continue_one_thread): Call win32_prepare_to_resume on each thread
5162 we're about to continue.
5163 (win32_resume): Call win32_prepare_to_resume on the event thread.
5164 * win32-low.h (struct win32_thread_info)
5165 <debug_registers_changed>: New field.
5166 (struct win32_target_ops): Change prototype of set_thread_context,
5167 delete set_thread_context and add prepare_to_resume.
5168 (win32_require_context): New declaration.
5169
a442d071
GB
51702014-10-08 Gary Benson <gbenson@redhat.com>
5171
5172 * server.h: Do not include common-exceptions.h.
5173
6f1947e8
GB
51742014-10-08 Gary Benson <gbenson@redhat.com>
5175
5176 * server.h: Do not include cleanups.h.
5177
63b434a4
JH
51782014-09-30 James Hogan <james.hogan@imgtec.com>
5179
5180 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5181 mips64-dsp-linux.c.
5182
c4d9ceb6
YQ
51832014-09-23 Yao Qi <yao@codesourcery.com>
5184
5185 * linux-low.c (lp_status_maybe_breakpoint): New function.
5186 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5187 (count_events_callback): Likewise.
5188 (select_event_lwp_callback): Likewise.
5189 (cancel_breakpoints_callback): Likewise.
5190
89a5711c
DB
51912014-09-19 Don Breazeal <donb@codesourcery.com>
5192
5193 * linux-low.c (handle_extended_wait): Call
5194 linux_ptrace_get_extended_event.
5195 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5196 linux_is_extended_waitstatus.
5197
bffc0964
JB
51982014-09-16 Joel Brobecker <brobecker@adacore.com>
5199
5200 * Makefile.in (CPPFLAGS): Define.
5201 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5202 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5203
0bfdf32f
GB
52042014-09-16 Gary Benson <gbenson@redhat.com>
5205
5206 * inferiors.h (current_inferior): Renamed as...
5207 (current_thread): New variable. All uses updated.
5208 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5209 (maybe_move_out_of_jump_pad): Likewise.
5210 (cancel_breakpoint): Likewise.
5211 (linux_low_filter_event): Likewise.
5212 (wait_for_sigstop): Likewise.
5213 (linux_resume_one_lwp): Likewise.
5214 (need_step_over_p): Likewise.
5215 (start_step_over): Likewise.
5216 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5217 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5218 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5219 and save_inferior as saved_thread.
5220 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5221 saved_thread.
5222 (regcache_invalidate_thread): Likewise.
5223 * remote-utils.c (prepare_resume_reply): Likewise.
5224 * thread-db.c (thread_db_get_tls_address): Likewise.
5225 (disable_thread_event_reporting): Likewise.
5226 (remove_thread_event_breakpoints): Likewise.
5227 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5228 as saved_thread.
5229 * target.h (set_desired_inferior): Renamed as...
5230 (set_desired_thread): New declaration. All uses updated.
5231 * server.c (myresume): Updated comment to reference thread instead
5232 of inferior.
5233 (handle_serial_event): Likewise.
5234 (handle_target_event): Likewise.
5235
361c8ade
GB
52362014-09-12 Tom Tromey <tromey@redhat.com>
5237 Gary Benson <gbenson@redhat.com>
5238
5239 * regcache.h: Include common-regcache.h.
5240 (regcache_read_pc): Don't declare.
5241 * regcache.c (get_thread_regcache_for_ptid): New function.
5242
bd9269f7
GB
52432014-09-11 Tom Tromey <tromey@redhat.com>
5244 Gary Benson <gbenson@redhat.com>
5245
5246 * symbol.c: New file.
5247 * Makefile.in (SFILES): Add symbol.c.
5248 (OBS): Add symbol.o.
5249
f8c1d06b
GB
52502014-09-11 Gary Benson <gbenson@redhat.com>
5251
5252 * target.c (target_stop_ptid, target_continue_ptid): New
5253 functions.
5254
721ec300
GB
52552014-09-11 Tom Tromey <tromey@redhat.com>
5256 Gary Benson <gbenson@redhat.com>
5257
5258 * target.h: Include target/target.h.
5259 * target.c (target_read_memory, target_read_uint32)
5260 (target_write_memory): New functions.
5261
c5e92cca
GB
52622014-09-11 Gary Benson <gbenson@redhat.com>
5263
5264 * server.h (debug_hw_points): Don't declare.
5265 * server.c (debug_hw_points): Don't define. Replace all uses
5266 with show_debug_regs.
5267 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5268 all uses with show_debug_regs.
5269
2e4bb98a
EBM
52702014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5271
5272 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5273 endianness into account.
5274 (ppc_supply_ptrace_register): Likewise.
5275
ac740bc7
JH
52762014-09-03 James Hogan <james.hogan@imgtec.com>
5277
5278 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5279 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5280
97ea6506
GB
52812014-09-03 Gary Benson <gbenson@redhat.com>
5282
5283 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5284 ALL_DEBUG_ADDRESS_REGISTERS.
5285
df7e5265
GB
52862014-09-02 Gary Benson <gbenson@redhat.com>
5287
5288 * i386-low.h: Renamed as...
5289 * x86-low.h: New file. All type, function and variable name
5290 prefixes changed from "i386_" to "x86_". All references updated.
5291 * i386-low.c: Renamed as...
5292 * x86-low.c: New file. All type, function and variable name
5293 prefixes changed from "i386_" to "x86_". All references updated.
5294
ed859da7
GB
52952014-09-02 Gary Benson <gbenson@redhat.com>
5296
5297 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5298 (x86_linux_new_thread): Likewise.
5299
860789c7
GB
53002014-08-29 Gary Benson <gbenson@redhat.com>
5301
5302 * server.h (setjmp.h): Do not include.
5303 (toplevel): Do not declare.
5304 (common-exceptions.h): Include.
5305 (cleanups.h): Likewise.
5306 * server.c (toplevel): Do not define.
5307 (exit_code): New static global.
5308 (detach_or_kill_for_exit_cleanup): New function.
5309 (main): New function. Original main renamed to...
5310 (captured_main): New function.
5311 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5312
ff55e1b5
GB
53132014-08-29 Gary Benson <gbenson@redhat.com>
5314
5315 * Makefile.in (SFILES): Add common/common-exceptions.c.
5316 (OBS): Add common-exceptions.o.
5317 (common-exceptions.o): New rule.
5318 * utils.c (prepare_to_throw_exception): New function.
5319
e9bcb658
GB
53202014-08-29 Gary Benson <gbenson@redhat.com>
5321
5322 * config.in: Regenerate.
5323 * configure: Likewise.
5324
e3180625
GB
53252014-08-29 Gary Benson <gbenson@redhat.com>
5326
5327 * Makefile.in (SFILES): Add common/cleanups.c.
5328 (OBS): cleanups.o.
5329 (cleanups.o): New rule.
5330
e3d6ba5d
GB
53312014-08-29 Gary Benson <gbenson@redhat.com>
5332
5333 * utils.c (internal_vwarning): New function.
5334
7096e886
GB
53352014-08-28 Gary Benson <gbenson@redhat.com>
5336
5337 * utils.h (fatal): Remove declaration.
5338 * utils.c (fatal): Remove function.
5339
14ce3192
GB
53402014-08-28 Gary Benson <gbenson@redhat.com>
5341
5342 * tracepoint.c (gdb_agent_init): Replace fatal with
5343 perror_with_name.
5344 (initialize_tracepoint): Likewise.
5345
50278d59
GB
53462014-08-28 Gary Benson <gbenson@redhat.com>
5347
5348 * remote-utils.c (remote_prepare): Replace fatal with error.
5349
aa96c426
GB
53502014-08-28 Gary Benson <gbenson@redhat.com>
5351
5352 * linux-low.c (linux_async): Replace fatal with warning.
5353 Tidy up and return.
5354 (linux_start_non_stop): Return -1 if linux_async failed.
5355
f7160e97
GB
53562014-08-28 Gary Benson <gbenson@redhat.com>
5357
5358 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5359 gdb_assert.
5360 (i386_dr_low_get_addr): Remove vague comment.
5361 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5362 gdb_assert.
5363
38e08fca
GB
53642014-08-28 Gary Benson <gbenson@redhat.com>
5365
5366 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5367 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5368 internal_error.
5369 (linux_resume_one_lwp): Likewise.
5370 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5371 gdb_assert.
5372 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5373 with internal_error.
5374 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5375 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5376 (find_register_by_name): Replace fatal with internal_error.
5377 (find_regno): Likewise.
5378 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5379 * thread-db.c (thread_db_create_event): Likewise.
5380 (thread_db_load_search): Likewise.
5381 (try_thread_db_load_1): Likewise.
5382 * tracepoint.c (get_jump_space_head): Replace fatal with
5383 internal_error.
5384 (claim_trampoline_space): Likewise.
5385 (have_fast_tracepoint_trampoline_buffer): Likewise.
5386 (cmd_qtstart): Likewise.
5387 (stop_tracing): Likewise.
5388 (fast_tracepoint_collecting): Likewise.
5389 (target_malloc): Likewise.
5390 (download_tracepoint): Likewise.
5391 (download_trace_state_variables): Replace check with gdb_assert.
5392 (upload_fast_traceframes): Replace fatal with internal_error.
5393
34abf635
GB
53942014-08-19 Tom Tromey <tromey@redhat.com>
5395 Gary Benson <gbenson@redhat.com>
5396
5397 * Makefile.in (SFILES): Add common/common-debug.c.
5398 (OBS): Add common-debug.o.
5399 (common-debug.o): New rule.
5400 * debug.h (debug_printf): Don't declare.
5401 * debug.c (debug_printf): Renamed and rewritten as...
5402 (debug_vprintf): New function.
5403
f6e94d78
GB
54042014-08-19 Gary Benson <gbenson@redhat.com>
5405
5406 * utils.h: Do not include print-utils.h.
5407
9239eeab
GB
54082014-08-19 Tom Tromey <tromey@redhat.com>
5409 Gary Benson <gbenson@redhat.com>
5410
5411 * server.h: Add static assertion.
5412 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5413
ef87c8bb
GB
54142014-08-19 Tom Tromey <tromey@redhat.com>
5415 Gary Benson <gbenson@redhat.com>
5416
5417 * Makefile.in (SFILES): Add common/errors.c.
5418 (OBS): Add errors.o.
5419 (IPA_OBS): Add errors-ipa.o.
5420 (errors.o): New rule.
5421 (errors-ipa.o): Likewise.
5422 * utils.h (perror_with_name, error, warning): Don't declare.
5423 * utils.c (warning): Renamed and rewritten as...
5424 (vwarning): New function.
5425 (error): Renamed and rewritten as...
5426 (verror): New function.
5427 (internal_error): Renamed and rewritten as...
5428 (internal_verror): New function.
5429
bb974a24
GB
54302014-08-07 Gary Benson <gbenson@redhat.com>
5431
5432 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5433 * configure: Regenerate.
5434 * config.in: Likewise.
5435 * server.h: Do not include errno.h.
5436 * event-loop.c: Likewise.
5437 * hostio-errno.c: Likewise.
5438 * linux-low.c: Likewise.
5439 * remote-utils.c: Likewise.
5440 * spu-low.c: Likewise.
5441 * utils.c: Likewise.
5442 * gdbreplay.c: Unconditionally include errno.h.
5443
6d3d12eb
GB
54442014-08-07 Gary Benson <gbenson@redhat.com>
5445
5446 * server.h: Do not include string.h.
5447 * event-loop.c: Likewise.
5448 * linux-low.c: Likewise.
5449 * regcache.c: Likewise.
5450 * remote-utils.c: Likewise.
5451 * spu-low.c: Likewise.
5452 * utils.c: Likewise.
5453
dccbb609
GB
54542014-08-07 Gary Benson <gbenson@redhat.com>
5455
5456 * server.h: Do not include gdb_assert.h.
5457
e76df0d0
GB
54582014-08-07 Gary Benson <gbenson@redhat.com>
5459
5460 * server.h: Do not include common-utils.h.
5461
4cb9c816
GB
54622014-08-07 Gary Benson <gbenson@redhat.com>
5463
5464 * server.h: Do not include ptid.h.
5465 * notif.h: Likewise.
5466
3995eeee
GB
54672014-08-07 Gary Benson <gbenson@redhat.com>
5468
5469 * server.h: Do not include gdb_locale.h.
5470
cb9f1a9b
GB
54712014-08-07 Gary Benson <gbenson@redhat.com>
5472
5473 * server.h: Do not include gdb/signals.h.
5474 * win32-low.c: Likewise.
5475
a5fceff8
GB
54762014-08-07 Gary Benson <gbenson@redhat.com>
5477
5478 * server.h: Do not include pathmax.h.
5479
b9391142
GB
54802014-08-07 Gary Benson <gbenson@redhat.com>
5481
5482 * server.h: Do not include libiberty.h.
5483 * linux-bfin-low.c: Likewise.
5484
0e443c87
GB
54852014-08-07 Gary Benson <gbenson@redhat.com>
5486
5487 * server.h: Do not include ansidecl.h.
5488
8ebb3f56
GB
54892014-08-07 Gary Benson <gbenson@redhat.com>
5490
5491 * linux-x86-low.c: Do not include stddef.h.
5492 * lynx-ppc-low.c: Likewise.
5493 * tracepoint.c: Likewise.
5494
8980bdf6
GB
54952014-08-07 Gary Benson <gbenson@redhat.com>
5496
5497 * server.h: Do not include stdarg.h.
5498 * nto-low.c: Likewise.
5499
d7096f71
GB
55002014-08-07 Gary Benson <gbenson@redhat.com>
5501
5502 * server.h: Do not include stdlib.h.
5503 * inferiors.c: Likewise.
5504 * linux-low.c: Likewise.
5505 * regcache.c: Likewise.
5506 * spu-low.c: Likewise.
5507 * tracepoint.c: Likewise.
5508 * utils.c: Likewise.
5509
d02f550d
GB
55102014-08-07 Gary Benson <gbenson@redhat.com>
5511
5512 * server.h: Do not include stdio.h.
5513 * linux-low.c: Likewise.
5514 * remote-utils.c: Likewise.
5515 * spu-low.c: Likewise.
5516 * utils.c: Likewise.
5517 * wincecompat.c: Likewise.
5518
87f6c4e3
GB
55192014-08-06 Gary Benson <gbenson@redhat.com>
5520
5521 * regcache.c (init_register_cache): Move conditionals inside if.
5522
7089dca4
GB
55232014-08-06 Gary Benson <gbenson@redhat.com>
5524
5525 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5526
462f517e
GB
55272014-07-31 Gary Benson <gbenson@redhat.com>
5528
5529 * ax.h: Do not include server.h.
5530 * gdbthread.h: Likewise.
5531 * lynx-low.h: Likewise.
5532 * notif.h: Likewise.
5533
976411d6
GB
55342014-07-30 Gary Benson <gbenson@redhat.com>
5535
5536 * server.h: Include common-defs.h.
5537 Do not include config.h or build-gnulib-gdbserver/config.h.
5538
d41f6d8e
GB
55392014-07-30 Gary Benson <gbenson@redhat.com>
5540
5541 * hostio-errno.c: Move server.h to top of includes list.
5542 * inferiors.c: Likewise.
5543 * linux-x86-low.c: Likewise.
5544 * notif.c: Include server.h.
5545
314c6a35
TT
55462014-07-24 Tom Tromey <tromey@redhat.com>
5547 Gary Benson <gbenson@redhat.com>
5548
5549 * server.h (CORE_ADDR): Now unsigned.
5550
69ff6be5
PA
55512014-07-16 Pedro Alves <palves@redhat.com>
5552
5553 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5554
ce9e3fe7
PA
55552014-07-15 Pedro Alves <palves@redhat.com>
5556
5557 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5558 copy.
5559
e76126e8
PA
55602014-07-11 Pedro Alves <palves@redhat.com>
5561
5562 * linux-low.c (kill_wait_lwp): New function, based on
5563 kill_one_lwp_callback, but use my_waitpid directly.
5564 (kill_one_lwp_callback, linux_kill): Use it.
5565
8e9db26e
PA
55662014-06-23 Pedro Alves <palves@redhat.com>
5567
5568 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5569 before setting DR0..DR3.
5570
698b3e08
GB
55712014-06-20 Gary Benson <gbenson@redhat.com>
5572
5573 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5574 * configure: Regenerated.
5575 * config.in: Likewise.
5576
125f8a3d
GB
55772014-06-20 Gary Benson <gbenson@redhat.com>
5578
5579 * Makefile.in (SFILES): Update locations for files moved
5580 from common to nat.
5581 (object file files): Reordered.
5582
42995dbd
GB
55832014-06-20 Gary Benson <gbenson@redhat.com>
5584
5585 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5586 (i386_dr_low_set_addr): Likewise.
5587 (i386_dr_low_get_addr): Likewise.
5588 (i386_dr_low_can_set_control): Likewise.
5589 (i386_dr_low_set_control): Likewise.
5590 (i386_dr_low_get_control): Likewise.
5591 (i386_dr_low_get_status): Likewise.
5592 (i386_get_debug_register_length): Likewise.
5593 * linux-x86-low.c (i386_dr_low_set_addr):
5594 Changed signature. Made static.
5595 (i386_dr_low_get_addr): Likewise.
5596 (i386_dr_low_set_control): Likewise.
5597 (i386_dr_low_get_control): Likewise.
5598 (i386_dr_low_get_status): Likewise.
5599 (i386_dr_low): New global variable.
5600 * win32-i386-low.c (i386_dr_low_set_addr):
5601 Changed signature. Made static.
5602 (i386_dr_low_get_addr): Likewise.
5603 (i386_dr_low_set_control): Likewise.
5604 (i386_dr_low_get_control): Likewise.
5605 (i386_dr_low_get_status): Likewise.
5606 (i386_dr_low): New global variable.
5607
e1d2394b
MS
56082014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5609
5610 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5611 * Makefile.in (AR, AR_FLAGS): Define.
5612 * configure: Regenerate.
5613
3a8ee006
GB
56142014-06-19 Gary Benson <gbenson@redhat.com>
5615
5616 * Makefile.in (i386-dregs.o): New rule.
5617 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5618 * i386-low.c (target.h): Remove include.
5619 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5620 (DR_CONTROL_SHIFT): Likewise.
5621 (DR_CONTROL_SIZE): Likewise.
5622 (DR_RW_EXECUTE): Likewise.
5623 (DR_RW_WRITE): Likewise.
5624 (DR_RW_READ): Likewise.
5625 (DR_RW_IORW): Likewise.
5626 (DR_LEN_1): Likewise.
5627 (DR_LEN_2): Likewise.
5628 (DR_LEN_4): Likewise.
5629 (DR_LEN_8): Likewise.
5630 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5631 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5632 (DR_ENABLE_SIZE): Likewise.
5633 (DR_LOCAL_SLOWDOWN): Likewise.
5634 (DR_GLOBAL_SLOWDOWN): Likewise.
5635 (DR_CONTROL_RESERVED): Likewise.
5636 (I386_DR_CONTROL_MASK): Likewise.
5637 (I386_DR_VACANT): Likewise.
5638 (I386_DR_LOCAL_ENABLE): Likewise.
5639 (I386_DR_GLOBAL_ENABLE): Likewise.
5640 (I386_DR_DISABLE): Likewise.
5641 (I386_DR_SET_RW_LEN): Likewise.
5642 (I386_DR_GET_RW_LEN): Likewise.
5643 (I386_DR_WATCH_HIT): Likewise.
5644 (i386_wp_op_t): Likewise.
5645 (i386_show_dr): Likewise.
5646 (i386_length_and_rw_bits): Likewise.
5647 (i386_insert_aligned_watchpoint): Likewise.
5648 (i386_remove_aligned_watchpoint): Likewise.
5649 (i386_handle_nonaligned_watchpoint): Likewise.
5650 i386_update_inferior_debug_regs(): Likewise.
5651 (i386_dr_insert_watchpoint): Likewise.
5652 (i386_dr_remove_watchpoint): Likewise.
5653 (i386_dr_region_ok_for_watchpoint): Likewise.
5654 (i386_dr_stopped_data_address): Likewise.
5655 (i386_dr_stopped_by_watchpoint): Likewise.
5656
8f26655c
GB
56572014-06-19 Gary Benson <gbenson@redhat.com>
5658
5659 * i386-low.c (i386_dr_show): Renamed to
5660 i386_show_dr and made static. All uses updated.
5661 (i386_dr_length_and_rw_bits): Renamed to
5662 i386_length_and_rw_bits and made static.
5663 All uses updated.
5664 (i386_dr_insert_aligned_watchpoint): Renamed to
5665 i386_insert_aligned_watchpoint and made static.
5666 All uses updated.
5667 (i386_dr_remove_aligned_watchpoint): Renamed to
5668 i386_remove_aligned_watchpoint and made static.
5669 All uses updated.
5670 (i386_dr_update_inferior_debug_regs): Renamed to
5671 i386_update_inferior_debug_regs and made static.
5672 All uses updated.
5673
b9228891
GB
56742014-06-18 Gary Benson <gbenson@redhat.com>
5675
5171def3
GB
5676 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5677 (i386_dr_low_can_set_control): Likewise.
5678 (i386_get_debug_register_length): Likewise.
5679 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5680 (i386_dr_low_can_set_control): Likewise.
5681 (i386_get_debug_register_length): Likewise.
5682
56832014-06-17 Gary Benson <gbenson@redhat.com>
5684
b9228891
GB
5685 * i386-low.h (i386-dregs.h): New include.
5686 (DR_FIRSTADDR): Now in i386-dregs.h.
5687 (DR_LASTADDR): Likewise.
5688 (DR_NADDR): Likewise.
5689 (DR_STATUS): Likewise.
5690 (DR_CONTROL): Likewise.
5691 (i386_debug_reg_state): Likewise.
5692 (i386_dr_insert_watchpoint): Likewise.
5693 (i386_dr_remove_watchpoint): Likewise.
5694 (i386_dr_region_ok_for_watchpoint): Likewise.
5695 (i386_dr_stopped_data_address): Likewise.
5696 (i386_dr_stopped_by_watchpoint): Likewise.
5697 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5698
4be83cc2
GB
56992014-06-18 Gary Benson <gbenson@redhat.com>
5700
5701 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5702 i386_dr_insert_watchpoint.
5703 (i386_low_remove_watchpoint): Renamed to
5704 i386_dr_remove_watchpoint.
5705 (i386_low_region_ok_for_watchpoint): Renamed to
5706 i386_dr_region_ok_for_watchpoint.
5707 (i386_low_stopped_data_address): Renamed to
5708 i386_dr_stopped_data_address.
5709 (i386_low_stopped_by_watchpoint): Renamed to
5710 i386_dr_stopped_by_watchpoint.
5711 * i386-low.c (i386_show_dr): Renamed to
5712 i386_dr_show and made nonstatic. All uses updated.
5713 (i386_length_and_rw_bits): Renamed to
5714 i386_dr_length_and_rw_bits and made nonstatic.
5715 All uses updated.
5716 (i386_insert_aligned_watchpoint): Renamed to
5717 i386_dr_insert_aligned_watchpoint and made nonstatic.
5718 All uses updated.
5719 (i386_remove_aligned_watchpoint): Renamed to
5720 i386_dr_remove_aligned_watchpoint and made nonstatic.
5721 All uses updated.
5722 (i386_update_inferior_debug_regs): Renamed to
5723 i386_dr_update_inferior_debug_regs and made nonstatic.
5724 All uses updated.
5725 (i386_low_insert_watchpoint): Renamed to
5726 i386_dr_insert_watchpoint. All uses updated.
5727 (i386_low_remove_watchpoint): Renamed to
5728 i386_dr_remove_watchpoint. All uses updated.
5729 (i386_low_region_ok_for_watchpoint): Renamed to
5730 i386_dr_region_ok_for_watchpoint. All uses updated.
5731 (i386_low_stopped_data_address): Renamed to
5732 i386_dr_stopped_data_address. All uses updated.
5733 (i386_low_stopped_by_watchpoint): Renamed to
5734 i386_dr_stopped_by_watchpoint. All uses updated.
5735
131aa0d4
GB
57362014-06-18 Gary Benson <gbenson@redhat.com>
5737
5738 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5739 (i386_dr_low_can_set_control): Likewise.
5740 (i386_insert_aligned_watchpoint): New check.
5741
d9305f7f
GB
57422014-06-18 Gary Benson <gbenson@redhat.com>
5743
5744 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5745 Renamed to state.
5746
e927c9fc
GB
57472014-06-18 Gary Benson <gbenson@redhat.com>
5748
5749 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5750 instead of fatal and error.
5751 (i386_handle_nonaligned_watchpoint): Likewise.
5752
1b6d4134
GB
57532014-06-18 Gary Benson <gbenson@redhat.com>
5754
5755 * i386-low.c (i386_get_debug_register_length): New macro.
5756 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5757 (i386_show_dr): Use debug_printf instead of fprintf. Use
5758 phex to format values.
5759
6e62758f
GB
57602014-06-18 Gary Benson <gbenson@redhat.com>
5761
5762 * i386-low.h: Comment changes.
5763 * i386-low.c: Likewise.
5764
fc6e2f03
GB
57652014-06-18 Gary Benson <gbenson@redhat.com>
5766
5767 * i386-low.c: Whitespace changes.
5768
f9d1eeed
TT
57692014-06-12 Tom Tromey <tromey@redhat.com>
5770
5771 * utils.c (freeargv): Remove.
5772
0b04e523
TT
57732014-06-12 Tom Tromey <tromey@redhat.com>
5774
5775 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5776 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5777 (parse_debug_format_options): Likewise.
5778 (gdbserver_usage): Likewise.
5779 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5780 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5781 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5782 against libiberty.
5783 ($(LIBGNU)): Depend on libiberty.
5784 (all-lib): Recurse into all subdirs.
5785 (install-only): Invoke "install" target in subdirs.
5786 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5787 targets.
5788 * configure: Rebuild.
5789 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5790 for vasprintf, vsnprintf, or gettimeofday.
5791 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5792 srv_tgtobj.
5793
270c9937
JB
57942014-06-05 Joel Brobecker <brobecker@adacore.com>
5795
5796 * development.sh: Delete.
5797 * Makefile.in (config.status): Adjust dependency on development.sh.
5798 * configure.ac: Adjust development.sh source call.
5799 * configure: Regenerate.
5800
0a261ed8
PA
58012014-06-02 Pedro Alves <palves@redhat.com>
5802
5803 * ax.c (gdb_free_agent_expr): New function.
5804 * ax.h (gdb_free_agent_expr): New declaration.
5805 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5806 list.
5807 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5808 static.
5809 (clear_breakpoint_conditions_and_commands): New function.
5810 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5811 (clear_breakpoint_conditions_and_commands): New declaration.
5812
e9dae05e
RR
58132014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5814
5815 * linux-aarch64-low.c (asm/ptrace.h): Include.
5816
5876f503
JK
58172014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5818
5819 Fix TLS access for -static -pthread.
5820 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5821 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5822 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5823
802e8e6d
PA
58242014-05-20 Pedro Alves <palves@redhat.com>
5825
5826 * linux-aarch64-low.c (aarch64_insert_point)
5827 (aarch64_remove_point): No longer check whether the type is
5828 supported here. Adjust to new interface.
5829 (the_low_target): Install aarch64_supports_z_point_type as
5830 supports_z_point_type method.
5831 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5832 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5833 instead of a Z packet char. Adjust.
5834 (arm_supports_z_point_type): New function.
5835 (arm_insert_point, arm_remove_point): Adjust to new interface.
5836 (the_low_target): Install arm_supports_z_point_type.
5837 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5838 (cris_insert_point, cris_remove_point): Adjust to new interface.
5839 Don't check whether the type is supported here.
5840 (the_low_target): Install cris_supports_z_point_type.
5841 * linux-low.c (linux_supports_z_point_type): New function.
5842 (linux_insert_point, linux_remove_point): Adjust to new interface.
5843 * linux-low.h (struct linux_target_ops) <insert_point,
5844 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5845 raw_breakpoint pointer parameter.
5846 <supports_z_point_type>: New method.
5847 * linux-mips-low.c (mips_supports_z_point_type): New function.
5848 (mips_insert_point, mips_remove_point): Adjust to new interface.
5849 Use mips_supports_z_point_type.
5850 (the_low_target): Install mips_supports_z_point_type.
5851 * linux-ppc-low.c (the_low_target): Install NULL as
5852 supports_z_point_type method.
5853 * linux-s390-low.c (the_low_target): Install NULL as
5854 supports_z_point_type method.
5855 * linux-sparc-low.c (the_low_target): Install NULL as
5856 supports_z_point_type method.
5857 * linux-x86-low.c (x86_supports_z_point_type): New function.
5858 (x86_insert_point): Adjust to new insert_point interface. Use
5859 insert_memory_breakpoint. Adjust to new
5860 i386_low_insert_watchpoint interface.
5861 (x86_remove_point): Adjust to remove_point interface. Use
5862 remove_memory_breakpoint. Adjust to new
5863 i386_low_remove_watchpoint interface.
5864 (the_low_target): Install x86_supports_z_point_type.
5865 * lynx-low.c (lynx_target_ops): Install NULL as
5866 supports_z_point_type callback.
5867 * nto-low.c (nto_supports_z_point_type): New.
5868 (nto_insert_point, nto_remove_point): Adjust to new interface.
5869 (nto_target_ops): Install nto_supports_z_point_type.
5870 * mem-break.c: Adjust intro comment.
5871 (struct raw_breakpoint) <raw_type, size>: New fields.
5872 <inserted>: Update comment.
5873 <shlib_disabled>: Delete field.
5874 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5875 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5876 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5877 (raw_bkpt_type_to_target_hw_bp_type): New function.
5878 (find_enabled_raw_code_breakpoint_at): New function.
5879 (find_raw_breakpoint_at): New type and size parameters. Use them.
5880 (insert_memory_breakpoint): New function, based off
5881 set_raw_breakpoint_at.
5882 (remove_memory_breakpoint): New function.
5883 (set_raw_breakpoint_at): Reimplement.
5884 (set_breakpoint): New, based on set_breakpoint_at.
5885 (set_breakpoint_at): Reimplement.
5886 (delete_raw_breakpoint): Go through the_target->remove_point
5887 instead of assuming memory breakpoints.
5888 (find_gdb_breakpoint_at): Delete.
5889 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5890 (find_gdb_breakpoint): New function.
5891 (set_gdb_breakpoint_at): Delete.
5892 (z_type_supported): New function.
5893 (set_gdb_breakpoint_1): New function, loosely based off
5894 set_gdb_breakpoint_at.
5895 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5896 (delete_gdb_breakpoint_at): Delete.
5897 (delete_gdb_breakpoint_1): New function, loosely based off
5898 delete_gdb_breakpoint_at.
5899 (delete_gdb_breakpoint): New function.
5900 (clear_gdb_breakpoint_conditions): Rename to ...
5901 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5902 breakpoint.
5903 (add_condition_to_breakpoint): Make static.
5904 (add_breakpoint_condition): Take a struct breakpoint pointer
5905 instead of an address. Adjust.
5906 (gdb_condition_true_at_breakpoint): Rename to ...
5907 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5908 z_type parameter.
5909 (gdb_condition_true_at_breakpoint): Reimplement.
5910 (add_breakpoint_commands): Take a struct breakpoint pointer
5911 instead of an address. Adjust.
5912 (gdb_no_commands_at_breakpoint): Rename to ...
5913 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5914 parameter. Return true if no breakpoint was found. Change debug
5915 output.
5916 (gdb_no_commands_at_breakpoint): Reimplement.
5917 (run_breakpoint_commands): Rename to ...
5918 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5919 and change return type to boolean.
5920 (run_breakpoint_commands): New function.
5921 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5922 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5923 breakpoint. Go through the_target->remove_point instead of
5924 assuming memory breakpoint.
5925 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5926 software and hardware breakpoints.
5927 (reinsert_raw_breakpoint): Go through the_target->insert_point
5928 instead of assuming memory breakpoint.
5929 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5930 software and hardware breakpoints.
5931 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5932 Check both software and hardware breakpoints.
5933 (validate_inserted_breakpoint): Assert the breakpoint is a
5934 software breakpoint. Set the inserted flag to -1 instead of
5935 setting shlib_disabled.
5936 (delete_disabled_breakpoints): Adjust.
5937 (validate_breakpoints): Only validate software breakpoints.
5938 Adjust to inserted flag change.
5939 (check_mem_read, check_mem_write): Skip breakpoint types other
5940 than software breakpoints. Adjust to inserted flag change.
5941 * mem-break.h (enum raw_bkpt_type): New enum.
5942 (raw_breakpoint, struct process_info): Forward declare.
5943 (Z_packet_to_target_hw_bp_type): Delete declaration.
5944 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5945 (set_gdb_breakpoint, delete_gdb_breakpoint)
5946 (clear_breakpoint_conditions): New declarations.
5947 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5948 (breakpoint_inserted_here): Update comment.
5949 (add_breakpoint_condition, add_breakpoint_commands): Replace
5950 address parameter with a breakpoint pointer parameter.
5951 (gdb_breakpoint_here): Update comment.
5952 (delete_gdb_breakpoint_at): Delete.
5953 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5954 * server.c (process_point_options): Take a struct breakpoint
5955 pointer instead of an address. Adjust.
5956 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5957 delete_gdb_breakpoint.
5958 * spu-low.c (spu_target_ops): Install NULL as
5959 supports_z_point_type method.
5960 * target.h: Include mem-break.h.
5961 (struct target_ops) <prepare_to_access_memory>: Update comment.
5962 <supports_z_point_type>: New field.
5963 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5964 instead of a char. Also take a raw breakpoint pointer.
5965 * win32-arm-low.c (the_low_target): Install NULL as
5966 supports_z_point_type.
5967 * win32-i386-low.c (i386_supports_z_point_type): New function.
5968 (i386_insert_point, i386_remove_point): Adjust to new interface.
5969 (the_low_target): Install i386_supports_z_point_type.
5970 * win32-low.c (win32_supports_z_point_type): New function.
5971 (win32_insert_point, win32_remove_point): Adjust to new interface.
5972 (win32_target_ops): Install win32_supports_z_point_type.
5973 * win32-low.h (struct win32_target_ops):
5974 <supports_z_point_type>: New method.
5975 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5976 instead of a char. Also take a raw breakpoint pointer.
5977
932539e3
PA
59782014-05-20 Pedro Alves <palves@redhat.com>
5979
5980 * mem-break.h: Include break-common.h.
5981 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5982 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5983 (Z_packet_to_target_hw_bp_type): New declaration.
5984 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5985 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5986 (Z_PACKET_ACCESS_WP): Delete macros.
5987 (Z_packet_to_hw_type): Delete function.
5988 * i386-low.h: Don't include break-common.h here.
5989 (Z_packet_to_hw_type): Delete declaration.
5990 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5991 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5992 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5993 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5994 * linux-aarch64-low.c: Don't include break-common.h here.
5995 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5996 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5997 (Z_packet_to_target_hw_bp_type): Delete function.
5998 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5999 function.
6000 (mips_insert_point, mips_remove_point): Use
6001 Z_packet_to_target_hw_bp_type.
6002
4ff0d3d8
PA
60032014-05-20 Pedro Alves <palves@redhat.com>
6004
6005 * linux-aarch64-low.c: Include break-common.h.
6006 (enum target_point_type): Delete.
6007 (Z_packet_to_point_type): Rename to ...
6008 (Z_packet_to_target_hw_bp_type): ... this, and return a
6009 target_hw_bp_type instead.
6010 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6011 instead of an enum target_point_type.
6012 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6013 breakpoint type.
6014 (aarch64_dr_state_insert_one_point)
6015 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6016 (aarch64_handle_aligned_watchpoint)
6017 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6018 Take an enum target_hw_bp_type instead of an enum
6019 target_point_type.
6020 (aarch64_supports_z_point_type): New function.
6021 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6022 use Z_packet_to_target_hw_bp_type.
6023
786dc519
JB
60242014-05-20 Joel Brobecker <brobecker@adacore.com>
6025
6026 * configure.ac: Only use -Werror by default when DEVELOPMENT
6027 is true.
6028 * configure: Regenerate.
6029
9e0aa64f
JK
60302014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6031
6032 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6033 * linux-x86-low.c (X86_64_USER_REGS): New.
6034 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6035
2b577b92
YQ
60362014-04-28 Yao Qi <yao@codesourcery.com>
6037
6038 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6039 name.
6040
94611da2
PA
60412014-04-25 Pedro Alves <palves@redhat.com>
6042
6043 PR server/16255
6044 * linux-low.c (linux_attach_fail_reason_string): New function.
6045 (linux_attach_lwp): Delete.
6046 (linux_attach_lwp_1): Rename to ...
6047 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6048 argument. Remove "initial" parameter. Return int instead of
6049 void. Don't error or warn here.
6050 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6051 failure to attach to the tgid. Call warning when failing to
6052 attach to an lwp.
6053 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6054 argument. Remove "initial" parameter. Return int instead of
6055 void. Don't error or warn here.
6056 (linux_attach_fail_reason_string): New declaration.
6057 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6058 interface change. Use linux_attach_fail_reason_string.
6059
01f9f808
MS
60602014-04-24 Michael Sturm <michael.sturm@mintel.com>
6061 Walfred Tedeschi <walfred.tedeschi@intel.com>
6062
6063 * Makefile.in: Added rules to handle new files
6064 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6065 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6066 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6067 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6068 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6069 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6070 x32-avx512-linux.o.
6071 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6072 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6073 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6074 i386/x32-avx512.xml.
6075 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6076 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6077 i386/x32-avx512-linux.xml.
6078 * i387-fp.c (num_avx512_k_registers): New constant for number
6079 of K registers.
6080 (num_avx512_zmmh_low_registers): New constant for number of
6081 lower ZMM registers (0-15).
6082 (num_avx512_zmmh_high_registers): New constant for number of
6083 higher ZMM registers (16-31).
6084 (num_avx512_ymmh_registers): New contant for number of higher
6085 YMM registers (ymm16-31 added by avx521 on x86_64).
6086 (num_avx512_xmm_registers): New constant for number of higher
6087 XMM registers (xmm16-31 added by AVX512 on x86_64).
6088 (struct i387_xsave): Add space for AVX512 registers.
6089 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6090 Add code to handle AVX512 registers.
6091 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6092 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6093 prototypei from generated file.
6094 (tdesc_amd64_avx512_linux): Likewise.
6095 (init_registers_x32_avx512_linux): Likewise.
6096 (tdesc_x32_avx512_linux): Likewise.
6097 (init_registers_i386_avx512_linux): Likewise.
6098 (tdesc_i386_avx512_linux): Likewise.
6099 (x86_64_regmap): Add AVX512 registers.
6100 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6101 mask.
6102 (initialize_low_arch): Add code to initialize AVX512 registers.
6103
51aa91f9
PA
61042014-04-23 Pedro Alves <palves@redhat.com>
6105
6106 * mem-break.c (find_gdb_breakpoint_at): Make static.
6107 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6108
a4165e94
PA
61092014-04-23 Pedro Alves <palves@redhat.com>
6110
6111 * i386-low.c: Don't include break-common.h here.
6112 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6113 prototype to take target_hw_bp_type as argument instead of a Z
6114 packet char.
6115 * i386-low.h: Include break-common.h here.
6116 (Z_packet_to_hw_type): Declare.
6117 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6118 prototypes.
6119 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6120 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6121 (x86_remove_point): Convert the packet number to a
6122 target_hw_bp_type before calling i386_low_remove_watchpoint.
6123 * win32-i386-low.c (i386_insert_point): Convert the packet number
6124 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6125 (i386_remove_point): Convert the packet number to a
6126 target_hw_bp_type before calling i386_low_remove_watchpoint.
6127
b8acf843
PA
61282014-04-23 Pedro Alves <palves@redhat.com>
6129
6130 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6131
d708bcd1
PA
61322014-04-10 Pedro Alves <palves@redhat.com>
6133
6134 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6135 Check if the condition or command is NULL before checking if the
6136 breakpoint is known. On success, return true.
6137 * mem-break.h (add_breakpoint_condition): Document return.
6138 (add_breakpoint_commands): Add describing comment.
6139 * server.c (skip_to_semicolon): New function.
6140 (process_point_options): Use it.
6141
2eec7d5b
PA
61422014-04-09 Pedro Alves <palves@redhat.com>
6143
6144 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6145 to lwpid_of.
6146
fa96cb38
PA
61472014-02-27 Pedro Alves <palves@redhat.com>
6148
6149 PR 12702
6150 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6151 macros.
6152 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6153 output.
6154 (last_thread_of_process_p): Take a PID argument instead of a
6155 thread pointer.
6156 (linux_wait_for_lwp): Delete.
6157 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6158 functions.
6159 (linux_low_filter_event): New function, party factored out from
6160 linux_wait_for_event.
6161 (linux_wait_for_event): Rename to ...
6162 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6163 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6164 sigsuspend. Check for zombie leaders.
6165 (linux_wait_for_event): Reimplement as wrapper around
6166 linux_wait_for_event_filtered.
6167 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6168 a normal or signal exit is seen, it's the whole process exiting.
6169 (wait_for_sigstop): No longer a for_each_inferior callback.
6170 Rewrite on top of linux_wait_for_event_filtered.
6171 (stop_all_lwps): Call wait_for_sigstop directly.
6172 * server.c (resume, handle_target_event): Handle
6173 TARGET_WAITKIND_NO_RESUMED.
6174
d763de10
JB
61752014-02-26 Joel Brobecker <brobecker@adacore.com>
6176
6177 * win32-low.c (psapi_get_dll_name,
6178 * win32_CreateToolhelp32Snapshot): Delete.
6179 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6180 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6181 Delete.
6182 (handle_load_dll): Add function description.
6183 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6184
850a0f76
JB
61852014-02-26 Joel Brobecker <brobecker@adacore.com>
6186
6187 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6188 Add comment.
6189 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6190 base address when calling win32_add_one_solib.
6191 (handle_load_dll): Delete local variable load_addr.
6192 Remove 0x1000 offset applied to DLL base address when calling
6193 win32_add_one_solib.
6194 (handle_unload_dll): Add comment.
6195
f25b3fc3
JB
61962014-02-26 Joel Brobecker <brobecker@adacore.com>
6197
6198 * win32-low.c (win32_add_all_dlls): Renames
6199 win32_ensure_ntdll_loaded. Rewrite function documentation.
6200 Adjust implementation to always load all DLLs.
6201 Add 0x1000 offset to DLL base address when calling
6202 win32_add_one_solib.
6203 (child_initialization_done): New static global.
6204 (do_initial_child_stuff): Set child_initialization_done to
6205 zero during child initialization, and 1 after. Replace call
6206 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6207 Add comment.
6208 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6209 (handle_unload_dll): Add function documentation.
6210 (get_child_debug_event): Ignore load and unload DLL events
6211 during child initialization.
6212
d86d4aaf
DE
62132014-02-20 Doug Evans <dje@google.com>
6214
3bc32da3 6215 Remove global all_lwps.
d86d4aaf
DE
6216 * inferiors.h (ptid_of): Move here from linux-low.h.
6217 (pid_of, lwpid_of): Ditto.
6218 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6219 parameter is a struct thread_info * now.
6220 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6221 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6222 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6223 directly.
6224 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6225 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6226 * linux-arm-low.c (update_registers_callback): Update, "entry"
6227 parameter is a struct thread_info * now.
6228 Fetch lwpid from current_inferior directly.
6229 (arm_insert_point): Pass &all_threads to find_inferior instead of
6230 &all_lwps.
6231 (arm_remove_point): Ditto.
6232 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6233 (arm_prepare_to_resume): Fetch pid from thread.
6234 (arm_read_description): Fetch lwpid from current_inferior directly.
6235 * linux-low.c (all_lwps): Delete.
6236 (delete_lwp): Delete call to remove_inferior.
6237 (handle_extended_wait): Fetch lwpid from thread.
6238 (add_lwp): Don't set lwp->entry.id. Remove call to
6239 add_inferior_to_list.
6240 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6241 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6242 (kill_one_lwp_callback): Ditto.
6243 (linux_kill): Don't dereference NULL pointer.
6244 Fetch ptid,lwpid from thread.
6245 (get_detach_signal): Fetch ptid from thread.
6246 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6247 Simplify call to regcache_invalidate_thread.
6248 (delete_lwp_callback): Update, "entry" parameter is a
6249 struct thread_info * now. Fetch pid from thread.
6250 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6251 (status_pending_p_callback): Update, "entry" parameter is a
6252 struct thread_info * now. Fetch ptid from thread.
6253 (find_lwp_pid): Update, "entry" parameter is a
6254 struct thread_info * now.
6255 (linux_wait_for_lwp): Fetch pid from thread.
6256 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6257 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6258 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6259 (dequeue_one_deferred_signal): Ditto.
6260 (cancel_breakpoint): Fetch ptid from current_inferior.
6261 (linux_wait_for_event): Pass &all_threads to find_inferior,
6262 not &all_lwps. Fetch ptid, lwpid from thread.
6263 (count_events_callback): Update, "entry" parameter is a
6264 struct thread_info * now.
6265 (select_singlestep_lwp_callback): Ditto.
6266 (select_event_lwp_callback): Ditto.
6267 (cancel_breakpoints_callback): Ditto.
6268 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6269 not &all_lwps.
6270 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6271 (unsuspend_one_lwp): Update, "entry" parameter is a
6272 struct thread_info * now.
6273 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6274 not &all_lwps.
6275 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6276 Fetch lwpid from thread, not lwp.
6277 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6278 Pass &all_threads to find_inferior, not &all_lwps.
6279 (send_sigstop): Fetch lwpid from thread, not lwp.
6280 (send_sigstop_callback): Update, "entry" parameter is a
6281 struct thread_info * now.
6282 (suspend_and_send_sigstop_callback): Ditto.
6283 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6284 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6285 struct thread_info * now.
6286 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6287 from thread, lwp.
6288 (lwp_running): Update, "entry" parameter is a
6289 struct thread_info * now.
6290 (stop_all_lwps): Fetch ptid from thread.
6291 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6292 (linux_resume_one_lwp): Fetch lwpid from thread.
6293 (linux_set_resume_request): Update, "entry" parameter is a
6294 struct thread_info * now. Fetch pid, lwpid from thread.
6295 (resume_status_pending_p): Update, "entry" parameter is a
6296 struct thread_info * now.
6297 (need_step_over_p): Ditto. Fetch lwpid from thread.
6298 (start_step_over): Fetch lwpid from thread.
6299 (linux_resume_one_thread): Update, "entry" parameter is a
6300 struct thread_info * now. Fetch lwpid from thread.
6301 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6302 (proceed_one_lwp): Update, "entry" parameter is a
6303 struct thread_info * now. Fetch lwpid from thread.
6304 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6305 struct thread_info * now.
6306 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6307 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6308 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6309 directly.
6310 (regsets_store_inferior_registers): Ditto.
6311 (fetch_register, store_register): Ditto.
6312 (linux_read_memory, linux_write_memory): Ditto.
6313 (linux_request_interrupt): Ditto.
6314 (linux_read_auxv): Ditto.
6315 (linux_xfer_siginfo): Ditto.
6316 (linux_qxfer_spu): Ditto.
6317 (linux_qxfer_libraries_svr4): Ditto.
6318 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6319 moved to inferiors.h.
6320 (get_lwp): Delete.
6321 (get_thread_lwp): Update.
6322 (struct lwp_info): Delete member "entry". Simplify comment for
6323 member "thread".
6324 (all_lwps): Delete.
6325 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6326 current_inferior directly.
6327 (update_watch_registers_callback): Update, "entry" parameter is a
6328 struct thread_info * now. Fetch pid from thread.
6329 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6330 (mips_insert_point): Fetch lwpid from current_inferior.
6331 Pass &all_threads to find_inferior, not &all_lwps.
6332 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6333 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6334 directly.
6335 (mips_stopped_data_address): Ditto.
6336 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6337 directly.
6338 * linux-tile-low.c (tile_arch_setup): Ditto.
6339 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6340 (update_debug_registers_callback): Update, "entry" parameter is a
6341 struct thread_info * now. Fetch pid from thread.
6342 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6343 Pass &all_threads to find_inferior, not &all_lwps.
6344 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6345 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6346 Pass &all_threads to find_inferior, not &all_lwps.
6347 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6348 (i386_dr_low_get_status): Ditto.
6349 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6350 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6351 (x86_linux_read_description): Ditto.
6352 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6353
3b8361aa
DE
63542014-02-20 Doug Evans <dje@google.com>
6355
6356 * inferiors.c (get_first_inferior): Fix buglet.
6357
f7667f0d
DE
63582014-02-19 Doug Evans <dje@google.com>
6359
6360 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6361 * inferiors.c (add_thread): Change result type to struct thread_info *.
6362 All callers updated.
6363 (add_lwp): Call add_thread here instead of in callers.
6364 All callers updated.
6365 * linux-low.h (get_lwp_thread): Rewrite.
6366 (struct lwp_info): New member "thread".
6367
b3312d80
DE
63682014-02-19 Doug Evans <dje@google.com>
6369
6370 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6371 All callers updated.
6372
ecc6f45c
DE
63732014-02-19 Doug Evans <dje@google.com>
6374
6375 * inferiors.c (add_thread): Fix whitespace.
6376
649ebbca
DE
63772014-02-19 Doug Evans <dje@google.com>
6378
6379 * dll.c (clear_dlls): Replace accessing list implemention details
6380 with API function.
6381 * gdbthread.h (get_first_thread): Declare.
6382 * inferiors.c (for_each_inferior_with_data): New function.
6383 (get_first_thread): New function.
6384 (find_thread_ptid): Simplify.
6385 (get_first_inferior): New function.
6386 (clear_list): Delete.
6387 (one_inferior_p): New function.
6388 (clear_inferior_list): New function.
6389 (clear_inferiors): Update.
6390 * inferiors.h (for_each_inferior_with_data): Declare.
6391 (clear_inferior_list): Declare.
6392 (one_inferior_p): Declare.
6393 (get_first_inferior): Declare.
6394 * linux-low.c (linux_wait_for_event): Replace accessing list
6395 implemention details with API function.
6396 * server.c (target_running): Ditto.
6397 (accumulate_file_name_length): New function.
6398 (emit_dll_description): New function.
6399 (handle_qxfer_libraries): Replace accessing list implemention
6400 details with API function.
6401 (handle_qxfer_threads_worker): New function.
6402 (handle_qxfer_threads_proper): Replace accessing list implemention
6403 details with API function.
6404 (handle_query): Ditto.
6405 (visit_actioned_threads_callback_ftype): New typedef.
6406 (visit_actioned_threads_data): New struct.
6407 (visit_actioned_threads): Rewrite to be find_inferior callback.
6408 (resume): Call find_inferior.
6409 (handle_status): Replace accessing list implemention
6410 details with API function.
6411 (process_serial_event): Replace accessing list implemention details
6412 with API function.
6413 * target.c (set_desired_inferior): Replace accessing list implemention
6414 details with API function.
6415 * tracepoint.c (same_process_p): New function.
6416 (gdb_agent_about_to_close): Replace accessing list implemention
6417 details with API function.
6418 * win32-low.c (child_delete_thread): Replace accessing list
6419 implemention details with API function.
6420 (match_dll_by_basename): New function.
6421 (dll_is_loaded_by_basename): New function.
6422 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6423 details call to dll_is_loaded_by_basename.
6424
80894984
DE
64252014-02-19 Doug Evans <dje@google.com>
6426
6427 * dll.h (struct dll_info): Add comment.
6428 * gdbthread.h (struct thread_info): Add comment.
6429 (current_ptid): Simplify.
6430 * inferiors.c (add_process): Update.
6431 (remove_process): Update.
6432 * inferiors.h (struct process_info): Rename member "head" to "entry".
6433 * linux-low.c (delete_lwp): Update.
6434 (add_lwp): Update.
6435 (last_thread_of_process_p): Update.
6436 (kill_one_lwp_callback, linux_kill): Update.
6437 (status_pending_p_callback): Update.
6438 (wait_for_sigstop): Update. Simplify read of ptid.
6439 (start_step_over): Update.
6440 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6441 (get_lwp_thread): Update.
6442 (struct lwp_info): Rename member "head" to "entry".
6443 * regcache.h (inferior_list_entry): Delete.
6444 * server.c (kill_inferior_callback): Update.
6445 (detach_or_kill_inferior_callback): Update.
6446 (print_started_pid): Update.
6447 (print_attached_pid): Update.
6448 (process_serial_event): Simplify read of ptid.
6449 * thread-db.c (thread_db_create_event): Update.
6450 (thread_db_get_tls_address): Update.
6451 * win32-low.c (current_inferior_ptid): Simplify.
6452
46917d26
TT
64532014-02-19 Tom Tromey <tromey@redhat.com>
6454
6455 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6456 argument.
6457 (target_supports_btrace): Update.
6458
0759a81e
YQ
64592014-02-14 Yao Qi <yao@codesourcery.com>
6460
6461 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6462 (rsp-low-ipa.o): New target.
6463
a7191e8b
TT
64642014-02-12 Tom Tromey <tromey@redhat.com>
6465
6466 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6467 convert_ascii_to_int.
6468 * regcache.c (registers_to_string): Likewise.
6469 * remote-utils.c (decode_M_packet): Likewise.
6470 * server.c (process_serial_event): Likewise.
6471
ff0e980e
TT
64722014-02-12 Tom Tromey <tromey@redhat.com>
6473
6474 * server.c (handle_query, handle_v_run): Use hex2bin, not
6475 unhexify.
6476 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6477
e9371aff
TT
64782014-02-12 Tom Tromey <tromey@redhat.com>
6479
6480 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6481 convert_int_to_ascii.
6482 * regcache.c (registers_to_string, collect_register_as_string):
6483 Likewise.
6484 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6485 Likewise.
6486 * server.c (process_serial_event): Likewise.
6487 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6488 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6489
971dc0b8
TT
64902014-02-12 Tom Tromey <tromey@redhat.com>
6491
6492 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6493 bin2hex, not hexify.
6494 * tracepoint.c (cmd_qtstatus): Likewise.
6495
0a822afb
TT
64962014-02-12 Tom Tromey <tromey@redhat.com>
6497
6498 * remote-utils.c (monitor_output): Pass explicit length to
6499 hexify.
6500
9c3d6531
TT
65012014-02-12 Tom Tromey <tromey@redhat.com>
6502
6503 * tracepoint.c: Include rsp-low.h.
6504 * server.c: Include rsp-low.h.
6505 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6506 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6507 declare.
6508 * remote-utils.c: Include rsp-low.h.
6509 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6510 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6511 (convert_int_to_ascii, convert_ascii_to_int): Move to
6512 common/rsp-low.c.
6513 * regcache.c: Include rsp-low.h.
6514 * ax.c: Include rsp-low.h.
6515 * Makefile.in (SFILES): Add common/rsp-low.c.
6516 (OBS): Add rsp-low.o.
6517 (rsp-low.o): New target.
6518
01fd3ea5
TT
65192014-02-12 Tom Tromey <tromey@redhat.com>
6520
6521 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6522 Include print-utils.h.
6523 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6524 (plongest, thirty_two, phex_nz): Remove.
6525 * Makefile.in (SFILES): Add common/print-utils.c.
6526 (OBS): Add print-utils.o.
6527 (print-utils-ipa.o): New target.
6528 (print-utils.o): New target.
6529 (IPA_OBJS): Add print-utils-ipa.o.
6530
e99dc820
TT
65312014-02-06 Tom Tromey <tromey@redhat.com>
6532
6533 * Makefile.in (SFILES): Fix indentation.
6534
ee1e2d4f
DE
65352014-02-05 Doug Evans <dje@google.com>
6536
6537 * linux-low.c (linux_wait_for_event): Improve comment.
6538 (linux_wait_1): Keep current_inferior in sync with event_child.
6539
f5a02773
DE
65402014-01-22 Doug Evans <dje@google.com>
6541
6542 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6543
87ce2a04
DE
65442014-01-22 Doug Evans <dje@google.com>
6545
6546 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6547 * configure: Regenerate.
6548 * config.in: Regenerate.
6549 * Makefile.in (SFILES): Add debug.c.
6550 (OBS): Add debug.o.
6551 * debug.c: New file.
6552 * debug.h: New file.
6553 * linux-aarch64-low.c (*): Update all debugging printfs to use
6554 debug_printf instead of fprintf.
6555 * linux-arm-low.c (*): Ditto.
6556 * linux-cris-low.c (*): Ditto.
6557 * linux-crisv32-low.c (*): Ditto.
6558 * linux-m32r-low.c (*): Ditto.
6559 * linux-sparc-low.c (*): Ditto.
6560 * linux-x86.c (*): Ditto.
6561 * linux-low.c (*): Ditto.
6562 (linux_wait_1): Add calls to debug_enter, debug_exit.
6563 (linux_wait): Remove redundant debugging printf.
6564 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6565 (linux_resume, unstop_all_lwps): Ditto.
6566 * mem-break.c (*): Update all debugging printfs to use
6567 debug_printf instead of fprintf.
6568 * remote-utils.c (*): Ditto.
6569 * thread-db.c (*): Ditto.
6570 * server.c #include <ctype.h>, "gdb_vecs.h".
6571 (debug_threads): Moved to debug.c.
6572 (*): Update all debugging printfs to use debug_printf instead of
6573 fprintf.
6574 (start_inferior): Replace call to fflush with call to debug_flush.
6575 (monitor_show_help): Mention set debug-format.
6576 (parse_debug_format_options): New function.
6577 (handle_monitor_command): Handle "monitor set debug-format".
6578 (gdbserver_usage): Mention --debug-format.
6579 (main): Parse --debug-format.
6580 * server.h (debug_threads): Declaration moved to debug.h.
6581 #include "debug.h".
6582 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6583 trace_debug_1 that uses debug_printf.
6584 (tracepoint_look_up_symbols): Update all debugging printfs to use
6585 debug_printf instead of fprintf.
6586
e671835b
BS
65872014-01-20 Baruch Siach <baruch@tkos.co.il>
6588
6589 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6590 sys/ptrace.h.
6591
b5737fa9
PA
65922014-01-17 Pedro Alves <palves@redhat.com>
6593
ea38d2a9 6594 PR build/16445
c7faa97a
PA
6595 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6596 defined after including gdb_proc_service.h.
b5737fa9 6597
40ed484e
DE
65982014-01-16 Doug Evans <dje@google.com>
6599
6600 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6601 (match_dll): Use it.
6602
969c39fb
MM
66032014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6604
6605 * target.h (target_ops) <read_btrace>: Change parameters and
6606 return type to allow error reporting.
6607 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6608 trace reading errors on.
6609 * linux-low.c (linux_low_read_btrace): Pass trace reading
6610 errors on.
6611 (linux_low_disable_btrace): New.
6612
ab7f45ba
DE
66132014-01-15 Doug Evans <dje@google.com>
6614
6615 * inferiors.c (thread_id_to_gdb_id): Delete.
6616 * inferiors.h (thread_id_to_gdb_id): Delete.
6617
66af0f44
EZ
66182014-01-13 Eli Zaretskii <eliz@gnu.org>
6619
6620 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6621 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6622 versions.
6623
9939e131
PA
66242014-01-08 Pedro Alves <palves@redhat.com>
6625
6626 * server.c (handle_status): Don't discard previous queued stop
6627 replies or thread's pending status here.
6628 (main) <disconnection>: Do it here instead.
6629
b7ea362b
PA
66302014-01-08 Pedro Alves <palves@redhat.com>
6631
6632 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6633 * server.c (visit_actioned_threads, handle_pending_status): New
6634 function.
6635 (handle_v_cont): Factor out parts to ...
6636 (resume): ... this new function. If in all-stop, and a thread
6637 being resumed has a pending status, report it without actually
6638 resuming.
6639 (myresume): Adjust to use the new 'resume' function.
6640 (clear_pending_status_callback, set_pending_status_callback)
6641 (find_status_pending_thread_callback): New functions.
6642 (handle_status): Handle the case of multiple threads having
6643 interesting statuses to report. Report threads' real last signal
6644 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6645 with an interesting thread to report the status for, instead of
6646 always reporting the status of the first thread.
6647
28498c42
JB
66482014-01-01 Joel Brobecker <brobecker@adacore.com>
6649
6650 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6651 * gdbreplay.c (gdbreplay_version): Likewise.
6652
f45c82da
YZ
66532013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6654
6655 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6656 iov.iov_len with the real length in use.
6657
379a5e2d
JB
66582013-12-13 Joel Brobecker <brobecker@adacore.com>
6659
6660 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6661 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6662 for all targets that use win32-low.c.
6663 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6664 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6665
4210d83e
PA
66662013-12-13 Pedro Alves <palves@redhat.com>
6667
6668 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6669 if equal to TARGET_WAITKIND_LOADED.
6670 * win32-low.c (cached_status): New static global.
6671 (win32_wait): Add declaration.
6672 (do_initial_child_stuff): Flush all initial pending debug events
6673 up to the initial breakpoint.
6674 (win32_wait): If CACHED_STATUS was set, return that instead
6675 of doing a real wait. Remove the code resuming the execution
6676 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6677 during the initial phase. Also remove the code changing
6678 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6679 TARGET_WAITKIND_STOPPED.
6680
e7f0d979
YQ
66812013-12-11 Yao Qi <yao@codesourcery.com>
6682
6683 * notif.c (handle_notif_ack): Return 0 if no notification
6684 matches.
6685
ebcf782c
DE
66862013-11-20 Doug Evans <dje@google.com>
6687
6688 * linux-low.c (linux_set_resume_request): Fix comment.
6689
20ad9378
DE
66902013-11-20 Doug Evans <dje@google.com>
6691
6692 * linux-low.c (resume_status_pending_p): Tweak comment.
6693
a196ebeb
WT
66942013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6695
6696 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6697 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6698 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6699 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6700 (srv_amd64_regobj): Add amd64-mpx.o.
6701 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6702 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6703 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6704 * i387-fp.c (num_pl_bnd_register) Added constant.
6705 (num_pl_bnd_cfg_registers) Added constant.
6706 (struct i387_xsave) Added reserved area and MPX fields.
6707 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6708 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6709 function.
6710 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6711 (init_registers_amd64_mpx_linux): Declare new function.
6712 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6713 (x86_64_regmap): Add MPX registers.
6714 (x86_linux_read_description): Add MPX case.
6715 (initialize_low_arch): Initialize MPX targets.
6716
0080a2f6
TT
67172013-11-18 Tom Tromey <tromey@redhat.com>
6718
6719 * configure: Rebuild.
6720 * configure.ac: Don't check for stdlib.h.
6721 * gdbreplay.c: Unconditionally include stdlib.h.
6722
2978b111
TT
67232013-11-18 Tom Tromey <tromey@redhat.com>
6724
6725 * config.in: Rebuild.
6726 * configure: Rebuild.
6727 * configure.ac: Don't use AC_HEADER_DIRENT.
6728
a3d08894
TT
67292013-11-18 Tom Tromey <tromey@redhat.com>
6730
6731 * server.h: Don't check HAVE_STRING_H.
6732 * gdbreplay.c: Don't check HAVE_STRING_H.
6733 * configure: Rebuild.
6734
0a5dd17d
TT
67352013-11-18 Tom Tromey <tromey@redhat.com>
6736
6737 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6738 LIBGNU.
6739
1bd2f0ba
TT
67402013-11-08 Tom Tromey <tromey@redhat.com>
6741
6742 * configure, config.in: Rebuild.
6743 * configure.ac: Remove unused configury.
6744
3266f10b
TT
67452013-11-08 Tom Tromey <tromey@redhat.com>
6746
6747 * acinclude.m4: Include common.m4, codeset.m4.
6748 * configure, config.in: Rebuild.
6749 * configure.ac: Use GDB_AC_COMMON.
6750
6682d959
AA
67512013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6752
6753 * linux-s390-low.c (HWCAP_S390_TE): New define.
6754 (s390_arch_setup): Consider the TE field in the HWCAP for
6755 determining 'have_regset_tdb'.
6756
fd0a4d76
SDJ
67572013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6758
6759 PR gdb/16014
6760 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6761 call to sizeof.
6762
1a3d890b
PA
67632013-10-02 Pedro Alves <palves@redhat.com>
6764
6765 * server.c (process_serial_event): Don't output "GDBserver
6766 exiting" if GDB is connected through stdio.
6767 * target.c (mywait): Likewise, be silent if GDB is connected
6768 through stdio.
6769
97ad4581
JB
67702013-10-01 Joel Brobecker <brobecker@adacore.com>
6771
6772 * lynx-low.c (lynx_add_threads_after_attach): New function.
6773 (lynx_attach): Remove call to add_thread. Add call to
6774 lynx_add_threads_after_attach instead.
6775
5b4e221c
MF
67762013-09-28 Mike Frysinger <vapier@gentoo.org>
6777
6778 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6779 * config.in, configure: Regenerated.
6780
ee47b2f8
YQ
67812013-09-18 Yao Qi <yao@codesourcery.com>
6782
6783 PR server/15959
6784 * server.c (start_inferior): Clear 'resume_info'.
6785
d6707650 67862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6787
d6707650
JW
6788 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6789 for each register.
6790
9243dd0e 67912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6792
9243dd0e
JW
6793 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6794 linux-tile-low.o to srv_tgtobj.
6795
c623a6ef
WN
67962013-09-16 Will Newton <will.newton@linaro.org>
6797
6798 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6799 out regs.
6800
fb71d39e
PA
68012013-09-06 Pedro Alves <palves@redhat.com>
6802
6803 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6804 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6805 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6806 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6807 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6808 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6809
8e7e9910
PA
68102013-09-06 Pedro Alves <palves@redhat.com>
6811
6812 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6813 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6814
7c3a12ca
PA
68152013-09-06 Pedro Alves <palves@redhat.com>
6816
6817 * linux-amd64-ipa.c: Include tracepoint.h.
6818 * linux-i386-ipa.c: Include tracepoint.h.
6819
8eb3d7b6
RW
68202013-09-06 Ricard Wanderlof <ricardw@axis.com>
6821
6822 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6823 (ps_get_thread_area): New function.
6824
eddddb9d
RW
68252013-09-06 Ricard Wanderlof <ricardw@axis.com>
6826
6827 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6828 (initialize_low_arch): Call init_registers_crisv32 rather than
6829 init_register_crisv32.
6830
533b0600
PA
68312013-09-05 Pedro Alves <palves@redhat.com>
6832
6833 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6834 to ...
6835 * hostio.h: ... this new file.
6836 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6837 win32-low.c: Include hostio.h.
6838
0ce3d3b5
PA
68392013-09-05 Pedro Alves <palves@redhat.com>
6840
6841 * server.h (gdb_client_data, handler_func, callback_handler_func)
6842 (delete_file_handler, add_file_handler, append_callback_event)
6843 (delete_callback_event, start_event_loop, initialize_event_loop):
6844 Move to event-loop.h and include it.
6845 * event-loop.h: New file.
6846
799cdc37
PA
68472013-09-05 Pedro Alves <palves@redhat.com>
6848
6849 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6850 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6851 (loaded_dll, unloaded_dll): Move to ...
6852 * dll.h: ... this new file.
6853 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6854
6a6bbd9d
PA
68552013-09-05 Pedro Alves <palves@redhat.com>
6856
6857 * server.h (current_process, get_thread_process, all_processes)
6858 (add_inferior_to_list, for_each_inferior, current_inferior)
6859 (remove_inferior, add_process, remove_process, find_process_pid)
6860 (have_started_inferiors_p, have_attached_inferiors_p)
6861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6862 (clear_inferiors, find_inferior, find_inferior_id)
6863 (inferior_target_data, set_inferior_target_data)
6864 (inferior_regcache_data, set_inferior_regcache_data): Move to
6865 inferiors.h, and include it.
6866 * inferiors.h: New file.
6867
f699aaba
PA
68682013-09-05 Pedro Alves <palves@redhat.com>
6869
6870 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6871 Move ...
72f4393d 6872 * ax.h: ... here.
f699aaba 6873
c144c7a0
PA
68742013-09-05 Pedro Alves <palves@redhat.com>
6875
6876 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6877 tracepoint.h.
6878 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6879 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6880 (handle_tracepoint_general_set, handle_tracepoint_query)
6881 (tracepoint_finished_step, tracepoint_was_hit)
6882 (release_while_stepping_state_list, current_traceframe)
6883 (in_readonly_region, traceframe_read_mem)
6884 (fetch_traceframe_registers, traceframe_read_sdata)
6885 (traceframe_read_info, struct fast_tpoint_collect_status)
6886 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6887 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6888 (supply_fast_tracepoint_registers)
6889 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6890 (ipa_tdesc, claim_trampoline_space)
6891 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6892 (agent_mem_read, agent_get_trace_state_variable_value)
6893 (agent_set_trace_state_variable_value, agent_tsv_read)
6894 (agent_mem_read_string, get_raw_reg_func_addr)
6895 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6896 * tracepoint.h: ... this new file.
6897
ff42e6ab
PA
68982013-09-05 Pedro Alves <palves@redhat.com>
6899
6900 * server.h (perror_with_name, error, fatal, warning, paddress)
6901 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6902 include it.
6903 * utils.h: New file.
6904
541af0f4
PA
69052013-09-05 Pedro Alves <palves@redhat.com>
6906
6907 * server.h (remote_debug, noack_mode, transport_is_reliable)
6908 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6909 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6910 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6911 (write_enn, initialize_async_io, enable_async_io)
6912 (disable_async_io, check_remote_input_interrupt_request)
6913 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6914 (dead_thread_notify, prepare_resume_reply)
6915 (decode_address_to_semicolon, decode_address, decode_m_packet)
6916 (decode_M_packet, decode_X_packet, decode_xfer_write)
6917 (decode_search_memory_packet, unhexify, hexify)
6918 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6919 (look_up_one_symbol, relocate_instruction)
6920 (monitor_output): Move to remote-utils.h, and include it.
6921 * remote-utils.h: New file.
6922
eebdf26b
PA
69232013-09-05 Pedro Alves <palves@redhat.com>
6924
6925 * server.h (_): Delete.
6926
3aafd2ff
PA
69272013-09-02 Pedro Alves <palves@redhat.com>
6928
6929 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6930 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6931 allocated.
6932 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6933
cee83bcb
PM
69342013-09-02 Pierre Muller <muller@sourceware.org>
6935
6936 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6937 or WriteProcessMemory complete successfully and handle
6938 ERROR_PARTIAL_COPY error.
6939
9a13b2fa
PA
69402013-09-02 Pedro Alves <palves@redhat.com>
6941
6942 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6943 error instead of EIO.
6944
602e3198
JK
69452013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6946
6947 PR server/15604
6948 * linux-low.c: Include filestuff.h.
6949 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6950 * lynx-low.c: Include filestuff.h.
6951 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6952 * server.c: Include filestuff.h.
6953 (main): Call notice_open_fds.
6954 * spu-low.c: Include filestuff.h.
6955 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6956
96d7229d
LM
69572013-08-22 Luis Machado <lgustavo@codesourcery.com>
6958
6959 * Makefile.in: Explain why ../target and ../nat are not
6960 listed as include file search paths.
6961 (linux-waitpid.o): New object file rule.
6962 * configure.srv (srv_native_linux_obj): New variable.
6963 Replace all occurrences of linux native object files with
6964 $srv_native_linux_obj.
6965 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6966 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6967 (linux_enable_event_reporting): Remove declaration.
6968 (my_waitpid): Moved to common/linux-waitpid.c.
6969 (linux_wait_for_event): Pass ptid when calling
6970 linux_enable_event_reporting.
6971 (linux_supports_tracefork_flag): Remove.
6972 (linux_enable_event_reporting): Likewise.
6973 (linux_tracefork_grandchild): Remove.
6974 (STACK_SIZE): Moved to common/linux-ptrace.c.
6975 (linux_tracefork_child): Remove.
6976 (linux_test_for_tracefork): Remove.
6977 (linux_look_up_symbols): Call linux_supports_traceclone.
6978 (initialize_low): Remove call to linux_test_for_tracefork.
6979 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6980 common/linux-ptrace.h.
6981 (PTRACE_TYPE_ARG4): Likewise.
6982 Include linux-ptrace.h.
6983
32940073
PA
69842013-08-21 Pedro Alves <palves@redhat.com>
6985
6986 * config.in: Renegerate.
6987
33b60d58 69882013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6989
33b60d58
LM
6990 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6991 (SFILES): Remove $(srcdir)/common/target-common.c and
6992 add $(srcdir)/target/waitstatus.c.
6993 (OBS): Remove target-common.o and add waitstatus.o.
6994 (server_h): Remove $(srcdir)/../common/target-common.h and
6995 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6996 and $(srcdir)/../target/waitstatus.h.
6997 (target-common.o): Remove.
6998 (waitstatus.o): New target object file.
6999 * target.h: Do not include target-common.h and
7000 include target/resume.h, target/wait.h and
7001 target/waitstatus.h.
7002
b8e1b30e
LM
70032013-08-13 Luis Machado <lgustavo@codesourcery.com>
7004
7005 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7006 to PTRACE_TYPE_ARG3.
7007 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7008 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7009 PTRACE_TYPE_ARG4.
7010 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7011 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7012
7a60ad40
YQ
70132013-07-27 Jie Zhang <jie@codesourcery.com>
7014 Daniel Jacobowitz <dan@codesourcery.com>
7015 Yao Qi <yao@codesourcery.com>
7016
7017 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7018 (mips-linux-watch.o): New rule.
7019 (mips_linux_watch_h): New variable.
7020 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7021 srv_tgtobj.
7022 * linux-mips-low.c: Include mips-linux-watch.h.
7023 (struct arch_process_info, struct arch_lwp_info): New.
7024 (update_watch_registers_callback): New function.
7025 (mips_linux_new_process, mips_linux_new_thread) New functions.
7026 (mips_linux_prepare_to_resume, mips_insert_point): New
7027 functions.
7028 (mips_remove_point, mips_stopped_by_watchpoint): New
7029 functions.
7030 (rsp_bp_type_to_target_hw_bp_type): New function.
7031 (mips_stopped_data_address): New function.
7032 (the_low_target): Add watchpoint support functions.
7033
de6f69ad
YQ
70342013-07-27 Yao Qi <yao@codesourcery.com>
7035
7036 * i386-low.c: Include break-common.h.
7037 (enum target_hw_bp_type): Remove.
7038
3360c0bf
LM
70392013-07-24 Luis Machado <lgustavo@codesourcery.com>
7040
7041 * Makefile.in (SFILES): /common/target-common.c.
7042 (OBS): Add target-common.o.
7043 (server_h): Add $(srcdir)/../common/target-common.h.
7044 (target-common.o): New target.
7045 * server.c (queue_stop_reply_callback): Free
7046 status string after use.
7047 * target.c (target_waitstatus_to_string): Remove.
7048 * target.h: Include target-common.h.
7049 (resume_kind): Likewise.
7050 (target_waitkind): Likewise.
7051 (target_waitstatus): Likewise.
7052 (TARGET_WNOHANG): Likewise.
7053
bd885420
YQ
70542013-07-04 Yao Qi <yao@codesourcery.com>
7055
7056 * Makefile.in (host_alias): Use @host_noncanonical@.
7057 (target_alias): Use @target_noncanonical@.
7058 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7059 ACX_NONCANONICAL_HOST.
7060 * configure: Regenerated.
7061
7062 Revert:
7063 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7064
7065 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7066 * configure: Rebuild.
7067 * Makefile.in (version_host, version_target): Get from configure.
7068 (version.c): Use $(version_host) and $(version_target).
7069
17ef446e
PA
70702013-07-03 Pedro Alves <palves@redhat.com>
7071
7072 * Makefile.in (config.status): Depend on development.sh.
7073 * acinclude.m4: Include libmcheck.m4.
7074 * configure: Regenerate.
7075
7a9a7487
MG
70762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7077
7078 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7079 attribute inside the parentheses.
7080 (winapi_DebugSetProcessKillOnExit): Ditto.
7081 (winapi_DebugBreakProcess): Ditto.
7082 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7083
49b64de6
MG
70842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7085
7086 * notif.h (notif_event): Add a dummy member to avoid compiler
7087 errors.
7088
d5749ee7
PA
70892013-07-01 Pedro Alves <palves@redhat.com>
7090
7091 * hostio.c (HOSTIO_PATH_MAX): Define.
7092 (require_filename, handle_open, handle_unlink, handle_readlink):
7093 Use it.
7094
d8d2a3ee
PA
70952013-07-01 Pedro Alves <palves@redhat.com>
7096
7097 * server.h: Include "pathmax.h".
7098 * linux-low.c: Don't include sys/param.h.
7099 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7100 MAXPATHLEN.
7101 * win32-low.c: Don't include sys/param.h.
7102 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7103
bc7dea8d
PA
71042013-07-01 Pedro Alves <palves@redhat.com>
7105
7106 * event-loop.c: Don't check HAVE_UNISTD_H before including
7107 <unistd.h>.
7108 * gdbreplay.c: Likewise.
7109 * remote-utils.c: Likewise.
7110 * server.c: Likewise.
7111 * configure.ac: Don't check for unistd.h.
7112 * configure: Regenerate.
7113
d6c2da54
TT
71142013-06-28 Tom Tromey <tromey@redhat.com>
7115
7116 * Makefile.in (version.c): Use version.in, not
7117 common/version.in.
7118
257b6bec
MG
71192013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7120
7121 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7122 * configure: Rebuild.
7123 * Makefile.in (version_host, version_target): Get from configure.
7124 (version.c): Use $(version_host) and $(version_target).
7125
86ebe149
DK
71262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7127
7128 Fix trace-status to output user name without trailing colon.
7129 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7130
f30aa5af
DK
71312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7132
7133 Fix trace-status to output proper start-time and stop-time.
7134 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7135 output start time and stop time in hex as gdb expects.
7136
28a93511
YQ
71372013-06-26 Pedro Alves <pedro@codesourcery.com>
7138
7139 * tracepoint.c (build_traceframe_info_xml): Output trace state
7140 variables present in the trace buffer.
7141
01208463
TT
71422013-06-24 Tom Tromey <tromey@redhat.com>
7143
7144 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7145 create-version.sh.
7146 (version.o): Remove.
7147 * gdbreplay.c: Include version.h.
7148 (version, host_name): Don't declare.
7149 * server.h: Include version.h.
7150 (version, host_name): Don't declare.
7151
760256f9
PA
71522013-06-12 Pedro Alves <palves@redhat.com>
7153
7154 * linux-x86-low.c (linux_is_elf64): Delete global.
7155 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7156 with local linux_pid_exe_is_elf_64_file use.
7157
030031ee
PA
71582013-06-11 Pedro Alves <palves@redhat.com>
7159
7160 * linux-low.c (regset_disabled, disable_regset): New functions.
7161 (regsets_fetch_inferior_registers)
7162 (regsets_store_inferior_registers): Use them.
7163 (initialize_regsets_info); Don't allocate the disabled_regsets
7164 array here.
7165 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7166 comment.
7167
5da6eb0a
PA
71682013-06-11 Pedro Alves <palves@redhat.com>
7169
7170 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7171 xmalloc.
7172
7e5aaa09
PA
71732013-06-11 Pedro Alves <palves@redhat.com>
7174
7175 * linux-x86-low.c (initialize_low_arch): Call
7176 init_registers_x32_avx_linux.
7177
d878444c
JK
71782013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7179
7180 Fix compatibility with Android Bionic.
7181 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7182 it is not empty.
7183
3aee8918
PA
71842013-06-07 Pedro Alves <palves@redhat.com>
7185
5f2b57b5 7186 PR server/14823
3aee8918
PA
7187 * Makefile.in (OBS): Add tdesc.o.
7188 (IPA_OBJS): Add tdesc-ipa.o.
7189 (tdesc-ipa.o): New rule.
7190 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7191 interface.
7192 * linux-low.c (new_inferior): Delete.
7193 (disabled_regsets, num_regsets): Delete.
7194 (linux_add_process): Adjust to set the new per-process
7195 new_inferior flag.
7196 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7197 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7198 was a stop. When calling arch_setup, switch the current inferior
7199 to the thread that got an event.
7200 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7201 (regsets_fetch_inferior_registers)
7202 (regsets_store_inferior_registers): New regsets_info parameter.
7203 Adjust to use it.
7204 (linux_register_in_regsets): New regs_info parameter. Adjust to
7205 use it.
7206 (register_addr, fetch_register, store_register): New usrregs_info
7207 parameter. Adjust to use it.
7208 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7209 parameter regs_info. Adjust to use it.
7210 (linux_fetch_registers): Get the current inferior's regs_info, and
7211 adjust to use it.
7212 (linux_store_registers): Ditto.
7213 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7214 (initialize_low): Don't initialize the target_regsets here. Call
7215 initialize_low_arch.
7216 * linux-low.h (target_regsets): Delete declaration.
7217 (struct regsets_info): New.
7218 (struct usrregs_info): New.
7219 (struct regs_info): New.
7220 (struct process_info_private) <new_inferior>: New field.
7221 (struct linux_target_ops): Delete the num_regs, regmap, and
7222 regset_bitmap fields. New field regs_info.
7223 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7224 * i387-fp.c (num_xmm_registers): Delete.
7225 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7226 calls to new interface.
7227 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7228 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7229 Infer the number of xmm registers from the regcache's target
7230 description.
7231 * i387-fp.h (num_xmm_registers): Delete.
7232 * inferiors.c (add_thread): Don't install the thread's regcache
7233 here.
7234 * proc-service.c (gregset_info): Fetch the current inferior's
7235 regs_info. Adjust to use it.
7236 * regcache.c: Include tdesc.h.
7237 (register_bytes, reg_defs, num_registers)
7238 (gdbserver_expedite_regs): Delete.
7239 (get_thread_regcache): If the thread doesn't have a regcache yet,
7240 create one, instead of aborting gdbserver.
7241 (regcache_invalidate_one): Rename to ...
7242 (regcache_invalidate_thread): ... this.
7243 (regcache_invalidate_one): New.
7244 (regcache_invalidate): Only invalidate registers of the current
7245 process.
7246 (init_register_cache): Add target_desc parameter, and use it.
7247 (new_register_cache): Ditto. Assert the target description has a
7248 non zero registers_size.
7249 (regcache_cpy): Add assertions. Adjust.
7250 (realloc_register_cache, set_register_cache): Delete.
7251 (registers_to_string, registers_from_string): Adjust.
7252 (find_register_by_name, find_regno, find_register_by_number)
7253 (register_cache_size): Add target_desc parameter, and use it.
7254 (free_register_cache_thread, free_register_cache_thread_one)
7255 (regcache_release, register_cache_size): New.
7256 (register_size): Add target_desc parameter, and use it.
7257 (register_data, supply_register, supply_register_zeroed)
7258 (supply_regblock, supply_register_by_name, collect_register)
7259 (collect_register_as_string, collect_register_by_name): Adjust.
7260 * regcache.h (struct target_desc): Forward declare.
7261 (struct regcache) <tdesc>: New field.
7262 (init_register_cache, new_register_cache): Add target_desc
7263 parameter.
7264 (regcache_invalidate_thread): Declare.
7265 (regcache_invalidate_one): Delete declaration.
7266 (regcache_release): Declare.
7267 (find_register_by_number, register_cache_size, register_size)
7268 (find_regno): Add target_desc parameter.
7269 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7270 declarations.
7271 * remote-utils.c: Include tdesc.h.
7272 (outreg, prepare_resume_reply): Adjust.
7273 * server.c: Include tdesc.h.
7274 (gdbserver_xmltarget): Delete declaration.
7275 (get_features_xml, process_serial_event): Adjust.
7276 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7277 declare.
7278 (struct process_info) <tdesc>: New field.
7279 (ipa_tdesc): Declare.
7280 * tdesc.c: New file.
7281 * tdesc.h: New file.
7282 * tracepoint.c: Include tdesc.h.
7283 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7284 (get_context_regcache): Adjust to pass ipa_tdesc down.
7285 (do_action_at_tracepoint): Adjust to get the register cache size
7286 from the context regcache's description.
7287 (traceframe_walk_blocks): Adjust to get the register cache size
7288 from the current trace frame's description.
7289 (traceframe_get_pc): Adjust to get current trace frame's
7290 description and pass it down.
7291 (gdb_collect): Adjust to get the register cache size from the
7292 IPA's description.
7293 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7294 (gdbserver_xmltarget): Delete.
7295 (initialize_low_tracepoint): Set the ipa's target description.
7296 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7297 (initialize_low_tracepoint): Set the ipa's target description.
7298 * linux-x86-low.c: Include tdesc.h.
7299 [__x86_64__] (is_64bit_tdesc): New.
7300 (ps_get_thread_area, x86_get_thread_area): Use it.
7301 (i386_cannot_store_register): Rename to ...
7302 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7303 (i386_cannot_fetch_register): Rename to ...
7304 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7305 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7306 to new interface.
7307 (target_regsets): Rename to ...
7308 (x86_regsets): ... this.
7309 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7310 interface.
7311 (x86_siginfo_fixup): Use is_64bit_tdesc.
7312 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7313 (tdesc_x32_avx_linux, tdesc_x32_linux)
7314 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7315 Declare.
7316 (x86_linux_update_xmltarget): Delete.
7317 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7318 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7319 (AMD64_LINUX_USER64_CS): New.
7320 (x86_linux_read_description): New, based on
7321 x86_linux_update_xmltarget.
7322 (same_process_callback): New.
7323 (x86_arch_setup_process_callback): New.
7324 (x86_linux_update_xmltarget): New.
7325 (x86_regsets_info): New.
7326 (amd64_linux_regs_info): New.
7327 (i386_linux_usrregs_info): New.
7328 (i386_linux_regs_info): New.
7329 (x86_linux_regs_info): New.
7330 (x86_arch_setup): Reimplement.
7331 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7332 (x86_emit_ops): Ditto.
7333 (the_low_target): Adjust. Install x86_linux_regs_info,
7334 x86_cannot_fetch_register, and x86_cannot_store_register.
7335 (initialize_low_arch): New.
7336 * linux-ia64-low.c (tdesc_ia64): Declare.
7337 (ia64_fetch_register): Adjust.
7338 (ia64_usrregs_info, regs_info): New globals.
7339 (ia64_regs_info): New function.
7340 (the_low_target): Adjust.
7341 (initialize_low_arch): New function.
7342 * linux-sparc-low.c (tdesc_sparc64): Declare.
7343 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7344 Adjust.
7345 (sparc_arch_setup): New function.
7346 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7347 (the_low_target): Adjust.
7348 (initialize_low_arch): New function.
7349 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7350 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7351 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7352 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7353 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7354 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7355 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7356 (tdesc_powerpc_isa205_vsx64l): Declare.
7357 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7358 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7359 (ppc_set_pc, ppc_get_hwcap): Adjust.
7360 (ppc_usrregs_info): Forward declare.
7361 (!__powerpc64__) ppc_regmap_adjusted: New global.
7362 (ppc_arch_setup): Adjust to the current process'es target
7363 description.
7364 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7365 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7366 (ppc_store_evrregset): Adjust.
7367 (target_regsets): Rename to ...
7368 (ppc_regsets): ... this, and make static.
7369 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7370 (ppc_regs_info): New function.
7371 (the_low_target): Adjust.
7372 (initialize_low_arch): New function.
7373 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7374 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7375 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7376 (tdesc_s390x_linux64v2): Declare.
7377 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7378 (s390_fill_gregset, s390_store_last_break): Adjust.
7379 (target_regsets): Rename to ...
7380 (s390_regsets): ... this, and make static.
7381 (s390_get_pc, s390_set_pc): Adjust.
7382 (s390_get_hwcap): New target_desc parameter, and use it.
7383 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7384 (s390_arch_setup): Adjust to set the current process'es target
7385 description. Don't adjust the regmap.
7386 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7387 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7388 (regs_info_3264): New globals.
7389 (s390_regs_info): New function.
7390 (the_low_target): Adjust.
7391 (initialize_low_arch): New function.
7392 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7393 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7394 [__mips64] (init_registers_mips_linux)
7395 (init_registers_mips_dsp_linux): Delete defines.
7396 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7397 (have_dsp): New global.
7398 (mips_read_description): New, based on mips_arch_setup.
7399 (mips_arch_setup): Reimplement.
7400 (get_usrregs_info): New function.
7401 (mips_cannot_fetch_register, mips_cannot_store_register)
7402 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7403 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7404 (target_regsets): Rename to ...
7405 (mips_regsets): ... this, and make static.
7406 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7407 (dsp_regs_info, regs_info): New globals.
7408 (mips_regs_info): New function.
7409 (the_low_target): Adjust.
7410 (initialize_low_arch): New function.
7411 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7412 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7413 Declare.
7414 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7415 (arm_read_description): New, with bits factored from
7416 arm_arch_setup.
7417 (arm_arch_setup): Reimplement.
7418 (target_regsets): Rename to ...
7419 (arm_regsets): ... this, and make static.
7420 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7421 (arm_regs_info): New function.
7422 (the_low_target): Adjust.
7423 (initialize_low_arch): New function.
7424 * linux-m68k-low.c (tdesc_m68k): Declare.
7425 (target_regsets): Rename to ...
7426 (m68k_regsets): ... this, and make static.
7427 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7428 (m68k_regs_info): New function.
7429 (m68k_arch_setup): New function.
7430 (the_low_target): Adjust.
7431 (initialize_low_arch): New function.
7432 * linux-sh-low.c (tdesc_sharch): Declare.
7433 (target_regsets): Rename to ...
7434 (sh_regsets): ... this, and make static.
7435 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7436 (sh_regs_info, sh_arch_setup): New functions.
7437 (the_low_target): Adjust.
7438 (initialize_low_arch): New function.
7439 * linux-bfin-low.c (tdesc_bfin): Declare.
7440 (bfin_arch_setup): New function.
7441 (bfin_usrregs_info, regs_info): New globals.
7442 (bfin_regs_info): New function.
7443 (the_low_target): Adjust.
7444 (initialize_low_arch): New function.
7445 * linux-cris-low.c (tdesc_cris): Declare.
7446 (cris_arch_setup): New function.
7447 (cris_usrregs_info, regs_info): New globals.
7448 (cris_regs_info): New function.
7449 (the_low_target): Adjust.
7450 (initialize_low_arch): New function.
7451 * linux-cris-low.c (tdesc_crisv32): Declare.
7452 (cris_arch_setup): New function.
7453 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7454 (cris_regs_info): New function.
7455 (the_low_target): Adjust.
7456 (initialize_low_arch): New function.
7457 * linux-m32r-low.c (tdesc_m32r): Declare.
7458 (m32r_arch_setup): New function.
7459 (m32r_usrregs_info, regs_info): New globals.
7460 (m32r_regs_info): Adjust.
7461 (initialize_low_arch): New function.
7462 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7463 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7464 (tic6x_usrregs_info): Forward declare.
7465 (tic6x_read_description): New function, based on ...
7466 (tic6x_arch_setup): ... this. Reimplement.
7467 (target_regsets): Rename to ...
7468 (tic6x_regsets): ... this, and make static.
7469 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7470 (tic6x_regs_info): New function.
7471 (the_low_target): Adjust.
7472 (initialize_low_arch): New function.
7473 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7474 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7475 (target_regsets): Rename to ...
7476 (xtensa_regsets): ... this, and make static.
7477 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7478 globals.
7479 (xtensa_arch_setup, xtensa_regs_info): New functions.
7480 (the_low_target): Adjust.
7481 (initialize_low_arch): New function.
7482 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7483 (nios2_arch_setup): Set the current process'es tdesc.
7484 (target_regsets): Rename to ...
7485 (nios2_regsets): ... this.
7486 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7487 (nios2_regs_info): New function.
7488 (the_low_target): Adjust.
7489 (initialize_low_arch): New function.
a261b8f5
PA
7490 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7491 (aarch64_arch_setup): Set the current process'es tdesc.
7492 (target_regsets): Rename to ...
7493 (aarch64_regsets): ... this.
7494 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7495 (aarch64_regs_info): New function.
7496 (the_low_target): Adjust.
7497 (initialize_low_arch): New function.
3aee8918
PA
7498 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7499 globals.
7500 (target_regsets): Rename to ...
7501 (tile_regsets): ... this.
7502 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7503 (tile_regs_info): New function.
7504 (tile_arch_setup): Set the current process'es tdesc.
7505 (the_low_target): Adjust.
7506 (initialize_low_arch): New function.
7507 * spu-low.c (tdesc_spu): Declare.
7508 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7509 * win32-arm-low.c (tdesc_arm): Declare.
7510 (arm_arch_setup): New function.
7511 (the_low_target): Install arm_arch_setup instead of
7512 init_registers_arm.
7513 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7514 (init_windows_x86): Rename to ...
7515 (i386_arch_setup): ... this. Set `win32_tdesc'.
7516 (the_low_target): Adjust.
7517 * win32-low.c (win32_tdesc): New global.
7518 (child_add_thread): Don't create the thread cache here.
7519 (do_initial_child_stuff): Set the new process'es tdesc.
7520 * win32-low.h (struct target_desc): Forward declare.
7521 (win32_tdesc): Declare.
7522 * lynx-i386-low.c (tdesc_i386): Declare global.
7523 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7524 * lynx-low.c (lynx_tdesc): New global.
7525 (lynx_add_process): Set the new process'es tdesc.
7526 * lynx-low.h (struct target_desc): Forward declare.
7527 (lynx_tdesc): Declare global.
7528 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7529 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7530 * nto-low.c (nto_tdesc): New global.
7531 (do_attach): Set the new process'es tdesc.
7532 * nto-low.h (struct target_desc): Forward declare.
7533 (nto_tdesc): Declare.
7534 * nto-x86-low.c (tdesc_i386): Declare.
7535 (nto_x86_arch_setup): Set `nto_tdesc'.
7536
b1fbec62
GB
75372013-06-04 Gary Benson <gbenson@redhat.com>
7538
7539 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7540 to qSupported response when appropriate.
7541 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7542 with nonzero-length annex.
7543 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7544 arguments supplied in annex.
7545
d1ec4ce7
DE
75462013-05-31 Doug Evans <dje@google.com>
7547
ac44adcb 7548 PR server/15594
d1ec4ce7
DE
7549 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7550 64 bits in 64-cross-32 environment.
7551
9b25f2d3
PA
75522013-05-28 Pedro Alves <palves@redhat.com>
7553
7554 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7555 (aarch64-without-fpu.c): Delete rule.
7556 * configure.srv (aarch64*-*-linux*): Remove references to
7557 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7558 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7559 declaration.
7560
6740dc9c
PA
75612013-05-24 Pedro Alves <palves@redhat.com>
7562
7563 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7564 instead of strchr/decode_address. Error if the range isn't split
7565 with a ','. Don't assume there's be a ':' in the action.
7566
c2d6af84
PA
75672013-05-23 Yao Qi <yao@codesourcery.com>
7568 Pedro Alves <palves@redhat.com>
7569
7570 * linux-low.c (lwp_in_step_range): New function.
7571 (linux_wait_1): If the thread was range stepping and stopped
7572 outside the stepping range, report the stop to GDB. Otherwise,
7573 continue stepping. Add range stepping debug output.
7574 (linux_set_resume_request): Copy the step range from the resume
7575 request to the lwp.
7576 (linux_supports_range_stepping): New.
7577 (linux_target_ops) <supports_range_stepping>: Set to
7578 linux_supports_range_stepping.
7579 * linux-low.h (struct linux_target_ops)
7580 <supports_range_stepping>: New field.
7581 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7582 * linux-x86-low.c (x86_supports_range_stepping): New.
7583 (the_low_target) <supports_range_stepping>: Set to
7584 x86_supports_range_stepping.
7585 * server.c (handle_v_cont): Handle 'r' action.
7586 (handle_v_requests): Append ";r" if the target supports range
7587 stepping.
7588 * target.h (struct thread_resume) <step_range_start,
7589 step_range_end>: New fields.
7590 (struct target_ops) <supports_range_stepping>:
7591 New field.
7592 (target_supports_range_stepping): New macro.
7593
58794e1a
JB
75942013-05-17 Joel Brobecker <brobecker@adacore.com>
7595
7596 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7597 confusion in comment.
7598
d631c5a7
JB
75992013-05-17 Joel Brobecker <brobecker@adacore.com>
7600
7601 * lynx-low.c (struct process_info_private): New type.
7602 (lynx_add_process): New function.
7603 (lynx_create_inferior, lynx_attach): Replace calls to
7604 add_process by calls to lynx_add_process.
7605 (lynx_resume): If PTID is null, then try using
7606 current_process()->private->last_wait_event_ptid.
7607 Add comments.
7608 (lynx_clear_inferiors): Delete. The contents of that function
7609 has been inlined in lynx_mourn;
7610 (lynx_wait_1): Save the ptid in the process's private data.
7611 (lynx_mourn): Free the process' private data. Replace call
7612 to lynx_clear_inferiors by call to clear_inferiors.
7613
96f7a20f
YQ
76142013-05-17 Yao Qi <yao@codesourcery.com>
7615
7616 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7617 the right place.
7618
db0dfaa0
LM
76192013-05-16 Luis Machado <lgustavo@codesourcery.com>
7620
7621 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7622 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7623 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7624 PT_TEXT_END_ADDR guards. Update comments.
7625 (linux_target_op) <read_offsets>: Conditionally define to
7626 linux_read_offsets if the target is UCLIBC and if it defines
7627 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7628
68f5f838
SL
76292013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7630 Andrew Jenner <andrew@codesourcery.com>
7631
7632 * Makefile.in (SFILES): Add linux-nios2-low.c.
7633 (clean): Add action to delete nios2-linux.c.
7634 (nios2-linux.c): New rule.
7635 * configure.srv: Add nios2*-*-linux*.
7636 * linux-nios2-low.c: New.
7637
1ebff1fd
HAQ
76382013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7639
7640 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7641
f6150862
HZ
76422013-04-25 Hui Zhu <hui@codesourcery.com>
7643
7644 PR gdb/15186
f6150862
HZ
7645 * ax.c (ax_printf): Add fflush.
7646
614c279d
TT
76472013-04-22 Tom Tromey <tromey@redhat.com>
7648
7649 * Makefile.in (SFILES): Add filestuff.c.
7650 (OBS): Add filestuff.o.
7651 (filestuff.o): New target.
7652 * config.in, configure: Rebuild.
7653 * configure.ac: Check for fdwalk, pipe2.
7654
7d4e5717
PA
76552013-04-17 Pedro Alves <palves@redhat.com>
7656
7657 * configure.ac (USE_THREAD_DB): Delete variable.
7658 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7659 Don't AC_SUBST USE_THREAD_DB.
7660 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7661 * config.in, configure: Regenerate.
7662
d5c93e41
PA
76632013-04-16 Pedro Alves <palves@redhat.com>
7664
7665 * linux-low.h (struct lwp_info) <thread_known>: Move under
7666 the USE_THREAD_DB #ifdef.
7667
04f5fe89
PA
76682013-04-16 Pedro Alves <palves@redhat.com>
7669
7670 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7671 (linux-low.o): Delete rule.
7672 * linux-low.h: Always include "gdb_thread_db.h" instead of
7673 conditionally including thread_db.h.
7674 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7675 HAVE_THREAD_DB_H.
7676
480b27bf
JK
76772013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7678
7679 * Makefile.in (install-only): Fix make install regression.
7680
43662968
JK
76812013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7682
7683 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7684 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7685 installation.
7686 * gdbserver.1: Remove.
7687
3e74e146
PA
76882013-03-22 Pedro Alves <palves@redhat.com>
7689
7690 * linux-low.c (handle_extended_wait): Don't call
7691 linux_enable_event_reporting.
7692
a8347a2a
TT
76932013-03-15 Tony Theodore <tonyt@logyst.com>
7694
7695 PR build/9098:
7696 * Makefile.in (SHELL): Use @SHELL@.
7697
eeb56fa7
SDJ
76982013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7699
7700 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7701 compiler warning.
7702
4fa7e2ff
JB
77032013-03-13 Joel Brobecker <brobecker@adacore.com>
7704
7705 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7706 Remove extraneous NULL element.
7707
8ddb1965
YQ
77082013-03-13 Yao Qi <yao@codesourcery.com>
7709
7710 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7711 'V' block in trace frame.
7712
9accd112
MM
77132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7714
7715 * target.h (struct target_ops): Add btrace ops.
7716 (target_supports_btrace): New macro.
7717 (target_enable_btrace): New macro.
7718 (target_disable_btrace): New macro.
7719 (target_read_btrace): New macro.
7720 * gdbthread.h (struct thread_info): Add btrace field.
7721 * server.c: Include btrace-common.h.
7722 (handle_btrace_general_set): New function.
7723 (handle_btrace_enable): New function.
7724 (handle_btrace_disable): New function.
7725 (handle_general_set): Call handle_btrace_general_set.
7726 (handle_qxfer_btrace): New function.
7727 (struct qxfer qxfer_packets[]): Add btrace entry.
7728 * inferiors.c (remove_thread): Disable btrace.
7729 * linux-low: Include linux-btrace.h.
7730 (linux_low_enable_btrace): New function.
7731 (linux_low_read_btrace): New function.
7732 (linux_target_ops): Add btrace ops.
7733 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7734 Add srv_linux_btrace=yes.
7735 (x86_64-*-linux*): Add linux-btrace.o.
7736 Add srv_linux_btrace=yes.
7737 * configure.ac: Define HAVE_LINUX_BTRACE.
7738 * config.in: Regenerated.
7739 * configure: Regenerated.
7740
5cc22e4c
MM
77412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7742
7743 * server.c (handle_qxfer): Preserve error message if -3 is
7744 returned.
7745 (qxfer): Document the -3 return value.
7746
7c97f91e
MM
77472013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7748
7749 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7750 (linux_btrace_h): New variable.
7751 (linux-btrace.o): New rule.
7752
be9a119c 77532013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7754 Hafiz Abid Qadeer <abidh@codesourcery.com>
7755
7756 * tracepoint.c (trace_buffer_size): New global.
7757 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7758 (init_trace_buffer): Change to one-argument function. Allocate
7759 trace buffer memory.
7760 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7761 handle QTBuffer:size packet.
7762 (cmd_bigqtbuffer_size): New function.
7763 (initialize_tracepoint): Call init_trace_buffer with
7764 DEFAULT_TRACE_BUFFER_SIZE.
7765 * server.c (handle_query): Add QTBuffer:size in the
7766 supported packets.
7767
e64f7499
YQ
77682013-03-07 Yao Qi <yao@codesourcery.com>
7769
7770 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7771 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7772 of -1.
7773 (cmd_qtsp): Adjust condition. Do post increment.
7774 Set cur_action and cur_step_action back to 0.
7775
f0ae6fc3
PA
77762013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7777
7778 PR server/15236
7779 * linux-low.c (linux_write_memory): Return early success if LEN is
7780 zero.
7781
b5b0b0af
CV
77822013-03-05 Corinna Vinschen <vinschen@redhat.de>
7783
334ad4a8 7784 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7785
589bc927
TT
77862013-02-28 Tom Tromey <tromey@redhat.com>
7787
7788 * configure.ac: Invoke AC_SYS_LARGEFILE.
7789 * configure, config.in: Rebuild.
7790
dfe07582
CV
77912013-02-28 Corinna Vinschen <vinschen@redhat.com>
7792
7793 * win32-low.c: Throughout, fix format strings and casts of
7794 printf-like functions to avoid type related warnings on all
7795 platforms.
7796 (get_child_debug_event): Print dwDebugEventCode as hex since
7797 that's how it's usually documented.
7798
736cd585
YQ
77992013-02-28 Yao Qi <yao@codesourcery.com>
7800
7801 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7802 pulongest.
7803
e1f58301
JW
78042013-02-27 Jiong Wang <jiwang@tilera.com>
7805
7806 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7807 (reg-tilegx32.c): New rule.
7808 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7809 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7810 different register info initializer according to elf class.
7811 (init_registers_tilgx32): New function. The tilegx32 register info
7812 initializer.
7813 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7814 (tile_store_gregset): Likewise.
7815
d171ca78
YQ
78162013-02-27 Yao Qi <yao@codesourcery.com>
7817
7818 * server.c (process_point_options): Print debug message when
7819 debug_threads is true.
7820
282bbdf3
YQ
78212013-02-26 Yao Qi <yao@codesourcery.com>
7822
7823 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7824
aca22551
PA
78252013-02-19 Pedro Alves <palves@redhat.com>
7826 Kai Tietz <ktietz@redhat.com>
7827
7828 PR gdb/15161
7829
7830 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7831 instead of strtoul to extract address from packet.
7832 (process_serial_event) <'z'>: Likewise.
7833
4f3cee1c
YQ
78342013-02-18 Yao Qi <yao@codesourcery.com>
7835
7836 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7837
8e1d55a3
PA
78382013-02-14 Pedro Alves <palves@redhat.com>
7839
7840 Plug memory leak.
7841
7842 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7843 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7844
458820da
PA
78452013-02-14 Pedro Alves <palves@redhat.com>
7846
7847 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7848
baea0dae
PA
78492013-02-14 Pedro Alves <palves@redhat.com>
7850
7851 * tracepoint.c (save_string): Delete.
7852 (add_tracepoint_action): Use savestring instead of save_string.
7853
0b1afbb3
PA
78542013-02-12 Pedro Alves <palves@redhat.com>
7855
7856 * linux-xtensa-low.c: Ditto.
7857 * xtensa-xtregs.c: Ditto.
7858
8a4ac37e
PA
78592013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7860
7861 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7862 thread_db.
7863
148de6bb
MS
78642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7865
7866 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7867 aarch64_num_wp_regs and aarch64_num_bp_regs to
7868 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7869
55fac6e0
MS
78702013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7871
7872 * linux-aarch64-low.c (ps_get_thread_area): Replace
7873 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7874
176eb98c
MS
78752013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7876 Marcus Shawcroft <marcus.shawcroft@arm.com>
7877 Nigel Stephens <nigel.stephens@arm.com>
7878 Yufeng Zhang <yufeng.zhang@arm.com>
7879
7880 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7881 (aarch64.c, aarch64-without-fpu.c): New targets.
7882 * configure.srv (aarch64*-*-linux*): New.
7883 * linux-aarch64-low.c: New file.
7884
56f7af9c
MS
78852013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7886
43aaf8b6 7887 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7888 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7889 (dequeue_one_deferred_signal, linux_resume_one_thread)
7890 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7891 (linux_tracefork_grandchild, linux_test_for_tracefork)
7892 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7893 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7894 where the argument is 0.
7895
60f662b0
YQ
78962013-01-25 Yao Qi <yao@codesourcery.com>
7897
7898 * event-loop.c: Include "queue.h".
7899 (gdb_event_p): New typedef.
7900 (struct gdb_event) <next_event>: Remove.
7901 (event_queue): Change to QUEUE(gdb_event_p).
7902 (async_queue_event): Remove.
7903 (gdb_event_xfree): New.
7904 (initialize_event_loop): New.
7905 (process_event): Use API from QUEUE.
7906 (wait_for_event): Likewise.
7907 * server.c (main): Call initialize_event_loop.
7908 * server.h (initialize_event_loop): Declare.
7909
5ae4861a
YQ
79102013-01-18 Yao Qi <yao@codesourcery.com>
7911
7912 * ax.h (struct eval_agent_expr_context): New.
7913 (gdb_eval_agent_expr): Update declaration.
7914 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7915 TFRAME. Add new argument CTX.
7916 * server.h (struct eval_agent_expr_context): Declare.
7917 (agent_mem_read, agent_tsv_read): Update declaration.
7918 (agent_mem_read_string): Likewise.
7919 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7920 (add_traceframe_block): Add new argument TPOINT.
7921 Increase TPOINT->traceframe_usage.
7922 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7923 eval_tracepoint_agent_expr.
7924 (condition_true_at_tracepoint): Likewise.
7925 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7926 (agent_mem_read_string, agent_tsv_read): Likewise.
7927
85e00e85
YQ
79282013-01-16 Yao Qi <yao@codesourcery.com>
7929
7930 * linux-low.c (linux_resume_one_lwp): Don't check
7931 'lwp->bp_reinsert != 0'.
7932
4039cf45
JB
79332013-01-07 Joel Brobecker <brobecker@adacore.com>
7934 Pedro Alves <palves@redhat.com>
7935
7936 * lynx-low.c (ptrace_request_to_str): Define a temporary
7937 macro and use it to simplify this function's implementation.
7938
9044dee2
JB
79392013-01-07 Joel Brobecker <brobecker@adacore.com>
7940
7941 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7942 sets errno.
7943
e6352c8f
JB
79442013-01-07 Joel Brobecker <brobecker@adacore.com>
7945
7946 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7947
50681a27
JB
79482013-01-07 Joel Brobecker <brobecker@adacore.com>
7949
7950 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7951
3f6e77ef
JB
79522013-01-07 Joel Brobecker <brobecker@adacore.com>
7953
7954 * lynx-low.c (lynx_resume): Use the resume_info parameter
7955 to determine the ptid for the lynx_ptrace call, unless
7956 it is equal to minus_one_ptid, in which case we use the
7957 ptid of the current_inferior.
7958 (lynx_wait_1): After having received a thread create/exit
7959 event, resume the inferior's execution using the signaling
7960 thread's ptid, rather than the old ptid.
7961
7fda33ae
JB
79622013-01-07 Joel Brobecker <brobecker@adacore.com>
7963
7964 * lynx-low.c (lynx_resume): Delete variable ret.
7965
b9786c74
JB
79662013-01-01 Joel Brobecker <brobecker@adacore.com>
7967
7968 * gdbreplay.c (gdbreplay_version): Update copyright year.
7969 * server.c (gdbserver_version): Likewise.
7970
8b93d60f
JB
79712012-12-17 Joel Brobecker <brobecker@adacore.com>
7972
7973 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7974 new thread.
7975
037335a7
JB
79762012-12-17 Joel Brobecker <brobecker@adacore.com>
7977
7978 * lynx-low.c (ptrace_request_to_str): Add handling for
7979 PTRACE_GETTRACESIG.
7980
52d4cbd8
JB
79812012-12-17 Joel Brobecker <brobecker@adacore.com>
7982
7983 * lynx-low.c (lynx_attach): Delete variable new_process.
7984
ab8f6ca9
JB
79852012-12-17 Joel Brobecker <brobecker@adacore.com>
7986
7987 * lynx-low.c (lynx_create_inferior): Delete variable
7988 new_process.
7989
78cbc024
JB
79902012-12-17 Joel Brobecker <brobecker@adacore.com>
7991
7992 * lynx-low.c (ptrace_request_to_str): Do not handle
7993 PTRACE_GETTHREADLIST if this macro does not exist.
7994
14a00470
YQ
79952012-12-15 Yao Qi <yao@codesourcery.com>
7996
7997 * Makefile.in (OBS): Add notif.o.
7998 * notif.c, notif.h: New.
7999 * server.c: Include "notif.h".
8000 (struct vstop_notif) <next>: Remove.
8001 <base>: New field.
8002 (queue_stop_reply): Update.
8003 (push_event, send_next_stop_reply): Remove.
8004 (discard_queued_stop_replies): Update.
8005 (notif_stop): New variable.
8006 (handle_v_stopped): Remove.
8007 (handle_v_requests): Don't call handle_v_stopped. Call
8008 handle_ack_notif instead.
8009 (queue_stop_reply_callback): Call notif_event_enque instead
8010 of queue_stop_reply.
8011 (handle_status): Don't call send_next_stop_reply, call
8012 notif_write_event instead.
8013 (kill_inferior_callback): Likewise.
8014 (detach_or_kill_inferior_callback): Likewise.
8015 (main): Call initialize_notif.
8016 (process_serial_event): Call QUEUE_is_empty.
8017 (handle_target_event): Call notif_push instead of push event.
8018 * server.h (push_event): Remove declaration.
8019
61c125b9
TT
80202012-12-10 Tom Tromey <tromey@redhat.com>
8021
8022 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8023 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8024 macros.
8025 (.c.o): Rewrite.
8026 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8027 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8028 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8029 (amd64-linux-ipa.o, ax.o): Rewrite.
8030 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8031 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8032 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8033 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8034 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8035 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8036 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8037 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8038 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8039 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8040 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8041 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8042 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8043 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8044 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8045 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8046 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8047 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8048 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8049 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8050 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8051 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8052 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8053 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8054 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8055 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8056 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8057 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8058 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8059 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8060 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8061 (reg-tilegx.o): Remove.
8062 (all_object_files): New macro.
8063 Include .deps files.
8064 * aclocal.m4, configure: Rebuild.
8065 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8066 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8067 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8068
e90e9ad9
TT
80692012-12-05 Tom Tromey <tromey@redhat.com>
8070
8071 PR gdb/14917:
8072 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8073
02d403bf 80742012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8075
8076 * configure.ac: Check for linux/perf_event.h.
8077 * config.in: Regenerated.
8078 * configure: Regenerated.
8079
0270a750
PA
80802012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8081
8082 * hostio.c (handle_readlink): Decrease buffer size
8083 parameter passed to readlink by one byte.
8084
8c29b58e
YQ
80852012-11-26 Yao Qi <yao@codesourcery.com>
8086
8087 * configure.ac (build_warnings): Append '-Wempty-body'.
8088 * configure: Regenerated.
8089 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8090 body.
8091
8bdce1ff
PM
80922012-11-15 Pierre Muller <muller@sourceware.org>
8093
8094 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8095 * config.in: Regenerate.
8096 * configure: Regenerate.
8097 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8098 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8099 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8100 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8101 header.
8102 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8103 instead of <sys/wait.h> header.
8104 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8105
02d403bf 81062012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8107
8108 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8109 (various make rules): Remove -DGDBSERVER
8110
fbd5db48
YQ
81112012-11-09 Yao Qi <yao@codesourcery.com>
8112
8113 * spu-low.c (current_ptid): Move it to ..
8114 * gdbthread.h: ... here. New.
8115 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8116 * server.c (myresume, process_serial_event): Likewise.
8117 * thread-db.c (thread_db_find_new_threads): Likewise.
8118 * tracepoint.c (run_inferior_command): Likewise.
8119
b3dc46ff
AB
81202012-10-01 Andrew Burgess <aburgess@broadcom.com>
8121
8122 * server.c (handle_search_memory_1): Include access length in
8123 warning message.
8124
07c04788
HPN
81252012-09-05 Michael Brandt <michael.brandt@axis.com>
8126
8127 * linux-crisv32-low.c: Fix compile errors.
8128
918d227b
YQ
81292012-09-04 Yao Qi <yao@codesourcery.com>
8130
8131 * tracepoint.c (cmd_qtsv): Adjust debug message.
8132 Don't check CUR_TPOINT.
8133
18c1b81a
YQ
81342012-08-28 Yao Qi <yao@codesourcery.com>
8135
8136 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8137 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8138 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8139 Remove declarations of xmalloc, xreallloc, xstrdup and
8140 freeargv.
8141 * Makefile.in (libiberty_h): New.
8142 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8143 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8144
dc82f37b
YQ
81452012-08-23 Yao Qi <yao@codesourcery.com>
8146
8147 * server.h: Remove declaration of 'xsnprintf'.
8148
406b1477
KS
81492012-08-22 Keith Seitz <keiths@redhat.com>
8150
8151 * server.h: Include build-gnulib-gbserver/config.h.
8152 * gdbreplay.c: Likewise.
8153
e6712ff1
DE
81542012-08-08 Doug Evans <dje@google.com>
8155
8156 * Makefile.in (SFILES): Add gdb_vecs.c.
8157 (OBS): Add gdb_vecs.o.
8158 (gdb_vecs_h, host_defs_h): New variables.
8159 (thread-db.o): Add $(gdb_vecs_h) dependency.
8160 (gdb_vecs.o): New rule.
8161 * thread-db.c: #include "gdb_vecs.h".
8162 (thread_db_load_search): Use a vector to iterate over path elements.
8163 Handle text appearing after "$pdir".
8164
8165 * configure.ac: Add check for strstr.
8166 * config.in: Regenerate.
8167 * configure: Regenerate.
8168
7c3270ae
UW
81692012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8170
8171 * hostio.c (handle_pread): If pread fails, fall back to attempting
8172 lseek/read.
8173 (handle_pwrite): Likewise for pwrite.
8174
b62e2b27
UW
81752012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8176
8177 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8178 between unsupported TYPE and unimplementable ADDR/LEN combination.
8179 (arm_insert_point): Act on new return value.
8180
78a99e91
PA
81812012-07-31 Pedro Alves <palves@redhat.com>
8182
8183 * server.c (process_point_options): Only skip tokens if we find
8184 one that is unrecognized. Don't treat 'X' specially while
8185 skipping unrecognized tokens.
8186
fcf303ab
UW
81872012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8188
8189 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8190 to 4-byte-align HW breakpoint addresses for Thumb.
8191
7255706c
YQ
81922012-07-27 Yao Qi <yao@codesourcery.com>
8193
8194 PR remote/14161.
8195
8196 * server.h: Declare gdb_agent_about_to_close.
8197 * target.c (kill_inferior): Include "agent.h".
8198 New. Send command 'kill'.
8199 * target.h (kill_inferior): Removed macro.
8200 * tracepoint.c (gdb_agent_about_to_close): New.
8201 (gdb_agent_helper_thread): Handle command 'close'.
8202 Wait endlessly until the inferior stops.
8203 Install gdb_agent_remove_socket to atexit hook.
8204 (agent_socket_name): New static variable.
8205 (gdb_agent_socket_init): Replace local variable 'name' with
8206 'agent_socket_name'.
8207 (gdb_agent_remove_socket): New.
8208
5a3f286f
YQ
82092012-07-27 Yao Qi <yao@codesourcery.com>
8210
8211 * server.c (process_point_options): Stop at 'X' when parsing.
8212
961bd387
ME
82132012-07-19 Michael Eager <eager@eagercon.com>
8214
a261b8f5 8215 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8216 to hw_execute.
8217 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8218 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8219 hardware breakpoint.
8220
aa7c7447
JK
82212012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8222
8223 * gdbserver/linux-low.c (initialize_low): Call
8224 linux_ptrace_init_warnings.
8225
7f216e7c
DE
82262012-07-02 Doug Evans <dje@google.com>
8227
8228 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8229 pointer to int.
8230
d3ce09f5
SS
82312012-07-02 Stan Shebs <stan@codesourcery.com>
8232
8233 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8234 (ax.o): Add it to build rule.
8235 (ax-ipa.o): Ditto.
8236 (OBS): Add format.o.
8237 (IPA_OBS): Add format.o.
8238 * server.c (handle_query): Claim support for breakpoint commands.
8239 (process_point_options): Add command case.
8240 (process_serial_event): Leave running if there are printfs in
8241 effect.
8242 * mem-break.h (any_persistent_commands): Declare.
8243 (add_breakpoint_commands): Declare.
8244 (gdb_no_commands_at_breakpoint): Declare.
8245 (run_breakpoint_commands): Declare.
8246 * mem-break.c (struct point_command_list): New struct.
8247 (struct breakpoint): New field command_list.
8248 (any_persistent_commands): New function.
8249 (add_commands_to_breakpoint): New function.
8250 (add_breakpoint_commands): New function.
8251 (gdb_no_commands_at_breakpoint): New function.
8252 (run_breakpoint_commands): New function.
8253 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8254 locally.
8255 * ax.c: Include format.h.
8256 (ax_printf): New function.
8257 (gdb_eval_agent_expr): Add printf opcode.
8258
2f8f6aed
YQ
82592012-06-13 Yao Qi <yao@codesourcery.com>
8260
8261 * server.c (start_inferior): Remove duplicated writes to fields
8262 'last_resume_kind' and 'last_status' of 'current_inferior'.
8263
0c9070b3
YQ
82642012-06-12 Yao Qi <yao@codesourcery.com>
8265 Pedro Alves <palves@redhat.com>
8266
8267 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8268 comment.
8269 * server.c (handle_v_cont): Extend comment.
8270
c52daf70
YQ
82712012-06-11 Yao Qi <yao@codesourcery.com>
8272
8273 * linux-low.c (linux_attach): Add 'static'.
8274
d38bbb0a
YQ
82752012-06-06 Yao Qi <yao@codesourcery.com>
8276
8277 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8278
89dc0afd
JK
82792012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8280
8281 Fix gcc -flto compilation warning.
8282 * server.c (main): Make variable multi_mode and attach volatile.
8283
75f62ce7
TJB
82842012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8285
8286 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8287 if the platform doesn't know about it.
8288
65f479b6
PA
82892012-05-30 Jeff Kenton <jkenton@tilera.com>
8290
8291 * Makefile.in (SFILES): Add linux-tile-low.c.
8292 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8293 * configure.srv: Handle tilegx-*-linux*.
8294 * linux-tile-low.c: New file.
8295
0c5bf5a9
JK
82962012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8297
8298 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8299
a493e3e2
PA
83002012-05-24 Pedro Alves <palves@redhat.com>
8301
8302 PR gdb/7205
8303
43aaf8b6 8304 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8305
2ea28649
PA
83062012-05-24 Pedro Alves <palves@redhat.com>
8307
8308 PR gdb/7205
8309
8310 Replace target_signal with gdb_signal throughout.
8311
8d409d16
MR
83122012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8313
8314 * linux-low.c (linux_store_registers): Avoid the copying sequence
8315 when no data has been retrieved by ptrace.
8316
23512c01
MGD
83172012-05-22 Will Deacon <will.deacon@arm.com>
8318
8319 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8320 Include asm/ptrace.h.
8321 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8322 already defined.
8323
4934b29e
MR
83242012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8325
8326 * linux-low.c (linux_store_registers): Don't re-retrieve data
8327 with ptrace that has already been obtained from /proc. Always
8328 copy any data retrieved with ptrace to the buffer supplied.
8329
bde24c0a
PA
83302012-05-11 Yao Qi <yao@codesourcery.com>
8331 Pedro Alves <palves@redhat.com>
8332
8333 * linux-low.c (enum stopping_threads_kind): New.
8334 (stopping_threads): Change type to `enum stopping_threads_kind'.
8335 (handle_extended_wait): If stopping and suspending threads, leave
8336 the new_lwp suspended too.
8337 (linux_wait_for_event): Adjust.
8338 (stop_all_lwps): Set `stopping_threads' to
8339 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8340 whether we're suspending threads or just stopping them. Assert no
8341 recursion happens.
8342
623b6bdf
YQ
83432012-04-29 Yao Qi <yao@codesourcery.com>
8344
8345 * server.h: Move some code to ...
8346 * gdbthread.h: ... here. New.
8347 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8348 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8349 (nto-low.o, win32-low.o): Likewise.
8350 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8351 * regcache.c, remote-utils.c, server.c: Likewise.
8352 * target.c, tracepoint.c, win32-low.c: Likewise.
8353
f15f9948
TJB
83542012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8355
8356 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8357 (PTRACE_ARG4_TYPE): Likewise.
8358 (PTRACE_XFER_TYPE): Likewise.
8359 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8360 ptrace to PTRACE_ARG3_TYPE.
8361 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8362 (PTRACE_ARG4_TYPE): Likewise.
8363 (PTRACE_XFER_TYPE): Likewise.
8364 (linux_detach_one_lwp): Cast fourth argument of
8365 ptrace to long then PTRACE_ARG4_TYPE.
8366 (regsets_fetch_inferior_registers): Cast third argument of
8367 ptrace to long then PTRACE_ARG3_TYPE.
8368 (regsets_store_inferior_registers): Likewise.
8369
38ea300a
PA
83702012-04-20 Pedro Alves <palves@redhat.com>
8371
8372 * configure: Regenerate.
8373
c971b7fa
PA
83742012-04-19 Pedro Alves <palves@redhat.com>
8375
43aaf8b6 8376 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8377 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8378 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8379 (all, install-only, uninstall, clean-info, all-lib, clean): No
8380 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8381 (maintainer-clean realclean distclean): Use subdir_do.
8382 (subdir_do): New.
8383 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8384 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8385 * acinclude.m4: Include acx_configure_dir.m4.
8386 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8387 calls. Call AC_PROG_RANLIB. Configure gnulib using
8388 ACX_CONFIGURE_DIR.
8389 (GNULIB): New.
8390 (GNULIB_STDINT_H): Adjust.
8391 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8392 * gdbreplay.c: Include build-gnulib/config.h.
8393 * server.h: Likewise.
8394 * aclocal.m4: Regenerate.
8395 * config.in: Regenerate.
8396 * configure: Regenerate.
c971b7fa 8397
809277f8
PA
83982012-04-19 Pedro Alves <palves@redhat.com>
8399
8400 * Makefile.in (LIBGNU, INCGNU): Adjust.
8401 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8402 (all, install-only, uninstall, clean-info, all-lib, clean)
8403 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8404 * configure.ac: Adjust AC_OUTPUT output.
8405 * aclocal.m4: Regenerate.
8406 * configure: Regenerate.
8407
fd9bb8b8
PA
84082012-04-19 Pedro Alves <palves@redhat.com>
8409
8410 * Makefile.in (generated_files): New.
8411 (server_h): Remove the explicit dependency on config.h, and depend
8412 on $generated_files.
8413
1c298c66
PA
84142012-04-19 Pedro Alves <palves@redhat.com>
8415
8416 * Makefile.in (INCGNU): Add -Ignulib.
8417
57c4b50b
PA
84182012-04-19 Pedro Alves <palves@redhat.com>
8419
8420 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8421 (INCGNU): ... this, and spell out -I here.
8422 (GNULIB_LIB): Rename to ...
8423 (LIBGNU): ... this.
8424 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8425
1030e047
PA
84262012-04-19 Pedro Alves <palves@redhat.com>
8427
8428 * config.in: Regenerate.
8429
447d4319
PA
84302012-04-19 Pedro Alves <palves@redhat.com>
8431
8432 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8433 * server.h (memmem): Remove declaration.
8434 * config.in: Regenerate.
8435 * configure: Regenerate.
8436
aad9eab9
YQ
84372012-04-19 Yao Qi <yao@codesourcery.com>
8438
8439 * Makefile.in (SFILES): Add common/vec.c.
8440 (OBS): Add vec.o.
8441 (vec.o): New rule.
8442
3e10640f
YQ
84432012-04-19 Yao Qi <yao@codesourcery.com>
8444
8445 * remote-utils.c (prepare_resume_reply): Replace with macro
8446 target_core_of_thread.
8447 * server.c (handle_qxfer_threads_proper): Likewise.
8448 * target.h (traget_core_of_thread): New macro.
8449
71622373
PA
84502012-04-18 Pedro Alves <palves@redhat.com>
8451
8452 * aclocal.m4: Regenerate.
8453 * configure: Regenerate.
8454
80d26939
YQ
84552012-04-16 Yao Qi <yao@codesourcery.com>
8456
8457 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8458 duplicated on address.
8459
42476b70
YQ
84602012-04-16 Yao Qi <yao@codesourcery.com>
8461
8462 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8463 (struct tracepoint_action_ops) <send>: New field.
8464 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8465 (agent_expr_send, x_tracepoint_action_send): New.
8466 (l_tracepoint_action_send): New.
8467 (cmd_qtdp): Download and install tracepoint
8468 according to `use_agent'.
8469 (run_inferior_command): Add one more parameter `len'.
8470 Update callers.
8471 (tracepoint_send_agent): New.
8472 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8473
7bc83639
YQ
84742012-04-16 Yao Qi <yao@codesourcery.com>
8475
8476 * tracepoint.c (download_tracepoints): Moved to ...
8477 (cmd_qtstart): ... here.
8478
5f18041e
YQ
84792012-04-14 Yao Qi <yao@codesourcery.com>
8480
8481 * tracepoint.c: Include inttypes.h.
8482 (struct collect_memory_action): Use sized types.
8483 (struct tracepoint): Likewise.
8484 (cmd_qtdp, stop_tracing): Update print specifiers.
8485 (cmd_qtp, response_tracepoint): Likewise.
8486 (collect_data_at_tracepoint): Likewise.
8487 (collect_data_at_step): Likewise.
8488
55a8c076
YQ
84892012-04-14 Yao Qi <yao@codesourcery.com>
8490
8491 Import gnulib module inttypes.
8492 * aclocal.m4, config.in, configure: Regenerated.
8493
dc750257
YQ
84942012-04-14 Yao Qi <yao@codesourcery.com>
8495
8496 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8497 Makefile and config.status at last.
8498
0ab5faf9
YQ
84992012-04-13 Yao Qi <yao@codesourcery.com>
8500
8501 * tracepoint.c: Include stdint.h unconditionally.
8502
18f5fd81
TJB
85032012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8504
8505 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8506 on BFD_HAVE_SYS_PROCFS_TYPE.
8507 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8508 * configure: Regenerate.
8509 * config.in: Likewise.
8510
4d47af5c
L
85112012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8512
8513 * Makefile.in (clean): Also remove x32.c x32-linux.c
8514 x32-avx.c x32-avx-linux.c.
8515 (x32.o): New target.
8516 (x32.c): Likewise.
8517 (x32-linux.o): Likewise.
8518 (x32-linux.c): Likewise.
8519 (x32-avx.o): Likewise.
8520 (x32-avx.c): Likewise.
8521 (x32-avx-linux.o): Likewise.
8522 (x32-avx-linux.c): Likewise.
8523
8524 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8525 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8526 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8527 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8528 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8529 i386/x32-avx-linux.xml.
8530
8531 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8532 (init_registers_x32_avx_linux): Likwise.
8533 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8534 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8535
ecedbe58
PA
85362012-04-13 Pedro Alves <palves@redhat.com>
8537
8538 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8539 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8540 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8541 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8542 the sub-make.
8543
c92b5177
L
85442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8545
8546 * linux-x86-low.c (compat_x32_clock_t): New.
8547 (compat_x32_siginfo_t): Likewise.
8548 (compat_x32_siginfo_from_siginfo): Likewise.
8549 (siginfo_from_compat_x32_siginfo): Likewise.
8550 (linux_is_elf64): Likewise.
8551 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8552 and siginfo_from_compat_x32_siginfo for x32.
8553 (x86_arch_setup): Set linux_is_elf64.
8554
214d508e
L
85552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8556
8557 PR gdb/13969
8558 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8559 e_machine field.
8560 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8561 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8562 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8563 compatible with process.
8564
c9a1864a
YQ
85652012-04-12 Yao Qi <yao@codesourcery.com>
8566
8567 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8568 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8569 (install-only, install-info, clean): Handle sub dir gnulib.
8570 (all-lib, am--refresh): New targets.
8571 (memmem.o): Remove target.
8572 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8573 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8574 (AC_REPLACE_FUNCS): Remove memmem.
8575 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8576 (AC_OUTPUT): Generate Makefile in gnulib/.
8577 * aclocal.m4, config.in, configure: Regenerated.
8578
367ba2c2
MR
85792012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8580
8581 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8582
9d236627
PA
85832012-04-05 Pedro Alves <palves@redhat.com>
8584
8585 -Werror=strict-aliasing
8586
8587 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8588 pointer.
8589
111217b3
PA
85902012-04-04 Pedro Alves <palves@redhat.com>
8591
8592 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8593 (sparc_store_gregset_from_stack, sparc_store_gregset)
8594 (sparc_breakpoint_at): Fix formatting.
8595
8365dcf5
TJB
85962012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8597
8598 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8599 are available.
8600 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8601 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8602 * config.in: Regenerate.
8603 * configure: Likewise.
8604
689cc2ae
PA
86052012-03-29 Pedro Alves <palves@redhat.com>
8606
8607 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8608 Correct ptrace arguments.
8609
c14dfd32
PA
86102012-03-28 Pedro Alves <palves@redhat.com>
8611
8612 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8613 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8614 (IA64_FR1_REGNUM): New defines.
8615 (ia64_fetch_register): New.
8616 (the_low_target): Install it.
8617 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8618 field.
8619 * linux-low.c (linux_fetch_registers): Try the
8620 the_low_target.fetch_register hook first.
8621
8622 * linux-arm-low.c (the_low_target): Adjust.
8623 * linux-bfin-low.c (the_low_target): Adjust.
8624 * linux-cris-low.c (the_low_target): Adjust.
8625 * linux-crisv32-low.c (the_low_target): Adjust.
8626 * linux-m32r-low.c (the_low_target): Adjust.
8627 * linux-m68k-low.c (the_low_target): Adjust.
8628 * linux-mips-low.c (the_low_target): Adjust.
8629 * linux-ppc-low.c (the_low_target): Adjust.
8630 * linux-s390-low.c (the_low_target): Adjust.
8631 * linux-sh-low.c (the_low_target): Adjust.
8632 * linux-sparc-low.c (the_low_target): Adjust.
8633 * linux-tic6x-low.c (the_low_target): Adjust.
8634 * linux-x86-low.c (the_low_target): Adjust.
8635 * linux-xtensa-low.c (the_low_target): Adjust.
8636
63c88e13
PA
86372012-03-26 Pedro Alves <palves@redhat.com>
8638
8639 * server.c (handle_qxfer_libraries): Don't bail early if
8640 the_target->qxfer_libraries_svr4 is not NULL.
8641
fb723180
PA
86422012-03-26 Pedro Alves <palves@redhat.com>
8643
8644 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8645
0afae3cf
PA
86462012-03-23 Pedro Alves <palves@redhat.com>
8647
8648 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8649 "library-list-svr4" element's start tag when the the DSO list is
8650 empty.
8651
485f1ee4
PA
86522012-03-23 Pedro Alves <palves@redhat.com>
8653
8654 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8655 a variable whose type size is the same as the inferior's pointer
8656 size.
8657
a5362b9a
TS
86582012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8659
8660 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8661 struct siginfo.
8662 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8663 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8664 * linux-low.h: Include <signal.h>.
8665 (struct siginfo): Remove forward declaration.
8666 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8667 struct siginfo.
8668
d226c142
MF
86692012-03-21 Mike Frysinger <vapier@gentoo.org>
8670
8671 * .gitignore: Ignore more files.
8672
122f36ef
PA
86732012-03-19 Pedro Alves <palves@redhat.com>
8674 Jan Kratochvil <jan.kratochvil@redhat.com>
8675
8676 * server.c (cont_thread, general_thread): Add describing comments.
8677 (start_inferior): Clear `cont_thread'.
8678 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8679 of a process.
8680
fc3e5175
YQ
86812012-03-15 Yao Qi <yao@codesourcery.com>
8682
8683 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8684 handling to ...
8685 (cmd_qtdp): ... here.
8686
8d0d92cd
YQ
86872012-03-15 Yao Qi <yao@codesourcery.com>
8688
8689 * tracepoint.c (struct tracepoint_action_ops): New.
8690 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8691 (m_tracepoint_action_download): New.
8692 (r_tracepoint_action_download): New.
8693 (x_tracepoint_action_download): New.
8694 (l_tracepoint_action_download): New.
8695 (add_tracepoint_action): Install `action->ops' according type.
8696 (download_tracepoint_1): Move code `download' function pointer
8697 of various tracepoint_action_ops.
8698
87b0bb13
JK
86992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8700
8701 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8702 linux_ptrace_attach_warnings.
8703
5f572dec
JK
87042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8705
8706 * Makefile.in (linux-ptrace.o): New.
8707 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8708 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8709 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8710 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8711 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8712 of these targets.
8713 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8714
f4647387
YQ
87152012-03-08 Yao Qi <yao@codesourcery.com>
8716 Pedro Alves <palves@redhat.com>
8717
8718 Fix PR server/13392.
8719 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8720 offset of JMP insn.
8721 * tracepoint.c (remove_tracepoint): New.
8722 (cmd_qtdp): Call remove_tracepoint when failed to install.
8723
9b224c5e
PA
87242012-03-07 Pedro Alves <palves@redhat.com>
8725
8726 * linux-low.c (get_detach_signal): New.
8727 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8728 Pass on pending signals to PTRACE_DETACH. Check the result of the
8729 ptrace call.
8730 * server.c (program_signals, program_signals_p): New.
8731 (handle_general_set): Handle QProgramSignals.
8732 * server.h (program_signals, program_signals_p): Declare.
8733
e237a7e2
JK
87342012-03-05 Pedro Alves <palves@redhat.com>
8735 Jan Kratochvil <jan.kratochvil@redhat.com>
8736
8737 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8738 New comment why.
8739
5808517f
YQ
87402012-03-03 Yao Qi <yao@codesourcery.com>
8741
8742 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8743 agent_look_up_symbols.
8744
58b4daa5
YQ
87452012-03-03 Yao Qi <yao@codesourcery.com>
8746
8747 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8748 (linux-x86-low.o): Likewise.
8749 * server.h: Remove in_process_agent_loaded.
8750 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8751 common/agent.c.
8752 Update callers.
8753
8ffcbaaf
YQ
87542012-03-03 Yao Qi <yao@codesourcery.com>
8755
8756 * tracepoint.c (gdb_agent_capability): New global.
8757 (in_process_agent_loaded_ust): Renamed to
8758 `in_process_agent_supports_ust'.
8759 Update callers.
8760 (in_process_agent_supports_ust): Call agent_capability_check.
8761 (clear_installed_tracepoints): Assert that agent supports
8762 agent.
8763
d1feda86
YQ
87642012-03-03 Yao Qi <yao@codesourcery.com>
8765
8766 * linux-low.c (linux_supports_agent): New.
8767 (linux_target_ops): Initialize field `supports_agent' with
8768 linux_supports_agent.
8769 * target.h (struct target_ops) <supports_agent>: New.
8770 (target_supports_agent): New macro.
8771 * server.c (handle_general_set): Handle packet 'QAgent'.
8772 (handle_query): Send `QAgent+'.
8773 * Makefile.in (server.o): Depends on agent.h.
8774
2fa291ac
YQ
87752012-03-03 Yao Qi <yao@codesourcery.com>
8776
8777 * Makefile.in (OBS): Add agent.o.
8778 Add new rule for agent.o.
8779 Track dependence of tracepoint.c on agent.h.
8780 * tracepoint.c (run_inferior_command_1):
8781 (run_inferior_command): Call agent_run_command.
8782 (gdb_ust_connect_sync_socket): Deleted. Move it to
8783 common/agent.c.
8784 (resume_thread, stop_thread): Likewise.
8785 (gdb_ust_socket_init): Renamed to ...
8786 (gdb_agent_socket_init): ... New.
8787 (gdb_ust_thread): Renamed to ...
8788 (gdb_agent_helper_thread): ... New.
8789 (gdb_ust_init): Move some code to ...
8790 (gdb_agent_init): ... here. New.
8791 [HAVE_UST]: Call gdb_ust_init.
8792 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8793 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8794 * config.in, configure: Regenerated.
8795
05044653
PA
87962012-03-02 Pedro Alves <palves@redhat.com>
8797
8798 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8799 * linux-low.c (struct simple_pid_list): New.
8800 (stopped_pids): New a struct simple_pid_list pointer.
8801 (add_to_pid_list, pull_pid_from_list): New.
8802 (handle_extended_wait): Don't assume the first signal new children
8803 report is SIGSTOP. Adjust call to pull_pid_from_list.
8804 (linux_wait_for_lwp): Adjust.
8805
8d00225b
YQ
88062012-03-02 Yao Qi <yao@codesourcery.com>
8807
8808 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8809 debug log.
8810
19560ba5
YQ
88112012-03-02 Yao Qi <yao@codesourcery.com>
8812
8813 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8814 `stop_pc' and `tpoint'. Update caller.
8815
1faeff08
MR
88162012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8817
8818 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8819 * linux-low.c (use_linux_regsets): New macro.
8820 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8821 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8822 (linux_register_in_regsets): New function.
8823 (usr_fetch_inferior_registers): Skip registers covered by
8824 regsets.
8825 (usr_store_inferior_registers): Likewise.
8826 (usr_fetch_inferior_registers): New macro.
8827 (usr_store_inferior_registers): Likewise.
8828 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8829 (linux_store_registers): Likewise.
8830 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8831 prototype.
8832 (init_registers_mips64_dsp_linux): Likewise.
8833 (init_registers_mips_linux): New macro.
8834 (init_registers_mips_dsp_linux): Likewise.
8835 (mips_dsp_num_regs): Likewise.
8836 (DSP_BASE, DSP_CONTROL): New fallback macros.
8837 (mips_base_regs): New macro.
8838 (mips_regmap): Use it. Fix the size.
8839 (mips_dsp_regmap): New variable.
8840 (mips_dsp_regset_bitmap): Likewise.
8841 (mips_arch_setup): New function.
8842 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8843 than mips_regmap.
8844 (mips_cannot_store_register): Likewise.
8845 (the_low_target): Update .arch_setup, .num_regs and .regmap
8846 initializers. Add .regset_bitmap initializer.
8847 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8848 initializer.
8849 * linux-bfin-low.c (the_low_target): Likewise.
8850 * linux-cris-low.c (the_low_target): Likewise.
8851 * linux-crisv32-low.c (the_low_target): Likewise.
8852 * linux-ia64-low.c (the_low_target): Likewise.
8853 * linux-m32r-low.c (the_low_target): Likewise.
8854 * linux-m68k-low.c (the_low_target): Likewise.
8855 * linux-ppc-low.c (the_low_target): Likewise.
8856 * linux-s390-low.c (the_low_target): Likewise.
8857 * linux-sh-low.c (the_low_target): Likewise.
8858 * linux-sparc-low.c (the_low_target): Likewise.
8859 * linux-tic6x-low.c (the_low_target): Likewise.
8860 * linux-x86-low.c (the_low_target): Likewise.
8861 * linux-xtensa-low.c (the_low_target): Likewise.
8862 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8863 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8864 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8865 srv_xmlfiles.
8866 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8867 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8868
c03e6ccc
YQ
88692012-02-29 Yao Qi <yao@codesourcery.com>
8870 Pedro Alves <palves@redhat.com>
8871
8872 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8873 `step_over_finished' is true.
8874
644cebc9
PA
88752012-02-27 Pedro Alves <palves@redhat.com>
8876
8877 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8878 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8879
c14d7ab2
PA
88802012-02-27 Pedro Alves <palves@redhat.com>
8881
8882 PR server/9684
8883 * linux-low.c (pid_is_stopped): New.
8884 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8885
412c89dd
LM
88862012-02-25 Luis Machado <lgustavo@codesourcery.com>
8887
8888 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8889 of conditions.
8890
b745defe
MR
88912012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8892
8893 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8894
9f3a5c85
LM
88952012-02-24 Luis Machado <lgustavo@codesourcery>
8896
8897 * server.c (handle_query): Advertise support for target-side
8898 breakpoint condition evaluation.
8899 (process_point_options): New function.
8900 (process_serial_event): When inserting a breakpoint, check for
8901 a target-side condition that should be evaluated.
8902
8903 * mem-break.c: Include regcache.h and ax.h.
8904 (point_cond_list_t): New data structure.
8905 (breakpoint) <cond_list>: New field.
8906 (find_gdb_breakpoint_at): Make non-static.
8907 (delete_gdb_breakpoint_at): Clear any target-side
8908 conditions.
8909 (clear_gdb_breakpoint_conditions): New function.
8910 (add_condition_to_breakpoint): Likewise.
8911 (add_breakpoint_condition): Likewise.
8912 (gdb_condition_true_at_breakpoint): Likewise.
8913 (gdb_breakpoint_here): Return result directly instead
8914 of going through a local variable.
8915
8916 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8917 (clear_gdb_breakpoint_conditions): Likewise.
8918 (add_breakpoint_condition): Likewise.
8919 (gdb_condition_true_at_breakpoint): Likewise.
8920
8921 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8922 (need_step_over_p): Take target-side breakpoint condition into
8923 consideration.
8924
5e1dc496
LM
89252012-02-24 Luis Machado <lgustavo@codesourcery>
8926
8927 * server.h: Include tracepoint.h.
8928 (agent_mem_read, agent_get_trace_state_variable_value,
8929 agent_set_trace_state_variable_value,
8930 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8931 get_set_tsv_func_addr): New prototypes.
8932
8933 * ax.h: New include file.
8934 * ax.c: New source file.
8935
8936 * tracepoint.c: Include ax.h.
8937 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8938 agent_expr, eval_result_type): Move to ax.h.
8939 (parse_agent_expr): Rename to ...
8940 (gdb_parse_agent_expr): ... this, make it non-static and move
8941 to ax.h.
8942 (unparse_agent_expr) Rename to ...
8943 (gdb_unparse_agent_expr): ... this, make it non-static and move
8944 to ax.h.
8945 (eval_agent_expr): Rename to ...
8946 (eval_tracepoint_agent_expr): ... this.
8947 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8948 forward declarations.
8949 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8950 (agent_get_trace_state_variable_value): New function.
8951 (agent_set_trace_state_variable_value): New function.
8952 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8953 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8954 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8955 (condition_true_at_tracepoint): Likewise.
8956 (parse_agent_expr): Rename to ...
8957 (gdb_parse_agent_expr): ... this and move to ax.c.
8958 (unparse_agent_expr): Rename to ...
8959 (gdb_unparse_agent_expr): ... this and move to ax.c.
8960 (gdb_agent_op_name): Move to ax.c.
8961 (eval_agent_expr): Rename to ...
8962 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8963 and move to ax.c.
8964 (eval_tracepoint_agent_expr): New function.
8965 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8966 non-static.
5e1dc496
LM
8967 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8968 ax.c.
8969 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8970 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8971 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8972 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8973 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8974 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8975 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8976 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8977 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8978 (compile_bytecodes): Remove forward declaration.
8979 (is_goto_target): Move to ax.c.
8980 (compile_bytecodes): Move to ax.c and call
8981 agent_get_trace_state_variable_value (...) and
8982 agent_set_trace_state_variable_value (...).
8983
8984 * Makefile.in: Update ax.c and IPA dependencies.
8985
277e4e52
PA
89862012-02-24 Pedro Alves <palves@redhat.com>
8987
8988 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8989 (cmd_bigqtbuffer_circular): ... this. Only handle
8990 'QTBuffer:circular:'.
8991 (handle_tracepoint_general_set): Adjust.
8992
bf4c19f7
YQ
89932012-02-16 Yao Qi <yao@codesourcery.com>
8994
8995 * inferiors.c: Move code to ...
8996 * dll.c: .... here. New.
8997 * server.h: Declare clear_dlls.
8998 * Makefile.in (SFILES): Add dll.c.
8999 (OBS): Add dll.o
9000 (dll.o): New rule.
9001
d73f2619
YQ
90022012-02-11 Yao Qi <yao@codesourcery.com>
9003
9004 * server.c: (handle_monitor_command): Add a new parameter
9005 `own_buf'.
9006 (handle_query): Update caller.
9007
f8255c2a
JB
90082012-02-09 Joel Brobecker <brobecker@adacore.com>
9009
9010 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9011 * configure, config.in: Regenerate.
9012 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9013 is not defined.
9014
da84f473
PA
90152012-02-02 Pedro Alves <palves@redhat.com>
9016
9017 Try SIGKILL first, then PTRACE_KILL.
9018 * linux-low.c (linux_kill_one_lwp): New.
9019 (linux_kill_one_lwp): Rename to ...
9020 (kill_one_lwp_callback): ... this. Use the new
9021 linux_kill_one_lwp.
9022
e886a173
PA
90232012-02-02 Pedro Alves <palves@redhat.com>
9024
9025 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9026 inferior.
9027
be07f1a2
PA
90282012-01-27 Pedro Alves <palves@redhat.com>
9029
9030 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9031 (elf_64_file_p): Make static.
9032 (linux_pid_exe_is_elf_64_file): New.
9033 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9034 Delete declarations.
9035 (linux_pid_exe_is_elf_64_file): Declare.
9036 * linux-x86-low.c (x86_arch_setup): Use
9037 linux_pid_exe_is_elf_64_file.
9038
d8301ad1
JK
90392012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9040
9041 * linux-low.c (linux_wait_for_event_1): Rename to ...
9042 (linux_wait_for_event): ... here and merge it with former
9043 linux_wait_for_event - new variable wait_ptid, use it.
9044 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9045
01b17894
PA
90462012-01-23 Pedro Alves <palves@redhat.com>
9047
9048 * server.c (main): Avoid yet another case of infinite loop while
9049 detaching/killing after a longjmp.
9050
e825046f
JK
90512012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9052
9053 Code cleanup.
9054 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9055
b9e7b9c3
UW
90562012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9057
9058 * hostio.c (handle_readlink): New function.
9059 (handle_vFile): Call it to handle "vFile:readlink" packets.
9060
901f9912
UW
90612012-01-20 Pedro Alves <palves@redhat.com>
9062 Ulrich Weigand <ulrich.weigand@linaro.org>
9063
9064 * server.c (handle_v_requests): Only support vAttach and vRun to
9065 start multiple processes when in extended protocol mode.
9066
fc1ab1a0
PA
90672012-01-17 Pedro Alves <palves@redhat.com>
9068
9069 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9070 memalign plus mprotect to allocate the scratch buffer.
9071
7d5d4e98
PA
90722012-01-13 Pedro Alves <palves@redhat.com>
9073
9074 * server.c (attach_inferior): Clear `cont_thread'.
9075
f128d5e9
PA
90762012-01-13 Pedro Alves <palves@redhat.com>
9077
9078 * server.c (main): Avoid infinite loop while detaching/killing
9079 after a longjmp.
9080
06db92f0
DE
90812012-01-09 Doug Evans <dje@google.com>
9082
9083 * server.c (start_inferior): Set last_ptid in --wrapper case.
9084
32d92999
YQ
90852012-01-06 Yao Qi <yao@codesourcery.com>
9086
9087 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9088 defined.
9089 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9090
5e0a92a9
YQ
90912012-01-04 Yao Qi <yao@codesourcery.com>
9092
9093 * tracepoint.c (cmd_qtdp): Print debug message
9094 for static tracepoint.
9095
ae639e8c
YQ
90962012-01-04 Yao Qi <yao@codesourcery.com>
9097
9098 * tracepoint.c (trace_vdebug): Differentiate debug message
9099 between gdbserver and IPA.
9100
f72429c5
YQ
91012012-01-03 Yao Qi <yao@codesourcery.com>
9102
9103 * tracepoint.c (tracepoint_was_hit): Don't collect for
9104 static tracepoint.
9105
12c3e59c
JB
91062012-01-02 Joel Brobecker <brobecker@adacore.com>
9107
9108 * terminal.h: Reformat copyright header.
9109
67827812
JB
91102012-01-02 Joel Brobecker <brobecker@adacore.com>
9111
9112 * server.c (gdbserver_version): Update copyright year.
9113 * gdbreplay.c (gdbreplay_version): Likewise.
9114
3e52c33d
JK
91152011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9116
9117 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9118
9119 Revert:
9120 2011-12-18 Hui Zhu <teawater@gmail.com>
9121 * linux-low.c (linux_create_inferior): Save return value to ret.
9122
66f1260e
HZ
91232011-12-18 Hui Zhu <teawater@gmail.com>
9124
9125 * linux-low.c (linux_create_inferior): Save return value to ret.
9126
e77616d7
DE
91272011-12-16 Doug Evans <dje@google.com>
9128
e7b06c57
DE
9129 * linux-low.c (linux_create_inferior): If stdio connection,
9130 redirect stdin from /dev/null, stdout to stderr.
9131 * remote-utils.c (remote_is_stdio): New static global.
9132 (remote_connection_is_stdio): New function.
9133 (remote_prepare): Handle stdio connection.
9134 (remote_open): Ditto.
9135 (remote_close): Don't close stdin for stdio connections.
9136 (read_prim,write_prim): New functions. Replace all calls to
9137 read/write to these.
9138 * server.c (main): Watch for "-" argument. Move call to
9139 remote_prepare before start_inferior.
9140 * server.h (STDIO_CONNECTION_NAME): New macro.
9141 (remote_connection_is_stdio): Declare.
9142
e77616d7
DE
9143 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9144 in debugging output.
9145
82067193
YQ
91462011-12-15 Yao Qi <yao@codesourcery.com>
9147
9148 * tracepoint.c: Include sys/syscall.h.
9149 (gdb_ust_thread): Remove preprocessor conditional.
9150
82bfbe7e
PA
91512011-12-14 Pedro Alves <pedro@codesourcery.com>
9152
9153 * linux-low.c (linux_detach_one_lwp): Call
9154 the_low_target.prepare_to_resume before detaching.
9155
712c6575
YQ
91562011-12-14 Yao Qi <yao@codesourcery.com>
9157
9158 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9159 of write.
9160
d54d1edf
YQ
91612011-12-14 Yao Qi <yao@codesourcery.com>
9162
9163 * i386-low.c (i386_low_stopped_data_address): Initialize local
9164 variable `control'.
9165
6210a125
PA
91662011-12-13 Pedro Alves <pedro@codesourcery.com>
9167
9168 PR remote/13492
9169
9170 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9171 DR_CONTROL unless necessary. Extend comments.
9172 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9173 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9174
2ece8244
YQ
91752011-12-13 Yao Qi <yao@codesourcery.com>
9176
9177 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9178 macros.
9179 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9180
784867a5
JK
91812011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9182
9183 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9184 Print new debug message for such case.
9185
6bf36717
JK
91862011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9187
9188 Fix overlapping memcpy.
9189 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9190 the read_inferior_memory transfer.
9191 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9192 write_inferior_memory transfer.
9193 (set_fast_tracepoint_jump): New variable buf. Use it for the
9194 read_inferior_memory and write_inferior_memory transfers.
9195 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9196 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9197 Use it for the write_inferior_memory transfer.
9198 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9199 buffers.
9200
50275556
MR
92012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9202
9203 * linux-low.c (fetch_register, store_register): Make code
9204 consistent, fix formatting.
9205
7325beb4
MR
92062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9207
9208 * linux-low.c (usr_store_inferior_registers): Factor out code
9209 to handle individual registers into...
9210 (store_register): ... this new function.
9211
c642a434
UW
92122011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9213
9214 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9215 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9216 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9217 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9218 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9219 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9220 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9221 (srv_xmlfiles): Add new XML files.
9222
9223 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9224 and <sys/uio.h>.
9225 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9226 (init_registers_s390_linux32v1): Add prototype.
9227 (init_registers_s390_linux32v2): Likewise.
9228 (init_registers_s390_linux64v1): Likewise.
9229 (init_registers_s390_linux64v2): Likewise.
9230 (init_registers_s390x_linux64v1): Likewise.
9231 (init_registers_s390x_linux64v2): Likewise.
9232 (s390_num_regs): Increment to 52.
9233 (s390_regmap): Add orig_r2 register.
9234 (s390_num_regs_3264): Increment to 68.
9235 (s390_regmap_3264): Add orig_r2 register.
9236 (s390_collect_ptrace_register): Handle orig_r2 register.
9237 (s390_supply_ptrace_register): Likewise.
9238 (s390_fill_last_break): New function.
9239 (s390_store_last_break): Likewise.
9240 (s390_fill_system_call): New function.
9241 (s390_store_system_call): Likewise.
9242 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9243 register sets.
9244 (s390_check_regset): New function.
9245 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9246 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9247 Update target_regsets for available register sets.
9248
2268b414
JK
92492011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9250 Jan Kratochvil <jan.kratochvil@redhat.com>
9251
9252 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9253 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9254 New.
9255 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9256 * linux-low.h (struct process_info_private): New member r_debug.
9257 * server.c (handle_qxfer_libraries): Call
9258 the_target->qxfer_libraries_svr4.
9259 (handle_qxfer_libraries_svr4): New function.
9260 (qxfer_packets): New entry "libraries-svr4".
9261 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9262 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9263 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9264 PACKET_qXfer_libraries_svr4.
9265
d6db1fab
UW
92662011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9267
9268 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9269 PSW address/mask between 8-byte and 16-byte formats.
9270 (s390_supply_ptrace_register): Likewise.
9271 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9272 basic addressing mode bit.
9273
242f5f1c
SS
92742011-11-24 Stan Shebs <stan@codesourcery.com>
9275
9276 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9277
f196051f
SS
92782011-11-17 Stan Shebs <stan@codesourcery.com>
9279
9280 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9281 (tracing_start_time): New global.
9282 (tracing_stop_time): New global.
9283 (tracing_user_name): New global.
9284 (tracing_notes): New global.
9285 (tracing_stop_note): New global.
9286 (cmd_qtstart): Set traceframe_usage, start_time.
9287 (stop_tracing): Set stop_time.
9288 (cmd_qtstatus): Report additional status.
9289 (cmd_qtp): New function.
9290 (handle_tracepoint_query): Call it.
9291 (cmd_qtnotes): New function.
9292 (handle_tracepoint_general_set): Call it.
9293 (get_timestamp): Rename from tsv_get_timestamp.
9294
405f8e94
SS
92952011-11-14 Stan Shebs <stan@codesourcery.com>
9296 Kwok Cheung Yeung <kcy@codesourcery.com>
9297
9298 * linux-x86-low.c (small_jump_insn): New.
9299 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9300 trampoline and error message, build a trampoline and issue a small
9301 jump instruction to it.
9302 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9303 trampoline and error message.
9304 (x86_get_min_fast_tracepoint_insn_len): New.
9305 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9306 * linux-low.h (struct linux_target_ops): Add arguments to
9307 install_fast_tracepoint_jump_pad operation, add new operation.
9308 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9309 arguments.
9310 (linux_get_min_fast_tracepoint_insn_len): New function.
9311 (linux_target_op): Add new operation.
9312 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9313 (gdb_trampoline_buffer_end): Ditto.
9314 (gdb_trampoline_buffer_error): Ditto.
9315 (struct ipa_sym_addresses): Add fields for new IPA variables.
9316 (symbol_list): Add entries for new IPA variables.
9317 (struct tracepoint): Add fields to hold the address range of the
9318 trampoline used by the tracepoint.
9319 (trampoline_buffer_head): New static variable.
9320 (trampoline_buffer_tail): Ditto.
9321 (claim_trampoline_space): New function.
9322 (have_fast_tracepoint_trampoline_buffer): New function.
9323 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9324 structure.
9325 (install_fast_tracepoint): Ditto, also add error buffer argument.
9326 (cmd_qtminftpilen): New function.
9327 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9328 (fast_tracepoint_from_trampoline_address): New function.
9329 (fast_tracepoint_collecting): Handle trampoline as part of jump
9330 pad space.
9331 (set_trampoline_buffer_space): New function.
9332 (initialize_tracepoint): Initialize new IPA variables.
9333 * target.h (struct target_ops): Add arguments to
9334 install_fast_tracepoint_jump_pad operation, add new
9335 get_min_fast_tracepoint_insn_len operation.
9336 (target_get_min_fast_tracepoint_insn_len): New.
9337 (install_fast_tracepoint_jump_pad): Add arguments.
9338 * server.h (IPA_BUFSIZ): Define.
9339 * linux-i386-ipa.c: Include extra header files.
9340 (initialize_fast_tracepoint_trampoline_buffer): New function.
9341 (initialize_low_tracepoint): Call it.
9342 * server.h (set_trampoline_buffer_space): Declare.
9343 (claim_trampoline_space): Ditto.
9344 (have_fast_tracepoint_trampoline_buffer): Ditto.
9345
1e4d1764
YQ
93462011-11-14 Yao Qi <yao@codesourcery.com>
9347
9348 * server.c (handle_query): Handle InstallInTrace for qSupported.
9349 * tracepoint.c (add_tracepoint): Sort list.
9350 (install_tracepoint, download_tracepoint): New.
9351 (cmd_qtdp): Call them to install and download tracepoints.
9352 (sort_tracepoints): Removed.
9353 (cmd_qtstart): Update.
9354
5c73ff4e
YQ
93552011-11-14 Yao Qi <yao@codesourcery.com>
9356
9357 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9358 * mem-break.h: Declare.
9359 * tracepoint.c (cmd_qtstart): Move some code to ...
9360 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9361 New.
9362 (download_tracepoints): Move some code to ...
9363 (download_tracepoint_1): ... here. New.
9364
86a30030
YQ
93652011-11-08 Yao Qi <yao@codesourcery.com>
9366
9367 * remote-utils.c (relocate_instruction): A comment fix.
9368
8d26e50c
JB
93692011-11-07 Joel Brobecker <brobecker@adacore.com>
9370
9371 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9372 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9373 dr_status_mirror and dr_control_mirror from debug_reg_state.
9374 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9375 (i386_initial_stuff): Remove use of deleted globals.
9376 (i386_get_thread_context, i386_set_thread_context,
9377 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9378 from debug_reg_state.
9379
a59306a3
YQ
93802011-11-05 Yao Qi <yao@codesourcery.com>
9381
9382 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9383 address as TPOINT's.
9384
3065dfb6
SS
93852011-11-02 Stan Shebs <stan@codesourcery.com>
9386
9387 * tracepoint.c (agent_mem_read_string): New function.
9388 (eval_agent_expr): Call it for tracenz.
9389 * server.c (handle_query): Report support for tracenz.
9390
fd0d8c7c
YQ
93912011-11-02 Yao Qi <yao@codesourcery.com>
9392
9393 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9394
609086b1
YQ
93952011-11-02 Yao Qi <yao@codesourcery.com>
9396
9397 * target.h: Fix a typo in comment.
9398
b9fd1791
PA
93992011-10-31 Pedro Alves <pedro@codesourcery.com>
9400
9401 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9402 clobber the breakpoints' shadows with fast tracepoint jumps.
9403 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9404 * target.c (write_inferior_memory): Also pass MYADDR down to
9405 check_mem_write.
9406
03583c20
UW
94072011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9408
9409 * configure.ac: Check support for personality routine.
9410 * configure: Regenerate.
9411 * config.in: Likewise.
9412 * linux-low.c: Include <sys/personality.h>.
9413 Define ADDR_NO_RANDOMIZE if necessary.
9414 (linux_create_inferior): Disable address space randomization when
9415 forking inferior, if requested.
9416 (linux_supports_disable_randomization): New function.
9417 (linux_target_ops): Install it.
9418 * server.h (disable_randomization): Declare.
9419 * server.c (disable_randomization): New global variable.
9420 (handle_general_set): Handle QDisableRandomization.
9421 (handle_query): Likewise for qSupported.
9422 (main): Support --disable-randomization and --no-disable-randomization
9423 command line arguments.
9424 * target.h (struct target_ops): Add supports_disable_randomization.
9425 (target_supports_disable_randomization): New macro.
9426
723b724b
MF
94272011-09-29 Mike Frysinger <vapier@gentoo.org>
9428
9429 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9430 ifdef check.
9431 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9432 [!PT_GETDSBT] (target_loadmap): New definition.
9433 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9434 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9435 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9436 and PT_GETDSBT to LINUX_LOADMAP.
9437 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9438 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9439
55329a5c 94402011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9441
9442 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9443 (arm_linux_hwbp_cap): New static variable.
9444 (arm_linux_get_hwbp_cap): Replace by ...
9445 (arm_linux_init_hwbp_cap): ... this new function.
9446 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9447 (arm_linux_get_hw_watchpoint_count): Likewise.
9448 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9449 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9450 (arm_prepare_to_resume): Use perror_with_name instead of error.
9451
55329a5c 94522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9453
9454 * linux-arm-low.c: Include <signal.h>.
9455 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9456 (struct arm_linux_hwbp_cap): New data type.
9457 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9458 (struct arm_linux_hw_breakpoint): New data type.
9459 (MAX_BPTS, MAX_WPTS): Define.
9460 (struct arch_process_info, struct arch_lwp_info): New data types.
9461 (arm_linux_get_hwbp_cap): New function.
9462 (arm_linux_get_hw_breakpoint_count): Likewise.
9463 (arm_linux_get_hw_watchpoint_count): Likewise.
9464 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9465 (arm_hwbp_control_initialize): Likewise.
9466 (arm_hwbp_control_is_enabled): Likewise.
9467 (arm_hwbp_control_is_initialized): Likewise.
9468 (arm_hwbp_control_disable): Likewise.
9469 (arm_linux_hw_breakpoint_equal): Likewise.
9470 (arm_linux_hw_point_initialize): Likewise.
9471 (struct update_registers_data): New data structure.
9472 (update_registers_callback: New function.
9473 (arm_insert_point): Likewise.
9474 (arm_remove_point): Likewise.
9475 (arm_stopped_by_watchpoint): Likewise.
9476 (arm_stopped_data_address): Likewise.
9477 (arm_new_process): Likewise.
9478 (arm_new_thread): Likewise.
9479 (arm_prepare_to_resume): Likewise.
9480 (the_low_target): Register arm_insert_point, arm_remove_point,
9481 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9482 arm_new_thread, and arm_prepare_to_resume.
9483
6b9801d4
SS
94842011-09-15 Stan Shebs <stan@codesourcery.com>
9485
9486 * server.h (struct emit_ops): Add compare-goto fields.
9487 * tracepoint.c (gdb_agent_op_sizes): New table.
9488 (emit_eq_goto): New function.
9489 (emit_ne_goto): New function.
9490 (emit_lt_goto): New function.
9491 (emit_le_goto): New function.
9492 (emit_gt_goto): New function.
9493 (emit_ge_goto): New function.
9494 (is_goto_target): New function.
9495 (compile_bytecodes): Recognize special cases of compare-goto
9496 combinations and call specialized emitters for them.
9497 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9498 (amd64_emit_ne_goto): New function.
9499 (amd64_emit_lt_goto): New function.
9500 (amd64_emit_le_goto): New function.
9501 (amd64_emit_gt_goto): New function.
9502 (amd64_emit_ge_goto): New function.
9503 (amd64_emit_ops): Add the new functions.
9504 (i386_emit_eq_goto): New function.
9505 (i386_emit_ne_goto): New function.
9506 (i386_emit_lt_goto): New function.
9507 (i386_emit_le_goto): New function.
9508 (i386_emit_gt_goto): New function.
9509 (i386_emit_ge_goto): New function.
9510 (i386_emit_ops): Add the new functions.
9511
bf15cbda
SS
95122011-09-08 Stan Shebs <stan@codesourcery.com>
9513
9514 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9515 (i386_emit_epilogue): Restore %ebx.
9516
943ca1dd
JZ
95172011-08-31 Jie Zhang <jzhang918@gmail.com>
9518
9519 * server.c (step_thread): Remove definition.
9520 (process_serial_event): Don't handle Hs.
9521 * server.h (step_thread): Remove declaration.
9522 * target.c (set_desired_inferior): Remove use of step_thread.
9523
e3deef73
LM
95242011-08-24 Luis Machado <lgustavo@codesourcery.com>
9525
9526 * linux-low.c: Include linux-procfs.h.
9527 (linux_attach_lwp_1): Update comments.
9528 (linux_attach): Scan for existing threads when attaching to a
9529 process that is the tgid.
9530 * Makefile.in: Update dependencies.
9531
13da1c97
LM
95322011-08-24 Luis Machado <lgustavo@codesourcery.com>
9533
9534 * configure.srv: Add linux-procfs.o dependencies.
9535
881127c9
YQ
95362011-08-14 Yao Qi <yao@codesourcery.com>
9537
9538 * target.h (struct target_ops): Fix indent.
9539 * win32-low.c (win32_target_ops): Fix comment.
9540
58dbd541
YQ
95412011-08-14 Andrew Jenner <andrew@codesourcery.com>
9542 Yao Qi <yao@codesourcery.com>
9543
9544 * Makefile.in (clean): Remove tic6x-*.c files.
9545 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9546 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9547 (tic6x-c64xp-linux.c): Likewise.
9548 * configure.srv: Add support for tic6x-*-uclinux.
9549 * linux-tic6x-low.c: New.
9550 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9551
78d85199
YQ
95522011-08-14 Andrew Stubbs <ams@codesourcery.com>
9553 Yao Qi <yao@codesourcery.com>
9554
9555 * target.h (struct target_ops): Add read_loadmap.
9556 * linux-low.c (struct target_loadseg): New type.
9557 (struct target_loadmap): New type.
9558 (linux_read_loadmap): New function.
9559 (linux_target_ops): Add linux_read_loadmap.
9560 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9561 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9562 to NULL.
78d85199 9563
a959a88d
EZ
95642011-08-05 Eli Zaretskii <eliz@gnu.org>
9565
9566 * win32-low.c: Include <stdint.h>.
9567
1ced966e
PA
95682011-07-22 Pedro Alves <pedro@codesourcery.com>
9569
9570 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9571 to the inferior here.
9572 (i386_remove_aligned_watchpoint): Ditto.
9573 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9574 fit part of the watchpoint in the debug registers.
9575 (i386_update_inferior_debug_regs): New.
9576 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9577 registers, and only update the inferior on success.
9578 (i386_low_remove_watchpoint): Ditto.
9579
d26e3629
KY
95802011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9581
9582 * linux-low.c (compare_ints, unique, list_threads, show_process,
9583 linux_core_of_thread): Delete.
9584 (linux_target_ops): Change linux_core_of_thread to
9585 linux_common_core_of_thread.
9586 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9587 * utils.c (malloc_failure): Change type of argument.
9588 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9589 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9590 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9591 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9592 (IPA_OBJS): Add common-utils-ipa.o.
9593 (ptid_h, linux_osdata_h): New macros.
9594 (server_h): Add common/common-utils.h, common/xml-utils.h,
9595 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9596 common/ptid.h.
9597 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9598 ptid.o, buffer.o): New rules.
9599 (linux-low.o): Add common/linux-osdata.h as a dependency.
9600 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9601 * configure.ac: Add AC_HEADER_DIRENT check.
9602 * config.in: Regenerate.
9603 * configure: Regenerate.
9604 * remote-utils.c (xml_escape_text): Delete.
9605 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9606 buffer_xml_printf): Move to common/buffer.c.
9607 * server.c (main): Remove call to initialize_inferiors.
9608 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9609 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9610 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9611 internal_error, gdb_assert, gdb_assert_fail): Delete.
9612 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9613 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9614 common/buffer.h.
9615 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9616 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9617 initialize_inferiors): Delete.
9618
2275a1a7
PA
96192011-07-20 Pedro Alves <pedro@codesourcery.com>
9620
9621 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9622 symbol error.
9623
0a5b1e09
PA
96242011-05-31 Pedro Alves <pedro@codesourcery.com>
9625
9626 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9627 assertion.
9628 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9629
6938fd34
YQ
96302011-05-26 Yao Qi <yao@codesourcery.com>
9631
9632 * Makefile.in (thread-db.o): Track dependence to
9633 common/gdb_thread_db.h.
9634 * thread-db.c: include gdb_thread_db.h from right place.
9635
b481f9e0
TT
96362011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9637
9638 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9639 __FILE__ and __LINE__ to internal_error.
9640
98a5dd13
DE
96412011-05-13 Doug Evans <dje@google.com>
9642
9643 * thread-db.c (try_thread_db_load_from_sdir): New function.
9644 (try_thread_db_load_from_dir): New function.
9645 (thread_db_load_search): Handle $sdir, ignore $pdir.
9646 Remove trying of system directories if search of
9647 libthread-db-search-path fails, that is now done via $sdir.
9648
d248b706
KY
96492011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9650
9651 * server.c (handle_query): Add EnableDisableTracepoints to the list
9652 of supported features.
43aaf8b6 9653 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9654 tracepoints.
43aaf8b6
PA
9655 (cmd_qtenable_disable): New.
9656 (cmd_qtstart): Install tracepoints even if disabled.
9657 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9658 receiving a QTEnable or QTDisable packet.
9659 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9660 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9661 tracepoints.
9662 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9663
84e578fb
DE
96642011-05-10 Doug Evans <dje@google.com>
9665
9666 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9667
71f55dd8
DE
96682011-05-04 Doug Evans <dje@google.com>
9669
9670 * linux-low.c (linux_join): Skip process lookup.
9671 * spu-low.c (spu_join): Ditto.
9672 * server.c (join_inferiors_callback): Delete.
9673 (process_serial_event): For 'D' packet (detach) call join_inferior
9674 directly.
9675
4d393d60
JM
96762011-05-04 Joseph Myers <joseph@codesourcery.com>
9677
9678 * README: Don't mention xscale*-*-linux*.
9679 * configure.srv (xscale*-*-linux*): Don't handle target.
9680
b00ad6ff
NF
96812011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9682
9683 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9684 casting pointers.
9685 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9686 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9687 (i386_emit_void_call_2): Likewise.
9688
af96c192
YQ
96892011-04-26 Yao Qi <yao@codesourcery.com>
9690
43aaf8b6
PA
9691 * linux-low.c: Move common macros to linux-ptrace.h.
9692 Include linux-ptrace.h.
af96c192
YQ
9693 * Makefile.in (linux_ptrace_h): New.
9694 (linux-low.o): Depends on linux-ptrace.h.
9695
03f2bd59
JK
96962011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9697
9698 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9699 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9700 (remote_prepare): New function with most of the TCP code from ...
9701 (remote_open): ... here. Detect PORT here unconditionally. Move also
9702 setting transport_is_reliable.
9703 * server.c (run_once): New variable.
9704 (gdbserver_usage): Document it.
9705 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9706 the first run if RUN_ONCE.
9707 * server.h (run_once, remote_prepare): New declarations.
9708
7a9dd1b2
TT
97092011-04-19 Tom Tromey <tromey@redhat.com>
9710
9711 * win32-low.c (handle_load_dll): Remove duplicate "the".
9712
81239425
PM
97132011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9714
9715 Remove support for old Cygwin 1.5 versions.
9716 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9717 function to avoid warning.
9718 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9719 warning.
9720
9e0627f1
PM
97212011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9722
9723 * gdbserver/server.h (Macro _): Define it if not available.
9724
588eebee
MS
97252011-03-14 Michael Snyder <msnyder@vmware.com>
9726
348af9f7 9727 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9728
43f70d4c
JB
97292011-03-10 Joel Brobecker <brobecker@adacore.com>
9730
9731 * Makefile.in (maintainer-clean realclean distclean): Remove
9732 "make ... subdir_do" command.
9733
348af9f7
MS
97342011-03-10 Michael Snyder <msnyder@vmware.com>
9735
9736 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9737
9738 * server.c (handle_v_run): Free alloced buffer on early return.
9739
e637a4f5
YQ
97402011-03-09 Yao Qi <yao@codesourcery.com>
9741
9742 Revert:
9743 2011-03-04 Yao Qi <yao@codesourcery.com>
9744
9745 * Makefile.in: Remove GNU make feature --directory.
9746
9747 2011-03-05 Yao Qi <yao@codesourcery.com>
9748
9749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9750 (subdir_do): New make target. Copied from gdb/Makefile.
9751 (maintainer-clean, realclean, distclean, clean): Call corresponding
9752 make targets in common/Makefile.
9753
9754 2011-02-11 Yao Qi <yao@codesourcery.com>
9755
9756 * configure.ac: Call AC_PROG_RANLIB.
9757 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9758 * configure: Regenerate.
9759
e6edda56
JK
97602011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9761
9762 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9763
e5141119
JB
97642011-03-06 Yao Qi <yao@codesourcery.com>
9765
9766 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9767
64794aa4
JB
97682011-03-05 Yao Qi <yao@codesourcery.com>
9769
9770 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9771 (subdir_do): New make target. Copied from gdb/Makefile.
9772 (maintainer-clean, realclean, distclean, clean): Call corresponding
9773 make targets in common/Makefile.
9774
7a762829
YQ
97752011-03-04 Yao Qi <yao@codesourcery.com>
9776
9777 * Makefile.in: Remove GNU make feature --directory.
9778
348af9f7
MS
97792011-03-04 Michael Snyder <msnyder@vmware.com>
9780
9781 * server.c (queue_stop_reply): Call xmalloc not malloc.
9782
97832011-03-02 Michael Snyder <msnyder@vmware.com>
9784
9785 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9786
9f72fee2
MS
97872011-02-28 Michael Snyder <msnyder@vmware.com>
9788
588eebee
MS
9789 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9790 (cmd_qtframe): Ditto.
9791 (cmd_qtbuffer): Ditto.
9792 (cmd_bigqtbuffer): Ditto.
9793
9f72fee2
MS
9794 * utils.c (decimal2str): Initialize 'width' to nine, then
9795 don't mess with it.
9796
8040bd49
UW
97972011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9798
9799 * hostio.c (require_data): Free *data, not data.
9800
7e52cbd0
JK
98012011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9802
9803 * hostio.c (require_data): Use free, not xfree.
9804
9130f83e
MS
98052011-02-27 Michael Snyder <msnyder@vmware.com>
9806
4b812f4e
MS
9807 * server.c (handle_query): Discard unused value.
9808
9130f83e
MS
9809 * hostio.c (require_data): Free malloc memory before returning
9810 error.
9811
69d37113
MS
98122011-02-26 Michael Snyder <msnyder@vmware.com>
9813
9814 * linux-low.c (list_threads): Call closedir for dirent.
9815
35f5825a
MS
98162011-02-27 Michael Snyder <msnyder@vmware.com>
9817
2a589cef
MS
9818 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9819 a case statement falls through.
9820
0adea5f7
MS
9821 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9822
35f5825a
MS
9823 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9824 in comparison.
9825
238f1c74
MS
98262011-02-26 Michael Snyder <msnyder@vmware.com>
9827
9828 * utils.c (decimal2str): Eliminate dead code and dead param.
9829 (pulongest): Drop dead param from call to decimal2str.
9830 (plongest): Ditto.
9831
633ff500
JB
98322011-02-24 Joel Brobecker <brobecker@adacore.com>
9833
9834 Revert the following patch (not approved yet):
9835 2011-02-21 Hui Zhu <teawater@gmail.com>
9836 * tracepoint.c (tp_printf): New function.
9837 (eval_agent_expr): Handle gdb_agent_op_printf.
9838
f9c6ff72
HZ
98392011-02-21 Hui Zhu <teawater@gmail.com>
9840
9841 * tracepoint.c (tp_printf): New function.
9842 (eval_agent_expr): Handle gdb_agent_op_printf.
9843
94d5e490
TT
98442011-02-18 Tom Tromey <tromey@redhat.com>
9845
9846 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9847 (tracepoint.o): Likewise.
9848 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9849 (gdb_agent_op_names): Likewise.
9850
c7f96d2b
TT
98512011-02-18 Tom Tromey <tromey@redhat.com>
9852
9853 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9854 gdb_agent_op_rot>: New constants.
9855 (gdb_agent_op_names): Add pick and roll.
9856 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9857 cases.
9858
0feedb2c
JK
98592011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9860
9861 * aclocal.m4: Regenerated with aclocal-1.11.1.
9862
b3b9301e
PA
98632011-02-14 Pedro Alves <pedro@codesourcery.com>
9864
9865 * server.c (handle_qxfer_traceframe_info): New.
9866 (qxfer_packets): Register "traceframe-info".
9867 (handle_query): Report support for qXfer:traceframe-info:read+.
9868 * tracepoint.c (match_blocktype): New.
9869 (traceframe_find_block_type): Rename to ...
9870 (traceframe_walk_blocks): ... this. Add callback filter argument,
9871 and use it.
9872 (traceframe_find_block_type): New, reimplemented on top of
9873 traceframe_walk_blocks.
9874 (build_traceframe_info_xml): New.
9875 (traceframe_read_info): New.
9876 * server.h (traceframe_read_info): Declare.
9877
4f3e6fb7
YQ
98782011-02-11 Yao Qi <yao@codesourcery.com>
9879
9880 * configure.ac: Call AC_PROG_RANLIB.
9881 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9882 * configure: Regenerate.
9883
764880b7
PA
98842011-02-07 Pedro Alves <pedro@codesourcery.com>
9885
9886 * server.c (gdb_read_memory): Change return semantics to allow
9887 partial transfers.
9888 (handle_search_memory_1): Adjust.
9889 (process_serial_event) <'m' packet>: Handle partial transfers.
9890 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9891
1c79eb8a
PA
98922011-01-28 Pedro Alves <pedro@codesourcery.com>
9893
9894 * regcache.c (init_register_cache): Initialize
9895 regcache->register_status.
9896 (free_register_cache): Release regcache->register_status.
9897 (regcache_cpy): Copy register_status.
9898 (registers_to_string): Print 'x's for unavailable registers.
9899 (supply_register): Mark the register's status valid or
9900 unavailable, depending on whether a buffer was passed in or not.
9901 (supply_register_zeroed): New.
9902 (supply_regblock): Mark the registers' status valid or
9903 unavailable, depending on whether a buffer was passed in or not.
9904 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9905 (struct regcache): New `register_status' field.
9906 (supply_register_zeroed): Declare.
9907 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9908 supply_register_zeroed, rather than passing a NULL buffer to
9909 supply_register.
9910 * tracepoint.c (fetch_traceframe_registers): Update comment.
9911
85724a0e
PA
99122011-01-28 Pedro Alves <pedro@codesourcery.com>
9913
9914 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9915 buffer explicit.
9916
d08aafef
PA
99172011-01-25 Pedro Alves <pedro@codesourcery.com>
9918
9919 * server.h (decode_xfer_write): Change prototype.
9920 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9921 and don't extract the annex here.
9922 * server.c (decode_xfer_read): Remove `annex' parameter,
9923 and don't extract the annex here.
9924 (decode_xfer): New.
9925 (struct qxfer): New.
9926 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9927 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9928 (handle_qxfer_statictrace): New functions, abstracted out from
9929 handle_query, and made to use the struct qxfer interface.
9930 (handle_threads_qxfer_proper): Rename to ...
9931 (handle_qxfer_threads_proper): ... this.
9932 (handle_threads_qxfer): Rename to ...
9933 (handle_qxfer_threads): ... this. Adjust.
9934 (qxfer_packets): New array.
9935 (handle_qxfer): New function.
9936 (handle_query): Use handle_qxfer.
9937
493e2a69
MS
99382011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9939
9940 * gdbreplay.c: Shorten lines of >= 80 columns.
9941 * linux-low.c: Ditto.
9942 * linux-ppc-low.c: Ditto.
9943 * linux-s390-low.c: Ditto.
9944 * linux-sparc-low.c: Ditto.
9945 * linux-x86-low.c: Ditto.
9946 * linux-xtensa-low.c: Ditto.
9947 * mem-break.c: Ditto.
9948 * nto-low.c: Ditto.
9949 * regcache.h: Ditto.
9950 * remote-utils.c: Ditto.
9951 * server.c: Ditto.
9952 * server.h: Ditto.
9953 * thread-db.c: Ditto.
9954 * tracepoint.c: Ditto.
9955 * utils.c: Ditto.
9956 * win32-low.h: Ditto.
9957
44944448
JB
99582011-01-05 Joel Brobecker <brobecker@adacore.com>
9959
9960 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9961 update.
9962
71ce852c
JB
99632011-01-01 Joel Brobecker <brobecker@adacore.com>
9964
9965 * server.c (gdbserver_version): Update copyright year in version
9966 output.
9967 * gdbreplay.c (gdbreplay_version): Ditto.
9968
eb826dc6
MF
99692010-12-29 Jie Zhang <jie.zhang@analog.com>
9970
9971 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9972 * linux-bfin-low.c: New file.
9973 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9974 PT_DATA_ADDR for BFIN targets.
9975 * Makefile.in (SFILES): Add linux-bfin-low.c.
9976 (clean): Remove reg-bfin.c.
9977 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9978 * README: Mention supported Blackfin targets.
9979
39ab222a
MF
99802010-12-23 Mike Frysinger <vapier@gentoo.org>
9981
9982 * .gitignore: New file.
9983
a1f2ce7d
MF
99842010-11-16 Mike Frysinger <vapier@gentoo.org>
9985
9986 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9987
f474844c
JZ
99882010-10-22 Jie Zhang <jie@codesourcery.com>
9989
9990 * Makefile.in: Add FLAGS_TO_PASS variable.
9991 (install): Remove dependency of install-only and recursively
9992 invoke make for install-only.
9993
f1048712
DE
99942010-10-04 Doug Evans <dje@google.com>
9995
9996 * Makefile.in (uninstall): Use $(DESTDIR).
9997
b53a1623
PA
99982010-09-24 Pedro Alves <pedro@codesourcery.com>
9999
e6ee044d
PA
10000 PR gdb/11842
10001
b53a1623
PA
10002 * linux-x86-low.c (compat_siginfo_from_siginfo)
10003 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10004 si_code is < 0. Check for si_code == SI_TIMER before checking for
10005 si_code < 0.
10006
fa1bd1e4
JB
100072010-09-13 Joel Brobecker <brobecker@adacore.com>
10008
10009 * lynx-i386-low.c: New file.
10010 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10011
47fac8f8
JB
100122010-09-13 Joel Brobecker <brobecker@adacore.com>
10013
10014 * lynx-low.c (ptrace_request_to_str): Remove handling for
10015 request values that have been removed in LynxOS 5.x.
10016
1adfc54d
JB
100172010-09-13 Joel Brobecker <brobecker@adacore.com>
10018
10019 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10020 <ptrace.h>
10021
c2a66c29
NS
100222010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10023
10024 * configure.ac: Add --enable-inprocess-agent option.
10025 * configure: Rebuilt.
10026
32fcada3
YQ
100272010-09-06 Yao Qi <yao@codesourcery.com>
10028
10029 * linux-low.c (linux_kill): Remove unused variable.
10030 (linux_stabilize_threads): Likewise.
10031 * server.c (start_inferior): Likewise.
10032 (queue_stop_reply_callback): Likewise.
10033 * tracepoint.c (do_action_at_tracepoint): Likewise.
10034
0cccb683
YQ
100352010-09-06 Yao Qi <yao@codesourcery.com>
10036
10037 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10038 on return.
10039
423ec54c
JK
100402010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10041
10042 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10043
12ac6819
PA
100442010-09-06 Pedro Alves <pedro@codesourcery.com>
10045
10046 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10047 "$(IPA_DEPFILES)".
10048
8ed54b31
JB
100492010-09-01 Joel Brobecker <brobecker@adacore.com>
10050
10051 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10052 gdbserver/lynx-ppc-low.c: New files.
10053 * Makefile.in (lynx_low_h): New variable.
10054 (lynx-low.o, lynx-ppc-low.o): New rules.
10055 * configure.ac: On LynxOS, link with -lnetinet.
10056 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10057 * configure: regenerate.
10058
bb0116a4
JB
100592010-09-01 Joel Brobecker <brobecker@adacore.com>
10060
10061 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10062 * configure.ac: Add check for vasprintf and vsnprintf.
10063 * configure, config.in: Regenerate.
10064 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10065
a778ab81 100662010-09-01 Joel Brobecker <brobecker@adacore.com>
10067
10068 * gdbreplay.c: Move include of alloca.h up, next to include of
10069 malloc.h.
10070 * server.h: Add include of malloc.h.
10071 * mem-break.c: Remove include of malloc.h.
10072 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10073
8b034a19 100742010-09-01 Joel Brobecker <brobecker@adacore.com>
10075
10076 * Makefile.in (memmem.o): Build with -Wno-error.
10077
100782010-09-01 Joel Brobecker <brobecker@adacore.com>
10079
10080 * utils.c (xsnprintf): Make non-static.
10081 * server.h: Add xsnprintf declaration.
10082 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10083 replace calls to snprintf by calls to xsnprintf throughout.
10084
100852010-09-01 Joel Brobecker <brobecker@adacore.com>
10086
10087 * configure.ac: Add configure check for alloca.
10088 * configure, config.in: Regenerate.
10089 * server.h: Include alloca.h if it exists.
10090 * gdbreplay.c: Include alloca.h if it exists.
10091
1a981360
PA
100922010-08-28 Pedro Alves <pedro@codesourcery.com>
10093
10094 * linux-low.c (__SIGRTMIN): Define if not already defined.
10095 (linux_create_inferior): Check for __ANDROID__ rather than
10096 __SIGRTMIN.
10097 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10098 are already deferred.
10099 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10100 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10101 stopped and already has a pending signal to report.
10102 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10103 a pending signal to report or is moving out of a jump pad.
10104 (linux_init_signals): Check for __ANDROID__ rather than
10105 __SIGRTMIN.
10106
b4d51a55
PA
101072010-08-28 Pedro Alves <pedro@codesourcery.com>
10108
10109 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10110 debug_threads check. Avoid a linear search when not doing debug
10111 output.
10112
ec48365d
PA
101132010-08-27 Pedro Alves <pedro@codesourcery.com>
10114
10115 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10116 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10117 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10118 (process_event): Change local fd's type to gdb_fildes_t.
10119 (create_file_handler): Adjust prototype.
10120 (delete_file_handler): Adjust prototype.
10121 (handle_file_event): Adjust prototype. Use pfildes.
10122 (create_file_event): Adjsut prototype.
10123 * remote-utils.c (remote_desc, listen_desc): Change type to
10124 gdb_fildes_t.
10125 * server.h: New gdb_fildes_t typedef.
10126 [USE_WIN32API]: Include winsock2.h.
10127 (delete_file_handler, add_file_handler): Adjust prototypes.
10128 (pfildes): Declare.
10129 * utils.c (pfildes): New.
10130
854d88f0
PA
101312010-08-27 Pedro Alves <pedro@codesourcery.com>
10132
10133 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10134 * configure: Regenerate.
10135
0146f85b
PA
101362010-08-27 Pedro Alves <pedro@codesourcery.com>
10137
10138 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10139 (linux_done_accessing_memory): ... this.
10140 (linux_target_ops): Adjust.
10141 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10142 * nto-low.c (nto_target_ops): Adjust comment.
10143 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10144 * spu-low.c (spu_target_ops): Adjust comment.
10145 * target.h (target_ops): Rename unprepare_to_access_memory field
10146 to done_accessing_memory.
10147 (unprepare_to_access_memory): Rename to ...
10148 (done_accessing_memory): ... this.
10149
90d74c30
PA
101502010-08-26 Pedro Alves <pedro@codesourcery.com>
10151
10152 * linux-low.c (linux_prepare_to_access_memory): New.
10153 (linux_unprepare_to_access_memory): New.
10154 (linux_target_ops): Install them.
10155 * server.c (read_memory): Rename to ...
10156 (gdb_read_memory): ... this. Use
10157 prepare_to_access_memory/prepare_to_access_memory.
10158 (write_memory): Rename to ...
10159 (gdb_write_memory): ... this. Use
10160 prepare_to_access_memory/prepare_to_access_memory.
10161 (handle_search_memory_1): Adjust.
10162 (process_serial_event): Adjust.
10163 * target.h (struct target_ops): New fields
10164 prepare_to_access_memory and unprepare_to_access_memory.
10165 (prepare_to_access_memory, unprepare_to_access_memory): New.
10166 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10167 prepare_to_access_memory/prepare_to_access_memory.
10168 * nto-low.c (nto_target_ops): Adjust.
10169 * spu-low.c (spu_target_ops): Adjust.
10170 * win32-low.c (win32_target_ops): Adjust.
10171
fd467969
PA
101722010-08-26 Pedro Alves <pedro@codesourcery.com>
10173
10174 * Makefile.in (WARN_CFLAGS): Get it from configure.
10175 (WERROR_CFLAGS): New.
10176 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10177 * configure.ac: Introduce --enable-werror, which adds -Werror to
10178 the compiler command line. Enabled by default. Disable with
10179 --disable-werror. Add -Wdeclaration-after-statement
10180 Wpointer-arith and -Wformat-nonliteral to warning flags.
10181 * configure: Regenerate.
10182
331e2f5f
PA
101832010-08-26 Pedro Alves <pedro@codesourcery.com>
10184
10185 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10186
e581f2b4
PA
101872010-08-26 Pedro Alves <pedro@codesourcery.com>
10188
10189 * gdbreplay.c (remote_error): New.
10190 (gdbchar): New.
10191 (expect): Use gdbchar. Check for error reading from GDB.
10192 Clarify sync error output.
10193 (play): Check for errors writing to GDB.
10194 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10195 * remote-utils.c (getpkt): Check for errors writing to the remote
10196 descriptor.
10197
3c11dd79
PA
101982010-08-25 Pedro Alves <pedro@codesourcery.com>
10199
10200 * linux-low.c (linux_wait_1): Move non-debugging code out of
10201 `debug_threads' control.
10202
d20a8ad9
PA
102032010-08-25 Pedro Alves <pedro@codesourcery.com>
10204
10205 * linux-low.c (linux_wait_1): Don't set last_status here.
10206 * server.c (push_event, queue_stop_reply_callback): Assert we're
10207 not pushing a TARGET_WAITKIND_IGNORE event.
10208 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10209 (myresume, handle_target_event): Set the thread's last_resume_kind
10210 and last_status from the target returned status.
10211
964e4306
PA
102122010-08-25 Pedro Alves <pedro@codesourcery.com>
10213
10214 PR threads/10729
10215
10216 * linux-x86-low.c (update_debug_registers_callback): New.
10217 (i386_dr_low_set_addr): Use it.
10218 (i386_dr_low_get_addr): New.
10219 (i386_dr_low_set_control): Use update_debug_registers_callback.
10220 (i386_dr_low_get_control): New.
10221 (i386_dr_low_get_status): Adjust.
10222 * linux-low.c (linux_stop_lwp): New.
10223 * linux-low.h (linux_stop_lwp): Declare.
10224
10225 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10226 argument instead of a i386_debug_reg_state.
10227 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10228 a i386_debug_reg_state.
10229 (i386_insert_aligned_watchpoint): Adjust.
10230 (i386_remove_aligned_watchpoint): Adjust.
10231 (i386_low_stopped_data_address): Read the debug registers from the
10232 inferior instead of from the mirrors.
10233 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10234 (i386_dr_low_get_addr): Declare.
10235 (i386_dr_low_get_control): Declare.
10236 (i386_dr_low_get_status): Change prototype.
10237
10238 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10239 (i386_dr_low_get_addr): New.
10240 (i386_dr_low_get_control): New.
10241 (i386_dr_low_get_status): Adjust prototype. Return
10242 dr_status_mirror.
10243 (i386_initial_stuff): Clear dr_status_mirror and
10244 dr_control_mirror.
10245 (i386_get_thread_context): Adjust.
10246 (i386_set_thread_context): Adjust.
10247 (i386_thread_added): Adjust.
10248
5f21a75b
PA
102492010-08-24 Pedro Alves <pedro@codesourcery.com>
10250
10251 * linux-low.h (linux_thread_area): Delete declaration.
10252
3e4c1235
TS
102532010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10254
10255 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10256 after its termination.
10257
1971b033
PA
102582010-08-09 Pedro Alves <pedro@codesourcery.com>
10259
10260 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10261 (gdb_wants_all_stopped): Delete.
10262 (linux_wait_1): Don't call them.
10263 * server.c (handle_v_cont): Tag all threads as want-stopped.
10264 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10265 stopped as "client-wants-stopped".
10266
310444ac
PA
102672010-07-31 Pedro Alves <pedro@codesourcery.com>
10268
10269 * Makefile.in (signals_h): New.
10270 (server_h): Depend on it.
10271 (server.o): Don't depend on $(signals_def).
10272 (signals.o): Depend on $(signals_def).
10273
a19cae16
JK
102742010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10275
10276 * Makefile.in (signals_def): New.
10277 (server_h): Append include/gdb/signals.h and signals_def.
10278 (server.o): Append signals_def.
10279
30d50328
JK
102802010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10281
10282 * server.c (handle_target_event): Use target_signal_to_host for
10283 resume_info.sig initialization.
10284 * target.h (struct thread_resume) <sig>: New comment.
10285
5c3216e2
OS
102862010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10287
c6f46ca0
OS
10288 * server.c (handle_query): strcpy() the returned string from paddress()
10289 instead of sprintf().
5c3216e2
OS
10290 * utils.c (paddress): Return phex_nz().
10291
6bd31874
JB
102922010-07-07 Joel Brobecker <brobecker@adacore.com>
10293
10294 * server.c (handle_v_cont): Call mourn_inferior if process
10295 just exited.
10296 (myresume): Likewise.
10297
0fb4aa4b
PA
102982010-07-01 Pedro Alves <pedro@codesourcery.com>
10299
10300 Static tracepoints, and integration with UST.
10301
10302 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10303 * mem-break.c (uninsert_all_breakpoints)
10304 (reinsert_all_breakpoints): New.
10305 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10306 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10307 (gdb_agent_ust_loaded, helper_thread_id)
10308 (gdb_agent_helper_thread_id): New macros.
10309 (struct ipa_sym_addresses): Add addr_ust_loaded,
10310 addr_helper_thread_id, addr_cmd_buf.
10311 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10312 (in_process_agent_loaded_ust): New.
10313 (write_e_ust_not_loaded): New.
10314 (maybe_write_ipa_ust_not_loaded): New.
10315 (struct collect_static_trace_data_action): New.
10316 (enum tracepoint_type) <static_tracepoint>: New.
10317 (struct tracepoint) <handle>: Mention static tracepoints.
10318 (struct static_tracepoint_ctx): New.
10319 (CMD_BUF_SIZE): New.
10320 (add_tracepoint_action): Handle static tracepoint actions.
10321 (unprobe_marker_at): New.
10322 (clear_installed_tracepoints): Handle static tracepoints.
10323 (cmd_qtdp): Handle static tracepoints.
10324 (probe_marker_at): New.
10325 (cmd_qtstart): Handle static tracepoints.
10326 (response_tracepoint): Handle static tracepoints.
10327 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10328 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10329 (get_context_regcache): Handle static tracepoints.
10330 (do_action_at_tracepoint): Handle static tracepoint actions.
10331 (traceframe_find_block_type): Handle static trace data blocks.
10332 (traceframe_read_sdata): New.
10333 (download_tracepoints): Download static tracepoint actions.
10334 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10335 (GDB_PROBE_NAME): New.
10336 (ust_ops): New.
10337 (GET_UST_SYM): New.
10338 (USTF): New.
10339 (dlsym_ust): New.
10340 (ust_marker_to_static_tracepoint): New.
10341 (gdb_probe): New.
10342 (collect_ust_data_at_tracepoint): New.
10343 (gdb_ust_probe): New.
10344 (UNIX_PATH_MAX, SOCK_DIR): New.
10345 (gdb_ust_connect_sync_socket): New.
10346 (resume_thread, stop_thread): New.
10347 (run_inferior_command): New.
10348 (init_named_socket): New.
10349 (gdb_ust_socket_init): New.
10350 (cstr_to_hexstr): New.
10351 (next_st): New.
10352 (first_marker, next_marker): New.
10353 (response_ust_marker): New.
10354 (cmd_qtfstm, cmd_qtsstm): New.
10355 (unprobe_marker_at, probe_marker_at): New.
10356 (cmd_qtstmat, gdb_ust_thread): New.
10357 (gdb_ust_init): New.
10358 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10359 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10360 (ST_REGENTRY): New.
10361 (x86_64_st_collect_regmap): New.
10362 (X86_64_NUM_ST_COLLECT_GREGS): New.
10363 (AMD64_RIP_REGNUM): New.
10364 (supply_static_tracepoint_registers): New.
10365 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10366 (ST_REGENTRY): New.
10367 (i386_st_collect_regmap): New.
10368 (i386_NUM_ST_COLLECT_GREGS): New.
10369 (supply_static_tracepoint_registers): New.
10370 * server.c (handle_query): Handle qXfer:statictrace:read.
10371 <qSupported>: Report support for StaticTracepoints, and
10372 qXfer:statictrace:read features.
10373 * server.h (traceframe_read_sdata)
10374 (supply_static_tracepoint_registers): Declare.
10375 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10376 (unpack_varlen_hex): Include in IPA build.
10377 * Makefile.in (ustlibs, ustinc): New.
10378 (IPA_OBJS): Add remote-utils-ipa.o.
10379 ($(IPA_LIB)): Link -ldl and -lpthread.
10380 (UST_CFLAGS): New.
10381 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10382 * config.in, configure: Regenerate.
10383
9e4344e5
PA
103842010-06-20 Ian Lance Taylor <iant@google.com>
10385 Pedro Alves <pedro@codesourcery.com>
10386
10387 * linux-x86-low.c (always_true): Delete.
10388 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10389 trying to fool the compiler with always_true.
10390
c6beb2cb
PA
103912010-06-20 Pedro Alves <pedro@codesourcery.com>
10392
10393 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10394 conditions in gdbserver.
10395
d2ed6730
UW
103962010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10397
10398 * spu-low.c (spu_read_memory): Wrap around local store limit.
10399 (spu_write_memory): Likewise.
10400
4e29fb54
PA
104012010-06-15 Pedro Alves <pedro@codesourcery.com>
10402
10403 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10404 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10405 LONGEST uses.
10406 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10407 uses.
10408 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10409 uses with LONGEST uses.
10410
6a271cae
PA
104112010-06-14 Stan Shebs <stan@codesourcery.com>
10412 Pedro Alves <pedro@codesourcery.com>
10413
10414 Bytecode compiler.
10415
10416 * linux-x86-low.c: Include limits.h.
10417 (add_insns): New.
10418 (always_true): New.
10419 (EMIT_ASM): New.
10420 (EMIT_ASM32): New.
10421 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10422 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10423 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10424 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10425 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10426 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10427 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10428 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10429 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10430 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10431 (amd64_emit_void_call_2): New.
10432 (amd64_emit_ops): New.
10433 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10434 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10435 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10436 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10437 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10438 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10439 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10440 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10441 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10442 (i386_emit_stack_adjust, i386_emit_int_call_1)
10443 (i386_emit_void_call_2): New.
10444 (i386_emit_ops): New.
10445 (x86_emit_ops): New.
10446 (the_low_target): Install x86_emit_ops.
10447 * server.h (struct emit_ops): New.
10448 (get_raw_reg_func_addr): Declare.
10449 (current_insn_ptr, emit_error): Declare.
10450 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10451 (set_trace_state_variable_value): New defines.
10452 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10453 addr_get_trace_state_variable_value and
10454 addr_set_trace_state_variable_value.
10455 (symbol_list): New fields for get_raw_reg,
10456 get_trace_state_variable_value and set_trace_state_variable_value.
10457 (condfn): New typedef.
10458 (struct tracepoint): New field `compiled_cond'.
10459 (do_action_at_tracepoint): Clear compiled_cond.
10460 (get_trace_state_variable_value, set_trace_state_variable_value):
10461 Export in the IPA.
10462 (condition_true_at_tracepoint): If there's a compiled condition,
10463 run that.
10464 (current_insn_ptr, emit_error): New globals.
10465 (struct bytecode_address): New.
10466 (get_raw_reg_func_addr): New.
10467 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10468 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10469 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10470 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10471 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10472 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10473 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10474 (compile_tracepoint_condition, compile_bytecodes): New.
10475 * target.h (emit_ops): Forward declare.
10476 (struct target_ops): New field emit_ops.
10477 (target_emit_ops): New.
10478 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10479 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10480 * linux-low.c (linux_emit_ops): New.
10481 (linux_target_ops): Install it.
10482 * linux-low.h (struct linux_target_ops): New field emit_ops.
10483
92b72907
UW
104842010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10487 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10488
fa593d66
PA
104892010-06-01 Pedro Alves <pedro@codesourcery.com>
10490 Stan Shebs <stan@codesourcery.com>
10491
10492 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10493 (all): Depend on $(extra_libraries).
10494 (install-only): Install the IPA.
10495 (IPA_OBJS, IPA_LIB): New.
10496 (clean): Remove the IPA lib.
10497 (IPAGENT_CFLAGS): New.
10498 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10499 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10500 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10501 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10502 * configure.ac: Check for atomic builtins support in the compiler.
10503 (IPA_DEPFILES, extra_libraries): Define.
10504 * configure.srv (ipa_obj): Add description.
10505 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10506 (i[34567]86-*-linux*): Set ipa_obj.
10507 (x86_64-*-linux*): Set ipa_obj.
10508 * linux-low.c (stabilizing_threads): New.
10509 (supports_fast_tracepoints): New.
10510 (linux_detach): Stabilize threads before detaching.
10511 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10512 the lwp is either not stabilizing, or is moving out of a jump pad.
10513 (linux_fast_tracepoint_collecting): New.
10514 (maybe_move_out_of_jump_pad): New.
10515 (enqueue_one_deferred_signal): New.
10516 (dequeue_one_deferred_signal): New.
10517 (linux_wait_for_event_1): If moving out of a jump pad, defer
10518 pending signals to later.
10519 (linux_stabilize_threads): New.
10520 (linux_wait_1): Check if threads need moving out of jump pads, and
10521 do it if so.
10522 (stuck_in_jump_pad_callback): New.
10523 (move_out_of_jump_pad_callback): New.
10524 (lwp_running): New.
10525 (linux_resume_one_lwp): Handle moving out of jump pads.
10526 (linux_set_resume_request): Dequeue deferred signals.
10527 (need_step_over_p): Also step over fast tracepoint jumps.
10528 (start_step_over): Also uninsert fast tracepoint jumps.
10529 (finish_step_over): Also reinsert fast tracepoint jumps.
10530 (linux_install_fast_tracepoint_jump): New.
10531 (linux_target_ops): Install linux_stabilize_threads and
10532 linux_install_fast_tracepoint_jump_pad.
10533 * linux-low.h (linux_target_ops) <get_thread_area,
10534 install_fast_tracepoint_jump_pad>: New fields.
10535 (struct lwp_info) <collecting_fast_tracepoint,
10536 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10537 (linux_get_thread_area): Declare.
10538 * linux-x86-low.c (jump_insn): New.
10539 (x86_get_thread_area): New.
10540 (append_insns): New.
10541 (push_opcode): New.
10542 (amd64_install_fast_tracepoint_jump_pad): New.
10543 (i386_install_fast_tracepoint_jump_pad): New.
10544 (x86_install_fast_tracepoint_jump_pad): New.
10545 (the_low_target): Install x86_get_thread_area and
10546 x86_install_fast_tracepoint_jump_pad.
10547 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10548 (struct fast_tracepoint_jump): New.
10549 (fast_tracepoint_jump_insn): New.
10550 (fast_tracepoint_jump_shadow): New.
10551 (find_fast_tracepoint_jump_at): New.
10552 (fast_tracepoint_jump_here): New.
10553 (delete_fast_tracepoint_jump): New.
10554 (set_fast_tracepoint_jump): New.
10555 (uninsert_fast_tracepoint_jumps_at): New.
10556 (reinsert_fast_tracepoint_jumps_at): New.
10557 (set_breakpoint_at): Use write_inferior_memory.
10558 (uninsert_raw_breakpoint): Use write_inferior_memory.
10559 (check_mem_read): Mask out fast tracepoint jumps.
10560 (check_mem_write): Mask out fast tracepoint jumps.
10561 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10562 (set_fast_tracepoint_jump): Declare.
10563 (delete_fast_tracepoint_jump)
10564 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10565 (reinsert_fast_tracepoint_jumps_at): Declare.
10566 * regcache.c: Don't compile many functions when building the
10567 in-process agent library.
10568 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10569 the register buffer in the heap.
10570 (free_register_cache): If the register buffer isn't owned by the
10571 regcache, don't free it.
10572 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10573 pre-existing register caches.
10574 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10575 type.
10576 (convert_ascii_to_int): : Constify `from' parameter type.
10577 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10578 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10579 the needed buffer in-place.
10580 (relocate_instruction): New.
10581 * server.c (handle_query) <qSymbols>: If the target supports
10582 tracepoints, give it a chance of looking up symbols. Report
10583 support for fast tracepoints.
10584 (handle_status): Stabilize threads.
10585 (process_serial_event): Adjust.
10586 * server.h (struct fast_tracepoint_jump): Forward declare.
10587 (struct process_info) <fast_tracepoint_jumps>: New field.
10588 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10589 (decode_X_packet, decode_M_packet): Adjust.
10590 (relocate_instruction): Declare.
10591 (in_process_agent_loaded): Declare.
10592 (tracepoint_look_up_symbols): Declare.
10593 (struct fast_tpoint_collect_status): Declare.
10594 (fast_tracepoint_collecting): Declare.
10595 (force_unlock_trace_buffer): Declare.
10596 (handle_tracepoint_bkpts): Declare.
10597 (initialize_low_tracepoint)
10598 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10599 * target.h (struct target_ops) <stabilize_threads,
10600 install_fast_tracepoint_jump_pad>: New fields.
10601 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10602 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10603 [HAVE_STDINT_H]: Include stdint.h.
10604 (trace_debug_1): Rename to ...
10605 (trace_vdebug): ... this.
10606 (trace_debug): Rename to ...
10607 (trace_debug_1): ... this. Add `level' parameter.
10608 (trace_debug): New.
10609 (ATTR_USED, ATTR_NOINLINE): New.
10610 (IP_AGENT_EXPORT): New.
10611 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10612 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10613 (about_to_request_buffer_space, trace_buffer_is_full)
10614 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10615 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10616 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10617 (traceframe_write_count, traceframes_created)
10618 (trace_state_variables)
10619 New renaming defines.
10620 (struct ipa_sym_addresses): New.
10621 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10622 (symbol_list): New.
10623 (ipa_sym_addrs): New.
10624 (all_tracepoint_symbols_looked_up): New.
10625 (in_process_agent_loaded): New.
10626 (write_e_ipa_not_loaded): New.
10627 (maybe_write_ipa_not_loaded): New.
10628 (tracepoint_look_up_symbols): New.
10629 (debug_threads) [IN_PROCESS_AGENT]: New.
10630 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10631 (UNKNOWN_SIDE_EFFECTS): New.
10632 (stop_tracing): New.
10633 (flush_trace_buffer): New.
10634 (stop_tracing_bkpt): New.
10635 (flush_trace_buffer_bkpt): New.
10636 (read_inferior_integer): New.
10637 (read_inferior_uinteger): New.
10638 (read_inferior_data_pointer): New.
10639 (write_inferior_data_pointer): New.
10640 (write_inferior_integer): New.
10641 (write_inferior_uinteger): New.
10642 (struct collect_static_trace_data_action): Delete.
10643 (enum tracepoint_type): New.
10644 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10645 <actions_str, step_actions, step_actions_str>: Only include in
10646 GDBserver.
fa593d66
PA
10647 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10648 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10649 (tracepoints): Use IP_AGENT_EXPORT.
10650 (last_tracepoint): Don't include in the IPA.
10651 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10652 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10653 (alloced_trace_state_variables): New.
10654 (trace_state_variables): Use IP_AGENT_EXPORT.
10655 (traceframe_t): Delete unused variable.
10656 (circular_trace_buffer): Don't include in the IPA.
10657 (trace_buffer_start): Delete.
10658 (struct trace_buffer_control): New.
10659 (trace_buffer_free): Delete.
10660 (struct ipa_trace_buffer_control): New.
10661 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10662 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10663 New.
10664 (trace_buffer_ctrl): New.
10665 (TRACE_BUFFER_CTRL_CURR): New.
10666 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10667 Reimplement as macros.
10668 (trace_buffer_wrap): Delete.
10669 (traceframe_write_count, traceframe_read_count)
10670 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10671 (struct tracepoint_hit_ctx) <type>: New field.
10672 (struct fast_tracepoint_ctx): New.
10673 (memory_barrier): New.
10674 (cmpxchg): New.
10675 (record_tracepoint_error): Update atomically in the IPA.
10676 (clear_inferior_trace_buffer): New.
10677 (about_to_request_buffer_space): New.
10678 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10679 updating the same buffer.
10680 (add_tracepoint): Default the tracepoint's type to trap
10681 tracepoint, and orig_size to -1.
10682 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10683 internal variables.
10684 (create_trace_state_variable): New parameter `gdb'. Handle it.
10685 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10686 (cmd_qtdp): Handle fast tracepoints.
10687 (cmd_qtdv): Adjust.
10688 (max_jump_pad_size): New.
10689 (gdb_jump_pad_head): New.
10690 (get_jump_space_head): New.
10691 (claim_jump_space): New.
10692 (sort_tracepoints): New.
10693 (MAX_JUMP_SIZE): New.
10694 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10695 IPA.
10696 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10697 support. Upload fast traceframes, and delete internal IPA
10698 breakpoints.
10699 (stop_tracing_handler): New.
10700 (flush_trace_buffer_handler): New.
10701 (cmd_qtstop): Upload fast tracepoints.
10702 (response_tracepoint): Handle fast tracepoints.
10703 (tracepoint_finished_step): Upload fast traceframes. Set the
10704 tracepoint hit context's tracepoint type.
10705 (handle_tracepoint_bkpts): New.
10706 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10707 type. Add comment about fast tracepoints.
10708 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10709 non-existing action_str field.
10710 (get_context_regcache): Handle fast tracepoints.
10711 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10712 to the regcache.
10713 (fast_tracepoint_from_jump_pad_address): New.
10714 (fast_tracepoint_from_ipa_tpoint_address): New.
10715 (collecting_t): New.
10716 (force_unlock_trace_buffer): New.
10717 (fast_tracepoint_collecting): New.
10718 (collecting): New.
10719 (gdb_collect): New.
10720 (write_inferior_data_ptr): New.
10721 (target_tp_heap): New.
10722 (target_malloc): New.
10723 (download_agent_expr): New.
10724 (UALIGN): New.
10725 (download_tracepoints): New.
10726 (download_trace_state_variables): New.
10727 (upload_fast_traceframes): New.
10728 (IPA_FIRST_TRACEFRAME): New.
10729 (IPA_NEXT_TRACEFRAME_1): New.
10730 (IPA_NEXT_TRACEFRAME): New.
10731 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10732 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10733 (gdb_jump_pad_buffer_end): New.
10734 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10735 (initialize_tracepoint): Adjust.
10736 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10737 buffer. Initialize the low module.
10738 * utils.c (PREFIX, TOOLNAME): New.
10739 (malloc_failure): Use PREFIX.
10740 (error): In the IPA, an error causes an exit.
10741 (fatal, warning): Use PREFIX.
10742 (internal_error): Use TOOLNAME.
10743 (NUMCELLS): Increase to 10.
10744 * configure, config.in: Regenerate.
10745
d149dd1d
PA
107462010-06-01 Pedro Alves <pedro@codesourcery.com>
10747
10748 * server.c (handle_query) <qSupported>: Do two passes over the
10749 qSupported string to avoid nesting strtok.
10750
f6528abd
JK
107512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10752
10753 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10754 (CDEPS): New.
10755 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10756 -Wl,--dynamic-list.
10757 * configure: Regenerate.
10758 * proc-service.list: New.
10759
ca2a87a0
JK
107602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10761
10762 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10763 New comment.
10764
363a6e9f
OS
107652010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10766
10767 * gdbreplay.c (remote_open): Check error return from socket() call by
10768 its equality to -1 not by it being negative.
10769 * remote-utils.c (remote_open): Likewise.
10770
d23b6cb1
PA
107712010-05-23 Pedro Alves <pedro@codesourcery.com>
10772
10773 * config.h: Regenerate.
10774
28d3cf85
MK
107752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10776
10777 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10778 doesn't provide PTRACE_GET_THREAD_AREA.
10779
fea36a59
MK
107802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10781
10782 * linux-m68k-low.c: Include <asm/ptrace.h>
10783 (ps_get_thread_area): Implement.
10784
24b066ba
DE
107852010-05-03 Doug Evans <dje@google.com>
10786
10787 * event-loop.c (struct callback_event): New struct.
10788 (callback_list): New global.
10789 (append_callback_event, delete_callback_event): New functions.
10790 (process_callback): New function.
10791 (start_event_loop): Call it.
10792 * remote-utils.c (NOT_SCHEDULED): Define.
10793 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10794 moved out of readchar.
10795 (readchar): Rewrite. Call reschedule before returning.
10796 (reset_readchar): New function.
10797 (remote_close): Call it.
10798 (process_remaining, reschedule): New functions.
10799 * server.h (callback_handler_func): New typedef.
10800 (append_callback_event, delete_callback_event): Declare.
10801
9836d6ea
PA
108022010-05-03 Pedro Alves <pedro@codesourcery.com>
10803
10804 * proc-service.c (ps_pglobal_lookup): Use
10805 thread_db_look_up_one_symbol.
10806 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10807 parameter. Use it instead of all_symbols_looked_up.
10808 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10809 field.
10810 (all_symbols_looked_up): Don't declare.
10811 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10812 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10813 field.
10814 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10815 Set all_symbols_looked_up here.
10816 (thread_db_look_up_one_symbol): New.
10817 (thread_db_get_tls_address): Adjust.
10818 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10819 thread_db object on the heap, and tentatively set it in the
10820 process structure.
10821 (thread_db_init): Don't set all_symbols_looked_up here.
10822 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10823
7984d532
PA
108242010-05-03 Pedro Alves <pedro@codesourcery.com>
10825
10826 * linux-low.c (linux_kill, linux_detach): Adjust.
10827 (status_pending_p_callback): Remove redundant statement. Check
10828 for !TARGET_WAITIKIND_IGNORE, instead of
10829 TARGET_WAITKIND_STOPPED.
10830 (handle_tracepoints): Make sure LWP is locked. Adjust.
10831 (linux_wait_for_event_1): Adjust.
10832 (linux_cancel_breakpoints): New.
10833 (unsuspend_one_lwp): New.
10834 (unsuspend_all_lwps): New.
10835 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10836 (send_sigstop_callback): Change return type to int, add new
10837 `except' parameter and handle it.
10838 (suspend_and_send_sigstop_callback): New.
10839 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10840 pass them down. If SUSPEND, also increment the lwp's suspend
10841 count.
10842 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10843 (need_step_over_p): Don't consider suspended LWPs.
10844 (start_step_over): Adjust.
10845 (proceed_one_lwp): Change return type to int, add new `except'
10846 parameter and handle it.
10847 (unsuspend_and_proceed_one_lwp): New.
10848 (proceed_all_lwps): Use find_inferior instead of
10849 for_each_inferior.
10850 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10851 also decrement the suspend count of LWPs. Pass `except' down,
10852 instead of hacking its suspend count.
10853 (linux_pause_all): Add `freeze' parameter. Adjust.
10854 (linux_unpause_all): New.
10855 (linux_target_ops): Install linux_unpause_all.
10856 * server.c (handle_status): Adjust.
10857 * target.h (struct target_ops): New fields `unpause_all' and
10858 `cancel_breakpoints'. Add new parameter to `pause_all'.
10859 (pause_all): Add new `freeze' parameter.
10860 (unpause_all): New.
10861 (cancel_breakpoints): New.
10862 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10863 cancel breakpoints.
10864 (cmd_qtstart): Pause threads.
10865 (stop_tracing): Pause threads, and cancel breakpoints.
10866 * win32-low.c (win32_target_ops): Adjust.
10867
e471f25b
PA
108682010-05-03 Pedro Alves <pedro@codesourcery.com>
10869
10870 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10871 the inferior right away from here...
10872 (linux_wait_1): ... to here, and adjust to check the thread's
10873 last_resume_kind instead of the lwp's step or stop_expected flags.
10874
1915ef4f
PA
108752010-05-02 Pedro Alves <pedro@codesourcery.com>
10876
10877 * README: Use consistent `GDB' and `GDBserver' spellings.
10878
f9e39928
PA
108792010-05-02 Pedro Alves <pedro@codesourcery.com>
10880
10881 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10882 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10883 (linux_detach_one_lwp): Assume the lwp is stopped.
10884 (any_thread_of): Delete.
10885 (linux_detach): Stop all lwps here. Don't blindly delete all
10886 breakpoints.
10887 (delete_lwp_callback): New.
10888 (linux_mourn): Delete all lwps of the process that is gone.
10889 (linux_wait_1): Don't delete the last lwp of the process here.
10890 * mem-break.h (mark_breakpoints_out): Declare.
10891 * mem-break.c (mark_breakpoints_out): New.
10892 (free_all_breakpoints): Use it.
10893 * server.c (handle_target_event): If the process is gone, mark
10894 breakpoints out.
10895 * thread-db.c (struct thread_db) <create_bp>: New field.
10896 (thread_db_enable_reporting): Fix prototype. Store a thread event
10897 breakpoint reference in the thread_db struct.
10898 (thread_db_load_search): Clear the thread_db object.
10899 (try_thread_db_load_1): Ditto.
10900 (switch_to_process): New.
10901 (disable_thread_event_reporting): Use it.
10902 (remove_thread_event_breakpoints): New.
10903 (thread_db_detach, thread_db_mourn): Use it.
10904
1e7fc18c
PA
109052010-05-01 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.c (linux_enable_event_reporting): New.
10908 (linux_wait_for_event_1, handle_extended_wait): Use it.
10909
02fc4de7
PA
109102010-04-30 Pedro Alves <pedro@codesourcery.com>
10911
10912 * linux-low.c (linux_kill_one_lwp, linux_kill)
10913 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10914 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10915 SIGSTOP even if the LWP is stopped.
10916 (send_sigstop_callback): New.
10917 (stop_all_lwps): Use send_sigstop_callback instead.
10918 (linux_resume_one_thread): Adjust.
10919 (proceed_one_lwp): Still proceed an LWP that the client has
10920 requested to stop, if we haven't reported it as stopped yet. Make
10921 sure that LWPs the client want stopped, have a pending SIGSTOP.
10922
bc3b5632
DE
109232010-04-26 Doug Evans <dje@google.com>
10924
ae1ada35
DE
10925 * server.c (handle_general_set): Make static.
10926
bc3b5632
DE
10927 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10928 Print received char after testing for error/eof instead of before.
10929 (input_interrupt): Tweak comment.
10930
65730243
DE
109312010-04-23 Doug Evans <dje@google.com>
10932
10933 * server.c (start_inferior): Print inferior argv if --debug.
10934
a8ae7dc0
AR
109352010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10936
10937 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10938 * nto-x86-low.c: Include server.h
10939
1c07cc19
PM
109402010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10941
10942 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10943 be consistent with other sources of this directory.
10944 (init_registers_amd64): Correct name of source file of this function
10945 in the comment.
10946
e0a61e09
PM
109472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10948
10949 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10950 64-bit executables.
10951
54709339
PM
109522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10953
10954 * win32-i386-low.c: Add 64-bit support.
10955 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10956 (init_registers_amd64): Declare.
10957 (mappings): Add 64-bit version of array.
10958 (init_windows_x86): New function.
10959 (the_low_target): Change init_arch field to init_windows_x86.
10960
e8f0053d
PM
109612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10962
10963 * win32-low.c: Adapt to support also 64-bit architecture.
10964 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10965 (get_image_name): Use SIZE_T type for local variable `done'.
10966 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10967 (toolhelp_get_dll_name): Idem.
10968 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10969 Use uintptr_t typecast to avoid warning.
10970 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10971 (handle_exception): Use phex_nz to avoid warning.
10972 (win32_wait): Remove unused local variable `process'.
10973
c481e77e
PM
109742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10975
10976 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10977 `amd64-avx.o'.
10978
12ea4b69
PM
109792010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10980
10981 * configure.ac: Use `ws2_32' library for srv_mingw.
10982 * configure: Regenerate.
10983 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10984 * remote-utils.c: Likewise.
10985
f6d1620c
L
109862010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10987
10988 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10989 if __x86_64__ is defined.
10990
8e642873
PM
109912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10992
10993 * configure: Regenerate.
10994
711e434b
PM
109952010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10996
10997 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10998 * target.h (target_ops): New get_tib_address field.
10999 * win32-low.h (win32_thread_info): Add thread_local_base field.
11000 * win32-low.c (child_add_thread): Add tlb argument.
11001 Set thread_local_base field to TLB.
11002 (get_child_debug_event): Adapt to child_add_thread change.
11003 (win32_get_tib_address): New function.
11004 (win32_target_ops): Set get_tib_address field to
11005 win32_get_tib_address.
11006 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11007
505106cd
PA
110082010-04-12 Pedro Alves <pedro@codesourcery.com>
11009
505106cd
PA
11010 * linux-low.c (linux_mourn): Also remove the process.
11011 * server.c (handle_target_event): Don't remove the process here.
11012 * nto-low.c (nto_mourn): New.
11013 (nto_target_ops): Install it.
11014 * spu-low.c (spu_mourn): New.
11015 (spu_target_ops): Install it.
11016 * win32-low.c (win32_mourn): New.
11017 (win32_target_ops): Install it.
11018
e8470a06
PA
110192010-04-12 Pedro Alves <pedro@codesourcery.com>
11020
11021 * server.h (buffer_xml_printf): Remove redundant `;'.
11022
45ba0d02
PA
110232010-04-12 Pedro Alves <pedro@codesourcery.com>
11024
11025 * regcache.c (set_register_cache): Invalidate regcaches before
11026 changing the register cache layout.
11027 (regcache_invalidate_one): Allow a NULL regcache.
11028 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11029 regcaches before changing the register cache layout or the target
11030 regsets.
11031
59e04013
L
110322010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11033
11034 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11035 variable warning on Linux/x86-64.
11036
8336d594
PA
110372010-04-11 Pedro Alves <pedro@codesourcery.com>
11038
11039 GDBserver disconnected tracing support.
11040
11041 * linux-low.c (linux_remove_process): Delete.
11042 (add_lwp): Don't set last_resume_kind here.
11043 (linux_kill): Use `mourn'.
11044 (linux_detach): Use `thread_db_detach', and `mourn'.
11045 (linux_mourn): New.
11046 (linux_attach_lwp_1): Adjust comment.
11047 (linux_attach): last_resume_kind moved the thread_info; adjust.
11048 (status_pending_p_callback): Adjust.
11049 (linux_wait_for_event_1): Adjust.
11050 (count_events_callback, select_singlestep_lwp_callback)
11051 (select_event_lwp_callback, cancel_breakpoints_callback)
11052 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11053 (proceed_one_lwp): Adjust.
11054 (linux_async): Add debug output.
11055 (linux_thread_stopped): New.
11056 (linux_pause_all): New.
11057 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11058 linux_pause_all.
11059 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11060 (thread_db_free): Delete declaration.
11061 (thread_db_detach, thread_db_mourn): Declare.
11062 * thread-db.c (thread_db_init): Use thread_db_mourn.
11063 (thread_db_free): Delete, split in two.
11064 (disable_thread_event_reporting): New.
11065 (thread_db_detach): New.
11066 (thread_db_mourn): New.
11067
11068 * server.h (struct thread_info) <last_resume_kind>: New field.
11069 <attached>: Add comment.
11070 <gdb_detached>: New field.
11071 (handler_func): Change return type to int.
11072 (handle_serial_event, handle_target_event): Ditto.
11073 (gdb_connected): Declare.
11074 (tracing): Delete.
11075 (disconnected_tracing): Declare.
11076 (stop_tracing): Declare.
11077
11078 * server.c (handle_query) <qSupported>: Report support for
11079 disconnected tracing.
11080 (queue_stop_reply_callback): Account for running threads.
11081 (gdb_wants_thread_stopped): New.
11082 (gdb_wants_all_threads_stopped): New.
11083 (gdb_reattached_process): New.
11084 (handle_status): Clear the `gdb_detached' flag of all processes.
11085 In all-stop, stop all threads.
11086 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11087 (process_serial_event): If the remote connection breaks, or if an
11088 exit was forced with "monitor exit", force an event loop exit.
11089 Handle disconnected tracing on detach.
11090 (handle_serial_event): Adjust.
11091 (handle_target_event): If GDB isn't connected, forward events back
11092 to the inferior, unless the last process exited, in which case,
11093 exit gdbserver. Adjust interface.
11094
11095 * remote-utils.c (remote_open): Don't block in accept. Instead
11096 register an event loop source on the listen socket file
11097 descriptor. Refactor bits into ...
11098 (listen_desc): ... this new global.
11099 (gdb_connected): ... this new function.
11100 (enable_async_notification): ... this new function.
11101 (handle_accept_event): ... this new function.
11102 (remote_close): Clear remote_desc.
11103
11104 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11105
11106 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11107 New fields.
11108 (mourn_inferior): Define.
11109 (target_process_qsupported): Avoid the dangling else problem.
11110 (thread_stopped): Define.
11111 (pause_all): Define.
11112 (target_waitstatus_to_string): Declare.
11113 * target.c (target_waitstatus_to_string): New.
11114
11115 * tracepoint.c (tracing): Make extern.
11116 (disconnected_tracing): New.
11117 (stop_tracing): Make extern. Handle tracing stops due to GDB
11118 disconnecting.
11119 (cmd_qtdisconnected): New.
11120 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11121 (handle_tracepoint_general_set): Handle QTDisconnected.
11122
11123 * event-loop.c (event_handler_func): Change return type to int.
11124 (process_event): Bail out if the event handler wants the event
11125 loop to stop.
11126 (handle_file_event): Ditto.
11127 (start_event_loop): Bail out if the event handler wants the event
11128 loop to stop.
11129
11130 * nto-low.c (nto_target_ops): Adjust.
11131 * spu-low.c (spu_wait): Don't remove the process here.
11132 (spu_target_ops): Adjust.
11133 * win32-low.c (win32_wait): Don't remove the process here.
11134 (win32_target_ops): Adjust.
11135
5d267c4c
PA
111362010-04-11 Pedro Alves <pedro@codesourcery.com>
11137
11138 * regcache.c (realloc_register_cache): Invalidate inferior's
11139 regcache before recreating it.
11140
623ccd72
PA
111412010-04-09 Pedro Alves <pedro@codesourcery.com>
11142
11143 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11144
219f2f23
PA
111452010-04-09 Stan Shebs <stan@codesourcery.com>
11146 Pedro Alves <pedro@codesourcery.com>
11147
11148 * server.h (LONGEST): New.
11149 (struct thread_info) <while_stepping>: New field.
11150 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11151 Declare.
11152 (initialize_tracepoint, handle_tracepoint_general_set)
11153 (handle_tracepoint_query, tracepoint_finished_step)
11154 (tracepoint_was_hit, release_while_stepping_state_list):
11155 (current_traceframe): Declare.
11156 * server.c (handle_general_set): Handle tracepoint packets.
11157 (read_memory): New.
11158 (write_memory): New.
11159 (handle_search_memory_1): Use read_memory.
11160 (handle_query): Report support for conditional tracepoints, trace
11161 state variables, and tracepoint sources. Handle tracepoint
11162 queries.
11163 (main): Initialize the tracepoints module.
11164 (process_serial_event): Handle traceframe reads/writes.
11165
11166 * linux-low.c (handle_tracepoints): New.
11167 (linux_wait_1): Call it.
11168 (linux_resume_one_lwp): Handle while-stepping.
11169 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11170 (linux_target_ops): Install them.
11171 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11172 New field.
11173 * linux-x86-low.c (x86_supports_tracepoints): New.
11174 (the_low_target). Install it.
11175
11176 * mem-break.h (delete_breakpoint): Declare.
11177 * mem-break.c (delete_breakpoint): Make external.
11178
11179 * target.h (struct target_ops): Add `supports_tracepoints',
11180 `read_pc', and `write_pc' fields.
11181 (target_supports_tracepoints): Define.
11182 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11183 (phex_nz): New.
11184
11185 * regcache.h (struct regcache) <registers_owned>: New field.
11186 (init_register_cache, regcache_cpy): Declare.
11187 (regcache_read_pc, regcache_write_pc): Declare.
11188 (register_cache_size): Declare.
11189 (supply_regblock): Declare.
11190 * regcache.c (init_register_cache): New.
11191 (new_register_cache): Use it.
11192 (regcache_cpy): New.
11193 (register_cache_size): New.
11194 (supply_regblock): New.
11195 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11196
219f2f23
PA
11197 * tracepoint.c: New.
11198
11199 * Makefile.in (OBS): Add tracepoint.o.
11200 (tracepoint.o): New rule.
11201
3a13a53b
L
112022010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11203
11204 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11205 (i386-mmx.o): New.
11206 (i386-mmx.c): Likewise.
11207 (i386-mmx-linux.o): Likewise.
11208 (i386-mmx-linux.c): Likewise.
11209
11210 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11211 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11212 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11213 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11214
11215 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11216 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11217 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11218
1570b33e
L
112192010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11220
11221 * Makefile.in (clean): Updated.
11222 (i386-avx.o): New.
11223 (i386-avx.c): Likewise.
11224 (i386-avx-linux.o): Likewise.
11225 (i386-avx-linux.c): Likewise.
11226 (amd64-avx.o): Likewise.
11227 (amd64-avx.c): Likewise.
11228 (amd64-avx-linux.o): Likewise.
11229 (amd64-avx-linux.c): Likewise.
11230
11231 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11232 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11233 (srv_amd64_regobj): Add amd64-avx.o.
11234 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11235 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11236 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11237 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11238 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11239 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11240 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11241
11242 * i387-fp.c: Include "i386-xstate.h".
11243 (i387_xsave): New.
11244 (i387_cache_to_xsave): Likewise.
11245 (i387_xsave_to_cache): Likewise.
11246 (x86_xcr0): Likewise.
11247
11248 * i387-fp.h (i387_cache_to_xsave): Likewise.
11249 (i387_xsave_to_cache): Likewise.
11250 (x86_xcr0): Likewise.
11251
11252 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11253 * linux-crisv32-low.c (target_regsets): Likewise.
11254 * linux-m68k-low.c (target_regsets): Likewise.
11255 * linux-mips-low.c (target_regsets): Likewise.
11256 * linux-ppc-low.c (target_regsets): Likewise.
11257 * linux-s390-low.c (target_regsets): Likewise.
11258 * linux-sh-low.c (target_regsets): Likewise.
11259 * linux-sparc-low.c (target_regsets): Likewise.
11260 * linux-xtensa-low.c (target_regsets): Likewise.
11261
11262 * linux-low.c: Include <sys/uio.h>.
11263 (regsets_fetch_inferior_registers): Support nt_type.
11264 (regsets_store_inferior_registers): Likewise.
11265 (linux_process_qsupported): New.
11266 (linux_target_ops): Add linux_process_qsupported.
11267
11268 * linux-low.h (regset_info): Add nt_type.
11269 (linux_target_ops): Add process_qsupported.
11270
11271 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11272 and <sys/uio.h>.
11273 (init_registers_i386_avx_linux): New.
11274 (init_registers_amd64_avx_linux): Likewise.
11275 (xmltarget_i386_linux_no_xml): Likewise.
11276 (xmltarget_amd64_linux_no_xml): Likewise.
11277 (PTRACE_GETREGSET): Likewise.
11278 (PTRACE_SETREGSET): Likewise.
11279 (x86_fill_xstateregset): Likewise.
11280 (x86_store_xstateregset): Likewise.
11281 (use_xml): Likewise.
11282 (x86_linux_update_xmltarget): Likewise.
11283 (x86_linux_process_qsupported): Likewise.
11284 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11285 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11286 init_registers_i386_linux here. Call
11287 x86_linux_update_xmltarget.
11288 (the_low_target): Add x86_linux_process_qsupported.
11289
11290 * server.c (handle_query): Call target_process_qsupported.
11291
11292 * target.h (target_ops): Add process_qsupported.
11293 (target_process_qsupported): New.
11294
fc7238bb
PA
112952010-04-03 Pedro Alves <pedro@codesourcery.com>
11296
11297 * inferiors.c (add_thread): Set last_status kind to
11298 TARGET_WAITKIND_IGNORE.
11299 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11300 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11301 (linux_wait_1): Move `thread' local definition to block that uses
11302 it. Don't NULL initialize `event_child'.
11303 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11304 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11305 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11306
bdabb078
PA
113072010-04-01 Pedro Alves <pedro@codesourcery.com>
11308
11309 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11310 an extended waitstatus, or by a watchpoint.
11311 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11312 thread was stepping or has been stopped by a watchpoint.
11313
d3bbe7a0
PA
113142010-04-01 Pedro Alves <pedro@codesourcery.com>
11315
11316 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11317 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11318 of another, then delete the previous, and validate all
11319 breakpoints.
11320 (validate_inserted_breakpoint): New.
11321 (delete_disabled_breakpoints): New.
11322 (validate_breakpoints): New.
11323 (check_mem_read): Validate breakpoints before trusting their
11324 shadow. Delete disabled breakpoints.
11325 (check_mem_write): Validate breakpoints before trusting they
11326 should be inserted. Delete disabled breakpoints.
11327 * mem-break.h (validate_breakpoints):
11328 * server.c (handle_query): Validate breakpoints when we see a
11329 qSymbol query.
11330
8b07ae33
PA
113312010-04-01 Pedro Alves <pedro@codesourcery.com>
11332
11333 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11334 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11335 if we could tell there's a GDB breakpoint at stop_pc.
11336 (need_step_over_p): Don't do a step over if we find a GDB
11337 breakpoint at the resume PC.
11338
11339 * mem-break.c (struct raw_breakpoint): New.
11340 (enum bkpt_type): New type `gdb_breakpoint'.
11341 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11342 fields. New field `raw'.
11343 (find_raw_breakpoint_at): New.
11344 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11345 breakpoint instead.
11346 (set_breakpoint_at): Adjust.
11347 (delete_raw_breakpoint): New.
11348 (release_breakpoint): New.
11349 (delete_breakpoint): Rename to...
11350 (delete_breakpoint_1): ... this. Add proc parameter. Use
11351 release_breakpoint. Return ENOENT.
11352 (delete_breakpoint): Reimplement.
11353 (find_breakpoint_at): Delete.
11354 (find_gdb_breakpoint_at): New.
11355 (delete_breakpoint_at): Delete.
11356 (set_gdb_breakpoint_at): New.
11357 (delete_gdb_breakpoint_at): New.
11358 (gdb_breakpoint_here): New.
11359 (set_reinsert_breakpoint): Use release_breakpoint.
11360 (uninsert_breakpoint): Rename to ...
11361 (uninsert_raw_breakpoint): ... this.
11362 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11363 (reinsert_raw_breakpoint): Change parameter type to
11364 raw_breakpoint.
11365 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11366 instead.
11367 (check_breakpoints): Adjust. Use release_breakpoint.
11368 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11369 (breakpoint_inserted_here): Ditto.
11370 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11371 Don't trust the breakpoint's shadow if it is not inserted.
11372 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11373 (delete_all_breakpoints): Adjust.
11374 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11375 use delete_breakpoint_1.
11376
11377 * mem-break.h (breakpoints_supported): Delete declaration.
11378 (set_gdb_breakpoint_at): Declare.
11379 (gdb_breakpoint_here): Declare.
11380 (delete_breakpoint_at): Delete.
11381 (delete_gdb_breakpoint_at): Declare.
11382
11383 * server.h (struct raw_breakpoint): Forward declare.
11384 (struct process_info): New field `raw_breakpoints'.
11385
11386 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11387 breakpoints.
11388
6bf5e0ba
PA
113892010-03-24 Pedro Alves <pedro@codesourcery.com>
11390
11391 * linux-low.c (status_pending_p_callback): Fix comment.
11392 (linux_wait_for_event_1): Move most of the internal breakpoint
11393 handling from here...
11394 (linux_wait_1): ... to here.
11395 (count_events_callback): New.
11396 (select_singlestep_lwp_callback): New.
11397 (select_event_lwp_callback): New.
11398 (cancel_breakpoints_callback): New.
11399 (select_event_lwp): New.
11400 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11401 priority to all LWPs that have had events that should be reported
11402 to the client. Cancel breakpoints when about to reporting the
11403 event to the client, not while stopping lwps. No longer cancel
11404 finished single-steps here.
11405 (cancel_finished_single_step): Delete.
11406 (cancel_finished_single_steps): Delete.
11407
414a389f
PA
114082010-03-24 Pedro Alves <pedro@codesourcery.com>
11409
11410 * mem-break.c (enum bkpt_type): New.
11411 (struct breakpoint): New field `type'.
11412 (set_breakpoint_at): Change return type to struct breakpoint
11413 pointer. Set type to `other_breakpoint' by default.
11414 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11415 in the breakpoint list.
11416 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11417 (reinsert_breakpoint): Rename to ...
11418 (reinsert_raw_breakpoint): ... this.
11419 (reinsert_breakpoints_at): Adjust.
11420 * mem-break.h (struct breakpoint): Declare.
11421 (set_breakpoint_at): Change return type to struct breakpoint
11422 pointer.
11423
2280c721
PA
114242010-03-24 Pedro Alves <pedro@codesourcery.com>
11425
11426 * server.c (handle_query): Assign, not compare.
11427
d50171e4
PA
114282010-03-24 Pedro Alves <pedro@codesourcery.com>
11429
11430 Teach linux gdbserver to step-over-breakpoints.
11431
11432 * linux-low.c (can_hardware_single_step): New.
11433 (supports_breakpoints): New.
11434 (handle_extended_wait): If stopping threads, read the stop pc of
11435 the new cloned LWP.
11436 (get_pc): New.
11437 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11438 low target doesn't support retrieving the PC.
11439 (add_lwp): Set last_resume_kind to resume_continue.
11440 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11441 (linux_attach): Don't clear stop_expected. Set the lwp's
11442 last_resume_kind to resume_stop.
11443 (linux_detach_one_lwp): Don't check for removed breakpoints.
11444 (check_removed_breakpoint): Delete.
11445 (status_pending_p): Rename to ...
11446 (status_pending_p_callback): ... this. Don't check for removed
11447 breakpoints. Don't consider threads that are stopped from GDB's
11448 perspective.
11449 (linux_wait_for_lwp): Always read the stop_pc here.
11450 (cancel_breakpoint): New.
11451 (step_over_bkpt): New global.
11452 (linux_wait_for_event_1): Implement stepping over breakpoints.
11453 (gdb_wants_lwp_stopped): New.
11454 (gdb_wants_all_stopped): New.
11455 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11456 single-step traps here. Store the thread's last reported target
11457 wait status.
11458 (send_sigstop): Don't clear stop_expected. Always set it,
11459 instead.
11460 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11461 (cancel_finished_single_step): New.
11462 (cancel_finished_single_steps): New.
11463 (wait_for_sigstop): Don't cancel finished single-step traps here.
11464 (linux_resume_one_lwp): Don't check for removed breakpoints.
11465 Don't set `step' on non-hardware step archs.
11466 (linux_set_resume_request): Ignore resume_stop requests if already
11467 stopping or stopped. Set the lwp's last_resume_kind.
11468 (resume_status_pending_p): Don't check for removed breakpoints.
11469 (need_step_over_p): New.
11470 (start_step_over): New.
11471 (finish_step_over): New.
11472 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11473 requests. Clear the thread's last reported target waitstatus.
11474 Don't use the `suspended' flag. Don't consider pending breakpoints.
11475 (linux_resume): Start a step-over if necessary.
11476 (proceed_one_lwp): New.
11477 (proceed_all_lwps): New.
11478 (unstop_all_lwps): New.
11479 * linux-low.h (struct lwp_info): Rewrite comment for the
11480 `suspended' flag. Add the `stop_pc' field. Delete the
11481 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11482 Add `'last_resume_kind' and `need_step_over' fields.
11483 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11484 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11485 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11486 (set_raw_breakpoint_at): New.
11487 (set_breakpoint_at): Rewrite to use it.
11488 (reinsert_breakpoint_handler): Delete.
11489 (set_reinsert_breakpoint): New.
11490 (reinsert_breakpoint_by_bp): Delete.
11491 (delete_reinsert_breakpoints): New.
11492 (uninsert_breakpoint): Rewrite.
11493 (uninsert_breakpoints_at): New.
11494 (reinsert_breakpoint): Rewrite.
11495 (reinsert_breakpoints_at): New.
11496 (check_breakpoints): Rewrite.
11497 (breakpoint_here): New.
11498 (breakpoint_inserted_here): New.
11499 (check_mem_read): Adjust.
11500 * mem-break.h (breakpoints_supported, breakpoint_here)
11501 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11502 (reinsert_breakpoint_by_bp): Delete declaration.
11503 (delete_reinsert_breakpoints): Declare.
11504 (reinsert_breakpoint): Delete declaration.
11505 (reinsert_breakpoints_at): Declare.
11506 (uninsert_breakpoint): Delete declaration.
11507 (uninsert_breakpoints_at): Declare.
11508 (check_breakpoints): Adjust prototype.
11509 * server.h: Adjust include order.
11510 (struct thread_info): Declare here. Add a `last_status' field.
11511
30ba68cb
MS
115122010-03-23 Michael Snyder <msnyder@vmware.com>
11513
11514 * server.c (crc32): New function.
11515 (handle_query): Add handling for 'qCRC:' request.
11516
b9a881c2
PA
115172010-03-23 Pedro Alves <pedro@codesourcery.com>
11518
11519 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11520 lwp had been stopped by a watchpoint.
11521
e92d13d5
PA
115222010-03-16 Pedro Alves <pedro@codesourcery.com>
11523
11524 * server.h (internal_error): Declare.
11525 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11526 * utils.c (internal_error): New function.
11527
64daa791
AS
115282010-03-15 Andreas Schwab <schwab@redhat.com>
11529
11530 * configure.srv: Fix typo setting srv_regobj.
11531
f52cd8cd
PA
115322010-03-15 Pedro Alves <pedro@codesourcery.com>
11533
11534 * linux-low.c (fetch_register): Avoid passing a non string literal
11535 format to `error'.
11536 (usr_store_inferior_registers): Ditto.
11537
93ae6fdc
PA
115382010-03-14 Pedro Alves <pedro@codesourcery.com>
11539
11540 * linux-low.c (linux_write_memory): Bail out early if peeking
11541 memory failed.
11542
c3adc08c
PA
115432010-03-14 Pedro Alves <pedro@codesourcery.com>
11544
11545 * linux-low.h (struct lwp_info): New fields
11546 `stopped_by_watchpoint' and `stopped_data_address'.
11547 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11548 here, and cache them in the lwp object.
11549 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11550 directly.
11551 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11552 field.
11553 (linux_stopped_by_watchpoint): Rewrite.
11554 (linux_stopped_data_address): Rewrite.
11555
bce522a2
PA
115562010-03-06 Simo Melenius <simo.melenius@iki.fi>
11557
11558 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11559 switching the current inferior, not before.
11560
90884b2b
L
115612010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11562
11563 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11564 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11565 i386-linux.c and amd64-linux.c.
11566 (reg-i386.o): Removed.
11567 (reg-i386.c): Likewise.
11568 (reg-i386-linux.o): Likewise.
11569 (reg-i386-linux.c): Likewise.
11570 (reg-x86-64.o): Likewise.
11571 (reg-x86-64.c): Likewise.
11572 (reg-x86-64-linux.o): Likewise.
11573 (reg-x86-64-linux.c): Likewise.
11574 (i386.o): New.
11575 (i386.c): Likewise.
11576 (i386-linux.o): Likewise.
11577 (i386-linux.c): Likewise.
11578 (amd64.o): Likewise.
11579 (amd64.c): Likewise.
11580 (amd64-linux.o): Likewise.
11581 (amd64-linux.c): Likewise.
11582
11583 * configure.srv (srv_i386_regobj): New.
11584 (srv_i386_linux_regobj): Likewise.
11585 (srv_amd64_regobj): Likewise.
11586 (srv_amd64_linux_regobj): Likewise.
11587 (srv_i386_32bit_xmlfiles): Likewise.
11588 (srv_i386_64bit_xmlfiles): Likewise.
11589 (srv_i386_xmlfiles): Likewise.
11590 (srv_amd64_xmlfiles): Likewise.
11591 (srv_i386_linux_xmlfiles): Likewise.
11592 (srv_amd64_linux_xmlfiles): Likewise.
11593 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11594 srv_xmlfiles to $srv_i386_xmlfiles.
11595 (i[34567]86-*-mingw32ce*): Likewise.
11596 (i[34567]86-*-mingw*): Likewise.
11597 (i[34567]86-*-nto*): Likewise.
11598 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11599 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11600 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11601 (x86_64-*-linux*): Likewise.
11602
11603 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11604 (init_registers_amd64_linux): New.
11605 (x86_arch_setup): Replace init_registers_x86_64_linux with
11606 init_registers_amd64_linux.
11607
193f13e6
MK
116082010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11609
11610 * configure.ac: Check for libdl. If it is not available link against
11611 static libthread_db.
11612 * configure: Regenerate.
11613
85d721b8
PA
116142010-02-22 Pedro Alves <pedro@codesourcery.com>
11615
11616 PR9605
11617
11618 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11619 handing a read watchpoint.
11620 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11621
6076632b
DE
116222010-02-12 Doug Evans <dje@google.com>
11623
11624 * linux-low.c (linux_supports_tracefork_flag): Document.
11625 (linux_look_up_symbols): Add comment.
11626
3327ccf7
L
116272010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11628
11629 * regcache.c (supply_register): Clear regcache if buf is NULL.
11630
0718675c 116312010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11632 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11633
11634 * inferiors.c (find_inferior): Add function documentation.
11635 (unloaded_dll): Handle the case where the unloaded dll has not
11636 been previously registered in the dll list.
11637
177321bd
DJ
116382010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11641 (thumb2_breakpoint): New.
11642 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11643
2b009048
DJ
116442010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11645
11646 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11647 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11648 breakpoints.
11649
3be029c7
PA
116502010-01-21 Pedro Alves <pedro@codesourcery.com>
11651
11652 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11653
18f5de3b
JK
116542010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11655
11656 * linux-s390-low.c (s390_collect_ptrace_register)
11657 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11658
3743bb4f
DE
116592010-01-21 Doug Evans <dje@google.com>
11660
14ce3065
DE
11661 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11662 (PTRACE_ARG4_TYPE): New macro.
11663 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11664 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11665 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11666 (usr_store_inferior_registers): Ditto.
11667 (linux_read_memory, linux_write_memory): Ditto.
11668 (linux_test_for_tracefork): Ditto.
11669
3743bb4f
DE
11670 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11671 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11672
8b315be5
PA
116732010-01-21 Pedro Alves <pedro@codesourcery.com>
11674
11675 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11676 target.
11677
85492558
PA
116782010-01-21 Pedro Alves <pedro@codesourcery.com>
11679
11680 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11681 prototype to take a regcache. Adjust.
11682
442ea881
PA
116832010-01-20 Pedro Alves <pedro@codesourcery.com>
11684
11685 * regcache.h (struct thread_info): Forward declare.
11686 (struct regcache): New.
11687 (new_register_cache): Adjust prototype.
11688 (get_thread_regcache): Declare.
11689 (free_register_cache): Adjust prototype.
11690 (registers_to_string, registers_from_string): Ditto.
11691 (supply_register, supply_register_by_name, collect_register)
11692 (collect_register_as_string, collect_register_by_name): Ditto.
11693 * regcache.c (struct inferior_regcache_data): Delete.
11694 (get_regcache): Rename to ...
11695 (get_thread_regcache): ... this. Adjust. Switch inferior before
11696 fetching registers.
11697 (regcache_invalidate_one): Adjust.
11698 (regcache_invalidate): Fix prototype.
11699 (new_register_cache): Return the new register cache.
11700 (free_register_cache): Change prototype.
11701 (realloc_register_cache): Adjust.
11702 (registers_to_string): Change prototype to take a regcache. Adjust.
11703 (registers_from_string): Ditto.
11704 (register_data): Ditto.
11705 (supply_register): Ditto.
11706 (supply_register_by_name): Ditto.
11707 (collect_register): Ditto.
11708 (collect_register_as_string): Ditto.
11709 (collect_register_by_name): Ditto.
11710 * server.c (process_serial_event): Adjust.
11711 * linux-low.h (regset_fill_func, regset_store_func): Change
11712 prototype.
11713 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11714 Change prototype.
11715 * linux-low.c (get_stop_pc): Adjust.
11716 (check_removed_breakpoint): Adjust.
11717 (linux_wait_for_event): Adjust.
11718 (linux_resume_one_lwp): Adjust.
11719 (fetch_register): Add regcache parameter. Adjust.
11720 (usr_store_inferior_registers): Ditto.
11721 (regsets_fetch_inferior_registers): Ditto.
11722 (regsets_store_inferior_registers): Ditto.
11723 (linux_fetch_registers, linux_store_registers): Ditto.
11724 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11725 regcache. Adjust.
43aaf8b6
PA
11726 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11727 Ditto.
442ea881
PA
11728 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11729 prototype to take a regcache.
11730 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11731 * remote-utils.c (convert_ascii_to_int, outreg)
11732 (prepare_resume_reply): Change prototype to take a regcache.
11733 Adjust.
11734 * target.h (struct target_ops) <fetch_registers, store_registers>:
11735 Change prototype to take a regcache.
11736 (fetch_inferior_registers, store_inferior_registers): Change
11737 prototype to take a regcache. Adjust.
11738 * proc-service.c (ps_lgetregs): Adjust.
11739 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11740 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11741 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11742 take a regcache. Adjust.
11743 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11744 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11745 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11746 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11747 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11748 (cris_cannot_fetch_register):
11749 (cris_breakpoint_at): Change prototype to take a regcache.
11750 Adjust.
11751 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11752 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11753 to take a regcache. Adjust.
11754 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11755 Adjust.
11756 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11757 take a regcache. Adjust.
11758 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11759 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11760 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11761 * linux-mips-low.c (mips_get_pc):
11762 (mips_set_pc): Change prototype to take a regcache. Adjust.
11763 (mips_reinsert_addr): Adjust.
11764 (mips_collect_register): Change prototype to take a regcache.
11765 Adjust.
11766 (mips_supply_register):
11767 (mips_collect_register_32bit, mips_supply_register_32bit)
11768 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11769 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11770 * linux-ppc-low.c (ppc_supply_ptrace_register)
11771 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11772 (parse_spufs_run): Adjust.
11773 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11774 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11775 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11776 take a regcache. Adjust.
11777 * linux-s390-low.c (s390_collect_ptrace_register)
11778 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11779 (s390_set_pc): Change prototype to take a regcache. Adjust.
11780 (s390_arch_setup): Adjust.
11781 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11782 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11783 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11784 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11785 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11786 regcache. Adjust.
11787 (sparc_breakpoint_at): Adjust.
11788 * linux-xtensa-low.c (xtensa_fill_gregset):
11789 (xtensa_store_gregset):
11790 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11791 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11792 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11793 prototype to take a regcache. Adjust.
11794 * win32-arm-low.c (arm_fetch_inferior_register)
11795 (arm_store_inferior_register): Change prototype to take a
11796 regcache. Adjust.
11797 * win32-i386-low.c (i386_fetch_inferior_register)
11798 (i386_store_inferior_register): Change prototype to take a
11799 regcache. Adjust.
11800 * win32-low.c (child_fetch_inferior_registers)
11801 (child_store_inferior_registers): Change prototype to take a
11802 regcache. Adjust.
11803 (win32_wait): Adjust.
11804 (win32_fetch_inferior_registers): Change prototype to take a
11805 regcache. Adjust.
11806 (win32_store_inferior_registers): Adjust.
11807 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11808 store_inferior_register>: Change prototype to take a regcache.
11809
60c3d7b0
DE
118102010-01-20 Doug Evans <dje@google.com>
11811
11812 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11813 #ifdef.
11814 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11815 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11816
dc146f7c
VP
118172010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11818
11819 * linux-low.c (linux_core_of_thread): New.
11820 (compare_ints, show_process, list_threads): New.
11821 (linux_qxfer_osdata): Report threads and cores.
11822 (linux_target_op): Register linux_core_of_thread.
11823 * remote-utils.c (prepare_resume_reply): Report the core.
11824 (buffer_xml_printf): Support %d specifier.
11825 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11826 New.
11827 (handle_query): Handle qXfer:threads. Announce availability
11828 thereof.
11829 * target.h (struct target_ops): New field core_of_thread.
11830
7803799a
UW
118312010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11832
11833 * Makefile.in (clean): Remove new generated files.
11834 (reg-s390.o, reg-s390.c): Remove rules.
11835 (reg-s390x.o, reg-s390x.c): Likewise.
11836 (s390-linux32.o, s390-linux32.c): Add rules.
11837 (s390-linux64.o, s390-linux64.c): Likewise.
11838 (s390x-linux64.o, s390x-linux64.c): Likewise.
11839 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11840 * linux-s390-low.c: Include <elf.h>.
11841 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11842 (init_registers_s390): Remove prototype.
11843 (init_registers_s390x): Likewise.
11844 (init_registers_s390_linux32): Add prototype.
11845 (init_registers_s390_linux64): Likewise.
11846 (init_registers_s390x_linux64): Likewise.
11847 (s390_num_regs_3264): New define.
11848 (s390_regmap_3264): New global variable.
11849 (s390_cannot_fetch_register): Remove obsolete check.
11850 (s390_cannot_store_register): Likewise.
11851 (s390_collect_ptrace_register): Handle upper/lower register halves.
11852 (s390_supply_ptrace_register): Likewise.
11853 (s390_fill_gregset): Update to register number changes.
11854 (s390_get_hwcap): New routine.
11855 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11856 Install appropriate regmap and register set.
11857
6e7ffa39
JB
118582010-01-01 Joel Brobecker <brobecker@adacore.com>
11859
11860 * server.c (gdbserver_version): Update copyright year to 2010.
11861 * gdbreplay.c (gdbreplay_version): Likewise.
11862
957f3f49
DE
118632009-12-28 Doug Evans <dje@google.com>
11864
11865 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11866 elf/external.h. Include <elf.h> instead but only if necessary.
11867
ca5c370d
PA
118682009-12-28 Pedro Alves <pedro@codesourcery.com>
11869
11870 * linux-low.c (linux_remove_process): Remove `detaching'
11871 parameter. Don't release/detach from thread_db here.
11872 (linux_kill): Release/detach from thread_db here, ...
11873 (linux_detach): ... and here, before actually detaching.
11874 (linux_wait_1): ... and here, when a process exits.
11875 * thread-db.c (any_thread_of): New.
11876 (thread_db_free): Switch the current inferior to a thread of the
11877 passed in process.
11878
4ee62156
DE
118792009-12-21 Doug Evans <dje@google.com>
11880
d90e6a88
DE
11881 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11882
c5f62d5f
DE
11883 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11884 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11885 warning ifndef __NR_tkill. Move setting of errno there too.
11886 Delete unnecessary resetting of errno after syscall.
11887 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11888
10e86dd7
DE
11889 * configure.ac: Check for dladdr.
11890 * config.in: Regenerate.
11891 * configure: Regenerate.
11892 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11893 (try_thread_db_load): Update.
11894
4ee62156
DE
11895 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11896
00f515da
DE
118972009-12-18 Doug Evans <dje@google.com>
11898
e9464885
DE
11899 * event-loop.c: Include unistd.h if it exists.
11900
07d4f67e
DE
11901 * linux-low.c (my_waitpid): Move definition away from being in
11902 between linux_tracefork_child/linux_test_for_tracefork.
11903
00f515da
DE
11904 * gdb_proc_service.h (psaddr_t): Fix type.
11905 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11906 signature to match glibc.
11907
1de1badb
DE
119082009-12-16 Doug Evans <dje@google.com>
11909
11910 * linux-low.c (linux_read_memory): Fix argument to read.
11911
aeeb81d1
PA
119122009-11-26 Pedro Alves <pedro@codesourcery.com>
11913
11914 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11915 events, don't leave current_inferior pointing at null.
11916
10357975
PA
119172009-11-26 Pedro Alves <pedro@codesourcery.com>
11918
11919 * win32-low.c (LOG): Delete.
11920 (OUTMSG): Output to stderr.
11921 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11922 on compile time LOG macro.
11923 (win32_wait): Fix debug output.
11924
cf6e3471
PA
119252009-11-26 Pedro Alves <pedro@codesourcery.com>
11926
11927 * win32-low.c (win32_add_one_solib): If the dll name is
11928 "ntdll.dll", prepend the system directory to the dll path.
11929
0c85e18e
MK
119302009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11931
11932 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11933
9ac544ce 119342009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11935 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11936
11937 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11938 * configure.ac: Check for __mcoldfire__ and set
11939 gdb_cv_m68k_is_coldfire.
11940 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11941 reg-cf.o and reg-m68k.o.
11942 * configure: Regenerated.
11943
fd7dd3e6
PA
119442009-11-16 Pedro Alves <pedro@codesourcery.com>
11945
11946 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11947 Pass it to thread_db_free.
11948 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11949 proper `detaching' argument to linux_remove_process.
11950 * linux-low.h (thread_db_free): Add `detaching' parameter.
11951 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11952 to thread_db_free.
11953 (thread_db_free): Add `detaching' parameter. Only
11954 call td_ta_clear_event if detaching from process.
11955
75aa492e
MK
119562009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11957
11958 * thread-db.c (thread_db_free): Fix typo.
11959
21e1bee4
PP
119602009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11961
11962 PR gdb/10838
11963 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11964
8838b45e
NS
119652009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11966
11967 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11968 with an i686 compiler.
11969 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11970 needed.
11971 * configure: Rebuilt.
11972
8a35fb51
SL
119732009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11974
11975 PR gdb/10783
11976
11977 * server.c (handle_search_memory_1): Correct read_addr initialization
11978 in loop for searching subsequent chunks.
11979
96f15937
PP
119802009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11981
11982 * configure.ac: New --with-libthread-db option.
11983 * thread-db.c: Allow direct dependence on libthread_db.
11984 (thread_db_free): Adjust.
11985 * config.in: Regenerate.
11986 * configure: Likewise.
889bf7c5 11987
5f7d1694
PP
119882009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11989
11990 PR gdb/10757
11991 * thread-db.c (attach_thread): New function.
11992 (maybe_attach_thread): Return success/failure.
11993 (find_new_threads_callback): Adjust.
889bf7c5
PA
11994 (thread_db_find_new_threads): Loop until no new threads.
11995
88e3b899
PA
119962009-10-13 Pedro Alves <pedro@codesourcery.com>
11997
11998 * proc-service.c (ps_lgetregs): Formatting.
11999
cdbfd419
PP
120002009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12001
12002 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12003 * configure.ac: Adjust.
12004 * linux-low.h (struct process_info_private): Move members to struct
12005 thread_db.
12006 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12007 * linux-low.c (linux_remove_process): Adjust.
12008 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12009 * server.c (handle_query): Move code ...
12010 (handle_monitor_command): ... here. New function.
12011 * target.h (struct target_ops): New member.
12012 * thread-db.c (struct thread_db): New.
12013 (libthread_db_search_path): New variable.
12014 (thread_db_create_event, thread_db_enable_reporting)
12015 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12016 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12017 (try_thread_db_load_1, dladdr_to_soname): New functions.
12018 (try_thread_db_load, thread_db_load_search): New functions.
12019 (thread_db_init): Search for libthread_db.
12020 (thread_db_free): New function.
12021 (thread_db_handle_monitor_command): Likewise.
12022 * config.in: Regenerate.
12023 * configure: Regenerate.
889bf7c5 12024
4168d2d6
UW
120252009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12026
12027 * spu-low.c (spu_kill): Wait for inferior to terminate.
12028 Call clear_inferiors.
12029 (spu_detach): Call clear_inferiors.
12030
81ecdfbb
RW
120312009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12032
12033 * aclocal.m4: Regenerate.
12034 * config.in: Likewise.
12035 * configure: Likewise.
12036
0b9ff2c0
UW
120372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12038
12039 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12040 (parse_spufs_run): New function.
12041 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12042 (ppc_breakpoint_at): Handle SPU breakpoints.
12043
efcbbd14
UW
120442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12045
12046 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12047 (SPUFS_MAGIC): Define.
12048 (spu_enumerate_spu_ids): New function.
12049 (linux_qxfer_spu): New function.
12050 (linux_target_ops): Install linux_qxfer_spu.
12051
f4d9bade
UW
120522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12053
12054 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12055 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12056 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12057 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12058 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12059 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12060 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12061 (init_registers_powerpc_cell32l): Add prototype.
12062 (init_registers_powerpc_cell64l): Likewise.
12063 (ppc_arch_setup): Detect Cell/B.E. architecture.
12064
96e946ca
RW
120652009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12066
12067 * Makefile.in (datarootdir): New variable.
12068
58d6951d
DJ
120692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12070
12071 * linux-low.c (linux_write_memory): Update debugging output.
12072 * Makefile.in (clean): Add new descriptions.
12073 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12074 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12075 * configure.srv: Add new files for arm*-*-linux*.
12076 * linux-arm-low.c: Add new declarations.
12077 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12078 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12079 (HWCAP_VFPv3D16): New.
12080 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12081 instead of __IWMMXT__.
12082 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12083 (arm_arch_setup): New.
12084 (target_regsets): Remove #ifdef. Add VFP regset.
12085 (the_low_target): Use arm_arch_setup.
12086
12b42a12
DJ
120872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12088
12089 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12090 the main thread again.
12091
ac8c974e
AR
120922009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12093
12094 Adding Neutrino gdbserver.
12095 * configure: Regenerated.
12096 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12097 * configure.srv (i[34567]86-*-nto*): New target.
12098 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12099 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12100 (nto_comctrl) [__QNX__]: New function.
12101 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12102
4424e0c3 121032009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12104
12105 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12106 srv_tgtobj.
12107
912cf4ba
PA
121082009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12109 Pedro Alves <pedro@codesourcery.com>
12110
12111 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12112 don't support CONTEXT_EXTENDED_REGISTERS.
12113 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12114 (the_low_target): Install them.
12115 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12116 failing with ERROR_PIPE_NOT_CONNECTED.
12117
aa5ca48f
DE
121182009-06-30 Doug Evans <dje@google.com>
12119 Pierre Muller <muller@ics.u-strasbg.fr>
12120
12121 Add h/w watchpoint support to x86-linux, win32-i386.
12122 * Makefile.in (SFILES): Add i386-low.c
12123 (i386_low_h): Define.
12124 (i386-low.o): Add dependencies.
12125 (linux-x86-low.o): Add i386-low.h dependency.
12126 (win32-i386-low.o): Ditto.
12127 * i386-low.c: New file.
12128 * i386-low.h: New file.
12129 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12130 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12131 * linux-low.c (linux_add_process): Initialize arch_private.
12132 (linux_remove_process): Free arch_private.
12133 (add_lwp): Initialize arch_private.
12134 (delete_lwp): Free arch_private.
12135 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12136 provided.
12137 * linux-low.h (process_info_private): New member arch_private.
12138 (lwp_info): New member arch_private.
12139 (linux_target_ops): New members new_process, new_thread,
12140 prepare_to_resume.
12141 (ptid_of): New macro.
12142 * linux-x86-low.c: Include stddef.h, i386-low.h.
12143 (arch_process_info): New struct.
12144 (arch_lwp_info): New struct.
12145 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12147 (i386_dr_low_get_status): New function.
12148 (x86_insert_point, x86_remove_point): New functions.
12149 (x86_stopped_by_watchpoint): New function.
12150 (x86_stopped_data_address): New function.
12151 (x86_linux_new_process, x86_linux_new_thread): New functions.
12152 (x86_linux_prepare_to_resume): New function.
12153 (the_low_target): Add entries for insert_point, remove_point,
12154 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12155 prepare_to_resume.
12156 * server.c (debug_hw_points): New global.
12157 (monitor_show_help): Document set debug-hw-points.
12158 (handle_query): Process "set debug-hw-points".
12159 * server.h (debug_hw_points): Declare.
12160 (paddress): Declare.
12161 * utils.c (NUMCELLS, CELLSIZE): New macros.
12162 (get_sell, xsnprintf, paddress): New functions.
12163 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12164 remove_point, stopped_by_watchpoint, stopped_data_address.
12165 * win32-i386-low.c: Include i386-low.h.
12166 (debug_reg_state): Replaces dr.
12167 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12168 (i386_dr_low_get_status): New function.
12169 (i386_insert_point, i386_remove_point): New functions.
12170 (i386_stopped_by_watchpoint): New function.
12171 (i386_stopped_data_address): New function.
12172 (i386_initial_stuff): Update.
12173 (get_thread_context,set_thread_context,i386_thread_added): Update.
12174 (the_low_target): Add entries for insert_point,
12175 remove_point, stopped_by_watchpoint, stopped_data_address.
12176 * win32-low.c (win32_insert_watchpoint): New function.
12177 (win32_remove_watchpoint): New function.
12178 (win32_stopped_by_watchpoint): New function.
12179 (win32_stopped_data_address): New function.
12180 (win32_target_ops): Add entries for insert_watchpoint,
12181 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12182 * win32-low.h (win32_target_ops): New members insert_point,
12183 remove_point, stopped_by_watchpoint, stopped_data_address.
12184
d993e290
PA
121852009-06-25 Pedro Alves <pedro@codesourcery.com>
12186
12187 * server.c (process_serial_event): Re-return unsupported, not
12188 error, if the type isn't recognized. Re-allow supporting only
12189 insert or remove packets. Also call require_running for
12190 breakpoints. Add missing break statement to default case. Tidy.
12191 * target.h (struct target_ops): Rename insert_watchpoint to
12192 insert_point, and remove_watchpoint to remove_point.
12193
12194 * linux-low.h (struct linux_target_ops): Likewise.
12195 * linux-low.c (linux_insert_watchpoint): Rename to ...
12196 (linux_insert_point): ... this. Adjust.
12197 (linux_remove_watchpoint): Rename to ...
12198 (linux_remove_point): ... this. Adjust.
12199 (linux_target_ops): Adjust.
12200 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12201 (cris_insert_point): ... this.
12202 (cris_remove_watchpoint): Rename to ...
12203 (cris_remove_point): ... this.
12204 (the_low_target): Adjust.
12205
0f54c268
PM
122062009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12207
12208 * server.c (handle_v_kill): Pass signal_pid to
12209 kill_inferior if multi_process is zero.
12210
c6314022
AR
122112009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12212
12213 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12214 * target.h (target_ops): Comment for *_watchpoint to make it clear
12215 the functions can get types '0' and '1'.
12216
4463ce24
AR
122172009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12218
12219 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12220 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12221 * regcache.c (get_regcache): Likewise.
12222 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12223 * win32-low.c (child_fetch_inferior_registers): Remove check for
12224 regno 0.
12225
cf8fd78b
PA
122262009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12227 Pedro Alves <pedro@codesourcery.com>
12228
12229 * target.h (struct target_ops) <supports_multi_process>: New
12230 callback.
12231 (target_supports_multi_process): New.
12232 * server.c (handle_query): Even if GDB reports support, only
12233 enable multi-process if the target also supports it. Report
12234 multi-process support only if the target backend supports it.
12235 * linux-low.c (linux_supports_multi_process): New function.
12236 (linux_target_ops): Install it as target_supports_multi_process
12237 callback.
12238
47c0c975
DE
122392009-05-24 Doug Evans <dje@google.com>
12240
e09875d4
DE
12241 Global renaming of find_thread_pid to find_thread_ptid.
12242 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12243 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12244 All callers updated.
12245
e27d73f6
DE
12246 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12247 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12248 directly.
12249
47c0c975
DE
12250 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12251 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12252 (linux_resume_one_lwp): Ditto.
12253
2acc282a
DE
122542009-05-23 Doug Evans <dje@google.com>
12255
12256 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12257 from struct inferior_list_entry * to struct lwp_info *.
12258 All callers updated.
12259
9f1036c1
DE
122602009-05-13 Doug Evans <dje@google.com>
12261
12262 * linux-x86-low.c: Don't include assert.h.
12263 (x86_siginfo_fixup): Use fatal, not assert.
12264 (x86_arch_setup): Fix comment.
12265
d0722149
DE
122662009-05-12 Doug Evans <dje@google.com>
12267
12268 Biarch support for i386/amd64 gdbserver.
12269 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12270 Add linux-x86-low.c.
12271 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12272 (linux-x86-low.o): Add.
12273 * linux-x86-64-low.c: Delete.
12274 * linux-i386-low.c: Delete.
12275 * linux-x86-low.c: New file.
12276 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12277 linux-x86-low.o.
12278 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12279 linux-x86-low.o.
12280 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12281 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12282 (linux_child_pid_to_exec_file): New function.
12283 (elf_64_header_p, elf_64_file_p): New functions.
12284 (siginfo_fixup): New function.
12285 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12286 give target a chance to convert layout.
12287 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12288 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12289
fdeb2a12
DE
122902009-05-07 Doug Evans <dje@google.com>
12291
12292 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12293 (regsets_store_inferior_registers): Ditto.
12294
a6dbe5df
PA
122952009-05-06 Pedro Alves <pedro@codesourcery.com>
12296
12297 PR server/10048
12298
12299 * linux-low.c (must_set_ptrace_flags): Delete.
12300 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12301 of the global.
12302 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12303 `lwp->must_set_ptrace_flags' instead.
ba42693b 12304 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12305 (linux_wait_1): ... not here.
12306
5091eb23
DE
123072009-04-30 Doug Evans <dje@google.com>
12308
9f767825
DE
12309 * inferiors.c (started_inferior_callback): New function.
12310 (attached_inferior_callback): New function.
12311 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12312 * server.c (print_started_pid, print_attached_pid): New functions.
12313 (detach_or_kill_for_exit): New function.
12314 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12315 * server.h (have_started_inferiors_p): Declare.
12316 (have_attached_inferiors_p): Declare.
12317
5091eb23
DE
12318 * inferiors.c (remove_process): Fix memory leak, free process.
12319 * linux-low.c (linux_remove_process): New function.
12320 (linux_kill): Call it instead of remove_process.
12321 (linux_detach, linux_wait_1): Ditto.
12322
155c8968
PA
123232009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12324
12325 * configure.srv: Add x86 Windows CE target.
12326
7fe519cb
UW
123272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * inferiors.c (get_thread_process): Make global.
12330 * server.h (get_thread_process): Add prototype.
12331 * thread-db.c (find_one_thread): Use get_thread_process
12332 instead of current_process.
12333 (thread_db_get_tls_address): Do not crash if called when
12334 thread layer is not yet initialized.
12335
5472f405
UW
123362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12337
12338 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12339 * spu-low.c (current_tid): Rename to ...
12340 (current_ptid): ... this.
12341 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12342 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12343 ptid_get_lwp (current_ptid) instead of current_tid.
12344 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12345 instead of current_tid. Use find_process_pid to verify pid
12346 argument is valid. Pass proper argument to remove_process.
12347 (spu_thread_alive): Compare current_ptid instead of current_tid.
12348 (spu_resume): Likewise.
12349
55ac2b99
PA
123502009-04-02 Pedro Alves <pedro@codesourcery.com>
12351
12352 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12353 variable.
12354
95954743
PA
123552009-04-01 Pedro Alves <pedro@codesourcery.com>
12356
12357 Implement the multiprocess extensions, and add linux multiprocess
12358 support.
12359
12360 * server.h (ULONGEST): Declare.
12361 (struct ptid, ptid_t): New.
12362 (minus_one_ptid, null_ptid): Declare.
12363 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12364 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12365 (struct inferior_list_entry): Change `id' type from unsigned from
12366 to ptid_t.
12367 (struct sym_cache, struct breakpoint, struct
12368 process_info_private): Forward declare.
12369 (struct process_info): Declare.
12370 (current_process): Declare.
12371 (all_processes): Declare.
12372 (initialize_inferiors): Declare.
12373 (add_thread): Adjust to use ptid_t.
12374 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12375 (add_process, remove_process, find_thread_pid): Declare.
12376 (find_inferior_id): Adjust to use ptid_t.
12377 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12378 (multi_process): Declare.
12379 (push_event): Adjust to use ptid_t.
12380 (read_ptid, write_ptid): Declare.
12381 (prepare_resume_reply): Adjust to use ptid_t.
12382 (clear_symbol_cache): Declare.
12383 * inferiors.c (all_processes): New.
12384 (null_ptid, minus_one_ptid): New.
12385 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12386 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12387 (add_thread): Change unsigned long to ptid. Remove gdb_id
12388 parameter. Adjust.
12389 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12390 (gdb_id_to_thread): Rename to ...
12391 (find_thread_pid): ... this. Change unsigned long to ptid.
12392 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12393 (loaded_dll, pull_pid_from_list): Adjust.
12394 (add_process, remove_process, find_process_pid)
12395 (get_thread_process, current_process, initialize_inferiors): New.
12396 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12397 (struct target_waitstatus) <related_pid>: Ditto.
12398 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12399 return type to int.
12400 (struct target_ops) <join>: Add `pid' argument.
12401 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12402 (struct target_ops) <wait>: Add `ptid' field. Change return type
12403 to ptid.
12404 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12405 (mywait): Add `ptid' argument. Change return type to ptid_t.
12406 (target_pid_to_str): Declare.
12407 * target.c (set_desired_inferior): Adjust to use ptids.
12408 (mywait): Add new `ptid' argument. Adjust.
12409 (target_pid_to_str): New.
12410 * mem-break.h (free_all_breakpoints): Declare.
12411 * mem-break.c (breakpoints): Delelete.
12412 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12413 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12414 to use per-process breakpoint list.
12415 (free_all_breakpoints): New.
12416 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12417 (symbol_cache, all_symbols_looked_up): Delete.
12418 (hexchars): New.
12419 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12420 read_ptid): New.
12421 (prepare_resume_reply): Change ptid argument's type from unsigned
12422 long to ptid_t. Adjust. Implement W;process and X;process.
12423 (free_sym_cache, clear_symbol_cache): New.
12424 (look_up_one_symbol): Adjust to per-process symbol cache. *
12425 * server.c (cont_thread, general_thread, step_thread): Change type
12426 to ptid_t.
12427 (attached): Delete.
12428 (multi_process): New.
12429 (last_ptid): Change type to ptid_t.
12430 (struct vstop_notif) <ptid>: Change type to ptid_t.
12431 (queue_stop_reply, push_event): Change `ptid' argument's type to
12432 ptid_t.
12433 (discard_queued_stop_replies): Add `pid' argument.
12434 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12435 changes. Don't reference the `attached' global.
12436 (attach_inferior): Adjust to mywait interface changes.
12437 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12438 features. Handle and report "multiprocess+". Handle
12439 "qAttached:PID".
12440 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12441 changes.
12442 (handle_v_kill): New.
12443 (handle_v_stopped): Adjust to use target_pid_to_str.
12444 (handle_v_requests): Allow multiple attaches and runs when
12445 multiprocess extensions are in effect. Handle "vKill".
12446 (myresume): Adjust to use ptids.
12447 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12448 (handle_status): Adjust to discard_queued_stop_replies interface
12449 change.
12450 (first_thread_of, kill_inferior_callback)
12451 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12452 (main): Call initialize_inferiors. Adjust to use ptids, killing
12453 and detaching from all inferiors. Handle multiprocess packet
12454 variants.
12455 * linux-low.h: Include gdb_proc_service.h.
12456 (struct process_info_private): New.
12457 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12458 <lwpid_of>: Use ptid_get_lwp.
12459 (get_lwp_thread): Adjust.
12460 (struct lwp_info): Add `dead' member.
12461 (find_lwp_pid): Declare.
12462 * linux-low.c (thread_db_active): Delete.
12463 (new_inferior): Adjust comment.
12464 (inferior_pid): Delete.
12465 (linux_add_process): New.
12466 (handle_extended_wait): Adjust.
12467 (add_lwp): Change unsigned long to ptid.
12468 (linux_create_inferior): Add process to processes table. Adjust
12469 to use ptids. Don't set new_inferior here.
12470 (linux_attach_lwp): Rename to ...
12471 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12472 it. Adjust to use ptids.
12473 (linux_attach_lwp): New.
12474 (linux_attach): Add process to processes table. Don't set
12475 new_inferior here.
12476 (struct counter): New.
12477 (second_thread_of_pid_p, last_thread_of_process_p): New.
12478 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12479 multiple processes.
12480 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12481 processes. Remove process from process table.
12482 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12483 to multiple processes.
12484 (any_thread_of): New.
12485 (linux_detach): Add `pid' argument, and handle it. Remove process
12486 from processes table.
12487 (linux_join): Add `pid' argument. Handle it.
12488 (linux_thread_alive): Change unsighed long argument to ptid_t.
12489 Consider dead lwps as not being alive.
12490 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12491 threads we're not interested in.
12492 (same_lwp, find_lwp_pid): New.
12493 (linux_wait_for_lwp): Change `pid' argument's type from int to
12494 ptid_t. Adjust.
12495 (linux_wait_for_event): Rename to ...
12496 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12497 from int to ptid_t. Adjust.
12498 (linux_wait_for_event): New.
12499 (linux_wait_1): Add `ptid' argument. Change return type to
12500 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12501 that exit from the process table.
12502 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12503 Adjust.
12504 (mark_lwp_dead): New.
12505 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12506 stopping all threads, mark its main lwp as dead.
12507 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12508 ptids.
12509 (fetch_register, usr_store_inferior_registers)
12510 (regsets_fetch_inferior_registers)
12511 (regsets_store_inferior_registers, linux_read_memory)
12512 (linux_write_memory): Inline `inferior_pid'.
12513 (linux_look_up_symbols): Adjust to use per-process
12514 `thread_db_active'.
12515 (linux_request_interrupt): Adjust to use ptids.
12516 (linux_read_auxv): Inline `inferior_pid'.
12517 (initialize_low): Don't reference thread_db_active.
12518 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12519 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12520 (ps_getpid): Return the pid of the current inferior.
12521 * thread-db.c (proc_handle, thread_agent): Delete.
12522 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12523 per-process data.
12524 (find_one_thread): Change argument type to ptid_t. Adjust to
12525 per-process data.
12526 (maybe_attach_thread): Adjust to per-process data and ptids.
12527 (thread_db_find_new_threads): Ditto.
12528 (thread_db_init): Ditto.
12529 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12530 processes table. Adjust to use ptids.
12531 (spu_kill, spu_detach): Adjust interface. Remove process from
12532 processes table.
12533 (spu_join, spu_thread_alive): Adjust interface.
12534 (spu_wait): Adjust interface. Remove process from processes
12535 table. Adjust to use ptids.
12536 * win32-low.c (current_inferior_tid): Delete.
12537 (current_inferior_ptid): New.
12538 (debug_event_ptid): New.
12539 (thread_rec): Take a ptid. Adjust.
12540 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12541 (child_delete_thread): Ditto.
12542 (do_initial_child_stuff): Add `attached' argument. Add process to
12543 processes table.
12544 (child_fetch_inferior_registers, child_store_inferior_registers):
12545 Adjust.
12546 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12547 (win32_attach): Pass 1 to do_initial_child_stuff.
12548 (win32_kill): Adjust interface. Remove process from processes
12549 table.
12550 (win32_detach): Ditto.
12551 (win32_join): Adjust interface.
12552 (win32_thread_alive): Take a ptid.
12553 (win32_resume): Adjust to use ptids.
12554 (get_child_debug_event): Ditto.
12555 (win32_wait): Adjust interface. Remove exiting process from
12556 processes table.
12557
bd99dc85
PA
125582009-04-01 Pedro Alves <pedro@codesourcery.com>
12559
12560 Non-stop mode support.
12561
12562 * server.h (non_stop): Declare.
12563 (gdb_client_data, handler_func): Declare.
12564 (delete_file_handler, add_file_handler, start_event_loop):
12565 Declare.
12566 (handle_serial_event, handle_target_event, push_event)
12567 (putpkt_notif): Declare.
12568 * target.h (enum resume_kind): New.
12569 (struct thread_resume): Replace `step' field by `kind' field.
12570 (TARGET_WNOHANG): Define.
12571 (struct target_ops) <wait>: Add `options' argument.
12572 <supports_non_stop, async, start_non_stop>: New fields.
12573 (target_supports_non_stop, target_async): New.
12574 (start_non_stop): Declare.
12575 (mywait): Add `options' argument.
12576 * target.c (mywait): Add `options' argument. Print child exit
12577 notifications here.
12578 (start_non_stop): New.
12579 * server.c (non_stop, own_buf, mem_buf): New globals.
12580 (struct vstop_notif): New.
12581 (notif_queue): New global.
12582 (queue_stop_reply, push_event, discard_queued_stop_replies)
12583 (send_next_stop_reply): New.
12584 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12585 interface changes.
12586 (attach_inferior): In non-stop mode, don't wait for the target
12587 here.
12588 (handle_general_set): Handle QNonStop.
12589 (handle_query): When handling qC, return the current general
12590 thread, instead of the first thread of the list.
12591 (handle_query): If the backend supports non-stop mode, include
12592 QNonStop+ in the qSupported query response.
12593 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12594 and non-stop mode.
12595 (handle_v_attach, handle_v_run): Handle non-stop mode.
12596 (handle_v_stopped): New.
12597 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12598 (myresume): Adjust to use resume_kind. Handle non-stop.
12599 (queue_stop_reply_callback): New.
12600 (handle_status): Handle non-stop mode.
12601 (main): Clear non_stop flag on reconnection. Use the event-loop.
12602 Refactor serial protocol handling from here ...
12603 (process_serial_event): ... to this new function. When GDB
12604 selects any thread, select one here. In non-stop mode, wait until
12605 GDB acks all pending events before exiting.
12606 (handle_serial_event, handle_target_event): New.
12607 * remote-utils.c (remote_open): Install remote_desc in the event
12608 loop.
12609 (remote_close): Remove remote_desc from the event loop.
12610 (putpkt_binary): Rename to...
12611 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12612 (putpkt_binary): New as wrapper around putpkt_binary_1.
12613 (putpkt_notif): New.
12614 (prepare_resume_reply): In non-stop mode, don't change the
12615 general_thread.
12616 * event-loop.c: New.
12617 * Makefile.in (OBJ): Add event-loop.o.
12618 (event-loop.o): New rule.
12619
12620 * linux-low.h (pid_of): Moved here.
12621 (lwpid_of): New.
12622 (get_lwp_thread): Use lwpid_of.
12623 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12624 * linux-low.c (pid_of): Delete.
12625 (inferior_pid): Use lwpid_of.
12626 (linux_event_pipe): New.
12627 (target_is_async_p): New.
12628 (delete_lwp): New.
12629 (handle_extended_wait): Use lwpid_of.
12630 (add_lwp): Don't set lwpid field.
12631 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12632 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12633 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12634 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12635 first. Adjust to linux_wait_for_event interface changes. Use
12636 lwpid_of.
12637 (linux_detach): Don't delete the main lwp here.
12638 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12639 (status_pending_p): Don't consider explicitly suspended lwps.
12640 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12641 pointer. Add OPTIONS argument. Change return type to int. Use
12642 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12643 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12644 pointer. Add status pointer argument. Return a pid instead of a
12645 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12646 changes. In non-stop mode, don't switch to a random thread.
12647 (linux_wait): Rename to...
12648 (linux_wait_1): ... this. Add target_options argument, and handle
12649 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12650 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12651 clean exit and signal exit code. Don't stop all threads in
12652 non-stop mode. In all-stop mode, only stop all threads when
12653 reporting a stop to GDB. Handle explicit thread stop requests.
12654 (async_file_flush, async_file_mark): New.
12655 (linux_wait): New.
12656 (send_sigstop): Use lwpid_of.
12657 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12658 interface changes. In non-stop mode, don't switch to a random
12659 thread.
12660 (linux_resume_one_lwp): Use lwpid_of.
12661 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12662 (linux_resume_one_thread): ... this. Handle resume_stop. In
12663 non-stop mode, don't look for pending flag in all threads.
12664 (resume_status_pending_p): Don't consider explicitly suspended
12665 threads.
12666 (my_waitpid): Reimplement. Emulate __WALL.
12667 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12668 Use lwpid_of.
12669 (sigchld_handler, linux_supports_non_stop, linux_async)
12670 (linux_start_non_stop): New.
12671 (linux_target_ops): Register linux_supports_non_stop, linux_async
12672 and linux_start_non_stop.
12673 (initialize_low): Install SIGCHLD handler.
12674 * thread-db.c (thread_db_create_event, find_one_thread)
12675 (thread_db_get_tls_address): Use lwpid_of.
12676 * win32-low.c (win32_detach): Adjust to use resume_kind.
12677 (win32_wait): Add `options' argument.
12678 * spu-low.c (spu_resume): Adjust to use resume_kind.
12679 (spu_wait): Add `options' argument.
12680
5b1c542e
PA
126812009-04-01 Pedro Alves <pedro@codesourcery.com>
12682
12683 Decouple target code from remote protocol.
12684
12685 * target.h (enum target_waitkind): New.
12686 (struct target_waitstatus): New.
12687 (struct target_ops) <wait>: Return an unsigned long. Take a
12688 target_waitstatus pointer instead of a char pointer.
12689 (mywait): Likewise.
12690 * target.c (mywait): Change prototype to return an unsigned long.
12691 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12692 * server.h (thread_from_wait, old_thread_from_wait): Delete
12693 declarations.
12694 (prepare_resume_reply): Change prototype to take a
12695 target_waitstatus.
12696 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12697 (last_status, last_ptid): New.
12698 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12699 pid instead of a signal.
12700 (attach_inferior): Remove "status" and "signal" parameters.
12701 Adjust.
12702 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12703 not as an address.
12704 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12705 (handle_v_requests, myresume): Remove "status" and "signal"
12706 parameters. Adjust.
12707 (handle_status): New.
12708 (main): Delete local `status'. Adjust.
12709 * remote-utils.c: Include target.h.
12710 (prepare_resume_reply): Change prototype to take a
12711 target_waitstatus. Adjust.
12712
12713 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12714 interface.
12715 * spu-low.c (spu_wait): Adjust.
12716 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12717 Delete.
12718 (win32_wait): Adjust.
12719
2bd7c093
PA
127202009-04-01 Pedro Alves <pedro@codesourcery.com>
12721
12722 * target.h (struct thread_resume): Delete leave_stopped member.
12723 (struct target_ops): Add a `n' argument to the `resume' callback.
12724 * server.c (start_inferior): Adjust.
12725 (handle_v_cont, myresume): Adjust.
12726 * linux-low.c (check_removed_breakpoint): Adjust to resume
12727 interface change, and to removed leave_stopped field.
12728 (resume_ptr): Delete.
12729 (struct thread_resume_array): New.
12730 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12731 resume interface change.
12732 (linux_continue_one_thread, linux_queue_one_thread)
12733 (resume_status_pending_p): Check if the resume field is NULL
12734 instead of checking the leave_stopped member.
12735 (linux_resume): Adjust to the target resume interface change.
12736 * spu-low.c (spu_resume): Adjust to the target resume interface
12737 change.
12738 * win32-low.c (win32_detach, win32_resume): Ditto.
12739
c35fafde
PA
127402009-04-01 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12743 flag.
12744 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12745 pending.
12746 (linux_continue_one_thread): Only preserve the stepping flag if
12747 there's a pending breakpoint.
12748
0a59d50b
PA
127492009-03-31 Pedro Alves <pedro@codesourcery.com>
12750
12751 * server.c (main): After the inferior having exited, call
12752 remote_close before exiting gdbserver.
12753
f04c6d38
TJB
127542009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12755
12756 Fix size of FPSCR in Power 7 processors.
12757 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12758 (PPC_FEATURE_HAS_DFP): New #define.
12759 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12760 size of the FPSCR.
12761
78e5cee6
PA
127622009-03-23 Pedro Alves <pedro@codesourcery.com>
12763
12764 * server.c (handle_query) Whitespace and formatting.
12765
1b3f6016
PA
127662009-03-22 Pedro Alves <pedro@codesourcery.com>
12767
12768 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12769 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12770 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12771 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12772 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12773 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12774 Makefile.in, configure.ac: Fix whitespace throughout.
12775 * configure: Regenerate.
12776
a07b2135
PA
127772009-03-22 Pedro Alves <pedro@codesourcery.com>
12778
12779 * inferiors.c (find_inferior): Make it safe for the callback
12780 function to delete the currently iterated inferior.
12781
67cc2626
PA
127822009-03-22 Pedro Alves <pedro@codesourcery.com>
12783
12784 * Makefile.in (linuw_low_h): Move higher.
12785 (thread-db.o): Depend on $(linux_low_h).
12786
54a0b537
PA
127872009-03-17 Pedro Alves <pedro@codesourcery.com>
12788
12789 Rename "process" to "lwp" throughout.
12790
12791 * linux-low.c (all_processes): Rename to...
12792 (all_lwps): ... this.
12793 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12794 (add_process): Rename to ...
12795 (add_lwp): ... this. Adjust.
12796 (linux_create_inferior): Adjust.
12797 (linux_attach_lwp): Adjust.
12798 (linux_attach): Adjust.
12799 (linux_kill_one_process): Rename to ...
12800 (linux_kill_one_lwp): ... this. Adjust.
12801 (linux_kill): Adjust.
12802 (linux_detach_one_process): Rename to ...
12803 (linux_detach_one_lwp): ... this. Adjust.
12804 (linux_detach): Adjust.
12805 (check_removed_breakpoint): Adjust.
12806 (status_pending_p): Adjust.
12807 (linux_wait_for_process): Rename to ...
12808 (linux_wait_for_lwp): ... this. Adjust.
12809 (linux_wait_for_event): Adjust.
12810 (send_sigstop): Adjust.
12811 (wait_for_sigstop): Adjust.
12812 (stop_all_processes): Rename to ...
12813 (stop_all_lwps): ... this.
12814 (linux_resume_one_process): Rename to ...
12815 (linux_resume_one_lwp): ... this. Adjust.
12816 (linux_set_resume_request, linux_continue_one_thread)
12817 (linux_queue_one_thread, resume_status_pending_p)
12818 (usr_store_inferior_registers, regsets_store_inferior_registers)
12819 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12820 Adjust.
12821 * linux-low.h (get_process): Rename to ...
12822 (get_lwp): ... this. Adjust.
12823 (get_thread_process): Rename to ...
12824 (get_thread_lwp): ... this. Adjust.
12825 (get_process_thread): Rename to ...
12826 (get_lwp_thread): ... this. Adjust.
12827 (struct process_info): Rename to ...
12828 (struct lwp_info): ... this.
12829 (all_processes): Rename to ...
12830 (all_lwps): ... this.
12831 * proc-service.c (ps_lgetregs): Adjust.
12832 * thread-db.c (thread_db_create_event, find_one_thread)
12833 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12834
0b16c5cf
PA
128352009-03-14 Pedro Alves <pedro@codesourcery.com>
12836
12837 * server.c (handle_query): Handle "qAttached".
12838
32de4b9d
NS
128392009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12840
12841 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12842 GPLv3, update license URL.
12843
2aecd87f
DE
128442009-03-01 Doug Evans <dje@google.com>
12845
93efd302 12846 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12847 (server_h): Add gdb_signals.h.
12848 (signals.o): Update.
12849 * server.h (target_signal_from_host,target_signal_to_host_p)
12850 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12851
86b1f9c5
PM
128522009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12853
12854 * remote-utils.c (getpkt): Also generate remote-debug
12855 information if noack_mode is set.
12856
4aa995e1
PA
128572009-02-06 Pedro Alves <pedro@codesourcery.com>
12858
12859 * server.c (handle_query): Report qXfer:siginfo:read and
12860 qXfer:siginfo:write as supported and handle them.
12861 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12862 * linux-low.c (linux_xfer_siginfo): New.
12863 (linux_target_ops): Set it.
12864
62709adf
PA
128652009-01-26 Pedro Alves <pedro@codesourcery.com>
12866
12867 * server.c (gdbserver_usage): Mention --remote-debug.
12868 (main): Accept '--remote-debug' switch.
12869
aef93bd7
DE
128702009-01-18 Doug Evans <dje@google.com>
12871
12872 * regcache.c (new_register_cache): No need to check result of xcalloc.
12873 * server.c (handle_search_memory): Back out calls to xmalloc,
12874 result is checked and error is returned to user upon failure.
12875 (handle_query): Ditto. Add more checks for result of malloc.
12876 (handle_v_cont): Check result of malloc, report error back to
12877 user upon failure.
12878 (handle_v_run): Ditto. Call freeargv.
12879 * server.h (freeargv): Declare.
12880 * utils.c (freeargv): New fn.
12881
54363045
DE
128822009-01-15 Doug Evans <dje@google.com>
12883
f626972c
DE
12884 * gdbreplay.c (perror_with_name): Make arg const char *.
12885 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12886 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12887 * utils.c (perror_with_name): Make arg const char *.
54363045 12888
18aae699
PA
128892009-01-14 Pedro Alves <pedro@codesourcery.com>
12890
12891 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12892 when handling a EXIT_PROCESS_DEBUG_EVENT.
12893
ff703abe
JB
128942009-01-06 Joel Brobecker <brobecker@adacore.com>
12895
12896 * gdbreplay.c (gdbreplay_version): Update copyright year.
12897 * server.c (gdbserver_version): Likewise.
12898
f21cc1a2 128992009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12900
12901 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12902 (handle_extended_wait): Improve comment.
0e21c1ec 12903
bca929d3
DE
129042008-12-13 Doug Evans <dje@google.com>
12905
12906 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12907 * server.h (ATTR_MALLOC): New macro.
12908 (xmalloc,xcalloc,xstrdup): Declare.
12909 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12910 * inferiors.c: Ditto.
12911 * linux-low.c: Ditto.
12912 * mem-break.c: Ditto.
12913 * regcache.c: Ditto.
12914 * remote-utils.c: Ditto.
12915 * server.c: Ditto.
12916 * target.c: Ditto.
12917 * win32-low.c: Ditto.
12918
97438e3f
DE
129192008-12-12 Doug Evans <dje@google.com>
12920
896c7fbb
DE
12921 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12922 in debugging printf.
12923
97438e3f
DE
12924 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12925
e3b886f8
DE
129262008-12-09 Doug Evans <dje@google.com>
12927
12928 * linux-low.h (struct process_info): Delete member tid, unused.
12929 * thread-db.c (find_one_thread): Update.
12930 (maybe_attach_thread): Update.
12931
07e059b5
VP
129322008-12-02 Pedro Alves <pedro@codesourcery.com>
12933
889bf7c5
PA
12934 * target.h (struct target_ops): Add qxfer_osdata member.
12935 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12936 and dirent.h.
12937 (linux_qxfer_osdata): New functions.
12938 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12939 callback.
12940 * server.c (handle_query): Handle "qXfer:osdata:read:".
12941 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12942 (buffer_xml_printf): New functions.
12943 * server.h (struct buffer): New.
12944 (buffer_grow_str, buffer_grow_str0): New macros.
12945 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12946 (buffer_xml_printf): Declare.
07e059b5 12947
4cab47ab
DE
129482008-11-24 Doug Evans <dje@google.com>
12949
12950 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12951
f142445f
DJ
129522008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12953
12954 * server.c (handle_v_run): Always use the supplied argument list.
12955
d0107bb6 129562008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12957
d0107bb6
BW
12958 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12959 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12960
2c4ad781
TJB
129612008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12962
12963 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12964 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12965 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12966 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12967 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12968 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12969 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12970 XML target descriptions.
12971 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12972 when inferior is running on an ISA 2.05 or later processor. Add
12973 special case to return offset for full 64-bit slot of FPSCR when
12974 in 32-bits.
12975
dfb64f85
DJ
129762008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12977
12978 * Makefile.in (SFILES, clean): Added sparc64 files.
12979 (reg-sparc64.o, reg-sparc64.c): New.
12980 * configure.srv (sparc*-*-linux*): New configuration.
12981 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12982 syscall arguments for SPARC.
12983 (regsets_store_inferior_registers): Likewise.
12984 * linux-sparc-low.c: New file.
12985
66b6e1dd
DE
129862008-10-21 Doug Evans <dje@google.com>
12987
12988 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12989 (READLINE_DIR,READLINE_DEP): Delete.
12990 (INTERNAL_CFLAGS): Update.
12991 (LINTFLAGS): Update.
12992
9b710a42
PA
129932008-10-10 Pedro Alves <pedro@codesourcery.com>
12994
12995 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12996 whole argv from the last run, not just argv[0].
12997
5822d809
PA
129982008-09-08 Pedro Alves <pedro@codesourcery.com>
12999
13000 * regcache.c (new_register_cache): Return NULL if the register
13001 cache size isn't known yet.
13002 (free_register_cache): Avoid dereferencing a NULL regcache.
13003
74aac56f
DJ
130042008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13005
13006 * configure.srv: Merge MIPS and MIPS64.
13007
400b20f5
MR
130082008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13009
13010 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13011
677c5bb1
LM
130122008-08-18 Luis Machado <luisgpm@br.ibm.com>
13013
13014 * Makefile.in: Add required vsx dependencies.
13015
13016 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13017 Declare init_registers_powerpc_vsx32l.
13018 Declare init_registers_powerpc_vsx64l.
13019 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13020 (ppc_arch_setup): Check for VSX in hwcap.
13021 (ppc_fill_vsxregset): New function.
13022 (ppc_store_vsxregset): New function.
13023 Add new VSX entry in regset_info target_regsets.
13024
13025 * configure.srv: Add new VSX dependencies.
13026
a6f3e723
SL
130272008-08-12 Pedro Alves <pedro@codesourcery.com>
13028
13029 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13030 (remote_open): Set or clear transport_is_reliable.
13031 (putpkt_binary): Don't expect acks in noack mode.
13032 (getpkt): Don't send ack/nac in noack mode.
13033 * server.c (handle_general_set): Handle QStartNoAckMode.
13034 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13035 qSupported.
13036 (main): Reset noack_mode on every connection.
13037 * server.h (noack_mode): Declare.
13038
a417dc56
RW
130392008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13040
13041 * Makefile.in (GDBREPLAY_OBS): New variable.
13042 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13043
3221518c
UW
130442008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13045 Daniel Jacobowitz <dan@codesourcery.com>
13046
13047 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13048 (usr_store_inferior_registers): Likewise.
13049 (regsets_store_inferior_registers): Likewise.
13050
ec56be1b
PA
130512008-07-31 Rolf Jansen <rj@surtec.com>
13052 Pedro Alves <pedro@codesourcery.com>
13053
13054 * configure.ac: Check for memmem declaration.
13055 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13056 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13057 (disable_packet_qfThreadInfo): Unconditionally compile.
13058 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13059 * configure, config.in: Regenerate.
13060
2fe5e3ff
DE
130612008-07-28 Doug Kwan <dougkwan@google.com>
13062
13063 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13064 (linux_write_memory): Remove declaration of errno.
13065
836acd6d
UW
130662008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13067
13068 * linux-low.c (handle_extended_wait): Do not use "status"
13069 variable uninitialized.
13070
aeba519e
PA
130712008-07-07 Pedro Alves <pedro@codesourcery.com>
13072
13073 * server.c (handle_v_attach): Inhibit reporting dll changes.
13074
db42f210
PA
130752008-06-27 Pedro Alves <pedro@codesourcery.com>
13076
13077 * remote-utils.c (prepare_resume_reply): If requested, don't
13078 output "thread:TID" in the T stop reply.
13079
13080 * server.c (disable_packet_vCont, disable_packet_Tthread)
13081 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13082 (handle_query): If requested, disable support for qC, qfThreadInfo
13083 and qsThreadInfo.
13084 (handle_v_requests): If requested, disable support for vCont.
13085 (gdbserver_show_disableable): New.
13086 (main): Handle --disable-packet and --disable-packet=LIST.
13087
13088 * server.h (disable_packet_vCont, disable_packet_Tthread)
13089 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13090
8e4c5421
CD
130912008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13092
13093 * server.c (gdbserver_usage): Mention --version.
13094
6e23a804
DJ
130952008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * Makefile.in (gdbreplay.o): New rule.
13098
90aa6a40
JM
130992008-06-06 Joseph Myers <joseph@codesourcery.com>
13100
13101 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13102 message, not gdbserver.
13103
c16158bc 131042008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13105 Nathan Sidwell <nathan@codesourcery.com>
13106 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13107
13108 * acinclude.m4: Include ../../config/acx.m4.
13109 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13110 * configure, config.in: Regenerate.
13111 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13112 * server.c (gdbserver_version): Print PKGVERSION.
13113 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13114 (main): Adjust gdbserver_usage calls.
13115 * gdbreplay.c (version, host_name): Add declarations.
13116 (gdbreplay_version, gdbreplay_usage): New.
13117 (main): Accept --version and --help options.
13118
aeb75bf5
DJ
131192008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13120
13121 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13122 (arm_breakpoint_at): Handle Thumb.
13123 (the_low_target): Add comment.
13124
76b233dd
UW
131252008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13126
13127 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13128
08388c79
DE
131292008-05-09 Doug Evans <dje@google.com>
13130
a3c83fae
DE
13131 * server.h (decode_search_memory_packet): Declare.
13132 * remote-utils.c (decode_search_memory_packet): New fn.
13133 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13134 (handle_search_memory): New fn.
13135 (handle_query): Process qSearch:memory packets.
13136
bb9c3d36
UW
131372008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13138
13139 * regcache.c (registers_length): Remove.
13140 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13141 full register packet.
13142 * regcache.h (registers_length): Remove prototype.
13143 * server.h (PBUFSIZ): Define to 16384.
13144
7284e1be
UW
131452008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13148 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13149 powerpc-64l.o, and powerpc-altivec64l.o.
13150 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13151 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13152 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13153 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13154 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13155 to srv_xmlfiles.
13156
13157 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13158 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13159 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13160 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13161 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13162 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13163 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13164 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13165 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13166 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13167 (clean): Update.
13168
13169 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13170 (init_registers_powerpc_32l): ... this new prototype.
13171 (init_registers_powerpc_32): Remove, replace by ...
13172 (init_registers_powerpc_altivec32l): ... this new prototype.
13173 (init_registers_powerpc_e500): Remove, replace by ...
13174 (init_registers_powerpc_e500l): ... this new prototype.
13175 (init_registers_ppc64): Remove, replace by ...
13176 (init_registers_powerpc_64l): ... this new prototype.
13177 (init_registers_powerpc_64): Remove, replace by ...
13178 (init_registers_powerpc_altivec64l): ... this new prototype.
13179 (ppc_num_regs): Set to 73.
13180 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13181 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13182 (ppc_cannot_store_register): Handle orig_r3 and trap.
13183 (ppc_arch_setup): Update init_registers_... calls.
13184 (ppc_fill_gregset): Handle orig_r3 and trap.
13185
13186 * inferiors.c (clear_inferiors): Reset current_inferior.
13187
fdc59709
PB
131882008-04-23 Paolo Bonzini <bonzini@gnu.org>
13189
889bf7c5
PA
13190 * acinclude.m4: Add override.m4.
13191 * configure: Regenerate.
fdc59709 13192
c9b2f845
UW
131932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13194
13195 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13196 initial call to init_register_ppc64.
13197
550512b8
UW
131982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13199
43aaf8b6
PA
13200 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13201 single powerpc*-*-linux* case.
550512b8
UW
13202 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13203
b6430ec3
UW
132042008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13205
13206 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13207 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13208 from reg_xmlfiles.
13209 * linux-ppc-low.c: Include <elf.h>.
13210 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13211 (ppc_hwcap): New global variable.
13212 (ppc_regmap): Remove __SPE__ #ifdef sections.
13213 (ppc_regmap_e500): New global variable.
13214 (ppc_cannot_store_register): Update __SPE__ special case.
13215 (ppc_get_hwcap): New function.
13216 (ppc_arch_setup): Use it to determine whether inferior supports
13217 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13218 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13219 Do not access registers if target does not support AltiVec.
13220 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13221 Do not access registers if target does not support SPE.
13222 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13223
52fa2412
UW
132242008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13225
13226 * linux-low.c (disabled_regsets, num_regsets): New.
13227 (use_regsets_p): Delete.
13228 (linux_wait_for_process): Clear disabled_regsets.
13229 (regsets_fetch_inferior_registers): Check and set it.
13230 (regsets_store_inferior_registers): Likewise.
13231 (linux_fetch_registers, linux_store_registers): Do not use
13232 use_regsets_p.
13233 (initialize_low): Allocate disabled_regsets.
13234
e28b3332
DJ
132352008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * Makefile.in (LIBOBJS): New.
13238 (OBS): Use LIBOBJS.
13239 (memmem.o): New rule.
13240 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13241 * configure: Regenerated.
13242
4536995d
UW
132432008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13244
13245 * server.c (handle_query): Never return "unsupported" for
13246 qXfer:features:read queries.
13247
221c031f
UW
132482008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13249
13250 * server.c (get_features_xml): Fix inverted condition.
13251 (handle_query): Always support qXfer:feature:read.
13252
ccd213ac
DJ
132532008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13254
13255 * server.c (wrapper_argv): New.
13256 (start_inferior): Handle wrapper_argv. If set, expect an extra
13257 trap.
13258 (gdbserver_usage): Document --wrapper.
13259 (main): Parse --wrapper.
13260
6fe305f7
UW
132612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13262
13263 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13264 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13265 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13266 (ppc_set_pc): Likewise.
13267 (ppc_arch_setup): New function.
13268 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13269 of collect_register.
889bf7c5 13270 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13271
5b0a002e
UW
132722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13273
13274 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13275 instead of linux-ppc64-low.o.
13276 * linux-ppc64-low.c: Remove file.
13277 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13278 (linux-ppc64-low.o): Remove rule.
13279
13280 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13281 (init_registers_powerpc_64): Likewise.
13282 (ppc_regmap): Conditionally define depending on __powerpc64__.
13283 (ppc_cannot_store_register): Do not special-case "fpscr" when
13284 compiled on __powerpc64__.
13285 (ppc_collect_ptrace_register): New function.
13286 (ppc_supply_ptrace_register): New function.
13287 (ppc_breakpoint): Change type to "unsigned int".
13288 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13289 (the_low_target): Conditionally provide initializers for the
889bf7c5 13290 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13291 collect_ptrace_register and supply_ptrace_register members.
13292
9b4b61c8
UW
132932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13294
13295 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13296 * server.c (gdbserver_xmltarget): Define.
13297 (get_features_xml): Use it to replace "target.xml" and arch_string.
13298
13299 * configure.srv: Remove srv_xmltarget. Add XML files that were
13300 mentioned there to srv_xmlfiles instead. Remove conditional tests
13301 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13302 srv_xmlfiles and srv_regobj to include all possible choices.
13303 * configure.ac (srv_xmltarget): Remove.
13304 (srv_xmlfiles): Do not add "target.xml".
13305 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13306 checks for supplementary target information.
13307 * configure: Regenerate.
13308 * Makefile.in (XML_TARGET): Remove.
13309 (target.xml): Remove rule.
13310 (clean): Do not clean up target.xml.
13311 (.PRECIOUS): Do not mention target.xml.
13312
13313 * target.h (struct target_ops): Remove arch_string member.
13314 * linux-low.c (linux_arch_string): Remove.
13315 (linux_target_ops): Remove arch_string initializer.
13316 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13317 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13318 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13319 * spu-low.c (spu_arch_string): Remove.
13320 (spu_target_ops): Remove arch_string initializer.
13321 * win32-low.c (win32_arch_string): Remove.
13322 (win32_target_ops): Remove arch_string initializer.
13323 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13324 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13325 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13326
ee1a7ae4
UW
133272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13328
13329 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13330 by collect_ptrace_register and supply_ptrace_register hooks.
13331 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13332 instead of checking for the_low_target.left_pad_xfer.
13333 (usr_store_inferior_registers): Use collect_ptrace_register callback
13334 instead of checking for the_low_target.left_pad_xfer.
13335
13336 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13337 (s390_supply_ptrace_register): Likewise.
13338 (s390_fill_gregset): Call s390_collect_ptrace_register.
13339 (the_low_target): Update.
13340
13341 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13342 (ppc_supply_ptrace_register): Likewise.
13343 (the_low_target): Update.
13344
13345 * linux-i386-low.c (the_low_target): Update.
13346 * linux-x86-64-low.c (the_low_target): Update.
13347
d61ddec4
UW
133482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13349
13350 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13351 reg-s390.o and reg-s390x.o.
13352
13353 * linux-low.c (new_inferior): New global variable.
13354 (linux_create_inferior, linux_attach): Set it.
13355 (linux_wait_for_process): Call the_low_target.arch_setup after the
13356 target has stopped for the first time.
13357 (initialize_low): Do not call the_low_target.arch_setup.
13358
13359 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13360 (s390_set_pc): Likewise.
13361 (s390_arch_setup): New function.
13362 (the_low_target): Use s390_arch_setup as arch_setup routine.
13363
13364 * regcache.c (realloc_register_cache): New function.
13365 (set_register_cache): Call it for each existing regcache.
13366
d05b4ac3
UW
133672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13368
13369 * server.h (init_registers): Remove prototype.
13370
13371 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13372 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13373 instead of init_registers ().
13374 * linux-arm-low.c (init_registers_arm): Add prototype.
13375 (init_registers_arm_with_iwmmxt): Likewise.
13376 (the_low_target): Add initializer for arch_setup field.
13377 * linux-cris-low.c (init_registers_cris): Add prototype.
13378 (the_low_target): Add initializer for arch_setup field.
13379 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13380 (the_low_target): Add initializer for arch_setup field.
13381 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13382 (the_low_target): Add initializer for arch_setup field.
13383 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13384 (the_low_target): Add initializer for arch_setup field.
13385 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13386 (the_low_target): Add initializer for arch_setup field.
13387 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13388 (the_low_target): Add initializer for arch_setup field.
13389 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13390 (init_registers_mips64_linux): Likewise.
13391 (the_low_target): Add initializer for arch_setup field.
13392 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13393 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13394 (the_low_target): Add initializer for arch_setup field.
13395 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13396 (init_registers_powerpc_64): Likewise.
13397 (the_low_target): Add initializer for arch_setup field.
13398 * linux-s390-low.c (init_registers_s390): Add prototype.
13399 (init_registers_s390x): Likewise.
13400 (the_low_target): Add initializer for arch_setup field.
13401 * linux-sh-low.c (init_registers_sh): Add prototype.
13402 (the_low_target): Add initializer for arch_setup field.
13403 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13404 (the_low_target): Add initializer for arch_setup field.
13405 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13406 (the_low_target): Add initializer for arch_setup field.
13407
13408 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13409 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13410 instead of init_registers ().
13411 * win32-arm-low.c (init_registers_arm): Add prototype.
13412 (the_low_target): Add initializer for arch_setup field.
13413 * win32-i386-low.c (init_registers_i386): Add prototype.
13414 (the_low_target): Add initializer for arch_setup field.
13415
13416 * spu-low.c (init_registers_spu): Add prototype.
13417 (initialize_low): Call initialie_registers_spu () instead of
13418 initialize_registers ().
13419
fd96d250
PA
134202008-02-19 Pedro Alves <pedro@codesourcery.com>
13421
13422 * server.c (handle_v_requests): When handling the vRun and vAttach
13423 packets, if already debugging a process, don't kill it. Return an
13424 error instead.
13425
d41b6bb4
DJ
134262008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13427
13428 * server.c (handle_query): Correct length check.
13429
5ac588cf
PA
134302008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13431
13432 * win32-low.c (do_initial_child_stuff): Add process handle
13433 parameter. Set current_process_handle and current_process_id from the
13434 parameters. Clear globals.
13435 (win32_create_inferior): Don't set current_process_handle and
13436 current_process_id here. Instead pass them on the call to
13437 do_initial_child_stuff.
13438 (win32_attach): Likewise.
13439 (win32_clear_inferiors): New.
13440 (win32_kill): Don't close the current process handle or the
13441 current thread handle here. Instead call win32_clear_inferiors.
13442 (win32_detach): Don't open a new handle to the process. Call
13443 win32_clear_inferiors.
13444 (win32_join): Don't rely on current_process_handle; open a new
13445 handle using the process id.
13446 (win32_wait): Call win32_clear_inferiors when the inferior process
13447 has exited.
13448
ecd7ecbc
DJ
134492008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13450
13451 * server.c (monitor_show_help): Add "exit".
13452
1525d545
MG
134532008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13454
ecd7ecbc 13455 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13456 (clean): Add reg-xtensa.c.
13457 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13458 * configure.srv (xtensa*-*-linux*) New target.
13459 * linux-xtensa-low.c: New.
13460 * xtensa-xtregs.c: New.
1525d545 13461
59a016f0
PA
134622008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13463
13464 * hostio.c: Don't include errno.h.
13465 (errno_to_fileio_errno): Move to hostio-errno.
13466 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13467 error number outputting to the target->hostio_last_error callback.
13468 (hostio_packet_error): Use FILEIO_EINVAL directly.
13469 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13470 calls to hostio_error.
13471 * hostio-errno.c: New.
13472 * server.h (hostio_last_error_from_errno): Declare.
13473 * target.h (target_ops): Add hostio_last_error member.
13474 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13475 as hostio_last_error handler.
889bf7c5 13476 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13477 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13478 (wince_hostio_last_error): New functions.
13479 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13480 as hostio_last_error handler.
13481 (win32_target_ops) [!_WIN32_WCE]: Register
13482 hostio_last_error_from_errno as hostio_last_error handler.
13483 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13484 (hostio-errno.o): New rule.
13485 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13486 * configure.srv (srv_hostio_err_objs): New variable. Default to
13487 hostio-errno.o.
13488 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13489 * configure: Regenerate.
13490
2d717e4f
DJ
134912008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13494 (linux_kill, linux_detach): Clean up the process list.
13495 * remote-utils.c (remote_open): Improve port number parsing.
13496 (putpkt_binary, input_interrupt): Only send interrupts if the target
13497 is running.
13498 * server.c (extended_protocol): Make static.
13499 (attached): Define earlier.
13500 (exit_requested, response_needed, program_argv): New variables.
13501 (target_running): New.
13502 (start_inferior): Clear attached here.
13503 (attach_inferior): Set attached here.
13504 (require_running): Define.
13505 (handle_query): Use require_running and target_running. Implement
13506 "monitor exit".
13507 (handle_v_attach, handle_v_run): New.
13508 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13509 (gdbserver_usage): Update.
13510 (main): Redo argument parsing. Handle --debug and --multi. Handle
13511 --attach along with other options or after the port. Save
13512 program_argv. Support no initial program. Resynchronize
13513 communication with GDB after an error. Handle "monitor exit".
13514 Use require_running and target_running. Always allow the extended
13515 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13516 restart in extended mode.
13517 * README: Refer to the GDB manual. Update --attach usage.
13518
7407e2de
AS
135192007-12-20 Andreas Schwab <schwab@suse.de>
13520
13521 * linux-low.c (STACK_SIZE): Define.
13522 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13523 (linux_test_for_tracefork): Likewise.
13524
b65d95c5
DJ
135252007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13526
13527 * linux-low.c (linux_wait_for_event): Update messages. Do not
13528 reinsert auto-delete breakpoints.
13529 * mem-break.c (struct breakpoint): Change return type of handler to
13530 int.
13531 (set_breakpoint_at): Update handler type.
13532 (reinsert_breakpoint_handler): Return 1 instead of calling
13533 delete_breakpoint.
13534 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13535 setting a new one.
13536 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13537 * mem-break.h (set_breakpoint_at): Update handler type.
13538 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13539 * win32-low.c (auto_delete_breakpoint): New.
13540 (get_child_debug_event): Use it.
13541
4e799345
DJ
135422007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13543
13544 * configure.ac: Check for pread and pwrite.
13545 * hostio.c (handle_pread): Fall back to lseek and read.
13546 (handle_pwrite): Fall back to lseek and write.
13547 * config.in, configure: Regenerated.
13548
27524b67
DJ
135492007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13550
13551 * server.c (myresume): Add own_buf argument.
13552 (main): Update calls.
13553
a20d5e98
DJ
135542007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13555
13556 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13557 * remote-utils.c (remote_open): Do not call disable_async_io.
13558 (block_async_io): Delete.
13559 (unblock_async_io): Make static.
13560 (initialize_async_io): New.
13561 * server.c (handle_v_cont): Handle async I/O here.
13562 (myresume): Likewise. Move other common resume tasks here...
13563 (main): ... from here. Call initialize_async_io. Disable async
13564 I/O before the main loop.
13565 * server.h (initialize_async_io): Declare.
13566 (block_async_io, unblock_async_io): Delete prototypes.
13567 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13568
b79d787e
DJ
135692007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13570
13571 * remote-utils.c (readchar): Allow binary data in received messages.
13572
d97903b2
PA
135732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13574
13575 * win32-low.c (attaching): New global.
13576 (win32_create_inferior): Clear the `attaching' global.
13577 (win32_attach): Set the `attaching' global.
13578 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13579 attaching. Only set a breakpoint at the entry point if not
13580 attaching.
13581
311de423
PA
135822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13583
13584 * server.c (main): Don't report dll events on the initial
13585 connection on attaches.
13586
6c2d16d2
PA
135872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13588
13589 * server.c (main): Relax numerical bases supported for the pid of
13590 the --attach command line argument.
13591
5ca906e6
PA
135922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13593
13594 * win32-low.c (win32_attach): Call OpenProcess before
13595 DebugActiveProcess, not after. Add last error output to error
13596 call.
13597
9c6c8194
PA
135982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13599
13600 * win32-low.c (win32_get_thread_context)
13601 (win32_set_thread_context): New functions.
13602 (thread_rec): Use win32_get_thread_context.
13603 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13604 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13605 field.
13606
4d5d1aaa
PA
136072007-12-03 Leo Zayas
13608 Pedro Alves <pedro_alves@portugalmail.pt>
13609
13610 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13611 global variables.
13612 (child_add_thread): Minor cleanup.
13613 (child_continue): Resume artificially suspended threads before
13614 calling ContinueDebugEvent.
13615 (suspend_one_thread): New.
13616 (fake_breakpoint_event): New.
13617 (get_child_debug_event): Change return type to int. Check here if
13618 gdb sent an interrupt request. If a soft interrupt was requested,
13619 fake a breakpoint event. Return 0 if there is no event to handle,
13620 and 1 otherwise.
13621 (win32_wait): Don't check here if gdb sent an interrupt request.
13622 Ensure there is a valid event to handle.
13623 (win32_request_interrupt): Add soft interruption method as last
13624 resort.
13625
c436e841
PA
136262007-12-03 Leo Zayas
13627 Pedro Alves <pedro_alves@portugalmail.pt>
13628
13629 * win32-low.h (win32_thread_info): Add descriptions to the
13630 structure members. Replace `suspend_count' counter by a
13631 `suspended' flag.
13632 * win32-low.c (thread_rec): Update condition of when to get the
13633 context from the inferior. Rely on ContextFlags being set if it
13634 has already been retrieved. Only suspend the inferior thread if
13635 we haven't already. Warn if that fails.
13636 (continue_one_thread): s/suspend_count/suspended/. Only call
13637 ResumeThread once. Warn if that fails.
13638
e7b5fa67
PA
136392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13640
13641 * win32-low.c (win32_wait): Don't read from the inferior when it
13642 has already exited.
13643
a385171d
PA
136442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13645
13646 * Makefile.in (win32_low_h): New variable.
13647 (win32-low.o): Add dependency on $(win32_low_h).
13648 (win32-arm-low.o, win32-i386-low.o): New rules.
13649
f80c84b3
DJ
136502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * hostio.c: Correct copyright year.
13653
a6b151f1
DJ
136542007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * Makefile.in (OBS): Add hostio.o.
13657 (hostio.o): New rule.
13658 * server.h (handle_vFile): Declare.
13659 * hostio.c: New file.
13660 * server.c (handle_v_requests): Take packet_len and new_packet_len
13661 for binary packets. Call handle_vFile.
13662 (main): Update call to handle_v_requests.
13663
f9387fc3
DJ
136642007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * linux-low.c: Include <sched.h>.
13667
51c2684e
DJ
136682007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13669
13670 * linux-low.c (linux_tracefork_grandchild): New.
13671 (linux_tracefork_child): Use clone.
13672 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13673
75f83163
JB
136742007-10-31 Joel Brobecker <brobecker@adacore.com>
13675
13676 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13677
da5898ce
DJ
136782007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13681
24a09b5f
DJ
136822007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13683
13684 * inferiors.c (change_inferior_id): Delete.
13685 (add_pid_to_list, pull_pid_from_list): New.
13686 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13687 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13688 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13689 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13690 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13691 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13692 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13693 (using_threads): Always set to 1.
13694 (handle_extended_wait): New.
13695 (add_process): Do not set TID.
13696 (linux_create_inferior): Set must_set_ptrace_flags.
13697 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13698 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13699 (linux_thread_alive): Rename TID argument to LWPID.
13700 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13701 (linux_wait_for_event): Do not use TID or check using_threads. Update
13702 call to dead_thread_notify. Call handle_extended_wait.
13703 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13704 (send_sigstop): Delete sigstop_sent.
13705 (wait_for_sigstop): Avoid TID.
13706 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13707 (linux_test_for_tracefork): New.
13708 (linux_lookup_signals): Use thread_db_active and
13709 linux_supports_tracefork_flag.
13710 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13711 * linux-low.h (get_process_thread): Avoid TID.
13712 (struct process_ifo): Move thread_known and tid to the end. Remove
13713 sigstop_sent.
13714 (linux_attach_lwp, thread_db_init): Update prototypes.
13715 * server.h (change_inferior_id): Delete prototype.
13716 (add_pid_to_list, pull_pid_from_list): New prototypes.
13717 * thread-db.c (thread_db_use_events): New.
13718 (find_first_thread): Rename to...
13719 (find_one_thread): ...this. Update callers and messages. Do not
13720 call fatal. Check thread_db_use_events. Do not call
13721 change_inferior_id or new_thread_notify.
13722 (maybe_attach_thread): Update. Do not call new_thread_notify.
13723 (thread_db_init): Set thread_db_use_events. Check use_events.
13724 * utils.c (fatal, warning): Correct message prefix.
13725
30ed0a8f
DJ
137262007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13727
13728 * Makefile.in (clean): Remove new files.
13729 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13730 (powerpc-64.o, powerpc-64.c): New rules.
13731 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13732 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13733 with SPE.
13734 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13735 SPE targets.
13736 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13737 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13738 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13739 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13740 (target_regsets): Add AltiVec and SPE register sets.
13741 * configure.ac: Check for AltiVec and SPE.
13742 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13743 (ppc_fill_vrregset, ppc_store_vrregset): New.
13744 (target_regsets): Add AltiVec register set.
13745 * configure: Regenerated.
13746
fd462a61
DJ
137472007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * linux-low.c (O_LARGEFILE): Define.
13750 (linux_read_memory): Use /proc/PID/mem.
13751 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13752 * configure, config.in: Regenerated.
13753
69f223ed
DJ
137542007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13755
13756 * linux-low.c (linux_wait_for_event): Do not pass signals while
13757 single-stepping.
13758
aec18585
PA
137592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13760
13761 * win32-low.c (create_process): New.
13762 (win32_create_inferior): Use create_process instead of
13763 CreateProcess. If create_process failed retry appending an ".exe"
13764 suffix. Store the GetLastError result immediatelly after
13765 create_process calls and use it on the call to error.
13766
34d86ddd
PA
137672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13768
13769 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13770
5a0e3bd0
JB
137712007-08-23 Joel Brobecker <brobecker@adacore.com>
13772
13773 * configure.ac: Switch license to GPLv3.
13774
f88c79e6
MS
137752007-08-01 Michael Snyder <msnyder@access-company.com>
13776
13777 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13778
6b3d9b83
PA
137792007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13780
13781 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13782 typedef.
13783 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13784 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13785 CloseToolhelp32Snapshot.
13786 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13787 CloseToolhelp32Snapshot.
13788
c588c53c
MS
137892007-07-27 Michael Snyder <michael.snyder@access-company.com>
13790
13791 * server.c (main): Check for inferior exit before main loop.
13792
aa0403d9
PA
137932007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13794
13795 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13796 instead of on tmp_desc.
13797
255e7678
DJ
137982007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13799 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13802 (add_thread): Minor cleanups.
13803 (clear_inferiors): Move lower in the file. Clear the DLL
13804 list.
13805 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13806 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13807 (xml_escape_text): New.
13808 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13809 for qSupported.
13810 (handle_v_cont): Report errors.
13811 (gdbserver_version): Update.
13812 (main): Correct size of own_buf. Do not report initial DLL events.
13813 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13814 (unloaded_dll, xml_escape_text): New.
13815 * win32-low.c (enum target_waitkind): Update comments.
13816 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13817 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13818 (win32_EnumProcessModules, win32_GetModuleInformation)
13819 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13820 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13821 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13822 (win32_Module32First, win32_Module32Next, load_toolhelp)
13823 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13824 (get_child_debug_event): Handle DLL events.
13825 (win32_wait): Likewise.
13826
0d37add9
DJ
138272007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13830 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13831
45e2715e
PA
138322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13833
13834 * win32-low.c (handle_output_debug_string): Ignore event if not
13835 waiting.
13836
c5674cf1
PA
138372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13838
13839 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13840
2bbe3cc1
DJ
138412007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13844
ae13219e
DJ
138452007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13846
13847 * inferiors.c (change_inferior_id): Add comment.
13848 * linux-low.c (check_removed_breakpoint): Add an early
13849 prototype. Improve debug output.
13850 (linux_attach): Doc update.
13851 (linux_detach_one_process, linux_detach): Clean up before releasing
13852 each process.
13853 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13854 * linux-low.h (struct process_info): Doc improvement.
13855 * mem-break.c (delete_all_breakpoints): New.
13856 * mem-break.h (delete_all_breakpoints): New prototype.
13857 * thread-db.c (find_first_thread): New.
13858 (thread_db_create_event): Call it instead of
13859 thread_db_find_new_threads. Clean up unused variables.
13860 (maybe_attach_thread): Remove first thread handling.
13861 (thread_db_find_new_threads): Use find_first_thread.
13862 (thread_db_get_tls_address): Likewise.
13863
4105de34
DJ
138642007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * thread-db.c (thread_db_find_new_threads): Add prototype.
13867 (thread_db_create_event): Check for the main thread before adding
13868 a new thread.
13869 (maybe_attach_thread): Only enable event reporting if TID == 0.
13870 (thread_db_get_tls_address): Check for new threads.
13871
2b876972
DJ
138722007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13873
13874 * linux-low.c (linux_create_inferior): Try execv before execvp.
13875 * spu-low.c (spu_create_inferior): Likewise.
13876
7a245884
DJ
138772007-06-13 Mike Frysinger <vapier@gentoo.org>
13878
13879 * linux-low.c (linux_create_inferior): Change execv to execvp.
13880 * spu-low.c (spu_create_inferior): Likewies.
13881
117ce543
DJ
138822007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * Makefile.in (clean): Clean new files instead of deleted ones.
13885 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13886 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13887 rules.
13888 * configure.srv: Specify XML files and new regformats for MIPS and
13889 MIPS64 GNU/Linux.
13890 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13891 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13892 an entry for the restart register.
13893 (mips_cannot_fetch_register, mips_cannot_store_register)
13894 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13895 register names to match the XML descriptions.
13896 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13897 restart register instead of $0.
13898
0e7f50da
UW
138992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13900 Markus Deuling <deuling@de.ibm.com>
13901
13902 * remote-utils.c (decode_xfer_write): New function.
13903 * server.h (decode_xfer_write): Add prototype.
13904 * server.c (handle_query): Add PACKET_LEN argument. Support
13905 qXfer:spu:read and qXfer:spu:write packets.
13906 (main): Pass packet_len to handle_query.
13907 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13908 * target.h (target_ops): Add qxfer_spu.
13909
374c1d38
UW
139102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13911
13912 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13913 accessing non-seekable spufs files.
13914
bb63802a
UW
139152007-05-16 Markus Deuling <deuling@de.ibm.com>
13916
889bf7c5 13917 * server.c (handle_query): Add reply for qC packet.
bb63802a 13918
7390519e
PA
139192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13920 Leo Zayas <lerele@champenstudios@com>
13921
13922 * server.h (check_remote_input_interrupt_request): New function.
13923 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13924 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13925 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13926 (check_remote_input_interrupt_request): New function.
13927 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13928 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13929 winapi_GenerateConsoleCtrlEvent): New typedefs.
13930 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13931 to 250 ms.
13932 (win32_wait): Check for remote interrupt request
13933 with check_remote_input_interrupt_request.
13934 (win32_request_interrupt): New function.
13935 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13936
34b34921
PA
139372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13938
13939 * win32-low.c (debug_registers_changed,
13940 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13941 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13942 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13943 (thread_rec): Get context using the low target.
13944 (child_add_thread): Call thread_added on the low target,
13945 which does the same thing.
13946 (regptr): Delete.
13947 (do_initial_child_stuff): Remove debug registers references.
13948 Set context using the low target. Resume threads after
13949 setting the contexts.
13950 (child_continue): Remove dead variable. Remove debug
13951 registers references.
13952 (child_fetch_inferior_registers): Go through the low target.
13953 (do_child_store_inferior_registers): Remove.
13954 (child_store_inferior_registers): Go through the low target.
13955 (win32_resume): Remove debug registers references.
13956 Set context using the low target.
13957 (handle_exception): Change return type to void. Don't record
13958 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13959 first chance exception.
889bf7c5 13960 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13961 goto loop. Always return after waiting for debug event.
13962 (win32_wait): Convert to switch statement. Handle spurious
13963 events.
13964
13965 * win32-i386-low.c (debug_registers_changed,
13966 debug_registers_used): New.
13967 (initial_stuff): Rename to ...
13968 (i386_initial_stuff): ... this. Clear debug registers
13969 state variables.
13970 (store_debug_registers): Delete.
13971 (i386_get_thread_context): New.
13972 (load_debug_registers): Delete.
13973 (i386_set_thread_context): New.
13974 (i386_thread_added): New.
13975 (single_step): Rename to ...
13976 (i386_single_step): ... this.
13977 (do_fetch_inferior_registers): Rename to ...
13978 (i386_fetch_inferior_register): ... this.
13979 (i386_store_inferior_register): New.
13980 (the_low_target): Adapt to new interface.
13981
13982 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13983 (arm_get_thread_context): New.
13984 (arm_set_thread_context): New.
13985 (regptr): New.
13986 (do_fetch_inferior_registers): Rename to ...
13987 (arm_fetch_inferior_register): ... this.
13988 (arm_store_inferior_register): New.
13989 (arm_wince_breakpoint): Reimplement as unsigned long.
13990 (arm_wince_breakpoint_len): Define.
13991 (the_low_target): Adapt to new interface.
13992
13993 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13994 load_debug_registers. Add get_thread_context, set_thread_context,
13995 thread_added and store_inferior_register. Rename
13996 fetch_inferior_registers to fetch_inferior_register.
13997 (regptr): Remove declaration.
13998
dd6953e1
PA
139992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14000
14001 * linux-low.c (linux_detach): Change return type to int. Return 0.
14002 * spu-low.c (spu_detach): Likewise.
14003
444d6139
PA
140042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14005
14006 * target.h (target_ops): Change return type of detach to int.
14007 Add join.
14008 (join_inferior): New.
14009 * server.c (main): Don't skip detach support on mingw32.
14010 If the inferior doesn't support detaching return error.
14011 Call join_inferior instead of using waitpid.
14012 * linux-low.c (linux_join): New.
14013 (linux_target_op): Add linux_join.
14014 * spu-low.c (spu_join): New.
14015 (spu_target_ops): Add spu_join.
14016 * win32-low.c (win32_detach): Adapt to new interface.
14017 Reopen current_process_handle before detaching. Issue a child
14018 resume before detaching.
14019 (win32_join): New.
14020 (win32_target_op): Add win32_join.
14021
1d5315fe
PA
140222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14023
14024 * win32-low.c (win32-attach): Fix return value.
14025 * target.h (target_ops): Describe ATTACH return values.
14026
bf914831
PA
140272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14028
14029 * win32-low.c (GETPROCADDRESS): Define.
14030 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14031 (winapi_DebugSetProcessKillOnExit): Likewise.
14032 (win32_create_inferior): Force usage of ansi CreateProcessA.
14033 (win32_attach): Use GETPROCADDRESS.
14034 (win32_detach): Likewise.
14035
f72f3e60
PA
140362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14037
14038 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14039
ed50f18f
PA
140402007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14041
14042 * win32-low.c: Commit leftover changes from 2007-03-29.
14043
0c2ead7e
DJ
140442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14045
14046 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14047 fields short instead of int. Add explicit padding.
14048 (i387_cache_to_fsave): Remove unnecessary casts.
14049 (i387_fsave_to_cache): Doc fix.
14050 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14051
73725ff3
DJ
140522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14055 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14056
d99f33d8
PA
140572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14058
14059 * configure.srv (arm*-*-mingw32ce*): Move near the other
14060 arm targets.
14061
68070c10
PA
140622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14063
2482afc6 14064 * configure.ac: Add errno checking.
68070c10
PA
14065 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14066 sys/file.h and malloc.h.
14067 (AC_CHECK_DECLS): Add perror.
14068 (srv_mingwce): Handle.
2482afc6 14069 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14070 win32-i386-low.o to srv_tgtobj.
14071 (i[34567]86-*-mingw*): Likewise.
14072 (arm*-*-mingw32ce*): Add case.
14073 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14074 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14075 [__MINGW32CE__] (strerror): New function.
14076 [__MINGW32CE__] (errno): Define to GetLastError.
14077 [__MINGW32CE__] (COUNTOF): New macro.
14078 (remote_open): Remove extra close call.
14079 * mem-break.c (delete_breakpoint_at): New function.
14080 * mem-break.h (delete_breakpoint_at): Declare.
14081 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14082 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14083 [USE_WIN32API] (read, write): Add char* casts.
14084 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14085 * server.h: Include wincecompat.h on Windows CE.
14086 [HAVE_ERRNO_H]: Check.
14087 (perror): Declare if not declared.
14088 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14089 (perror_with_name): Remove errno declaration.
14090 * wincecompat.h: New.
14091 * wincecompat.c: New.
14092 * win32-low.h: New.
14093 * win32-arm-low.c: New.
14094 * win32-i386-low.c: New.
14095 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14096 (OUTMSG2): Make it safe.
14097 (_T): New macro.
14098 (COUNTOF): New macro.
14099 (NUM_REGS): Get it from the low target.
14100 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14101 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14102 (thread_rec): Let low target handle debug registers.
14103 (child_add_thread): Likewise.
14104 (child_init_thread_list): Likewise.
14105 (continue_one_thread): Likewise.
14106 (regptr): New.
14107 (do_child_fetch_inferior_registers): Move to ...
14108 * win32-i386-low.c: ... here, and rename to ...
14109 (do_fetch_inferior_registers): ... this.
889bf7c5 14110 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14111 Go through the low target.
14112 (do_child_store_inferior_registers): Use regptr.
14113 (strwinerror): New function.
14114 (win32_create_inferior): Handle Windows CE.
14115 Use strwinerror instead of strerror on Windows error
14116 codes. Add program to the error output.
14117 Don't close the main thread handle on Windows CE.
14118 (win32_attach): Use coredll.dll on Windows CE.
14119 (win32_kill): Close current process and current
14120 thread handles.
14121 (win32_detach): Use coredll.dll on Windows CE.
14122 (win32_resume): Let low target handle debug registers, and
14123 step request.
14124 (handle_exception): Add/Remove initial breakpoint. Avoid
14125 non-existant WSTOPSIG on Windows CE.
14126 (win32_read_inferior_memory): Cast to remove warning.
14127 (win32_arch_string): Go through the low target.
14128 (initialize_low): Call set_breakpoint_data with the low
14129 target's breakpoint.
14130 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14131 FOP_REGNUM, mappings): Move to ...
14132 * win32-i386-low.c: ... here.
14133 * win32-low.c (win32_thread_info): Move to ...
14134 * win32-low.h: ... here.
14135 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14136 win32-arm-low.c and wincecompat.c.
14137 (all:): Add $EXEEXT.
14138 (install-only:): Likewise.
14139 (gdbserver:): Likewise.
14140 (gdbreplay:): Likewise.
14141 * config.in: Regenerate.
14142 * configure: Regenerate.
14143
41093d81
PA
141442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14145
14146 * win32-low.c: Rename typedef thread_info to
14147 win32_thread_info throughout.
14148
544afa54
PA
141492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14150
14151 * win32-i386-low.c: Rename to ...
14152 * win32-low.c: ... this.
14153 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14154 * Makefile.in: Likewise.
14155
bce7165d
PA
141562007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14157
14158 * remote-utils.c (monitor_output): Constify msg parameter.
14159 * server.h (monitor_output): Likewise.
14160 * win32-i386-low.c (handle_output_debug_string): New.
14161 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14162 handle_output_debug_string.
14163 (get_child_debug_event): Likewise.
14164
506c7aa0
DJ
141652007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14166
14167 * server.c (main): Correct strtoul check.
14168
42c81e2a
DJ
141692007-03-27 Jon Ringle <jon@ringle.org>
14170
14171 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14172
9453113a
DJ
141732007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14174
14175 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14176
64a69107
DJ
141772007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * terminal.h: Check HAVE_SGTTY_H.
14180
141812007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14182
14183 * remote-utils.c (remote_open): Print out the assigned port number.
14184
c74d0ad8
DJ
141852007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * remote-utils.c (monitor_output): New function.
14188 * server.c (debug_threads): Define here.
14189 (monitor_show_help): New function.
14190 (handle_query): Handle qRcmd.
14191 (main): Do not handle 'd' packet.
14192 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14193 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14194 of debug_threads.
14195
de7c3b4a
PA
141962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14197
14198 * Makefile.in (EXEEXT): New.
14199 (clean): Use $(EXEEXT).
14200
ef57601b
PA
142012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14202
14203 * target.h (target_ops): Rename send_signal to request_interrupt,
14204 and remove enum target_signal parameter.
14205 * linux-low.c (linux_request_interrupt): Rename from
14206 linux_send_signal, and always send SIGINT.
14207 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14208 and always send SIGINT.
14209 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14210 of send_signal.
14211 (input_interrupt): Likewise.
14212
820f2bda
PA
142132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14214
14215 * server.c (get_features_xml): Check if target implemented
14216 arch_string.
14217 * win32-i386-low.c (win32_arch_string): New.
14218 (win32_target_ops): Add win32_arch_string as arch_string member.
14219
ab39bf24
UW
142202007-02-22 Markus Deuling <deuling@de.ibm.com>
14221
14222 * spu-low.c (spu_arch_string): New.
14223 (spu_target_ops): Add spu_arch_string.
14224
61ff6e04
DJ
142252007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14228 * configure.ac: Do not check for terminal.h.
14229 * configure, config.in: Regenerated.
14230
fb1e4ffc
DJ
142312007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14232
14233 * Makefile.in (OBS): Add $(XML_BUILTIN).
14234 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14235 (clean): Update.
14236 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14237 (arm-with-iwmmxt.c): New.
14238 * config.in, configure: Regenerate.
14239 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14240 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14241 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14242 (arm*-*-linux*): Add iWMMXt and regset support.
14243 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14244 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14245 (arm_store_wmmxregset, target_regsets): New.
14246 * server.c (get_features_xml): Take annex argument. Check builtin
14247 XML documents.
14248 (handle_query): Handle multiple annexes.
14249
0f48aa01
DJ
142502007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * remote-utils.c [USE_WIN32API] (read, write): Define.
14253 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14254 write.
14255
23181151
DJ
142562007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14257
14258 * linux-i386-low.c (the_low_target): Set arch_string.
14259 * linux-x86-64-low.c (the_low_target): Likewise.
14260 * linux-low.c (linux_arch_string): New.
14261 (linux_target_ops): Add it.
14262 * linux-low.h (struct linux_target_ops): Add arch_string.
14263 * server.c (write_qxfer_response): Use const void * for DATA.
14264 (get_features_xml): New.
14265 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14266 * target.h (struct target_ops): Add arch_string method.
14267
9d606399
DJ
142682007-01-03 Denis Pilat <denis.pilat@st.com>
14269 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * linux-low.c (linux_kill): Handle being called with no threads.
14272 * win32-i386-low.c (win32_kill): Likewise.
14273 (get_child_debug_event): Clear current_process_handle.
14274
142752006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14276 Daniel Jacobowitz <dan@codesourcery.com>
14277
14278 * remote-utils.c (remote_open): Check the type of specified
14279 serial port devices before opening them.
14280 * server.c (main): Kill the inferior if an error occurs during
14281 the first remote_open.
14282
a5e13d24
DJ
142832006-12-05 Markus Deuling <deuling@de.ibm.com>
14284
14285 * README: Update supported targets.
14286
186947f7
DJ
142872006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * Makefile.in (clean): Remove reg-mips64.c.
14290 (reg-mips64.c, reg-mips64.o): New rules.
14291 * configure.srv: Handle mips64. Include regset support for mips.
14292 * linux-mips-low.c (union mips_register): New.
14293 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14294 (mips_breakpoint, mips_breakpoint_at): Use int.
14295 (mips_collect_register, mips_supply_register)
14296 (mips_collect_register_32bit, mips_supply_register_32bit)
14297 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14298 (mips_store_fpregset, target_regsets): New.
14299 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14300
a13e2c95
UW
143012006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14302
14303 * configure.srv: Add target "spu*-*-*".
14304 * Makefile.in (clean): Remove reg-spu.c.
14305 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14306 * spu-low.c: New file.
14307
cb7283db
DJ
143082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * configure.ac: Correct td_thr_tls_get_addr test.
14311 * configure: Regenerated.
14312
89be2091
DJ
143132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14314
14315 * linux-low.c (linux_wait_for_event): Reformat. Use the
14316 pass_signals array.
14317 * remote-utils.c (decode_address_to_semicolon): New.
14318 * server.c (pass_signals, handle_general_set): New.
14319 (handle_query): Mention QPassSignals for qSupported.
14320 (main): Call handle_general_set.
14321 * server.h (pass_signals, decode_address_to_semicolon): New.
14322
000ef4f0
DJ
143232006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14324
14325 * server.c (handle_query): Correct error handling for read_auxv.
14326
b7149293
UW
143272005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14328
14329 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14330 and srv_linux_thread_db to yes.
14331 * linux-s390-low.c (s390_fill_gregset): New function.
14332 (target_regsets): Define data structure.
14333
dae5f5cf
DJ
143342006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14335
14336 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14337 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14338 * config.in, configure: Regenerated.
14339 * inferiors.c (gdb_id_to_thread): New function.
14340 (gdb_id_to_thread_id): Use it.
14341 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14342 * linux-low.h (struct process_info): Add th member.
14343 (thread_db_get_tls_address): New prototype.
14344 * remote-utils.c (decode_address): Make non-static.
14345 * server.c (handle_query): Handle qGetTLSAddr.
14346 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14347 * target.h (struct target_ops): Add get_tls_address.
14348 * thread-db.c (maybe_attach_thread): Save the thread handle.
14349 (thread_db_get_tls_address): New.
14350
32ca6d61
DJ
143512006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14354 (linux_resume_one_process): Take a siginfo_t *. Update all
14355 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14356 (struct pending_signals): Add a siginfo_t.
14357 (linux_wait_for_process): Always set last_status.
14358 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14359 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14360 * linux-low.h (struct process_info): Add last_status.
14361
5ffff7c1
DJ
143622006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * remote-utils.c (try_rle): New function.
14365 (putpkt_binary): Use it.
14366
8695c747
DJ
143672006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14370 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14371 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14372 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14373 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14374 point registers.
14375
290fadea
RS
143762006-08-08 Richard Sandiford <richard@codesourcery.com>
14377
14378 * server.c (terminal_fd): New variable.
14379 (old_foreground_pgrp): Likewise.
14380 (restore_old_foreground_pgrp): New function.
14381 (start_inferior): Record the terminal file descriptor in terminal_fd
14382 and its original foreground group in old_foreground_pgrp. Register
14383 restore_old_foreground_pgrp with atexit().
14384
9f2e1e63
DJ
143852006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * server.c (handle_query): Correct qPart to qXfer.
14388
b80864fb
DJ
143892006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * configure.ac: Check for more headers which are missing on
14392 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14393 * configure.srv: Add Cygwin and mingw32.
14394 * remote-utils.c: Don't include headers unconditionally which
14395 are missing on mingw32. Include <winsock.h> for mingw32.
14396 (remote_open): Adjust for mingw32 support. Flush
14397 standard error after writing to it.
14398 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14399 (unblock_async_io, enable_async_io, disable_async_io)
14400 (readchar, getpkt): Update for Winsock support.
14401 (prepare_resume_reply): Expect a protocol signal number.
14402 * server.c: Disable <sys/wait.h> on mingw32.
14403 (start_inferior): Adjust for mingw32 support. Flush
14404 standard error after writing to it.
14405 (attach_inferior): Likewise. Use protocol signal
14406 numbers.
14407 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14408 and names.
14409 * win32-i386-low.c: New file.
14410 * Makefile.in (XM_CLIBS): Set.
14411 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14412 (win32-i386-low.o): New dependency rule.
14413 * linux-low.c (linux_wait): Use target signal numbers.
14414 * target.h (struct target_ops): Doc fix.
14415 * server.h (target_signal_to_name): New prototype.
14416 * gdbreplay.c: Don't include headers unconditionally which
14417 are missing on mingw32. Include <winsock.h> for mingw32.
14418 (remote_close, remote_open): Adjust for Winsock support.
14419 * configure, config.in: Regenerated.
14420
0876f84a
DJ
144212006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * server.c (decode_xfer_read, write_qxfer_response): New.
14424 (handle_query): Take a packet length argument. Handle
14425 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14426 the qSupported response.
14427 (main): Update call to handle_query.
14428
01f9e8fa
DJ
144292006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14430
14431 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14432 (putpkt_binary): Renamed from putpkt and adjusted for binary
14433 data.
14434 (putpkt): New wrapper for putpkt_binary.
14435 (readchar): Don't mask off the high bit.
14436 (decode_X_packet): New function.
14437 * server.c (main): Call putpkt_binary if a handler sets the packet
14438 length. Save the length of the incoming packet. Handle 'X'.
14439 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14440
be2a5f71
DJ
144412006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * server.c (handle_query): Handle qSupported.
14444
ea025f5f
DJ
144452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14446
14447 * remote-utils.c (all_symbols_looked_up): New variable.
14448 (look_up_one_symbol): Check it.
14449 * server.h (look_up_one_symbol): New declaration.
14450 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14451
9308fc88
DJ
144522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14453
14454 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14455 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14456 (PTRACE_GET_THREAD_AREA): Define.
14457 (ps_get_thread_area): New function.
14458
52fb6437
NS
144592006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14460
14461 * configure.srv (m68k*-*-uclinux*): New target.
14462 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14463 (linux_resume_one_process): Remove extraneous cast.
14464 (linux_read_offsets): New.
14465 (linux_target_op): Add linux_read_offsets on mmuless systems.
14466 * server.c (handle_query): Add qOffsets logic.
14467 * target.h (struct target_ops): Add read_offsets.
14468
21b0f40c
DJ
144692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14470
14471 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14472 (PTRACE_GET_THREAD_AREA): Define.
14473 (ps_get_thread_area): New function.
14474 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14475 (linux-x86-64-low.o): Update.
14476
0050a760
DJ
144772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14478
14479 * configure.ac: Remove checks for prfpregset_t.
14480 * gdb_proc_service.h: New file.
14481 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14482 new "gdb_proc_service.h".
14483 * proc-service.c: Likewise.
14484 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14485 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14486 * Makefile.in (gdb_proc_service_h): Updated.
14487 * configure, config.in: Regenerated.
14488
b92a518e
DJ
144892006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14490
14491 * remote-utils.c (prepare_resume_reply): Move declaration
14492 of gdb_id_from_wait to the top of the block.
14493
545587ee
DJ
144942006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14495
14496 * linux-low.c (regsets_store_inferior_registers): Read the regset
14497 from the target before filling it.
14498
9db87ebd
DJ
144992006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * server.c (attach_inferior): Return SIGTRAP for a successful
14502 attach.
14503
dd24457d
DJ
145042006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * Makefile.in (OBS): Add version.o.
14507 (STAGESTUFF): Delete.
14508 (version.o): Add dependencies.
14509 (version.c): Replace rule.
14510 (clean): Remove version.c.
14511 * server.c (gdbserver_version): New.
14512 (gdbserver_usage): Use printf.
14513 (main): Handle --version and --help.
14514 * server.h (version, host_name): Add declarations.
14515
6f0f660e
EZ
145162005-12-23 Eli Zaretskii <eliz@gnu.org>
14517
889bf7c5
PA
14518 * linux-arm-low.c:
14519 * linux-arm-low.c:
14520 * inferiors.c:
14521 * i387-fp.h:
14522 * i387-fp.c:
14523 * gdbreplay.c:
14524 * regcache.c:
14525 * proc-service.c:
14526 * mem-break.h:
14527 * mem-break.c:
14528 * linux-x86-64-low.c:
14529 * linux-sh-low.c:
14530 * linux-s390-low.c:
14531 * linux-ppc64-low.c:
14532 * linux-ppc-low.c:
14533 * linux-mips-low.c:
14534 * linux-m68k-low.c:
14535 * linux-m32r-low.c:
14536 * linux-low.h:
14537 * linux-low.c:
14538 * linux-ia64-low.c:
14539 * linux-i386-low.c:
14540 * linux-crisv32-low.c:
14541 * thread-db.c:
14542 * terminal.h:
14543 * target.h:
14544 * target.c:
14545 * server.h:
14546 * server.c:
14547 * remote-utils.c:
14548 * regcache.h:
14549 * utils.c:
14550 * Makefile.in:
14551 * configure.ac:
6f0f660e
EZ
14552 * gdbserver.1: Add (C) after Copyright. Update the FSF
14553 address.
14554
9d1fb177
DJ
145552005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14558 (arm_breakpoint_at): Recognize both breakpoints.
14559 (the_low_target): Use the correct breakpoint instruction.
14560
011a70c2
DJ
145612005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14562
14563 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14564 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14565 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14566 (the_low_target): Update.
14567
7fb85e41
AS
145682005-10-25 Andreas Schwab <schwab@suse.de>
14569
14570 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14571
14572 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14573 (ia64_num_regs): Reduce to 462.
14574
3db0444b
DJ
145752005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * acinclude.m4: Correct quoting.
14578 * aclocal.m4: Regenerated.
14579
14580 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14581 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14582 (thread_db_init): Call thread_db_err_str.
14583 * configure.ac: Check for TD_VERSION.
14584 * config.in, configure: Regenerated.
14585
bee0189a
DJ
145862005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14587
14588 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14589
e9d25b98
DJ
145902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14593 is not available. Define HAVE_PTRACE_GETREGS if it is.
14594 * config.in, configure: Regenerated.
14595 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14596 * linux-i386-low.c, linux-m68k-low.c: Update to use
14597 HAVE_PTRACE_GETREGS.
14598 * linux-low.c (regsets_fetch_inferior_registers)
14599 (regsets_store_inferior_registers): Only return 0 if we processed
14600 GENERAL_REGS.
14601 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14602 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14603
a06660f7
DJ
146042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * inferiors.c (struct thread_info): Add gdb_id.
14607 (add_thread): Add gdb_id argument.
14608 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14609 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14610 calls to add_thread.
14611 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14612 * server.c (handle_query): Use thread_to_gdb_id.
14613 (handle_v_cont, main): Use gdb_id_to_thread_id.
14614 * server.h (add_thread): Update prototype.
14615 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14616 prototypes.
14617
5a1f5858
DJ
146182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14619
14620 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14621 left-padded registers.
14622 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14623 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14624
e122f1f5
SE
146252005-07-01 Steve Ellcey <sje@cup.hp.com>
14626
14627 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14628 * configure: Regenerate.
14629 * config.in: Regenerate.
14630 * server.h (NEED_DECLARATION_STRERROR):
14631 Replace with !HAVE_DECL_STRERROR.
14632
d592fa2f
DJ
146332005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * linux-low.c (linux_wait, linux_send_signal): Don't test
14636 an unsigned long variable for > 0 if it could be MAX_ULONG.
14637 * server.c (myresume): Likewise.
14638 * target.c (set_desired_inferior): Likewise.
14639
ccbd4912
MK
146402005-06-13 Mark Kettenis <kettenis@gnu.org>
14641
14642 * configure.ac: Simplify and improve check for socklen_t.
14643 * configure, config.in: Regenerate.
14644
f450004a
DJ
146452005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * acconfig.h: Remove.
14648 * configure.ac: Add a test for socklen_t. Use three-argument
14649 AC_DEFINE throughout.
14650 * config.in: Regenerated using autoheader 2.59.
14651 * configure: Regenerated.
14652
14653 * gdbreplay.c (socklen_t): Provide a default.
14654 (remote_open): Use socklen_t.
14655 * remote-utils.c (socklen_t): Provide a default.
14656 (remote_open): Use socklen_t.
14657 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14658 unsigned char.
14659
14660 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14661 char for buffers.
14662 * linux-low.c (linux_read_memory, linux_write_memory)
14663 (linux_read_auxv): Likewise.
14664 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14665 (check_mem_write): Likewise.
14666 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14667 Likewise.
14668 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14669 (registers_from_string, register_data): Likewise.
14670 * server.c (handle_query, main): Likewise.
14671 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14672 (decode_M_packet): Likewise.
14673 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14674 * target.h (struct target_ops): Update read_memory, write_memory,
14675 and read_auxv.
14676 (read_inferior_memory, write_inferior_memory): Update.
14677 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14678 to unsigned char *.
14679 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14680 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14681 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14682 linux-s390-low.c, linux-sh-low.c: Update for changes in
14683 read_inferior_memory and the_low_target->breakpoint.
14684
eee84df1
DJ
146852005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14688 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14689 * configure.srv: Add powerpc64-*-linux*.
14690 * linux-ppc64-low.c: New file.
14691
45b134e5
OF
146922005-05-23 Orjan Friberg <orjanf@axis.com>
14693
14694 * linux-cris-low.c: New file with support for CRIS.
14695 * linux-crisv32-low.c: Ditto for CRISv32.
14696 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14697 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14698 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14699 reg-crisv32.o, and reg-crisv32.c to make rules.
14700 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14701 recognized targets.
14702
48d93c75
UW
147032005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14704
14705 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14706 of sizeof (PTRACE_XFER_TYPE).
14707 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14708
e013ee27
OF
147092005-05-12 Orjan Friberg <orjanf@axis.com>
14710
889bf7c5 14711 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14712 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14713 pointers for hardware watchpoint support.
14714 * linux-low.h (struct linux_target_ops): Ditto.
14715 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14716 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14717 to linux_target_ops.
14718 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14719 reply packet.
14720 * server.c (main): Recognize 'Z' and 'z' packets.
14721
b0ded00b
UW
147222005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14723
14724 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14725 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14726 (the_low_target): Add new members.
14727
8643e2ad
DJ
147282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * proc-service.c (ps_lgetregs): Search all_processes instead of
14731 all_threads.
14732
fc620387
DJ
147332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * server.c (start_inferior): Change return type to int.
14736 (attach_inferior): Change sigptr to int *.
14737 (handle_v_cont, handle_v_requests): Change signal to int *.
14738 (main): Change signal to int.
14739
147402005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14741
14742 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14743 * configure.srv: Add m32r*-*-linux*.
14744 * linux-m32r-low.c: New file.
14745
e0e76420
DJ
147462005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14749
a1928bad
DJ
147502005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14751
14752 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14753 Take unsigned long arguments for PIDs.
14754 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14755 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14756 (wait_for_sigstop, linux_resume_one_process)
14757 (regsets_fetch_inferior_registers, linux_send_signal)
14758 (linux_read_auxv): Likewise. Update the types of variables holding
14759 PIDs. Update format string specifiers.
14760 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14761 * remote-utils.c (prepare_resume_reply): Likewise.
14762 * server.c (cont_thread, general_thread, step_thread)
14763 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14764 unsigned long.
14765 (handle_query): Update format specifiers.
14766 (handle_v_cont, main): Use strtoul for thread IDs.
14767 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14768 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14769 (general_thread, step_thread, thread_from_wait)
14770 (old_thread_from_wait): Update.
14771 * target.h (struct thread_resume): Use unsigned long for THREAD.
14772 (struct target_ops): Use unsigned long for arguments to attach and
14773 thread_alive.
14774
dcdb98d2
DJ
147752005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * acinclude.m4: Include bfd/bfd.m4 directly.
14778 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14779 <agriffis@toolchain.org>.
14780 * aclocal.m4, configure: Regenerated.
14781
bec39cab
AC
147822005-01-07 Andrew Cagney <cagney@gnu.org>
14783
14784 * configure.ac: Rename configure.in, require autoconf 2.59.
14785 * configure: Re-generate.
14786
434c4c77
DJ
147872004-12-08 Daniel Jacobowitz <dan@debian.org>
14788
14789 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14790 LIBS when finished.
14791 * aclocal.m4: Regenerated.
14792 * configure: Regenerated.
14793
db1d3e1b
AS
147942004-11-21 Andreas Schwab <schwab@suse.de>
14795
14796 * linux-m68k-low.c (m68k_num_gregs): Define.
14797 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14798 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14799 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14800 (m68k_breakpoint_at): New. Add to the_low_target.
14801
14802 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14803 srv_linux_thread_db to yes.
14804
43360365
JB
148052004-10-20 Joel Brobecker <brobecker@gnat.com>
14806
14807 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14808 (ARCH_SET_FS): Likewise.
14809 (ARCH_GET_FS): Likewise.
14810 (ARCH_GET_GS): Likewise.
14811
fd500816
DJ
148122004-10-16 Daniel Jacobowitz <dan@debian.org>
14813
14814 * linux-i386-low.c (ps_get_thread_area): New.
14815 * linux-x86-64-low.c (ps_get_thread_area): New.
14816 * linux-low.c: Include <sys/syscall.h>.
14817 (linux_kill_one_process): Don't kill the first thread here.
14818 (linux_kill): Kill the first thread here.
14819 (kill_lwp): New function.
14820 (send_sigstop, linux_send_signal): Use it.
14821 * proc-service.c: Clean up #ifdefs.
14822 (fpregset_info): Delete.
14823 (ps_lgetregs): Update and enable implementation.
14824 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14825 implementations.
14826 * remote-utils.c (struct sym_cache, symbol_cache): New.
14827 (input_interrupt): Print a clearer message.
14828 (async_io_enabled): New variable.
14829 (enable_async_io, disable_async_io): Use it. Update comments.
14830 (look_up_one_symbol): Use the symbol cache.
14831 * thread-db.c (thread_db_look_up_symbols): New function.
14832 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14833
f6de3c42
DJ
148342004-10-16 Daniel Jacobowitz <dan@debian.org>
14835
14836 * configure.in: Test for -rdynamic.
14837 * configure: Regenerated.
14838 * Makefile (INTERNAL_LDFLAGS): New.
14839 (gdbserver, gdbreplay): Use it.
14840
2c0fc042
AC
148412004-09-02 Andrew Cagney <cagney@gnu.org>
14842
14843 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14844
075b3282
DJ
148452004-03-23 Daniel Jacobowitz <drow@mvista.com>
14846
14847 * linux-low.c (linux_wait): Clear all_processes list also.
14848
fa6a77dc
DJ
148492004-03-12 Daniel Jacobowitz <drow@mvista.com>
14850
14851 * linux-low.c: Include <errno.h>. Remove extern declaration of
14852 errno.
14853
6d782a97
DJ
148542004-03-12 Daniel Jacobowitz <drow@mvista.com>
14855
14856 * gdbreplay.c, server.h, utils.c: Update copyright years.
14857
3a7fb99b
DJ
148582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14859
14860 * server.c (main): Print child status or termination signal from
14861 variable 'signal', not 'sig'.
14862
c3e735a6
DJ
148632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14864
14865 * linux-low.c (linux_read_memory): Change return type to
14866 int. Check for and return error from ptrace().
14867 * target.c (read_inferior_memory): Change return type to int. Pass
14868 back return status from the_target->read_memory().
14869 * target.h (struct target_ops): Adapt *read_memory() prototype.
14870 Update comment.
14871 (read_inferior_memory): Adapt prototype.
14872 * server.c (main): Return an error packet if
14873 read_inferior_memory() returns an error.
14874
a59d1c82
DJ
148752004-03-04 Daniel Jacobowitz <drow@mvista.com>
14876
14877 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14878 Unify with other clean targets.
14879
dc3f8883
DJ
148802004-02-29 Daniel Jacobowitz <drow@mvista.com>
14881
14882 * server.c (handle_v_cont): Call set_desired_inferior.
14883
89a208da
DJ
148842004-02-29 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14887
62ea82f5
DJ
148882004-02-29 Daniel Jacobowitz <drow@mvista.com>
14889
14890 * linux-low.c (linux_wait): Unblock async I/O.
14891 (linux_resume): Block and enable async I/O.
14892 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14893 * server.h (block_async_io, unblock_async_io): Add prototypes.
14894
6910d122
DJ
148952004-02-29 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * remote-utils.c (remote_open): Print a status notice after
14898 opening a TCP port.
14899 * server.c (attach_inferior): Print a status notice after
14900 attaching.
14901
149022004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14903
14904 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14905
c89dc5d4
DJ
149062004-02-26 Daniel Jacobowitz <drow@mvista.com>
14907
14908 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14909 error packet.
14910 * server.c, target.h: Update copyright years.
14911
4b8dad4a
RM
149122004-02-25 Roland McGrath <roland@redhat.com>
14913
14914 * target.h (struct target_ops): New member `read_auxv'.
14915 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14916 * linux-low.c (linux_read_auxv): New function.
14917 (linux_target_ops): Initialize `read_auxv' member to that.
14918
d7446758
JB
149192004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14920
14921 Committed by Jim Blandy <jimb@redhat.com>.
14922
14923 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14924 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14925 instead of GPR_SIZE to distiguish s390 and s390x targets.
14926
5544ad89
DJ
149272004-01-31 Daniel Jacobowitz <drow@mvista.com>
14928
14929 * linux-low.c: Update copyright year.
14930 (check_removed_breakpoint): Clear pending_is_breakpoint.
14931 (linux_set_resume_request, linux_queue_one_thread)
14932 (resume_status_pending_p): New functions.
14933 (linux_continue_one_thread): Use process->resume.
14934 (linux_resume): Only resume threads if there are no pending events.
14935 * linux-low.h (struct process_info): Add resume request
14936 pointer.
14937
2a68b70e
DJ
149382004-01-30 Daniel Jacobowitz <drow@mvista.com>
14939
14940 * regcache.c (new_register_cache): Clear the allocated register
14941 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14942
64386c31
DJ
149432003-10-13 Daniel Jacobowitz <drow@mvista.com>
14944
14945 * linux-low.c (linux_resume): Take a struct thread_resume *
14946 argument.
14947 (linux_wait): Update call.
14948 (resume_ptr): New static variable.
14949 (linux_continue_one_thread): Renamed from
14950 linux_continue_one_process. Use resume_ptr.
14951 (linux_resume): Use linux_continue_one_thread.
14952 * server.c (handle_v_cont, handle_v_requests): New functions.
14953 (myresume): New function.
14954 (main): Handle 'v' case.
14955 * target.h (struct thread_resume): New type.
14956 (struct target_ops): Change argument of "resume" to struct
14957 thread_resume *.
14958 (myresume): Delete macro.
14959
c938e9b0
L
149602003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14961
14962 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14963 (uninstall): Support DESTDIR.
14964
7f313d07
BC
14965Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14966
14967 * configure.srv: Add xscale*linux copy of arm*linux entry.
14968
3b2fc2ea
DJ
149692003-07-24 Daniel Jacobowitz <drow@mvista.com>
14970
14971 * linux-arm-low.c (arm_reinsert_addr): New function.
14972 (the_low_target): Add arm_reinsert_addr.
14973
1c0a559e
MK
149742003-07-08 Mark Kettenis <kettenis@gnu.org>
14975
14976 * mem-break.c: Remove whitespace at end of file.
14977
43d5792c
DJ
149782003-06-28 Daniel Jacobowitz <drow@mvista.com>
14979
14980 * configure.in: Check whether we need to prototype strerror.
14981 * server.h: Optionally prototype strerror.
14982 * gdbreplay.c (perror_with_name): Use strerror.
14983 * linux-low.c (linux_attach_lwp): Use strerror.
14984 * utils.c (perror_with_name): Use strerror.
14985 * config.in, configure: Regenerated.
14986
c8a86edf
DJ
149872003-06-28 Daniel Jacobowitz <drow@mvista.com>
14988
14989 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14990 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14991
73d37363
DJ
149922003-06-20 Daniel Jacobowitz <drow@mvista.com>
14993
14994 * Makefile.in (SFILES): Update.
14995 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14996 low-sun3.c: Remove files.
14997
6ad8ae5c
DJ
149982003-06-17 Daniel Jacobowitz <drow@mvista.com>
14999
15000 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15001 (linux_detach_one_process, linux_detach): New functions.
15002 (linux_target_ops): Add linux_detach.
15003 * server.c (main): Handle 'D' packet.
15004 * target.h (struct target_ops): Add "detach" member.
15005 (detach_inferior): Define.
15006
1581182a
MK
150072003-06-13 Mark Kettenis <kettenis@gnu.org>
15008
15009 From Kelley Cook <kelleycook@wideopenwest.com>:
15010 * configure.srv: Accept i[34567]86 variants.
15011
e5379b03
DJ
150122003-06-05 Daniel Jacobowitz <drow@mvista.com>
15013
15014 * linux-low.c (linux_wait_for_event): Correct comment typos.
15015 (linux_resume_one_process): Call check_removed_breakpoint.
15016 (linux_send_signal): New function.
15017 (linux_target_ops): Add linux_send_signal.
15018 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15019 of kill.
15020 * target.h (struct target_ops): Add send_signal.
15021
2ff29de4
JB
150222003-05-29 Jim Blandy <jimb@redhat.com>
15023
15024 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15025 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15026 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15027 away part of the register's value.
15028
254787d4
DJ
150292003-03-26 Daniel Jacobowitz <drow@mvista.com>
15030
15031 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15032 (linux_wait_for_event, linux_init_signals): Likewise.
15033
94e10508
DJ
150342003-03-17 Daniel Jacobowitz <drow@mvista.com>
15035
15036 * configure.in: Check for stdlib.h.
15037 * configure: Regenerated.
15038 * config.in: Regenerated.
15039
4c0711e0
DJ
150402003-01-04 Andreas Schwab <schwab@suse.de>
15041
15042 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15043
ef66e766
AC
150442003-01-02 Andrew Cagney <ac131313@redhat.com>
15045
15046 * Makefile.in: Remove obsolete code.
15047
a1358604
DJ
150482002-11-20 Daniel Jacobowitz <drow@mvista.com>
15049
15050 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15051 defined(PT_FPR0_HI).
15052
23ce3b1c
DJ
150532002-11-17 Stuart Hughes <seh@zee2.com>
15054
15055 * linux-arm-low.c (arm_num_regs): Increase.
15056 (arm_regmap): Include status register.
15057
150582002-11-17 Daniel Jacobowitz <drow@mvista.com>
15059
15060 * linux-low.c (register_addr): Remove incorrect -1 check.
15061
a9fa9f7d
DJ
150622002-08-29 Daniel Jacobowitz <drow@mvista.com>
15063
15064 * linux-low.c (linux_create_inferior): Call setpgid. Return
15065 the new PID.
15066 (unstopped_p, linux_signal_pid): Remove.
15067 (linux_target_ops): Remove linux_signal_pid.
15068 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15069 global instead of target method.
15070 * target.h (struct target_ops): Remove signal_pid. Update comment
15071 for create_inferior.
15072 * server.c (signal_pid): New variable.
15073 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15074 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15075 (attach_inferior): Set signal_pid.
15076
17574093
DJ
150772002-08-23 Daniel Jacobowitz <drow@mvista.com>
15078
15079 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15080
150812002-08-20 Jim Blandy <jimb@redhat.com>
15082
15083 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15084 default for this.
15085
150862002-08-01 Andrew Cagney <cagney@redhat.com>
15087
15088 * Makefile.in: Make chill references obsolete.
15089
150902002-07-24 Kevin Buettner <kevinb@redhat.com>
15091
15092 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15093 * configure: Regenerate.
15094 * config.in: Regenerate.
15095
150962002-07-09 David O'Brien <obrien@FreeBSD.org>
15097
15098 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15099 (perror_with_name, remote_close, remote_open, expect, play): Static.
15100
151012002-07-04 Michal Ludvig <mludvig@suse.cz>
15102
4b8dad4a 15103 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15104 byte offsets instead of an array of indexes.
15105 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15106
151072002-06-13 Daniel Jacobowitz <drow@mvista.com>
15108
15109 * regcache.c: Add comment.
15110
151112002-06-11 Daniel Jacobowitz <drow@mvista.com>
15112
15113 * thread-db.c: New file.
15114 * proc-service.c: New file.
15115 * acinclude.m4: New file.
15116 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15117 proc-service.o, and thread-db.o.
15118 (linux-low.o): Add USE_THREAD_DB.
15119 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15120 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15121 * aclocal.m4: Regenerated.
15122 * config.in: Regenerated.
15123 * configure: Regenerated.
15124 * configure.in: Check for proc_service.h, sys/procfs.h,
15125 thread_db.h, and linux/elf.h headrs.
15126 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15127 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15128 Check for -lthread_db and thread support.
15129 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15130 PowerPC, and SuperH.
15131 * i387-fp.c: Constify arguments.
15132 * i387-fp.h: Likewise.
15133 * inferiors.c: (struct thread_info): Renamed from
15134 `struct inferior_info'. Remove PID member. Use generic inferior
15135 list header. All uses updated.
15136 (inferiors, signal_pid): Removed.
15137 (all_threads): New variable.
15138 (get_thread): Define.
15139 (add_inferior_to_list): New function.
15140 (for_each_inferior): New function.
15141 (change_inferior_id): New function.
15142 (add_inferior): Removed.
15143 (remove_inferior): New function.
15144 (add_thread): New function.
15145 (free_one_thread): New function.
15146 (remove_thread): New function.
15147 (clear_inferiors): Use for_each_inferior and free_one_thread.
15148 (find_inferior): New function.
15149 (find_inferior_id): New function.
15150 (inferior_target_data): Update argument type.
15151 (set_inferior_target_data): Likewise.
15152 (inferior_regcache_data): Likewise.
15153 (set_inferior_regcache_data): Likewise.
15154 * linux-low.c (linux_bp_reinsert): Remove.
15155 (all_processes, stopping_threads, using_thrads)
15156 (struct pending_signals, debug_threads, pid_of): New.
15157 (inferior_pid): Replace with macro.
15158 (struct inferior_linux_data): Remove.
15159 (get_stop_pc, add_process): New functions.
15160 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15161 Use add_process and add_thread.
15162 (linux_attach_lwp): New function, based on old linux_attach. Use
15163 add_process and add_thread. Set stop_expected for new threads.
15164 (linux_attach): New function.
15165 (linux_kill_one_process): New function.
15166 (linux_kill): Kill all LWPs.
15167 (linux_thread_alive): Use find_inferior_id.
15168 (check_removed_breakpoints, status_pending_p): New functions.
15169 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15170 Update. Use WNOHANG. Wait for cloned processes also. Update process
15171 struct for the found process.
15172 (linux_wait_for_event): New function.
15173 (linux_wait): Use it. Support LWPs.
15174 (send_sigstop, wait_for_sigstop, stop_all_processes)
15175 (linux_resume_one_process, linux_continue_one_process): New functions.
15176 (linux_resume): Support LWPs.
15177 (REGISTER_RAW_SIZE): Remove.
15178 (fetch_register): Use register_size instead. Call supply_register.
15179 (usr_store_inferior_registers): Likewise. Call collect_register.
15180 Fix recursive case.
15181 (regsets_fetch_inferior_registers): Improve error message.
15182 (regsets_store_inferior_registers): Add debugging.
15183 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15184 (unstopped_p, linux_signal_pid): New functions.
15185 (linux_target_ops): Add linux_signal_pid.
15186 (linux_init_signals): New function.
15187 (initialize_low): Call it. Initialize using_threads.
15188 * regcache.c (inferior_regcache_data): Add valid
15189 flag.
15190 (get_regcache): Fetch registers lazily. Add fetch argument
15191 and update all callers.
15192 (regcache_invalidate_one, regcache_invalidate): New
15193 functions.
15194 (new_register_cache): Renamed from create_register_cache.
15195 Return the new regcache.
15196 (free_register_cache): Change argument to a void *.
15197 (registers_to_string, registers_from_string): Call get_regcache
15198 with fetch flag set.
15199 (register_data): Make static. Pass fetch flag to get_regcache.
15200 (supply_register): Call get_regcache with fetch flag clear.
15201 (collect_register): Call get_regcache with fetch flag set.
15202 (collect_register_as_string): New function.
15203 * regcache.h: Update.
15204 * remote-utils.c (putpkt): Flush after debug output and use
15205 stderr.
15206 Handle input interrupts while waiting for an ACK.
15207 (input_interrupt): Use signal_pid method.
15208 (getpkt): Flush after debug output and use stderr.
15209 (outreg): Use collect_register_as_string.
15210 (new_thread_notify, dead_thread_notify): New functions.
15211 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15212 and general_thread.
15213 (look_up_one_symbol): Flush after debug output.
15214 * server.c (step_thread, server_waiting): New variables.
15215 (start_inferior): Don't use signal_pid. Update call to mywait.
15216 (attach_inferior): Update call to mywait.
15217 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15218 (main): Don't fetch/store registers explicitly. Use
15219 set_desired_inferior. Support proposed ``Hs'' packet. Update
15220 calls to mywait.
15221 * server.h: Update.
15222 (struct inferior_list, struct_inferior_list_entry): New.
15223 * target.c (set_desired_inferior): New.
15224 (write_inferior_memory): Constify.
15225 (mywait): New function.
15226 * target.h: Update.
15227 (struct target_ops): New signal_pid method.
15228 (mywait): Removed macro, added prototype.
15229
15230 * linux-low.h (regset_func): Removed.
15231 (regset_fill_func, regset_store_func): New.
15232 (enum regset_type): New.
15233 (struct regset_info): Add type field. Use new operation types.
15234 (struct linux_target_ops): stop_pc renamed to get_pc.
15235 Add decr_pc_after_break and breakpoint_at.
15236 (get_process, get_thread_proess, get_process_thread)
15237 (strut process_info, all_processes, linux_attach_lwp)
15238 (thread_db_init): New.
15239
15240 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15241 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15242 (the_low_target): Add new members.
15243 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15244 (i386_store_fpxregset): Constify.
15245 (target_regsets): Add new kind identifier.
15246 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15247 (i386_set_pc): Add debugging.
15248 (i386_breakpoint_at): New function.
15249 (the_low_target): Add new members.
15250 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15251 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15252 (mips_breakpoint_at): New.
15253 (the_low_target): Add new members.
15254 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15255 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15256 (the_low_target): Add new members.
15257 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15258 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15259 (the_low_target): Add new members.
15260 * linux-x86-64-low.c (target_regsets): Add new kind
15261 identifier.
15262
152632002-05-15 Daniel Jacobowitz <drow@mvista.com>
15264
15265 From Martin Pool <mbp@samba.org>:
15266 * server.c (gdbserver_usage): New function.
15267 (main): Call it.
15268
152692002-05-14 Daniel Jacobowitz <drow@mvista.com>
15270
15271 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15272 stop_at -> stop_pc.
15273
152742002-05-04 Andrew Cagney <ac131313@redhat.com>
15275
15276 * Makefile.in: Remove obsolete code.
15277
152782002-04-24 Michal Ludvig <mludvig@suse.cz>
15279
15280 * linux-low.c (regsets_fetch_inferior_registers),
15281 (regsets_store_inferior_registers): Removed cast to int from
15282 ptrace() calls.
15283 * regcache.h: Added declaration of struct inferior_info.
15284
152852002-04-20 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * inferiors.c (struct inferior_info): Add regcache_data.
15288 (add_inferior): Call create_register_cache.
15289 (clear_inferiors): Call free_register_cache.
15290 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15291 * regcache.c (struct inferior_regcache_data): New.
15292 (registers): Remove.
15293 (get_regcache): New function.
15294 (create_register_cache, free_register_cache): New functions.
15295 (set_register_cache): Don't initialize the register cache here.
15296 (registers_to_string, registers_from_string, register_data): Call
15297 get_regcache.
15298 * regcache.h: Add prototypes.
15299 * server.h: Likewise.
15300
153012002-04-20 Daniel Jacobowitz <drow@mvista.com>
15302
15303 * mem-break.c: New file.
15304 * mem-break.h: New file.
15305 * Makefile.in: Add mem-break.o rule; update server.h
15306 dependencies.
15307 * inferiors.c (struct inferior_info): Add target_data
15308 member.
15309 (clear_inferiors): Free target_data member if set.
15310 (inferior_target_data, set_inferior_target_data): New functions.
15311 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15312 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15313 * linux-low.c (linux_bp_reinsert): New variable.
15314 (struct inferior_linux_data): New.
15315 (linux_create_inferior): Use set_inferior_target_data.
15316 (linux_attach): Likewise. Call add_inferior.
15317 (linux_wait_for_one_inferior): New function.
15318 (linux_wait): Call it.
15319 (linux_write_memory): Add const.
15320 (initialize_low): Call set_breakpoint_data.
15321 * linux-low.h (struct linux_target_ops): Add breakpoint
15322 handling members.
15323 * server.c (attach_inferior): Remove extra add_inferior
15324 call.
15325 * server.h: Include mem-break.h. Update inferior.c
15326 prototypes.
15327 * target.c (read_inferior_memory)
15328 (write_inferior_memory): New functions.
15329 * target.h (read_inferior_memory)
15330 (write_inferior_memory): Change macros to prototypes.
15331 (struct target_ops): Update comments. Add const to write_memory
15332 definition.
15333
153342002-04-11 Daniel Jacobowitz <drow@mvista.com>
15335
15336 * linux-low.c (usr_store_inferior_registers): Support
15337 registers which are allowed to fail to store.
15338 * linux-low.h (linux_target_ops): Likewise.
15339 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15340 (ppc_cannot_store_register): FPSCR may not be storable.
15341
153422002-04-09 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * server.h: Include <string.h> if HAVE_STRING_H.
15345 * ChangeLog: Correct paths in last ChangeLog entry.
15346
153472002-04-09 Daniel Jacobowitz <drow@mvista.com>
15348
15349 * linux-low.h: Remove obsolete prototypes.
15350 (struct linux_target_ops): New.
15351 (extern the_low_target): New.
15352 * linux-low.c (num_regs, regmap): Remove declarations.
15353 (register_addr): Use the_low_target explicitly.
15354 (fetch_register): Likewise.
15355 (usr_fetch_inferior_registers): Likewise.
15356 (usr_store_inferior_registers): Likewise.
15357 * linux-arm-low.c (num_regs): Remove.
15358 (arm_num_regs): Define.
15359 (arm_regmap): Renamed from regmap, made static.
15360 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15361 made static.
15362 (arm_cannot_store_register): Renamed from cannot_store_register,
15363 made static.
15364 (the_low_target): New.
15365 * linux-i386-low.c (num_regs): Remove.
15366 (i386_num_regs): Define.
15367 (i386_regmap): Renamed from regmap, made static.
15368 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15369 made static.
15370 (i386_cannot_store_register): Renamed from cannot_store_register,
15371 made static.
15372 (the_low_target): New.
15373 * linux-ia64-low.c (num_regs): Remove.
15374 (ia64_num_regs): Define.
15375 (ia64_regmap): Renamed from regmap, made static.
15376 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15377 made static.
15378 (ia64_cannot_store_register): Renamed from cannot_store_register,
15379 made static.
15380 (the_low_target): New.
15381 * linux-m68k-low.c (num_regs): Remove.
15382 (m68k_num_regs): Define.
15383 (m68k_regmap): Renamed from regmap, made static.
15384 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15385 made static.
15386 (m68k_cannot_store_register): Renamed from cannot_store_register,
15387 made static.
15388 (the_low_target): New.
15389 * linux-mips-low.c (num_regs): Remove.
15390 (mips_num_regs): Define.
15391 (mips_regmap): Renamed from regmap, made static.
15392 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15393 made static.
15394 (mips_cannot_store_register): Renamed from cannot_store_register,
15395 made static.
15396 (the_low_target): New.
15397 * linux-ppc-low.c (num_regs): Remove.
15398 (ppc_num_regs): Define.
15399 (ppc_regmap): Renamed from regmap, made static.
15400 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15401 made static.
15402 (ppc_cannot_store_register): Renamed from cannot_store_register,
15403 made static.
15404 (the_low_target): New.
15405 * linux-s390-low.c (num_regs): Remove.
15406 (s390_num_regs): Define.
15407 (s390_regmap): Renamed from regmap, made static.
15408 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15409 made static.
15410 (s390_cannot_store_register): Renamed from cannot_store_register,
15411 made static.
15412 (the_low_target): New.
15413 * linux-sh-low.c (num_regs): Remove.
15414 (sh_num_regs): Define.
15415 (sh_regmap): Renamed from regmap, made static.
15416 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15417 made static.
15418 (sh_cannot_store_register): Renamed from cannot_store_register,
15419 made static.
15420 (the_low_target): New.
15421 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15422 (the_low_target): New.
15423
154242002-04-09 Daniel Jacobowitz <drow@mvista.com>
15425
15426 * Makefile.in: Add stamp-h target.
15427 * configure.in: Create stamp-h.
15428 * configure: Regenerated.
15429
154302002-04-09 Daniel Jacobowitz <drow@mvista.com>
15431
15432 * inferiors.c: New file.
15433 * target.c: New file.
15434 * target.h: New file.
15435 * Makefile.in: Add target.o and inferiors.o. Update
15436 dependencies.
15437 * linux-low.c (inferior_pid): New static variable,
15438 moved from server.c.
15439 (linux_create_inferior): Renamed from create_inferior.
15440 Call add_inferior. Return 0 on success instead of a PID.
15441 (linux_attach): Renamed from myattach.
15442 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15443 (linux_thread_alive): Renamed from mythread_alive.
15444 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15445 child dies.
15446 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15447 (regsets_store_inferior_registers): Correct error message.
15448 Add missing ``return 0''.
15449 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15450 (linux_store_registers): Renamed from store_inferior_registers.
15451 (linux_read_memory): Renamed from read_inferior_memory.
15452 (linux_write_memory): Renamed from write_inferior_memory.
15453 (linux_target_ops): New structure.
15454 (initialize_low): Call set_target_ops ().
15455 * remote-utils.c (unhexify): New function.
15456 (hexify): New function.
15457 (input_interrupt): Send signals to ``signal_pid''.
15458 * server.c (inferior_pid): Remove.
15459 (start_inferior): Update create_inferior call.
15460 (attach_inferior): Call add_inferior.
15461 (handle_query): New function.
15462 (main): Call handle_query for `q' packets.
15463 * server.h: Include "target.h". Remove obsolete prototypes.
15464 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15465
154662002-04-09 Daniel Jacobowitz <drow@mvista.com>
15467
15468 * Makefile.in: Add WARN_CFLAGS. Update configury
15469 dependencies.
15470 * configure.in: Check for <string.h>
15471 * configure: Regenerate.
15472 * config.in: Regenerate.
15473 * gdbreplay.c: Include needed system headers.
15474 (remote_open): Remove strchr prototype.
15475 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15476 * regcache.c (supply_register): Change buf argument to const void *.
15477 (supply_register_by_name): Likewise.
15478 (collect_register): Change buf argument to void *.
15479 (collect_register_by_name): Likewise.
15480 * regcache.h: Add missing prototypes.
15481 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15482 * server.c (handle_query): New function.
15483 (attached): New static variable, moved out of main.
15484 (main): Quiet longjmp clobber warnings.
15485 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15486 * utils.c (error): Remove NORETURN.
15487 (fatal): Likewise.
This page took 2.093957 seconds and 4 git commands to generate.