]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Implement "set cwd" command on GDB
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d092c5a2
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * inferiors.c (current_inferior_cwd): New global variable.
4 (get_inferior_cwd): New function.
5 * inferiors.h (struct process_info) <cwd>: New field.
6
7da0a886
SDJ
72017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
8
9 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
10 (OBS): Add gdb_tilde_expand.o.
11
289a6840
SM
122017-10-02 Simon Marchi <simon.marchi@ericsson.com>
13
14 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
15 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
16
256642e8
PA
172017-09-29 Pedro Alves <palves@redhat.com>
18
19 * ax.c (gdb_parse_agent_expr): Constify.
20 * ax.h (gdb_parse_agent_expr): Constify.
21 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
22 Constify.
23 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
24 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
25 * remote-utils.h (read_ptid): Constify.
26 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
27 (process_point_options, process_serial_event): Constify.
28 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
29 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
30 (cmd_qtbuffer): Constify.
31
5b9ca4d4
PA
322017-09-29 Pedro Alves <palves@redhat.com>
33
34 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
35 fails.
36
94c207e0
PA
372017-09-29 Pedro Alves <palves@redhat.com>
38
39 * linux-low.c (handle_extended_wait): Pass parent thread instead
40 of process to thread_db_notice_clone.
41 * linux-low.h (thread_db_notice_clone): Replace parent process
42 parameter with parent thread parameter.
43 * thread-db.c (find_one_thread): Add comment.
44 (thread_db_notice_clone): Replace parent process parameter with
45 parent thread parameter. Temporarily switch to the parent thread.
46
75352e28
SDJ
472017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
48
49 * gdbthread.h: Include "common-gdbthread.h".
50 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
51 "if" when validating the ptid.
52 * remote-utils.c: Include "gdbthread.h".
53 (prepare_resume_reply): Use "switch_to_thread".
54 * target.c (done_accessing_memory): Likewise.
55
ad339634
AA
562017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
57
58 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
59 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
60 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
61 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
62 s390x-gs-linux64-ipa.o to ipa_obj.
63 * linux-s390-low.c (HWCAP_S390_GS): New define.
64 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
65 New functions.
66 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
67 (s390_arch_setup): Check for guarded-storage support and choose
68 appropriate tdesc.
69 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
70 init_registers_s390x_gs_linux64.
71 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
72 enum value.
73 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
74 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
75
cc4d742f
SM
762017-09-22 Simon Marchi <simon.marchi@ericsson.com>
77
78 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
79
f6327dcb
KB
802017-09-21 Kevin Buettner <kevinb@redhat.com>
81
82 * linux-low.h (struct lwp_info): Add new field, thread_handle.
83 (thread_db_thread_handle): Declare.
84 * linux-low.c (linux_target_ops): Initialize thread_handle.
85 * server.c (handle_qxfer_threads_worker): Add support for
86 "handle" attribute.
87 * target.h (struct target_ops): Add new function pointer,
88 thread_handle.
89 (target_thread_handle): Define.
90 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
91 field in lwp.
92 (thread_db_thread_handle): New function.
93
86299109
KB
942017-09-21 Kevin Buettner <kevinb@redhat.com>
95
96 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
97 * linux-low.h (thread_db_notice_clone): Declare.
98 * thread-db.c (thread_db_notice_clone): New function.
99
f557a88a
PA
1002017-09-21 Pedro Alves <palves@redhat.com>
101
102 * server.c (gdb_read_memory, handle_status, process_serial_event)
103 (handle_serial_event, handle_target_event): Adjust to
104 set_desired_thread prototype change.
105 * target.c (set_desired_thread): Remove 'use_general' parameter
106 and adjust.
107 * target.h (set_desired_thread): Remove 'use_general' parameter.
108
223ffa71
TT
1092017-09-20 Tom Tromey <tom@tromey.com>
110
111 * target.c (target_terminal::terminal_state): Define.
112 (target_terminal::init): Rename from target_terminal_init.
113 (target_terminal::inferior): Rename from
114 target_terminal_inferior.
115 (target_terminal::ours): Rename from target_terminal_ours.
116 (target_terminal::ours_for_output, target_terminal::info): New.
117
04fd3ba9
SM
1182017-09-16 Simon Marchi <simon.marchi@ericsson.com>
119
120 * server.c (accumulate_file_name_length): Remove.
121 (emit_dll_description): Adjust to std::string change.
122 (handle_qxfer_libraries): Use std::string to hold document.
123
5e187554
SM
1242017-09-16 Simon Marchi <simon.marchi@ericsson.com>
125
126 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
127 return type of xml_escape_text.
128 * server.c (emit_dll_description): Likewise.
129
1526853e
SM
1302017-09-16 Simon Marchi <simon.marchi@ericsson.com>
131
132 * server.c (captured_main): Accept argument for --selftest.
133 Update run_tests call.
134 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
135 when registering selftests.
136
c4dfafab
SDJ
1372017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
138
139 * regcache.c (get_thread_regcache): Update code to use "std::vector"
140 instead of "VEC" for "target_desc.reg_defs".
141 (regcache_cpy): Likewise.
142 (registers_to_string): Likewise.
143 (registers_from_string): Likewise.
144 (find_regno): Likewise.
145 (supply_regblock): Likewise.
146 (regcache_raw_read_unsigned): Likewise.
147 * tdesc.c (init_target_desc): Likewise.
148 (tdesc_create_reg): Likewise.
149 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
150 (struct target_desc) <reg_defs>: Convert to "std::vector".
151 (target_desc): Do not initialize "reg_defs".
152 (~target_desc): Update code to use "std::vector" instead of "VEC"
153 for "target_desc.reg_defs".
154 (operator==): Likewise.
155
124aceb4
SM
1562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
157
158 * inferiors.h (thread_to_gdb_id): Remove.
159 * inferiors.c (thread_to_gdb_id): Remove.
160 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
161 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
162 lynx_store_registers, lynx_read_memory, lynx_write_memory):
163 Likewise.
164 * nto-low.c (nto_fetch_registers, nto_store_registers,
165 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
166
96cde54f
SM
1672017-09-15 Simon Marchi <simon.marchi@ericsson.com>
168
169 * inferiors.h (gdb_id_to_thread_id): Remove.
170 * inferiors.c (gdb_id_to_thread_id): Remove.
171 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
172 removal. Move pid declaration closer to where it's used.
173
e8ca139e
SM
1742017-09-15 Simon Marchi <simon.marchi@ericsson.com>
175
176 * server.c (handle_detach): New function.
177 (process_serial_event): Move code out, call handle_detach.
178
f8a4e119
SM
1792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
180
181 * server.c (require_running): Rename to ...
182 (require_running_or_return): ... this ...
183 (require_running_or_break): ... and this.
184 (handle_query, process_serial_event): Adjust.
185
0eb0a407
SM
1862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
187
188 * linux-low.c (linux_set_resume_request): Remove unused
189 variables.
190
785922a5
SM
1912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
192
193 * server.c (first_thread_of): Remove.
194 (process_serial_event): Replace usage of first_thread_of with
195 find_any_thread_of_pid.
196 * tracepoint.c (same_process_p): Remove.
197 (gdb_agent_about_to_close): Replace usage of same_process_p with
198 find_any_thread_of_pid.
199 * linux-x86-low.c (same_process_callback): Remove.
200 (x86_arch_setup_process_callback): Replace usage of
201 same_process_callback with find_any_thread_of_pid.
202 * thread-db.c (any_thread_of): Remove.
203 (switch_to_process): Replace usage of any_thread_of with
204 find_any_thread_of_pid.
205 * inferiors.c (thread_pid_matches_callback): Remove.
206 (find_thread_process): Adjust to use find_any_thread_of_pid.
207
a059f00c
SDJ
2082017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
209
210 * regcache.c (get_thread_regcache): Guard calls to "memset"
211 with "!VEC_empty".
212
cc397f3a
SDJ
2132017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
214
215 * linux-low.c (handle_extended_wait): Use
216 "allocate_target_description" instead of "XNEW".
217 * linux-x86-low.c (initialize_low_arch): Likewise.
218
22916b07
YQ
2192017-09-05 Yao Qi <yao.qi@linaro.org>
220
221 * configure.srv (srv_i386_regobj): Remove.
222 (srv_amd64_regobj): Remove.
223 (srv_regobj): Set it to "" for x86 non-linux targets.
224 * linux-x86-tdesc.c (i386_linux_read_description):
225 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
226 (init_registers_i386): Remove the declaration.
227 (tdesc_i386): Remove the declaration.
228 (lynx_i386_arch_setup): Call i386_create_target_description.
229 * nto-x86-low.c: Likewise.
230 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
231 [!__x86_64__]: include arch/i386.h.
232 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
233
38602d55
YQ
2342017-09-05 Yao Qi <yao.qi@linaro.org>
235
236 * configure.srv (srv_amd64_linux_xmlfiles): Remove
237 i386/amd64-XXX-linux from it.
238
44b886ff
YQ
2392017-09-05 Yao Qi <yao.qi@linaro.org>
240
241 * configure.srv: Empty srv_amd64_linux_regobj if $development is
242 false.
243 (ipa_amd64_linux_regobj): Remove.
244 (ipa_x32_linux_regobj): Remove.
245
b4570e4b
YQ
2462017-09-05 Yao Qi <yao.qi@linaro.org>
247
248 * Makefile.in (arch-amd64.o): New rule.
249 * configure.srv: Append arch-amd64.o.
250 * linux-amd64-ipa.c: Include common/x86-xstate.h.
251 (get_ipa_tdesc): Call amd64_linux_read_description.
252 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
253 and init_registers_amd64_XXX.
254 * linux-x86-low.c (x86_linux_read_description): Call
255 amd64_linux_read_description.
256 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
257 (initialize_low_arch): Don't call init_registers_x32_XXX and
258 init_registers_amd64_XXX.
259 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
260 and tdesc_amd64_XXX.
261 [__x86_64__] (amd64_tdesc_test): New function.
262 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
263 and init_registers_amd64_XXX.
264 * linux-x86-tdesc.c: Include arch/amd64.h.
265 (xcr0_to_tdesc_idx): New function.
266 (i386_linux_read_description): New function.
267 (amd64_get_ipa_tdesc_idx): New function.
268 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
269 (amd64_get_ipa_tdesc): Declare.
270
d1f28ea2
YQ
2712017-09-05 Yao Qi <yao.qi@linaro.org>
272
273 * configure.srv (srv_i386_linux_xmlfiles): Remove
274 i386/i386-XXX-linux.xml from it.
275
25a93583
YQ
2762017-09-05 Yao Qi <yao.qi@linaro.org>
277
278 * configure.srv: Set srv_i386_linux_regobj empty if $development
279 is false.
280 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
281 initialize_low_tdesc.
282 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
283 with #if initialize_low_tdesc.
284 * linux-x86-tdesc-selftest.c: New file.
285 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
286
5f035c07
YQ
2872017-09-05 Yao Qi <yao.qi@linaro.org>
288
289 * Makefile.in (arch-i386.o): New rule.
290 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
291 (x86_64-*-linux*): Likewise.
292 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
293 include arch/i386.h.
294 (i386_linux_read_description): Remove code and call
295 i386_create_target_description.
296 * tdesc.c (allocate_target_description): New function.
297 * tdesc.h (set_tdesc_architecture): Remove declaration.
298 (set_tdesc_osabi): Likewise.
299
0abe8a89
YQ
3002017-09-05 Yao Qi <yao.qi@linaro.org>
301
302 * linux-x86-tdesc.c: Don't include <inttypes.h>.
303 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
304 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
305 .xmltarget.
306 * server.c (get_features_xml): Call tdesc_get_features_xml.
307 * tdesc.c (set_tdesc_architecture): New function.
308 (set_tdesc_osabi): New function.
309 (tdesc_get_features_xml): New function.
310 (tdesc_create_feature): Add an argument.
311 * tdesc.h (struct target_desc) <features>: New field.
312 <arch, osabi>: New field.
313 (~target_desc): xfree features, arch, and osabi.
314 (target_desc::oerator==): Don't compare .xmltarget.
315 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
316 (set_tdesc_osabi): Likewise.
317 (tdesc_get_features_xml): Likewise.
318
0a188386
YQ
3192017-09-05 Yao Qi <yao.qi@linaro.org>
320
321 * linux-x86-tdesc.c: Include selftest.h.
322 (i386_tdesc_test): New function.
323 (initialize_low_tdesc): Call selftests::register_test.
324 * tdesc.h: Include regdef.h.
325 (target_desc): Override operator == and !=.
326
f49ff000
YQ
3272017-09-05 Yao Qi <yao.qi@linaro.org>
328
329 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
330 (ipa_obj): Likewise.
331 * linux-i386-ipa.c: Include common/x86-xstate.h
332 (get_ipa_tdesc): Call i386_linux_read_description.
333 (initialize_low_tracepoint): Don't call init_registers_XXX
334 functions, call initialize_low_tdesc instead.
335 * linux-x86-low.c (x86_linux_read_description): Call
336 i386_linux_read_description.
337 (initialize_low_arch): Don't call init_registers_i386_XXX
338 functions, call initialize_low_tdesc.
339 * linux-x86-tdesc.c: New file.
340 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
341 (i386_get_ipa_tdesc_idx): Declare.
342 (i386_get_ipa_tdesc): Declare.
343 (initialize_low_tdesc): Declare.
344
2b68ef2f
YQ
3452017-09-05 Yao Qi <yao.qi@linaro.org>
346
347 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
348 instead of 0.
349
f7000548
YQ
3502017-09-05 Yao Qi <yao.qi@linaro.org>
351
352 * Makefile.in (IPA_OBJS): Add vec-ipa.o
353 * regcache.c (get_thread_regcache): Use VEC_length.
354 (init_register_cache): Likewise.
355 (regcache_cpy): Likewise.
356 (registers_to_string): Iterate reg_defs via VEC_iterate.
357 (find_regno): Likewise.
358 (find_register_by_number): Use VEC_index.
359 (register_size): Call find_register_by_number.
360 (register_data): Call find_register_by_number.
361 (supply_regblock): Use VEC_length.
362 (regcache_raw_read_unsigned): Likewise.
363 * tdesc.c (init_target_desc): Iterate reg_defs via
364 VEC_iterate.
365 (default_description): Update initializer.
366 (copy_target_description): Don't update field num_registers.
367 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
368 <num_registers>: Remove.
369
50a421ac
SM
3702017-09-04 Simon Marchi <simon.marchi@ericsson.com>
371
372 * Makefile.in (.SECONDARY): Define target.
373
23fdd69e
SM
3742017-09-03 Simon Marchi <simon.marchi@ericsson.com>
375
376 * linux-low.c (linux_wait_1): Adjust.
377 * server.c (queue_stop_reply_callback): Adjust.
378
0a2dde4a
SDJ
3792017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
380
381 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
382 QEnvironmentUnset and QEnvironmentReset packets.
383 (handle_query): Inform remote that QEnvironmentHexEncoded,
384 QEnvironmentUnset and QEnvironmentReset are supported.
385
6afd337d
SM
3862017-08-25 Simon Marchi <simon.marchi@ericsson.com>
387
388 * inferiors.h (inferior_target_data): Rename to ...
389 (thread_target_data): ... this.
390 (inferior_regcache_data): Rename to ...
391 (thread_regcache_data): ... this.
392 (set_inferior_regcache_data): Rename to ...
393 (set_thread_regcache_data): ... this.
394 * inferiors.c (inferior_target_data): Rename to ...
395 (thread_target_data): ... this.
396 (inferior_regcache_data): Rename to ...
397 (thread_regcache_data): ... this.
398 (set_inferior_regcache_data): Rename to ...
399 (set_thread_regcache_data): ... this.
400 (free_one_thread): Update.
401 * linux-low.h (get_thread_lwp): Update.
402 * regcache.c (get_thread_regcache): Update.
403 (regcache_invalidate_thread): Update.
404 (free_register_cache_thread): Update.
405 * win32-i386-low.c (update_debug_registers_callback): Update.
406 (win32_get_current_dr): Update.
407 * win32-low.c (thread_rec): Update.
408 (delete_thread_info): Update.
409 (continue_one_thread): Update.
410 (suspend_one_thread): Update.
411
a160cc46
SM
4122017-08-24 Simon Marchi <simon.marchi@ericsson.com>
413
414 * inferiors.c (set_inferior_target_data): Remove.
415 * inferiors.h (set_inferior_target_data): Remove.
416
6d580b63
YQ
4172017-08-18 Yao Qi <yao.qi@linaro.org>
418
419 * Makefile.in (OBS): Add selftest.o.
420 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
421 * configure, config.in: Re-generated.
422 * server.c: Include common/sefltest.h.
423 (captured_main): Handle option --selftest.
424
f5a29eb0
YQ
4252017-08-09 Yao Qi <yao.qi@linaro.org>
426
427 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
428 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
429 i386-avx-mpx.o and i386-mmx.o.
430 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
431 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
432 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
433 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
434 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
435 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
436 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
437 i386/amd64-avx-mpx.xml.
438
57757c2f
YQ
4392017-08-09 Yao Qi <yao.qi@linaro.org>
440
441 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
442 and x32-avx-avx512.o.
443 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
444 i386/x32-avx-avx512.xml.
445
229d26fc
SM
4462017-07-26 Simon Marchi <simon.marchi@ericsson.com>
447
448 * tracepoint.h (enum class fast_tpoint_collect_result): New
449 enumeration.
450 (fast_tracepoint_collecting): Change return type to
451 fast_tpoint_collect_result.
452 * tracepoint.c (fast_tracepoint_collecting): Likewise.
453 * linux-low.h: Include tracepoint.h.
454 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
455 fast_tpoint_collect_result.
456 * linux-low.c (handle_tracepoints): Adjust.
457 (linux_fast_tracepoint_collecting): Change return type to
458 fast_tpoint_collect_result.
459 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
460 linux_wait_1, stuck_in_jump_pad_callback,
461 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
462 proceed_one_lwp): Adjust to type change.
463
2e1e43e1
YQ
4642017-07-10 Yao Qi <yao.qi@linaro.org>
465
466 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
467
adc764e7
YQ
4682017-06-29 Yao Qi <yao.qi@linaro.org>
469
470 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
471 Remove.
472 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
473
a206891a
SM
4742017-06-20 Simon Marchi <simon.marchi@ericsson.com>
475
476 * Makefile.in (IPA_OBJS): Sort and format one item per line.
477
9a6c7d9c
SDJ
4782017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * linux-low.c (linux_create_inferior): Adjust code to access the
481 environment information via 'gdb_environ' class.
482 * lynx-low.c (lynx_create_inferior): Likewise.
483 * server.c (our_environ): Make it an instance of 'gdb_environ'.
484 (get_environ): Return a pointer to 'our_environ'.
485 (captured_main): Initialize 'our_environ'.
486 * server.h (get_environ): Adjust prototype.
487 * spu-low.c (spu_create_inferior): Adjust code to access the
488 environment information via 'gdb_environ' class.
489
ae3e2ccf
SM
4902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
491
492 * linux-low.c (linux_read_memory, linux_write_memory): Remove
493 usage of "register" keyword.
494
3e019bdc
SM
4952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
496
497 * configure: Re-generate.
498
8465943a
SM
4992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
500
501 * configure: Re-generate.
502
cf0dd6f0
SM
5032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
504
505 * Makefile.in (COMPILE.pre): Add "-x c++".
506
9845682b
SDJ
5072017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
508
509 * fork-child.c: Conditionally include <signal.h>.
510
aefd8b33
SDJ
5112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * server.c (handle_general_set): Handle new packet
514 "QStartupWithShell".
515 (handle_query): Add "QStartupWithShell" to the list of supported
516 packets.
517 (gdbserver_usage): Add help text explaining the
518 new "--startup-with-shell" and "--no-startup-with-shell" CLI
519 options.
520 (captured_main): Recognize and act upon the presence of the new
521 CLI options.
522
2090129c
SDJ
5232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
524 Pedro Alves <palves@redhat.com>
525
526 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
527 * configure: Regenerate.
528 * configure.srv (srv_linux_obj): Add "fork-child.o" and
529 "fork-inferior.o".
530 (i[34567]86-*-lynxos*): Likewise.
531 (spu*-*-*): Likewise.
532 * fork-child.c: New file.
533 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
534 and "environ.h".
535 (linux_ptrace_fun): New function.
536 (linux_create_inferior): Adjust function prototype to reflect
537 change on "target.h". Adjust function code to use
538 "fork_inferior".
539 (linux_request_interrupt): Delete "signal_pid".
540 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
541 (lynx_ptrace_fun): New function.
542 (lynx_create_inferior): Adjust function prototype to reflect
543 change on "target.h". Adjust function code to use
544 "fork_inferior".
545 * nto-low.c (nto_create_inferior): Adjust function prototype and
546 code to reflect change on "target.h". Update comments.
547 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
548 "common-terminal.h" and "environ.h".
549 (terminal_fd): Moved to fork-child.c.
550 (old_foreground_pgrp): Likewise.
551 (restore_old_foreground_pgrp): Likewise.
552 (last_status): Make it global.
553 (last_ptid): Likewise.
554 (our_environ): New variable.
555 (startup_with_shell): Likewise.
556 (program_name): Likewise.
557 (program_argv): Rename to...
558 (program_args): ...this.
559 (wrapper_argv): New variable.
560 (start_inferior): Delete function.
561 (get_exec_wrapper): New function.
562 (get_exec_file): Likewise.
563 (get_environ): Likewise.
564 (prefork_hook): Likewise.
565 (post_fork_inferior): Likewise.
566 (postfork_hook): Likewise.
567 (postfork_child_hook): Likewise.
568 (handle_v_run): Update code to deal with arguments coming from the
569 remote host. Update calls from "start_inferior" to
570 "create_inferior".
571 (captured_main): Likewise. Initialize environment variable. Call
572 "have_job_control".
573 * server.h (post_fork_inferior): New prototype.
574 (get_environ): Likewise.
575 (last_status): Declare.
576 (last_ptid): Likewise.
577 (signal_pid): Likewise.
578 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
579 (spu_ptrace_fun): New function.
580 (spu_create_inferior): Adjust function prototype to reflect change
581 on "target.h". Adjust function code to use "fork_inferior".
582 * target.c (target_terminal_init): New function.
583 (target_terminal_inferior): Likewise.
584 (target_terminal_ours): Likewise.
585 * target.h: Include <vector>.
586 (struct target_ops) <create_inferior>: Update prototype.
587 (create_inferior): Update macro.
588 * utils.c (gdb_flush_out_err): New function.
589 * win32-low.c (win32_create_inferior): Adjust function prototype
590 and code to reflect change on "target.h".
591
043a4934
SDJ
5922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
593
594 * inferiors.c (switch_to_thread): New function.
595
15652511
SDJ
5962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
597
598 * Makefile.in (SFILE): Add "common/job-control.c".
599 (OBS): Add "job-control.o".
600
21ea5acd
SDJ
6012017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
602
603 * Makefile: Remove "@host_makefile_frag@".
604
e13cb306
PA
6052017-05-05 Pedro Alves <palves@redhat.com>
606
607 * configure: Regenerate.
608
c94fee56
SDJ
6092017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
610
611 * configure: Regenerate.
612
a0ff9e1a
SM
6132017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
616 software_single_step change of return type to
617 std::vector<CORE_ADDR>.
618 * linux-low.c (install_software_single_step_breakpoints):
619 Likewise.
620 * linux-low.h (install_software_single_step_breakpoints):
621 Likewise.
622
be628ab8
SDJ
6232017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
624
625 * remote-utils.c: Include "gdb_termios.h" instead of
626 "terminal.h".
627 * terminal.h: Delete file.
628
7c5ded6a
SDJ
6292017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
630
631 * server.c: Include <vector>.
632 <program_argv, wrapper_argv>: Convert to std::vector.
633 (start_inferior): Rewrite function to use C++.
634 (handle_v_run): Likewise. Update code that calculates the argv
635 based on the vRun packet; use C++.
636 (captured_main): Likewise.
637
436252de
SM
6382017-04-06 Simon Marchi <simon.marchi@ericsson.com>
639
640 * server.c (handle_v_cont): Initialize thread_resume::thread
641 with null_ptid.
642
9bf2a700
PA
6432017-04-05 Pedro Alves <palves@redhat.com>
644
645 * configure: Regenerate.
646
a121b7c1
PA
6472017-04-05 Pedro Alves <palves@redhat.com>
648
649 * gdbreplay.c (sync_error): Constify.
650 * linux-x86-low.c (push_opcode): Constify.
651
21c8a587
PA
6522017-04-05 Pedro Alves <palves@redhat.com>
653
654 * win32-low.c (get_child_debug_event)
655 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
656 Report TARGET_WAITKIND_SPURIOUS instead.
657
fb32b4f7
PA
6582017-04-05 Pedro Alves <palves@redhat.com>
659
660 * remote-utils.c (remote_prepare, remote_open): Constify.
661 * remote-utils.h (remote_prepare, remote_open): Constify.
662 * server.c (captured_main): Constify 'port' handling.
663
65dd1e59
SM
6642017-04-04 Simon Marchi <simon.marchi@ericsson.com>
665
666 * Makefile.in (clean): Clear .deps.
667
8fa5b777
SM
6682017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * .gitignore: Remove generated files, replace with wildcard.
671 * (clean): Replace removal of generated files with wildcard.
672 (version.c): Replace with...
673 (version-generated.c): ...this.
674 (xml-builtin.c): Replace with...
675 (xml-builtin-generated.c): ...this.
676 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
677 (%.c: *regformats*): Replace with...
678 (%-generated.c: *regformats*): ...this.
679
a12e714b
MF
6802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
681
682 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
683 (xtensa_fill_gregset): Call collect_register_by_name for
684 threadptr register.
685 (xtensa_store_gregset): Call supply_register_by_name for
686 threadptr register.
687
1a09b50a
MF
6882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
689
690 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
691 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
692 (xtensa_store_gregset): Call supply_register for all registers in
693 a0_regnum..a0_regnum + C0_NREGS range.
694
1a01e7c6
SM
6952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
696
697 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
698 (ax-ipa.o: ax.c): Remove.
699 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
700 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
701 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
702 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
703 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
704
36bc18a8
SM
7052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
706
707 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
708 (print-utils-ipa.o: ../common/print-utils.c): Remove.
709 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
710 (errors-ipa.o: ../common/errors.c): Remove.
711 (format-ipa.o: ../common/format.c): Remove.
712 (common-utils-ipa.o: ../common/common-utils.c): Remove.
713
a8ebe3d5
SM
7142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * Makefile.in (%-ipa.o: %.c): New rule.
717 (tracepoint-ipa.o: tracepoint.c): Remove.
718 (utils-ipa.o: utils.c): Remove.
719 (remote-utils-ipa.o: remote-utils.c): Remove.
720 (regcache-ipa.o: regcache.c): Remove.
721 (i386-linux-ipa.o: i386-linux.c): Remove.
722 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
723 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
724 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
725 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
726 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
727 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
728 (amd64-linux-ipa.o: amd64-linux.c): Remove.
729 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
730 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
731 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
732 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
733 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
734 (aarch64-ipa.o: aarch64.c): Remove.
735 (s390-linux32-ipa.o: s390-linux32.c): Remove.
736 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
737 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
738 (s390-linux64-ipa.o: s390-linux64.c): Remove.
739 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
740 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
741 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
742 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
743 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
744 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
745 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
746 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
747 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
748 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
749 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
750 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
751 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
752 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
753 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
754 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
755 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
756 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
757 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
758 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
759 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
760 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
761 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
762 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
763 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
764 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
765 (tdesc-ipa.o: tdesc.c): Remove.
766 (x32-linux-ipa.o: x32-linux.c): Remove.
767 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
768 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
769
50cfacb7
SM
7702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * Makefile.in (%.o: ../arch/%.c): New rule.
773 (arm.o: ../arch/arm.c): Remove.
774 (arm-linux.o: ../arch/arm-linux.c): Remove.
775 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
776 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
777
c5a22423
SM
7782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
779
780 * Makefile.in (%.o: ../nat/%.c): New rule.
781 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
782 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
783 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
784 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
785 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
786 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
787 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
788 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
789 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
790 (linux-personality.o: ../nat/linux-personality.c): Remove.
791 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
792 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
793 (x86-linux.o: ../nat/x86-linux.c): Remove.
794 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
795 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
796
6bda016b
SM
7972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
798
799 * Makefile.in (%.o: ../common/%.c): New rule.
800 (signals.o: ../common/signals.c): Remove.
801 (print-utils.o: ../common/print-utils.c): Remove.
802 (rsp-low.o: ../common/rsp-low.c): Remove.
803 (common-utils.o: ../common/common-utils.c): Remove.
804 (posix-strerror.o: ../common/posix-strerror.c): Remove.
805 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
806 (vec.o: ../common/vec.c): Remove.
807 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
808 (xml-utils.o: ../common/xml-utils.c): Remove.
809 (ptid.o: ../common/ptid.c): Remove.
810 (buffer.o: ../common/buffer.c): Remove.
811 (format.o: ../common/format.c): Remove.
812 (filestuff.o: ../common/filestuff.c): Remove.
813 (agent.o: ../common/agent.c): Remove.
814 (errors.o: ../common/errors.c): Remove.
815 (environ.o: ../common/environ.c): Remove.
816 (common-debug.o: ../common/common-debug.c): Remove.
817 (cleanups.o: ../common/cleanups.c): Remove.
818 (common-exceptions.o: ../common/common-exceptions.c): Remove.
819 (fileio.o: ../common/fileio.c): Remove.
820 (common-regcache.o: ../common/common-regcache.c): Remove.
821 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
822 (new-op.o: ../common/new-op.c): Remove.
823 (btrace-common.o: ../common/btrace-common.c): Remove.
824
21122961
SM
8252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
826
827 * Makefile.in (%.o: ../target/%.c): New rule.
828 (waitstatus.o: ../target/waitstatus.c): Remove.
829
c362e621
SM
8302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * Makefile.in
833 (%.c: ../regformats/%.dat,
834 (%.c: ../regformats/arm/%.dat,
835 (%.c: ../regformats/i386/%.dat,
836 (%.c: ../regformats/rs6000/%.dat): New rules.
837 (aarch64.c): Remove.
838 (reg-arm.c): Remove.
839 (arm-with-iwmmxt.c): Remove.
840 (arm-with-vfpv2.c): Remove.
841 (arm-with-vfpv3.c): Remove.
842 (arm-with-neon.c): Remove.
843 (reg-bfin.c): Remove.
844 (reg-cris.c): Remove.
845 (reg-crisv32.c): Remove.
846 (i386.c): Remove.
847 (i386-linux.c): Remove.
848 (i386-avx.c): Remove.
849 (i386-avx-linux.c): Remove.
850 (i386-avx-avx512.c): Remove.
851 (i386-avx-avx512-linux.c): Remove.
852 (i386-mpx.c): Remove.
853 (i386-mpx-linux.c): Remove.
854 (i386-avx-mpx-avx512-pku.c): Remove.
855 (i386-avx-mpx-avx512-pku-linux.c): Remove.
856 (i386-avx-mpx.c): Remove.
857 (i386-avx-mpx-linux.c): Remove.
858 (i386-mmx.c): Remove.
859 (i386-mmx-linux.c): Remove.
860 (reg-ia64.c): Remove.
861 (reg-m32r.c): Remove.
862 (reg-m68k.c): Remove.
863 (reg-cf.c): Remove.
864 (mips-linux.c): Remove.
865 (mips-dsp-linux.c): Remove.
866 (mips64-linux.c): Remove.
867 (mips64-dsp-linux.c): Remove.
868 (nios2-linux.c): Remove.
869 (powerpc-32.c): Remove.
870 (powerpc-32l.c): Remove.
871 (powerpc-altivec32l.c): Remove.
872 (powerpc-cell32l.c): Remove.
873 (powerpc-vsx32l.c): Remove.
874 (powerpc-isa205-32l.c): Remove.
875 (powerpc-isa205-altivec32l.c): Remove.
876 (powerpc-isa205-vsx32l.c): Remove.
877 (powerpc-e500l.c): Remove.
878 (powerpc-64l.c): Remove.
879 (powerpc-altivec64l.c): Remove.
880 (powerpc-cell64l.c): Remove.
881 (powerpc-vsx64l.c): Remove.
882 (powerpc-isa205-64l.c): Remove.
883 (powerpc-isa205-altivec64l.c): Remove.
884 (powerpc-isa205-vsx64l.c): Remove.
885 (s390-linux32.c): Remove.
886 (s390-linux32v1.c): Remove.
887 (s390-linux32v2.c): Remove.
888 (s390-linux64.c): Remove.
889 (s390-linux64v1.c): Remove.
890 (s390-linux64v2.c): Remove.
891 (s390-te-linux64.c): Remove.
892 (s390-vx-linux64.c): Remove.
893 (s390-tevx-linux64.c): Remove.
894 (s390x-linux64.c): Remove.
895 (s390x-linux64v1.c): Remove.
896 (s390x-linux64v2.c): Remove.
897 (s390x-te-linux64.c): Remove.
898 (s390x-vx-linux64.c): Remove.
899 (s390x-tevx-linux64.c): Remove.
900 (tic6x-c64xp-linux.c): Remove.
901 (tic6x-c64x-linux.c): Remove.
902 (tic6x-c62x-linux.c): Remove.
903 (reg-sh.c): Remove.
904 (reg-sparc64.c): Remove.
905 (reg-spu.c): Remove.
906 (amd64.c): Remove.
907 (amd64-linux.c): Remove.
908 (amd64-avx.c): Remove.
909 (amd64-avx-linux.c): Remove.
910 (amd64-avx-avx512.c): Remove.
911 (amd64-avx-avx512-linux.c): Remove.
912 (amd64-mpx.c): Remove.
913 (amd64-mpx-linux.c): Remove.
914 (amd64-avx-mpx-avx512-pku.c): Remove.
915 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
916 (amd64-avx-mpx.c): Remove.
917 (amd64-avx-mpx-linux.c): Remove.
918 (x32.c): Remove.
919 (x32-linux.c): Remove.
920 (x32-avx.c): Remove.
921 (x32-avx-linux.c): Remove.
922 (x32-avx-avx512.c): Remove.
923 (x32-avx-avx512-linux.c): Remove.
924 (reg-xtensa.c): Remove.
925 (reg-tilegx.c): Remove.
926 (reg-tilegx32.c): Remove.
927
1672e0d9
SDJ
9282017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
929
930 * Makefile.in (SFILES): Add "common/environ.c".
931 (OBJS): Add "common/environ.h".
932
239b6d10
WT
9332017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
934
935 * configure.ac: Check if the fs_base and gs_base members of
936 `struct user_regs_struct' exist.
937 * config.in: Regenerated.
938 * configure: Likewise.
939
694b382c
AT
9402017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
941
942 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
943 target_read_memory.
944 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
945 (get_next_pcs_syscall_next_pc): Likewise.
946
7dc53023
LM
9472016-12-23 Luis Machado <lgustavo@codesourcery.com>
948
949 * win32-i386-low.c: Fix incorrect reference to a couple source files.
950 * nto-x86-low.c: Likewise.
951
ad02e4fe
SM
9522016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * Makefile.in: Include disable-implicit-rules.mk.
955
dcb07cfa
PA
9562016-11-23 Pedro Alves <palves@redhat.com>
957
958 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
959 (debug_vprintf): Use std::chrono::steady_clock instead of
960 gettimeofday. Use '.' instead of ':'.
961 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
962 (get_timestamp): Use std::chrono::steady_clock instead of
963 gettimeofday.
964
8629c02c
SM
9652016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
966
967 * Makefile.in: Fix whitespace formatting.
968
b593ecca
SM
9692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * Makefile.in (SFILES, OBS): Flatten list and order
972 alphabetically.
973
9986ba08
PA
9742016-11-23 Pedro Alves <palves@redhat.com>
975
976 * event-loop.c (handle_file_event): Use warning.
977 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
978 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
979 Use warning.
980
4eefa7bc
PA
9812016-11-23 Pedro Alves <palves@redhat.com>
982
983 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
984 output.
985 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
986 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
987 debug_printf and debug_flush for debug output.
988 * server.c (handle_general_set): Likewise.
989 * thread-db.c (try_thread_db_load): Use debug_printf for debug
990 output.
991
5443506e
SM
9922016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
993
994 * Makefile.in (.c.o): Replace rule with ...
995 (%.o: %.c): ... this one.
996
3b165252
SM
9972016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
998
999 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1000 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1001 make.
1002 * configure.ac: Remove checks for the make program.
1003 * configure: Re-generate.
1004
0bcda685
PA
10052016-10-28 Pedro Alves <palves@redhat.com>
1006
1007 * Makefile.in (CXX_DIALECT): Get from configure.
1008 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1009 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1010 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1011 * config.in: Regenerate.
1012 * configure: Regenerate.
1013
c3805894
YQ
10142016-10-27 Yao Qi <yao.qi@linaro.org>
1015
1016 * linux-low.c (linux_supports_range_stepping): Return true if
1017 can_software_single_step return true.
1018
89342618
YQ
10192016-10-27 Yao Qi <yao.qi@linaro.org>
1020
1021 * inferiors.c (find_inferior_in_random): New function.
1022 * inferiors.h (find_inferior_in_random): Declare.
1023 * linux-low.c (linux_wait_for_event_filtered): Call
1024 find_inferior_in_random instead of find_inferior.
1025
e3652c84
YQ
10262016-10-27 Yao Qi <yao.qi@linaro.org>
1027
1028 * linux-low.c (linux_wait_1): If single-step breakpoints are
1029 inserted, remove them.
1030
5a04c4cf
PA
10312016-10-26 Pedro Alves <palves@redhat.com>
1032
1033 * linux-low.c (handle_extended_wait): Link parent/child fork
1034 threads.
1035 (linux_wait_1): Unlink them.
1036 (linux_set_resume_request): Ignore resume requests for
1037 already-resumed and unhandled fork child threads.
1038 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1039 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1040 New functions.
1041 (handle_v_requests) <vCont>: Don't call require_running.
1042 * server.h (in_queued_stop_replies): New declaration.
1043
cb93dc7f
YQ
10442016-10-24 Yao Qi <yao.qi@linaro.org>
1045
1046 PR server/20733
1047 * linux-aarch64-low.c (append_insns): Cast the return value to
1048 'uint32_t *'.
1049
a1078bea
YQ
10502016-10-10 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1053
1fb77080
SDJ
10542016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1055
1056 * target.c (target_supports_multi_process): New function, moved
1057 from...
1058 * target.h (target_supports_multi_process): ... here. Remove
1059 macro.
1060
39b5a3b9
TT
10612016-10-05 Tom Tromey <tom@tromey.com>
1062
1063 PR remote/20655:
1064 * tracepoint.c (handle_tracepoint_bkpts): Check
1065 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1066
c1d0b70a
YQ
10672016-10-05 Yao Qi <yao.qi@linaro.org>
1068
1069 * configure.srv: Update the path of arm-*.xml files.
1070
0a69eedb
YQ
10712016-10-05 Terry Guo <terry.guo@arm.com>
1072 Yao Qi <yao.qi@linaro.org>
1073
1074 * Makefile.in: Adjust the path of rules.
1075 * configure.srv: Update the path of xml files.
1076 * regformats/arm-with-iwmmxt.dat: Regenerated.
1077 * regformats/arm-with-neon.dat: Likewise.
1078 * regformats/arm-with-vfpv2.dat: Likewise.
1079 * regformats/arm-with-vfpv3.dat Likewise.
1080
17e16485
YQ
10812016-09-30 Yao Qi <yao.qi@linaro.org>
1082
1083 PR gdbserver/20627
1084 * target.c (target_stop_and_wait): Don't call
1085 target_continue_no_signal, use resume_stop instead.
1086
edeeb602
YQ
10872016-09-26 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-low.c (linux_wait_1): Call debug_exit.
1090
503b1c39
PA
10912016-09-23 Pedro Alves <palves@redhat.com>
1092
1093 * Makefile.in (SFILES): Add common/new-op.c.
1094 (OBS): Add common/new-op.o.
1095 (new-op.o): New rule.
1096
74172ecf
SM
10972016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1098
1099 * .gitinore: Ignore more files.
1100
fc6cda2e
YQ
11012016-09-21 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1104 23.
1105
bc1e6c81
SDJ
11062016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1107
1108 * server.c (start_inferior): Call target_mourn_inferior instead of
1109 mourn_inferior; pass ptid_t argument to it.
1110 (resume): Likewise.
1111 (handle_target_event): Likewise.
1112 * target.c (target_mourn_inferior): New function.
1113 * target.h (mourn_inferior): Delete macro.
1114
0e00e962
AA
11152016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1116
1117 * linux-low.c (lwp_is_stepping): New function.
1118
1d8cb77d
CL
11192016-09-06 Carl Love <cel@us.ibm.com>
1120
1121 * server.c (start_inferior): Fixed comment, requested comment change
1122 didn't get updated correctly. Removed reference to ptrace () call as
1123 it is only true on Linux systems.
1124
7313bced
CL
11252016-09-06 Carl Love <cel@us.ibm.com>
1126
1127 * server.c (start_inferior): Do not call
1128 function target_post_create_inferior () if the
1129 inferior process has already exited.
1130
cf6de44d
PA
11312016-09-05 Pedro Alves <palves@redhat.com>
1132
1133 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1134 (COMPILE.pre, CC_LD): Use CXX directly.
1135 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1136 * acinclude.m4: Don't include build-with-cxx.m4.
1137 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1138 * configure: Regenerate.
1139
c1da6748
AT
11402016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1141
1142 PR gdb/19495
1143 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1144 call writing data to own_buf.
1145
f2b9e3df
SDJ
11462016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1147
1148 * target.c (mywait): Call target_wait instead of
1149 the_target->wait.
1150 (target_wait): New function.
1151
049a8570
SDJ
11522016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1153
1154 * server.c (start_inferior): New variable 'ptid'. Replace calls
1155 to the_target->resume by target_continue{,_no_signal}, depending
1156 on the case.
1157 * target.c (target_stop_and_wait): Call target_continue_no_signal
1158 instead of the_target->resume.
1159 (target_continue): New function.
1160
3aa5cfa0
AT
11612016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1162
1163 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1164
754653a7
AZ
11652016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1166
1167 PR server/20491
1168 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1169 ps_prochandle.
1170 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1171 * linux-arm-low.c (ps_get_thread_area): Likewise.
1172 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1173 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1174 * linux-mips-low.c (ps_get_thread_area): Likewise.
1175 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1176 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1177 * linux-x86-low.c (ps_get_thread_area): Likewise.
1178 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1179
ed036b40
PA
11802016-08-19 Pedro Alves <palves@redhat.com>
1181
1182 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1183
c8ef42ee
PA
11842016-08-19 Pedro Alves <palves@redhat.com>
1185
1186 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1187 comment. Use memcpy instead of casting through unsigned long.
1188
9c235a72
PA
11892016-08-19 Pedro Alves <palves@redhat.com>
1190
1191 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1192 allocating around 0x80000000.
1193
201506da
PA
11942016-08-19 Pedro Alves <palves@redhat.com>
1195
1196 PR gdb/20415
1197 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1198 (x32-avx512-linux-ipa.o): New rules.
1199 * configure.ac (x86_64-*-linux*): New x32 check.
1200 * configure.srv (ipa_x32_linux_regobj): New.
1201 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1202 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1203 descriptions.
1204 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1205 descriptions.
1206 * configure: Regenerate.
1207
f348d89a
PA
12082016-08-09 Pedro Alves <palves@redhat.com>
1209
1210 PR gdb/18653
1211 * Makefile.in (OBS): Add signals-state-save-restore.o.
1212 (signals-state-save-restore.o): New rule.
1213 * config.in: Regenerate.
1214 * configure: Regenerate.
1215 * linux-low.c: Include "signals-state-save-restore.h".
1216 (linux_create_inferior): Call
1217 restore_original_signals_state.
1218 * server.c: Include "dispositions-save-restore.h".
1219 (captured_main): Call save_original_signals_state.
1220
1baf5149
PA
12212016-08-05 Pedro Alves <palves@redhat.com>
1222
1223 * configure: Regenerate.
1224
fcd4a73d
YQ
12252016-08-04 Yao Qi <yao.qi@linaro.org>
1226
1227 * linux-low.c (regsets_fetch_inferior_registers): Check
1228 errno is ESRCH or not.
1229
979659d0
YQ
12302016-08-02 Yao Qi <yao.qi@linaro.org>
1231
1232 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1233 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1234 (thread_db_load_search): Update.
1235 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1236 td_ta_set_event and td_ta_event_getmsg.
1237
6598661d
PA
12382016-07-26 Pedro Alves <palves@redhat.com>
1239
1240 PR server/20414
1241 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1242 of unsigned long for 64-bit registers and use uint32_t instead of
1243 unsigned int for 32-bit registers.
1244
9cf12d57
PA
12452016-07-26 Pedro Alves <palves@redhat.com>
1246
1247 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1248 to 'ptrace'.
1249
305450ed
TT
12502016-07-21 Tom Tromey <tom@tromey.com>
1251
1252 * configure: Rebuild.
1253
2583da7c
YQ
12542016-07-21 Yao Qi <yao.qi@linaro.org>
1255
1256 * mem-break.c (find_gdb_breakpoint): Cast bp to
1257 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1258
21536b36
YQ
12592016-07-21 Yao Qi <yao.qi@linaro.org>
1260
1261 * server.c (handle_v_requests): Support s and S actions
1262 if target_supports_software_single_step return true.
1263
8901d193
YQ
12642016-07-21 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1267 is resume_step, call maybe_hw_step.
1268 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1269 and unstop them.
1270 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1271 breakpoints or not.
1272 (proceed_one_lwp): If resume request is resume_step, install
1273 reinsert breakpoints and call maybe_hw_step.
1274
0e9a339e
YQ
12752016-07-21 Yao Qi <yao.qi@linaro.org>
1276
1277 * linux-low.c (proceed_one_lwp): Declare.
1278 (linux_resume_one_thread): Remove local variable 'step'.
1279 Lift code enqueue signal. Call proceed_one_lwp instead of
1280 linux_resume_one_lwp.
1281
4281b351
YQ
12822016-07-21 Yao Qi <yao.qi@linaro.org>
1283
1284 * linux-low.c (linux_resume_one_thread): Call
1285 enqueue_pending_signal.
1286
984a2c04
YQ
12872016-07-21 Yao Qi <yao.qi@linaro.org>
1288
1289 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1290 * inferiors.c (do_restore_current_thread_cleanup): New function.
1291 (make_cleanup_restore_current_thread): Likewise.
1292 * linux-low.c (install_software_single_step_breakpoints): Call
1293 make_cleanup_restore_current_thread. Switch current_thread to
1294 thread.
1295
bec903c9
YQ
12962016-07-21 Yao Qi <yao.qi@linaro.org>
1297
1298 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1299 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1300 (clone_one_breakpoint): Likewise.
1301 (delete_reinsert_breakpoints): Change parameter to thread.
1302 Callers updated.
1303 (has_reinsert_breakpoints): Likewise.
1304 (uninsert_reinsert_breakpoints): Likewise.
1305 (reinsert_reinsert_breakpoints): Likewise.
1306 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1307 (delete_reinsert_breakpoints): Likewise.
1308 (reinsert_reinsert_breakpoints): Likewise.
1309 (uninsert_reinsert_breakpoints): Likewise.
1310 (has_reinsert_breakpoints): Likewise.
1311
63c40ec7
YQ
13122016-07-21 Yao Qi <yao.qi@linaro.org>
1313
1314 * inferiors.c (get_thread_process): Make parameter const.
1315 * inferiors.h (get_thread_process): Update declaration.
1316 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1317 Add new parameters child_thread and parent_thread. Callers
1318 updated.
1319 * mem-break.h (clone_all_breakpoints): Update declaration.
1320
9aa76cd0
YQ
13212016-07-21 Yao Qi <yao.qi@linaro.org>
1322
1323 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1324 <command_list, handler>: Remove.
1325 (struct gdb_breakpoint): New.
1326 (struct other_breakpoint): New.
1327 (struct reinsert_breakpoint): New.
1328 (is_gdb_breakpoint): New function.
1329 (any_persistent_commands): Update command_list if
1330 is_gdb_breakpoint returns true.
1331 (set_breakpoint): Create breakpoints according to their types.
1332 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1333 (set_gdb_breakpoint_1): Likewise.
1334 (set_gdb_breakpoint): Likewise.
1335 (clear_breakpoint_conditions): Change parameter type to
1336 'struct gdb_breakpoint *'.
1337 (clear_breakpoint_commands): Likewise.
1338 (clear_breakpoint_conditions_and_commands): Likewise.
1339 (add_condition_to_breakpoint): Likewise.
1340 (add_breakpoint_condition): Likewise.
1341 (add_commands_to_breakpoint): Likewise.
1342 (check_breakpoints): Check other_breakpoint.
1343 (clone_one_breakpoint): Clone breakpopint according to its type.
1344 * mem-break.h (struct gdb_breakpoint): Declare.
1345 (set_gdb_breakpoint): Update declaration.
1346 (clear_breakpoint_conditions_and_commands): Likewise.
1347 (add_breakpoint_condition): Likewise.
1348 (add_breakpoint_commands): Likewise.
1349 * server.c (process_point_options): Change parameter type to
1350 'struct gdb_breakpoint *'.
1351
811f8301
YQ
13522016-07-21 Yao Qi <yao.qi@linaro.org>
1353
1354 * mem-break.c (set_breakpoint_at): Rename it to ...
1355 (set_breakpoint_type_at): ... it.
1356 (set_breakpoint_at): Call set_breakpoint_type_at.
1357 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1358 * mem-break.h (set_breakpoint_at): Update comments.
1359
b1c51e36
CLT
13602016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1361
1362 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1363 to buf parameter.
1364 (nios2_store_gregset): Likewise.
1365
ced2dffb
PA
13662016-07-01 Pedro Alves <palves@redhat.com>
1367 Antoine Tremblay <antoine.tremblay@ericsson.com>
1368
1369 * linux-low.c: Change interface to take the target lwp_info
1370 pointer directly and return void. Handle detaching from a zombie
1371 thread.
1372 (linux_detach_lwp_callback): New function.
1373 (linux_detach): Detach from the leader thread after detaching from
1374 the clone threads.
1375
2ac09a5b
YQ
13762016-06-28 Yao Qi <yao.qi@linaro.org>
1377
1378 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1379 for variable new_offset.
1380 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1381 (aarch64_ftrace_insn_reloc_cb): Likewise.
1382 (aarch64_ftrace_insn_reloc_tb): Likewise.
1383 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1384 PRIx64 instead of PRIx32.
1385
79e7fd4f
YQ
13862016-06-28 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1389 (the_low_target): Install arm_get_syscall_trapinfo.
1390
061fc021
YQ
13912016-06-28 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1394 function.
1395 (the_low_target): Install aarch64_get_syscall_trapinfo.
1396
4cc32bec
YQ
13972016-06-28 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1400 Callers updated.
1401 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1402 Remove parameter sysno.
1403 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1404 sysret.
1405
782c1122
AA
14062016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1407
1408 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1409 (s390_emit_ne_goto): Likewise.
1410 (s390_emit_lt_goto): Likewise.
1411 (s390_emit_le_goto): Likewise.
1412 (s390_emit_gt_goto): Likewise.
1413 (s390_emit_ge_goto): Likewise.
1414 (s390x_emit_eq_goto): Likewise.
1415 (s390x_emit_ne_goto): Likewise.
1416 (s390x_emit_lt_goto): Likewise.
1417 (s390x_emit_le_goto): Likewise.
1418 (s390x_emit_gt_goto): Likewise.
1419 (s390x_emit_ge_goto): Likewise.
1420 (s390_emit_ops_impl): Mark variable static.
1421 (s390x_emit_ops): Likewise.
1422
2e7b624b
YQ
14232016-06-17 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-low.c (handle_extended_wait): Call
1426 uninsert_reinsert_breakpoints for the parent process. Remove
1427 reinsert breakpoints from the child process. Reinsert them to
1428 the parent process when vfork is done.
1429 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1430 (reinsert_reinsert_breakpoints): New function.
1431 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1432 (reinsert_reinsert_breakpoints): Declare.
1433
8a81c5d7
YQ
14342016-06-17 Yao Qi <yao.qi@linaro.org>
1435
1436 * linux-low.c (handle_extended_wait): If the parent is doing
1437 step-over, remove the reinsert breakpoints from the forked child.
1438
f50bf8e5
YQ
14392016-06-17 Yao Qi <yao.qi@linaro.org>
1440
1441 * linux-low.c (unsuspend_all_lwps): Declare.
1442 (linux_low_filter_event): If thread exited, call finish_step_over.
1443 If step-over is finished, unsuspend other threads.
1444
8376a3cb
YQ
14452016-06-17 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-low.c (linux_resume_one_lwp_throw): Assert
1448 has_reinsert_breakpoints returns false.
1449 * mem-break.c (delete_disabled_breakpoints): Assert
1450 bp type isn't reinsert_breakpoint.
1451
f79b145d
YQ
14522016-06-17 Yao Qi <yao.qi@linaro.org>
1453
1454 * linux-low.c (maybe_hw_step): New function.
1455 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1456 (finish_step_over): Switch current_thread to lwp temporarily,
1457 and assert has_reinsert_breakpoints returns true.
1458 (proceed_one_lwp): Call maybe_hw_step.
1459 * mem-break.c (has_reinsert_breakpoints): New function.
1460 * mem-break.h (has_reinsert_breakpoints): Declare.
1461
0ae534d2
JT
14622016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1463
1464 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1465
fcdad592
YQ
14662016-05-17 Yao Qi <yao.qi@linaro.org>
1467
1468 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1469 instead of find_inferior.
1470
9e784964
YQ
14712016-05-05 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1474 Initialize res to zero.
1475
cf2ebb6e
YQ
14762016-05-05 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1479 to uint32_t.
1480
c1aebf87
UW
14812016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1482
1483 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1484 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1485 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1486
35fd2deb 14872016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1488 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1489
1490 * tracepoint.c (write_inferior_int8): New function.
1491 (cmd_qtenable_disable): Write enable flag using
1492 write_inferior_int8.
1493
484b3c32
YQ
14942016-04-25 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1497 (need_step_over_p): Return zero if the LWP has pending signals
1498 can be delivered on software single step target.
1499
85ba7d86
YQ
15002016-04-25 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1503 return instead of error.
1504
3539aa13
YQ
15052016-04-22 Yao Qi <yao.qi@linaro.org>
1506
1507 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1508 to 23.
1509
5b061e98
YQ
15102016-04-22 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1513 signal when stepping over breakpoint with software single
1514 step.
1515
3451269c
PA
15162016-04-21 Pedro Alves <palves@redhat.com>
1517
1518 * linux-s390-low.c (s390_collect_ptrace_register)
1519 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1520 add casts.
1521 (s390_check_regset): Use void * instead of gdb_byte *.
1522
a2358508
PA
15232016-04-20 Pedro Alves <palves@redhat.com>
1524
1525 * configure: Renegerate.
1526
6885166d
YQ
15272016-04-20 Yao Qi <yao.qi@linaro.org>
1528
1529 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1530 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1531 number 16.
1532 (arm_store_gregset): Likewise.
1533
2b863f51
WT
15342016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1535
1536 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1537 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1538 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1539 (amd64-avx-mpx-linux.c): New rules.
1540 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1541 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1542 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1543 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1544 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1545 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1546 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1547 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1548 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1549 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1550 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1551 * linux-x86-low.c (x86_linux_read_description): Add case for
1552 X86_XSTATE_AVX_MPX_MASK.
1553 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1554 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1555 init_registers_i386_avx_mpx_linux.
1556 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1557 (initialize_low_tracepoint): Call
1558 init_registers_i386_avx_mpx_linux.
1559 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1560 (initialize_low_tracepoint): Call
1561 init_registers_amd64_avx_mpx_linux.
1562 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1563 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1564 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1565 declarations.
1566
9b30624b
PA
15672016-04-18 Pedro Alves <palves@redhat.com>
1568
1569 * configure: Regenerate.
1570
45e3745e
AT
15712016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1572
1573 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1574 (aarch64_emit_sub): Likewise.
1575
2afc13ff
PA
15762016-04-12 Pedro Alves <palves@redhat.com>
1577
1578 * utils.c (prepare_to_throw_exception): Delete.
1579
6e774b13
SM
15802016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1581
1582 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1583
4dca19f8
MK
15842016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1585
1586 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1587
d0a9981f
MK
15882016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1589
1590 * linux-aarch64-ipa.c: Add <elf.h> include.
1591 * linux-ppc-ipa.c: Add <elf.h> include.
1592 * linux-s390-ipa.c: Add <elf.h> include.
1593
252db07e
MK
15942016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1595
1596 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1597 (get_raw_reg_ptr): Likewise.
1598 (get_trace_state_variable_value_ptr): Likewise.
1599 (set_trace_state_variable_value_ptr): Likewise.
1600 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1601 char *.
1602
14e2b6d9
MK
16032016-03-31 Wei-cheng Wang <cole945@gmail.com>
1604 Marcin Kościelnicki <koriakin@0x04.net>
1605
1606 PR/17221
1607 * linux-ppc-low.c (emit_insns): New function.
1608 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1609 (ppc_emit_prologue): New function.
1610 (ppc_emit_epilogue): New function.
1611 (ppc_emit_add): New function.
1612 (ppc_emit_sub): New function.
1613 (ppc_emit_mul): New function.
1614 (ppc_emit_lsh): New function.
1615 (ppc_emit_rsh_signed): New function.
1616 (ppc_emit_rsh_unsigned): New function.
1617 (ppc_emit_ext): New function.
1618 (ppc_emit_zero_ext): New function.
1619 (ppc_emit_log_not): New function.
1620 (ppc_emit_bit_and): New function.
1621 (ppc_emit_bit_or): New function.
1622 (ppc_emit_bit_xor): New function.
1623 (ppc_emit_bit_not): New function.
1624 (ppc_emit_equal): New function.
1625 (ppc_emit_less_signed): New function.
1626 (ppc_emit_less_unsigned): New function.
1627 (ppc_emit_ref): New function.
1628 (ppc_emit_const): New function.
1629 (ppc_emit_reg): New function.
1630 (ppc_emit_pop): New function.
1631 (ppc_emit_stack_flush): New function.
1632 (ppc_emit_swap): New function.
1633 (ppc_emit_stack_adjust): New function.
1634 (ppc_emit_call): New function.
1635 (ppc_emit_int_call_1): New function.
1636 (ppc_emit_void_call_2): New function.
1637 (ppc_emit_if_goto): New function.
1638 (ppc_emit_goto): New function.
1639 (ppc_emit_eq_goto): New function.
1640 (ppc_emit_ne_goto): New function.
1641 (ppc_emit_lt_goto): New function.
1642 (ppc_emit_le_goto): New function.
1643 (ppc_emit_gt_goto): New function.
1644 (ppc_emit_ge_goto): New function.
1645 (ppc_write_goto_address): New function.
1646 (ppc_emit_ops_impl): New static variable.
1647 (ppc64v1_emit_prologue): New function.
1648 (ppc64v2_emit_prologue): New function.
1649 (ppc64_emit_epilogue): New function.
1650 (ppc64_emit_add): New function.
1651 (ppc64_emit_sub): New function.
1652 (ppc64_emit_mul): New function.
1653 (ppc64_emit_lsh): New function.
1654 (ppc64_emit_rsh_signed): New function.
1655 (ppc64_emit_rsh_unsigned): New function.
1656 (ppc64_emit_ext): New function.
1657 (ppc64_emit_zero_ext): New function.
1658 (ppc64_emit_log_not): New function.
1659 (ppc64_emit_bit_and): New function.
1660 (ppc64_emit_bit_or): New function.
1661 (ppc64_emit_bit_xor): New function.
1662 (ppc64_emit_bit_not): New function.
1663 (ppc64_emit_equal): New function.
1664 (ppc64_emit_less_signed): New function.
1665 (ppc64_emit_less_unsigned): New function.
1666 (ppc64_emit_ref): New function.
1667 (ppc64_emit_const): New function.
1668 (ppc64v1_emit_reg): New function.
1669 (ppc64v2_emit_reg): New function.
1670 (ppc64_emit_pop): New function.
1671 (ppc64_emit_stack_flush): New function.
1672 (ppc64_emit_swap): New function.
1673 (ppc64v1_emit_call): New function.
1674 (ppc64v2_emit_call): New function.
1675 (ppc64v1_emit_int_call_1): New function.
1676 (ppc64v2_emit_int_call_1): New function.
1677 (ppc64v1_emit_void_call_2): New function.
1678 (ppc64v2_emit_void_call_2): New function.
1679 (ppc64_emit_if_goto): New function.
1680 (ppc64_emit_eq_goto): New function.
1681 (ppc64_emit_ne_goto): New function.
1682 (ppc64_emit_lt_goto): New function.
1683 (ppc64_emit_le_goto): New function.
1684 (ppc64_emit_gt_goto): New function.
1685 (ppc64_emit_ge_goto): New function.
1686 (ppc64v1_emit_ops_impl): New static variable.
1687 (ppc64v2_emit_ops_impl): New static variable.
1688 (ppc_emit_ops): New function.
1689 (linux_low_target): Wire in ppc_emit_ops.
1690
a2174ba4
MK
16912016-03-31 Wei-cheng Wang <cole945@gmail.com>
1692 Marcin Kościelnicki <koriakin@0x04.net>
1693
1694 PR/17221
1695 * Makefile.in: Add powerpc-*-ipa.o
1696 * configure.srv: Add ipa_obj for powerpc*-linux.
1697 * linux-ppc-ipa.c: New file.
1698 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1699 includes.
1700 (PPC_FIELD): New macro.
1701 (PPC_SEXT): New macro.
1702 (PPC_OP6): New macro.
1703 (PPC_BO): New macro.
1704 (PPC_LI): New macro.
1705 (PPC_BD): New macro.
1706 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1707 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1708 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1709 (ppc_get_thread_area): New function.
1710 (is_elfv2_inferior): New function.
1711 (gen_ds_form): New function.
1712 (GEN_STD): New macro.
1713 (GEN_STDU): New macro.
1714 (GEN_LD): New macro.
1715 (GEN_LDU): New macro.
1716 (gen_d_form): New function.
1717 (GEN_ADDI): New macro.
1718 (GEN_ADDIS): New macro.
1719 (GEN_LI): New macro.
1720 (GEN_LIS): New macro.
1721 (GEN_ORI): New macro.
1722 (GEN_ORIS): New macro.
1723 (GEN_LWZ): New macro.
1724 (GEN_STW): New macro.
1725 (GEN_STWU): New macro.
1726 (gen_xfx_form): New function.
1727 (GEN_MFSPR): New macro.
1728 (GEN_MTSPR): New macro.
1729 (GEN_MFCR): New macro.
1730 (GEN_MTCR): New macro.
1731 (GEN_SYNC): New macro.
1732 (GEN_LWSYNC): New macro.
1733 (gen_x_form): New function.
1734 (GEN_OR): New macro.
1735 (GEN_MR): New macro.
1736 (GEN_LWARX): New macro.
1737 (GEN_STWCX): New macro.
1738 (GEN_CMPW): New macro.
1739 (gen_md_form): New function.
1740 (GEN_RLDICL): New macro.
1741 (GEN_RLDICR): New macro.
1742 (gen_i_form): New function.
1743 (GEN_B): New macro.
1744 (GEN_BL): New macro.
1745 (gen_b_form): New function.
1746 (GEN_BNE): New macro.
1747 (GEN_LOAD): New macro.
1748 (GEN_STORE): New macro.
1749 (gen_limm): New function.
1750 (gen_atomic_xchg): New function.
1751 (gen_call): New function.
1752 (ppc_relocate_instruction): New function.
1753 (ppc_install_fast_tracepoint_jump_pad): New function.
1754 (ppc_get_min_fast_tracepoint_insn_len): New function.
1755 (ppc_get_ipa_tdesc_idx): New function.
1756 (the_low_target): Wire in the new functions.
1757 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1758 tdescs.
1759 * linux-ppc-tdesc.h: New file.
1760
a13c4696
MK
17612016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1762
1763 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1764 (alloc_jump_pad_buffer): New function.
1765 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1766 (alloc_jump_pad_buffer): New function.
1767 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1768 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1769 (alloc_jump_pad_buffer): New function.
1770 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1771 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1772 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1773 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1774
1cda1512
MK
17752016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1776
1777 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1778 * linux-amd64-ipa.c: Likewise.
1779 * linux-i386-ipa.c: Likewise.
1780 * linux-s390-ipa.c: Likewise.
1781 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1782 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1783 set_trace_state_variable_value_ptr.
1784 (struct ipa_sym_addresses): Likewise.
1785 (symbol_list): Likewise.
1786 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1787 accessing gdb_collect directly.
1788 (gdb_collect_ptr_type): New typedef.
1789 (get_raw_reg_ptr_type): New typedef.
1790 (get_trace_state_variable_value_ptr_type): New typedef.
1791 (set_trace_state_variable_value_ptr_type): New typedef.
1792 (gdb_collect_ptr): New global.
1793 (get_raw_reg_ptr): New global.
1794 (get_trace_state_variable_value_ptr): New global.
1795 (set_trace_state_variable_value_ptr): New global.
1796 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1797 accessing get_raw_reg directly.
1798 (get_get_tsv_func_addr): Likewise for
1799 get_trace_state_variable_value_ptr.
1800 (get_set_tsv_func_addr): Likewise for
1801 set_trace_state_variable_value_ptr.
1802 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1803
72fb5488
SM
18042016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1807
28170b88
MK
18082016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1809
1810 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1811 packets.
1812 (relocate_instruction): Remove own_buf.
1813 * server.c (own_buf): Make global.
1814 (handle_v_requests): Make global.
1815 * server.h (own_buf): New declaration.
1816 (handle_v_requests): New prototype.
1817
f39e8743
MK
18182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1819
1820 PR 18377
1821 * linux-s390-low.c (add_insns): New function.
1822 (s390_emit_prologue): New function.
1823 (s390_emit_epilogue): New function.
1824 (s390_emit_add): New function.
1825 (s390_emit_sub): New function.
1826 (s390_emit_mul): New function.
1827 (s390_emit_lsh): New function.
1828 (s390_emit_rsh_signed): New function.
1829 (s390_emit_rsh_unsigned): New function.
1830 (s390_emit_ext): New function.
1831 (s390_emit_log_not): New function.
1832 (s390_emit_bit_and): New function.
1833 (s390_emit_bit_or): New function.
1834 (s390_emit_bit_xor): New function.
1835 (s390_emit_bit_not): New function.
1836 (s390_emit_equal): New function.
1837 (s390_emit_less_signed): New function.
1838 (s390_emit_less_unsigned): New function.
1839 (s390_emit_ref): New function.
1840 (s390_emit_if_goto): New function.
1841 (s390_emit_goto): New function.
1842 (s390_write_goto_address): New function.
1843 (s390_emit_litpool): New function.
1844 (s390_emit_const): New function.
1845 (s390_emit_call): New function.
1846 (s390_emit_reg): New function.
1847 (s390_emit_pop): New function.
1848 (s390_emit_stack_flush): New function.
1849 (s390_emit_zero_ext): New function.
1850 (s390_emit_swap): New function.
1851 (s390_emit_stack_adjust): New function.
1852 (s390_emit_set_r2): New function.
1853 (s390_emit_int_call_1): New function.
1854 (s390_emit_void_call_2): New function.
1855 (s390_emit_eq_goto): New function.
1856 (s390_emit_ne_goto): New function.
1857 (s390_emit_lt_goto): New function.
1858 (s390_emit_le_goto): New function.
1859 (s390_emit_gt_goto): New function.
1860 (s390_emit_ge_goto): New function.
1861 (s390x_emit_prologue): New function.
1862 (s390x_emit_epilogue): New function.
1863 (s390x_emit_add): New function.
1864 (s390x_emit_sub): New function.
1865 (s390x_emit_mul): New function.
1866 (s390x_emit_lsh): New function.
1867 (s390x_emit_rsh_signed): New function.
1868 (s390x_emit_rsh_unsigned): New function.
1869 (s390x_emit_ext): New function.
1870 (s390x_emit_log_not): New function.
1871 (s390x_emit_bit_and): New function.
1872 (s390x_emit_bit_or): New function.
1873 (s390x_emit_bit_xor): New function.
1874 (s390x_emit_bit_not): New function.
1875 (s390x_emit_equal): New function.
1876 (s390x_emit_less_signed): New function.
1877 (s390x_emit_less_unsigned): New function.
1878 (s390x_emit_ref): New function.
1879 (s390x_emit_if_goto): New function.
1880 (s390x_emit_const): New function.
1881 (s390x_emit_call): New function.
1882 (s390x_emit_reg): New function.
1883 (s390x_emit_pop): New function.
1884 (s390x_emit_stack_flush): New function.
1885 (s390x_emit_zero_ext): New function.
1886 (s390x_emit_swap): New function.
1887 (s390x_emit_stack_adjust): New function.
1888 (s390x_emit_int_call_1): New function.
1889 (s390x_emit_void_call_2): New function.
1890 (s390x_emit_eq_goto): New function.
1891 (s390x_emit_ne_goto): New function.
1892 (s390x_emit_lt_goto): New function.
1893 (s390x_emit_le_goto): New function.
1894 (s390x_emit_gt_goto): New function.
1895 (s390x_emit_ge_goto): New function.
1896 (s390_emit_ops): New function.
1897 (struct linux_target_ops): Fill in emit_ops hook.
1898
abd9baf9
MK
18992016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1900
1901 PR 18377
1902 * Makefile.in: Add s390 IPA files.
1903 * configure.srv: Build IPA for s390.
1904 * linux-s390-ipa.c: New file.
1905 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1906 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1907 (tdesc_s390_linux32): Likewise.
1908 (init_registers_s390_linux32v1): Likewise.
1909 (tdesc_s390_linux32v1): Likewise.
1910 (init_registers_s390_linux32v2): Likewise.
1911 (tdesc_s390_linux32v2): Likewise.
1912 (init_registers_s390_linux64): Likewise.
1913 (tdesc_s390_linux64): Likewise.
1914 (init_registers_s390_linux64v1): Likewise.
1915 (tdesc_s390_linux64v1): Likewise.
1916 (init_registers_s390_linux64v2): Likewise.
1917 (tdesc_s390_linux64v2): Likewise.
1918 (init_registers_s390_te_linux64): Likewise.
1919 (tdesc_s390_te_linux64): Likewise.
1920 (init_registers_s390_vx_linux64): Likewise.
1921 (tdesc_s390_vx_linux64): Likewise.
1922 (init_registers_s390_tevx_linux64): Likewise.
1923 (tdesc_s390_tevx_linux64): Likewise.
1924 (init_registers_s390x_linux64): Likewise.
1925 (tdesc_s390x_linux64): Likewise.
1926 (init_registers_s390x_linux64v1): Likewise.
1927 (tdesc_s390x_linux64v1): Likewise.
1928 (init_registers_s390x_linux64v2): Likewise.
1929 (tdesc_s390x_linux64v2): Likewise.
1930 (init_registers_s390x_te_linux64): Likewise.
1931 (tdesc_s390x_te_linux64): Likewise.
1932 (init_registers_s390x_vx_linux64): Likewise.
1933 (tdesc_s390x_vx_linux64): Likewise.
1934 (init_registers_s390x_tevx_linux64): Likewise.
1935 (tdesc_s390x_tevx_linux64): Likewise.
1936 (have_hwcap_s390_vx): New static variable.
1937 (s390_arch_setup): Fill have_hwcap_s390_vx.
1938 (s390_get_thread_area): New function.
1939 (s390_ft_entry_gpr_esa): New const.
1940 (s390_ft_entry_gpr_zarch): New const.
1941 (s390_ft_entry_misc): New const.
1942 (s390_ft_entry_fr): New const.
1943 (s390_ft_entry_vr): New const.
1944 (s390_ft_main_31): New const.
1945 (s390_ft_main_64): New const.
1946 (s390_ft_exit_fr): New const.
1947 (s390_ft_exit_vr): New const.
1948 (s390_ft_exit_misc): New const.
1949 (s390_ft_exit_gpr_esa): New const.
1950 (s390_ft_exit_gpr_zarch): New const.
1951 (append_insns): New function.
1952 (s390_relocate_instruction): New function.
1953 (s390_install_fast_tracepoint_jump_pad): New function.
1954 (s390_get_min_fast_tracepoint_insn_len): New function.
1955 (s390_get_ipa_tdesc_idx): New function.
1956 (struct linux_target_ops): Wire in the above functions.
1957 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1958 * linux-s390-tdesc.h: New file.
1959
a4105d04
MK
19602016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1961
1962 * linux-s390-low.c (s390_supports_tracepoints): New function.
1963 (struct linux_target_ops): Fill supports_tracepoints hook.
1964
35ac8b3e
YQ
19652016-03-18 Yao Qi <yao.qi@linaro.org>
1966
1967 * linux-low.c (lwp_signal_can_be_delivered): New function.
1968 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1969
94610ec4
YQ
19702016-03-18 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1973 0 if signal is enqueued. Remove 'signal' from one debugging
1974 message. Move one debugging message to some lines below.
1975 Remove code setting 'signal' to 0.
1976
80aea927
YQ
19772016-03-18 Yao Qi <yao.qi@linaro.org>
1978
1979 * linux-low.c (linux_low_filter_event): Remove redundant
1980 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1981
b04fd3be
MK
19822016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1983
1984 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1985 (struct linux_target_ops): Wire in the above.
1986
c40c8d4b
YQ
19872016-03-03 Yao Qi <yao.qi@linaro.org>
1988
1989 * linux-low.c: Update comments to start_step_over.
1990
0f8288ae
YQ
19912016-03-03 Yao Qi <yao.qi@linaro.org>
1992
1993 PR server/19736
1994 * linux-low.c (handle_extended_wait): Set child suspended
1995 if event_lwp->bp_reinsert isn't zero.
1996
fdbd04a8
YQ
19972016-03-02 Yao Qi <yao.qi@linaro.org>
1998
1999 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2000 enqueue_pending_signal.
2001
6896a8fa
MK
20022016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2003
2004 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2005 is actually loaded.
2006
ab503087
MK
20072016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2008
2009 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2010 (s390_regmap_3264) [!__s390x__]: New global.
2011 (s390_collect_ptrace_register): Skip map entries containing -1.
2012 (s390_supply_ptrace_register): Ditto.
2013 (s390_fill_gprs_high): New function.
2014 (s390_store_gprs_high): New function.
2015 (s390_regsets): Add NT_S390_HIGH_GPRS.
2016 (s390_get_hwcap): Enable on 31-bit.
2017 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2018 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2019 Detect NT_S390_HIGH_GPRS.
2020 (s390_usrregs_info_3264): Enable on 31-bit.
2021 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2022 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2023
ae91f625
MK
20242016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2025
2026 PR gdb/13808
2027 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2028 * configure.srv: Ditto.
2029 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2030 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2031 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2032 (init_registers_amd64_linux): Remove prototype.
2033 (tdesc_amd64_linux): Remove declaration.
2034 (get_ipa_tdesc): New function.
2035 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2036 initialize remaining tdescs.
2037 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2038 (init_registers_i386_linux): Remove prototype.
2039 (tdesc_i386_linux): Remove declaration.
2040 (get_ipa_tdesc): New function.
2041 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2042 initialize remaining tdescs.
2043 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2044 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2045 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2046 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2047 (x86_get_ipa_tdesc_idx): New function.
2048 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2049 * linux-x86-tdesc.h: New file.
2050 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2051 (target_get_ipa_tdesc_idx): New macro.
2052 * tracepoint.c (ipa_tdesc_idx): New macro.
2053 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2054 (symbol_list): Add ipa_tdesc_idx.
2055 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2056 (ipa_tdesc): Remove.
2057 (ipa_tdesc_idx): New variable.
2058 (get_context_regcache): Use get_ipa_tdesc.
2059 (gdb_collect): Ditto.
2060 (gdb_probe): Ditto.
2061 * tracepoint.h (get_ipa_tdesc): New prototype.
2062 (ipa_tdesc): Remove.
2063
e7ad2f14
PA
20642016-02-24 Pedro Alves <palves@redhat.com>
2065
2066 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2067 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2068 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2069 Factor out common code between the USE_SIGTRAP_SIGINFO and
2070 !USE_SIGTRAP_SIGINFO blocks.
2071 (linux_low_filter_event): Call save_stop_reason instead of
2072 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2073 Update comments.
2074 (linux_wait_1): Update comments.
2075
657f9cde
WW
20762016-02-24 Wei-cheng Wang <cole945@gmail.com>
2077
2078 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2079 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2080 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2081 ppc_insert_point, ppc_remove_point.
2082
b00b61e1
MK
20832016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2084
2085 * linux-s390-low.c (s390_supports_z_point_type): New function.
2086 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2087
553cb527
YQ
20882016-02-16 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2091 PC. Get pc from regcache_read_pc.
2092
a5652c21
YQ
20932016-02-12 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2096 or linux_get_pc_32bit.
2097 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2098
ed443b61
YQ
20992016-02-12 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2102 arm_linux_get_next_pcs_fixup.
2103
020ecd38
MK
21042016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2105
2106 * tracepoint.c (x_tracepoint_action_download): Change
2107 write_inferior_data_ptr to write_inferior_data_pointer.
2108 (cmd_qtstart): Likewise.
2109 (write_inferior_data_ptr): Remove.
2110 (download_agent_expr): Change write_inferior_data_ptr to
2111 write_inferior_data_pointer.
2112 (download_tracepoint_1): Likewise.
2113 (download_tracepoint): Likewise.
2114 (download_trace_state_variables): Likewise.
2115
7cae9051
WW
21162016-02-11 Wei-cheng Wang <cole945@gmail.com>
2117 Marcin Kościelnicki <koriakin@0x04.net>
2118
2119 * tracepoint.c (struct tracepoint_action_ops): Remove.
2120 (struct tracepoint_action): Remove ops.
2121 (m_tracepoint_action_download, r_tracepoint_action_download)
2122 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2123 size and offset accordingly.
2124 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2125 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2126 (tracepoint_action_send, tracepoint_action_download): New functions.
2127 Helpers for trace action handlers.
2128 (add_tracepoint_action): Remove setup actions ops.
2129 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2130
9f6a71b4
YQ
21312016-02-10 Yao Qi <yao.qi@linaro.org>
2132
2133 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2134
1e94266c
SM
21352016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2136
2137 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2138 to AC_OUTPUT.
2139 * configure: Regenerate.
2140
8adce034
SM
21412016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2142
2143 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2144 void * to gdb_byte *.
2145 * linux-low.c (siginfo_fixup): Likewise.
2146 (linux_xfer_siginfo): Likewise.
2147 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2148 Likewise.
2149 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2150
93813b37
WT
21512016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2152
2153 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2154 to srv_tgtobj.
2155 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2156 to srv_tgtobj.
2157 * linux-x86-low.c [__x86_64__]: Include
2158 "nat/amd64-linux-siginfo.h".
2159 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2160 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2161 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2162 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2163 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2164 (cpt_si_fd, si_timerid, si_overrun): Move from
2165 nat/amd64-linux-siginfo.c.
2166 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2167
8424cc97
SM
21682016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2169
2170 * server.c (skip_to_semicolon): Remove.
2171 (process_point_options): Use strchrnul instead of
2172 skip_to_semicolon.
2173
4d18591b
YQ
21742016-01-26 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2177 * linux-low.c (install_software_single_step_breakpoints): Don't
2178 call regcache_read_pc.
2179 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2180 argument pc.
2181
d8020970
YQ
21822016-01-26 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-low.c (install_software_single_step_breakpoints): Call
2185 regcache_read_pc instead of get_pc.
2186
8b207339
YQ
21872016-01-26 Yao Qi <yao.qi@linaro.org>
2188
2189 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2190 (unblock_async_io): Rename to ...
2191 (block_unblock_async_io): ... it. New function.
2192 (enable_async_io): Don't install SIGIO handler. Unblock it
2193 instead.
2194 (disable_async_io): Don't ignore SIGIO. Block it instead.
2195 (initialize_async_io): Install SIGIO handler. Don't call
2196 unblock_async_io.
2197
18879fef
YQ
21982016-01-26 Yao Qi <yao.qi@linaro.org>
2199
2200 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2201 first character is '\003', call *the_target->request_interrupt.
2202
a0f8e08a
YQ
22032016-01-25 Yao Qi <yao.qi@linaro.org>
2204
2205 * remote-utils.c (new_thread_notify): Remove.
2206 (dead_thread_notify): Likewise.
2207 * remote-utils.h (new_thread_notify): Remove declaration.
2208 (dead_thread_notify): Likewise.
2209
cc5fd9ab
MK
22102016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2211
2212 * gdb.trace/pending.exp: Fix expected message on continue.
2213
99e8eb11
MK
22142016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2215
2216 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2217 it works properly on big-endian machines where sizeof (CORE_ADDR)
2218 != sizeof (void *).
2219
a994041d
PA
22202016-01-21 Pedro Alves <palves@redhat.com>
2221
2222 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2223 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2224 * configure: Regenerate.
2225
f7a6a40d
YQ
22262016-01-21 Yao Qi <yao.qi@linaro.org>
2227
2228 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2229 is_thumb and set it according to CPSR saved on the stack.
2230 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2231 arm_sigreturn_next_pc.
2232
6f69e520
YQ
22332016-01-18 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-low.c (linux_set_pc_64bit): New function.
2236 (linux_get_pc_64bit): New function.
2237 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2238 Declare.
2239 * linux-sparc-low.c (debug_threads): Remove declaration.
2240 (sparc_get_pc): Remove.
2241 (the_low_target): Use linux_get_pc_64bit instead of
2242 sparc_get_pc.
2243 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2244 (the_low_target): Use linux_get_pc_64bit and
2245 linux_set_pc_64bit.
2246
276d4552
YQ
22472016-01-18 Yao Qi <yao.qi@linaro.org>
2248
2249 * linux-arm-low.c (debug_threads): Remove declaration.
2250 (arm_get_pc, arm_set_pc): Remove.
2251 (the_low_target): Use linux_get_pc_32bit and
2252 linux_set_pc_32bit.
2253 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2254 (the_low_target): Use linux_get_pc_32bit and
2255 linux_set_pc_32bit.
2256 * linux-cris-low.c (debug_threads): Remove declaration.
2257 (cris_get_pc, cris_set_pc,): Remove.
2258 (the_low_target): Use linux_get_pc_32bit and
2259 linux_set_pc_32bit.
2260 * linux-crisv32-low.c (debug_threads): Remove declaration.
2261 (cris_get_pc, cris_set_pc): Remove.
2262 (the_low_target): Use linux_get_pc_32bit and
2263 linux_set_pc_32bit.
2264 * linux-low.c: Include inttypes.h.
2265 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2266 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2267 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2268 (the_low_target): Use linux_get_pc_32bit and
2269 linux_set_pc_32bit.
2270 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2271 (the_low_target): Use linux_get_pc_32bit and
2272 linux_set_pc_32bit.
2273 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2274 (the_low_target): Use linux_get_pc_32bit and
2275 linux_set_pc_32bit.
2276 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2277 (the_low_target): Use linux_get_pc_32bit and
2278 linux_set_pc_32bit.
2279 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2280 (the_low_target): Use linux_get_pc_32bit and
2281 linux_set_pc_32bit.
2282
eb0edac8
GB
22832016-01-18 Gary Benson <gbenson@redhat.com>
2284
2285 * configure.ac (AC_FUNC_FORK): New check.
2286 * config.in: Regenerate.
2287 * configure: Likewise.
2288
1b451dda
YQ
22892016-01-14 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2292 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2293 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2294 arm_get_next_pcs_ctor.
2295
82075af2
JS
22962016-01-12 Josh Stone <jistone@redhat.com>
2297 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2298
2299 * inferiors.h: Include "gdb_vecs.h".
2300 (struct process_info): Add syscalls_to_catch.
2301 * inferiors.c (remove_process): Free syscalls_to_catch.
2302 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2303 syscall_return stops.
2304 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2305 * server.c (handle_general_set): Handle QCatchSyscalls.
2306 (handle_query): Report support for QCatchSyscalls.
2307 * target.h (struct target_ops): Add supports_catch_syscall.
2308 (target_supports_catch_syscall): New macro.
2309 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2310 (struct lwp_info): Add syscall_state.
2311 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2312 Maintain syscall_state and syscalls_to_catch across exec.
2313 (get_syscall_trapinfo): New function, proxy to the_low_target.
2314 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2315 (linux_low_filter_event): Toggle syscall_state entry/return for
2316 syscall traps, and set it ignored for all others.
2317 (gdb_catching_syscalls_p): New function.
2318 (gdb_catch_this_syscall_p): New function.
2319 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2320 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2321 (linux_supports_catch_syscall): New function.
2322 (linux_target_ops): Install it.
2323 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2324 (the_low_target): Install it.
2325
8f13a3ce
MF
23262016-01-12 Mike Frysinger <vapier@gentoo.org>
2327
2328 * acinclude.m4: Include new ../warning.m4 file.
2329 * configure: Regenerated.
2330 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2331
5b3da067
MF
23322016-01-12 Mike Frysinger <vapier@gentoo.org>
2333
2334 * ax.c (is_goto_target): Mark static.
2335 * linux-low.c (register_addr): Likewise.
2336 (linux_fetch_registers, linux_store_registers): Likewise.
2337 * mem-break.c (any_persistent_commands): Fix old prototype.
2338 (add_commands_to_breakpoint): Mark static.
2339 * regcache.c (find_register_by_name): Delete unused func.
2340 * remote-utils.c (hex_or_minus_one): Mark static.
2341 * server.c (monitor_show_help): Mark static.
2342 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2343 handle_v_requests): Likewise.
2344
bc504a31
PA
23452016-01-12 Pedro Alves <palves@redhat.com>
2346
2347 Remove use of the registered trademark symbol throughout.
2348
5a0dd67a
YQ
23492016-01-08 Yao Qi <yao.qi@linaro.org>
2350
2351 * remote-utils.c (getpkt): If c is '\003', call target hook
2352 request_interrupt.
2353
b2ca446f
YQ
23542016-01-06 Yao Qi <yao.qi@linaro.org>
2355
2356 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2357 linux-aarch32-low.c.
2358 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2359 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2360 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2361 (thumb2_breakpoint): Declare.
2362 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2363 linux-aarch32-low.h.
2364 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2365 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2366 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2367
edd88788
JB
23682016-01-01 Joel Brobecker <brobecker@adacore.com>
2369
2370 * gdbreplay.c (gdbreplay_version): Change copyright year in
2371 version message.
2372 * server.c (gdbserver_version): Likewise.
2373
65da7f14
PP
23742015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2375
2376 * server.c (crc32_table): Delete.
2377 (crc32): Use libiberty's xcrc32 function.
2378
4abd5ed2
JB
23792015-12-22 Joel Brobecker <brobecker@adacore.com>
2380
2381 * lynx-low.c (lynx_delete_thread_callback): New function.
2382 (lynx_mourn): Properly delete our process and all of its
2383 threads. Remove call to clear_inferiors.
2384
0e50fe5c
JB
23852015-12-22 Joel Brobecker <brobecker@adacore.com>
2386
2387 * target.c (thread_search_callback): Add check that
2388 the thread_stopped target callback is not NULL before
2389 calling it.
2390
35adc03f
YQ
23912015-12-21 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2394 arm breakpoint.
2395
bd2b2909
AT
23962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2397
2398 * server.c (handle_query): Call target_supports_software_single_step.
2399
7fe5e27e
AT
24002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2401
2402 * linux-low.c (single_step): New function.
2403 (linux_resume_one_lwp_throw): Call single_step.
2404 (start_step_over): Likewise.
2405
d9311bfa
AT
24062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2407
2408 * Makefile.in (SFILES): Append arch/arm-linux.c,
2409 arch/arm-get-next-pcs.c.
2410 (arm-linux.o): New rule.
2411 (arm-get-next-pcs.o): New rule.
2412 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2413 arm-linux.o.
2414 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2415 to linux-aarch32-low.c.
2416 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2417 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2418 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2419 (thumb2_breakpoint_len): Likewise.
2420 (arm_is_thumb_mode): Make non-static.
2421 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2422 from linux-aarch32-low.c.
2423 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2424 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2425 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2426 (thumb2_breakpoint_len): Likewise.
2427 (arm_is_thumb_mode): New declaration.
2428 * linux-arm-low.c: Include arch/arm-linux.h
2429 aarch/arm-get-next-pcs.h, sys/syscall.h.
2430 (get_next_pcs_ops): New struct.
2431 (get_next_pcs_addr_bits_remove): New function.
2432 (get_next_pcs_is_thumb): New function.
2433 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2434 (arm_sigreturn_next_pc): Likewise.
2435 (get_next_pcs_syscall_next_pc): Likewise.
2436 (arm_gdbserver_get_next_pcs): Likewise.
2437 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2438 Initialize.
2439 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2440 * server.h: Include gdb_vecs.h.
2441
68ce2059
AT
24422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2443
2444 * Makefile.in (SFILES): Append common/common-regcache.c.
2445 (OBS): Append common-regcache.o.
2446 (common-regcache.o): New rule.
2447 * regcache.c (init_register_cache): Initialize cache to
2448 REG_UNAVAILABLE.
2449 (regcache_raw_read_unsigned): New function.
2450 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2451 register_status enum.
2452
fa5308bd
AT
24532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2454
2455 * linux-aarch64-low.c (the_low_targets): Rename
2456 breakpoint_reinsert_addr to get_next_pcs.
2457 * linux-arm-low.c (the_low_targets): Likewise.
2458 * linux-bfin-low.c (the_low_targets): Likewise.
2459 * linux-cris-low.c (the_low_targets): Likewise.
2460 * linux-crisv32-low.c (the_low_targets): Likewise.
2461 * linux-low.c (can_software_single_step): Likewise.
2462 (install_software_single_step_breakpoints): New function.
2463 (start_step_over): Use install_software_single_step_breakpoints.
2464 * linux-low.h: New CORE_ADDR vector.
2465 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2466 get_next_pcs.
2467 * linux-mips-low.c (the_low_targets): Likewise.
2468 * linux-nios2-low.c (the_low_targets): Likewise.
2469 * linux-sparc-low.c (the_low_targets): Likewise.
2470
4a6ed09b
PA
24712015-12-17 Pedro Alves <palves@redhat.com>
2472
2473 * linux-low.c (linux_kill_one_lwp): Remove references to
2474 LinuxThreads.
2475 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2476 to 'kill'.
2477 (linux_init_signals): Delete.
2478 (initialize_low): Adjust.
2479 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2480
7544db95
PA
24812015-12-16 Pedro Alves <palves@redhat.com>
2482
2483 * configure.ac (compiler warning flags): When testing a
2484 -Wno-foo option, check whether -Wfoo works instead.
2485 * configure: Regenerate.
2486
8020350c
DB
24872015-12-11 Don Breazeal <donb@codesourcery.com>
2488
2489 * server.c (process_serial_event): Don't exit from gdbserver
2490 in remote mode if there are still active inferiors.
2491
db91f502
YQ
24922015-12-11 Yao Qi <yao.qi@linaro.org>
2493
2494 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2495 arm_breakpoint_at if the process is 32-bit.
2496
b37a6290
YQ
24972015-12-11 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2500 arm breakpoint.
2501
17b1509a
YQ
25022015-12-07 Yao Qi <yao.qi@linaro.org>
2503
2504 * configure.srv: Append arm.o to srv_tgtobj for
2505 aarch64*-*-linux* target.
2506 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2507 from linux-arm-low.c.
2508 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2509 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2510 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2511 (thumb2_breakpoint_len): Likewise.
2512 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2513 (arm_breakpoint_kinds): Likewise.
2514 (arm_breakpoint_kind_from_pc): Likewise.
2515 (arm_sw_breakpoint_from_kind): Likewise.
2516 (arm_breakpoint_kind_from_current_state): Likewise.
2517 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2518 (arm_sw_breakpoint_from_kind): Declare.
2519 (arm_breakpoint_kind_from_current_state): Declare.
2520 (arm_breakpoint_at): Declare.
2521 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2522 arm_sw_breakpoint_from_kind if process is 32-bit.
2523 (aarch64_breakpoint_kind_from_pc): New function.
2524 (aarch64_breakpoint_kind_from_current_state): New function.
2525 (the_low_target): Initialize fields breakpoint_kind_from_pc
2526 and breakpoint_kind_from_current_state.
2527 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2528 linux-aarch32-low.c.
2529 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2530 (arm_breakpoint, arm_breakpoint_len): Likewise.
2531 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2532 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2533 (arm_is_thumb_mode): Likewise.
2534 (arm_breakpoint_at): Likewise.
2535 (arm_breakpoint_kind_from_pc): Likewise.
2536 (arm_sw_breakpoint_from_kind): Likewise.
2537 (arm_breakpoint_kind_from_current_state): Likewise.
2538
2539 Revert:
2540 2015-08-04 Yao Qi <yao.qi@linaro.org>
2541
2542 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2543 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2544 * server.c (extended_protocol): Remove "static".
2545 * server.h (extended_protocol): Declare it.
2546
ece66d65
JS
25472015-12-04 Josh Stone <jistone@redhat.com>
2548
2549 * target.h (struct target_ops) <arch_setup>: Rename to ...
2550 (struct target_ops) <post_create_inferior>: ... this.
2551 (target_arch_setup): Rename to ...
2552 (target_post_create_inferior): ... this, calling post_create_inferior.
2553 * server.c (start_inferior): Update target_arch_setup calls to
2554 target_post_create_inferior.
2555 * linux-low.c (linux_low_ptrace_options): Forward declare.
2556 (linux_arch_setup): Update its comment for general use.
2557 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2558 (struct linux_target_ops): Use linux_post_create_inferior.
2559 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2560 to post_create_inferior.
2561 * nto-low.c (struct nto_target_ops): Likewise.
2562 * spu-low.c (struct spu_target_ops): Likewise.
2563 * win32-low.c (struct win32_target_ops): Likewise.
2564
e58c48b4
AT
25652015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2566
2567 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2568
fbec8956
AT
25692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2570
2571 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2572 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2573 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2574 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2575 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2576 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2577 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2578 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2579 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2580 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2581 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2582 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2583
9b4c5f87
AT
25842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2585
2586 * linux-low.c (linux_look_up_symbols): Don't call
2587 linux_supports_traceclone.
2588 * linux-low.h (thread_db_init): Remove use_events argument.
2589 * thread-db.c (thread_db_use_event): Remove global variable.
2590 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2591 (struct thread_db) <td_create_bp>: Remove field.
2592 (thread_db_create_event): Remove function.
2593 (thread_db_enable_reporting): Likewise.
2594 (find_one_thread): Don't check for thread_db_use_events.
2595 (attach_thread): Likewise.
2596 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2597 (try_thread_db_load_1): Don't check for thread_db_use_events.
2598 (thread_db_init): Remove use_events argument and thread events
2599 handling.
2600 (remove_thread_event_breakpoints): Remove function.
2601 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2602
7d00775e
AT
26032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2604
2605 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2606 New function.
2607 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2608 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2610 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2611 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2612 Initialize.
2613 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2614 New function.
2615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2616 * linux-low.c (can_hardware_single_step): Use
2617 supports_hardware_single_step.
2618 (can_software_single_step): New function.
2619 (start_step_over): Call can_software_single_step.
2620 (linux_supports_hardware_single_step): New function.
2621 (struct target_ops) <supports_software_single_step>: Initialize.
2622 * linux-low.h (struct linux_target_ops)
2623 <supports_hardware_single_step>: Initialize.
2624 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2626 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2627 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2628 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2630 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2631 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2632 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2633 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2634 Initialize.
2635 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2636 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2637 Initialize.
2638 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2639 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2640 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2641 New function.
2642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2643 * target.h (struct target_ops): <supports_software_single_step>:
2644 New field.
2645 (target_supports_software_single_step): New macro.
2646
2d97cd35
AT
26472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2648
2649 * linux-low.c (linux_wait_1): Fix pc advance condition.
2650 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2651 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2652
769ef81f
AT
26532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2654
2655 * linux-arm-low.c (arm_is_thumb_mode): New function.
2656 (arm_breakpoint_at): Use arm_is_thumb_mode.
2657 (arm_breakpoint_kind_from_current_state): New function.
2658 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2659 Initialize.
2660 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2661 (linux_breakpoint_kind_from_current_state): New function.
2662 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2663 * linux-low.h (struct linux_target_ops)
2664 <breakpoint_kind_from_current_state>: New field.
2665 * target.h (struct target_ops): Likewise.
2666 (target_breakpoint_kind_from_current_state): New macro.
2667
1bebeeca
PA
26682015-11-30 Pedro Alves <palves@redhat.com>
2669
2670 * linux-low.c (linux_resume): Wake up the event loop before
2671 returning.
2672
a67a9fae
PA
26732015-11-30 Pedro Alves <palves@redhat.com>
2674
2675 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2676 check.
2677 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2678 to -1.
2679 * target.c (struct thread_search): New structure.
2680 (thread_search_callback): New function.
2681 (prev_general_thread): New global.
2682 (prepare_to_access_memory, done_accessing_memory): New functions.
2683 * target.h (prepare_to_access_memory, done_accessing_memory):
2684 Replace macros with function declarations.
2685
f2faf941
PA
26862015-11-30 Pedro Alves <palves@redhat.com>
2687
2688 PR 14618
2689 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2690 report TARGET_WAITKIND_NO_RESUMED.
2691 * remote-utils.c (prepare_resume_reply): Handle
2692 TARGET_WAITKIND_NO_RESUMED.
2693 * server.c (report_no_resumed): New global.
2694 (handle_query) <qSupported>: Handle "no-resumed+". Report
2695 "no-resumed+" support.
2696 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2697 return error if the client doesn't support no-resumed events.
2698 (push_stop_notification): New function.
2699 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2700 events if the client supports them.
2701
a681f9c9
PA
27022015-11-30 Pedro Alves <palves@redhat.com>
2703
2704 * linux-low.c (thread_still_has_status_pending_p): Don't check
2705 vCont;t here.
2706 (lwp_resumed): New function.
2707 (status_pending_p_callback): Return early if the LWP is not
2708 supposed to be resumed.
2709
65706a29
PA
27102015-11-30 Pedro Alves <palves@redhat.com>
2711
2712 * linux-low.c (handle_extended_wait): Assert that the LWP's
2713 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2714 thread create events, leave the new child's status pending.
2715 (linux_low_filter_event): If GDB wants to hear about thread exit
2716 events, leave the LWP marked dead and don't delete it.
2717 (linux_wait_for_event_filtered): Don't check for thread exit.
2718 (filter_exit_event): New function.
2719 (linux_wait_1): Use it, when returning an exit event.
2720 (linux_resume_one_lwp_throw): Assert that the LWP's
2721 waitstatus is TARGET_WAITKIND_IGNORE.
2722 * remote-utils.c (prepare_resume_reply): Handle
2723 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2724 * server.c (report_thread_events): New global.
2725 (handle_general_set): Handle QThreadEvents.
2726 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2727 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2728 TARGET_WAITKIND_THREAD_EXITED.
2729 * server.h (report_thread_events): Declare.
2730
56cf4bed
PA
27312015-11-30 Pedro Alves <palves@redhat.com>
2732
2733 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2734 the thread's last_resume_kind was resume_stop.
2735
500c1d85
PA
27362015-11-30 Pedro Alves <palves@redhat.com>
2737
2738 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2739 before returning.
2740
de979965
PA
27412015-11-30 Pedro Alves <palves@redhat.com>
2742
2743 * server.c (handle_v_requests): Handle vCtrlC.
2744
34c65914
PA
27452015-11-30 Pedro Alves <palves@redhat.com>
2746
2747 * gdbthread.h (find_any_thread_of_pid): Declare.
2748 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2749 functions.
2750 * server.c (handle_query): If current_thread is NULL, look for
2751 another thread of the selected process.
2752
79efa585 27532015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2754 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2755
2756 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2757 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2758 name in reply.
2759 * target.h (struct target_ops) <thread_name>: New field.
2760 (target_thread_name): New macro.
2761
80d82c19
JB
27622015-11-23 Joel Brobecker <brobecker@adacore.com>
2763
2764 * regcache.h (regcache_invalidate_pid): Add declaration.
2765 * regcache.c (regcache_invalidate_pid): New function, extracted
2766 from regcache_invalidate.
2767 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2768 Add trivial documentation comment.
2769 * lynx-low.c: Use regcache_invalidate_pid instead of
2770 regcache_invalidate.
2771
64da5dd5
JB
27722015-11-23 Joel Brobecker <brobecker@adacore.com>
2773
2774 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2775 and Elf64_auxv_t if the target is Android.
2776
37ce4055
DE
27772015-11-22 Doug Evans <xdje42@gmail.com>
2778
2779 * target.h: #include <sys/types.h>.
2780
06e03fff
PA
27812015-11-19 Pedro Alves <palves@redhat.com>
2782
2783 * linux-low.c (linux_process_qsupported): Change prototype.
2784 Adjust.
2785 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2786 Change prototype.
2787 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2788 and adjust to loop over all features.
2789 * server.c (handle_query) <qSupported>: Adjust to call
2790 target_process_qsupported once, passing it a vector of unprocessed
2791 features.
2792 * target.h (struct target_ops) <process_qsupported>: Change
2793 prototype.
2794 (target_process_qsupported): Adjust.
2795
9a084706
PA
27962015-11-19 Pedro Alves <palves@redhat.com>
2797
2798 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2799 mode.
2800 * configure: Regenerate.
2801
dad44a1f
PA
28022015-11-19 Pedro Alves <palves@redhat.com>
2803
2804 * configure: Regenerate.
2805
231c0592
YQ
28062015-11-19 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2809 type to uint32_t.
2810
6c1c9a8b
YQ
28112015-11-19 Yao Qi <yao.qi@linaro.org>
2812
2813 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2814 (struct aarch64_operand): Move enum out.
2815
9caa3311
YQ
28162015-11-19 Yao Qi <yao.qi@linaro.org>
2817
2818 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2819 struct user_fpsimd_state *.
2820 (aarch64_store_fpregset): Likewise.
2821
6a69a054
YQ
28222015-11-19 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2825 struct user_pt_regs *.
2826 (aarch64_store_gregset): Likewise.
2827
1798301e
PA
28282015-11-18 Pedro Alves <palves@redhat.com>
2829
2830 * Makefile.in (all_object_files): Add $IPA_OBJS.
2831
ce7715e2
PA
28322015-11-17 Pedro Alves <palves@redhat.com>
2833
2834 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2835 GDB_SIGNAL_0 and gdb_signal_to_string.
2836
c0879059
PA
28372015-11-17 Pedro Alves <palves@redhat.com>
2838
2839 * win32-low.c (handle_output_debug_string): Remove parameter.
2840 (win32_kill): Remove our_status local and adjust call to
2841 handle_output_debug_string.
2842 (get_child_debug_event): Adjust call to
2843 handle_output_debug_string.
2844
1996e237
SM
28452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2846
2847 * linux-mips-low.c (mips_fill_gregset): Add cast.
2848 (mips_store_gregset): Likewise.
2849 (mips_fill_fpregset): Likewise.
2850 (mips_store_fpregset): Likewise.
2851
cbec665b
SM
28522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2853
2854 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2855 priv.
2856
eb3e3c67
SM
28572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * linux-mips-low.c (mips_linux_new_thread): Change type of
2860 watch_type to enum target_hw_bp_type.
2861
171de4b8
SM
28622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2863
2864 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2865 Change return type to arm_hwbp_type.
2866
04248ead
SM
28672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2868
2869 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2870 (arm_store_gregset): Likewise.
2871 * linux-arm-low.c (arm_get_hwcap): Likewise.
2872 (arm_read_description): Likewise.
2873
04b3479c
SM
28742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2875
2876 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2877
2bc84e8a
SM
28782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2879
2880 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2881 (ppc_fill_vsxregset): Likewise.
2882 (ppc_store_vsxregset): Likewise.
2883 (ppc_fill_vrregset): Likewise.
2884 (ppc_store_vrregset): Likewise.
2885 (ppc_fill_evrregset): Likewise.
2886 (ppc_store_evrregset): Likewise.
2887
e6c5bb05
SM
28882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2889
2890 * linux-ppc-low.c (ppc_usrregs_info): Remove
2891 forward-declaration.
2892 (ppc_arch_setup): Move lower in file.
2893
7ea45d72
SM
28942015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2895
2896 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2897 (ps_pdwrite): Likewise.
2898
69291610
HW
28992015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2900
2901 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2902 to after assert checks.
2903
b42945fd
SM
29042015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2905
2906 * proc-service.c (ps_pdread): Add/adjust casts.
2907 (ps_pdwrite): Add/adjust casts.
2908
d6f85c84
SM
29092015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2910
2911 * server.c (handle_search_memory_1): Cast return value of
2912 memmem.
2913
f98cd059
SM
29142015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2915
2916 * server.c (write_qxfer_response): Change type of data to
2917 gdb_byte *.
2918
d2412fa5
PA
29192015-10-29 Pedro Alves <palves@redhat.com>
2920
2921 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2922
c17414a2
PA
29232015-10-29 Pedro Alves <palves@redhat.com>
2924
2925 * tracepoint.c (clear_installed_tracepoints): Add casts.
2926
e053fbc4
PA
29272015-10-29 Pedro Alves <palves@redhat.com>
2928
2929 * server.c (handle_v_cont, process_serial_event): Add enum
2930 gdb_signal casts to signal parsing code.
2931
add67df8
PA
29322015-10-29 Pedro Alves <palves@redhat.com>
2933
2934 * linux-low.h (NULL_REGSET): Define.
2935 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2936 * linux-arm-low.c (arm_regsets): Likewise.
2937 * linux-crisv32-low.c (cris_regsets): Likewise.
2938 * linux-m68k-low.c (m68k_regsets): Likewise.
2939 * linux-mips-low.c (mips_regsets): Likewise.
2940 * linux-nios2-low.c (nios2_regsets): Likewise.
2941 * linux-ppc-low.c (ppc_regsets): Likewise.
2942 * linux-s390-low.c (s390_regsets): Likewise.
2943 * linux-sh-low.c (sh_regsets): Likewise.
2944 * linux-sparc-low.c (sparc_regsets): Likewise.
2945 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2946 * linux-tile-low.c (tile_regsets): Likewise.
2947 * linux-x86-low.c (x86_regsets): Likewise.
2948 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2949
50bc912a
PA
29502015-10-29 Pedro Alves <palves@redhat.com>
2951
2952 * linux-low.h (NULL_REGSET): Define.
2953 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2954 * linux-arm-low.c (arm_regsets): Likewise.
2955 * linux-crisv32-low.c (cris_regsets): Likewise.
2956 * linux-m68k-low.c (m68k_regsets): Likewise.
2957 * linux-mips-low.c (mips_regsets): Likewise.
2958 * linux-nios2-low.c (nios2_regsets): Likewise.
2959 * linux-ppc-low.c (ppc_regsets): Likewise.
2960 * linux-s390-low.c (s390_regsets): Likewise.
2961 * linux-sh-low.c (sh_regsets): Likewise.
2962 * linux-sparc-low.c (sparc_regsets): Likewise.
2963 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2964 * linux-tile-low.c (tile_regsets): Likewise.
2965 * linux-x86-low.c (x86_regsets): Likewise.
2966 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2967
682b2546
DE
29682015-10-26 Doug Evans <dje@google.com>
2969
2970 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2971
963843d4
DE
29722015-10-26 Doug Evans <dje@google.com>
2973
2974 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2975
d41401ac
DE
29762015-10-26 Doug Evans <dje@google.com>
2977
2978 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2979 for debug_printf.
2980 (attach_thread, find_new_threads_callback): Ditto.
2981
3db28855
AT
29822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2983
2984 * mem-break.h (set_breakpoint_data): Remove.
2985
fb78e89c
AT
29862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2987
2988 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2989 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2990 (initialize_low): Remove set_breakpoint_data call.
2991 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2992 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2993 (initialize_low): Remove set_breakpoint_data call.
2994 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2995 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2996 (initialize_low): Remove set_breakpoint_data call.
2997
2e6ee069
AT
29982015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2999
3000 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3001 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3002 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3003 * target.h (target_breakpoint_kind_from_pc): New macro.
3004
1652a986
AT
30052015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3006
3007 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3008 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3009 the default breakpoint kind.
3010
abeead09
AT
30112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3012
3013 * linux-arm-low.c (arm_supports_z_point_type): Add software
3014 breakpoint support.
3015
b0b4b501
AT
30162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3017
3018 * linux-arm-low.c: Refactor breakpoint definitions.
3019 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3020 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3021
8689682c
AT
30222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3023
3024 * Makefile.in: Add arm.c/o.
3025 * configure.srv: Likewise.
3026 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3027 (arm_breakpoint_kind_from_pc): New function.
3028 (arm_sw_breakpoint_from_kind): Return proper kind.
3029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3030
27165294
AT
30312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3032
3033 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3034 removal.
3035 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3036 (struct raw_breakpoint) <size>: Remove.
3037 (struct raw_breakpoint) <kind>: Add.
3038 (bp_size): New function.
3039 (bp_opcode): Likewise.
3040 (find_raw_breakpoint_at): Adjust for kind.
3041 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3042 (remove_memory_breakpoint): Adjust for kind call bp_size.
3043 (set_raw_breakpoint_at): Adjust for kind.
3044 (set_breakpoint): Likewise.
3045 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3046 (delete_raw_breakpoint): Adjust for kind.
3047 (delete_breakpoint): Likewise.
3048 (find_gdb_breakpoint): Likewise.
3049 (set_gdb_breakpoint_1): Likewise.
3050 (set_gdb_breakpoint): Likewise.
3051 (delete_gdb_breakpoint_1): Likewise.
3052 (delete_gdb_breakpoint): Likewise.
3053 (uninsert_raw_breakpoint): Likewise.
3054 (reinsert_raw_breakpoint): Likewise.
3055 (set_breakpoint_data): Remove.
3056 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3057 (check_mem_read): Adjust for kind call bp_size.
3058 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3059 (clone_one_breakpoint): Adjust for kind.
3060 * mem-break.h (set_gdb_breakpoint): Likewise.
3061 (delete_gdb_breakpoint): Likewise.
3062 * server.c (process_serial_event): Likewise.
3063
dd373349
AT
30642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3065
3066 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3067 (struct linux_target_ops) <breakpoint>: Remove.
3068 (struct linux_target_ops) <breakpoint_len>: Remove.
3069 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3070 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3071 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3072 (arm_sw_breakpoint_from_kind): New function.
3073 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3074 (struct linux_target_ops) <breakpoint>: Remove.
3075 (struct linux_target_ops) <breakpoint_len>: Remove.
3076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3078 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3079 (struct linux_target_ops) <breakpoint>: Remove.
3080 (struct linux_target_ops) <breakpoint_len>: Remove.
3081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3083 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3084 (struct linux_target_ops) <breakpoint>: Remove.
3085 (struct linux_target_ops) <breakpoint_len>: Remove.
3086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3088 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3089 and sw_breakpoint_from_kind to increment the pc.
3090 (linux_breakpoint_kind_from_pc): New function.
3091 (linux_sw_breakpoint_from_kind): New function.
3092 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3093 (initialize_low): Call breakpoint_kind_from_pc and
3094 sw_breakpoint_from_kind to replace breakpoint_data/len.
3095 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3096 New field.
3097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3098 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3099 (struct linux_target_ops) <breakpoint>: Remove.
3100 (struct linux_target_ops) <breakpoint_len>: Remove.
3101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3103 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3104 (struct linux_target_ops) <breakpoint>: Remove.
3105 (struct linux_target_ops) <breakpoint_len>: Remove.
3106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3108 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3109 (struct linux_target_ops) <breakpoint>: Remove.
3110 (struct linux_target_ops) <breakpoint_len>: Remove.
3111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3113 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3114 (struct linux_target_ops) <breakpoint>: Remove.
3115 (struct linux_target_ops) <breakpoint_len>: Remove.
3116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3118 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3119 (struct linux_target_ops) <breakpoint>: Remove.
3120 (struct linux_target_ops) <breakpoint_len>: Remove.
3121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3123 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3124 (struct linux_target_ops) <breakpoint>: Remove.
3125 (struct linux_target_ops) <breakpoint_len>: Remove.
3126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3128 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3129 (struct linux_target_ops) <breakpoint>: Remove.
3130 (struct linux_target_ops) <breakpoint_len>: Remove.
3131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3133 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3134 (struct linux_target_ops) <breakpoint>: Remove.
3135 (struct linux_target_ops) <breakpoint_len>: Remove.
3136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3138 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3139 (struct linux_target_ops) <breakpoint>: Remove.
3140 (struct linux_target_ops) <breakpoint_len>: Remove.
3141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3143 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3144 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3145 (struct linux_target_ops) <breakpoint>: Remove.
3146 (struct linux_target_ops) <breakpoint_len>: Remove.
3147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3149 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3150 (struct linux_target_ops) <breakpoint>: Remove.
3151 (struct linux_target_ops) <breakpoint_len>: Remove.
3152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3154
4cd98a19
AT
31552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3156
3157 * linux-cris-low.c (cris_get_pc): Remove void arg.
3158
774ee6d2
AR
31592015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3160
3161 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3162 variable name.
3163
833dcd29
AR
31642015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3165
3166 * inferiors.c (thread_pid_matches_callback): New function.
3167 (find_thread_process): New function.
3168 (remove_thread): Reset current_thread.
3169 (remove_process): Assert threads have been removed first.
3170
8d689ee5
YQ
31712015-10-15 Yao Qi <yao.qi@linaro.org>
3172
3173 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3174 if it is 3.
3175 (aarch64_remove_point): Likewise.
3176 * regcache.c (regcache_register_size): New function.
3177
1c2e1515
YQ
31782015-10-12 Yao Qi <yao.qi@linaro.org>
3179
3180 * linux-aarch64-low.c: Update all callers as emit_load_store
3181 is renamed to aarch64_emit_load_store.
3182
e1c587c3
YQ
31832015-10-12 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-aarch64-low.c: Update all callers of function renaming
3186 from emit_insn to aarch64_emit_insn.
3187
b6542f81
YQ
31882015-10-12 Yao Qi <yao.qi@linaro.org>
3189
3190 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3191 arch/aarch64-insn.h.
3192 (struct aarch64_memory_operand): Likewise.
3193 (ENCODE): Likewise.
3194 (emit_insn): Move to arch/aarch64-insn.c.
3195 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3196 (emit_load_store): Move to arch/aarch64-insn.c.
3197 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3198 (can_encode_int32): Remove.
3199
246994ce
YQ
32002015-10-12 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3203 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3204 (aarch64_relocate_instruction): Likewise.
3205 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3206 (struct aarch64_insn_visitor): Likewise.
3207
0badd99f
YQ
32082015-10-12 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3211 (struct aarch64_insn_visitor): New.
3212 (struct aarch64_insn_relocation_data): New.
3213 (aarch64_ftrace_insn_reloc_b): New function.
3214 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3215 (aarch64_ftrace_insn_reloc_cb): Likewise.
3216 (aarch64_ftrace_insn_reloc_tb): Likewise.
3217 (aarch64_ftrace_insn_reloc_adr): Likewise.
3218 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3219 (aarch64_ftrace_insn_reloc_others): Likewise.
3220 (visitor): New.
3221 (aarch64_relocate_instruction): Use visitor.
3222
dfaffe9d
YQ
32232015-10-12 Yao Qi <yao.qi@linaro.org>
3224
3225 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3226 int. Add argument buf.
3227 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3228 aarch64_relocate_instruction.
3229
70b439f0
YQ
32302015-10-12 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3233 argument insn. Remove local variable insn. Don't call
3234 target_read_uint32.
3235 (aarch64_install_fast_tracepoint_jump_pad): Call
3236 target_read_uint32.
3237
7781c06f
YQ
32382015-09-30 Yao Qi <yao.qi@linaro.org>
3239
3240 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3241 (emit_load_store_pair): Likewise.
3242
9a3c8263
SM
32432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3244
3245 * dll.c (match_dll): Add cast(s).
3246 (unloaded_dll): Likewise.
3247 * linux-low.c (second_thread_of_pid_p): Likewise.
3248 (delete_lwp_callback): Likewise.
3249 (count_events_callback): Likewise.
3250 (select_event_lwp_callback): Likewise.
3251 (linux_set_resume_request): Likewise.
3252 * server.c (accumulate_file_name_length): Likewise.
3253 (emit_dll_description): Likewise.
3254 (handle_qxfer_threads_worker): Likewise.
3255 (visit_actioned_threads): Likewise.
3256 * thread-db.c (any_thread_of): Likewise.
3257 * tracepoint.c (same_process_p): Likewise.
3258 (match_blocktype): Likewise.
3259 (build_traceframe_info_xml): Likewise.
3260
224c3ddb
SM
32612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3262
3263 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3264 assignment.
3265 (gdb_unparse_agent_expr): Likewise.
3266 * hostio.c (require_data): Likewise.
3267 (handle_pread): Likewise.
3268 * linux-low.c (disable_regset): Likewise.
3269 (fetch_register): Likewise.
3270 (store_register): Likewise.
3271 (get_dynamic): Likewise.
3272 (linux_qxfer_libraries_svr4): Likewise.
3273 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3274 (set_fast_tracepoint_jump): Likewise.
3275 (uninsert_fast_tracepoint_jumps_at): Likewise.
3276 (reinsert_fast_tracepoint_jumps_at): Likewise.
3277 (validate_inserted_breakpoint): Likewise.
3278 (clone_agent_expr): Likewise.
3279 * regcache.c (init_register_cache): Likewise.
3280 * remote-utils.c (putpkt_binary_1): Likewise.
3281 (decode_M_packet): Likewise.
3282 (decode_X_packet): Likewise.
3283 (look_up_one_symbol): Likewise.
3284 (relocate_instruction): Likewise.
3285 (monitor_output): Likewise.
3286 * server.c (handle_search_memory): Likewise.
3287 (handle_qxfer_exec_file): Likewise.
3288 (handle_qxfer_libraries): Likewise.
3289 (handle_qxfer): Likewise.
3290 (handle_query): Likewise.
3291 (handle_v_cont): Likewise.
3292 (handle_v_run): Likewise.
3293 (captured_main): Likewise.
3294 * target.c (write_inferior_memory): Likewise.
3295 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3296 * tracepoint.c (init_trace_buffer): Likewise.
3297 (add_tracepoint_action): Likewise.
3298 (add_traceframe): Likewise.
3299 (add_traceframe_block): Likewise.
3300 (cmd_qtdpsrc): Likewise.
3301 (cmd_qtdv): Likewise.
3302 (cmd_qtstatus): Likewise.
3303 (response_source): Likewise.
3304 (response_tsv): Likewise.
3305 (cmd_qtnotes): Likewise.
3306 (gdb_collect): Likewise.
3307 (initialize_tracepoint): Likewise.
3308
afbe19f8
PL
33092015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3310
3311 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3312 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3313 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3314 <NOP>: New.
3315 (enum aarch64_condition_codes): New enum.
3316 (w0): New static global.
3317 (fp): Likewise.
3318 (lr): Likewise.
3319 (struct aarch64_memory_operand) <type>: New
3320 MEMORY_OPERAND_POSTINDEX type.
3321 (postindex_memory_operand): New helper function.
3322 (emit_ret): New function.
3323 (emit_load_store_pair): New function, factored out of emit_stp
3324 with support for MEMORY_OPERAND_POSTINDEX.
3325 (emit_stp): Rewrite using emit_load_store_pair.
3326 (emit_ldp): New function.
3327 (emit_load_store): Likewise.
3328 (emit_ldr): Mention post-index instruction in comment.
3329 (emit_ldrh): New function.
3330 (emit_ldrb): New function.
3331 (emit_ldrsw): Mention post-index instruction in comment.
3332 (emit_str): Likewise.
3333 (emit_subs): New function.
3334 (emit_cmp): Likewise.
3335 (emit_and): Likewise.
3336 (emit_orr): Likewise.
3337 (emit_orn): Likewise.
3338 (emit_eor): Likewise.
3339 (emit_mvn): Likewise.
3340 (emit_lslv): Likewise.
3341 (emit_lsrv): Likewise.
3342 (emit_asrv): Likewise.
3343 (emit_mul): Likewise.
3344 (emit_sbfm): Likewise.
3345 (emit_sbfx): Likewise.
3346 (emit_ubfm): Likewise.
3347 (emit_ubfx): Likewise.
3348 (emit_csinc): Likewise.
3349 (emit_cset): Likewise.
3350 (emit_nop): Likewise.
3351 (emit_ops_insns): New helper function.
3352 (emit_pop): Likewise.
3353 (emit_push): Likewise.
3354 (aarch64_emit_prologue): New function.
3355 (aarch64_emit_epilogue): Likewise.
3356 (aarch64_emit_add): Likewise.
3357 (aarch64_emit_sub): Likewise.
3358 (aarch64_emit_mul): Likewise.
3359 (aarch64_emit_lsh): Likewise.
3360 (aarch64_emit_rsh_signed): Likewise.
3361 (aarch64_emit_rsh_unsigned): Likewise.
3362 (aarch64_emit_ext): Likewise.
3363 (aarch64_emit_log_not): Likewise.
3364 (aarch64_emit_bit_and): Likewise.
3365 (aarch64_emit_bit_or): Likewise.
3366 (aarch64_emit_bit_xor): Likewise.
3367 (aarch64_emit_bit_not): Likewise.
3368 (aarch64_emit_equal): Likewise.
3369 (aarch64_emit_less_signed): Likewise.
3370 (aarch64_emit_less_unsigned): Likewise.
3371 (aarch64_emit_ref): Likewise.
3372 (aarch64_emit_if_goto): Likewise.
3373 (aarch64_emit_goto): Likewise.
3374 (aarch64_write_goto_address): Likewise.
3375 (aarch64_emit_const): Likewise.
3376 (aarch64_emit_call): Likewise.
3377 (aarch64_emit_reg): Likewise.
3378 (aarch64_emit_pop): Likewise.
3379 (aarch64_emit_stack_flush): Likewise.
3380 (aarch64_emit_zero_ext): Likewise.
3381 (aarch64_emit_swap): Likewise.
3382 (aarch64_emit_stack_adjust): Likewise.
3383 (aarch64_emit_int_call_1): Likewise.
3384 (aarch64_emit_void_call_2): Likewise.
3385 (aarch64_emit_eq_goto): Likewise.
3386 (aarch64_emit_ne_goto): Likewise.
3387 (aarch64_emit_lt_goto): Likewise.
3388 (aarch64_emit_le_goto): Likewise.
3389 (aarch64_emit_gt_goto): Likewise.
3390 (aarch64_emit_ge_got): Likewise.
3391 (aarch64_emit_ops_impl): New static global variable.
3392 (aarch64_emit_ops): New target function, return
3393 &aarch64_emit_ops_impl.
3394 (struct linux_target_ops): Install it.
3395
bb903df0
PL
33962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3397
3398 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3399 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3400 aarch64-ipa.o.
3401 * linux-aarch64-ipa.c: New file.
3402 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3403 and endian.h.
3404 (aarch64_get_thread_area): New target method.
3405 (extract_signed_bitfield): New helper function.
3406 (aarch64_decode_ldr_literal): New function.
3407 (enum aarch64_opcodes): New enum.
3408 (struct aarch64_register): New struct.
3409 (struct aarch64_operand): New struct.
3410 (x0): New static global.
3411 (x1): Likewise.
3412 (x2): Likewise.
3413 (x3): Likewise.
3414 (x4): Likewise.
3415 (w2): Likewise.
3416 (ip0): Likewise.
3417 (sp): Likewise.
3418 (xzr): Likewise.
3419 (aarch64_register): New helper function.
3420 (register_operand): Likewise.
3421 (immediate_operand): Likewise.
3422 (struct aarch64_memory_operand): New struct.
3423 (offset_memory_operand): New helper function.
3424 (preindex_memory_operand): Likewise.
3425 (enum aarch64_system_control_registers): New enum.
3426 (ENCODE): New macro.
3427 (emit_insn): New helper function.
3428 (emit_b): New function.
3429 (emit_bcond): Likewise.
3430 (emit_cb): Likewise.
3431 (emit_tb): Likewise.
3432 (emit_blr): Likewise.
3433 (emit_stp): Likewise.
3434 (emit_ldp_q_offset): Likewise.
3435 (emit_stp_q_offset): Likewise.
3436 (emit_load_store): Likewise.
3437 (emit_ldr): Likewise.
3438 (emit_ldrsw): Likewise.
3439 (emit_str): Likewise.
3440 (emit_ldaxr): Likewise.
3441 (emit_stxr): Likewise.
3442 (emit_stlr): Likewise.
3443 (emit_data_processing_reg): Likewise.
3444 (emit_data_processing): Likewise.
3445 (emit_add): Likewise.
3446 (emit_sub): Likewise.
3447 (emit_mov): Likewise.
3448 (emit_movk): Likewise.
3449 (emit_mov_addr): Likewise.
3450 (emit_mrs): Likewise.
3451 (emit_msr): Likewise.
3452 (emit_sevl): Likewise.
3453 (emit_wfe): Likewise.
3454 (append_insns): Likewise.
3455 (can_encode_int32_in): New helper function.
3456 (aarch64_relocate_instruction): New function.
3457 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3458 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3459 (struct linux_target_ops): Install aarch64_get_thread_area,
3460 aarch64_install_fast_tracepoint_jump_pad and
3461 aarch64_get_min_fast_tracepoint_insn_len.
3462
787749ea
PL
34632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3464
3465 * Makefile.in (aarch64-insn.o): New rule.
3466 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3467
9812b2e6
YQ
34682015-09-21 Yao Qi <yao.qi@linaro.org>
3469
3470 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3471
18fe412b
YQ
34722015-09-21 Yao Qi <yao.qi@linaro.org>
3473
3474 * tracepoint.c (max_jump_pad_size): Remove.
3475
a0cc84cd
YQ
34762015-09-18 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch64-low.c: Don't include sys/uio.h.
3479 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3480
d78908cf
WW
34812015-09-16 Wei-cheng Wang <cole945@gmail.com>
3482
3483 * tracepoint.c (eval_result_type): Change prototype.
3484 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3485
d57e0d50
PA
34862015-09-15 Pedro Alves <palves@redhat.com>
3487
3488 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3489 Check whether to report exec events instead of checking whether
3490 multiprocess is enabled.
3491
5a676acc
PA
34922015-09-15 Pedro Alves <palves@redhat.com>
3493
3494 PR remote/18965
3495 * remote-utils.c (prepare_resume_reply): Merge
3496 TARGET_WAITKIND_VFORK_DONE switch case with the
3497 TARGET_WAITKIND_FORKED case.
3498
7c5d0fad
YQ
34992015-09-15 Yao Qi <yao.qi@linaro.org>
3500
3501 * server.c (handle_query): Check string comparison using
3502 "else if" instead of "if".
3503
750ce8d1
YQ
35042015-09-15 Yao Qi <yao.qi@linaro.org>
3505
3506 * server.c (vCont_supported): New global variable.
3507 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3508 matches. Append ";vContSupported+" to own_buf.
3509 (handle_v_requests): Append ";s;S" to own_buf if target supports
3510 hardware single step or vCont_supported is false.
3511 (capture_main): Set vCont_supported to zero.
3512
70b90b91
YQ
35132015-09-15 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3516 it to ...
3517 (linux_supports_hardware_single_step): ... New function.
3518 (linux_target_ops): Update.
3519 * lynx-low.c (lynx_target_ops): Set field
3520 supports_hardware_single_step to target_can_do_hardware_single_step.
3521 * nto-low.c (nto_target_ops): Likewise.
3522 * spu-low.c (spu_target_ops): Likewise.
3523 * win32-low.c (win32_target_ops): Likewise.
3524 * target.c (target_can_do_hardware_single_step): New function.
3525 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3526 Remove. <supports_hardware_single_step>: New field.
3527 (target_supports_conditional_breakpoints): Remove.
3528 (target_supports_hardware_single_step): New macro.
3529 (target_can_do_hardware_single_step): Declare.
3530 * server.c (handle_query): Use target_supports_hardware_single_step
3531 instead of target_supports_conditional_breakpoints.
3532
ade90bde
YQ
35332015-09-15 Yao Qi <yao.qi@linaro.org>
3534
3535 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3536 function.
3537 (struct linux_target_ops the_low_target): Install
3538 aarch64_linux_siginfo_fixup.
3539
94585166
DB
35402015-09-11 Don Breazeal <donb@codesourcery.com>
3541 Luis Machado <lgustavo@codesourcery.com>
3542
3543 * linux-low.c (linux_mourn): Static declaration.
3544 (linux_arch_setup): Move in front of
3545 handle_extended_wait.
3546 (linux_arch_setup_thread): New function.
3547 (handle_extended_wait): Handle exec events. Call
3548 linux_arch_setup_thread. Make event_lwp argument a
3549 pointer-to-a-pointer.
3550 (check_zombie_leaders): Do not check stopped threads.
3551 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3552 (linux_low_filter_event): Add lwp and thread for exec'ing
3553 non-leader thread if leader thread has been deleted.
3554 Refactor code into linux_arch_setup_thread and call it.
3555 Pass child lwp pointer by reference to handle_extended_wait.
3556 (linux_wait_for_event_filtered): Update comment.
3557 (linux_wait_1): Prevent clobbering exec event status.
3558 (linux_supports_exec_events): New function.
3559 (linux_target_ops) <supports_exec_events>: Initialize new member.
3560 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3561 new member.
3562 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3563 * server.c (report_exec_events): New global variable.
3564 (handle_query): Handle qSupported query for exec-events feature.
3565 (captured_main): Initialize report_exec_events.
3566 * server.h (report_exec_events): Declare new global variable.
3567 * target.h (struct target_ops) <supports_exec_events>: New
3568 member.
3569 (target_supports_exec_events): New macro.
3570 * win32-low.c (win32_target_ops) <supports_exec_events>:
3571 Initialize new member.
3572
0568462b
MM
35732015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3574
3575 * linux-low.c (linux_low_enable_btrace): Remove.
3576 (linux_target_ops): Replace linux_low_enable_btrace with
3577 linux_enable_btrace.
3578
39edd165
YQ
35792015-09-03 Yao Qi <yao.qi@linaro.org>
3580
3581 * linux-aarch64-low.c (aarch64_insert_point): Call
3582 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3583 returns true.
3584
1db33b5a
UW
35852015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3586
3587 * linux-low.c (check_stopped_by_breakpoint): Use
3588 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3589
ab290430
PA
35902015-08-27 Pedro Alves <palves@redhat.com>
3591
3592 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3593
8d749320
SM
35942015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3595
6711b7f8
SM
3596 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3597 the XNEW-family equivalent.
8d749320
SM
3598 (compile_bytecodes): Likewise.
3599 * dll.c (loaded_dll): Likewise.
3600 * event-loop.c (append_callback_event): Likewise.
3601 (create_file_handler): Likewise.
3602 (create_file_event): Likewise.
3603 * hostio.c (handle_open): Likewise.
3604 * inferiors.c (add_thread): Likewise.
3605 (add_process): Likewise.
3606 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3607 * linux-arm-low.c (arm_new_process): Likewise.
3608 (arm_new_thread): Likewise.
3609 * linux-low.c (add_to_pid_list): Likewise.
3610 (linux_add_process): Likewise.
3611 (handle_extended_wait): Likewise.
3612 (add_lwp): Likewise.
3613 (enqueue_one_deferred_signal): Likewise.
3614 (enqueue_pending_signal): Likewise.
3615 (linux_resume_one_lwp_throw): Likewise.
3616 (linux_resume_one_thread): Likewise.
3617 (linux_read_memory): Likewise.
3618 (linux_write_memory): Likewise.
3619 * linux-mips-low.c (mips_linux_new_process): Likewise.
3620 (mips_linux_new_thread): Likewise.
3621 (mips_add_watchpoint): Likewise.
3622 * linux-x86-low.c (initialize_low_arch): Likewise.
3623 * lynx-low.c (lynx_add_process): Likewise.
3624 * mem-break.c (set_raw_breakpoint_at): Likewise.
3625 (set_breakpoint): Likewise.
3626 (add_condition_to_breakpoint): Likewise.
3627 (add_commands_to_breakpoint): Likewise.
3628 (clone_agent_expr): Likewise.
3629 (clone_one_breakpoint): Likewise.
3630 * regcache.c (new_register_cache): Likewise.
3631 * remote-utils.c (look_up_one_symbol): Likewise.
3632 * server.c (queue_stop_reply): Likewise.
3633 (start_inferior): Likewise.
3634 (queue_stop_reply_callback): Likewise.
3635 (handle_target_event): Likewise.
3636 * spu-low.c (fetch_ppc_memory): Likewise.
3637 (store_ppc_memory): Likewise.
3638 * target.c (set_target_ops): Likewise.
3639 * thread-db.c (thread_db_load_search): Likewise.
3640 (try_thread_db_load_1): Likewise.
3641 * tracepoint.c (add_tracepoint): Likewise.
3642 (add_tracepoint_action): Likewise.
3643 (create_trace_state_variable): Likewise.
3644 (cmd_qtdpsrc): Likewise.
3645 (cmd_qtro): Likewise.
3646 (add_while_stepping_state): Likewise.
3647 * win32-low.c (child_add_thread): Likewise.
3648 (get_image_name): Likewise.
3649
ed8b7b42
YQ
36502015-08-25 Yao Qi <yao.qi@linaro.org>
3651
3652 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3653
db3cb7cb
YQ
36542015-08-25 Yao Qi <yao.qi@linaro.org>
3655
3656 * Makefile.in (aarch64-linux.o): New rule.
3657 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3658 srv_tgtobj.
3659 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3660 (aarch64_init_debug_reg_state): Make it extern.
3661 (aarch64_linux_prepare_to_resume): Remove.
3662
f6011a1c
YQ
36632015-08-25 Yao Qi <yao.qi@linaro.org>
3664
3665 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3666 lwp_arch_private_info and ptid_of_lwp.
3667
88e2cf7e
YQ
36682015-08-25 Yao Qi <yao.qi@linaro.org>
3669
3670 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3671 Find proc_info by find_process_pid. All callers updated.
3672
5e35436e
YQ
36732015-08-25 Yao Qi <yao.qi@linaro.org>
3674
3675 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3676 Remove.
3677 (debug_reg_change_callback): Remove.
3678 (aarch64_notify_debug_reg_change): Remove.
3679
4a8a7965
YQ
36802015-08-25 Yao Qi <yao.qi@linaro.org>
3681
3682 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3683 Call current_lwp_ptid.
3684
32a271ee
YQ
36852015-08-25 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-aarch64-low.c (debug_reg_change_callback): Use
3688 debug_printf.
3689
0d51c8d7
YQ
36902015-08-25 Yao Qi <yao.qi@linaro.org>
3691
3692 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3693
31a43dd5
YQ
36942015-08-25 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3697
8ee52567
YQ
36982015-08-25 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3701 the code.
3702
ff3f0f45
YQ
37032015-08-25 Yao Qi <yao.qi@linaro.org>
3704
3705 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3706 Remove.
3707 (debug_reg_change_callback): Remove argument entry and add argument
3708 lwp. Remove local variable thread. Don't print thread id in the
3709 debugging output. Don't check whether pid of thread equals to pid.
3710 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3711 iterate_over_lwps instead find_inferior.
3712
3d40fbb5
PA
37132015-08-24 Pedro Alves <palves@redhat.com>
3714
3715 * inferiors.c (get_first_process): New function.
3716 * inferiors.h (get_first_process): New declaration.
3717 * remote-utils.c (read_ptid): Default to the first process in the
3718 list, instead of to the current thread's process.
3719
438e1e42
PA
37202015-08-24 Pedro Alves <palves@redhat.com>
3721
3722 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3723 * event-loop.c: Likewise.
3724 * remote-utils.c: Likewise.
3725 * tracepoint.c: Likewise.
3726
a8c6d4fc
PA
37272015-08-24 Pedro Alves <palves@redhat.com>
3728
3729 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3730 ptid_get_lwp.
3731
99b0bb12
PA
37322015-08-21 Pedro Alves <palves@redhat.com>
3733
3734 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3735 instead of literal 1.
3736
f8904751
PA
37372015-08-21 Pedro Alves <palves@redhat.com>
3738
3739 * tdesc.c (default_description): Explicitly zero-initialize.
3740
465a859e
PA
37412015-08-21 Pedro Alves <palves@redhat.com>
3742
3743 PR gdb/18749
3744 * inferiors.c (remove_thread): Discard any pending stop reply for
3745 this thread.
3746 * server.c (remove_all_on_match_pid): Rename to ...
3747 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3748 instead of a pid.
3749 (discard_queued_stop_replies): Change parameter to a ptid. Now
3750 extern.
3751 (handle_v_kill, kill_inferior_callback, captured_main)
3752 (process_serial_event): Adjust.
3753 * server.h (discard_queued_stop_replies): Declare.
3754
f0db101d
PA
37552015-08-21 Pedro Alves <palves@redhat.com>
3756
3757 * linux-low.c (wait_for_sigstop): Always switch to no thread
3758 selected if the previously current thread dies.
3759 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3760 process instead of the current thread's.
3761 * remote-utils.c (input_interrupt): Don't check if there's no
3762 current thread.
3763 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3764 current thread to the general thread fails, error out.
3765 (handle_qxfer_auxv, handle_qxfer_libraries)
3766 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3767 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3768 (handle_query): Check if there's a thread selected instead of
3769 checking whether there's any thread in the thread list.
3770 (handle_qxfer_threads, handle_qxfer_btrace)
3771 (handle_qxfer_btrace_conf): Don't error out early if there's no
3772 thread in the thread list.
3773 (handle_v_cont, myresume): Don't set the current thread to the
3774 continue thread.
3775 (process_serial_event) <Hg handling>: Also set thread_id if the
3776 previous general thread is still alive.
3777 (process_serial_event) <g/G handling>: If setting the current
3778 thread to the general thread fails, error out.
3779 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3780 thread's lwp instead of the current thread's.
3781 * target.c (set_desired_thread): If the desired thread was not
3782 found, leave the current thread pointing to NULL. Return an int
3783 (boolean) indicating success.
3784 * target.h (set_desired_thread): Change return type to int.
3785
40045d91
MF
37862015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3787
3788 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3789 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3790 #includes.
3791 (ps_get_thread_area): New function.
3792
45face3b
GB
37932015-08-19 Gary Benson <gbenson@redhat.com>
3794
3795 * hostio.c (handle_pread): Do not attempt to read more data
3796 than hostio_reply_with_data can fit in a packet.
3797
16d5f642
JB
37982015-08-18 Joel Brobecker <brobecker@adacore.com>
3799
3800 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3801
a738da3a
MF
38022015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3803
3804 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3805
33ebda9d
PA
38062015-08-06 Pedro Alves <palves@redhat.com>
3807
3808 * tracepoint.c (expr_eval_result): Now an int.
3809
a44892be
PA
38102015-08-06 Pedro Alves <palves@redhat.com>
3811
3812 * gdbthread.h (struct regcache): Forward declare.
3813 (struct thread_info) <regcache_data>: Now a struct regcache
3814 pointer.
3815 * inferiors.c (inferior_regcache_data)
3816 (set_inferior_regcache_data): Now work with struct regcache
3817 pointers.
3818 * inferiors.h (struct regcache): Forward declare.
3819 (inferior_regcache_data, set_inferior_regcache_data): Now work
3820 with struct regcache pointers.
3821 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3822 (free_register_cache_thread): Remove struct regcache pointer
3823 casts.
3824
608a1e46
PA
38252015-08-06 Pedro Alves <palves@redhat.com>
3826
3827 * server.c (captured_main): On error, print the exception message
3828 to stderr, and if run_once is set, throw a quit.
3829
f0ce0d3a
PA
38302015-08-06 Pedro Alves <palves@redhat.com>
3831
3832 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3833 the current thread.
3834
bf47e248
PA
38352015-08-06 Pedro Alves <palves@redhat.com>
3836
3837 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3838 reading beyond the passed in buffer length.
3839
b6b9ffcc
PL
38402015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3841
3842 * tracepoint.c (symbol_list) <required>: Remove.
3843
863d01bd
PA
38442015-08-06 Pedro Alves <palves@redhat.com>
3845
3846 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3847 count if stopping and suspending threads.
3848 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3849 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3850 (linux_detach): Complete an ongoing step-over.
3851 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3852 throughout.
3853 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3854 (linux_wait_1): If passing a signal to the inferior after
3855 finishing a step-over, unsuspend and re-resume all lwps. If we
3856 see a single-step event but the thread should be continuing, don't
3857 pass the trap to gdb.
3858 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3859 internal_error instead of gdb_assert.
3860 (enqueue_pending_signal): New function.
3861 (check_ptrace_stopped_lwp_gone): Add debug output.
3862 (start_step_over): Use internal_error instead of gdb_assert.
3863 (complete_ongoing_step_over): New function.
3864 (linux_resume_one_thread): Don't resume a suspended thread.
3865 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3866 it stepping.
3867
00db26fa
PA
38682015-08-06 Pedro Alves <palves@redhat.com>
3869
3870 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3871 (linux_thread_alive): Use lwp_is_marked_dead.
3872 (extended_event_reported): Delete.
3873 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3874 instead of extended_event_reported.
3875 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3876 as well.
3877 (lwp_is_marked_dead): New function.
3878 (lwp_running): Use lwp_is_marked_dead.
3879 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3880 comment.
3881
ad071a30
PA
38822015-08-06 Pedro Alves <palves@redhat.com>
3883
3884 * linux-low.c (linux_wait_1): Move fork event output out of the
3885 !report_to_gdb check. Pass event_child->waitstatus to
3886 target_waitstatus_to_string instead of ourstatus.
3887
524b57e6
YQ
38882015-08-04 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3891 if current_thread is 32 bit.
3892
6085d6f6
YQ
38932015-08-04 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3896 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3897 * server.c (extended_protocol): Remove "static".
3898 * server.h (extended_protocol): Declare it.
3899
8a7e4587
YQ
39002015-08-04 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3903 both aarch64 and aarch32.
3904 (aarch64_set_pc): Likewise.
3905
3b53ae99
YQ
39062015-08-04 Yao Qi <yao.qi@linaro.org>
3907
3908 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3909 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3910 arm-with-neon.xml to srv_xmlfiles.
3911 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3912 (is_64bit_tdesc): New function.
3913 (aarch64_linux_read_description): New function.
3914 (aarch64_arch_setup): Call aarch64_linux_read_description.
3915 (regs_info): Rename to regs_info_aarch64.
3916 (aarch64_regs_info): Return right regs_info.
3917 (initialize_low_arch): Call initialize_low_arch_aarch32.
3918
bd9e6534
YQ
39192015-08-04 Yao Qi <yao.qi@linaro.org>
3920
3921 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3922 * linux-aarch32-low.c: New file.
3923 * linux-aarch32-low.h: New file.
3924 * linux-arm-low.c (arm_fill_gregset): Move it to
3925 linux-aarch32-low.c.
3926 (arm_store_gregset): Likewise.
3927 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3928 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3929 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3930 (regs_info): Rename to regs_info_arm.
3931 (arm_regs_info): Return regs_info_aarch32 if
3932 have_ptrace_getregset is 1 and target description is
3933 arm_with_neon or arm_with_vfpv3.
3934 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3935 Call initialize_low_arch_aarch32 instead.
3936
ded48a5e
YQ
39372015-08-04 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3940 * linux-low.c: ... here.
3941 * linux-low.h (have_ptrace_getregset): Declare it.
3942
96e9210f
PA
39432015-08-04 Pedro Alves <palves@redhat.com>
3944
3945 * thread-db.c (struct thread_db): Use new typedefs.
3946 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3947 CHK calls.
3948 (disable_thread_event_reporting): Cast result of dlsym to
3949 destination function pointer type.
3950 (thread_db_mourn): Use td_ta_delete_ftype.
3951
af60a1ef
SL
39522015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3953
3954 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3955 arch variant.
3956 (CDX_BREAKPOINT): Define for R2.
3957 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3958 (the_low_target): Add comments.
3959
e8b41681
YQ
39602015-07-30 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-arm-low.c (arm_hwcap): Remove it.
3963 (arm_read_description): New local variable arm_hwcap. Don't
3964 set arm_hwcap to zero.
3965
89abb039
YQ
39662015-07-30 Yao Qi <yao.qi@linaro.org>
3967
3968 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3969 Use regcache->tdesc instead.
3970 (arm_store_wmmxregset): Likewise.
3971 (arm_fill_vfpregset): Likewise.
3972 (arm_store_vfpregset): Likewise.
3973
deca266c
YQ
39742015-07-30 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-arm-low.c: Include arch/arm.h.
3977 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3978 (arm_store_gregset): Likewise.
3979
aa58a496
SM
39802015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3981
3982 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3983 ptrace's 4th parameter.
3984
50904b25
YQ
39852015-07-27 Yao Qi <yao.qi@linaro.org>
3986
3987 * configure.srv (case aarch64*-*-linux*): Don't set
3988 srv_linux_usrregs.
3989
5826e159
PA
39902015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3991
3992 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3993 sys/ptrace.h.
3994 * linux-arm-low.c: Likewise.
3995 * linux-cris-low.c: Likewise.
3996 * linux-crisv32-low.c: Likewise.
3997 * linux-low.c: Likewise.
3998 * linux-m68k-low.c: Likewise.
3999 * linux-mips-low.c: Likewise.
4000 * linux-nios2-low.c: Likewise.
4001 * linux-s390-low.c: Likewise.
4002 * linux-sparc-low.c: Likewise.
4003 * linux-tic6x-low.c: Likewise.
4004 * linux-tile-low.c: Likewise.
4005 * linux-x86-low.c: Likewise.
4006
54019719
PA
40072015-07-24 Pedro Alves <palves@redhat.com>
4008
4009 * config.in: Regenerate.
4010 * configure: Regenerate.
4011
eb7aa561
PA
40122015-07-24 Pedro Alves <palves@redhat.com>
4013
4014 * acinclude.m4: Include ../ptrace.m4.
4015 * configure.ac: Call GDB_AC_PTRACE.
4016 * config.in, configure: Regenerate.
4017
55d7b841
YQ
40182015-07-24 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-low.c (linux_create_inferior): Remove setting to
4021 proc->priv->new_inferior.
4022 (linux_attach): Likewise.
4023 (linux_low_filter_event): Likewise.
4024 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4025
c06cbd92
YQ
40262015-07-24 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-low.c (linux_arch_setup): New function.
4029 (linux_low_filter_event): If proc->tdesc is NULL and
4030 proc->attached is true, call the_low_target.arch_setup.
4031 Otherwise, keep status pending, and return.
4032 (linux_resume_one_lwp_throw): Don't call get_pc if
4033 thread->while_stepping isn't NULL. Don't call
4034 get_thread_regcache if proc->tdesc is NULL.
4035 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4036 (linux_target_ops): Install arch_setup.
4037 * server.c (start_inferior): Call the_target->arch_setup.
4038 * target.h (struct target_ops) <arch_setup>: New field.
4039 (target_arch_setup): New marco.
4040 * lynx-low.c (lynx_target_ops): Update.
4041 * nto-low.c (nto_target_ops): Update.
4042 * spu-low.c (spu_target_ops): Update.
4043 * win32-low.c (win32_target_ops): Update.
4044
5ae3ebba
YQ
40452015-07-24 Yao Qi <yao.qi@linaro.org>
4046
4047 * linux-low.c (linux_add_process): Don't set
4048 proc->priv->new_inferior.
4049 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4050 (linux_attach): Likewise.
4051
eb97750b
YQ
40522015-07-24 Yao Qi <yao.qi@linaro.org>
4053
4054 * server.c (start_inferior): Code refactor.
4055
51aee833
YQ
40562015-07-24 Yao Qi <yao.qi@linaro.org>
4057
4058 * server.c (process_serial_event): Set general_thread.
4059
af1b22f3
YQ
40602015-07-21 Yao Qi <yao.qi@linaro.org>
4061
4062 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4063 aarch64_linux_get_debug_reg_capacity.
4064
554717a3
YQ
40652015-07-17 Yao Qi <yao.qi@linaro.org>
4066
4067 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4068 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4069 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4070 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4071 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4072 (AARCH64_HWP_ALIGNMENT): Likewise.
4073 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4074 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4075 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4076 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4077 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4078 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4079 (struct aarch64_debug_reg_state): Likewise.
4080 (struct arch_lwp_info): Likewise.
4081 (aarch64_align_watchpoint): Likewise.
4082 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4083 (aarch64_watchpoint_length): Likewise.
4084 (aarch64_point_encode_ctrl_reg): Likewise
4085 (aarch64_point_is_aligned): Likewise.
4086 (aarch64_align_watchpoint): Likewise.
4087 (aarch64_linux_set_debug_regs):
4088 (aarch64_dr_state_insert_one_point): Likewise.
4089 (aarch64_dr_state_remove_one_point): Likewise.
4090 (aarch64_handle_breakpoint): Likewise.
4091 (aarch64_handle_aligned_watchpoint): Likewise.
4092 (aarch64_handle_unaligned_watchpoint): Likewise.
4093 (aarch64_handle_watchpoint): Likewise.
4094
c67ca4de
YQ
40952015-07-17 Yao Qi <yao.qi@linaro.org>
4096
4097 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4098 and don't aarch64_get_debug_reg_state. All callers update.
4099 (aarch64_handle_aligned_watchpoint): Likewise.
4100 (aarch64_handle_unaligned_watchpoint): Likewise.
4101 (aarch64_handle_watchpoint): Likewise.
4102 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4103 (aarch64_remove_point): Likewise.
4104
25abf979
YQ
41052015-07-17 Yao Qi <yao.qi@linaro.org>
4106
4107 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4108 debug_printf.
4109 (aarch64_handle_unaligned_watchpoint): Likewise.
4110
db1ff28b
JK
41112015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4112
4113 Revert the previous 3 commits:
4114 Move gdb_regex* to common/
4115 Move linux_find_memory_regions_full & co.
4116 gdbserver build-id attribute generator
4117
700ca40f
JK
41182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4119 Jan Kratochvil <jan.kratochvil@redhat.com>
4120
4121 gdbserver build-id attribute generator.
4122 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4123 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4124 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4125 (find_phdr): New.
4126 (get_dynamic): Use find_pdhr to traverse program headers.
4127 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4128 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4129 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4130 (get_hex_build_id): New.
4131 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4132 to reply XML document.
4133
9904185c
JK
41342015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4135 Jan Kratochvil <jan.kratochvil@redhat.com>
4136
4137 * target.c: Include target/target-utils.h and fcntl.h.
4138 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4139 (target_fileio_read_stralloc): New functions.
4140
6e5b4429
JK
41412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4142
4143 * Makefile.in (OBS): Add gdb_regex.o.
4144 (gdb_regex.o): New.
4145 * config.in: Rebuilt.
4146 * configure: Rebuilt.
4147
ddc98fbf
JK
41482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4149 Jan Kratochvil <jan.kratochvil@redhat.com>
4150
4151 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4152 * Makefile.in (OBS): Add target-utils.o.
4153 (linux-maps.o, target-utils.o): New.
4154 * configure.srv (srv_linux_obj): Add linux-maps.o.
4155
e57bb7a0
PL
41562015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4157
4158 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4159 function, return 1.
4160 (the_low_target): Install it.
4161
586b02a9
PA
41622015-07-14 Pedro Alves <palves@redhat.com>
4163
4164 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4165 Instead, ignore ECHILD, and throw an error for other errnos.
4166
58c1b36c
PA
41672015-07-10 Pedro Alves <palves@redhat.com>
4168
4169 * event-loop.c (struct callback_event) <data>: Change type to
4170 gdb_client_data instance instead of gdb_client_data pointer.
4171 (append_callback_event): Adjust.
4172
421530db
PL
41732015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4174
4175 * linux-aarch64-low.c: Add comments for each linux_target_ops
4176 method. Remove comments already covered in target_ops and
4177 linux_target_ops definitions.
4178 (the_low_target): Add comments for each unimplemented method.
4179
c2d65f38
YQ
41802015-07-09 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-aarch64-low.c (aarch64_regmap): Remove.
4183 (aarch64_usrregs_info): Remove.
4184 (regs_info): Set field usrregs to NULL.
4185
b20a6524
MM
41862015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4187
4188 * linux-low.c: Include "rsp-low.h"
4189 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4190 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4191 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4192 (handle_btrace_enable_pt): New.
4193 (handle_btrace_general_set): Support "pt".
4194 (handle_btrace_conf_general_set): Support "pt:size".
4195
96c97461
PL
41962015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4197
4198 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4199 Z_PACKET_SW_BP.
4200
37d66942
PL
42012015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4202
4203 * linux-aarch64-low.c: Remove comment about endianness.
4204 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4205 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4206 memcmp.
4207
dc06243f
GB
42082015-06-24 Gary Benson <gbenson@redhat.com>
4209
4210 * linux-i386-ipa.c (stdint.h): Do not include.
4211 * lynx-i386-low.c (stdint.h): Likewise.
4212 * lynx-ppc-low.c (stdint.h): Likewise.
4213 * mem-break.c (stdint.h): Likewise.
4214 * thread-db.c (stdint.h): Likewise.
4215 * tracepoint.c (stdint.h): Likewise.
4216 * win32-low.c (stdint.h): Likewise.
4217
124e13d9
SM
42182015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4219
4220 * server.c (write_qxfer_response): Update call to
4221 remote_escape_output.
4222
909c2cda
JK
42232015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4224 Jan Kratochvil <jan.kratochvil@redhat.com>
4225
4226 Merge multiple hex conversions.
4227 * gdbreplay.c (tohex): Rename to 'fromhex'.
4228 (logchar): Use fromhex.
4229
24c05f46
JK
42302015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4231
4232 * server.c (handle_qxfer_libraries): Set `version' attribute for
4233 <library-list>.
4234
14d2069a
GB
42352015-06-10 Gary Benson <gbenson@redhat.com>
4236
4237 * target.h (struct target_ops) <multifs_open>: New field.
4238 <multifs_unlink>: Likewise.
4239 <multifs_readlink>: Likewise.
4240 * linux-low.c (nat/linux-namespaces.h): New include.
4241 (linux_target_ops): Initialize the_target->multifs_open,
4242 the_target->multifs_unlink and the_target->multifs_readlink.
4243 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4244 * hostio.c (hostio_fs_pid): New static variable.
4245 (hostio_handle_new_gdb_connection): New function.
4246 (handle_setfs): Likewise.
4247 (handle_open): Use the_target->multifs_open as appropriate.
4248 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4249 (handle_readlink): Use the_target->multifs_readlink as
4250 appropriate.
4251 (handle_vFile): Handle vFile:setfs packets.
4252 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4253 after target_handle_new_gdb_connection.
4254
4b8b5e72
GB
42552015-06-10 Gary Benson <gbenson@redhat.com>
4256
4257 * configure.ac (AC_CHECK_FUNCS): Add setns.
4258 * config.in: Regenerate.
4259 * configure: Likewise.
4260 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4261 (linux-namespaces.o): New rule.
4262 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4263
3ac2e371
GB
42642015-06-09 Gary Benson <gbenson@redhat.com>
4265
4266 * hostio.c (handle_open): Process mode argument with
4267 fileio_to_host_mode.
4268
ca9b78ce
YQ
42692015-06-01 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4272 * linux-x86-low.c: Likewise.
4273
bfacd19d
DB
42742015-05-28 Don Breazeal <donb@codesourcery.com>
4275
4276 * linux-low.c (handle_extended_wait): Initialize
4277 thread_info.last_resume_kind for new fork children.
4278
452003ef
PA
42792015-05-15 Pedro Alves <palves@redhat.com>
4280
4281 * target.h (target_handle_new_gdb_connection): Rewrite using if
4282 wrapped in do/while.
4283
1041a03c
JB
42842015-05-14 Joel Brobecker <brobecker@adacore.com>
4285
4286 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4287 * configure, config.in: Regenerate.
4288 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4289 Declare typedef.
4290
c269dbdb
DB
42912015-05-12 Don Breazeal <donb@codesourcery.com>
4292
4293 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4294 PTRACE_EVENT_VFORK_DONE.
4295 (linux_low_ptrace_options, extended_event_reported): Add vfork
4296 events.
4297 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4298 and "vforkdone" for RSP 'T' Stop Reply Packet.
4299 * server.h (report_vfork_events): Declare
4300 global variable.
4301
3a8a0396
DB
43022015-05-12 Don Breazeal <donb@codesourcery.com>
4303
4304 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4305 (the_low_target) <new_fork>: Initialize new member.
4306 * linux-arm-low.c (arm_new_fork): New function.
4307 (the_low_target) <new_fork>: Initialize new member.
4308 * linux-low.c (handle_extended_wait): Call new target function
4309 new_fork.
4310 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4311 * linux-mips-low.c (mips_add_watchpoint): New function
4312 extracted from mips_insert_point.
4313 (the_low_target) <new_fork>: Initialize new member.
4314 (mips_linux_new_fork): New function.
4315 (mips_insert_point): Call mips_add_watchpoint.
4316 * linux-x86-low.c (x86_linux_new_fork): New function.
4317 (the_low_target) <new_fork>: Initialize new member.
4318
de0d863e
DB
43192015-05-12 Don Breazeal <donb@codesourcery.com>
4320
4321 * linux-low.c (handle_extended_wait): Implement return value,
4322 rename argument 'event_child' to 'event_lwp', handle
4323 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4324 (linux_low_ptrace_options): New function.
4325 (linux_low_filter_event): Call linux_low_ptrace_options,
4326 use different argument fo linux_enable_event_reporting,
4327 use return value from handle_extended_wait.
4328 (extended_event_reported): New function.
4329 (linux_wait_1): Call extended_event_reported and set
4330 status to report fork events.
4331 (linux_write_memory): Add pid to debug message.
4332 (reset_lwp_ptrace_options_callback): New function.
4333 (linux_handle_new_gdb_connection): New function.
4334 (linux_target_ops): Initialize new structure member.
4335 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4336 * lynx-low.c: Initialize new structure member.
4337 * remote-utils.c (prepare_resume_reply): Implement stop reason
4338 "fork" for "T" stop message.
4339 * server.c (handle_query): Call handle_new_gdb_connection.
4340 * server.h (report_fork_events): Declare global flag.
4341 * target.h (struct target_ops) <handle_new_gdb_connection>:
4342 New member.
4343 (target_handle_new_gdb_connection): New macro.
4344 * win32-low.c: Initialize new structure member.
4345
ddcbc397
DB
43462015-05-12 Don Breazeal <donb@codesourcery.com>
4347
4348 * mem-break.c (APPEND_TO_LIST): Define macro.
4349 (clone_agent_expr): New function.
4350 (clone_one_breakpoint): New function.
4351 (clone_all_breakpoints): New function.
4352 * mem-break.h: Declare new functions.
4353
89245bc0
DB
43542015-05-12 Don Breazeal <donb@codesourcery.com>
4355
4356 * linux-low.c (linux_supports_fork_events): New function.
4357 (linux_supports_vfork_events): New function.
4358 (linux_target_ops): Initialize new structure members.
4359 (initialize_low): Call linux_check_ptrace_features.
4360 * lynx-low.c (lynx_target_ops): Initialize new structure
4361 members.
4362 * server.c (report_fork_events, report_vfork_events):
4363 New global flags.
4364 (handle_query): Add new features to qSupported packet and
4365 response.
4366 (captured_main): Initialize new global variables.
4367 * target.h (struct target_ops) <supports_fork_events>:
4368 New member.
4369 <supports_vfork_events>: New member.
4370 (target_supports_fork_events): New macro.
4371 (target_supports_vfork_events): New macro.
4372 * win32-low.c (win32_target_ops): Initialize new structure
4373 members.
4374
835205d0
GB
43752015-05-12 Gary Benson <gbenson@redhat.com>
4376
4377 * server.c (handle_qxfer_exec_file): Use current process
4378 if annex is empty.
4379
21e94bd9
SL
43802015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4381
4382 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4383 Remove HAVE_PTRACE_GETREGS conditionals.
4384 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4385 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4386
45614f15
YQ
43872015-05-08 Yao Qi <yao.qi@linaro.org>
4388
4389 * linux-low.c (linux_supports_conditional_breakpoints): New
4390 function.
4391 (linux_target_ops): Install new target method.
4392 * lynx-low.c (lynx_target_ops): Install NULL hook for
4393 supports_conditional_breakpoints.
4394 * nto-low.c (nto_target_ops): Likewise.
4395 * spu-low.c (spu_target_ops): Likewise.
4396 * win32-low.c (win32_target_ops): Likewise.
4397 * server.c (handle_query): Check
4398 target_supports_conditional_breakpoints.
4399 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4400 New field.
4401 (target_supports_conditional_breakpoints): New macro.
4402
80ad801e
PA
44032015-05-06 Pedro Alves <palves@redhat.com>
4404
4405 PR server/18081
4406 * server.c (start_inferior): If the process exits, mourn it.
4407
819843c7
GB
44082015-04-21 Gary Benson <gbenson@redhat.com>
4409
4410 * hostio.c (fileio_open_flags_to_host): Factored out to
4411 fileio_to_host_openflags in common/fileio.c. Single use
4412 updated.
4413
a2d5a9d7
MF
44142015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4415
4416 * linux-xtensa-low.c (xtensa_fill_gregset)
4417 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4418 XCHAL_HAVE_LOOP.
4419
deb44829
MF
44202015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4421
4422 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4423 (regs_info): Replace usrregs pointer with NULL.
4424
e57f1de3
GB
44252015-04-17 Gary Benson <gbenson@redhat.com>
4426
4427 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4428 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4429 * server.c (handle_qxfer_exec_file): New function.
4430 (qxfer_packets): Add exec-file entry.
4431 (handle_query): Report qXfer:exec-file:read as supported packet.
4432
62828379
RN
44332015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4434
4435 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4436
b88bb450
GB
44372015-04-09 Gary Benson <gbenson@redhat.com>
4438
4439 * hostio-errno.c (errno_to_fileio_error): Remove function.
4440 Update caller to use remote_fileio_to_fio_error.
4441
c8f4bfdd
YQ
44422015-04-09 Yao Qi <yao.qi@linaro.org>
4443
4444 * linux-low.c (linux_insert_point): Call
4445 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4446 (linux_remove_point): Call remove_memory_breakpoint if type is
4447 raw_bkpt_type_sw.
4448 * linux-x86-low.c (x86_insert_point): Don't call
4449 insert_memory_breakpoint.
4450 (x86_remove_point): Don't call remove_memory_breakpoint.
4451
41f98f02
PA
44522015-04-01 Pedro Alves <palves@redhat.com>
4453 Cleber Rosa <crosa@redhat.com>
4454
4455 * server.c (gdbserver_usage): Reorganize and extend the usage
4456 message.
4457
2bf6fb9d
PA
44582015-03-24 Pedro Alves <palves@redhat.com>
4459
4460 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4461 output. Also dump TRAP_TRACE.
4462 (linux_low_filter_event): In debug output, distinguish a
4463 resume_stop SIGSTOP from a delayed SIGSTOP.
4464
369f6daa
GB
44652015-03-24 Gary Benson <gbenson@redhat.com>
4466
4467 * linux-x86-low.c (x86_linux_new_thread): Moved to
4468 nat/x86-linux.c.
4469 (x86_linux_prepare_to_resume): Likewise.
4470
8e5d4070
GB
44712015-03-24 Gary Benson <gbenson@redhat.com>
4472
4473 * Makefile.in (x86-linux-dregs.o): New rule.
4474 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4475 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4476 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4477 (x86_linux_dr_get): Likewise.
4478 (x86_linux_dr_set): Likewise.
4479 (update_debug_registers_callback): Likewise.
4480 (x86_linux_dr_set_addr): Likewise.
4481 (x86_linux_dr_get_addr): Likewise.
4482 (x86_linux_dr_set_control): Likewise.
4483 (x86_linux_dr_get_control): Likewise.
4484 (x86_linux_dr_get_status): Likewise.
4485 (x86_linux_update_debug_registers): Likewise.
4486
2b95d440
GB
44872015-03-24 Gary Benson <gbenson@redhat.com>
4488
4489 * linux-x86-low.c (x86_linux_update_debug_registers):
4490 New function, factored out from...
4491 (x86_linux_prepare_to_resume): ...this.
4492
14b0bc68
GB
44932015-03-24 Gary Benson <gbenson@redhat.com>
4494
4495 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4496 (x86_linux_dr_set): Likewise.
4497 (update_debug_registers_callback): Likewise.
4498 (x86_linux_dr_set_addr): Likewise.
4499 (x86_linux_dr_get_addr): Likewise.
4500 (x86_linux_dr_set_control): Likewise.
4501 (x86_linux_dr_get_control): Likewise.
4502 (x86_linux_dr_get_status): Likewise.
4503 (x86_linux_prepare_to_resume): Likewise.
4504
5dfe6ca8
GB
45052015-03-24 Gary Benson <gbenson@redhat.com>
4506
4507 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4508 Use perror_with_name. Pass string through gettext.
4509 (x86_linux_dr_set): Likewise.
4510
d33472ad
GB
45112015-03-24 Gary Benson <gbenson@redhat.com>
4512
4513 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4514 (x86_linux_dr_set_addr): ...this.
4515 (x86_dr_low_get_addr): Rename to...
4516 (x86_linux_dr_get_addr): ...this.
4517 (x86_dr_low_set_control): Rename to...
4518 (x86_linux_dr_set_control): ...this.
4519 (x86_dr_low_get_control): Rename to...
4520 (x86_linux_dr_get_control): ...this.
4521 (x86_dr_low_get_status): Rename to...
4522 (x86_linux_dr_get_status): ...this.
4523 (x86_dr_low): Update with new function names.
4524
4b134ca1
GB
45252015-03-24 Gary Benson <gbenson@redhat.com>
4526
4527 * Makefile.in (x86-linux.o): New rule.
4528 * configure.srv: Add x86-linux.o to relevant targets.
4529 * linux-low.c (lwp_set_arch_private_info): New function.
4530 (lwp_arch_private_info): Likewise.
4531 * linux-x86-low.c: Include nat/x86-linux.h.
4532 (arch_lwp_info): Removed structure.
4533 (update_debug_registers_callback):
4534 Use lwp_set_debug_registers_changed.
4535 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4536 and lwp_set_debug_registers_changed.
4537 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4538
34c703da
GB
45392015-03-24 Gary Benson <gbenson@redhat.com>
4540
4541 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4542 * linux-arm-low.c (arm_new_thread): Likewise.
4543 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4544 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4545 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4546 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4547
cff068da
GB
45482015-03-24 Gary Benson <gbenson@redhat.com>
4549
4550 * linux-low.c (ptid_of_lwp): New function.
4551 (lwp_is_stopped): Likewise.
4552 (lwp_stop_reason): Likewise.
4553 * linux-x86-low.c (update_debug_registers_callback):
4554 Use lwp_is_stopped.
4555 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4556 lwp_stop_reason.
4557
b2f7c7e8
GB
45582015-03-24 Gary Benson <gbenson@redhat.com>
4559
4560 * linux-low.h (linux_stop_lwp): Remove declaration.
4561
6d4ee8c6
GB
45622015-03-24 Gary Benson <gbenson@redhat.com>
4563
4564 * linux-low.h: Include nat/linux-nat.h.
4565 * linux-low.c (iterate_over_lwps_args): New structure.
4566 (iterate_over_lwps_filter): New function.
4567 (iterate_over_lwps): Likewise.
4568 * linux-x86-low.c (update_debug_registers_callback):
4569 Update signature to what iterate_over_lwps expects.
4570 Remove PID check that iterate_over_lwps now performs.
4571 (x86_dr_low_set_addr): Use iterate_over_lwps.
4572 (x86_dr_low_set_control): Likewise.
4573
70a0bb6b
GB
45742015-03-24 Gary Benson <gbenson@redhat.com>
4575
4576 * linux-x86-low.c (x86_debug_reg_state): New function.
4577 (x86_linux_prepare_to_resume): Use the above.
4578
7b669087
GB
45792015-03-24 Gary Benson <gbenson@redhat.com>
4580
4581 * linux-low.c (current_lwp_ptid): New function.
4582 * linux-x86-low.c: Include nat/linux-nat.h.
4583 (x86_dr_low_get_addr): Use current_lwp_ptid.
4584 (x86_dr_low_get_control): Likewise.
4585 (x86_dr_low_get_status): Likewise.
4586
eef49a3d
PA
45872015-03-20 Pedro Alves <palves@redhat.com>
4588
4589 * tracepoint.c (cmd_qtstatus): Make "str" const.
4590
b2333d22
PA
45912015-03-20 Pedro Alves <palves@redhat.com>
4592
4593 * server.c (handle_general_set): Make "req_str" const.
4594
23f238d3
PA
45952015-03-19 Pedro Alves <palves@redhat.com>
4596
4597 * linux-low.c (linux_resume_one_lwp): Rename to ...
4598 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4599 instead call perror_with_name.
4600 (check_ptrace_stopped_lwp_gone): New function.
4601 (linux_resume_one_lwp): Reimplement as wrapper around
4602 linux_resume_one_lwp_throw that swallows errors if the LWP is
4603 gone.
4604
91baf43f
PA
46052015-03-19 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (count_events_callback, select_event_lwp_callback):
4608 No longer check whether the thread has resume_stop as last resume
4609 kind.
4610
8bf3b159
PA
46112015-03-19 Pedro Alves <palves@redhat.com>
4612
4613 * linux-low.c (count_events_callback, select_event_lwp_callback):
4614 Use the lwp's status_pending_p field, not the thread's.
4615
b90fc188
PA
46162015-03-19 Pedro Alves <palves@redhat.com>
4617
4618 * linux-low.c (select_event_lwp_callback): Update comments to
4619 no longer mention SIGTRAP.
4620
464b0089
GB
46212015-03-18 Gary Benson <gbenson@redhat.com>
4622
4623 * server.c (handle_query): Do not report vFile:fstat as supported.
4624
aa9e327f
GB
46252015-03-11 Gary Benson <gbenson@redhat.com>
4626
4627 * hostio.c (sys/types.h): New include.
4628 (sys/stat.h): Likewise.
4629 (common-remote-fileio.h): Likewise.
4630 (handle_fstat): New function.
4631 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4632
791c0056
GB
46332015-03-11 Gary Benson <gbenson@redhat.com>
4634
4635 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4636 struct stat.st_blocks and struct stat.st_blksize.
4637 * configure: Regenerate.
4638 * config.in: Likewise.
4639 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4640 (OBS): Add common-remote-fileio.o.
4641 (common-remote-fileio.o): New rule.
4642
9a9df970
PA
46432015-03-09 Pedro Alves <palves@redhat.com>
4644
4645 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4646 'struct sockaddr' pointer in 'accept' call.
4647
9eb1356e
PA
46482015-03-09 Pedro Alves <palves@redhat.com>
4649
4650 Revert:
4651 2015-03-07 Pedro Alves <palves@redhat.com>
4652 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4653 or <winsock2.h> here. Instead include "gdb_socket.h".
4654 (remote_open): Use union gdb_sockaddr_u.
4655 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4656 or <winsock2.h> here. Instead include "gdb_socket.h".
4657 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4658 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4659 or <sys/un.h>.
4660 (init_named_socket, gdb_agent_helper_thread): Use union
4661 gdb_sockaddr_u.
4662
aac331e4
PA
46632015-03-07 Pedro Alves <palves@redhat.com>
4664
4665 * configure.ac (build_warnings): Move
4666 -Wdeclaration-after-statement to the C-specific set.
4667 * configure: Regenerate.
4668
366c75fc
PA
46692015-03-07 Pedro Alves <palves@redhat.com>
4670
4671 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4672 or <winsock2.h> here. Instead include "gdb_socket.h".
4673 (remote_open): Use union gdb_sockaddr_u.
4674 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4675 or <winsock2.h> here. Instead include "gdb_socket.h".
4676 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4677 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4678 or <sys/un.h>.
4679 (init_named_socket, gdb_agent_helper_thread): Use union
4680 gdb_sockaddr_u.
4681
492d29ea
PA
46822015-03-07 Pedro Alves <palves@redhat.com>
4683
4684 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4685 instead.
4686
60a191ed
YQ
46872015-03-06 Yao Qi <yao.qi@linaro.org>
4688
4689 * linux-aarch64-low.c (aarch64_insert_point): Use
4690 show_debug_regs as a boolean.
4691 (aarch64_remove_point): Likewise.
4692
f5771b1d
PA
46932015-03-05 Pedro Alves <palves@redhat.com>
4694
4695 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4696 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4697 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4698 * nto-low.c (nto_target_ops): Likewise.
4699 * spu-low.c (spu_target_ops): Likewise.
4700 * win32-low.c (win32_target_ops): Likewise.
4701
3e572f71
PA
47022015-03-04 Pedro Alves <palves@redhat.com>
4703
72f4393d 4704 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4705 Decide whether a breakpoint triggered based on the SIGTRAP's
4706 siginfo.si_code.
72f4393d
L
4707 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4708 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4709 (linux_low_filter_event): Check for breakpoints before checking
4710 watchpoints.
4711 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4712 siginfo.si_code.
72f4393d
L
4713 (linux_stopped_by_sw_breakpoint)
4714 (linux_supports_stopped_by_sw_breakpoint)
4715 (linux_stopped_by_hw_breakpoint)
4716 (linux_supports_stopped_by_hw_breakpoint): New functions.
4717 (linux_target_ops): Install new target methods.
3e572f71 4718
1ec68e26
PA
47192015-03-04 Pedro Alves <palves@redhat.com>
4720
4721 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4722 * server.c (swbreak_feature, hwbreak_feature): New globals.
4723 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4724 (captured_main): Clear swbreak_feature and hwbreak_feature.
4725 * server.h (swbreak_feature, hwbreak_feature): Declare.
4726 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4727 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4728 supports_stopped_by_hw_breakpoint>: New fields.
4729 (target_supports_stopped_by_sw_breakpoint)
4730 (target_stopped_by_sw_breakpoint)
4731 (target_supports_stopped_by_hw_breakpoint)
4732 (target_stopped_by_hw_breakpoint): Declare.
4733
15c66dd6
PA
47342015-03-04 Pedro Alves <palves@redhat.com>
4735
4736 enum lwp_stop_reason -> enum target_stop_reason
4737 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4738 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4739 (linux_wait_1, stuck_in_jump_pad_callback)
4740 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4741 (linux_stopped_by_watchpoint):
4742 * linux-low.h (enum lwp_stop_reason): Delete.
4743 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4744 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4745
98fc70d6
YQ
47462015-03-04 Yao Qi <yao.qi@linaro.org>
4747
4748 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4749
dd2ac174
GB
47502015-03-03 Gary Benson <gbenson@redhat.com>
4751
4752 * hostio.c (handle_vFile): Fix prefix lengths.
4753
d68e53f4
MM
47542015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4755
4756 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4757 ptr_bits.
4758
bf2d68ab
AA
47592015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4760
4761 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4762 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4763 (clean): Add "rm -f" for above C files.
4764 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4765 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4766 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4767 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4768 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4769 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4770 (init_registers_s390x_vx_linux64)
4771 (init_registers_s390x_tevx_linux64)
4772 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4773 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4774 declarations.
4775 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4776 (s390_store_vxrs_high): New functions.
4777 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4778 NT_S390_VXRS_HIGH.
4779 (s390_arch_setup): Add logic for selecting one of the new target
4780 descriptions. Activate the new vector regsets if applicable.
4781 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4782 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4783 and init_registers_s390x_tevx_linux64.
4784
c966a859
PA
47852015-03-01 Pedro Alves <palves@redhat.com>
4786
4787 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4788 parameter.
4789
4180215b
PA
47902015-02-27 Pedro Alves <palves@redhat.com>
4791
4792 * linux-x86-low.c (u_debugreg_offset): New function.
4793 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4794
749bab01
PA
47952015-02-27 Pedro Alves <palves@redhat.com>
4796
4797 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4798 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4799 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4800 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4801 (ps_lsetfpregs, ps_getpid)
4802 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4803 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4804 (ps_lsetxregs, ps_plog): Declare.
4805
3c14e5a3
PA
48062015-02-27 Pedro Alves <palves@redhat.com>
4807
4808 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4809 IP_AGENT_EXPORT_FUNC.
4810 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4811 IP_AGENT_EXPORT_FUNC.
4812 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4813 (IP_AGENT_EXPORT): Delete.
4814 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4815 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4816 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4817 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4818 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4819 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4820 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4821 (traceframe_read_count, traceframe_write_count)
4822 (traceframes_created, trace_state_variables, get_raw_reg)
4823 (get_trace_state_variable_value, set_trace_state_variable_value)
4824 (ust_loaded, helper_thread_id, cmd_buf): Use
4825 IPA_SYM_EXPORTED_NAME.
4826 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4827 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4828 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4829 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4830 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4831 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4832 EXTERN_C_PUSH/EXTERN_C_POP.
4833 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4834 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4835 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4836 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4837 (traceframe_write_count, traceframe_read_count)
4838 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4839 (about_to_request_buffer_space, get_trace_state_variable_value)
4840 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4841 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4842 EXTERN_C_PUSH/EXTERN_C_POP.
4843 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4844 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4845 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4846 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4847 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4848 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4849 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4850 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4851 Define.
4852 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4853 (IP_AGENT_EXPORT_VAR_DECL): Define.
4854 (tracing): Declare.
4855 (gdb_agent_get_raw_reg): Declare.
4856
fe978cb0
PA
48572015-02-27 Tom Tromey <tromey@redhat.com>
4858 Pedro Alves <palves@redhat.com>
4859
4860 Rename symbols whose names are reserved C++ keywords throughout.
4861
3bc3d82a
PA
48622015-02-27 Pedro Alves <palves@redhat.com>
4863
4864 * Makefile.in (COMPILER): New, get it from autoconf.
4865 (CXX): Get from autoconf instead.
4866 (COMPILE.pre): Use COMPILER.
4867 (CC-LD): Rename to ...
4868 (CC_LD): ... this. Use COMPILER.
4869 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4870 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4871 * acinclude.m4: Include build-with-cxx.m4.
4872 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4873 Disable -Werror by default if building in C++ mode.
4874 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4875 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4876 the C++ compiler. Save/restore CXXFLAGS too.
4877 * configure: Regenerate.
4878
07697489
PA
48792015-02-27 Pedro Alves <palves@redhat.com>
4880
4881 * acinclude.m4: Include libiberty.m4.
4882 * configure.ac: Call libiberty_INIT.
4883 * config.in, configure: Regenerate.
4884
9beb7c4e
PA
48852015-02-26 Pedro Alves <palves@redhat.com>
4886
4887 * linux-low.c (linux_wait_1): When incrementing the PC past a
4888 program breakpoint always use the_low_target.breakpoint_len as
4889 increment, rather than the maximum between that and
4890 the_low_target.decr_pc_after_break.
4891
8090aef2
PA
48922015-02-23 Pedro Alves <palves@redhat.com>
4893
4894 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4895 thread was doing a step-over; always adjust the PC if
4896 we stepped over a permanent breakpoint.
4897 (linux_wait_1): If we stepped over breakpoint that was on top of a
4898 permanent breakpoint, manually advance the PC past it.
4899
bc9540e8
PA
49002015-02-23 Pedro Alves <palves@redhat.com>
4901
4902 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4903 modes.
4904 (x86_fill_gregset, x86_store_gregset): Use it when handling
4905 $orig_eax.
4906
2db9a427
PA
49072015-02-20 Pedro Alves <palves@redhat.com>
4908
4909 * thread-db.c: Include "nat/linux-procfs.h".
4910 (thread_db_init): Skip listing new threads if the kernel supports
4911 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4912
afa8d396
PA
49132015-02-20 Pedro Alves <palves@redhat.com>
4914
4915 * linux-low.c (status_pending_p_callback): Use ptid_match.
4916
c9587f88
AT
49172015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4918
4919 PR breakpoints/16812
4920 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4921 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4922 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4923
b05ec7a5
AT
49242015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4925
4926 PR breakpoints/15956
4927 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4928
d33501a5
MM
49292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4930
4931 * linux-low.c (linux_low_btrace_conf): Print size.
4932 * server.c (handle_btrace_conf_general_set): New.
4933 (hanle_general_set): Call handle_btrace_conf_general_set.
4934 (handle_query): Report Qbtrace-conf:bts:size as supported.
4935
f4abbc16
MM
49362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4937
4938 * linux-low.c (linux_low_enable_btrace): Update parameters.
4939 (linux_low_btrace_conf): New.
4940 (linux_target_ops)<to_btrace_conf>: Initialize.
4941 * server.c (current_btrace_conf): New.
4942 (handle_btrace_enable): Rename to ...
4943 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4944 to target_enable_btrace. Update comment. Update users.
4945 (handle_qxfer_btrace_conf): New.
4946 (qxfer_packets): Add btrace-conf entry.
4947 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4948 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4949 (target_ops)<read_btrace_conf>: New.
4950 (target_enable_btrace): Update parameters.
4951 (target_read_btrace_conf): New.
4952
043c3577
MM
49532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4954
4955 * server.c (handle_btrace_general_set): Remove call to
4956 target_supports_btrace.
4957 (supported_btrace_packets): New.
4958 (handle_query): Call supported_btrace_packets.
4959 * target.h: include btrace-common.h.
4960 (btrace_target_info): Removed.
4961 (supports_btrace, target_supports_btrace): Update parameters.
4962
734b0e4b
MM
49632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4964
4965 * Makefile.in (SFILES): Add common/btrace-common.c.
4966 (OBS): Add common/btrace-common.o.
4967 (btrace-common.o): Add build rules.
4968 * linux-low: Include btrace-common.h.
4969 (linux_low_read_btrace): Use struct btrace_data. Call
4970 btrace_data_init and btrace_data_fini.
4971
d6c146e9
PA
49722015-02-06 Pedro Alves <palves@redhat.com>
4973
4974 * thread-db.c (find_new_threads_callback): Add debug output.
4975
20ba1ce6
PA
49762015-02-04 Pedro Alves <palves@redhat.com>
4977
4978 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4979 (resume_stopped_resumed_lwps): New function.
4980 (linux_wait_for_event_filtered): Use it.
4981
8cc73a39
SDJ
49822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4983
4984 * Makefile.in (SFILES): Add linux-personality.c.
4985 (linux-personality.o): New rule.
4986 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4987 list of objects to be built.
4988 * linux-low.c: Include nat/linux-personality.h.
4989 (linux_create_inferior): Remove code to disable address space
4990 randomization (moved to ../nat/linux-personality.c). Create
4991 cleanup to disable address space randomization.
4992
fb23d554
SDJ
49932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4994
4995 * Makefile.in (posix-strerror.o): New rule.
4996 (mingw-strerror.o): Likewise.
4997 * configure: Regenerated.
4998 * configure.ac: Source file ../common/common.host. Initialize new
4999 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5000
cdf43629
YQ
50012015-01-14 Yao Qi <yao@codesourcery.com>
5002
5003 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5004 (ppc-linux.o): New rule.
5005 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5006 * configure.ac: AC_CHECK_FUNCS(getauxval).
5007 * config.in: Re-generated.
5008 * configure: Re-generated.
5009 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5010 ppc64_64bit_inferior_p
5011
514c5338
YQ
50122015-01-14 Yao Qi <yao@codesourcery.com>
5013
5014 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5015 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5016 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5017 (PT_ORIG_R3, PT_TRAP): Likewise.
5018 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5019 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5020 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5021
3368c1e5
JB
50222015-01-10 Joel Brobecker <brobecker@adacore.com>
5023
5024 * i387-fp.c (i387_cache_to_xsave): In look over
5025 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5026 zmmh_low_space field by use of zmmh_high_space.
5027
582511be
PA
50282015-01-09 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.c (step_over_bkpt): Move higher up in the file.
5031 (handle_extended_wait): Don't store the stop_pc here.
5032 (get_stop_pc): Adjust comments and rename to ...
5033 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5034 stopped for a software breakpoint or hardware breakpoint.
5035 (thread_still_has_status_pending_p): New function.
5036 (status_pending_p_callback): Use
5037 thread_still_has_status_pending_p. If the event is no longer
5038 interesting, resume the LWP.
5039 (handle_tracepoints): Add assert.
5040 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5041 (wstatus_maybe_breakpoint): New function.
5042 (cancel_breakpoint): Delete function.
5043 (check_stopped_by_watchpoint): New function, factored out from
5044 linux_low_filter_event.
5045 (lp_status_maybe_breakpoint): Delete function.
5046 (linux_low_filter_event): Remove filter_ptid argument.
5047 Leave thread group exits pending here. Store the LWP's stop PC.
5048 Always leave events pending.
5049 (linux_wait_for_event_filtered): Pull all events out of the
5050 kernel, and leave them all pending.
5051 (count_events_callback, select_event_lwp_callback): Consider all
5052 events.
5053 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5054 (select_event_lwp): Only give preference to the stepping LWP in
5055 all-stop mode. Adjust comments.
5056 (ignore_event): New function.
5057 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5058 references to cancel_breakpoints. Adjust to renames. Also give
5059 equal priority to all LWPs that have had events in non-stop mode.
5060 If reporting a software breakpoint event, unadjust the LWP's PC.
5061 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5062 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5063 Adjust.
5064 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5065 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5066 (linux_stopped_by_watchpoint): Adjust.
5067 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5068 * linux-low.h (enum lwp_stop_reason): New.
5069 (struct lwp_info) <stop_pc>: Adjust comment.
5070 <stopped_by_watchpoint>: Delete field.
5071 <stop_reason>: New field.
5072 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5073 * mem-break.c (software_breakpoint_inserted_here)
5074 (hardware_breakpoint_inserted_here): New function.
5075 * mem-break.h (software_breakpoint_inserted_here)
5076 (hardware_breakpoint_inserted_here): Declare.
5077 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5078 (cancel_breakpoints): Delete.
5079 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5080 (upload_fast_traceframes): Remove references to
5081 cancel_breakpoints.
5082
a33e3959
PA
50832015-01-09 Pedro Alves <palves@redhat.com>
5084
5085 * thread-db.c (find_new_threads_callback): Ignore thread if the
5086 kernel thread ID is -1.
5087
8784d563
PA
50882015-01-09 Pedro Alves <palves@redhat.com>
5089
5090 * linux-low.c (linux_attach_fail_reason_string): Move to
5091 nat/linux-ptrace.c, and rename.
5092 (linux_attach_lwp): Update comment.
5093 (attach_proc_task_lwp_callback): New function.
5094 (linux_attach): Adjust to rename and use
5095 linux_proc_attach_tgid_threads.
5096 (linux_attach_fail_reason_string): Delete declaration.
5097
76f2b779
JB
50982015-01-01 Joel Brobecker <brobecker@adacore.com>
5099
5100 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5101 * server.c (gdbserver_version): Likewise.
5102
fafcc06a
SDJ
51032014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5104
5105 * remote-utils.c: Include ctype.h.
5106 (input_interrupt): Explicitly handle the case when the char
5107 received is the NUL byte. Improve the printing of non-ASCII
5108 characters.
5109
beed38b8
JB
51102014-12-16 Joel Brobecker <brobecker@adacore.com>
5111
5112 * linux-low.c (linux_low_filter_event): Update call to
5113 linux_enable_event_reporting following the addition of
5114 a new parameter to that function.
5115
bf330350
CU
51162014-12-16 Catalin Udma <catalin.udma@freescale.com>
5117
5118 PR server/17457
5119 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5120 (AARCH64_FPCR_REGNO): Likewise.
5121 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5122 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5123 (aarch64_store_fpregset): Likewise.
5124
5227d625
JB
51252014-12-15 Joel Brobecker <brobecker@adacore.com>
5126
5127 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5128 Remove FIXME comment about assumption about N.
5129
f93b65a0
JB
51302014-12-13 Joel Brobecker <brobecker@adacore.com>
5131
5132 * configure.ac: If large-file support is disabled in GDBserver,
5133 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5134 * configure: Regenerate.
5135
e5a9158d
AA
51362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5137
5138 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5139 warning upon ENODATA from ptrace.
5140 * linux-s390-low.c (s390_store_tdb): New.
5141 (s390_regsets): Add regset for NT_S390_TDB.
5142
feea5f36
AA
51432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5144
5145 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5146 without a fill_function.
5147 * linux-s390-low.c (s390_fill_last_break): Remove.
5148 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5149 (s390_arch_setup): Use regset's size instead of fill_function for
5150 loop end condition.
5151
098dbe61
AA
51522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5153
5154 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5155 the regset's store function when ptrace returned an error.
5156 * regcache.c (get_thread_regcache): Invalidate register cache
5157 before fetching inferior's registers.
5158
28eef672
AA
51592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5160
5161 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5162 while-loop as for-loop.
5163 (regsets_store_inferior_registers): Likewise.
5164
bdca27a2
YQ
51652014-11-28 Yao Qi <yao@codesourcery.com>
5166
5167 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5168 * config.in, configure: Re-generate.
5169 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5170 is defined.
5171
9c232dda
YQ
51722014-11-21 Yao Qi <yao@codesourcery.com>
5173
5174 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5175 (AC_CHECK_HEADERS): Remove malloc.h.
5176 * configure: Re-generated.
5177 * config.in: Re-generated.
5178 * server.h: Don't include alloca.h and malloc.h.
5179 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5180 Don't include malloc.h.
5181
43968415
JB
51822014-11-17 Joel Brobecker <brobecker@adacore.com>
5183
5184 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5185 corresponding ERRNO check in same block.
5186
40e91bc7
PA
51872014-11-12 Pedro Alves <palves@redhat.com>
5188
5189 * server.c (cont_thread): Update comment.
5190 (start_inferior, attach_inferior): No longer clear cont_thread.
5191 (handle_v_cont): No longer set cont_thread.
5192 (captured_main): Clear cont_thread each time a GDB connects.
5193
c2c118cf
PA
51942014-11-12 Pedro Alves <palves@redhat.com>
5195
5196 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5197 thread, and don't resume all threads if the Hc thread has exited.
5198
78708b7c
PA
51992014-11-12 Pedro Alves <palves@redhat.com>
5200
5201 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5202 the process group instead of to a specific LWP.
5203
a2abc7de
PA
52042014-10-15 Pedro Alves <palves@redhat.com>
5205
5206 PR server/17487
5207 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5208 parameter.
5209 (arm_set_thread_context): Delete.
5210 (the_low_target): Adjust.
5211 * win32-i386-low.c (debug_registers_changed)
5212 (debug_registers_used): Delete.
5213 (update_debug_registers_callback): New function.
5214 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5215 needing to update their debug registers.
5216 (win32_get_current_dr): New function.
5217 (x86_dr_low_get_addr, x86_dr_low_get_control)
5218 (x86_dr_low_get_status): Fetch the debug register from the thread
5219 record's context.
5220 (i386_initial_stuff): Adjust.
5221 (i386_get_thread_context): Remove current_event parameter. Don't
5222 clear debug_registers_changed nor copy DR values to
5223 debug_reg_state.
5224 (i386_set_thread_context): Delete.
5225 (i386_prepare_to_resume): New function.
5226 (i386_thread_added): Mark the thread as needing to update irs
5227 debug registers.
5228 (the_low_target): Remove i386_set_thread_context and install
5229 i386_prepare_to_resume.
5230 * win32-low.c (win32_get_thread_context): Adjust.
5231 (win32_set_thread_context): Use SetThreadContext
5232 directly.
5233 (win32_prepare_to_resume): New function.
5234 (win32_require_context): New function, factored out from ...
5235 (thread_rec): ... this.
5236 (continue_one_thread): Call win32_prepare_to_resume on each thread
5237 we're about to continue.
5238 (win32_resume): Call win32_prepare_to_resume on the event thread.
5239 * win32-low.h (struct win32_thread_info)
5240 <debug_registers_changed>: New field.
5241 (struct win32_target_ops): Change prototype of set_thread_context,
5242 delete set_thread_context and add prepare_to_resume.
5243 (win32_require_context): New declaration.
5244
a442d071
GB
52452014-10-08 Gary Benson <gbenson@redhat.com>
5246
5247 * server.h: Do not include common-exceptions.h.
5248
6f1947e8
GB
52492014-10-08 Gary Benson <gbenson@redhat.com>
5250
5251 * server.h: Do not include cleanups.h.
5252
63b434a4
JH
52532014-09-30 James Hogan <james.hogan@imgtec.com>
5254
5255 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5256 mips64-dsp-linux.c.
5257
c4d9ceb6
YQ
52582014-09-23 Yao Qi <yao@codesourcery.com>
5259
5260 * linux-low.c (lp_status_maybe_breakpoint): New function.
5261 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5262 (count_events_callback): Likewise.
5263 (select_event_lwp_callback): Likewise.
5264 (cancel_breakpoints_callback): Likewise.
5265
89a5711c
DB
52662014-09-19 Don Breazeal <donb@codesourcery.com>
5267
5268 * linux-low.c (handle_extended_wait): Call
5269 linux_ptrace_get_extended_event.
5270 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5271 linux_is_extended_waitstatus.
5272
bffc0964
JB
52732014-09-16 Joel Brobecker <brobecker@adacore.com>
5274
5275 * Makefile.in (CPPFLAGS): Define.
5276 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5277 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5278
0bfdf32f
GB
52792014-09-16 Gary Benson <gbenson@redhat.com>
5280
5281 * inferiors.h (current_inferior): Renamed as...
5282 (current_thread): New variable. All uses updated.
5283 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5284 (maybe_move_out_of_jump_pad): Likewise.
5285 (cancel_breakpoint): Likewise.
5286 (linux_low_filter_event): Likewise.
5287 (wait_for_sigstop): Likewise.
5288 (linux_resume_one_lwp): Likewise.
5289 (need_step_over_p): Likewise.
5290 (start_step_over): Likewise.
5291 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5292 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5293 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5294 and save_inferior as saved_thread.
5295 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5296 saved_thread.
5297 (regcache_invalidate_thread): Likewise.
5298 * remote-utils.c (prepare_resume_reply): Likewise.
5299 * thread-db.c (thread_db_get_tls_address): Likewise.
5300 (disable_thread_event_reporting): Likewise.
5301 (remove_thread_event_breakpoints): Likewise.
5302 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5303 as saved_thread.
5304 * target.h (set_desired_inferior): Renamed as...
5305 (set_desired_thread): New declaration. All uses updated.
5306 * server.c (myresume): Updated comment to reference thread instead
5307 of inferior.
5308 (handle_serial_event): Likewise.
5309 (handle_target_event): Likewise.
5310
361c8ade
GB
53112014-09-12 Tom Tromey <tromey@redhat.com>
5312 Gary Benson <gbenson@redhat.com>
5313
5314 * regcache.h: Include common-regcache.h.
5315 (regcache_read_pc): Don't declare.
5316 * regcache.c (get_thread_regcache_for_ptid): New function.
5317
bd9269f7
GB
53182014-09-11 Tom Tromey <tromey@redhat.com>
5319 Gary Benson <gbenson@redhat.com>
5320
5321 * symbol.c: New file.
5322 * Makefile.in (SFILES): Add symbol.c.
5323 (OBS): Add symbol.o.
5324
f8c1d06b
GB
53252014-09-11 Gary Benson <gbenson@redhat.com>
5326
5327 * target.c (target_stop_ptid, target_continue_ptid): New
5328 functions.
5329
721ec300
GB
53302014-09-11 Tom Tromey <tromey@redhat.com>
5331 Gary Benson <gbenson@redhat.com>
5332
5333 * target.h: Include target/target.h.
5334 * target.c (target_read_memory, target_read_uint32)
5335 (target_write_memory): New functions.
5336
c5e92cca
GB
53372014-09-11 Gary Benson <gbenson@redhat.com>
5338
5339 * server.h (debug_hw_points): Don't declare.
5340 * server.c (debug_hw_points): Don't define. Replace all uses
5341 with show_debug_regs.
5342 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5343 all uses with show_debug_regs.
5344
2e4bb98a
EBM
53452014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5346
5347 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5348 endianness into account.
5349 (ppc_supply_ptrace_register): Likewise.
5350
ac740bc7
JH
53512014-09-03 James Hogan <james.hogan@imgtec.com>
5352
5353 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5354 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5355
97ea6506
GB
53562014-09-03 Gary Benson <gbenson@redhat.com>
5357
5358 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5359 ALL_DEBUG_ADDRESS_REGISTERS.
5360
df7e5265
GB
53612014-09-02 Gary Benson <gbenson@redhat.com>
5362
5363 * i386-low.h: Renamed as...
5364 * x86-low.h: New file. All type, function and variable name
5365 prefixes changed from "i386_" to "x86_". All references updated.
5366 * i386-low.c: Renamed as...
5367 * x86-low.c: New file. All type, function and variable name
5368 prefixes changed from "i386_" to "x86_". All references updated.
5369
ed859da7
GB
53702014-09-02 Gary Benson <gbenson@redhat.com>
5371
5372 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5373 (x86_linux_new_thread): Likewise.
5374
860789c7
GB
53752014-08-29 Gary Benson <gbenson@redhat.com>
5376
5377 * server.h (setjmp.h): Do not include.
5378 (toplevel): Do not declare.
5379 (common-exceptions.h): Include.
5380 (cleanups.h): Likewise.
5381 * server.c (toplevel): Do not define.
5382 (exit_code): New static global.
5383 (detach_or_kill_for_exit_cleanup): New function.
5384 (main): New function. Original main renamed to...
5385 (captured_main): New function.
5386 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5387
ff55e1b5
GB
53882014-08-29 Gary Benson <gbenson@redhat.com>
5389
5390 * Makefile.in (SFILES): Add common/common-exceptions.c.
5391 (OBS): Add common-exceptions.o.
5392 (common-exceptions.o): New rule.
5393 * utils.c (prepare_to_throw_exception): New function.
5394
e9bcb658
GB
53952014-08-29 Gary Benson <gbenson@redhat.com>
5396
5397 * config.in: Regenerate.
5398 * configure: Likewise.
5399
e3180625
GB
54002014-08-29 Gary Benson <gbenson@redhat.com>
5401
5402 * Makefile.in (SFILES): Add common/cleanups.c.
5403 (OBS): cleanups.o.
5404 (cleanups.o): New rule.
5405
e3d6ba5d
GB
54062014-08-29 Gary Benson <gbenson@redhat.com>
5407
5408 * utils.c (internal_vwarning): New function.
5409
7096e886
GB
54102014-08-28 Gary Benson <gbenson@redhat.com>
5411
5412 * utils.h (fatal): Remove declaration.
5413 * utils.c (fatal): Remove function.
5414
14ce3192
GB
54152014-08-28 Gary Benson <gbenson@redhat.com>
5416
5417 * tracepoint.c (gdb_agent_init): Replace fatal with
5418 perror_with_name.
5419 (initialize_tracepoint): Likewise.
5420
50278d59
GB
54212014-08-28 Gary Benson <gbenson@redhat.com>
5422
5423 * remote-utils.c (remote_prepare): Replace fatal with error.
5424
aa96c426
GB
54252014-08-28 Gary Benson <gbenson@redhat.com>
5426
5427 * linux-low.c (linux_async): Replace fatal with warning.
5428 Tidy up and return.
5429 (linux_start_non_stop): Return -1 if linux_async failed.
5430
f7160e97
GB
54312014-08-28 Gary Benson <gbenson@redhat.com>
5432
5433 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5434 gdb_assert.
5435 (i386_dr_low_get_addr): Remove vague comment.
5436 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5437 gdb_assert.
5438
38e08fca
GB
54392014-08-28 Gary Benson <gbenson@redhat.com>
5440
5441 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5442 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5443 internal_error.
5444 (linux_resume_one_lwp): Likewise.
5445 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5446 gdb_assert.
5447 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5448 with internal_error.
5449 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5450 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5451 (find_register_by_name): Replace fatal with internal_error.
5452 (find_regno): Likewise.
5453 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5454 * thread-db.c (thread_db_create_event): Likewise.
5455 (thread_db_load_search): Likewise.
5456 (try_thread_db_load_1): Likewise.
5457 * tracepoint.c (get_jump_space_head): Replace fatal with
5458 internal_error.
5459 (claim_trampoline_space): Likewise.
5460 (have_fast_tracepoint_trampoline_buffer): Likewise.
5461 (cmd_qtstart): Likewise.
5462 (stop_tracing): Likewise.
5463 (fast_tracepoint_collecting): Likewise.
5464 (target_malloc): Likewise.
5465 (download_tracepoint): Likewise.
5466 (download_trace_state_variables): Replace check with gdb_assert.
5467 (upload_fast_traceframes): Replace fatal with internal_error.
5468
34abf635
GB
54692014-08-19 Tom Tromey <tromey@redhat.com>
5470 Gary Benson <gbenson@redhat.com>
5471
5472 * Makefile.in (SFILES): Add common/common-debug.c.
5473 (OBS): Add common-debug.o.
5474 (common-debug.o): New rule.
5475 * debug.h (debug_printf): Don't declare.
5476 * debug.c (debug_printf): Renamed and rewritten as...
5477 (debug_vprintf): New function.
5478
f6e94d78
GB
54792014-08-19 Gary Benson <gbenson@redhat.com>
5480
5481 * utils.h: Do not include print-utils.h.
5482
9239eeab
GB
54832014-08-19 Tom Tromey <tromey@redhat.com>
5484 Gary Benson <gbenson@redhat.com>
5485
5486 * server.h: Add static assertion.
5487 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5488
ef87c8bb
GB
54892014-08-19 Tom Tromey <tromey@redhat.com>
5490 Gary Benson <gbenson@redhat.com>
5491
5492 * Makefile.in (SFILES): Add common/errors.c.
5493 (OBS): Add errors.o.
5494 (IPA_OBS): Add errors-ipa.o.
5495 (errors.o): New rule.
5496 (errors-ipa.o): Likewise.
5497 * utils.h (perror_with_name, error, warning): Don't declare.
5498 * utils.c (warning): Renamed and rewritten as...
5499 (vwarning): New function.
5500 (error): Renamed and rewritten as...
5501 (verror): New function.
5502 (internal_error): Renamed and rewritten as...
5503 (internal_verror): New function.
5504
bb974a24
GB
55052014-08-07 Gary Benson <gbenson@redhat.com>
5506
5507 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5508 * configure: Regenerate.
5509 * config.in: Likewise.
5510 * server.h: Do not include errno.h.
5511 * event-loop.c: Likewise.
5512 * hostio-errno.c: Likewise.
5513 * linux-low.c: Likewise.
5514 * remote-utils.c: Likewise.
5515 * spu-low.c: Likewise.
5516 * utils.c: Likewise.
5517 * gdbreplay.c: Unconditionally include errno.h.
5518
6d3d12eb
GB
55192014-08-07 Gary Benson <gbenson@redhat.com>
5520
5521 * server.h: Do not include string.h.
5522 * event-loop.c: Likewise.
5523 * linux-low.c: Likewise.
5524 * regcache.c: Likewise.
5525 * remote-utils.c: Likewise.
5526 * spu-low.c: Likewise.
5527 * utils.c: Likewise.
5528
dccbb609
GB
55292014-08-07 Gary Benson <gbenson@redhat.com>
5530
5531 * server.h: Do not include gdb_assert.h.
5532
e76df0d0
GB
55332014-08-07 Gary Benson <gbenson@redhat.com>
5534
5535 * server.h: Do not include common-utils.h.
5536
4cb9c816
GB
55372014-08-07 Gary Benson <gbenson@redhat.com>
5538
5539 * server.h: Do not include ptid.h.
5540 * notif.h: Likewise.
5541
3995eeee
GB
55422014-08-07 Gary Benson <gbenson@redhat.com>
5543
5544 * server.h: Do not include gdb_locale.h.
5545
cb9f1a9b
GB
55462014-08-07 Gary Benson <gbenson@redhat.com>
5547
5548 * server.h: Do not include gdb/signals.h.
5549 * win32-low.c: Likewise.
5550
a5fceff8
GB
55512014-08-07 Gary Benson <gbenson@redhat.com>
5552
5553 * server.h: Do not include pathmax.h.
5554
b9391142
GB
55552014-08-07 Gary Benson <gbenson@redhat.com>
5556
5557 * server.h: Do not include libiberty.h.
5558 * linux-bfin-low.c: Likewise.
5559
0e443c87
GB
55602014-08-07 Gary Benson <gbenson@redhat.com>
5561
5562 * server.h: Do not include ansidecl.h.
5563
8ebb3f56
GB
55642014-08-07 Gary Benson <gbenson@redhat.com>
5565
5566 * linux-x86-low.c: Do not include stddef.h.
5567 * lynx-ppc-low.c: Likewise.
5568 * tracepoint.c: Likewise.
5569
8980bdf6
GB
55702014-08-07 Gary Benson <gbenson@redhat.com>
5571
5572 * server.h: Do not include stdarg.h.
5573 * nto-low.c: Likewise.
5574
d7096f71
GB
55752014-08-07 Gary Benson <gbenson@redhat.com>
5576
5577 * server.h: Do not include stdlib.h.
5578 * inferiors.c: Likewise.
5579 * linux-low.c: Likewise.
5580 * regcache.c: Likewise.
5581 * spu-low.c: Likewise.
5582 * tracepoint.c: Likewise.
5583 * utils.c: Likewise.
5584
d02f550d
GB
55852014-08-07 Gary Benson <gbenson@redhat.com>
5586
5587 * server.h: Do not include stdio.h.
5588 * linux-low.c: Likewise.
5589 * remote-utils.c: Likewise.
5590 * spu-low.c: Likewise.
5591 * utils.c: Likewise.
5592 * wincecompat.c: Likewise.
5593
87f6c4e3
GB
55942014-08-06 Gary Benson <gbenson@redhat.com>
5595
5596 * regcache.c (init_register_cache): Move conditionals inside if.
5597
7089dca4
GB
55982014-08-06 Gary Benson <gbenson@redhat.com>
5599
5600 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5601
462f517e
GB
56022014-07-31 Gary Benson <gbenson@redhat.com>
5603
5604 * ax.h: Do not include server.h.
5605 * gdbthread.h: Likewise.
5606 * lynx-low.h: Likewise.
5607 * notif.h: Likewise.
5608
976411d6
GB
56092014-07-30 Gary Benson <gbenson@redhat.com>
5610
5611 * server.h: Include common-defs.h.
5612 Do not include config.h or build-gnulib-gdbserver/config.h.
5613
d41f6d8e
GB
56142014-07-30 Gary Benson <gbenson@redhat.com>
5615
5616 * hostio-errno.c: Move server.h to top of includes list.
5617 * inferiors.c: Likewise.
5618 * linux-x86-low.c: Likewise.
5619 * notif.c: Include server.h.
5620
314c6a35
TT
56212014-07-24 Tom Tromey <tromey@redhat.com>
5622 Gary Benson <gbenson@redhat.com>
5623
5624 * server.h (CORE_ADDR): Now unsigned.
5625
69ff6be5
PA
56262014-07-16 Pedro Alves <palves@redhat.com>
5627
5628 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5629
ce9e3fe7
PA
56302014-07-15 Pedro Alves <palves@redhat.com>
5631
5632 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5633 copy.
5634
e76126e8
PA
56352014-07-11 Pedro Alves <palves@redhat.com>
5636
5637 * linux-low.c (kill_wait_lwp): New function, based on
5638 kill_one_lwp_callback, but use my_waitpid directly.
5639 (kill_one_lwp_callback, linux_kill): Use it.
5640
8e9db26e
PA
56412014-06-23 Pedro Alves <palves@redhat.com>
5642
5643 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5644 before setting DR0..DR3.
5645
698b3e08
GB
56462014-06-20 Gary Benson <gbenson@redhat.com>
5647
5648 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5649 * configure: Regenerated.
5650 * config.in: Likewise.
5651
125f8a3d
GB
56522014-06-20 Gary Benson <gbenson@redhat.com>
5653
5654 * Makefile.in (SFILES): Update locations for files moved
5655 from common to nat.
5656 (object file files): Reordered.
5657
42995dbd
GB
56582014-06-20 Gary Benson <gbenson@redhat.com>
5659
5660 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5661 (i386_dr_low_set_addr): Likewise.
5662 (i386_dr_low_get_addr): Likewise.
5663 (i386_dr_low_can_set_control): Likewise.
5664 (i386_dr_low_set_control): Likewise.
5665 (i386_dr_low_get_control): Likewise.
5666 (i386_dr_low_get_status): Likewise.
5667 (i386_get_debug_register_length): Likewise.
5668 * linux-x86-low.c (i386_dr_low_set_addr):
5669 Changed signature. Made static.
5670 (i386_dr_low_get_addr): Likewise.
5671 (i386_dr_low_set_control): Likewise.
5672 (i386_dr_low_get_control): Likewise.
5673 (i386_dr_low_get_status): Likewise.
5674 (i386_dr_low): New global variable.
5675 * win32-i386-low.c (i386_dr_low_set_addr):
5676 Changed signature. Made static.
5677 (i386_dr_low_get_addr): Likewise.
5678 (i386_dr_low_set_control): Likewise.
5679 (i386_dr_low_get_control): Likewise.
5680 (i386_dr_low_get_status): Likewise.
5681 (i386_dr_low): New global variable.
5682
e1d2394b
MS
56832014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5684
5685 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5686 * Makefile.in (AR, AR_FLAGS): Define.
5687 * configure: Regenerate.
5688
3a8ee006
GB
56892014-06-19 Gary Benson <gbenson@redhat.com>
5690
5691 * Makefile.in (i386-dregs.o): New rule.
5692 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5693 * i386-low.c (target.h): Remove include.
5694 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5695 (DR_CONTROL_SHIFT): Likewise.
5696 (DR_CONTROL_SIZE): Likewise.
5697 (DR_RW_EXECUTE): Likewise.
5698 (DR_RW_WRITE): Likewise.
5699 (DR_RW_READ): Likewise.
5700 (DR_RW_IORW): Likewise.
5701 (DR_LEN_1): Likewise.
5702 (DR_LEN_2): Likewise.
5703 (DR_LEN_4): Likewise.
5704 (DR_LEN_8): Likewise.
5705 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5706 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5707 (DR_ENABLE_SIZE): Likewise.
5708 (DR_LOCAL_SLOWDOWN): Likewise.
5709 (DR_GLOBAL_SLOWDOWN): Likewise.
5710 (DR_CONTROL_RESERVED): Likewise.
5711 (I386_DR_CONTROL_MASK): Likewise.
5712 (I386_DR_VACANT): Likewise.
5713 (I386_DR_LOCAL_ENABLE): Likewise.
5714 (I386_DR_GLOBAL_ENABLE): Likewise.
5715 (I386_DR_DISABLE): Likewise.
5716 (I386_DR_SET_RW_LEN): Likewise.
5717 (I386_DR_GET_RW_LEN): Likewise.
5718 (I386_DR_WATCH_HIT): Likewise.
5719 (i386_wp_op_t): Likewise.
5720 (i386_show_dr): Likewise.
5721 (i386_length_and_rw_bits): Likewise.
5722 (i386_insert_aligned_watchpoint): Likewise.
5723 (i386_remove_aligned_watchpoint): Likewise.
5724 (i386_handle_nonaligned_watchpoint): Likewise.
5725 i386_update_inferior_debug_regs(): Likewise.
5726 (i386_dr_insert_watchpoint): Likewise.
5727 (i386_dr_remove_watchpoint): Likewise.
5728 (i386_dr_region_ok_for_watchpoint): Likewise.
5729 (i386_dr_stopped_data_address): Likewise.
5730 (i386_dr_stopped_by_watchpoint): Likewise.
5731
8f26655c
GB
57322014-06-19 Gary Benson <gbenson@redhat.com>
5733
5734 * i386-low.c (i386_dr_show): Renamed to
5735 i386_show_dr and made static. All uses updated.
5736 (i386_dr_length_and_rw_bits): Renamed to
5737 i386_length_and_rw_bits and made static.
5738 All uses updated.
5739 (i386_dr_insert_aligned_watchpoint): Renamed to
5740 i386_insert_aligned_watchpoint and made static.
5741 All uses updated.
5742 (i386_dr_remove_aligned_watchpoint): Renamed to
5743 i386_remove_aligned_watchpoint and made static.
5744 All uses updated.
5745 (i386_dr_update_inferior_debug_regs): Renamed to
5746 i386_update_inferior_debug_regs and made static.
5747 All uses updated.
5748
b9228891
GB
57492014-06-18 Gary Benson <gbenson@redhat.com>
5750
5171def3
GB
5751 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5752 (i386_dr_low_can_set_control): Likewise.
5753 (i386_get_debug_register_length): Likewise.
5754 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5755 (i386_dr_low_can_set_control): Likewise.
5756 (i386_get_debug_register_length): Likewise.
5757
57582014-06-17 Gary Benson <gbenson@redhat.com>
5759
b9228891
GB
5760 * i386-low.h (i386-dregs.h): New include.
5761 (DR_FIRSTADDR): Now in i386-dregs.h.
5762 (DR_LASTADDR): Likewise.
5763 (DR_NADDR): Likewise.
5764 (DR_STATUS): Likewise.
5765 (DR_CONTROL): Likewise.
5766 (i386_debug_reg_state): Likewise.
5767 (i386_dr_insert_watchpoint): Likewise.
5768 (i386_dr_remove_watchpoint): Likewise.
5769 (i386_dr_region_ok_for_watchpoint): Likewise.
5770 (i386_dr_stopped_data_address): Likewise.
5771 (i386_dr_stopped_by_watchpoint): Likewise.
5772 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5773
4be83cc2
GB
57742014-06-18 Gary Benson <gbenson@redhat.com>
5775
5776 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5777 i386_dr_insert_watchpoint.
5778 (i386_low_remove_watchpoint): Renamed to
5779 i386_dr_remove_watchpoint.
5780 (i386_low_region_ok_for_watchpoint): Renamed to
5781 i386_dr_region_ok_for_watchpoint.
5782 (i386_low_stopped_data_address): Renamed to
5783 i386_dr_stopped_data_address.
5784 (i386_low_stopped_by_watchpoint): Renamed to
5785 i386_dr_stopped_by_watchpoint.
5786 * i386-low.c (i386_show_dr): Renamed to
5787 i386_dr_show and made nonstatic. All uses updated.
5788 (i386_length_and_rw_bits): Renamed to
5789 i386_dr_length_and_rw_bits and made nonstatic.
5790 All uses updated.
5791 (i386_insert_aligned_watchpoint): Renamed to
5792 i386_dr_insert_aligned_watchpoint and made nonstatic.
5793 All uses updated.
5794 (i386_remove_aligned_watchpoint): Renamed to
5795 i386_dr_remove_aligned_watchpoint and made nonstatic.
5796 All uses updated.
5797 (i386_update_inferior_debug_regs): Renamed to
5798 i386_dr_update_inferior_debug_regs and made nonstatic.
5799 All uses updated.
5800 (i386_low_insert_watchpoint): Renamed to
5801 i386_dr_insert_watchpoint. All uses updated.
5802 (i386_low_remove_watchpoint): Renamed to
5803 i386_dr_remove_watchpoint. All uses updated.
5804 (i386_low_region_ok_for_watchpoint): Renamed to
5805 i386_dr_region_ok_for_watchpoint. All uses updated.
5806 (i386_low_stopped_data_address): Renamed to
5807 i386_dr_stopped_data_address. All uses updated.
5808 (i386_low_stopped_by_watchpoint): Renamed to
5809 i386_dr_stopped_by_watchpoint. All uses updated.
5810
131aa0d4
GB
58112014-06-18 Gary Benson <gbenson@redhat.com>
5812
5813 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5814 (i386_dr_low_can_set_control): Likewise.
5815 (i386_insert_aligned_watchpoint): New check.
5816
d9305f7f
GB
58172014-06-18 Gary Benson <gbenson@redhat.com>
5818
5819 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5820 Renamed to state.
5821
e927c9fc
GB
58222014-06-18 Gary Benson <gbenson@redhat.com>
5823
5824 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5825 instead of fatal and error.
5826 (i386_handle_nonaligned_watchpoint): Likewise.
5827
1b6d4134
GB
58282014-06-18 Gary Benson <gbenson@redhat.com>
5829
5830 * i386-low.c (i386_get_debug_register_length): New macro.
5831 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5832 (i386_show_dr): Use debug_printf instead of fprintf. Use
5833 phex to format values.
5834
6e62758f
GB
58352014-06-18 Gary Benson <gbenson@redhat.com>
5836
5837 * i386-low.h: Comment changes.
5838 * i386-low.c: Likewise.
5839
fc6e2f03
GB
58402014-06-18 Gary Benson <gbenson@redhat.com>
5841
5842 * i386-low.c: Whitespace changes.
5843
f9d1eeed
TT
58442014-06-12 Tom Tromey <tromey@redhat.com>
5845
5846 * utils.c (freeargv): Remove.
5847
0b04e523
TT
58482014-06-12 Tom Tromey <tromey@redhat.com>
5849
5850 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5851 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5852 (parse_debug_format_options): Likewise.
5853 (gdbserver_usage): Likewise.
5854 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5855 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5856 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5857 against libiberty.
5858 ($(LIBGNU)): Depend on libiberty.
5859 (all-lib): Recurse into all subdirs.
5860 (install-only): Invoke "install" target in subdirs.
5861 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5862 targets.
5863 * configure: Rebuild.
5864 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5865 for vasprintf, vsnprintf, or gettimeofday.
5866 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5867 srv_tgtobj.
5868
270c9937
JB
58692014-06-05 Joel Brobecker <brobecker@adacore.com>
5870
5871 * development.sh: Delete.
5872 * Makefile.in (config.status): Adjust dependency on development.sh.
5873 * configure.ac: Adjust development.sh source call.
5874 * configure: Regenerate.
5875
0a261ed8
PA
58762014-06-02 Pedro Alves <palves@redhat.com>
5877
5878 * ax.c (gdb_free_agent_expr): New function.
5879 * ax.h (gdb_free_agent_expr): New declaration.
5880 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5881 list.
5882 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5883 static.
5884 (clear_breakpoint_conditions_and_commands): New function.
5885 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5886 (clear_breakpoint_conditions_and_commands): New declaration.
5887
e9dae05e
RR
58882014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5889
5890 * linux-aarch64-low.c (asm/ptrace.h): Include.
5891
5876f503
JK
58922014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 Fix TLS access for -static -pthread.
5895 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5896 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5897 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5898
802e8e6d
PA
58992014-05-20 Pedro Alves <palves@redhat.com>
5900
5901 * linux-aarch64-low.c (aarch64_insert_point)
5902 (aarch64_remove_point): No longer check whether the type is
5903 supported here. Adjust to new interface.
5904 (the_low_target): Install aarch64_supports_z_point_type as
5905 supports_z_point_type method.
5906 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5907 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5908 instead of a Z packet char. Adjust.
5909 (arm_supports_z_point_type): New function.
5910 (arm_insert_point, arm_remove_point): Adjust to new interface.
5911 (the_low_target): Install arm_supports_z_point_type.
5912 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5913 (cris_insert_point, cris_remove_point): Adjust to new interface.
5914 Don't check whether the type is supported here.
5915 (the_low_target): Install cris_supports_z_point_type.
5916 * linux-low.c (linux_supports_z_point_type): New function.
5917 (linux_insert_point, linux_remove_point): Adjust to new interface.
5918 * linux-low.h (struct linux_target_ops) <insert_point,
5919 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5920 raw_breakpoint pointer parameter.
5921 <supports_z_point_type>: New method.
5922 * linux-mips-low.c (mips_supports_z_point_type): New function.
5923 (mips_insert_point, mips_remove_point): Adjust to new interface.
5924 Use mips_supports_z_point_type.
5925 (the_low_target): Install mips_supports_z_point_type.
5926 * linux-ppc-low.c (the_low_target): Install NULL as
5927 supports_z_point_type method.
5928 * linux-s390-low.c (the_low_target): Install NULL as
5929 supports_z_point_type method.
5930 * linux-sparc-low.c (the_low_target): Install NULL as
5931 supports_z_point_type method.
5932 * linux-x86-low.c (x86_supports_z_point_type): New function.
5933 (x86_insert_point): Adjust to new insert_point interface. Use
5934 insert_memory_breakpoint. Adjust to new
5935 i386_low_insert_watchpoint interface.
5936 (x86_remove_point): Adjust to remove_point interface. Use
5937 remove_memory_breakpoint. Adjust to new
5938 i386_low_remove_watchpoint interface.
5939 (the_low_target): Install x86_supports_z_point_type.
5940 * lynx-low.c (lynx_target_ops): Install NULL as
5941 supports_z_point_type callback.
5942 * nto-low.c (nto_supports_z_point_type): New.
5943 (nto_insert_point, nto_remove_point): Adjust to new interface.
5944 (nto_target_ops): Install nto_supports_z_point_type.
5945 * mem-break.c: Adjust intro comment.
5946 (struct raw_breakpoint) <raw_type, size>: New fields.
5947 <inserted>: Update comment.
5948 <shlib_disabled>: Delete field.
5949 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5950 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5951 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5952 (raw_bkpt_type_to_target_hw_bp_type): New function.
5953 (find_enabled_raw_code_breakpoint_at): New function.
5954 (find_raw_breakpoint_at): New type and size parameters. Use them.
5955 (insert_memory_breakpoint): New function, based off
5956 set_raw_breakpoint_at.
5957 (remove_memory_breakpoint): New function.
5958 (set_raw_breakpoint_at): Reimplement.
5959 (set_breakpoint): New, based on set_breakpoint_at.
5960 (set_breakpoint_at): Reimplement.
5961 (delete_raw_breakpoint): Go through the_target->remove_point
5962 instead of assuming memory breakpoints.
5963 (find_gdb_breakpoint_at): Delete.
5964 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5965 (find_gdb_breakpoint): New function.
5966 (set_gdb_breakpoint_at): Delete.
5967 (z_type_supported): New function.
5968 (set_gdb_breakpoint_1): New function, loosely based off
5969 set_gdb_breakpoint_at.
5970 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5971 (delete_gdb_breakpoint_at): Delete.
5972 (delete_gdb_breakpoint_1): New function, loosely based off
5973 delete_gdb_breakpoint_at.
5974 (delete_gdb_breakpoint): New function.
5975 (clear_gdb_breakpoint_conditions): Rename to ...
5976 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5977 breakpoint.
5978 (add_condition_to_breakpoint): Make static.
5979 (add_breakpoint_condition): Take a struct breakpoint pointer
5980 instead of an address. Adjust.
5981 (gdb_condition_true_at_breakpoint): Rename to ...
5982 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5983 z_type parameter.
5984 (gdb_condition_true_at_breakpoint): Reimplement.
5985 (add_breakpoint_commands): Take a struct breakpoint pointer
5986 instead of an address. Adjust.
5987 (gdb_no_commands_at_breakpoint): Rename to ...
5988 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5989 parameter. Return true if no breakpoint was found. Change debug
5990 output.
5991 (gdb_no_commands_at_breakpoint): Reimplement.
5992 (run_breakpoint_commands): Rename to ...
5993 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5994 and change return type to boolean.
5995 (run_breakpoint_commands): New function.
5996 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5997 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5998 breakpoint. Go through the_target->remove_point instead of
5999 assuming memory breakpoint.
6000 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6001 software and hardware breakpoints.
6002 (reinsert_raw_breakpoint): Go through the_target->insert_point
6003 instead of assuming memory breakpoint.
6004 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6005 software and hardware breakpoints.
6006 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6007 Check both software and hardware breakpoints.
6008 (validate_inserted_breakpoint): Assert the breakpoint is a
6009 software breakpoint. Set the inserted flag to -1 instead of
6010 setting shlib_disabled.
6011 (delete_disabled_breakpoints): Adjust.
6012 (validate_breakpoints): Only validate software breakpoints.
6013 Adjust to inserted flag change.
6014 (check_mem_read, check_mem_write): Skip breakpoint types other
6015 than software breakpoints. Adjust to inserted flag change.
6016 * mem-break.h (enum raw_bkpt_type): New enum.
6017 (raw_breakpoint, struct process_info): Forward declare.
6018 (Z_packet_to_target_hw_bp_type): Delete declaration.
6019 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6020 (set_gdb_breakpoint, delete_gdb_breakpoint)
6021 (clear_breakpoint_conditions): New declarations.
6022 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6023 (breakpoint_inserted_here): Update comment.
6024 (add_breakpoint_condition, add_breakpoint_commands): Replace
6025 address parameter with a breakpoint pointer parameter.
6026 (gdb_breakpoint_here): Update comment.
6027 (delete_gdb_breakpoint_at): Delete.
6028 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6029 * server.c (process_point_options): Take a struct breakpoint
6030 pointer instead of an address. Adjust.
6031 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6032 delete_gdb_breakpoint.
6033 * spu-low.c (spu_target_ops): Install NULL as
6034 supports_z_point_type method.
6035 * target.h: Include mem-break.h.
6036 (struct target_ops) <prepare_to_access_memory>: Update comment.
6037 <supports_z_point_type>: New field.
6038 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6039 instead of a char. Also take a raw breakpoint pointer.
6040 * win32-arm-low.c (the_low_target): Install NULL as
6041 supports_z_point_type.
6042 * win32-i386-low.c (i386_supports_z_point_type): New function.
6043 (i386_insert_point, i386_remove_point): Adjust to new interface.
6044 (the_low_target): Install i386_supports_z_point_type.
6045 * win32-low.c (win32_supports_z_point_type): New function.
6046 (win32_insert_point, win32_remove_point): Adjust to new interface.
6047 (win32_target_ops): Install win32_supports_z_point_type.
6048 * win32-low.h (struct win32_target_ops):
6049 <supports_z_point_type>: New method.
6050 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6051 instead of a char. Also take a raw breakpoint pointer.
6052
932539e3
PA
60532014-05-20 Pedro Alves <palves@redhat.com>
6054
6055 * mem-break.h: Include break-common.h.
6056 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6057 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6058 (Z_packet_to_target_hw_bp_type): New declaration.
6059 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6060 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6061 (Z_PACKET_ACCESS_WP): Delete macros.
6062 (Z_packet_to_hw_type): Delete function.
6063 * i386-low.h: Don't include break-common.h here.
6064 (Z_packet_to_hw_type): Delete declaration.
6065 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6066 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6067 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6068 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6069 * linux-aarch64-low.c: Don't include break-common.h here.
6070 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6071 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6072 (Z_packet_to_target_hw_bp_type): Delete function.
6073 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6074 function.
6075 (mips_insert_point, mips_remove_point): Use
6076 Z_packet_to_target_hw_bp_type.
6077
4ff0d3d8
PA
60782014-05-20 Pedro Alves <palves@redhat.com>
6079
6080 * linux-aarch64-low.c: Include break-common.h.
6081 (enum target_point_type): Delete.
6082 (Z_packet_to_point_type): Rename to ...
6083 (Z_packet_to_target_hw_bp_type): ... this, and return a
6084 target_hw_bp_type instead.
6085 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6086 instead of an enum target_point_type.
6087 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6088 breakpoint type.
6089 (aarch64_dr_state_insert_one_point)
6090 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6091 (aarch64_handle_aligned_watchpoint)
6092 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6093 Take an enum target_hw_bp_type instead of an enum
6094 target_point_type.
6095 (aarch64_supports_z_point_type): New function.
6096 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6097 use Z_packet_to_target_hw_bp_type.
6098
786dc519
JB
60992014-05-20 Joel Brobecker <brobecker@adacore.com>
6100
6101 * configure.ac: Only use -Werror by default when DEVELOPMENT
6102 is true.
6103 * configure: Regenerate.
6104
9e0aa64f
JK
61052014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6106
6107 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6108 * linux-x86-low.c (X86_64_USER_REGS): New.
6109 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6110
2b577b92
YQ
61112014-04-28 Yao Qi <yao@codesourcery.com>
6112
6113 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6114 name.
6115
94611da2
PA
61162014-04-25 Pedro Alves <palves@redhat.com>
6117
6118 PR server/16255
6119 * linux-low.c (linux_attach_fail_reason_string): New function.
6120 (linux_attach_lwp): Delete.
6121 (linux_attach_lwp_1): Rename to ...
6122 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6123 argument. Remove "initial" parameter. Return int instead of
6124 void. Don't error or warn here.
6125 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6126 failure to attach to the tgid. Call warning when failing to
6127 attach to an lwp.
6128 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6129 argument. Remove "initial" parameter. Return int instead of
6130 void. Don't error or warn here.
6131 (linux_attach_fail_reason_string): New declaration.
6132 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6133 interface change. Use linux_attach_fail_reason_string.
6134
01f9f808
MS
61352014-04-24 Michael Sturm <michael.sturm@mintel.com>
6136 Walfred Tedeschi <walfred.tedeschi@intel.com>
6137
6138 * Makefile.in: Added rules to handle new files
6139 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6140 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6141 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6142 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6143 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6144 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6145 x32-avx512-linux.o.
6146 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6147 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6148 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6149 i386/x32-avx512.xml.
6150 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6151 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6152 i386/x32-avx512-linux.xml.
6153 * i387-fp.c (num_avx512_k_registers): New constant for number
6154 of K registers.
6155 (num_avx512_zmmh_low_registers): New constant for number of
6156 lower ZMM registers (0-15).
6157 (num_avx512_zmmh_high_registers): New constant for number of
6158 higher ZMM registers (16-31).
6159 (num_avx512_ymmh_registers): New contant for number of higher
6160 YMM registers (ymm16-31 added by avx521 on x86_64).
6161 (num_avx512_xmm_registers): New constant for number of higher
6162 XMM registers (xmm16-31 added by AVX512 on x86_64).
6163 (struct i387_xsave): Add space for AVX512 registers.
6164 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6165 Add code to handle AVX512 registers.
6166 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6167 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6168 prototypei from generated file.
6169 (tdesc_amd64_avx512_linux): Likewise.
6170 (init_registers_x32_avx512_linux): Likewise.
6171 (tdesc_x32_avx512_linux): Likewise.
6172 (init_registers_i386_avx512_linux): Likewise.
6173 (tdesc_i386_avx512_linux): Likewise.
6174 (x86_64_regmap): Add AVX512 registers.
6175 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6176 mask.
6177 (initialize_low_arch): Add code to initialize AVX512 registers.
6178
51aa91f9
PA
61792014-04-23 Pedro Alves <palves@redhat.com>
6180
6181 * mem-break.c (find_gdb_breakpoint_at): Make static.
6182 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6183
a4165e94
PA
61842014-04-23 Pedro Alves <palves@redhat.com>
6185
6186 * i386-low.c: Don't include break-common.h here.
6187 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6188 prototype to take target_hw_bp_type as argument instead of a Z
6189 packet char.
6190 * i386-low.h: Include break-common.h here.
6191 (Z_packet_to_hw_type): Declare.
6192 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6193 prototypes.
6194 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6195 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6196 (x86_remove_point): Convert the packet number to a
6197 target_hw_bp_type before calling i386_low_remove_watchpoint.
6198 * win32-i386-low.c (i386_insert_point): Convert the packet number
6199 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6200 (i386_remove_point): Convert the packet number to a
6201 target_hw_bp_type before calling i386_low_remove_watchpoint.
6202
b8acf843
PA
62032014-04-23 Pedro Alves <palves@redhat.com>
6204
6205 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6206
d708bcd1
PA
62072014-04-10 Pedro Alves <palves@redhat.com>
6208
6209 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6210 Check if the condition or command is NULL before checking if the
6211 breakpoint is known. On success, return true.
6212 * mem-break.h (add_breakpoint_condition): Document return.
6213 (add_breakpoint_commands): Add describing comment.
6214 * server.c (skip_to_semicolon): New function.
6215 (process_point_options): Use it.
6216
2eec7d5b
PA
62172014-04-09 Pedro Alves <palves@redhat.com>
6218
6219 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6220 to lwpid_of.
6221
fa96cb38
PA
62222014-02-27 Pedro Alves <palves@redhat.com>
6223
6224 PR 12702
6225 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6226 macros.
6227 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6228 output.
6229 (last_thread_of_process_p): Take a PID argument instead of a
6230 thread pointer.
6231 (linux_wait_for_lwp): Delete.
6232 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6233 functions.
6234 (linux_low_filter_event): New function, party factored out from
6235 linux_wait_for_event.
6236 (linux_wait_for_event): Rename to ...
6237 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6238 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6239 sigsuspend. Check for zombie leaders.
6240 (linux_wait_for_event): Reimplement as wrapper around
6241 linux_wait_for_event_filtered.
6242 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6243 a normal or signal exit is seen, it's the whole process exiting.
6244 (wait_for_sigstop): No longer a for_each_inferior callback.
6245 Rewrite on top of linux_wait_for_event_filtered.
6246 (stop_all_lwps): Call wait_for_sigstop directly.
6247 * server.c (resume, handle_target_event): Handle
6248 TARGET_WAITKIND_NO_RESUMED.
6249
d763de10
JB
62502014-02-26 Joel Brobecker <brobecker@adacore.com>
6251
6252 * win32-low.c (psapi_get_dll_name,
6253 * win32_CreateToolhelp32Snapshot): Delete.
6254 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6255 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6256 Delete.
6257 (handle_load_dll): Add function description.
6258 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6259
850a0f76
JB
62602014-02-26 Joel Brobecker <brobecker@adacore.com>
6261
6262 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6263 Add comment.
6264 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6265 base address when calling win32_add_one_solib.
6266 (handle_load_dll): Delete local variable load_addr.
6267 Remove 0x1000 offset applied to DLL base address when calling
6268 win32_add_one_solib.
6269 (handle_unload_dll): Add comment.
6270
f25b3fc3
JB
62712014-02-26 Joel Brobecker <brobecker@adacore.com>
6272
6273 * win32-low.c (win32_add_all_dlls): Renames
6274 win32_ensure_ntdll_loaded. Rewrite function documentation.
6275 Adjust implementation to always load all DLLs.
6276 Add 0x1000 offset to DLL base address when calling
6277 win32_add_one_solib.
6278 (child_initialization_done): New static global.
6279 (do_initial_child_stuff): Set child_initialization_done to
6280 zero during child initialization, and 1 after. Replace call
6281 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6282 Add comment.
6283 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6284 (handle_unload_dll): Add function documentation.
6285 (get_child_debug_event): Ignore load and unload DLL events
6286 during child initialization.
6287
d86d4aaf
DE
62882014-02-20 Doug Evans <dje@google.com>
6289
3bc32da3 6290 Remove global all_lwps.
d86d4aaf
DE
6291 * inferiors.h (ptid_of): Move here from linux-low.h.
6292 (pid_of, lwpid_of): Ditto.
6293 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6294 parameter is a struct thread_info * now.
6295 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6296 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6297 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6298 directly.
6299 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6300 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6301 * linux-arm-low.c (update_registers_callback): Update, "entry"
6302 parameter is a struct thread_info * now.
6303 Fetch lwpid from current_inferior directly.
6304 (arm_insert_point): Pass &all_threads to find_inferior instead of
6305 &all_lwps.
6306 (arm_remove_point): Ditto.
6307 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6308 (arm_prepare_to_resume): Fetch pid from thread.
6309 (arm_read_description): Fetch lwpid from current_inferior directly.
6310 * linux-low.c (all_lwps): Delete.
6311 (delete_lwp): Delete call to remove_inferior.
6312 (handle_extended_wait): Fetch lwpid from thread.
6313 (add_lwp): Don't set lwp->entry.id. Remove call to
6314 add_inferior_to_list.
6315 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6316 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6317 (kill_one_lwp_callback): Ditto.
6318 (linux_kill): Don't dereference NULL pointer.
6319 Fetch ptid,lwpid from thread.
6320 (get_detach_signal): Fetch ptid from thread.
6321 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6322 Simplify call to regcache_invalidate_thread.
6323 (delete_lwp_callback): Update, "entry" parameter is a
6324 struct thread_info * now. Fetch pid from thread.
6325 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6326 (status_pending_p_callback): Update, "entry" parameter is a
6327 struct thread_info * now. Fetch ptid from thread.
6328 (find_lwp_pid): Update, "entry" parameter is a
6329 struct thread_info * now.
6330 (linux_wait_for_lwp): Fetch pid from thread.
6331 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6332 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6333 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6334 (dequeue_one_deferred_signal): Ditto.
6335 (cancel_breakpoint): Fetch ptid from current_inferior.
6336 (linux_wait_for_event): Pass &all_threads to find_inferior,
6337 not &all_lwps. Fetch ptid, lwpid from thread.
6338 (count_events_callback): Update, "entry" parameter is a
6339 struct thread_info * now.
6340 (select_singlestep_lwp_callback): Ditto.
6341 (select_event_lwp_callback): Ditto.
6342 (cancel_breakpoints_callback): Ditto.
6343 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6344 not &all_lwps.
6345 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6346 (unsuspend_one_lwp): Update, "entry" parameter is a
6347 struct thread_info * now.
6348 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6349 not &all_lwps.
6350 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6351 Fetch lwpid from thread, not lwp.
6352 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6353 Pass &all_threads to find_inferior, not &all_lwps.
6354 (send_sigstop): Fetch lwpid from thread, not lwp.
6355 (send_sigstop_callback): Update, "entry" parameter is a
6356 struct thread_info * now.
6357 (suspend_and_send_sigstop_callback): Ditto.
6358 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6359 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6360 struct thread_info * now.
6361 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6362 from thread, lwp.
6363 (lwp_running): Update, "entry" parameter is a
6364 struct thread_info * now.
6365 (stop_all_lwps): Fetch ptid from thread.
6366 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6367 (linux_resume_one_lwp): Fetch lwpid from thread.
6368 (linux_set_resume_request): Update, "entry" parameter is a
6369 struct thread_info * now. Fetch pid, lwpid from thread.
6370 (resume_status_pending_p): Update, "entry" parameter is a
6371 struct thread_info * now.
6372 (need_step_over_p): Ditto. Fetch lwpid from thread.
6373 (start_step_over): Fetch lwpid from thread.
6374 (linux_resume_one_thread): Update, "entry" parameter is a
6375 struct thread_info * now. Fetch lwpid from thread.
6376 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6377 (proceed_one_lwp): Update, "entry" parameter is a
6378 struct thread_info * now. Fetch lwpid from thread.
6379 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6380 struct thread_info * now.
6381 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6382 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6383 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6384 directly.
6385 (regsets_store_inferior_registers): Ditto.
6386 (fetch_register, store_register): Ditto.
6387 (linux_read_memory, linux_write_memory): Ditto.
6388 (linux_request_interrupt): Ditto.
6389 (linux_read_auxv): Ditto.
6390 (linux_xfer_siginfo): Ditto.
6391 (linux_qxfer_spu): Ditto.
6392 (linux_qxfer_libraries_svr4): Ditto.
6393 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6394 moved to inferiors.h.
6395 (get_lwp): Delete.
6396 (get_thread_lwp): Update.
6397 (struct lwp_info): Delete member "entry". Simplify comment for
6398 member "thread".
6399 (all_lwps): Delete.
6400 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6401 current_inferior directly.
6402 (update_watch_registers_callback): Update, "entry" parameter is a
6403 struct thread_info * now. Fetch pid from thread.
6404 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6405 (mips_insert_point): Fetch lwpid from current_inferior.
6406 Pass &all_threads to find_inferior, not &all_lwps.
6407 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6408 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6409 directly.
6410 (mips_stopped_data_address): Ditto.
6411 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6412 directly.
6413 * linux-tile-low.c (tile_arch_setup): Ditto.
6414 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6415 (update_debug_registers_callback): Update, "entry" parameter is a
6416 struct thread_info * now. Fetch pid from thread.
6417 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6418 Pass &all_threads to find_inferior, not &all_lwps.
6419 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6420 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6421 Pass &all_threads to find_inferior, not &all_lwps.
6422 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6423 (i386_dr_low_get_status): Ditto.
6424 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6425 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6426 (x86_linux_read_description): Ditto.
6427 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6428
3b8361aa
DE
64292014-02-20 Doug Evans <dje@google.com>
6430
6431 * inferiors.c (get_first_inferior): Fix buglet.
6432
f7667f0d
DE
64332014-02-19 Doug Evans <dje@google.com>
6434
6435 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6436 * inferiors.c (add_thread): Change result type to struct thread_info *.
6437 All callers updated.
6438 (add_lwp): Call add_thread here instead of in callers.
6439 All callers updated.
6440 * linux-low.h (get_lwp_thread): Rewrite.
6441 (struct lwp_info): New member "thread".
6442
b3312d80
DE
64432014-02-19 Doug Evans <dje@google.com>
6444
6445 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6446 All callers updated.
6447
ecc6f45c
DE
64482014-02-19 Doug Evans <dje@google.com>
6449
6450 * inferiors.c (add_thread): Fix whitespace.
6451
649ebbca
DE
64522014-02-19 Doug Evans <dje@google.com>
6453
6454 * dll.c (clear_dlls): Replace accessing list implemention details
6455 with API function.
6456 * gdbthread.h (get_first_thread): Declare.
6457 * inferiors.c (for_each_inferior_with_data): New function.
6458 (get_first_thread): New function.
6459 (find_thread_ptid): Simplify.
6460 (get_first_inferior): New function.
6461 (clear_list): Delete.
6462 (one_inferior_p): New function.
6463 (clear_inferior_list): New function.
6464 (clear_inferiors): Update.
6465 * inferiors.h (for_each_inferior_with_data): Declare.
6466 (clear_inferior_list): Declare.
6467 (one_inferior_p): Declare.
6468 (get_first_inferior): Declare.
6469 * linux-low.c (linux_wait_for_event): Replace accessing list
6470 implemention details with API function.
6471 * server.c (target_running): Ditto.
6472 (accumulate_file_name_length): New function.
6473 (emit_dll_description): New function.
6474 (handle_qxfer_libraries): Replace accessing list implemention
6475 details with API function.
6476 (handle_qxfer_threads_worker): New function.
6477 (handle_qxfer_threads_proper): Replace accessing list implemention
6478 details with API function.
6479 (handle_query): Ditto.
6480 (visit_actioned_threads_callback_ftype): New typedef.
6481 (visit_actioned_threads_data): New struct.
6482 (visit_actioned_threads): Rewrite to be find_inferior callback.
6483 (resume): Call find_inferior.
6484 (handle_status): Replace accessing list implemention
6485 details with API function.
6486 (process_serial_event): Replace accessing list implemention details
6487 with API function.
6488 * target.c (set_desired_inferior): Replace accessing list implemention
6489 details with API function.
6490 * tracepoint.c (same_process_p): New function.
6491 (gdb_agent_about_to_close): Replace accessing list implemention
6492 details with API function.
6493 * win32-low.c (child_delete_thread): Replace accessing list
6494 implemention details with API function.
6495 (match_dll_by_basename): New function.
6496 (dll_is_loaded_by_basename): New function.
6497 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6498 details call to dll_is_loaded_by_basename.
6499
80894984
DE
65002014-02-19 Doug Evans <dje@google.com>
6501
6502 * dll.h (struct dll_info): Add comment.
6503 * gdbthread.h (struct thread_info): Add comment.
6504 (current_ptid): Simplify.
6505 * inferiors.c (add_process): Update.
6506 (remove_process): Update.
6507 * inferiors.h (struct process_info): Rename member "head" to "entry".
6508 * linux-low.c (delete_lwp): Update.
6509 (add_lwp): Update.
6510 (last_thread_of_process_p): Update.
6511 (kill_one_lwp_callback, linux_kill): Update.
6512 (status_pending_p_callback): Update.
6513 (wait_for_sigstop): Update. Simplify read of ptid.
6514 (start_step_over): Update.
6515 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6516 (get_lwp_thread): Update.
6517 (struct lwp_info): Rename member "head" to "entry".
6518 * regcache.h (inferior_list_entry): Delete.
6519 * server.c (kill_inferior_callback): Update.
6520 (detach_or_kill_inferior_callback): Update.
6521 (print_started_pid): Update.
6522 (print_attached_pid): Update.
6523 (process_serial_event): Simplify read of ptid.
6524 * thread-db.c (thread_db_create_event): Update.
6525 (thread_db_get_tls_address): Update.
6526 * win32-low.c (current_inferior_ptid): Simplify.
6527
46917d26
TT
65282014-02-19 Tom Tromey <tromey@redhat.com>
6529
6530 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6531 argument.
6532 (target_supports_btrace): Update.
6533
0759a81e
YQ
65342014-02-14 Yao Qi <yao@codesourcery.com>
6535
6536 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6537 (rsp-low-ipa.o): New target.
6538
a7191e8b
TT
65392014-02-12 Tom Tromey <tromey@redhat.com>
6540
6541 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6542 convert_ascii_to_int.
6543 * regcache.c (registers_to_string): Likewise.
6544 * remote-utils.c (decode_M_packet): Likewise.
6545 * server.c (process_serial_event): Likewise.
6546
ff0e980e
TT
65472014-02-12 Tom Tromey <tromey@redhat.com>
6548
6549 * server.c (handle_query, handle_v_run): Use hex2bin, not
6550 unhexify.
6551 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6552
e9371aff
TT
65532014-02-12 Tom Tromey <tromey@redhat.com>
6554
6555 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6556 convert_int_to_ascii.
6557 * regcache.c (registers_to_string, collect_register_as_string):
6558 Likewise.
6559 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6560 Likewise.
6561 * server.c (process_serial_event): Likewise.
6562 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6563 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6564
971dc0b8
TT
65652014-02-12 Tom Tromey <tromey@redhat.com>
6566
6567 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6568 bin2hex, not hexify.
6569 * tracepoint.c (cmd_qtstatus): Likewise.
6570
0a822afb
TT
65712014-02-12 Tom Tromey <tromey@redhat.com>
6572
6573 * remote-utils.c (monitor_output): Pass explicit length to
6574 hexify.
6575
9c3d6531
TT
65762014-02-12 Tom Tromey <tromey@redhat.com>
6577
6578 * tracepoint.c: Include rsp-low.h.
6579 * server.c: Include rsp-low.h.
6580 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6581 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6582 declare.
6583 * remote-utils.c: Include rsp-low.h.
6584 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6585 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6586 (convert_int_to_ascii, convert_ascii_to_int): Move to
6587 common/rsp-low.c.
6588 * regcache.c: Include rsp-low.h.
6589 * ax.c: Include rsp-low.h.
6590 * Makefile.in (SFILES): Add common/rsp-low.c.
6591 (OBS): Add rsp-low.o.
6592 (rsp-low.o): New target.
6593
01fd3ea5
TT
65942014-02-12 Tom Tromey <tromey@redhat.com>
6595
6596 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6597 Include print-utils.h.
6598 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6599 (plongest, thirty_two, phex_nz): Remove.
6600 * Makefile.in (SFILES): Add common/print-utils.c.
6601 (OBS): Add print-utils.o.
6602 (print-utils-ipa.o): New target.
6603 (print-utils.o): New target.
6604 (IPA_OBJS): Add print-utils-ipa.o.
6605
e99dc820
TT
66062014-02-06 Tom Tromey <tromey@redhat.com>
6607
6608 * Makefile.in (SFILES): Fix indentation.
6609
ee1e2d4f
DE
66102014-02-05 Doug Evans <dje@google.com>
6611
6612 * linux-low.c (linux_wait_for_event): Improve comment.
6613 (linux_wait_1): Keep current_inferior in sync with event_child.
6614
f5a02773
DE
66152014-01-22 Doug Evans <dje@google.com>
6616
6617 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6618
87ce2a04
DE
66192014-01-22 Doug Evans <dje@google.com>
6620
6621 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6622 * configure: Regenerate.
6623 * config.in: Regenerate.
6624 * Makefile.in (SFILES): Add debug.c.
6625 (OBS): Add debug.o.
6626 * debug.c: New file.
6627 * debug.h: New file.
6628 * linux-aarch64-low.c (*): Update all debugging printfs to use
6629 debug_printf instead of fprintf.
6630 * linux-arm-low.c (*): Ditto.
6631 * linux-cris-low.c (*): Ditto.
6632 * linux-crisv32-low.c (*): Ditto.
6633 * linux-m32r-low.c (*): Ditto.
6634 * linux-sparc-low.c (*): Ditto.
6635 * linux-x86.c (*): Ditto.
6636 * linux-low.c (*): Ditto.
6637 (linux_wait_1): Add calls to debug_enter, debug_exit.
6638 (linux_wait): Remove redundant debugging printf.
6639 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6640 (linux_resume, unstop_all_lwps): Ditto.
6641 * mem-break.c (*): Update all debugging printfs to use
6642 debug_printf instead of fprintf.
6643 * remote-utils.c (*): Ditto.
6644 * thread-db.c (*): Ditto.
6645 * server.c #include <ctype.h>, "gdb_vecs.h".
6646 (debug_threads): Moved to debug.c.
6647 (*): Update all debugging printfs to use debug_printf instead of
6648 fprintf.
6649 (start_inferior): Replace call to fflush with call to debug_flush.
6650 (monitor_show_help): Mention set debug-format.
6651 (parse_debug_format_options): New function.
6652 (handle_monitor_command): Handle "monitor set debug-format".
6653 (gdbserver_usage): Mention --debug-format.
6654 (main): Parse --debug-format.
6655 * server.h (debug_threads): Declaration moved to debug.h.
6656 #include "debug.h".
6657 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6658 trace_debug_1 that uses debug_printf.
6659 (tracepoint_look_up_symbols): Update all debugging printfs to use
6660 debug_printf instead of fprintf.
6661
e671835b
BS
66622014-01-20 Baruch Siach <baruch@tkos.co.il>
6663
6664 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6665 sys/ptrace.h.
6666
b5737fa9
PA
66672014-01-17 Pedro Alves <palves@redhat.com>
6668
ea38d2a9 6669 PR build/16445
c7faa97a
PA
6670 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6671 defined after including gdb_proc_service.h.
b5737fa9 6672
40ed484e
DE
66732014-01-16 Doug Evans <dje@google.com>
6674
6675 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6676 (match_dll): Use it.
6677
969c39fb
MM
66782014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6679
6680 * target.h (target_ops) <read_btrace>: Change parameters and
6681 return type to allow error reporting.
6682 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6683 trace reading errors on.
6684 * linux-low.c (linux_low_read_btrace): Pass trace reading
6685 errors on.
6686 (linux_low_disable_btrace): New.
6687
ab7f45ba
DE
66882014-01-15 Doug Evans <dje@google.com>
6689
6690 * inferiors.c (thread_id_to_gdb_id): Delete.
6691 * inferiors.h (thread_id_to_gdb_id): Delete.
6692
66af0f44
EZ
66932014-01-13 Eli Zaretskii <eliz@gnu.org>
6694
6695 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6696 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6697 versions.
6698
9939e131
PA
66992014-01-08 Pedro Alves <palves@redhat.com>
6700
6701 * server.c (handle_status): Don't discard previous queued stop
6702 replies or thread's pending status here.
6703 (main) <disconnection>: Do it here instead.
6704
b7ea362b
PA
67052014-01-08 Pedro Alves <palves@redhat.com>
6706
6707 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6708 * server.c (visit_actioned_threads, handle_pending_status): New
6709 function.
6710 (handle_v_cont): Factor out parts to ...
6711 (resume): ... this new function. If in all-stop, and a thread
6712 being resumed has a pending status, report it without actually
6713 resuming.
6714 (myresume): Adjust to use the new 'resume' function.
6715 (clear_pending_status_callback, set_pending_status_callback)
6716 (find_status_pending_thread_callback): New functions.
6717 (handle_status): Handle the case of multiple threads having
6718 interesting statuses to report. Report threads' real last signal
6719 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6720 with an interesting thread to report the status for, instead of
6721 always reporting the status of the first thread.
6722
28498c42
JB
67232014-01-01 Joel Brobecker <brobecker@adacore.com>
6724
6725 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6726 * gdbreplay.c (gdbreplay_version): Likewise.
6727
f45c82da
YZ
67282013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6729
6730 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6731 iov.iov_len with the real length in use.
6732
379a5e2d
JB
67332013-12-13 Joel Brobecker <brobecker@adacore.com>
6734
6735 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6736 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6737 for all targets that use win32-low.c.
6738 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6739 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6740
4210d83e
PA
67412013-12-13 Pedro Alves <palves@redhat.com>
6742
6743 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6744 if equal to TARGET_WAITKIND_LOADED.
6745 * win32-low.c (cached_status): New static global.
6746 (win32_wait): Add declaration.
6747 (do_initial_child_stuff): Flush all initial pending debug events
6748 up to the initial breakpoint.
6749 (win32_wait): If CACHED_STATUS was set, return that instead
6750 of doing a real wait. Remove the code resuming the execution
6751 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6752 during the initial phase. Also remove the code changing
6753 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6754 TARGET_WAITKIND_STOPPED.
6755
e7f0d979
YQ
67562013-12-11 Yao Qi <yao@codesourcery.com>
6757
6758 * notif.c (handle_notif_ack): Return 0 if no notification
6759 matches.
6760
ebcf782c
DE
67612013-11-20 Doug Evans <dje@google.com>
6762
6763 * linux-low.c (linux_set_resume_request): Fix comment.
6764
20ad9378
DE
67652013-11-20 Doug Evans <dje@google.com>
6766
6767 * linux-low.c (resume_status_pending_p): Tweak comment.
6768
a196ebeb
WT
67692013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6770
6771 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6772 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6773 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6774 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6775 (srv_amd64_regobj): Add amd64-mpx.o.
6776 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6777 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6778 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6779 * i387-fp.c (num_pl_bnd_register) Added constant.
6780 (num_pl_bnd_cfg_registers) Added constant.
6781 (struct i387_xsave) Added reserved area and MPX fields.
6782 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6783 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6784 function.
6785 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6786 (init_registers_amd64_mpx_linux): Declare new function.
6787 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6788 (x86_64_regmap): Add MPX registers.
6789 (x86_linux_read_description): Add MPX case.
6790 (initialize_low_arch): Initialize MPX targets.
6791
0080a2f6
TT
67922013-11-18 Tom Tromey <tromey@redhat.com>
6793
6794 * configure: Rebuild.
6795 * configure.ac: Don't check for stdlib.h.
6796 * gdbreplay.c: Unconditionally include stdlib.h.
6797
2978b111
TT
67982013-11-18 Tom Tromey <tromey@redhat.com>
6799
6800 * config.in: Rebuild.
6801 * configure: Rebuild.
6802 * configure.ac: Don't use AC_HEADER_DIRENT.
6803
a3d08894
TT
68042013-11-18 Tom Tromey <tromey@redhat.com>
6805
6806 * server.h: Don't check HAVE_STRING_H.
6807 * gdbreplay.c: Don't check HAVE_STRING_H.
6808 * configure: Rebuild.
6809
0a5dd17d
TT
68102013-11-18 Tom Tromey <tromey@redhat.com>
6811
6812 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6813 LIBGNU.
6814
1bd2f0ba
TT
68152013-11-08 Tom Tromey <tromey@redhat.com>
6816
6817 * configure, config.in: Rebuild.
6818 * configure.ac: Remove unused configury.
6819
3266f10b
TT
68202013-11-08 Tom Tromey <tromey@redhat.com>
6821
6822 * acinclude.m4: Include common.m4, codeset.m4.
6823 * configure, config.in: Rebuild.
6824 * configure.ac: Use GDB_AC_COMMON.
6825
6682d959
AA
68262013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6827
6828 * linux-s390-low.c (HWCAP_S390_TE): New define.
6829 (s390_arch_setup): Consider the TE field in the HWCAP for
6830 determining 'have_regset_tdb'.
6831
fd0a4d76
SDJ
68322013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6833
6834 PR gdb/16014
6835 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6836 call to sizeof.
6837
1a3d890b
PA
68382013-10-02 Pedro Alves <palves@redhat.com>
6839
6840 * server.c (process_serial_event): Don't output "GDBserver
6841 exiting" if GDB is connected through stdio.
6842 * target.c (mywait): Likewise, be silent if GDB is connected
6843 through stdio.
6844
97ad4581
JB
68452013-10-01 Joel Brobecker <brobecker@adacore.com>
6846
6847 * lynx-low.c (lynx_add_threads_after_attach): New function.
6848 (lynx_attach): Remove call to add_thread. Add call to
6849 lynx_add_threads_after_attach instead.
6850
5b4e221c
MF
68512013-09-28 Mike Frysinger <vapier@gentoo.org>
6852
6853 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6854 * config.in, configure: Regenerated.
6855
ee47b2f8
YQ
68562013-09-18 Yao Qi <yao@codesourcery.com>
6857
6858 PR server/15959
6859 * server.c (start_inferior): Clear 'resume_info'.
6860
d6707650 68612013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6862
d6707650
JW
6863 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6864 for each register.
6865
9243dd0e 68662013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6867
9243dd0e
JW
6868 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6869 linux-tile-low.o to srv_tgtobj.
6870
c623a6ef
WN
68712013-09-16 Will Newton <will.newton@linaro.org>
6872
6873 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6874 out regs.
6875
fb71d39e
PA
68762013-09-06 Pedro Alves <palves@redhat.com>
6877
6878 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6879 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6880 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6881 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6882 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6883 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6884
8e7e9910
PA
68852013-09-06 Pedro Alves <palves@redhat.com>
6886
6887 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6888 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6889
7c3a12ca
PA
68902013-09-06 Pedro Alves <palves@redhat.com>
6891
6892 * linux-amd64-ipa.c: Include tracepoint.h.
6893 * linux-i386-ipa.c: Include tracepoint.h.
6894
8eb3d7b6
RW
68952013-09-06 Ricard Wanderlof <ricardw@axis.com>
6896
6897 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6898 (ps_get_thread_area): New function.
6899
eddddb9d
RW
69002013-09-06 Ricard Wanderlof <ricardw@axis.com>
6901
6902 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6903 (initialize_low_arch): Call init_registers_crisv32 rather than
6904 init_register_crisv32.
6905
533b0600
PA
69062013-09-05 Pedro Alves <palves@redhat.com>
6907
6908 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6909 to ...
6910 * hostio.h: ... this new file.
6911 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6912 win32-low.c: Include hostio.h.
6913
0ce3d3b5
PA
69142013-09-05 Pedro Alves <palves@redhat.com>
6915
6916 * server.h (gdb_client_data, handler_func, callback_handler_func)
6917 (delete_file_handler, add_file_handler, append_callback_event)
6918 (delete_callback_event, start_event_loop, initialize_event_loop):
6919 Move to event-loop.h and include it.
6920 * event-loop.h: New file.
6921
799cdc37
PA
69222013-09-05 Pedro Alves <palves@redhat.com>
6923
6924 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6925 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6926 (loaded_dll, unloaded_dll): Move to ...
6927 * dll.h: ... this new file.
6928 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6929
6a6bbd9d
PA
69302013-09-05 Pedro Alves <palves@redhat.com>
6931
6932 * server.h (current_process, get_thread_process, all_processes)
6933 (add_inferior_to_list, for_each_inferior, current_inferior)
6934 (remove_inferior, add_process, remove_process, find_process_pid)
6935 (have_started_inferiors_p, have_attached_inferiors_p)
6936 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6937 (clear_inferiors, find_inferior, find_inferior_id)
6938 (inferior_target_data, set_inferior_target_data)
6939 (inferior_regcache_data, set_inferior_regcache_data): Move to
6940 inferiors.h, and include it.
6941 * inferiors.h: New file.
6942
f699aaba
PA
69432013-09-05 Pedro Alves <palves@redhat.com>
6944
6945 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6946 Move ...
72f4393d 6947 * ax.h: ... here.
f699aaba 6948
c144c7a0
PA
69492013-09-05 Pedro Alves <palves@redhat.com>
6950
6951 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6952 tracepoint.h.
6953 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6954 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6955 (handle_tracepoint_general_set, handle_tracepoint_query)
6956 (tracepoint_finished_step, tracepoint_was_hit)
6957 (release_while_stepping_state_list, current_traceframe)
6958 (in_readonly_region, traceframe_read_mem)
6959 (fetch_traceframe_registers, traceframe_read_sdata)
6960 (traceframe_read_info, struct fast_tpoint_collect_status)
6961 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6962 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6963 (supply_fast_tracepoint_registers)
6964 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6965 (ipa_tdesc, claim_trampoline_space)
6966 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6967 (agent_mem_read, agent_get_trace_state_variable_value)
6968 (agent_set_trace_state_variable_value, agent_tsv_read)
6969 (agent_mem_read_string, get_raw_reg_func_addr)
6970 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6971 * tracepoint.h: ... this new file.
6972
ff42e6ab
PA
69732013-09-05 Pedro Alves <palves@redhat.com>
6974
6975 * server.h (perror_with_name, error, fatal, warning, paddress)
6976 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6977 include it.
6978 * utils.h: New file.
6979
541af0f4
PA
69802013-09-05 Pedro Alves <palves@redhat.com>
6981
6982 * server.h (remote_debug, noack_mode, transport_is_reliable)
6983 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6984 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6985 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6986 (write_enn, initialize_async_io, enable_async_io)
6987 (disable_async_io, check_remote_input_interrupt_request)
6988 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6989 (dead_thread_notify, prepare_resume_reply)
6990 (decode_address_to_semicolon, decode_address, decode_m_packet)
6991 (decode_M_packet, decode_X_packet, decode_xfer_write)
6992 (decode_search_memory_packet, unhexify, hexify)
6993 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6994 (look_up_one_symbol, relocate_instruction)
6995 (monitor_output): Move to remote-utils.h, and include it.
6996 * remote-utils.h: New file.
6997
eebdf26b
PA
69982013-09-05 Pedro Alves <palves@redhat.com>
6999
7000 * server.h (_): Delete.
7001
3aafd2ff
PA
70022013-09-02 Pedro Alves <palves@redhat.com>
7003
7004 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7005 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7006 allocated.
7007 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7008
cee83bcb
PM
70092013-09-02 Pierre Muller <muller@sourceware.org>
7010
7011 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7012 or WriteProcessMemory complete successfully and handle
7013 ERROR_PARTIAL_COPY error.
7014
9a13b2fa
PA
70152013-09-02 Pedro Alves <palves@redhat.com>
7016
7017 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7018 error instead of EIO.
7019
602e3198
JK
70202013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7021
7022 PR server/15604
7023 * linux-low.c: Include filestuff.h.
7024 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7025 * lynx-low.c: Include filestuff.h.
7026 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7027 * server.c: Include filestuff.h.
7028 (main): Call notice_open_fds.
7029 * spu-low.c: Include filestuff.h.
7030 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7031
96d7229d
LM
70322013-08-22 Luis Machado <lgustavo@codesourcery.com>
7033
7034 * Makefile.in: Explain why ../target and ../nat are not
7035 listed as include file search paths.
7036 (linux-waitpid.o): New object file rule.
7037 * configure.srv (srv_native_linux_obj): New variable.
7038 Replace all occurrences of linux native object files with
7039 $srv_native_linux_obj.
7040 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7041 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7042 (linux_enable_event_reporting): Remove declaration.
7043 (my_waitpid): Moved to common/linux-waitpid.c.
7044 (linux_wait_for_event): Pass ptid when calling
7045 linux_enable_event_reporting.
7046 (linux_supports_tracefork_flag): Remove.
7047 (linux_enable_event_reporting): Likewise.
7048 (linux_tracefork_grandchild): Remove.
7049 (STACK_SIZE): Moved to common/linux-ptrace.c.
7050 (linux_tracefork_child): Remove.
7051 (linux_test_for_tracefork): Remove.
7052 (linux_look_up_symbols): Call linux_supports_traceclone.
7053 (initialize_low): Remove call to linux_test_for_tracefork.
7054 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7055 common/linux-ptrace.h.
7056 (PTRACE_TYPE_ARG4): Likewise.
7057 Include linux-ptrace.h.
7058
32940073
PA
70592013-08-21 Pedro Alves <palves@redhat.com>
7060
7061 * config.in: Renegerate.
7062
33b60d58 70632013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7064
33b60d58
LM
7065 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7066 (SFILES): Remove $(srcdir)/common/target-common.c and
7067 add $(srcdir)/target/waitstatus.c.
7068 (OBS): Remove target-common.o and add waitstatus.o.
7069 (server_h): Remove $(srcdir)/../common/target-common.h and
7070 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7071 and $(srcdir)/../target/waitstatus.h.
7072 (target-common.o): Remove.
7073 (waitstatus.o): New target object file.
7074 * target.h: Do not include target-common.h and
7075 include target/resume.h, target/wait.h and
7076 target/waitstatus.h.
7077
b8e1b30e
LM
70782013-08-13 Luis Machado <lgustavo@codesourcery.com>
7079
7080 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7081 to PTRACE_TYPE_ARG3.
7082 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7083 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7084 PTRACE_TYPE_ARG4.
7085 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7086 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7087
7a60ad40
YQ
70882013-07-27 Jie Zhang <jie@codesourcery.com>
7089 Daniel Jacobowitz <dan@codesourcery.com>
7090 Yao Qi <yao@codesourcery.com>
7091
7092 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7093 (mips-linux-watch.o): New rule.
7094 (mips_linux_watch_h): New variable.
7095 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7096 srv_tgtobj.
7097 * linux-mips-low.c: Include mips-linux-watch.h.
7098 (struct arch_process_info, struct arch_lwp_info): New.
7099 (update_watch_registers_callback): New function.
7100 (mips_linux_new_process, mips_linux_new_thread) New functions.
7101 (mips_linux_prepare_to_resume, mips_insert_point): New
7102 functions.
7103 (mips_remove_point, mips_stopped_by_watchpoint): New
7104 functions.
7105 (rsp_bp_type_to_target_hw_bp_type): New function.
7106 (mips_stopped_data_address): New function.
7107 (the_low_target): Add watchpoint support functions.
7108
de6f69ad
YQ
71092013-07-27 Yao Qi <yao@codesourcery.com>
7110
7111 * i386-low.c: Include break-common.h.
7112 (enum target_hw_bp_type): Remove.
7113
3360c0bf
LM
71142013-07-24 Luis Machado <lgustavo@codesourcery.com>
7115
7116 * Makefile.in (SFILES): /common/target-common.c.
7117 (OBS): Add target-common.o.
7118 (server_h): Add $(srcdir)/../common/target-common.h.
7119 (target-common.o): New target.
7120 * server.c (queue_stop_reply_callback): Free
7121 status string after use.
7122 * target.c (target_waitstatus_to_string): Remove.
7123 * target.h: Include target-common.h.
7124 (resume_kind): Likewise.
7125 (target_waitkind): Likewise.
7126 (target_waitstatus): Likewise.
7127 (TARGET_WNOHANG): Likewise.
7128
bd885420
YQ
71292013-07-04 Yao Qi <yao@codesourcery.com>
7130
7131 * Makefile.in (host_alias): Use @host_noncanonical@.
7132 (target_alias): Use @target_noncanonical@.
7133 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7134 ACX_NONCANONICAL_HOST.
7135 * configure: Regenerated.
7136
7137 Revert:
7138 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7139
7140 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7141 * configure: Rebuild.
7142 * Makefile.in (version_host, version_target): Get from configure.
7143 (version.c): Use $(version_host) and $(version_target).
7144
17ef446e
PA
71452013-07-03 Pedro Alves <palves@redhat.com>
7146
7147 * Makefile.in (config.status): Depend on development.sh.
7148 * acinclude.m4: Include libmcheck.m4.
7149 * configure: Regenerate.
7150
7a9a7487
MG
71512013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7152
7153 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7154 attribute inside the parentheses.
7155 (winapi_DebugSetProcessKillOnExit): Ditto.
7156 (winapi_DebugBreakProcess): Ditto.
7157 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7158
49b64de6
MG
71592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7160
7161 * notif.h (notif_event): Add a dummy member to avoid compiler
7162 errors.
7163
d5749ee7
PA
71642013-07-01 Pedro Alves <palves@redhat.com>
7165
7166 * hostio.c (HOSTIO_PATH_MAX): Define.
7167 (require_filename, handle_open, handle_unlink, handle_readlink):
7168 Use it.
7169
d8d2a3ee
PA
71702013-07-01 Pedro Alves <palves@redhat.com>
7171
7172 * server.h: Include "pathmax.h".
7173 * linux-low.c: Don't include sys/param.h.
7174 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7175 MAXPATHLEN.
7176 * win32-low.c: Don't include sys/param.h.
7177 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7178
bc7dea8d
PA
71792013-07-01 Pedro Alves <palves@redhat.com>
7180
7181 * event-loop.c: Don't check HAVE_UNISTD_H before including
7182 <unistd.h>.
7183 * gdbreplay.c: Likewise.
7184 * remote-utils.c: Likewise.
7185 * server.c: Likewise.
7186 * configure.ac: Don't check for unistd.h.
7187 * configure: Regenerate.
7188
d6c2da54
TT
71892013-06-28 Tom Tromey <tromey@redhat.com>
7190
7191 * Makefile.in (version.c): Use version.in, not
7192 common/version.in.
7193
257b6bec
MG
71942013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7195
7196 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7197 * configure: Rebuild.
7198 * Makefile.in (version_host, version_target): Get from configure.
7199 (version.c): Use $(version_host) and $(version_target).
7200
86ebe149
DK
72012013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7202
7203 Fix trace-status to output user name without trailing colon.
7204 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7205
f30aa5af
DK
72062013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7207
7208 Fix trace-status to output proper start-time and stop-time.
7209 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7210 output start time and stop time in hex as gdb expects.
7211
28a93511
YQ
72122013-06-26 Pedro Alves <pedro@codesourcery.com>
7213
7214 * tracepoint.c (build_traceframe_info_xml): Output trace state
7215 variables present in the trace buffer.
7216
01208463
TT
72172013-06-24 Tom Tromey <tromey@redhat.com>
7218
7219 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7220 create-version.sh.
7221 (version.o): Remove.
7222 * gdbreplay.c: Include version.h.
7223 (version, host_name): Don't declare.
7224 * server.h: Include version.h.
7225 (version, host_name): Don't declare.
7226
760256f9
PA
72272013-06-12 Pedro Alves <palves@redhat.com>
7228
7229 * linux-x86-low.c (linux_is_elf64): Delete global.
7230 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7231 with local linux_pid_exe_is_elf_64_file use.
7232
030031ee
PA
72332013-06-11 Pedro Alves <palves@redhat.com>
7234
7235 * linux-low.c (regset_disabled, disable_regset): New functions.
7236 (regsets_fetch_inferior_registers)
7237 (regsets_store_inferior_registers): Use them.
7238 (initialize_regsets_info); Don't allocate the disabled_regsets
7239 array here.
7240 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7241 comment.
7242
5da6eb0a
PA
72432013-06-11 Pedro Alves <palves@redhat.com>
7244
7245 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7246 xmalloc.
7247
7e5aaa09
PA
72482013-06-11 Pedro Alves <palves@redhat.com>
7249
7250 * linux-x86-low.c (initialize_low_arch): Call
7251 init_registers_x32_avx_linux.
7252
d878444c
JK
72532013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7254
7255 Fix compatibility with Android Bionic.
7256 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7257 it is not empty.
7258
3aee8918
PA
72592013-06-07 Pedro Alves <palves@redhat.com>
7260
5f2b57b5 7261 PR server/14823
3aee8918
PA
7262 * Makefile.in (OBS): Add tdesc.o.
7263 (IPA_OBJS): Add tdesc-ipa.o.
7264 (tdesc-ipa.o): New rule.
7265 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7266 interface.
7267 * linux-low.c (new_inferior): Delete.
7268 (disabled_regsets, num_regsets): Delete.
7269 (linux_add_process): Adjust to set the new per-process
7270 new_inferior flag.
7271 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7272 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7273 was a stop. When calling arch_setup, switch the current inferior
7274 to the thread that got an event.
7275 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7276 (regsets_fetch_inferior_registers)
7277 (regsets_store_inferior_registers): New regsets_info parameter.
7278 Adjust to use it.
7279 (linux_register_in_regsets): New regs_info parameter. Adjust to
7280 use it.
7281 (register_addr, fetch_register, store_register): New usrregs_info
7282 parameter. Adjust to use it.
7283 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7284 parameter regs_info. Adjust to use it.
7285 (linux_fetch_registers): Get the current inferior's regs_info, and
7286 adjust to use it.
7287 (linux_store_registers): Ditto.
7288 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7289 (initialize_low): Don't initialize the target_regsets here. Call
7290 initialize_low_arch.
7291 * linux-low.h (target_regsets): Delete declaration.
7292 (struct regsets_info): New.
7293 (struct usrregs_info): New.
7294 (struct regs_info): New.
7295 (struct process_info_private) <new_inferior>: New field.
7296 (struct linux_target_ops): Delete the num_regs, regmap, and
7297 regset_bitmap fields. New field regs_info.
7298 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7299 * i387-fp.c (num_xmm_registers): Delete.
7300 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7301 calls to new interface.
7302 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7303 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7304 Infer the number of xmm registers from the regcache's target
7305 description.
7306 * i387-fp.h (num_xmm_registers): Delete.
7307 * inferiors.c (add_thread): Don't install the thread's regcache
7308 here.
7309 * proc-service.c (gregset_info): Fetch the current inferior's
7310 regs_info. Adjust to use it.
7311 * regcache.c: Include tdesc.h.
7312 (register_bytes, reg_defs, num_registers)
7313 (gdbserver_expedite_regs): Delete.
7314 (get_thread_regcache): If the thread doesn't have a regcache yet,
7315 create one, instead of aborting gdbserver.
7316 (regcache_invalidate_one): Rename to ...
7317 (regcache_invalidate_thread): ... this.
7318 (regcache_invalidate_one): New.
7319 (regcache_invalidate): Only invalidate registers of the current
7320 process.
7321 (init_register_cache): Add target_desc parameter, and use it.
7322 (new_register_cache): Ditto. Assert the target description has a
7323 non zero registers_size.
7324 (regcache_cpy): Add assertions. Adjust.
7325 (realloc_register_cache, set_register_cache): Delete.
7326 (registers_to_string, registers_from_string): Adjust.
7327 (find_register_by_name, find_regno, find_register_by_number)
7328 (register_cache_size): Add target_desc parameter, and use it.
7329 (free_register_cache_thread, free_register_cache_thread_one)
7330 (regcache_release, register_cache_size): New.
7331 (register_size): Add target_desc parameter, and use it.
7332 (register_data, supply_register, supply_register_zeroed)
7333 (supply_regblock, supply_register_by_name, collect_register)
7334 (collect_register_as_string, collect_register_by_name): Adjust.
7335 * regcache.h (struct target_desc): Forward declare.
7336 (struct regcache) <tdesc>: New field.
7337 (init_register_cache, new_register_cache): Add target_desc
7338 parameter.
7339 (regcache_invalidate_thread): Declare.
7340 (regcache_invalidate_one): Delete declaration.
7341 (regcache_release): Declare.
7342 (find_register_by_number, register_cache_size, register_size)
7343 (find_regno): Add target_desc parameter.
7344 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7345 declarations.
7346 * remote-utils.c: Include tdesc.h.
7347 (outreg, prepare_resume_reply): Adjust.
7348 * server.c: Include tdesc.h.
7349 (gdbserver_xmltarget): Delete declaration.
7350 (get_features_xml, process_serial_event): Adjust.
7351 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7352 declare.
7353 (struct process_info) <tdesc>: New field.
7354 (ipa_tdesc): Declare.
7355 * tdesc.c: New file.
7356 * tdesc.h: New file.
7357 * tracepoint.c: Include tdesc.h.
7358 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7359 (get_context_regcache): Adjust to pass ipa_tdesc down.
7360 (do_action_at_tracepoint): Adjust to get the register cache size
7361 from the context regcache's description.
7362 (traceframe_walk_blocks): Adjust to get the register cache size
7363 from the current trace frame's description.
7364 (traceframe_get_pc): Adjust to get current trace frame's
7365 description and pass it down.
7366 (gdb_collect): Adjust to get the register cache size from the
7367 IPA's description.
7368 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7369 (gdbserver_xmltarget): Delete.
7370 (initialize_low_tracepoint): Set the ipa's target description.
7371 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7372 (initialize_low_tracepoint): Set the ipa's target description.
7373 * linux-x86-low.c: Include tdesc.h.
7374 [__x86_64__] (is_64bit_tdesc): New.
7375 (ps_get_thread_area, x86_get_thread_area): Use it.
7376 (i386_cannot_store_register): Rename to ...
7377 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7378 (i386_cannot_fetch_register): Rename to ...
7379 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7380 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7381 to new interface.
7382 (target_regsets): Rename to ...
7383 (x86_regsets): ... this.
7384 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7385 interface.
7386 (x86_siginfo_fixup): Use is_64bit_tdesc.
7387 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7388 (tdesc_x32_avx_linux, tdesc_x32_linux)
7389 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7390 Declare.
7391 (x86_linux_update_xmltarget): Delete.
7392 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7393 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7394 (AMD64_LINUX_USER64_CS): New.
7395 (x86_linux_read_description): New, based on
7396 x86_linux_update_xmltarget.
7397 (same_process_callback): New.
7398 (x86_arch_setup_process_callback): New.
7399 (x86_linux_update_xmltarget): New.
7400 (x86_regsets_info): New.
7401 (amd64_linux_regs_info): New.
7402 (i386_linux_usrregs_info): New.
7403 (i386_linux_regs_info): New.
7404 (x86_linux_regs_info): New.
7405 (x86_arch_setup): Reimplement.
7406 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7407 (x86_emit_ops): Ditto.
7408 (the_low_target): Adjust. Install x86_linux_regs_info,
7409 x86_cannot_fetch_register, and x86_cannot_store_register.
7410 (initialize_low_arch): New.
7411 * linux-ia64-low.c (tdesc_ia64): Declare.
7412 (ia64_fetch_register): Adjust.
7413 (ia64_usrregs_info, regs_info): New globals.
7414 (ia64_regs_info): New function.
7415 (the_low_target): Adjust.
7416 (initialize_low_arch): New function.
7417 * linux-sparc-low.c (tdesc_sparc64): Declare.
7418 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7419 Adjust.
7420 (sparc_arch_setup): New function.
7421 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7422 (the_low_target): Adjust.
7423 (initialize_low_arch): New function.
7424 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7425 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7426 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7427 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7428 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7429 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7430 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7431 (tdesc_powerpc_isa205_vsx64l): Declare.
7432 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7433 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7434 (ppc_set_pc, ppc_get_hwcap): Adjust.
7435 (ppc_usrregs_info): Forward declare.
7436 (!__powerpc64__) ppc_regmap_adjusted: New global.
7437 (ppc_arch_setup): Adjust to the current process'es target
7438 description.
7439 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7440 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7441 (ppc_store_evrregset): Adjust.
7442 (target_regsets): Rename to ...
7443 (ppc_regsets): ... this, and make static.
7444 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7445 (ppc_regs_info): New function.
7446 (the_low_target): Adjust.
7447 (initialize_low_arch): New function.
7448 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7449 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7450 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7451 (tdesc_s390x_linux64v2): Declare.
7452 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7453 (s390_fill_gregset, s390_store_last_break): Adjust.
7454 (target_regsets): Rename to ...
7455 (s390_regsets): ... this, and make static.
7456 (s390_get_pc, s390_set_pc): Adjust.
7457 (s390_get_hwcap): New target_desc parameter, and use it.
7458 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7459 (s390_arch_setup): Adjust to set the current process'es target
7460 description. Don't adjust the regmap.
7461 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7462 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7463 (regs_info_3264): New globals.
7464 (s390_regs_info): New function.
7465 (the_low_target): Adjust.
7466 (initialize_low_arch): New function.
7467 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7468 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7469 [__mips64] (init_registers_mips_linux)
7470 (init_registers_mips_dsp_linux): Delete defines.
7471 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7472 (have_dsp): New global.
7473 (mips_read_description): New, based on mips_arch_setup.
7474 (mips_arch_setup): Reimplement.
7475 (get_usrregs_info): New function.
7476 (mips_cannot_fetch_register, mips_cannot_store_register)
7477 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7478 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7479 (target_regsets): Rename to ...
7480 (mips_regsets): ... this, and make static.
7481 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7482 (dsp_regs_info, regs_info): New globals.
7483 (mips_regs_info): New function.
7484 (the_low_target): Adjust.
7485 (initialize_low_arch): New function.
7486 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7487 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7488 Declare.
7489 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7490 (arm_read_description): New, with bits factored from
7491 arm_arch_setup.
7492 (arm_arch_setup): Reimplement.
7493 (target_regsets): Rename to ...
7494 (arm_regsets): ... this, and make static.
7495 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7496 (arm_regs_info): New function.
7497 (the_low_target): Adjust.
7498 (initialize_low_arch): New function.
7499 * linux-m68k-low.c (tdesc_m68k): Declare.
7500 (target_regsets): Rename to ...
7501 (m68k_regsets): ... this, and make static.
7502 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7503 (m68k_regs_info): New function.
7504 (m68k_arch_setup): New function.
7505 (the_low_target): Adjust.
7506 (initialize_low_arch): New function.
7507 * linux-sh-low.c (tdesc_sharch): Declare.
7508 (target_regsets): Rename to ...
7509 (sh_regsets): ... this, and make static.
7510 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7511 (sh_regs_info, sh_arch_setup): New functions.
7512 (the_low_target): Adjust.
7513 (initialize_low_arch): New function.
7514 * linux-bfin-low.c (tdesc_bfin): Declare.
7515 (bfin_arch_setup): New function.
7516 (bfin_usrregs_info, regs_info): New globals.
7517 (bfin_regs_info): New function.
7518 (the_low_target): Adjust.
7519 (initialize_low_arch): New function.
7520 * linux-cris-low.c (tdesc_cris): Declare.
7521 (cris_arch_setup): New function.
7522 (cris_usrregs_info, regs_info): New globals.
7523 (cris_regs_info): New function.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-cris-low.c (tdesc_crisv32): Declare.
7527 (cris_arch_setup): New function.
7528 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7529 (cris_regs_info): New function.
7530 (the_low_target): Adjust.
7531 (initialize_low_arch): New function.
7532 * linux-m32r-low.c (tdesc_m32r): Declare.
7533 (m32r_arch_setup): New function.
7534 (m32r_usrregs_info, regs_info): New globals.
7535 (m32r_regs_info): Adjust.
7536 (initialize_low_arch): New function.
7537 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7538 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7539 (tic6x_usrregs_info): Forward declare.
7540 (tic6x_read_description): New function, based on ...
7541 (tic6x_arch_setup): ... this. Reimplement.
7542 (target_regsets): Rename to ...
7543 (tic6x_regsets): ... this, and make static.
7544 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7545 (tic6x_regs_info): New function.
7546 (the_low_target): Adjust.
7547 (initialize_low_arch): New function.
7548 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7549 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7550 (target_regsets): Rename to ...
7551 (xtensa_regsets): ... this, and make static.
7552 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7553 globals.
7554 (xtensa_arch_setup, xtensa_regs_info): New functions.
7555 (the_low_target): Adjust.
7556 (initialize_low_arch): New function.
7557 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7558 (nios2_arch_setup): Set the current process'es tdesc.
7559 (target_regsets): Rename to ...
7560 (nios2_regsets): ... this.
7561 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7562 (nios2_regs_info): New function.
7563 (the_low_target): Adjust.
7564 (initialize_low_arch): New function.
a261b8f5
PA
7565 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7566 (aarch64_arch_setup): Set the current process'es tdesc.
7567 (target_regsets): Rename to ...
7568 (aarch64_regsets): ... this.
7569 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7570 (aarch64_regs_info): New function.
7571 (the_low_target): Adjust.
7572 (initialize_low_arch): New function.
3aee8918
PA
7573 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7574 globals.
7575 (target_regsets): Rename to ...
7576 (tile_regsets): ... this.
7577 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7578 (tile_regs_info): New function.
7579 (tile_arch_setup): Set the current process'es tdesc.
7580 (the_low_target): Adjust.
7581 (initialize_low_arch): New function.
7582 * spu-low.c (tdesc_spu): Declare.
7583 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7584 * win32-arm-low.c (tdesc_arm): Declare.
7585 (arm_arch_setup): New function.
7586 (the_low_target): Install arm_arch_setup instead of
7587 init_registers_arm.
7588 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7589 (init_windows_x86): Rename to ...
7590 (i386_arch_setup): ... this. Set `win32_tdesc'.
7591 (the_low_target): Adjust.
7592 * win32-low.c (win32_tdesc): New global.
7593 (child_add_thread): Don't create the thread cache here.
7594 (do_initial_child_stuff): Set the new process'es tdesc.
7595 * win32-low.h (struct target_desc): Forward declare.
7596 (win32_tdesc): Declare.
7597 * lynx-i386-low.c (tdesc_i386): Declare global.
7598 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7599 * lynx-low.c (lynx_tdesc): New global.
7600 (lynx_add_process): Set the new process'es tdesc.
7601 * lynx-low.h (struct target_desc): Forward declare.
7602 (lynx_tdesc): Declare global.
7603 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7604 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7605 * nto-low.c (nto_tdesc): New global.
7606 (do_attach): Set the new process'es tdesc.
7607 * nto-low.h (struct target_desc): Forward declare.
7608 (nto_tdesc): Declare.
7609 * nto-x86-low.c (tdesc_i386): Declare.
7610 (nto_x86_arch_setup): Set `nto_tdesc'.
7611
b1fbec62
GB
76122013-06-04 Gary Benson <gbenson@redhat.com>
7613
7614 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7615 to qSupported response when appropriate.
7616 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7617 with nonzero-length annex.
7618 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7619 arguments supplied in annex.
7620
d1ec4ce7
DE
76212013-05-31 Doug Evans <dje@google.com>
7622
ac44adcb 7623 PR server/15594
d1ec4ce7
DE
7624 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7625 64 bits in 64-cross-32 environment.
7626
9b25f2d3
PA
76272013-05-28 Pedro Alves <palves@redhat.com>
7628
7629 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7630 (aarch64-without-fpu.c): Delete rule.
7631 * configure.srv (aarch64*-*-linux*): Remove references to
7632 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7633 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7634 declaration.
7635
6740dc9c
PA
76362013-05-24 Pedro Alves <palves@redhat.com>
7637
7638 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7639 instead of strchr/decode_address. Error if the range isn't split
7640 with a ','. Don't assume there's be a ':' in the action.
7641
c2d6af84
PA
76422013-05-23 Yao Qi <yao@codesourcery.com>
7643 Pedro Alves <palves@redhat.com>
7644
7645 * linux-low.c (lwp_in_step_range): New function.
7646 (linux_wait_1): If the thread was range stepping and stopped
7647 outside the stepping range, report the stop to GDB. Otherwise,
7648 continue stepping. Add range stepping debug output.
7649 (linux_set_resume_request): Copy the step range from the resume
7650 request to the lwp.
7651 (linux_supports_range_stepping): New.
7652 (linux_target_ops) <supports_range_stepping>: Set to
7653 linux_supports_range_stepping.
7654 * linux-low.h (struct linux_target_ops)
7655 <supports_range_stepping>: New field.
7656 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7657 * linux-x86-low.c (x86_supports_range_stepping): New.
7658 (the_low_target) <supports_range_stepping>: Set to
7659 x86_supports_range_stepping.
7660 * server.c (handle_v_cont): Handle 'r' action.
7661 (handle_v_requests): Append ";r" if the target supports range
7662 stepping.
7663 * target.h (struct thread_resume) <step_range_start,
7664 step_range_end>: New fields.
7665 (struct target_ops) <supports_range_stepping>:
7666 New field.
7667 (target_supports_range_stepping): New macro.
7668
58794e1a
JB
76692013-05-17 Joel Brobecker <brobecker@adacore.com>
7670
7671 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7672 confusion in comment.
7673
d631c5a7
JB
76742013-05-17 Joel Brobecker <brobecker@adacore.com>
7675
7676 * lynx-low.c (struct process_info_private): New type.
7677 (lynx_add_process): New function.
7678 (lynx_create_inferior, lynx_attach): Replace calls to
7679 add_process by calls to lynx_add_process.
7680 (lynx_resume): If PTID is null, then try using
7681 current_process()->private->last_wait_event_ptid.
7682 Add comments.
7683 (lynx_clear_inferiors): Delete. The contents of that function
7684 has been inlined in lynx_mourn;
7685 (lynx_wait_1): Save the ptid in the process's private data.
7686 (lynx_mourn): Free the process' private data. Replace call
7687 to lynx_clear_inferiors by call to clear_inferiors.
7688
96f7a20f
YQ
76892013-05-17 Yao Qi <yao@codesourcery.com>
7690
7691 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7692 the right place.
7693
db0dfaa0
LM
76942013-05-16 Luis Machado <lgustavo@codesourcery.com>
7695
7696 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7697 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7698 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7699 PT_TEXT_END_ADDR guards. Update comments.
7700 (linux_target_op) <read_offsets>: Conditionally define to
7701 linux_read_offsets if the target is UCLIBC and if it defines
7702 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7703
68f5f838
SL
77042013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7705 Andrew Jenner <andrew@codesourcery.com>
7706
7707 * Makefile.in (SFILES): Add linux-nios2-low.c.
7708 (clean): Add action to delete nios2-linux.c.
7709 (nios2-linux.c): New rule.
7710 * configure.srv: Add nios2*-*-linux*.
7711 * linux-nios2-low.c: New.
7712
1ebff1fd
HAQ
77132013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7714
7715 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7716
f6150862
HZ
77172013-04-25 Hui Zhu <hui@codesourcery.com>
7718
7719 PR gdb/15186
f6150862
HZ
7720 * ax.c (ax_printf): Add fflush.
7721
614c279d
TT
77222013-04-22 Tom Tromey <tromey@redhat.com>
7723
7724 * Makefile.in (SFILES): Add filestuff.c.
7725 (OBS): Add filestuff.o.
7726 (filestuff.o): New target.
7727 * config.in, configure: Rebuild.
7728 * configure.ac: Check for fdwalk, pipe2.
7729
7d4e5717
PA
77302013-04-17 Pedro Alves <palves@redhat.com>
7731
7732 * configure.ac (USE_THREAD_DB): Delete variable.
7733 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7734 Don't AC_SUBST USE_THREAD_DB.
7735 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7736 * config.in, configure: Regenerate.
7737
d5c93e41
PA
77382013-04-16 Pedro Alves <palves@redhat.com>
7739
7740 * linux-low.h (struct lwp_info) <thread_known>: Move under
7741 the USE_THREAD_DB #ifdef.
7742
04f5fe89
PA
77432013-04-16 Pedro Alves <palves@redhat.com>
7744
7745 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7746 (linux-low.o): Delete rule.
7747 * linux-low.h: Always include "gdb_thread_db.h" instead of
7748 conditionally including thread_db.h.
7749 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7750 HAVE_THREAD_DB_H.
7751
480b27bf
JK
77522013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7753
7754 * Makefile.in (install-only): Fix make install regression.
7755
43662968
JK
77562013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7757
7758 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7759 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7760 installation.
7761 * gdbserver.1: Remove.
7762
3e74e146
PA
77632013-03-22 Pedro Alves <palves@redhat.com>
7764
7765 * linux-low.c (handle_extended_wait): Don't call
7766 linux_enable_event_reporting.
7767
a8347a2a
TT
77682013-03-15 Tony Theodore <tonyt@logyst.com>
7769
7770 PR build/9098:
7771 * Makefile.in (SHELL): Use @SHELL@.
7772
eeb56fa7
SDJ
77732013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7774
7775 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7776 compiler warning.
7777
4fa7e2ff
JB
77782013-03-13 Joel Brobecker <brobecker@adacore.com>
7779
7780 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7781 Remove extraneous NULL element.
7782
8ddb1965
YQ
77832013-03-13 Yao Qi <yao@codesourcery.com>
7784
7785 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7786 'V' block in trace frame.
7787
9accd112
MM
77882013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7789
7790 * target.h (struct target_ops): Add btrace ops.
7791 (target_supports_btrace): New macro.
7792 (target_enable_btrace): New macro.
7793 (target_disable_btrace): New macro.
7794 (target_read_btrace): New macro.
7795 * gdbthread.h (struct thread_info): Add btrace field.
7796 * server.c: Include btrace-common.h.
7797 (handle_btrace_general_set): New function.
7798 (handle_btrace_enable): New function.
7799 (handle_btrace_disable): New function.
7800 (handle_general_set): Call handle_btrace_general_set.
7801 (handle_qxfer_btrace): New function.
7802 (struct qxfer qxfer_packets[]): Add btrace entry.
7803 * inferiors.c (remove_thread): Disable btrace.
7804 * linux-low: Include linux-btrace.h.
7805 (linux_low_enable_btrace): New function.
7806 (linux_low_read_btrace): New function.
7807 (linux_target_ops): Add btrace ops.
7808 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7809 Add srv_linux_btrace=yes.
7810 (x86_64-*-linux*): Add linux-btrace.o.
7811 Add srv_linux_btrace=yes.
7812 * configure.ac: Define HAVE_LINUX_BTRACE.
7813 * config.in: Regenerated.
7814 * configure: Regenerated.
7815
5cc22e4c
MM
78162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7817
7818 * server.c (handle_qxfer): Preserve error message if -3 is
7819 returned.
7820 (qxfer): Document the -3 return value.
7821
7c97f91e
MM
78222013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7823
7824 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7825 (linux_btrace_h): New variable.
7826 (linux-btrace.o): New rule.
7827
be9a119c 78282013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7829 Hafiz Abid Qadeer <abidh@codesourcery.com>
7830
7831 * tracepoint.c (trace_buffer_size): New global.
7832 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7833 (init_trace_buffer): Change to one-argument function. Allocate
7834 trace buffer memory.
7835 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7836 handle QTBuffer:size packet.
7837 (cmd_bigqtbuffer_size): New function.
7838 (initialize_tracepoint): Call init_trace_buffer with
7839 DEFAULT_TRACE_BUFFER_SIZE.
7840 * server.c (handle_query): Add QTBuffer:size in the
7841 supported packets.
7842
e64f7499
YQ
78432013-03-07 Yao Qi <yao@codesourcery.com>
7844
7845 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7846 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7847 of -1.
7848 (cmd_qtsp): Adjust condition. Do post increment.
7849 Set cur_action and cur_step_action back to 0.
7850
f0ae6fc3
PA
78512013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7852
7853 PR server/15236
7854 * linux-low.c (linux_write_memory): Return early success if LEN is
7855 zero.
7856
b5b0b0af
CV
78572013-03-05 Corinna Vinschen <vinschen@redhat.de>
7858
334ad4a8 7859 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7860
589bc927
TT
78612013-02-28 Tom Tromey <tromey@redhat.com>
7862
7863 * configure.ac: Invoke AC_SYS_LARGEFILE.
7864 * configure, config.in: Rebuild.
7865
dfe07582
CV
78662013-02-28 Corinna Vinschen <vinschen@redhat.com>
7867
7868 * win32-low.c: Throughout, fix format strings and casts of
7869 printf-like functions to avoid type related warnings on all
7870 platforms.
7871 (get_child_debug_event): Print dwDebugEventCode as hex since
7872 that's how it's usually documented.
7873
736cd585
YQ
78742013-02-28 Yao Qi <yao@codesourcery.com>
7875
7876 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7877 pulongest.
7878
e1f58301
JW
78792013-02-27 Jiong Wang <jiwang@tilera.com>
7880
7881 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7882 (reg-tilegx32.c): New rule.
7883 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7884 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7885 different register info initializer according to elf class.
7886 (init_registers_tilgx32): New function. The tilegx32 register info
7887 initializer.
7888 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7889 (tile_store_gregset): Likewise.
7890
d171ca78
YQ
78912013-02-27 Yao Qi <yao@codesourcery.com>
7892
7893 * server.c (process_point_options): Print debug message when
7894 debug_threads is true.
7895
282bbdf3
YQ
78962013-02-26 Yao Qi <yao@codesourcery.com>
7897
7898 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7899
aca22551
PA
79002013-02-19 Pedro Alves <palves@redhat.com>
7901 Kai Tietz <ktietz@redhat.com>
7902
7903 PR gdb/15161
7904
7905 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7906 instead of strtoul to extract address from packet.
7907 (process_serial_event) <'z'>: Likewise.
7908
4f3cee1c
YQ
79092013-02-18 Yao Qi <yao@codesourcery.com>
7910
7911 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7912
8e1d55a3
PA
79132013-02-14 Pedro Alves <palves@redhat.com>
7914
7915 Plug memory leak.
7916
7917 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7918 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7919
458820da
PA
79202013-02-14 Pedro Alves <palves@redhat.com>
7921
7922 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7923
baea0dae
PA
79242013-02-14 Pedro Alves <palves@redhat.com>
7925
7926 * tracepoint.c (save_string): Delete.
7927 (add_tracepoint_action): Use savestring instead of save_string.
7928
0b1afbb3
PA
79292013-02-12 Pedro Alves <palves@redhat.com>
7930
7931 * linux-xtensa-low.c: Ditto.
7932 * xtensa-xtregs.c: Ditto.
7933
8a4ac37e
PA
79342013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7935
7936 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7937 thread_db.
7938
148de6bb
MS
79392013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7940
7941 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7942 aarch64_num_wp_regs and aarch64_num_bp_regs to
7943 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7944
55fac6e0
MS
79452013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7946
7947 * linux-aarch64-low.c (ps_get_thread_area): Replace
7948 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7949
176eb98c
MS
79502013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7951 Marcus Shawcroft <marcus.shawcroft@arm.com>
7952 Nigel Stephens <nigel.stephens@arm.com>
7953 Yufeng Zhang <yufeng.zhang@arm.com>
7954
7955 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7956 (aarch64.c, aarch64-without-fpu.c): New targets.
7957 * configure.srv (aarch64*-*-linux*): New.
7958 * linux-aarch64-low.c: New file.
7959
56f7af9c
MS
79602013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7961
43aaf8b6 7962 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7963 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7964 (dequeue_one_deferred_signal, linux_resume_one_thread)
7965 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7966 (linux_tracefork_grandchild, linux_test_for_tracefork)
7967 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7968 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7969 where the argument is 0.
7970
60f662b0
YQ
79712013-01-25 Yao Qi <yao@codesourcery.com>
7972
7973 * event-loop.c: Include "queue.h".
7974 (gdb_event_p): New typedef.
7975 (struct gdb_event) <next_event>: Remove.
7976 (event_queue): Change to QUEUE(gdb_event_p).
7977 (async_queue_event): Remove.
7978 (gdb_event_xfree): New.
7979 (initialize_event_loop): New.
7980 (process_event): Use API from QUEUE.
7981 (wait_for_event): Likewise.
7982 * server.c (main): Call initialize_event_loop.
7983 * server.h (initialize_event_loop): Declare.
7984
5ae4861a
YQ
79852013-01-18 Yao Qi <yao@codesourcery.com>
7986
7987 * ax.h (struct eval_agent_expr_context): New.
7988 (gdb_eval_agent_expr): Update declaration.
7989 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7990 TFRAME. Add new argument CTX.
7991 * server.h (struct eval_agent_expr_context): Declare.
7992 (agent_mem_read, agent_tsv_read): Update declaration.
7993 (agent_mem_read_string): Likewise.
7994 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7995 (add_traceframe_block): Add new argument TPOINT.
7996 Increase TPOINT->traceframe_usage.
7997 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7998 eval_tracepoint_agent_expr.
7999 (condition_true_at_tracepoint): Likewise.
8000 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8001 (agent_mem_read_string, agent_tsv_read): Likewise.
8002
85e00e85
YQ
80032013-01-16 Yao Qi <yao@codesourcery.com>
8004
8005 * linux-low.c (linux_resume_one_lwp): Don't check
8006 'lwp->bp_reinsert != 0'.
8007
4039cf45
JB
80082013-01-07 Joel Brobecker <brobecker@adacore.com>
8009 Pedro Alves <palves@redhat.com>
8010
8011 * lynx-low.c (ptrace_request_to_str): Define a temporary
8012 macro and use it to simplify this function's implementation.
8013
9044dee2
JB
80142013-01-07 Joel Brobecker <brobecker@adacore.com>
8015
8016 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8017 sets errno.
8018
e6352c8f
JB
80192013-01-07 Joel Brobecker <brobecker@adacore.com>
8020
8021 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8022
50681a27
JB
80232013-01-07 Joel Brobecker <brobecker@adacore.com>
8024
8025 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8026
3f6e77ef
JB
80272013-01-07 Joel Brobecker <brobecker@adacore.com>
8028
8029 * lynx-low.c (lynx_resume): Use the resume_info parameter
8030 to determine the ptid for the lynx_ptrace call, unless
8031 it is equal to minus_one_ptid, in which case we use the
8032 ptid of the current_inferior.
8033 (lynx_wait_1): After having received a thread create/exit
8034 event, resume the inferior's execution using the signaling
8035 thread's ptid, rather than the old ptid.
8036
7fda33ae
JB
80372013-01-07 Joel Brobecker <brobecker@adacore.com>
8038
8039 * lynx-low.c (lynx_resume): Delete variable ret.
8040
b9786c74
JB
80412013-01-01 Joel Brobecker <brobecker@adacore.com>
8042
8043 * gdbreplay.c (gdbreplay_version): Update copyright year.
8044 * server.c (gdbserver_version): Likewise.
8045
8b93d60f
JB
80462012-12-17 Joel Brobecker <brobecker@adacore.com>
8047
8048 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8049 new thread.
8050
037335a7
JB
80512012-12-17 Joel Brobecker <brobecker@adacore.com>
8052
8053 * lynx-low.c (ptrace_request_to_str): Add handling for
8054 PTRACE_GETTRACESIG.
8055
52d4cbd8
JB
80562012-12-17 Joel Brobecker <brobecker@adacore.com>
8057
8058 * lynx-low.c (lynx_attach): Delete variable new_process.
8059
ab8f6ca9
JB
80602012-12-17 Joel Brobecker <brobecker@adacore.com>
8061
8062 * lynx-low.c (lynx_create_inferior): Delete variable
8063 new_process.
8064
78cbc024
JB
80652012-12-17 Joel Brobecker <brobecker@adacore.com>
8066
8067 * lynx-low.c (ptrace_request_to_str): Do not handle
8068 PTRACE_GETTHREADLIST if this macro does not exist.
8069
14a00470
YQ
80702012-12-15 Yao Qi <yao@codesourcery.com>
8071
8072 * Makefile.in (OBS): Add notif.o.
8073 * notif.c, notif.h: New.
8074 * server.c: Include "notif.h".
8075 (struct vstop_notif) <next>: Remove.
8076 <base>: New field.
8077 (queue_stop_reply): Update.
8078 (push_event, send_next_stop_reply): Remove.
8079 (discard_queued_stop_replies): Update.
8080 (notif_stop): New variable.
8081 (handle_v_stopped): Remove.
8082 (handle_v_requests): Don't call handle_v_stopped. Call
8083 handle_ack_notif instead.
8084 (queue_stop_reply_callback): Call notif_event_enque instead
8085 of queue_stop_reply.
8086 (handle_status): Don't call send_next_stop_reply, call
8087 notif_write_event instead.
8088 (kill_inferior_callback): Likewise.
8089 (detach_or_kill_inferior_callback): Likewise.
8090 (main): Call initialize_notif.
8091 (process_serial_event): Call QUEUE_is_empty.
8092 (handle_target_event): Call notif_push instead of push event.
8093 * server.h (push_event): Remove declaration.
8094
61c125b9
TT
80952012-12-10 Tom Tromey <tromey@redhat.com>
8096
8097 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8098 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8099 macros.
8100 (.c.o): Rewrite.
8101 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8102 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8103 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8104 (amd64-linux-ipa.o, ax.o): Rewrite.
8105 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8106 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8107 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8108 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8109 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8110 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8111 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8112 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8113 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8114 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8115 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8116 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8117 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8118 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8119 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8120 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8121 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8122 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8123 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8124 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8125 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8126 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8127 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8128 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8129 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8130 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8131 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8132 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8133 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8134 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8135 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8136 (reg-tilegx.o): Remove.
8137 (all_object_files): New macro.
8138 Include .deps files.
8139 * aclocal.m4, configure: Rebuild.
8140 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8141 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8142 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8143
e90e9ad9
TT
81442012-12-05 Tom Tromey <tromey@redhat.com>
8145
8146 PR gdb/14917:
8147 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8148
02d403bf 81492012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8150
8151 * configure.ac: Check for linux/perf_event.h.
8152 * config.in: Regenerated.
8153 * configure: Regenerated.
8154
0270a750
PA
81552012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8156
8157 * hostio.c (handle_readlink): Decrease buffer size
8158 parameter passed to readlink by one byte.
8159
8c29b58e
YQ
81602012-11-26 Yao Qi <yao@codesourcery.com>
8161
8162 * configure.ac (build_warnings): Append '-Wempty-body'.
8163 * configure: Regenerated.
8164 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8165 body.
8166
8bdce1ff
PM
81672012-11-15 Pierre Muller <muller@sourceware.org>
8168
8169 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8170 * config.in: Regenerate.
8171 * configure: Regenerate.
8172 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8173 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8174 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8175 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8176 header.
8177 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8178 instead of <sys/wait.h> header.
8179 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8180
02d403bf 81812012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8182
8183 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8184 (various make rules): Remove -DGDBSERVER
8185
fbd5db48
YQ
81862012-11-09 Yao Qi <yao@codesourcery.com>
8187
8188 * spu-low.c (current_ptid): Move it to ..
8189 * gdbthread.h: ... here. New.
8190 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8191 * server.c (myresume, process_serial_event): Likewise.
8192 * thread-db.c (thread_db_find_new_threads): Likewise.
8193 * tracepoint.c (run_inferior_command): Likewise.
8194
b3dc46ff
AB
81952012-10-01 Andrew Burgess <aburgess@broadcom.com>
8196
8197 * server.c (handle_search_memory_1): Include access length in
8198 warning message.
8199
07c04788
HPN
82002012-09-05 Michael Brandt <michael.brandt@axis.com>
8201
8202 * linux-crisv32-low.c: Fix compile errors.
8203
918d227b
YQ
82042012-09-04 Yao Qi <yao@codesourcery.com>
8205
8206 * tracepoint.c (cmd_qtsv): Adjust debug message.
8207 Don't check CUR_TPOINT.
8208
18c1b81a
YQ
82092012-08-28 Yao Qi <yao@codesourcery.com>
8210
8211 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8212 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8213 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8214 Remove declarations of xmalloc, xreallloc, xstrdup and
8215 freeargv.
8216 * Makefile.in (libiberty_h): New.
8217 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8218 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8219
dc82f37b
YQ
82202012-08-23 Yao Qi <yao@codesourcery.com>
8221
8222 * server.h: Remove declaration of 'xsnprintf'.
8223
406b1477
KS
82242012-08-22 Keith Seitz <keiths@redhat.com>
8225
8226 * server.h: Include build-gnulib-gbserver/config.h.
8227 * gdbreplay.c: Likewise.
8228
e6712ff1
DE
82292012-08-08 Doug Evans <dje@google.com>
8230
8231 * Makefile.in (SFILES): Add gdb_vecs.c.
8232 (OBS): Add gdb_vecs.o.
8233 (gdb_vecs_h, host_defs_h): New variables.
8234 (thread-db.o): Add $(gdb_vecs_h) dependency.
8235 (gdb_vecs.o): New rule.
8236 * thread-db.c: #include "gdb_vecs.h".
8237 (thread_db_load_search): Use a vector to iterate over path elements.
8238 Handle text appearing after "$pdir".
8239
8240 * configure.ac: Add check for strstr.
8241 * config.in: Regenerate.
8242 * configure: Regenerate.
8243
7c3270ae
UW
82442012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8245
8246 * hostio.c (handle_pread): If pread fails, fall back to attempting
8247 lseek/read.
8248 (handle_pwrite): Likewise for pwrite.
8249
b62e2b27
UW
82502012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8251
8252 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8253 between unsupported TYPE and unimplementable ADDR/LEN combination.
8254 (arm_insert_point): Act on new return value.
8255
78a99e91
PA
82562012-07-31 Pedro Alves <palves@redhat.com>
8257
8258 * server.c (process_point_options): Only skip tokens if we find
8259 one that is unrecognized. Don't treat 'X' specially while
8260 skipping unrecognized tokens.
8261
fcf303ab
UW
82622012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8263
8264 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8265 to 4-byte-align HW breakpoint addresses for Thumb.
8266
7255706c
YQ
82672012-07-27 Yao Qi <yao@codesourcery.com>
8268
8269 PR remote/14161.
8270
8271 * server.h: Declare gdb_agent_about_to_close.
8272 * target.c (kill_inferior): Include "agent.h".
8273 New. Send command 'kill'.
8274 * target.h (kill_inferior): Removed macro.
8275 * tracepoint.c (gdb_agent_about_to_close): New.
8276 (gdb_agent_helper_thread): Handle command 'close'.
8277 Wait endlessly until the inferior stops.
8278 Install gdb_agent_remove_socket to atexit hook.
8279 (agent_socket_name): New static variable.
8280 (gdb_agent_socket_init): Replace local variable 'name' with
8281 'agent_socket_name'.
8282 (gdb_agent_remove_socket): New.
8283
5a3f286f
YQ
82842012-07-27 Yao Qi <yao@codesourcery.com>
8285
8286 * server.c (process_point_options): Stop at 'X' when parsing.
8287
961bd387
ME
82882012-07-19 Michael Eager <eager@eagercon.com>
8289
a261b8f5 8290 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8291 to hw_execute.
8292 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8293 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8294 hardware breakpoint.
8295
aa7c7447
JK
82962012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8297
8298 * gdbserver/linux-low.c (initialize_low): Call
8299 linux_ptrace_init_warnings.
8300
7f216e7c
DE
83012012-07-02 Doug Evans <dje@google.com>
8302
8303 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8304 pointer to int.
8305
d3ce09f5
SS
83062012-07-02 Stan Shebs <stan@codesourcery.com>
8307
8308 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8309 (ax.o): Add it to build rule.
8310 (ax-ipa.o): Ditto.
8311 (OBS): Add format.o.
8312 (IPA_OBS): Add format.o.
8313 * server.c (handle_query): Claim support for breakpoint commands.
8314 (process_point_options): Add command case.
8315 (process_serial_event): Leave running if there are printfs in
8316 effect.
8317 * mem-break.h (any_persistent_commands): Declare.
8318 (add_breakpoint_commands): Declare.
8319 (gdb_no_commands_at_breakpoint): Declare.
8320 (run_breakpoint_commands): Declare.
8321 * mem-break.c (struct point_command_list): New struct.
8322 (struct breakpoint): New field command_list.
8323 (any_persistent_commands): New function.
8324 (add_commands_to_breakpoint): New function.
8325 (add_breakpoint_commands): New function.
8326 (gdb_no_commands_at_breakpoint): New function.
8327 (run_breakpoint_commands): New function.
8328 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8329 locally.
8330 * ax.c: Include format.h.
8331 (ax_printf): New function.
8332 (gdb_eval_agent_expr): Add printf opcode.
8333
2f8f6aed
YQ
83342012-06-13 Yao Qi <yao@codesourcery.com>
8335
8336 * server.c (start_inferior): Remove duplicated writes to fields
8337 'last_resume_kind' and 'last_status' of 'current_inferior'.
8338
0c9070b3
YQ
83392012-06-12 Yao Qi <yao@codesourcery.com>
8340 Pedro Alves <palves@redhat.com>
8341
8342 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8343 comment.
8344 * server.c (handle_v_cont): Extend comment.
8345
c52daf70
YQ
83462012-06-11 Yao Qi <yao@codesourcery.com>
8347
8348 * linux-low.c (linux_attach): Add 'static'.
8349
d38bbb0a
YQ
83502012-06-06 Yao Qi <yao@codesourcery.com>
8351
8352 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8353
89dc0afd
JK
83542012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8355
8356 Fix gcc -flto compilation warning.
8357 * server.c (main): Make variable multi_mode and attach volatile.
8358
75f62ce7
TJB
83592012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8360
8361 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8362 if the platform doesn't know about it.
8363
65f479b6
PA
83642012-05-30 Jeff Kenton <jkenton@tilera.com>
8365
8366 * Makefile.in (SFILES): Add linux-tile-low.c.
8367 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8368 * configure.srv: Handle tilegx-*-linux*.
8369 * linux-tile-low.c: New file.
8370
0c5bf5a9
JK
83712012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8372
8373 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8374
a493e3e2
PA
83752012-05-24 Pedro Alves <palves@redhat.com>
8376
8377 PR gdb/7205
8378
43aaf8b6 8379 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8380
2ea28649
PA
83812012-05-24 Pedro Alves <palves@redhat.com>
8382
8383 PR gdb/7205
8384
8385 Replace target_signal with gdb_signal throughout.
8386
8d409d16
MR
83872012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8388
8389 * linux-low.c (linux_store_registers): Avoid the copying sequence
8390 when no data has been retrieved by ptrace.
8391
23512c01
MGD
83922012-05-22 Will Deacon <will.deacon@arm.com>
8393
8394 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8395 Include asm/ptrace.h.
8396 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8397 already defined.
8398
4934b29e
MR
83992012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8400
8401 * linux-low.c (linux_store_registers): Don't re-retrieve data
8402 with ptrace that has already been obtained from /proc. Always
8403 copy any data retrieved with ptrace to the buffer supplied.
8404
bde24c0a
PA
84052012-05-11 Yao Qi <yao@codesourcery.com>
8406 Pedro Alves <palves@redhat.com>
8407
8408 * linux-low.c (enum stopping_threads_kind): New.
8409 (stopping_threads): Change type to `enum stopping_threads_kind'.
8410 (handle_extended_wait): If stopping and suspending threads, leave
8411 the new_lwp suspended too.
8412 (linux_wait_for_event): Adjust.
8413 (stop_all_lwps): Set `stopping_threads' to
8414 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8415 whether we're suspending threads or just stopping them. Assert no
8416 recursion happens.
8417
623b6bdf
YQ
84182012-04-29 Yao Qi <yao@codesourcery.com>
8419
8420 * server.h: Move some code to ...
8421 * gdbthread.h: ... here. New.
8422 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8423 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8424 (nto-low.o, win32-low.o): Likewise.
8425 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8426 * regcache.c, remote-utils.c, server.c: Likewise.
8427 * target.c, tracepoint.c, win32-low.c: Likewise.
8428
f15f9948
TJB
84292012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8430
8431 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8432 (PTRACE_ARG4_TYPE): Likewise.
8433 (PTRACE_XFER_TYPE): Likewise.
8434 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8435 ptrace to PTRACE_ARG3_TYPE.
8436 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8437 (PTRACE_ARG4_TYPE): Likewise.
8438 (PTRACE_XFER_TYPE): Likewise.
8439 (linux_detach_one_lwp): Cast fourth argument of
8440 ptrace to long then PTRACE_ARG4_TYPE.
8441 (regsets_fetch_inferior_registers): Cast third argument of
8442 ptrace to long then PTRACE_ARG3_TYPE.
8443 (regsets_store_inferior_registers): Likewise.
8444
38ea300a
PA
84452012-04-20 Pedro Alves <palves@redhat.com>
8446
8447 * configure: Regenerate.
8448
c971b7fa
PA
84492012-04-19 Pedro Alves <palves@redhat.com>
8450
43aaf8b6 8451 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8452 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8453 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8454 (all, install-only, uninstall, clean-info, all-lib, clean): No
8455 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8456 (maintainer-clean realclean distclean): Use subdir_do.
8457 (subdir_do): New.
8458 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8459 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8460 * acinclude.m4: Include acx_configure_dir.m4.
8461 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8462 calls. Call AC_PROG_RANLIB. Configure gnulib using
8463 ACX_CONFIGURE_DIR.
8464 (GNULIB): New.
8465 (GNULIB_STDINT_H): Adjust.
8466 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8467 * gdbreplay.c: Include build-gnulib/config.h.
8468 * server.h: Likewise.
8469 * aclocal.m4: Regenerate.
8470 * config.in: Regenerate.
8471 * configure: Regenerate.
c971b7fa 8472
809277f8
PA
84732012-04-19 Pedro Alves <palves@redhat.com>
8474
8475 * Makefile.in (LIBGNU, INCGNU): Adjust.
8476 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8477 (all, install-only, uninstall, clean-info, all-lib, clean)
8478 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8479 * configure.ac: Adjust AC_OUTPUT output.
8480 * aclocal.m4: Regenerate.
8481 * configure: Regenerate.
8482
fd9bb8b8
PA
84832012-04-19 Pedro Alves <palves@redhat.com>
8484
8485 * Makefile.in (generated_files): New.
8486 (server_h): Remove the explicit dependency on config.h, and depend
8487 on $generated_files.
8488
1c298c66
PA
84892012-04-19 Pedro Alves <palves@redhat.com>
8490
8491 * Makefile.in (INCGNU): Add -Ignulib.
8492
57c4b50b
PA
84932012-04-19 Pedro Alves <palves@redhat.com>
8494
8495 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8496 (INCGNU): ... this, and spell out -I here.
8497 (GNULIB_LIB): Rename to ...
8498 (LIBGNU): ... this.
8499 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8500
1030e047
PA
85012012-04-19 Pedro Alves <palves@redhat.com>
8502
8503 * config.in: Regenerate.
8504
447d4319
PA
85052012-04-19 Pedro Alves <palves@redhat.com>
8506
8507 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8508 * server.h (memmem): Remove declaration.
8509 * config.in: Regenerate.
8510 * configure: Regenerate.
8511
aad9eab9
YQ
85122012-04-19 Yao Qi <yao@codesourcery.com>
8513
8514 * Makefile.in (SFILES): Add common/vec.c.
8515 (OBS): Add vec.o.
8516 (vec.o): New rule.
8517
3e10640f
YQ
85182012-04-19 Yao Qi <yao@codesourcery.com>
8519
8520 * remote-utils.c (prepare_resume_reply): Replace with macro
8521 target_core_of_thread.
8522 * server.c (handle_qxfer_threads_proper): Likewise.
8523 * target.h (traget_core_of_thread): New macro.
8524
71622373
PA
85252012-04-18 Pedro Alves <palves@redhat.com>
8526
8527 * aclocal.m4: Regenerate.
8528 * configure: Regenerate.
8529
80d26939
YQ
85302012-04-16 Yao Qi <yao@codesourcery.com>
8531
8532 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8533 duplicated on address.
8534
42476b70
YQ
85352012-04-16 Yao Qi <yao@codesourcery.com>
8536
8537 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8538 (struct tracepoint_action_ops) <send>: New field.
8539 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8540 (agent_expr_send, x_tracepoint_action_send): New.
8541 (l_tracepoint_action_send): New.
8542 (cmd_qtdp): Download and install tracepoint
8543 according to `use_agent'.
8544 (run_inferior_command): Add one more parameter `len'.
8545 Update callers.
8546 (tracepoint_send_agent): New.
8547 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8548
7bc83639
YQ
85492012-04-16 Yao Qi <yao@codesourcery.com>
8550
8551 * tracepoint.c (download_tracepoints): Moved to ...
8552 (cmd_qtstart): ... here.
8553
5f18041e
YQ
85542012-04-14 Yao Qi <yao@codesourcery.com>
8555
8556 * tracepoint.c: Include inttypes.h.
8557 (struct collect_memory_action): Use sized types.
8558 (struct tracepoint): Likewise.
8559 (cmd_qtdp, stop_tracing): Update print specifiers.
8560 (cmd_qtp, response_tracepoint): Likewise.
8561 (collect_data_at_tracepoint): Likewise.
8562 (collect_data_at_step): Likewise.
8563
55a8c076
YQ
85642012-04-14 Yao Qi <yao@codesourcery.com>
8565
8566 Import gnulib module inttypes.
8567 * aclocal.m4, config.in, configure: Regenerated.
8568
dc750257
YQ
85692012-04-14 Yao Qi <yao@codesourcery.com>
8570
8571 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8572 Makefile and config.status at last.
8573
0ab5faf9
YQ
85742012-04-13 Yao Qi <yao@codesourcery.com>
8575
8576 * tracepoint.c: Include stdint.h unconditionally.
8577
18f5fd81
TJB
85782012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8579
8580 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8581 on BFD_HAVE_SYS_PROCFS_TYPE.
8582 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8583 * configure: Regenerate.
8584 * config.in: Likewise.
8585
4d47af5c
L
85862012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8587
8588 * Makefile.in (clean): Also remove x32.c x32-linux.c
8589 x32-avx.c x32-avx-linux.c.
8590 (x32.o): New target.
8591 (x32.c): Likewise.
8592 (x32-linux.o): Likewise.
8593 (x32-linux.c): Likewise.
8594 (x32-avx.o): Likewise.
8595 (x32-avx.c): Likewise.
8596 (x32-avx-linux.o): Likewise.
8597 (x32-avx-linux.c): Likewise.
8598
8599 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8600 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8601 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8602 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8603 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8604 i386/x32-avx-linux.xml.
8605
8606 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8607 (init_registers_x32_avx_linux): Likwise.
8608 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8609 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8610
ecedbe58
PA
86112012-04-13 Pedro Alves <palves@redhat.com>
8612
8613 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8614 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8615 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8616 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8617 the sub-make.
8618
c92b5177
L
86192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8620
8621 * linux-x86-low.c (compat_x32_clock_t): New.
8622 (compat_x32_siginfo_t): Likewise.
8623 (compat_x32_siginfo_from_siginfo): Likewise.
8624 (siginfo_from_compat_x32_siginfo): Likewise.
8625 (linux_is_elf64): Likewise.
8626 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8627 and siginfo_from_compat_x32_siginfo for x32.
8628 (x86_arch_setup): Set linux_is_elf64.
8629
214d508e
L
86302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8631
8632 PR gdb/13969
8633 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8634 e_machine field.
8635 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8636 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8637 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8638 compatible with process.
8639
c9a1864a
YQ
86402012-04-12 Yao Qi <yao@codesourcery.com>
8641
8642 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8643 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8644 (install-only, install-info, clean): Handle sub dir gnulib.
8645 (all-lib, am--refresh): New targets.
8646 (memmem.o): Remove target.
8647 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8648 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8649 (AC_REPLACE_FUNCS): Remove memmem.
8650 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8651 (AC_OUTPUT): Generate Makefile in gnulib/.
8652 * aclocal.m4, config.in, configure: Regenerated.
8653
367ba2c2
MR
86542012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8655
8656 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8657
9d236627
PA
86582012-04-05 Pedro Alves <palves@redhat.com>
8659
8660 -Werror=strict-aliasing
8661
8662 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8663 pointer.
8664
111217b3
PA
86652012-04-04 Pedro Alves <palves@redhat.com>
8666
8667 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8668 (sparc_store_gregset_from_stack, sparc_store_gregset)
8669 (sparc_breakpoint_at): Fix formatting.
8670
8365dcf5
TJB
86712012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8672
8673 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8674 are available.
8675 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8676 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8677 * config.in: Regenerate.
8678 * configure: Likewise.
8679
689cc2ae
PA
86802012-03-29 Pedro Alves <palves@redhat.com>
8681
8682 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8683 Correct ptrace arguments.
8684
c14dfd32
PA
86852012-03-28 Pedro Alves <palves@redhat.com>
8686
8687 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8688 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8689 (IA64_FR1_REGNUM): New defines.
8690 (ia64_fetch_register): New.
8691 (the_low_target): Install it.
8692 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8693 field.
8694 * linux-low.c (linux_fetch_registers): Try the
8695 the_low_target.fetch_register hook first.
8696
8697 * linux-arm-low.c (the_low_target): Adjust.
8698 * linux-bfin-low.c (the_low_target): Adjust.
8699 * linux-cris-low.c (the_low_target): Adjust.
8700 * linux-crisv32-low.c (the_low_target): Adjust.
8701 * linux-m32r-low.c (the_low_target): Adjust.
8702 * linux-m68k-low.c (the_low_target): Adjust.
8703 * linux-mips-low.c (the_low_target): Adjust.
8704 * linux-ppc-low.c (the_low_target): Adjust.
8705 * linux-s390-low.c (the_low_target): Adjust.
8706 * linux-sh-low.c (the_low_target): Adjust.
8707 * linux-sparc-low.c (the_low_target): Adjust.
8708 * linux-tic6x-low.c (the_low_target): Adjust.
8709 * linux-x86-low.c (the_low_target): Adjust.
8710 * linux-xtensa-low.c (the_low_target): Adjust.
8711
63c88e13
PA
87122012-03-26 Pedro Alves <palves@redhat.com>
8713
8714 * server.c (handle_qxfer_libraries): Don't bail early if
8715 the_target->qxfer_libraries_svr4 is not NULL.
8716
fb723180
PA
87172012-03-26 Pedro Alves <palves@redhat.com>
8718
8719 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8720
0afae3cf
PA
87212012-03-23 Pedro Alves <palves@redhat.com>
8722
8723 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8724 "library-list-svr4" element's start tag when the the DSO list is
8725 empty.
8726
485f1ee4
PA
87272012-03-23 Pedro Alves <palves@redhat.com>
8728
8729 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8730 a variable whose type size is the same as the inferior's pointer
8731 size.
8732
a5362b9a
TS
87332012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8734
8735 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8736 struct siginfo.
8737 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8738 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8739 * linux-low.h: Include <signal.h>.
8740 (struct siginfo): Remove forward declaration.
8741 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8742 struct siginfo.
8743
d226c142
MF
87442012-03-21 Mike Frysinger <vapier@gentoo.org>
8745
8746 * .gitignore: Ignore more files.
8747
122f36ef
PA
87482012-03-19 Pedro Alves <palves@redhat.com>
8749 Jan Kratochvil <jan.kratochvil@redhat.com>
8750
8751 * server.c (cont_thread, general_thread): Add describing comments.
8752 (start_inferior): Clear `cont_thread'.
8753 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8754 of a process.
8755
fc3e5175
YQ
87562012-03-15 Yao Qi <yao@codesourcery.com>
8757
8758 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8759 handling to ...
8760 (cmd_qtdp): ... here.
8761
8d0d92cd
YQ
87622012-03-15 Yao Qi <yao@codesourcery.com>
8763
8764 * tracepoint.c (struct tracepoint_action_ops): New.
8765 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8766 (m_tracepoint_action_download): New.
8767 (r_tracepoint_action_download): New.
8768 (x_tracepoint_action_download): New.
8769 (l_tracepoint_action_download): New.
8770 (add_tracepoint_action): Install `action->ops' according type.
8771 (download_tracepoint_1): Move code `download' function pointer
8772 of various tracepoint_action_ops.
8773
87b0bb13
JK
87742012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8775
8776 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8777 linux_ptrace_attach_warnings.
8778
5f572dec
JK
87792012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8780
8781 * Makefile.in (linux-ptrace.o): New.
8782 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8783 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8784 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8785 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8786 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8787 of these targets.
8788 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8789
f4647387
YQ
87902012-03-08 Yao Qi <yao@codesourcery.com>
8791 Pedro Alves <palves@redhat.com>
8792
8793 Fix PR server/13392.
8794 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8795 offset of JMP insn.
8796 * tracepoint.c (remove_tracepoint): New.
8797 (cmd_qtdp): Call remove_tracepoint when failed to install.
8798
9b224c5e
PA
87992012-03-07 Pedro Alves <palves@redhat.com>
8800
8801 * linux-low.c (get_detach_signal): New.
8802 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8803 Pass on pending signals to PTRACE_DETACH. Check the result of the
8804 ptrace call.
8805 * server.c (program_signals, program_signals_p): New.
8806 (handle_general_set): Handle QProgramSignals.
8807 * server.h (program_signals, program_signals_p): Declare.
8808
e237a7e2
JK
88092012-03-05 Pedro Alves <palves@redhat.com>
8810 Jan Kratochvil <jan.kratochvil@redhat.com>
8811
8812 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8813 New comment why.
8814
5808517f
YQ
88152012-03-03 Yao Qi <yao@codesourcery.com>
8816
8817 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8818 agent_look_up_symbols.
8819
58b4daa5
YQ
88202012-03-03 Yao Qi <yao@codesourcery.com>
8821
8822 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8823 (linux-x86-low.o): Likewise.
8824 * server.h: Remove in_process_agent_loaded.
8825 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8826 common/agent.c.
8827 Update callers.
8828
8ffcbaaf
YQ
88292012-03-03 Yao Qi <yao@codesourcery.com>
8830
8831 * tracepoint.c (gdb_agent_capability): New global.
8832 (in_process_agent_loaded_ust): Renamed to
8833 `in_process_agent_supports_ust'.
8834 Update callers.
8835 (in_process_agent_supports_ust): Call agent_capability_check.
8836 (clear_installed_tracepoints): Assert that agent supports
8837 agent.
8838
d1feda86
YQ
88392012-03-03 Yao Qi <yao@codesourcery.com>
8840
8841 * linux-low.c (linux_supports_agent): New.
8842 (linux_target_ops): Initialize field `supports_agent' with
8843 linux_supports_agent.
8844 * target.h (struct target_ops) <supports_agent>: New.
8845 (target_supports_agent): New macro.
8846 * server.c (handle_general_set): Handle packet 'QAgent'.
8847 (handle_query): Send `QAgent+'.
8848 * Makefile.in (server.o): Depends on agent.h.
8849
2fa291ac
YQ
88502012-03-03 Yao Qi <yao@codesourcery.com>
8851
8852 * Makefile.in (OBS): Add agent.o.
8853 Add new rule for agent.o.
8854 Track dependence of tracepoint.c on agent.h.
8855 * tracepoint.c (run_inferior_command_1):
8856 (run_inferior_command): Call agent_run_command.
8857 (gdb_ust_connect_sync_socket): Deleted. Move it to
8858 common/agent.c.
8859 (resume_thread, stop_thread): Likewise.
8860 (gdb_ust_socket_init): Renamed to ...
8861 (gdb_agent_socket_init): ... New.
8862 (gdb_ust_thread): Renamed to ...
8863 (gdb_agent_helper_thread): ... New.
8864 (gdb_ust_init): Move some code to ...
8865 (gdb_agent_init): ... here. New.
8866 [HAVE_UST]: Call gdb_ust_init.
8867 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8868 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8869 * config.in, configure: Regenerated.
8870
05044653
PA
88712012-03-02 Pedro Alves <palves@redhat.com>
8872
8873 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8874 * linux-low.c (struct simple_pid_list): New.
8875 (stopped_pids): New a struct simple_pid_list pointer.
8876 (add_to_pid_list, pull_pid_from_list): New.
8877 (handle_extended_wait): Don't assume the first signal new children
8878 report is SIGSTOP. Adjust call to pull_pid_from_list.
8879 (linux_wait_for_lwp): Adjust.
8880
8d00225b
YQ
88812012-03-02 Yao Qi <yao@codesourcery.com>
8882
8883 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8884 debug log.
8885
19560ba5
YQ
88862012-03-02 Yao Qi <yao@codesourcery.com>
8887
8888 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8889 `stop_pc' and `tpoint'. Update caller.
8890
1faeff08
MR
88912012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8892
8893 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8894 * linux-low.c (use_linux_regsets): New macro.
8895 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8896 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8897 (linux_register_in_regsets): New function.
8898 (usr_fetch_inferior_registers): Skip registers covered by
8899 regsets.
8900 (usr_store_inferior_registers): Likewise.
8901 (usr_fetch_inferior_registers): New macro.
8902 (usr_store_inferior_registers): Likewise.
8903 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8904 (linux_store_registers): Likewise.
8905 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8906 prototype.
8907 (init_registers_mips64_dsp_linux): Likewise.
8908 (init_registers_mips_linux): New macro.
8909 (init_registers_mips_dsp_linux): Likewise.
8910 (mips_dsp_num_regs): Likewise.
8911 (DSP_BASE, DSP_CONTROL): New fallback macros.
8912 (mips_base_regs): New macro.
8913 (mips_regmap): Use it. Fix the size.
8914 (mips_dsp_regmap): New variable.
8915 (mips_dsp_regset_bitmap): Likewise.
8916 (mips_arch_setup): New function.
8917 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8918 than mips_regmap.
8919 (mips_cannot_store_register): Likewise.
8920 (the_low_target): Update .arch_setup, .num_regs and .regmap
8921 initializers. Add .regset_bitmap initializer.
8922 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8923 initializer.
8924 * linux-bfin-low.c (the_low_target): Likewise.
8925 * linux-cris-low.c (the_low_target): Likewise.
8926 * linux-crisv32-low.c (the_low_target): Likewise.
8927 * linux-ia64-low.c (the_low_target): Likewise.
8928 * linux-m32r-low.c (the_low_target): Likewise.
8929 * linux-m68k-low.c (the_low_target): Likewise.
8930 * linux-ppc-low.c (the_low_target): Likewise.
8931 * linux-s390-low.c (the_low_target): Likewise.
8932 * linux-sh-low.c (the_low_target): Likewise.
8933 * linux-sparc-low.c (the_low_target): Likewise.
8934 * linux-tic6x-low.c (the_low_target): Likewise.
8935 * linux-x86-low.c (the_low_target): Likewise.
8936 * linux-xtensa-low.c (the_low_target): Likewise.
8937 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8938 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8939 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8940 srv_xmlfiles.
8941 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8942 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8943
c03e6ccc
YQ
89442012-02-29 Yao Qi <yao@codesourcery.com>
8945 Pedro Alves <palves@redhat.com>
8946
8947 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8948 `step_over_finished' is true.
8949
644cebc9
PA
89502012-02-27 Pedro Alves <palves@redhat.com>
8951
8952 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8953 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8954
c14d7ab2
PA
89552012-02-27 Pedro Alves <palves@redhat.com>
8956
8957 PR server/9684
8958 * linux-low.c (pid_is_stopped): New.
8959 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8960
412c89dd
LM
89612012-02-25 Luis Machado <lgustavo@codesourcery.com>
8962
8963 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8964 of conditions.
8965
b745defe
MR
89662012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8967
8968 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8969
9f3a5c85
LM
89702012-02-24 Luis Machado <lgustavo@codesourcery>
8971
8972 * server.c (handle_query): Advertise support for target-side
8973 breakpoint condition evaluation.
8974 (process_point_options): New function.
8975 (process_serial_event): When inserting a breakpoint, check for
8976 a target-side condition that should be evaluated.
8977
8978 * mem-break.c: Include regcache.h and ax.h.
8979 (point_cond_list_t): New data structure.
8980 (breakpoint) <cond_list>: New field.
8981 (find_gdb_breakpoint_at): Make non-static.
8982 (delete_gdb_breakpoint_at): Clear any target-side
8983 conditions.
8984 (clear_gdb_breakpoint_conditions): New function.
8985 (add_condition_to_breakpoint): Likewise.
8986 (add_breakpoint_condition): Likewise.
8987 (gdb_condition_true_at_breakpoint): Likewise.
8988 (gdb_breakpoint_here): Return result directly instead
8989 of going through a local variable.
8990
8991 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8992 (clear_gdb_breakpoint_conditions): Likewise.
8993 (add_breakpoint_condition): Likewise.
8994 (gdb_condition_true_at_breakpoint): Likewise.
8995
8996 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8997 (need_step_over_p): Take target-side breakpoint condition into
8998 consideration.
8999
5e1dc496
LM
90002012-02-24 Luis Machado <lgustavo@codesourcery>
9001
9002 * server.h: Include tracepoint.h.
9003 (agent_mem_read, agent_get_trace_state_variable_value,
9004 agent_set_trace_state_variable_value,
9005 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9006 get_set_tsv_func_addr): New prototypes.
9007
9008 * ax.h: New include file.
9009 * ax.c: New source file.
9010
9011 * tracepoint.c: Include ax.h.
9012 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9013 agent_expr, eval_result_type): Move to ax.h.
9014 (parse_agent_expr): Rename to ...
9015 (gdb_parse_agent_expr): ... this, make it non-static and move
9016 to ax.h.
9017 (unparse_agent_expr) Rename to ...
9018 (gdb_unparse_agent_expr): ... this, make it non-static and move
9019 to ax.h.
9020 (eval_agent_expr): Rename to ...
9021 (eval_tracepoint_agent_expr): ... this.
9022 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9023 forward declarations.
9024 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9025 (agent_get_trace_state_variable_value): New function.
9026 (agent_set_trace_state_variable_value): New function.
9027 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9028 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9029 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9030 (condition_true_at_tracepoint): Likewise.
9031 (parse_agent_expr): Rename to ...
9032 (gdb_parse_agent_expr): ... this and move to ax.c.
9033 (unparse_agent_expr): Rename to ...
9034 (gdb_unparse_agent_expr): ... this and move to ax.c.
9035 (gdb_agent_op_name): Move to ax.c.
9036 (eval_agent_expr): Rename to ...
9037 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9038 and move to ax.c.
9039 (eval_tracepoint_agent_expr): New function.
9040 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9041 non-static.
5e1dc496
LM
9042 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9043 ax.c.
9044 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9045 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9046 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9047 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9048 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9049 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9050 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9051 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9052 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9053 (compile_bytecodes): Remove forward declaration.
9054 (is_goto_target): Move to ax.c.
9055 (compile_bytecodes): Move to ax.c and call
9056 agent_get_trace_state_variable_value (...) and
9057 agent_set_trace_state_variable_value (...).
9058
9059 * Makefile.in: Update ax.c and IPA dependencies.
9060
277e4e52
PA
90612012-02-24 Pedro Alves <palves@redhat.com>
9062
9063 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9064 (cmd_bigqtbuffer_circular): ... this. Only handle
9065 'QTBuffer:circular:'.
9066 (handle_tracepoint_general_set): Adjust.
9067
bf4c19f7
YQ
90682012-02-16 Yao Qi <yao@codesourcery.com>
9069
9070 * inferiors.c: Move code to ...
9071 * dll.c: .... here. New.
9072 * server.h: Declare clear_dlls.
9073 * Makefile.in (SFILES): Add dll.c.
9074 (OBS): Add dll.o
9075 (dll.o): New rule.
9076
d73f2619
YQ
90772012-02-11 Yao Qi <yao@codesourcery.com>
9078
9079 * server.c: (handle_monitor_command): Add a new parameter
9080 `own_buf'.
9081 (handle_query): Update caller.
9082
f8255c2a
JB
90832012-02-09 Joel Brobecker <brobecker@adacore.com>
9084
9085 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9086 * configure, config.in: Regenerate.
9087 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9088 is not defined.
9089
da84f473
PA
90902012-02-02 Pedro Alves <palves@redhat.com>
9091
9092 Try SIGKILL first, then PTRACE_KILL.
9093 * linux-low.c (linux_kill_one_lwp): New.
9094 (linux_kill_one_lwp): Rename to ...
9095 (kill_one_lwp_callback): ... this. Use the new
9096 linux_kill_one_lwp.
9097
e886a173
PA
90982012-02-02 Pedro Alves <palves@redhat.com>
9099
9100 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9101 inferior.
9102
be07f1a2
PA
91032012-01-27 Pedro Alves <palves@redhat.com>
9104
9105 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9106 (elf_64_file_p): Make static.
9107 (linux_pid_exe_is_elf_64_file): New.
9108 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9109 Delete declarations.
9110 (linux_pid_exe_is_elf_64_file): Declare.
9111 * linux-x86-low.c (x86_arch_setup): Use
9112 linux_pid_exe_is_elf_64_file.
9113
d8301ad1
JK
91142012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * linux-low.c (linux_wait_for_event_1): Rename to ...
9117 (linux_wait_for_event): ... here and merge it with former
9118 linux_wait_for_event - new variable wait_ptid, use it.
9119 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9120
01b17894
PA
91212012-01-23 Pedro Alves <palves@redhat.com>
9122
9123 * server.c (main): Avoid yet another case of infinite loop while
9124 detaching/killing after a longjmp.
9125
e825046f
JK
91262012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9127
9128 Code cleanup.
9129 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9130
b9e7b9c3
UW
91312012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9132
9133 * hostio.c (handle_readlink): New function.
9134 (handle_vFile): Call it to handle "vFile:readlink" packets.
9135
901f9912
UW
91362012-01-20 Pedro Alves <palves@redhat.com>
9137 Ulrich Weigand <ulrich.weigand@linaro.org>
9138
9139 * server.c (handle_v_requests): Only support vAttach and vRun to
9140 start multiple processes when in extended protocol mode.
9141
fc1ab1a0
PA
91422012-01-17 Pedro Alves <palves@redhat.com>
9143
9144 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9145 memalign plus mprotect to allocate the scratch buffer.
9146
7d5d4e98
PA
91472012-01-13 Pedro Alves <palves@redhat.com>
9148
9149 * server.c (attach_inferior): Clear `cont_thread'.
9150
f128d5e9
PA
91512012-01-13 Pedro Alves <palves@redhat.com>
9152
9153 * server.c (main): Avoid infinite loop while detaching/killing
9154 after a longjmp.
9155
06db92f0
DE
91562012-01-09 Doug Evans <dje@google.com>
9157
9158 * server.c (start_inferior): Set last_ptid in --wrapper case.
9159
32d92999
YQ
91602012-01-06 Yao Qi <yao@codesourcery.com>
9161
9162 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9163 defined.
9164 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9165
5e0a92a9
YQ
91662012-01-04 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c (cmd_qtdp): Print debug message
9169 for static tracepoint.
9170
ae639e8c
YQ
91712012-01-04 Yao Qi <yao@codesourcery.com>
9172
9173 * tracepoint.c (trace_vdebug): Differentiate debug message
9174 between gdbserver and IPA.
9175
f72429c5
YQ
91762012-01-03 Yao Qi <yao@codesourcery.com>
9177
9178 * tracepoint.c (tracepoint_was_hit): Don't collect for
9179 static tracepoint.
9180
12c3e59c
JB
91812012-01-02 Joel Brobecker <brobecker@adacore.com>
9182
9183 * terminal.h: Reformat copyright header.
9184
67827812
JB
91852012-01-02 Joel Brobecker <brobecker@adacore.com>
9186
9187 * server.c (gdbserver_version): Update copyright year.
9188 * gdbreplay.c (gdbreplay_version): Likewise.
9189
3e52c33d
JK
91902011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9191
9192 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9193
9194 Revert:
9195 2011-12-18 Hui Zhu <teawater@gmail.com>
9196 * linux-low.c (linux_create_inferior): Save return value to ret.
9197
66f1260e
HZ
91982011-12-18 Hui Zhu <teawater@gmail.com>
9199
9200 * linux-low.c (linux_create_inferior): Save return value to ret.
9201
e77616d7
DE
92022011-12-16 Doug Evans <dje@google.com>
9203
e7b06c57
DE
9204 * linux-low.c (linux_create_inferior): If stdio connection,
9205 redirect stdin from /dev/null, stdout to stderr.
9206 * remote-utils.c (remote_is_stdio): New static global.
9207 (remote_connection_is_stdio): New function.
9208 (remote_prepare): Handle stdio connection.
9209 (remote_open): Ditto.
9210 (remote_close): Don't close stdin for stdio connections.
9211 (read_prim,write_prim): New functions. Replace all calls to
9212 read/write to these.
9213 * server.c (main): Watch for "-" argument. Move call to
9214 remote_prepare before start_inferior.
9215 * server.h (STDIO_CONNECTION_NAME): New macro.
9216 (remote_connection_is_stdio): Declare.
9217
e77616d7
DE
9218 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9219 in debugging output.
9220
82067193
YQ
92212011-12-15 Yao Qi <yao@codesourcery.com>
9222
9223 * tracepoint.c: Include sys/syscall.h.
9224 (gdb_ust_thread): Remove preprocessor conditional.
9225
82bfbe7e
PA
92262011-12-14 Pedro Alves <pedro@codesourcery.com>
9227
9228 * linux-low.c (linux_detach_one_lwp): Call
9229 the_low_target.prepare_to_resume before detaching.
9230
712c6575
YQ
92312011-12-14 Yao Qi <yao@codesourcery.com>
9232
9233 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9234 of write.
9235
d54d1edf
YQ
92362011-12-14 Yao Qi <yao@codesourcery.com>
9237
9238 * i386-low.c (i386_low_stopped_data_address): Initialize local
9239 variable `control'.
9240
6210a125
PA
92412011-12-13 Pedro Alves <pedro@codesourcery.com>
9242
9243 PR remote/13492
9244
9245 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9246 DR_CONTROL unless necessary. Extend comments.
9247 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9248 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9249
2ece8244
YQ
92502011-12-13 Yao Qi <yao@codesourcery.com>
9251
9252 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9253 macros.
9254 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9255
784867a5
JK
92562011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9257
9258 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9259 Print new debug message for such case.
9260
6bf36717
JK
92612011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9262
9263 Fix overlapping memcpy.
9264 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9265 the read_inferior_memory transfer.
9266 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9267 write_inferior_memory transfer.
9268 (set_fast_tracepoint_jump): New variable buf. Use it for the
9269 read_inferior_memory and write_inferior_memory transfers.
9270 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9271 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9272 Use it for the write_inferior_memory transfer.
9273 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9274 buffers.
9275
50275556
MR
92762011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9277
9278 * linux-low.c (fetch_register, store_register): Make code
9279 consistent, fix formatting.
9280
7325beb4
MR
92812011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9282
9283 * linux-low.c (usr_store_inferior_registers): Factor out code
9284 to handle individual registers into...
9285 (store_register): ... this new function.
9286
c642a434
UW
92872011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9288
9289 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9290 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9291 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9292 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9293 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9294 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9295 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9296 (srv_xmlfiles): Add new XML files.
9297
9298 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9299 and <sys/uio.h>.
9300 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9301 (init_registers_s390_linux32v1): Add prototype.
9302 (init_registers_s390_linux32v2): Likewise.
9303 (init_registers_s390_linux64v1): Likewise.
9304 (init_registers_s390_linux64v2): Likewise.
9305 (init_registers_s390x_linux64v1): Likewise.
9306 (init_registers_s390x_linux64v2): Likewise.
9307 (s390_num_regs): Increment to 52.
9308 (s390_regmap): Add orig_r2 register.
9309 (s390_num_regs_3264): Increment to 68.
9310 (s390_regmap_3264): Add orig_r2 register.
9311 (s390_collect_ptrace_register): Handle orig_r2 register.
9312 (s390_supply_ptrace_register): Likewise.
9313 (s390_fill_last_break): New function.
9314 (s390_store_last_break): Likewise.
9315 (s390_fill_system_call): New function.
9316 (s390_store_system_call): Likewise.
9317 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9318 register sets.
9319 (s390_check_regset): New function.
9320 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9321 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9322 Update target_regsets for available register sets.
9323
2268b414
JK
93242011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9325 Jan Kratochvil <jan.kratochvil@redhat.com>
9326
9327 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9328 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9329 New.
9330 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9331 * linux-low.h (struct process_info_private): New member r_debug.
9332 * server.c (handle_qxfer_libraries): Call
9333 the_target->qxfer_libraries_svr4.
9334 (handle_qxfer_libraries_svr4): New function.
9335 (qxfer_packets): New entry "libraries-svr4".
9336 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9337 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9338 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9339 PACKET_qXfer_libraries_svr4.
9340
d6db1fab
UW
93412011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9342
9343 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9344 PSW address/mask between 8-byte and 16-byte formats.
9345 (s390_supply_ptrace_register): Likewise.
9346 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9347 basic addressing mode bit.
9348
242f5f1c
SS
93492011-11-24 Stan Shebs <stan@codesourcery.com>
9350
9351 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9352
f196051f
SS
93532011-11-17 Stan Shebs <stan@codesourcery.com>
9354
9355 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9356 (tracing_start_time): New global.
9357 (tracing_stop_time): New global.
9358 (tracing_user_name): New global.
9359 (tracing_notes): New global.
9360 (tracing_stop_note): New global.
9361 (cmd_qtstart): Set traceframe_usage, start_time.
9362 (stop_tracing): Set stop_time.
9363 (cmd_qtstatus): Report additional status.
9364 (cmd_qtp): New function.
9365 (handle_tracepoint_query): Call it.
9366 (cmd_qtnotes): New function.
9367 (handle_tracepoint_general_set): Call it.
9368 (get_timestamp): Rename from tsv_get_timestamp.
9369
405f8e94
SS
93702011-11-14 Stan Shebs <stan@codesourcery.com>
9371 Kwok Cheung Yeung <kcy@codesourcery.com>
9372
9373 * linux-x86-low.c (small_jump_insn): New.
9374 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9375 trampoline and error message, build a trampoline and issue a small
9376 jump instruction to it.
9377 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9378 trampoline and error message.
9379 (x86_get_min_fast_tracepoint_insn_len): New.
9380 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9381 * linux-low.h (struct linux_target_ops): Add arguments to
9382 install_fast_tracepoint_jump_pad operation, add new operation.
9383 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9384 arguments.
9385 (linux_get_min_fast_tracepoint_insn_len): New function.
9386 (linux_target_op): Add new operation.
9387 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9388 (gdb_trampoline_buffer_end): Ditto.
9389 (gdb_trampoline_buffer_error): Ditto.
9390 (struct ipa_sym_addresses): Add fields for new IPA variables.
9391 (symbol_list): Add entries for new IPA variables.
9392 (struct tracepoint): Add fields to hold the address range of the
9393 trampoline used by the tracepoint.
9394 (trampoline_buffer_head): New static variable.
9395 (trampoline_buffer_tail): Ditto.
9396 (claim_trampoline_space): New function.
9397 (have_fast_tracepoint_trampoline_buffer): New function.
9398 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9399 structure.
9400 (install_fast_tracepoint): Ditto, also add error buffer argument.
9401 (cmd_qtminftpilen): New function.
9402 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9403 (fast_tracepoint_from_trampoline_address): New function.
9404 (fast_tracepoint_collecting): Handle trampoline as part of jump
9405 pad space.
9406 (set_trampoline_buffer_space): New function.
9407 (initialize_tracepoint): Initialize new IPA variables.
9408 * target.h (struct target_ops): Add arguments to
9409 install_fast_tracepoint_jump_pad operation, add new
9410 get_min_fast_tracepoint_insn_len operation.
9411 (target_get_min_fast_tracepoint_insn_len): New.
9412 (install_fast_tracepoint_jump_pad): Add arguments.
9413 * server.h (IPA_BUFSIZ): Define.
9414 * linux-i386-ipa.c: Include extra header files.
9415 (initialize_fast_tracepoint_trampoline_buffer): New function.
9416 (initialize_low_tracepoint): Call it.
9417 * server.h (set_trampoline_buffer_space): Declare.
9418 (claim_trampoline_space): Ditto.
9419 (have_fast_tracepoint_trampoline_buffer): Ditto.
9420
1e4d1764
YQ
94212011-11-14 Yao Qi <yao@codesourcery.com>
9422
9423 * server.c (handle_query): Handle InstallInTrace for qSupported.
9424 * tracepoint.c (add_tracepoint): Sort list.
9425 (install_tracepoint, download_tracepoint): New.
9426 (cmd_qtdp): Call them to install and download tracepoints.
9427 (sort_tracepoints): Removed.
9428 (cmd_qtstart): Update.
9429
5c73ff4e
YQ
94302011-11-14 Yao Qi <yao@codesourcery.com>
9431
9432 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9433 * mem-break.h: Declare.
9434 * tracepoint.c (cmd_qtstart): Move some code to ...
9435 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9436 New.
9437 (download_tracepoints): Move some code to ...
9438 (download_tracepoint_1): ... here. New.
9439
86a30030
YQ
94402011-11-08 Yao Qi <yao@codesourcery.com>
9441
9442 * remote-utils.c (relocate_instruction): A comment fix.
9443
8d26e50c
JB
94442011-11-07 Joel Brobecker <brobecker@adacore.com>
9445
9446 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9447 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9448 dr_status_mirror and dr_control_mirror from debug_reg_state.
9449 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9450 (i386_initial_stuff): Remove use of deleted globals.
9451 (i386_get_thread_context, i386_set_thread_context,
9452 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9453 from debug_reg_state.
9454
a59306a3
YQ
94552011-11-05 Yao Qi <yao@codesourcery.com>
9456
9457 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9458 address as TPOINT's.
9459
3065dfb6
SS
94602011-11-02 Stan Shebs <stan@codesourcery.com>
9461
9462 * tracepoint.c (agent_mem_read_string): New function.
9463 (eval_agent_expr): Call it for tracenz.
9464 * server.c (handle_query): Report support for tracenz.
9465
fd0d8c7c
YQ
94662011-11-02 Yao Qi <yao@codesourcery.com>
9467
9468 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9469
609086b1
YQ
94702011-11-02 Yao Qi <yao@codesourcery.com>
9471
9472 * target.h: Fix a typo in comment.
9473
b9fd1791
PA
94742011-10-31 Pedro Alves <pedro@codesourcery.com>
9475
9476 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9477 clobber the breakpoints' shadows with fast tracepoint jumps.
9478 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9479 * target.c (write_inferior_memory): Also pass MYADDR down to
9480 check_mem_write.
9481
03583c20
UW
94822011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9483
9484 * configure.ac: Check support for personality routine.
9485 * configure: Regenerate.
9486 * config.in: Likewise.
9487 * linux-low.c: Include <sys/personality.h>.
9488 Define ADDR_NO_RANDOMIZE if necessary.
9489 (linux_create_inferior): Disable address space randomization when
9490 forking inferior, if requested.
9491 (linux_supports_disable_randomization): New function.
9492 (linux_target_ops): Install it.
9493 * server.h (disable_randomization): Declare.
9494 * server.c (disable_randomization): New global variable.
9495 (handle_general_set): Handle QDisableRandomization.
9496 (handle_query): Likewise for qSupported.
9497 (main): Support --disable-randomization and --no-disable-randomization
9498 command line arguments.
9499 * target.h (struct target_ops): Add supports_disable_randomization.
9500 (target_supports_disable_randomization): New macro.
9501
723b724b
MF
95022011-09-29 Mike Frysinger <vapier@gentoo.org>
9503
9504 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9505 ifdef check.
9506 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9507 [!PT_GETDSBT] (target_loadmap): New definition.
9508 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9509 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9510 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9511 and PT_GETDSBT to LINUX_LOADMAP.
9512 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9513 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9514
55329a5c 95152011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9516
9517 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9518 (arm_linux_hwbp_cap): New static variable.
9519 (arm_linux_get_hwbp_cap): Replace by ...
9520 (arm_linux_init_hwbp_cap): ... this new function.
9521 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9522 (arm_linux_get_hw_watchpoint_count): Likewise.
9523 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9524 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9525 (arm_prepare_to_resume): Use perror_with_name instead of error.
9526
55329a5c 95272011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9528
9529 * linux-arm-low.c: Include <signal.h>.
9530 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9531 (struct arm_linux_hwbp_cap): New data type.
9532 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9533 (struct arm_linux_hw_breakpoint): New data type.
9534 (MAX_BPTS, MAX_WPTS): Define.
9535 (struct arch_process_info, struct arch_lwp_info): New data types.
9536 (arm_linux_get_hwbp_cap): New function.
9537 (arm_linux_get_hw_breakpoint_count): Likewise.
9538 (arm_linux_get_hw_watchpoint_count): Likewise.
9539 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9540 (arm_hwbp_control_initialize): Likewise.
9541 (arm_hwbp_control_is_enabled): Likewise.
9542 (arm_hwbp_control_is_initialized): Likewise.
9543 (arm_hwbp_control_disable): Likewise.
9544 (arm_linux_hw_breakpoint_equal): Likewise.
9545 (arm_linux_hw_point_initialize): Likewise.
9546 (struct update_registers_data): New data structure.
9547 (update_registers_callback: New function.
9548 (arm_insert_point): Likewise.
9549 (arm_remove_point): Likewise.
9550 (arm_stopped_by_watchpoint): Likewise.
9551 (arm_stopped_data_address): Likewise.
9552 (arm_new_process): Likewise.
9553 (arm_new_thread): Likewise.
9554 (arm_prepare_to_resume): Likewise.
9555 (the_low_target): Register arm_insert_point, arm_remove_point,
9556 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9557 arm_new_thread, and arm_prepare_to_resume.
9558
6b9801d4
SS
95592011-09-15 Stan Shebs <stan@codesourcery.com>
9560
9561 * server.h (struct emit_ops): Add compare-goto fields.
9562 * tracepoint.c (gdb_agent_op_sizes): New table.
9563 (emit_eq_goto): New function.
9564 (emit_ne_goto): New function.
9565 (emit_lt_goto): New function.
9566 (emit_le_goto): New function.
9567 (emit_gt_goto): New function.
9568 (emit_ge_goto): New function.
9569 (is_goto_target): New function.
9570 (compile_bytecodes): Recognize special cases of compare-goto
9571 combinations and call specialized emitters for them.
9572 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9573 (amd64_emit_ne_goto): New function.
9574 (amd64_emit_lt_goto): New function.
9575 (amd64_emit_le_goto): New function.
9576 (amd64_emit_gt_goto): New function.
9577 (amd64_emit_ge_goto): New function.
9578 (amd64_emit_ops): Add the new functions.
9579 (i386_emit_eq_goto): New function.
9580 (i386_emit_ne_goto): New function.
9581 (i386_emit_lt_goto): New function.
9582 (i386_emit_le_goto): New function.
9583 (i386_emit_gt_goto): New function.
9584 (i386_emit_ge_goto): New function.
9585 (i386_emit_ops): Add the new functions.
9586
bf15cbda
SS
95872011-09-08 Stan Shebs <stan@codesourcery.com>
9588
9589 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9590 (i386_emit_epilogue): Restore %ebx.
9591
943ca1dd
JZ
95922011-08-31 Jie Zhang <jzhang918@gmail.com>
9593
9594 * server.c (step_thread): Remove definition.
9595 (process_serial_event): Don't handle Hs.
9596 * server.h (step_thread): Remove declaration.
9597 * target.c (set_desired_inferior): Remove use of step_thread.
9598
e3deef73
LM
95992011-08-24 Luis Machado <lgustavo@codesourcery.com>
9600
9601 * linux-low.c: Include linux-procfs.h.
9602 (linux_attach_lwp_1): Update comments.
9603 (linux_attach): Scan for existing threads when attaching to a
9604 process that is the tgid.
9605 * Makefile.in: Update dependencies.
9606
13da1c97
LM
96072011-08-24 Luis Machado <lgustavo@codesourcery.com>
9608
9609 * configure.srv: Add linux-procfs.o dependencies.
9610
881127c9
YQ
96112011-08-14 Yao Qi <yao@codesourcery.com>
9612
9613 * target.h (struct target_ops): Fix indent.
9614 * win32-low.c (win32_target_ops): Fix comment.
9615
58dbd541
YQ
96162011-08-14 Andrew Jenner <andrew@codesourcery.com>
9617 Yao Qi <yao@codesourcery.com>
9618
9619 * Makefile.in (clean): Remove tic6x-*.c files.
9620 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9621 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9622 (tic6x-c64xp-linux.c): Likewise.
9623 * configure.srv: Add support for tic6x-*-uclinux.
9624 * linux-tic6x-low.c: New.
9625 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9626
78d85199
YQ
96272011-08-14 Andrew Stubbs <ams@codesourcery.com>
9628 Yao Qi <yao@codesourcery.com>
9629
9630 * target.h (struct target_ops): Add read_loadmap.
9631 * linux-low.c (struct target_loadseg): New type.
9632 (struct target_loadmap): New type.
9633 (linux_read_loadmap): New function.
9634 (linux_target_ops): Add linux_read_loadmap.
9635 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9636 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9637 to NULL.
78d85199 9638
a959a88d
EZ
96392011-08-05 Eli Zaretskii <eliz@gnu.org>
9640
9641 * win32-low.c: Include <stdint.h>.
9642
1ced966e
PA
96432011-07-22 Pedro Alves <pedro@codesourcery.com>
9644
9645 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9646 to the inferior here.
9647 (i386_remove_aligned_watchpoint): Ditto.
9648 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9649 fit part of the watchpoint in the debug registers.
9650 (i386_update_inferior_debug_regs): New.
9651 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9652 registers, and only update the inferior on success.
9653 (i386_low_remove_watchpoint): Ditto.
9654
d26e3629
KY
96552011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9656
9657 * linux-low.c (compare_ints, unique, list_threads, show_process,
9658 linux_core_of_thread): Delete.
9659 (linux_target_ops): Change linux_core_of_thread to
9660 linux_common_core_of_thread.
9661 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9662 * utils.c (malloc_failure): Change type of argument.
9663 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9664 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9665 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9666 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9667 (IPA_OBJS): Add common-utils-ipa.o.
9668 (ptid_h, linux_osdata_h): New macros.
9669 (server_h): Add common/common-utils.h, common/xml-utils.h,
9670 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9671 common/ptid.h.
9672 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9673 ptid.o, buffer.o): New rules.
9674 (linux-low.o): Add common/linux-osdata.h as a dependency.
9675 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9676 * configure.ac: Add AC_HEADER_DIRENT check.
9677 * config.in: Regenerate.
9678 * configure: Regenerate.
9679 * remote-utils.c (xml_escape_text): Delete.
9680 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9681 buffer_xml_printf): Move to common/buffer.c.
9682 * server.c (main): Remove call to initialize_inferiors.
9683 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9684 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9685 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9686 internal_error, gdb_assert, gdb_assert_fail): Delete.
9687 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9688 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9689 common/buffer.h.
9690 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9691 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9692 initialize_inferiors): Delete.
9693
2275a1a7
PA
96942011-07-20 Pedro Alves <pedro@codesourcery.com>
9695
9696 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9697 symbol error.
9698
0a5b1e09
PA
96992011-05-31 Pedro Alves <pedro@codesourcery.com>
9700
9701 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9702 assertion.
9703 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9704
6938fd34
YQ
97052011-05-26 Yao Qi <yao@codesourcery.com>
9706
9707 * Makefile.in (thread-db.o): Track dependence to
9708 common/gdb_thread_db.h.
9709 * thread-db.c: include gdb_thread_db.h from right place.
9710
b481f9e0
TT
97112011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9712
9713 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9714 __FILE__ and __LINE__ to internal_error.
9715
98a5dd13
DE
97162011-05-13 Doug Evans <dje@google.com>
9717
9718 * thread-db.c (try_thread_db_load_from_sdir): New function.
9719 (try_thread_db_load_from_dir): New function.
9720 (thread_db_load_search): Handle $sdir, ignore $pdir.
9721 Remove trying of system directories if search of
9722 libthread-db-search-path fails, that is now done via $sdir.
9723
d248b706
KY
97242011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9725
9726 * server.c (handle_query): Add EnableDisableTracepoints to the list
9727 of supported features.
43aaf8b6 9728 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9729 tracepoints.
43aaf8b6
PA
9730 (cmd_qtenable_disable): New.
9731 (cmd_qtstart): Install tracepoints even if disabled.
9732 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9733 receiving a QTEnable or QTDisable packet.
9734 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9735 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9736 tracepoints.
9737 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9738
84e578fb
DE
97392011-05-10 Doug Evans <dje@google.com>
9740
9741 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9742
71f55dd8
DE
97432011-05-04 Doug Evans <dje@google.com>
9744
9745 * linux-low.c (linux_join): Skip process lookup.
9746 * spu-low.c (spu_join): Ditto.
9747 * server.c (join_inferiors_callback): Delete.
9748 (process_serial_event): For 'D' packet (detach) call join_inferior
9749 directly.
9750
4d393d60
JM
97512011-05-04 Joseph Myers <joseph@codesourcery.com>
9752
9753 * README: Don't mention xscale*-*-linux*.
9754 * configure.srv (xscale*-*-linux*): Don't handle target.
9755
b00ad6ff
NF
97562011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9757
9758 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9759 casting pointers.
9760 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9761 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9762 (i386_emit_void_call_2): Likewise.
9763
af96c192
YQ
97642011-04-26 Yao Qi <yao@codesourcery.com>
9765
43aaf8b6
PA
9766 * linux-low.c: Move common macros to linux-ptrace.h.
9767 Include linux-ptrace.h.
af96c192
YQ
9768 * Makefile.in (linux_ptrace_h): New.
9769 (linux-low.o): Depends on linux-ptrace.h.
9770
03f2bd59
JK
97712011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9772
9773 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9774 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9775 (remote_prepare): New function with most of the TCP code from ...
9776 (remote_open): ... here. Detect PORT here unconditionally. Move also
9777 setting transport_is_reliable.
9778 * server.c (run_once): New variable.
9779 (gdbserver_usage): Document it.
9780 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9781 the first run if RUN_ONCE.
9782 * server.h (run_once, remote_prepare): New declarations.
9783
7a9dd1b2
TT
97842011-04-19 Tom Tromey <tromey@redhat.com>
9785
9786 * win32-low.c (handle_load_dll): Remove duplicate "the".
9787
81239425
PM
97882011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9789
9790 Remove support for old Cygwin 1.5 versions.
9791 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9792 function to avoid warning.
9793 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9794 warning.
9795
9e0627f1
PM
97962011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9797
9798 * gdbserver/server.h (Macro _): Define it if not available.
9799
588eebee
MS
98002011-03-14 Michael Snyder <msnyder@vmware.com>
9801
348af9f7 9802 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9803
43f70d4c
JB
98042011-03-10 Joel Brobecker <brobecker@adacore.com>
9805
9806 * Makefile.in (maintainer-clean realclean distclean): Remove
9807 "make ... subdir_do" command.
9808
348af9f7
MS
98092011-03-10 Michael Snyder <msnyder@vmware.com>
9810
9811 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9812
9813 * server.c (handle_v_run): Free alloced buffer on early return.
9814
e637a4f5
YQ
98152011-03-09 Yao Qi <yao@codesourcery.com>
9816
9817 Revert:
9818 2011-03-04 Yao Qi <yao@codesourcery.com>
9819
9820 * Makefile.in: Remove GNU make feature --directory.
9821
9822 2011-03-05 Yao Qi <yao@codesourcery.com>
9823
9824 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9825 (subdir_do): New make target. Copied from gdb/Makefile.
9826 (maintainer-clean, realclean, distclean, clean): Call corresponding
9827 make targets in common/Makefile.
9828
9829 2011-02-11 Yao Qi <yao@codesourcery.com>
9830
9831 * configure.ac: Call AC_PROG_RANLIB.
9832 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9833 * configure: Regenerate.
9834
e6edda56
JK
98352011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9836
9837 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9838
e5141119
JB
98392011-03-06 Yao Qi <yao@codesourcery.com>
9840
9841 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9842
64794aa4
JB
98432011-03-05 Yao Qi <yao@codesourcery.com>
9844
9845 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9846 (subdir_do): New make target. Copied from gdb/Makefile.
9847 (maintainer-clean, realclean, distclean, clean): Call corresponding
9848 make targets in common/Makefile.
9849
7a762829
YQ
98502011-03-04 Yao Qi <yao@codesourcery.com>
9851
9852 * Makefile.in: Remove GNU make feature --directory.
9853
348af9f7
MS
98542011-03-04 Michael Snyder <msnyder@vmware.com>
9855
9856 * server.c (queue_stop_reply): Call xmalloc not malloc.
9857
98582011-03-02 Michael Snyder <msnyder@vmware.com>
9859
9860 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9861
9f72fee2
MS
98622011-02-28 Michael Snyder <msnyder@vmware.com>
9863
588eebee
MS
9864 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9865 (cmd_qtframe): Ditto.
9866 (cmd_qtbuffer): Ditto.
9867 (cmd_bigqtbuffer): Ditto.
9868
9f72fee2
MS
9869 * utils.c (decimal2str): Initialize 'width' to nine, then
9870 don't mess with it.
9871
8040bd49
UW
98722011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9873
9874 * hostio.c (require_data): Free *data, not data.
9875
7e52cbd0
JK
98762011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9877
9878 * hostio.c (require_data): Use free, not xfree.
9879
9130f83e
MS
98802011-02-27 Michael Snyder <msnyder@vmware.com>
9881
4b812f4e
MS
9882 * server.c (handle_query): Discard unused value.
9883
9130f83e
MS
9884 * hostio.c (require_data): Free malloc memory before returning
9885 error.
9886
69d37113
MS
98872011-02-26 Michael Snyder <msnyder@vmware.com>
9888
9889 * linux-low.c (list_threads): Call closedir for dirent.
9890
35f5825a
MS
98912011-02-27 Michael Snyder <msnyder@vmware.com>
9892
2a589cef
MS
9893 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9894 a case statement falls through.
9895
0adea5f7
MS
9896 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9897
35f5825a
MS
9898 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9899 in comparison.
9900
238f1c74
MS
99012011-02-26 Michael Snyder <msnyder@vmware.com>
9902
9903 * utils.c (decimal2str): Eliminate dead code and dead param.
9904 (pulongest): Drop dead param from call to decimal2str.
9905 (plongest): Ditto.
9906
633ff500
JB
99072011-02-24 Joel Brobecker <brobecker@adacore.com>
9908
9909 Revert the following patch (not approved yet):
9910 2011-02-21 Hui Zhu <teawater@gmail.com>
9911 * tracepoint.c (tp_printf): New function.
9912 (eval_agent_expr): Handle gdb_agent_op_printf.
9913
f9c6ff72
HZ
99142011-02-21 Hui Zhu <teawater@gmail.com>
9915
9916 * tracepoint.c (tp_printf): New function.
9917 (eval_agent_expr): Handle gdb_agent_op_printf.
9918
94d5e490
TT
99192011-02-18 Tom Tromey <tromey@redhat.com>
9920
9921 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9922 (tracepoint.o): Likewise.
9923 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9924 (gdb_agent_op_names): Likewise.
9925
c7f96d2b
TT
99262011-02-18 Tom Tromey <tromey@redhat.com>
9927
9928 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9929 gdb_agent_op_rot>: New constants.
9930 (gdb_agent_op_names): Add pick and roll.
9931 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9932 cases.
9933
0feedb2c
JK
99342011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9935
9936 * aclocal.m4: Regenerated with aclocal-1.11.1.
9937
b3b9301e
PA
99382011-02-14 Pedro Alves <pedro@codesourcery.com>
9939
9940 * server.c (handle_qxfer_traceframe_info): New.
9941 (qxfer_packets): Register "traceframe-info".
9942 (handle_query): Report support for qXfer:traceframe-info:read+.
9943 * tracepoint.c (match_blocktype): New.
9944 (traceframe_find_block_type): Rename to ...
9945 (traceframe_walk_blocks): ... this. Add callback filter argument,
9946 and use it.
9947 (traceframe_find_block_type): New, reimplemented on top of
9948 traceframe_walk_blocks.
9949 (build_traceframe_info_xml): New.
9950 (traceframe_read_info): New.
9951 * server.h (traceframe_read_info): Declare.
9952
4f3e6fb7
YQ
99532011-02-11 Yao Qi <yao@codesourcery.com>
9954
9955 * configure.ac: Call AC_PROG_RANLIB.
9956 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9957 * configure: Regenerate.
9958
764880b7
PA
99592011-02-07 Pedro Alves <pedro@codesourcery.com>
9960
9961 * server.c (gdb_read_memory): Change return semantics to allow
9962 partial transfers.
9963 (handle_search_memory_1): Adjust.
9964 (process_serial_event) <'m' packet>: Handle partial transfers.
9965 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9966
1c79eb8a
PA
99672011-01-28 Pedro Alves <pedro@codesourcery.com>
9968
9969 * regcache.c (init_register_cache): Initialize
9970 regcache->register_status.
9971 (free_register_cache): Release regcache->register_status.
9972 (regcache_cpy): Copy register_status.
9973 (registers_to_string): Print 'x's for unavailable registers.
9974 (supply_register): Mark the register's status valid or
9975 unavailable, depending on whether a buffer was passed in or not.
9976 (supply_register_zeroed): New.
9977 (supply_regblock): Mark the registers' status valid or
9978 unavailable, depending on whether a buffer was passed in or not.
9979 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9980 (struct regcache): New `register_status' field.
9981 (supply_register_zeroed): Declare.
9982 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9983 supply_register_zeroed, rather than passing a NULL buffer to
9984 supply_register.
9985 * tracepoint.c (fetch_traceframe_registers): Update comment.
9986
85724a0e
PA
99872011-01-28 Pedro Alves <pedro@codesourcery.com>
9988
9989 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9990 buffer explicit.
9991
d08aafef
PA
99922011-01-25 Pedro Alves <pedro@codesourcery.com>
9993
9994 * server.h (decode_xfer_write): Change prototype.
9995 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9996 and don't extract the annex here.
9997 * server.c (decode_xfer_read): Remove `annex' parameter,
9998 and don't extract the annex here.
9999 (decode_xfer): New.
10000 (struct qxfer): New.
10001 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10002 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10003 (handle_qxfer_statictrace): New functions, abstracted out from
10004 handle_query, and made to use the struct qxfer interface.
10005 (handle_threads_qxfer_proper): Rename to ...
10006 (handle_qxfer_threads_proper): ... this.
10007 (handle_threads_qxfer): Rename to ...
10008 (handle_qxfer_threads): ... this. Adjust.
10009 (qxfer_packets): New array.
10010 (handle_qxfer): New function.
10011 (handle_query): Use handle_qxfer.
10012
493e2a69
MS
100132011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10014
10015 * gdbreplay.c: Shorten lines of >= 80 columns.
10016 * linux-low.c: Ditto.
10017 * linux-ppc-low.c: Ditto.
10018 * linux-s390-low.c: Ditto.
10019 * linux-sparc-low.c: Ditto.
10020 * linux-x86-low.c: Ditto.
10021 * linux-xtensa-low.c: Ditto.
10022 * mem-break.c: Ditto.
10023 * nto-low.c: Ditto.
10024 * regcache.h: Ditto.
10025 * remote-utils.c: Ditto.
10026 * server.c: Ditto.
10027 * server.h: Ditto.
10028 * thread-db.c: Ditto.
10029 * tracepoint.c: Ditto.
10030 * utils.c: Ditto.
10031 * win32-low.h: Ditto.
10032
44944448
JB
100332011-01-05 Joel Brobecker <brobecker@adacore.com>
10034
10035 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10036 update.
10037
71ce852c
JB
100382011-01-01 Joel Brobecker <brobecker@adacore.com>
10039
10040 * server.c (gdbserver_version): Update copyright year in version
10041 output.
10042 * gdbreplay.c (gdbreplay_version): Ditto.
10043
eb826dc6
MF
100442010-12-29 Jie Zhang <jie.zhang@analog.com>
10045
10046 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10047 * linux-bfin-low.c: New file.
10048 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10049 PT_DATA_ADDR for BFIN targets.
10050 * Makefile.in (SFILES): Add linux-bfin-low.c.
10051 (clean): Remove reg-bfin.c.
10052 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10053 * README: Mention supported Blackfin targets.
10054
39ab222a
MF
100552010-12-23 Mike Frysinger <vapier@gentoo.org>
10056
10057 * .gitignore: New file.
10058
a1f2ce7d
MF
100592010-11-16 Mike Frysinger <vapier@gentoo.org>
10060
10061 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10062
f474844c
JZ
100632010-10-22 Jie Zhang <jie@codesourcery.com>
10064
10065 * Makefile.in: Add FLAGS_TO_PASS variable.
10066 (install): Remove dependency of install-only and recursively
10067 invoke make for install-only.
10068
f1048712
DE
100692010-10-04 Doug Evans <dje@google.com>
10070
10071 * Makefile.in (uninstall): Use $(DESTDIR).
10072
b53a1623
PA
100732010-09-24 Pedro Alves <pedro@codesourcery.com>
10074
e6ee044d
PA
10075 PR gdb/11842
10076
b53a1623
PA
10077 * linux-x86-low.c (compat_siginfo_from_siginfo)
10078 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10079 si_code is < 0. Check for si_code == SI_TIMER before checking for
10080 si_code < 0.
10081
fa1bd1e4
JB
100822010-09-13 Joel Brobecker <brobecker@adacore.com>
10083
10084 * lynx-i386-low.c: New file.
10085 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10086
47fac8f8
JB
100872010-09-13 Joel Brobecker <brobecker@adacore.com>
10088
10089 * lynx-low.c (ptrace_request_to_str): Remove handling for
10090 request values that have been removed in LynxOS 5.x.
10091
1adfc54d
JB
100922010-09-13 Joel Brobecker <brobecker@adacore.com>
10093
10094 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10095 <ptrace.h>
10096
c2a66c29
NS
100972010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10098
10099 * configure.ac: Add --enable-inprocess-agent option.
10100 * configure: Rebuilt.
10101
32fcada3
YQ
101022010-09-06 Yao Qi <yao@codesourcery.com>
10103
10104 * linux-low.c (linux_kill): Remove unused variable.
10105 (linux_stabilize_threads): Likewise.
10106 * server.c (start_inferior): Likewise.
10107 (queue_stop_reply_callback): Likewise.
10108 * tracepoint.c (do_action_at_tracepoint): Likewise.
10109
0cccb683
YQ
101102010-09-06 Yao Qi <yao@codesourcery.com>
10111
10112 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10113 on return.
10114
423ec54c
JK
101152010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10116
10117 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10118
12ac6819
PA
101192010-09-06 Pedro Alves <pedro@codesourcery.com>
10120
10121 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10122 "$(IPA_DEPFILES)".
10123
8ed54b31
JB
101242010-09-01 Joel Brobecker <brobecker@adacore.com>
10125
10126 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10127 gdbserver/lynx-ppc-low.c: New files.
10128 * Makefile.in (lynx_low_h): New variable.
10129 (lynx-low.o, lynx-ppc-low.o): New rules.
10130 * configure.ac: On LynxOS, link with -lnetinet.
10131 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10132 * configure: regenerate.
10133
bb0116a4
JB
101342010-09-01 Joel Brobecker <brobecker@adacore.com>
10135
10136 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10137 * configure.ac: Add check for vasprintf and vsnprintf.
10138 * configure, config.in: Regenerate.
10139 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10140
a778ab81 101412010-09-01 Joel Brobecker <brobecker@adacore.com>
10142
10143 * gdbreplay.c: Move include of alloca.h up, next to include of
10144 malloc.h.
10145 * server.h: Add include of malloc.h.
10146 * mem-break.c: Remove include of malloc.h.
10147 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10148
8b034a19 101492010-09-01 Joel Brobecker <brobecker@adacore.com>
10150
10151 * Makefile.in (memmem.o): Build with -Wno-error.
10152
101532010-09-01 Joel Brobecker <brobecker@adacore.com>
10154
10155 * utils.c (xsnprintf): Make non-static.
10156 * server.h: Add xsnprintf declaration.
10157 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10158 replace calls to snprintf by calls to xsnprintf throughout.
10159
101602010-09-01 Joel Brobecker <brobecker@adacore.com>
10161
10162 * configure.ac: Add configure check for alloca.
10163 * configure, config.in: Regenerate.
10164 * server.h: Include alloca.h if it exists.
10165 * gdbreplay.c: Include alloca.h if it exists.
10166
1a981360
PA
101672010-08-28 Pedro Alves <pedro@codesourcery.com>
10168
10169 * linux-low.c (__SIGRTMIN): Define if not already defined.
10170 (linux_create_inferior): Check for __ANDROID__ rather than
10171 __SIGRTMIN.
10172 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10173 are already deferred.
10174 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10175 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10176 stopped and already has a pending signal to report.
10177 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10178 a pending signal to report or is moving out of a jump pad.
10179 (linux_init_signals): Check for __ANDROID__ rather than
10180 __SIGRTMIN.
10181
b4d51a55
PA
101822010-08-28 Pedro Alves <pedro@codesourcery.com>
10183
10184 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10185 debug_threads check. Avoid a linear search when not doing debug
10186 output.
10187
ec48365d
PA
101882010-08-27 Pedro Alves <pedro@codesourcery.com>
10189
10190 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10191 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10192 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10193 (process_event): Change local fd's type to gdb_fildes_t.
10194 (create_file_handler): Adjust prototype.
10195 (delete_file_handler): Adjust prototype.
10196 (handle_file_event): Adjust prototype. Use pfildes.
10197 (create_file_event): Adjsut prototype.
10198 * remote-utils.c (remote_desc, listen_desc): Change type to
10199 gdb_fildes_t.
10200 * server.h: New gdb_fildes_t typedef.
10201 [USE_WIN32API]: Include winsock2.h.
10202 (delete_file_handler, add_file_handler): Adjust prototypes.
10203 (pfildes): Declare.
10204 * utils.c (pfildes): New.
10205
854d88f0
PA
102062010-08-27 Pedro Alves <pedro@codesourcery.com>
10207
10208 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10209 * configure: Regenerate.
10210
0146f85b
PA
102112010-08-27 Pedro Alves <pedro@codesourcery.com>
10212
10213 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10214 (linux_done_accessing_memory): ... this.
10215 (linux_target_ops): Adjust.
10216 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10217 * nto-low.c (nto_target_ops): Adjust comment.
10218 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10219 * spu-low.c (spu_target_ops): Adjust comment.
10220 * target.h (target_ops): Rename unprepare_to_access_memory field
10221 to done_accessing_memory.
10222 (unprepare_to_access_memory): Rename to ...
10223 (done_accessing_memory): ... this.
10224
90d74c30
PA
102252010-08-26 Pedro Alves <pedro@codesourcery.com>
10226
10227 * linux-low.c (linux_prepare_to_access_memory): New.
10228 (linux_unprepare_to_access_memory): New.
10229 (linux_target_ops): Install them.
10230 * server.c (read_memory): Rename to ...
10231 (gdb_read_memory): ... this. Use
10232 prepare_to_access_memory/prepare_to_access_memory.
10233 (write_memory): Rename to ...
10234 (gdb_write_memory): ... this. Use
10235 prepare_to_access_memory/prepare_to_access_memory.
10236 (handle_search_memory_1): Adjust.
10237 (process_serial_event): Adjust.
10238 * target.h (struct target_ops): New fields
10239 prepare_to_access_memory and unprepare_to_access_memory.
10240 (prepare_to_access_memory, unprepare_to_access_memory): New.
10241 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10242 prepare_to_access_memory/prepare_to_access_memory.
10243 * nto-low.c (nto_target_ops): Adjust.
10244 * spu-low.c (spu_target_ops): Adjust.
10245 * win32-low.c (win32_target_ops): Adjust.
10246
fd467969
PA
102472010-08-26 Pedro Alves <pedro@codesourcery.com>
10248
10249 * Makefile.in (WARN_CFLAGS): Get it from configure.
10250 (WERROR_CFLAGS): New.
10251 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10252 * configure.ac: Introduce --enable-werror, which adds -Werror to
10253 the compiler command line. Enabled by default. Disable with
10254 --disable-werror. Add -Wdeclaration-after-statement
10255 Wpointer-arith and -Wformat-nonliteral to warning flags.
10256 * configure: Regenerate.
10257
331e2f5f
PA
102582010-08-26 Pedro Alves <pedro@codesourcery.com>
10259
10260 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10261
e581f2b4
PA
102622010-08-26 Pedro Alves <pedro@codesourcery.com>
10263
10264 * gdbreplay.c (remote_error): New.
10265 (gdbchar): New.
10266 (expect): Use gdbchar. Check for error reading from GDB.
10267 Clarify sync error output.
10268 (play): Check for errors writing to GDB.
10269 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10270 * remote-utils.c (getpkt): Check for errors writing to the remote
10271 descriptor.
10272
3c11dd79
PA
102732010-08-25 Pedro Alves <pedro@codesourcery.com>
10274
10275 * linux-low.c (linux_wait_1): Move non-debugging code out of
10276 `debug_threads' control.
10277
d20a8ad9
PA
102782010-08-25 Pedro Alves <pedro@codesourcery.com>
10279
10280 * linux-low.c (linux_wait_1): Don't set last_status here.
10281 * server.c (push_event, queue_stop_reply_callback): Assert we're
10282 not pushing a TARGET_WAITKIND_IGNORE event.
10283 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10284 (myresume, handle_target_event): Set the thread's last_resume_kind
10285 and last_status from the target returned status.
10286
964e4306
PA
102872010-08-25 Pedro Alves <pedro@codesourcery.com>
10288
10289 PR threads/10729
10290
10291 * linux-x86-low.c (update_debug_registers_callback): New.
10292 (i386_dr_low_set_addr): Use it.
10293 (i386_dr_low_get_addr): New.
10294 (i386_dr_low_set_control): Use update_debug_registers_callback.
10295 (i386_dr_low_get_control): New.
10296 (i386_dr_low_get_status): Adjust.
10297 * linux-low.c (linux_stop_lwp): New.
10298 * linux-low.h (linux_stop_lwp): Declare.
10299
10300 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10301 argument instead of a i386_debug_reg_state.
10302 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10303 a i386_debug_reg_state.
10304 (i386_insert_aligned_watchpoint): Adjust.
10305 (i386_remove_aligned_watchpoint): Adjust.
10306 (i386_low_stopped_data_address): Read the debug registers from the
10307 inferior instead of from the mirrors.
10308 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10309 (i386_dr_low_get_addr): Declare.
10310 (i386_dr_low_get_control): Declare.
10311 (i386_dr_low_get_status): Change prototype.
10312
10313 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10314 (i386_dr_low_get_addr): New.
10315 (i386_dr_low_get_control): New.
10316 (i386_dr_low_get_status): Adjust prototype. Return
10317 dr_status_mirror.
10318 (i386_initial_stuff): Clear dr_status_mirror and
10319 dr_control_mirror.
10320 (i386_get_thread_context): Adjust.
10321 (i386_set_thread_context): Adjust.
10322 (i386_thread_added): Adjust.
10323
5f21a75b
PA
103242010-08-24 Pedro Alves <pedro@codesourcery.com>
10325
10326 * linux-low.h (linux_thread_area): Delete declaration.
10327
3e4c1235
TS
103282010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10329
10330 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10331 after its termination.
10332
1971b033
PA
103332010-08-09 Pedro Alves <pedro@codesourcery.com>
10334
10335 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10336 (gdb_wants_all_stopped): Delete.
10337 (linux_wait_1): Don't call them.
10338 * server.c (handle_v_cont): Tag all threads as want-stopped.
10339 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10340 stopped as "client-wants-stopped".
10341
310444ac
PA
103422010-07-31 Pedro Alves <pedro@codesourcery.com>
10343
10344 * Makefile.in (signals_h): New.
10345 (server_h): Depend on it.
10346 (server.o): Don't depend on $(signals_def).
10347 (signals.o): Depend on $(signals_def).
10348
a19cae16
JK
103492010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 * Makefile.in (signals_def): New.
10352 (server_h): Append include/gdb/signals.h and signals_def.
10353 (server.o): Append signals_def.
10354
30d50328
JK
103552010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10356
10357 * server.c (handle_target_event): Use target_signal_to_host for
10358 resume_info.sig initialization.
10359 * target.h (struct thread_resume) <sig>: New comment.
10360
5c3216e2
OS
103612010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10362
c6f46ca0
OS
10363 * server.c (handle_query): strcpy() the returned string from paddress()
10364 instead of sprintf().
5c3216e2
OS
10365 * utils.c (paddress): Return phex_nz().
10366
6bd31874
JB
103672010-07-07 Joel Brobecker <brobecker@adacore.com>
10368
10369 * server.c (handle_v_cont): Call mourn_inferior if process
10370 just exited.
10371 (myresume): Likewise.
10372
0fb4aa4b
PA
103732010-07-01 Pedro Alves <pedro@codesourcery.com>
10374
10375 Static tracepoints, and integration with UST.
10376
10377 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10378 * mem-break.c (uninsert_all_breakpoints)
10379 (reinsert_all_breakpoints): New.
10380 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10381 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10382 (gdb_agent_ust_loaded, helper_thread_id)
10383 (gdb_agent_helper_thread_id): New macros.
10384 (struct ipa_sym_addresses): Add addr_ust_loaded,
10385 addr_helper_thread_id, addr_cmd_buf.
10386 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10387 (in_process_agent_loaded_ust): New.
10388 (write_e_ust_not_loaded): New.
10389 (maybe_write_ipa_ust_not_loaded): New.
10390 (struct collect_static_trace_data_action): New.
10391 (enum tracepoint_type) <static_tracepoint>: New.
10392 (struct tracepoint) <handle>: Mention static tracepoints.
10393 (struct static_tracepoint_ctx): New.
10394 (CMD_BUF_SIZE): New.
10395 (add_tracepoint_action): Handle static tracepoint actions.
10396 (unprobe_marker_at): New.
10397 (clear_installed_tracepoints): Handle static tracepoints.
10398 (cmd_qtdp): Handle static tracepoints.
10399 (probe_marker_at): New.
10400 (cmd_qtstart): Handle static tracepoints.
10401 (response_tracepoint): Handle static tracepoints.
10402 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10403 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10404 (get_context_regcache): Handle static tracepoints.
10405 (do_action_at_tracepoint): Handle static tracepoint actions.
10406 (traceframe_find_block_type): Handle static trace data blocks.
10407 (traceframe_read_sdata): New.
10408 (download_tracepoints): Download static tracepoint actions.
10409 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10410 (GDB_PROBE_NAME): New.
10411 (ust_ops): New.
10412 (GET_UST_SYM): New.
10413 (USTF): New.
10414 (dlsym_ust): New.
10415 (ust_marker_to_static_tracepoint): New.
10416 (gdb_probe): New.
10417 (collect_ust_data_at_tracepoint): New.
10418 (gdb_ust_probe): New.
10419 (UNIX_PATH_MAX, SOCK_DIR): New.
10420 (gdb_ust_connect_sync_socket): New.
10421 (resume_thread, stop_thread): New.
10422 (run_inferior_command): New.
10423 (init_named_socket): New.
10424 (gdb_ust_socket_init): New.
10425 (cstr_to_hexstr): New.
10426 (next_st): New.
10427 (first_marker, next_marker): New.
10428 (response_ust_marker): New.
10429 (cmd_qtfstm, cmd_qtsstm): New.
10430 (unprobe_marker_at, probe_marker_at): New.
10431 (cmd_qtstmat, gdb_ust_thread): New.
10432 (gdb_ust_init): New.
10433 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10434 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10435 (ST_REGENTRY): New.
10436 (x86_64_st_collect_regmap): New.
10437 (X86_64_NUM_ST_COLLECT_GREGS): New.
10438 (AMD64_RIP_REGNUM): New.
10439 (supply_static_tracepoint_registers): New.
10440 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10441 (ST_REGENTRY): New.
10442 (i386_st_collect_regmap): New.
10443 (i386_NUM_ST_COLLECT_GREGS): New.
10444 (supply_static_tracepoint_registers): New.
10445 * server.c (handle_query): Handle qXfer:statictrace:read.
10446 <qSupported>: Report support for StaticTracepoints, and
10447 qXfer:statictrace:read features.
10448 * server.h (traceframe_read_sdata)
10449 (supply_static_tracepoint_registers): Declare.
10450 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10451 (unpack_varlen_hex): Include in IPA build.
10452 * Makefile.in (ustlibs, ustinc): New.
10453 (IPA_OBJS): Add remote-utils-ipa.o.
10454 ($(IPA_LIB)): Link -ldl and -lpthread.
10455 (UST_CFLAGS): New.
10456 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10457 * config.in, configure: Regenerate.
10458
9e4344e5
PA
104592010-06-20 Ian Lance Taylor <iant@google.com>
10460 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-x86-low.c (always_true): Delete.
10463 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10464 trying to fool the compiler with always_true.
10465
c6beb2cb
PA
104662010-06-20 Pedro Alves <pedro@codesourcery.com>
10467
10468 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10469 conditions in gdbserver.
10470
d2ed6730
UW
104712010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10472
10473 * spu-low.c (spu_read_memory): Wrap around local store limit.
10474 (spu_write_memory): Likewise.
10475
4e29fb54
PA
104762010-06-15 Pedro Alves <pedro@codesourcery.com>
10477
10478 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10479 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10480 LONGEST uses.
10481 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10482 uses.
10483 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10484 uses with LONGEST uses.
10485
6a271cae
PA
104862010-06-14 Stan Shebs <stan@codesourcery.com>
10487 Pedro Alves <pedro@codesourcery.com>
10488
10489 Bytecode compiler.
10490
10491 * linux-x86-low.c: Include limits.h.
10492 (add_insns): New.
10493 (always_true): New.
10494 (EMIT_ASM): New.
10495 (EMIT_ASM32): New.
10496 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10497 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10498 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10499 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10500 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10501 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10502 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10503 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10504 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10505 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10506 (amd64_emit_void_call_2): New.
10507 (amd64_emit_ops): New.
10508 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10509 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10510 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10511 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10512 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10513 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10514 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10515 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10516 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10517 (i386_emit_stack_adjust, i386_emit_int_call_1)
10518 (i386_emit_void_call_2): New.
10519 (i386_emit_ops): New.
10520 (x86_emit_ops): New.
10521 (the_low_target): Install x86_emit_ops.
10522 * server.h (struct emit_ops): New.
10523 (get_raw_reg_func_addr): Declare.
10524 (current_insn_ptr, emit_error): Declare.
10525 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10526 (set_trace_state_variable_value): New defines.
10527 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10528 addr_get_trace_state_variable_value and
10529 addr_set_trace_state_variable_value.
10530 (symbol_list): New fields for get_raw_reg,
10531 get_trace_state_variable_value and set_trace_state_variable_value.
10532 (condfn): New typedef.
10533 (struct tracepoint): New field `compiled_cond'.
10534 (do_action_at_tracepoint): Clear compiled_cond.
10535 (get_trace_state_variable_value, set_trace_state_variable_value):
10536 Export in the IPA.
10537 (condition_true_at_tracepoint): If there's a compiled condition,
10538 run that.
10539 (current_insn_ptr, emit_error): New globals.
10540 (struct bytecode_address): New.
10541 (get_raw_reg_func_addr): New.
10542 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10543 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10544 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10545 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10546 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10547 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10548 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10549 (compile_tracepoint_condition, compile_bytecodes): New.
10550 * target.h (emit_ops): Forward declare.
10551 (struct target_ops): New field emit_ops.
10552 (target_emit_ops): New.
10553 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10554 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10555 * linux-low.c (linux_emit_ops): New.
10556 (linux_target_ops): Install it.
10557 * linux-low.h (struct linux_target_ops): New field emit_ops.
10558
92b72907
UW
105592010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10560
10561 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10562 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10563
fa593d66
PA
105642010-06-01 Pedro Alves <pedro@codesourcery.com>
10565 Stan Shebs <stan@codesourcery.com>
10566
10567 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10568 (all): Depend on $(extra_libraries).
10569 (install-only): Install the IPA.
10570 (IPA_OBJS, IPA_LIB): New.
10571 (clean): Remove the IPA lib.
10572 (IPAGENT_CFLAGS): New.
10573 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10574 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10575 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10576 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10577 * configure.ac: Check for atomic builtins support in the compiler.
10578 (IPA_DEPFILES, extra_libraries): Define.
10579 * configure.srv (ipa_obj): Add description.
10580 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10581 (i[34567]86-*-linux*): Set ipa_obj.
10582 (x86_64-*-linux*): Set ipa_obj.
10583 * linux-low.c (stabilizing_threads): New.
10584 (supports_fast_tracepoints): New.
10585 (linux_detach): Stabilize threads before detaching.
10586 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10587 the lwp is either not stabilizing, or is moving out of a jump pad.
10588 (linux_fast_tracepoint_collecting): New.
10589 (maybe_move_out_of_jump_pad): New.
10590 (enqueue_one_deferred_signal): New.
10591 (dequeue_one_deferred_signal): New.
10592 (linux_wait_for_event_1): If moving out of a jump pad, defer
10593 pending signals to later.
10594 (linux_stabilize_threads): New.
10595 (linux_wait_1): Check if threads need moving out of jump pads, and
10596 do it if so.
10597 (stuck_in_jump_pad_callback): New.
10598 (move_out_of_jump_pad_callback): New.
10599 (lwp_running): New.
10600 (linux_resume_one_lwp): Handle moving out of jump pads.
10601 (linux_set_resume_request): Dequeue deferred signals.
10602 (need_step_over_p): Also step over fast tracepoint jumps.
10603 (start_step_over): Also uninsert fast tracepoint jumps.
10604 (finish_step_over): Also reinsert fast tracepoint jumps.
10605 (linux_install_fast_tracepoint_jump): New.
10606 (linux_target_ops): Install linux_stabilize_threads and
10607 linux_install_fast_tracepoint_jump_pad.
10608 * linux-low.h (linux_target_ops) <get_thread_area,
10609 install_fast_tracepoint_jump_pad>: New fields.
10610 (struct lwp_info) <collecting_fast_tracepoint,
10611 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10612 (linux_get_thread_area): Declare.
10613 * linux-x86-low.c (jump_insn): New.
10614 (x86_get_thread_area): New.
10615 (append_insns): New.
10616 (push_opcode): New.
10617 (amd64_install_fast_tracepoint_jump_pad): New.
10618 (i386_install_fast_tracepoint_jump_pad): New.
10619 (x86_install_fast_tracepoint_jump_pad): New.
10620 (the_low_target): Install x86_get_thread_area and
10621 x86_install_fast_tracepoint_jump_pad.
10622 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10623 (struct fast_tracepoint_jump): New.
10624 (fast_tracepoint_jump_insn): New.
10625 (fast_tracepoint_jump_shadow): New.
10626 (find_fast_tracepoint_jump_at): New.
10627 (fast_tracepoint_jump_here): New.
10628 (delete_fast_tracepoint_jump): New.
10629 (set_fast_tracepoint_jump): New.
10630 (uninsert_fast_tracepoint_jumps_at): New.
10631 (reinsert_fast_tracepoint_jumps_at): New.
10632 (set_breakpoint_at): Use write_inferior_memory.
10633 (uninsert_raw_breakpoint): Use write_inferior_memory.
10634 (check_mem_read): Mask out fast tracepoint jumps.
10635 (check_mem_write): Mask out fast tracepoint jumps.
10636 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10637 (set_fast_tracepoint_jump): Declare.
10638 (delete_fast_tracepoint_jump)
10639 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10640 (reinsert_fast_tracepoint_jumps_at): Declare.
10641 * regcache.c: Don't compile many functions when building the
10642 in-process agent library.
10643 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10644 the register buffer in the heap.
10645 (free_register_cache): If the register buffer isn't owned by the
10646 regcache, don't free it.
10647 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10648 pre-existing register caches.
10649 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10650 type.
10651 (convert_ascii_to_int): : Constify `from' parameter type.
10652 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10653 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10654 the needed buffer in-place.
10655 (relocate_instruction): New.
10656 * server.c (handle_query) <qSymbols>: If the target supports
10657 tracepoints, give it a chance of looking up symbols. Report
10658 support for fast tracepoints.
10659 (handle_status): Stabilize threads.
10660 (process_serial_event): Adjust.
10661 * server.h (struct fast_tracepoint_jump): Forward declare.
10662 (struct process_info) <fast_tracepoint_jumps>: New field.
10663 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10664 (decode_X_packet, decode_M_packet): Adjust.
10665 (relocate_instruction): Declare.
10666 (in_process_agent_loaded): Declare.
10667 (tracepoint_look_up_symbols): Declare.
10668 (struct fast_tpoint_collect_status): Declare.
10669 (fast_tracepoint_collecting): Declare.
10670 (force_unlock_trace_buffer): Declare.
10671 (handle_tracepoint_bkpts): Declare.
10672 (initialize_low_tracepoint)
10673 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10674 * target.h (struct target_ops) <stabilize_threads,
10675 install_fast_tracepoint_jump_pad>: New fields.
10676 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10677 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10678 [HAVE_STDINT_H]: Include stdint.h.
10679 (trace_debug_1): Rename to ...
10680 (trace_vdebug): ... this.
10681 (trace_debug): Rename to ...
10682 (trace_debug_1): ... this. Add `level' parameter.
10683 (trace_debug): New.
10684 (ATTR_USED, ATTR_NOINLINE): New.
10685 (IP_AGENT_EXPORT): New.
10686 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10687 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10688 (about_to_request_buffer_space, trace_buffer_is_full)
10689 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10690 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10691 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10692 (traceframe_write_count, traceframes_created)
10693 (trace_state_variables)
10694 New renaming defines.
10695 (struct ipa_sym_addresses): New.
10696 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10697 (symbol_list): New.
10698 (ipa_sym_addrs): New.
10699 (all_tracepoint_symbols_looked_up): New.
10700 (in_process_agent_loaded): New.
10701 (write_e_ipa_not_loaded): New.
10702 (maybe_write_ipa_not_loaded): New.
10703 (tracepoint_look_up_symbols): New.
10704 (debug_threads) [IN_PROCESS_AGENT]: New.
10705 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10706 (UNKNOWN_SIDE_EFFECTS): New.
10707 (stop_tracing): New.
10708 (flush_trace_buffer): New.
10709 (stop_tracing_bkpt): New.
10710 (flush_trace_buffer_bkpt): New.
10711 (read_inferior_integer): New.
10712 (read_inferior_uinteger): New.
10713 (read_inferior_data_pointer): New.
10714 (write_inferior_data_pointer): New.
10715 (write_inferior_integer): New.
10716 (write_inferior_uinteger): New.
10717 (struct collect_static_trace_data_action): Delete.
10718 (enum tracepoint_type): New.
10719 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10720 <actions_str, step_actions, step_actions_str>: Only include in
10721 GDBserver.
fa593d66
PA
10722 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10723 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10724 (tracepoints): Use IP_AGENT_EXPORT.
10725 (last_tracepoint): Don't include in the IPA.
10726 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10727 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10728 (alloced_trace_state_variables): New.
10729 (trace_state_variables): Use IP_AGENT_EXPORT.
10730 (traceframe_t): Delete unused variable.
10731 (circular_trace_buffer): Don't include in the IPA.
10732 (trace_buffer_start): Delete.
10733 (struct trace_buffer_control): New.
10734 (trace_buffer_free): Delete.
10735 (struct ipa_trace_buffer_control): New.
10736 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10737 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10738 New.
10739 (trace_buffer_ctrl): New.
10740 (TRACE_BUFFER_CTRL_CURR): New.
10741 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10742 Reimplement as macros.
10743 (trace_buffer_wrap): Delete.
10744 (traceframe_write_count, traceframe_read_count)
10745 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10746 (struct tracepoint_hit_ctx) <type>: New field.
10747 (struct fast_tracepoint_ctx): New.
10748 (memory_barrier): New.
10749 (cmpxchg): New.
10750 (record_tracepoint_error): Update atomically in the IPA.
10751 (clear_inferior_trace_buffer): New.
10752 (about_to_request_buffer_space): New.
10753 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10754 updating the same buffer.
10755 (add_tracepoint): Default the tracepoint's type to trap
10756 tracepoint, and orig_size to -1.
10757 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10758 internal variables.
10759 (create_trace_state_variable): New parameter `gdb'. Handle it.
10760 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10761 (cmd_qtdp): Handle fast tracepoints.
10762 (cmd_qtdv): Adjust.
10763 (max_jump_pad_size): New.
10764 (gdb_jump_pad_head): New.
10765 (get_jump_space_head): New.
10766 (claim_jump_space): New.
10767 (sort_tracepoints): New.
10768 (MAX_JUMP_SIZE): New.
10769 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10770 IPA.
10771 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10772 support. Upload fast traceframes, and delete internal IPA
10773 breakpoints.
10774 (stop_tracing_handler): New.
10775 (flush_trace_buffer_handler): New.
10776 (cmd_qtstop): Upload fast tracepoints.
10777 (response_tracepoint): Handle fast tracepoints.
10778 (tracepoint_finished_step): Upload fast traceframes. Set the
10779 tracepoint hit context's tracepoint type.
10780 (handle_tracepoint_bkpts): New.
10781 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10782 type. Add comment about fast tracepoints.
10783 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10784 non-existing action_str field.
10785 (get_context_regcache): Handle fast tracepoints.
10786 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10787 to the regcache.
10788 (fast_tracepoint_from_jump_pad_address): New.
10789 (fast_tracepoint_from_ipa_tpoint_address): New.
10790 (collecting_t): New.
10791 (force_unlock_trace_buffer): New.
10792 (fast_tracepoint_collecting): New.
10793 (collecting): New.
10794 (gdb_collect): New.
10795 (write_inferior_data_ptr): New.
10796 (target_tp_heap): New.
10797 (target_malloc): New.
10798 (download_agent_expr): New.
10799 (UALIGN): New.
10800 (download_tracepoints): New.
10801 (download_trace_state_variables): New.
10802 (upload_fast_traceframes): New.
10803 (IPA_FIRST_TRACEFRAME): New.
10804 (IPA_NEXT_TRACEFRAME_1): New.
10805 (IPA_NEXT_TRACEFRAME): New.
10806 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10807 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10808 (gdb_jump_pad_buffer_end): New.
10809 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10810 (initialize_tracepoint): Adjust.
10811 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10812 buffer. Initialize the low module.
10813 * utils.c (PREFIX, TOOLNAME): New.
10814 (malloc_failure): Use PREFIX.
10815 (error): In the IPA, an error causes an exit.
10816 (fatal, warning): Use PREFIX.
10817 (internal_error): Use TOOLNAME.
10818 (NUMCELLS): Increase to 10.
10819 * configure, config.in: Regenerate.
10820
d149dd1d
PA
108212010-06-01 Pedro Alves <pedro@codesourcery.com>
10822
10823 * server.c (handle_query) <qSupported>: Do two passes over the
10824 qSupported string to avoid nesting strtok.
10825
f6528abd
JK
108262010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10827
10828 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10829 (CDEPS): New.
10830 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10831 -Wl,--dynamic-list.
10832 * configure: Regenerate.
10833 * proc-service.list: New.
10834
ca2a87a0
JK
108352010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10836
10837 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10838 New comment.
10839
363a6e9f
OS
108402010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10841
10842 * gdbreplay.c (remote_open): Check error return from socket() call by
10843 its equality to -1 not by it being negative.
10844 * remote-utils.c (remote_open): Likewise.
10845
d23b6cb1
PA
108462010-05-23 Pedro Alves <pedro@codesourcery.com>
10847
10848 * config.h: Regenerate.
10849
28d3cf85
MK
108502010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10851
10852 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10853 doesn't provide PTRACE_GET_THREAD_AREA.
10854
fea36a59
MK
108552010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10856
10857 * linux-m68k-low.c: Include <asm/ptrace.h>
10858 (ps_get_thread_area): Implement.
10859
24b066ba
DE
108602010-05-03 Doug Evans <dje@google.com>
10861
10862 * event-loop.c (struct callback_event): New struct.
10863 (callback_list): New global.
10864 (append_callback_event, delete_callback_event): New functions.
10865 (process_callback): New function.
10866 (start_event_loop): Call it.
10867 * remote-utils.c (NOT_SCHEDULED): Define.
10868 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10869 moved out of readchar.
10870 (readchar): Rewrite. Call reschedule before returning.
10871 (reset_readchar): New function.
10872 (remote_close): Call it.
10873 (process_remaining, reschedule): New functions.
10874 * server.h (callback_handler_func): New typedef.
10875 (append_callback_event, delete_callback_event): Declare.
10876
9836d6ea
PA
108772010-05-03 Pedro Alves <pedro@codesourcery.com>
10878
10879 * proc-service.c (ps_pglobal_lookup): Use
10880 thread_db_look_up_one_symbol.
10881 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10882 parameter. Use it instead of all_symbols_looked_up.
10883 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10884 field.
10885 (all_symbols_looked_up): Don't declare.
10886 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10887 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10888 field.
10889 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10890 Set all_symbols_looked_up here.
10891 (thread_db_look_up_one_symbol): New.
10892 (thread_db_get_tls_address): Adjust.
10893 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10894 thread_db object on the heap, and tentatively set it in the
10895 process structure.
10896 (thread_db_init): Don't set all_symbols_looked_up here.
10897 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10898
7984d532
PA
108992010-05-03 Pedro Alves <pedro@codesourcery.com>
10900
10901 * linux-low.c (linux_kill, linux_detach): Adjust.
10902 (status_pending_p_callback): Remove redundant statement. Check
10903 for !TARGET_WAITIKIND_IGNORE, instead of
10904 TARGET_WAITKIND_STOPPED.
10905 (handle_tracepoints): Make sure LWP is locked. Adjust.
10906 (linux_wait_for_event_1): Adjust.
10907 (linux_cancel_breakpoints): New.
10908 (unsuspend_one_lwp): New.
10909 (unsuspend_all_lwps): New.
10910 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10911 (send_sigstop_callback): Change return type to int, add new
10912 `except' parameter and handle it.
10913 (suspend_and_send_sigstop_callback): New.
10914 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10915 pass them down. If SUSPEND, also increment the lwp's suspend
10916 count.
10917 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10918 (need_step_over_p): Don't consider suspended LWPs.
10919 (start_step_over): Adjust.
10920 (proceed_one_lwp): Change return type to int, add new `except'
10921 parameter and handle it.
10922 (unsuspend_and_proceed_one_lwp): New.
10923 (proceed_all_lwps): Use find_inferior instead of
10924 for_each_inferior.
10925 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10926 also decrement the suspend count of LWPs. Pass `except' down,
10927 instead of hacking its suspend count.
10928 (linux_pause_all): Add `freeze' parameter. Adjust.
10929 (linux_unpause_all): New.
10930 (linux_target_ops): Install linux_unpause_all.
10931 * server.c (handle_status): Adjust.
10932 * target.h (struct target_ops): New fields `unpause_all' and
10933 `cancel_breakpoints'. Add new parameter to `pause_all'.
10934 (pause_all): Add new `freeze' parameter.
10935 (unpause_all): New.
10936 (cancel_breakpoints): New.
10937 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10938 cancel breakpoints.
10939 (cmd_qtstart): Pause threads.
10940 (stop_tracing): Pause threads, and cancel breakpoints.
10941 * win32-low.c (win32_target_ops): Adjust.
10942
e471f25b
PA
109432010-05-03 Pedro Alves <pedro@codesourcery.com>
10944
10945 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10946 the inferior right away from here...
10947 (linux_wait_1): ... to here, and adjust to check the thread's
10948 last_resume_kind instead of the lwp's step or stop_expected flags.
10949
1915ef4f
PA
109502010-05-02 Pedro Alves <pedro@codesourcery.com>
10951
10952 * README: Use consistent `GDB' and `GDBserver' spellings.
10953
f9e39928
PA
109542010-05-02 Pedro Alves <pedro@codesourcery.com>
10955
10956 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10957 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10958 (linux_detach_one_lwp): Assume the lwp is stopped.
10959 (any_thread_of): Delete.
10960 (linux_detach): Stop all lwps here. Don't blindly delete all
10961 breakpoints.
10962 (delete_lwp_callback): New.
10963 (linux_mourn): Delete all lwps of the process that is gone.
10964 (linux_wait_1): Don't delete the last lwp of the process here.
10965 * mem-break.h (mark_breakpoints_out): Declare.
10966 * mem-break.c (mark_breakpoints_out): New.
10967 (free_all_breakpoints): Use it.
10968 * server.c (handle_target_event): If the process is gone, mark
10969 breakpoints out.
10970 * thread-db.c (struct thread_db) <create_bp>: New field.
10971 (thread_db_enable_reporting): Fix prototype. Store a thread event
10972 breakpoint reference in the thread_db struct.
10973 (thread_db_load_search): Clear the thread_db object.
10974 (try_thread_db_load_1): Ditto.
10975 (switch_to_process): New.
10976 (disable_thread_event_reporting): Use it.
10977 (remove_thread_event_breakpoints): New.
10978 (thread_db_detach, thread_db_mourn): Use it.
10979
1e7fc18c
PA
109802010-05-01 Pedro Alves <pedro@codesourcery.com>
10981
10982 * linux-low.c (linux_enable_event_reporting): New.
10983 (linux_wait_for_event_1, handle_extended_wait): Use it.
10984
02fc4de7
PA
109852010-04-30 Pedro Alves <pedro@codesourcery.com>
10986
10987 * linux-low.c (linux_kill_one_lwp, linux_kill)
10988 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10989 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10990 SIGSTOP even if the LWP is stopped.
10991 (send_sigstop_callback): New.
10992 (stop_all_lwps): Use send_sigstop_callback instead.
10993 (linux_resume_one_thread): Adjust.
10994 (proceed_one_lwp): Still proceed an LWP that the client has
10995 requested to stop, if we haven't reported it as stopped yet. Make
10996 sure that LWPs the client want stopped, have a pending SIGSTOP.
10997
bc3b5632
DE
109982010-04-26 Doug Evans <dje@google.com>
10999
ae1ada35
DE
11000 * server.c (handle_general_set): Make static.
11001
bc3b5632
DE
11002 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11003 Print received char after testing for error/eof instead of before.
11004 (input_interrupt): Tweak comment.
11005
65730243
DE
110062010-04-23 Doug Evans <dje@google.com>
11007
11008 * server.c (start_inferior): Print inferior argv if --debug.
11009
a8ae7dc0
AR
110102010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11011
11012 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11013 * nto-x86-low.c: Include server.h
11014
1c07cc19
PM
110152010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11016
11017 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11018 be consistent with other sources of this directory.
11019 (init_registers_amd64): Correct name of source file of this function
11020 in the comment.
11021
e0a61e09
PM
110222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11023
11024 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11025 64-bit executables.
11026
54709339
PM
110272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11028
11029 * win32-i386-low.c: Add 64-bit support.
11030 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11031 (init_registers_amd64): Declare.
11032 (mappings): Add 64-bit version of array.
11033 (init_windows_x86): New function.
11034 (the_low_target): Change init_arch field to init_windows_x86.
11035
e8f0053d
PM
110362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11037
11038 * win32-low.c: Adapt to support also 64-bit architecture.
11039 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11040 (get_image_name): Use SIZE_T type for local variable `done'.
11041 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11042 (toolhelp_get_dll_name): Idem.
11043 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11044 Use uintptr_t typecast to avoid warning.
11045 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11046 (handle_exception): Use phex_nz to avoid warning.
11047 (win32_wait): Remove unused local variable `process'.
11048
c481e77e
PM
110492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11050
11051 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11052 `amd64-avx.o'.
11053
12ea4b69
PM
110542010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11055
11056 * configure.ac: Use `ws2_32' library for srv_mingw.
11057 * configure: Regenerate.
11058 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11059 * remote-utils.c: Likewise.
11060
f6d1620c
L
110612010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11062
11063 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11064 if __x86_64__ is defined.
11065
8e642873
PM
110662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11067
11068 * configure: Regenerate.
11069
711e434b
PM
110702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11071
11072 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11073 * target.h (target_ops): New get_tib_address field.
11074 * win32-low.h (win32_thread_info): Add thread_local_base field.
11075 * win32-low.c (child_add_thread): Add tlb argument.
11076 Set thread_local_base field to TLB.
11077 (get_child_debug_event): Adapt to child_add_thread change.
11078 (win32_get_tib_address): New function.
11079 (win32_target_ops): Set get_tib_address field to
11080 win32_get_tib_address.
11081 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11082
505106cd
PA
110832010-04-12 Pedro Alves <pedro@codesourcery.com>
11084
505106cd
PA
11085 * linux-low.c (linux_mourn): Also remove the process.
11086 * server.c (handle_target_event): Don't remove the process here.
11087 * nto-low.c (nto_mourn): New.
11088 (nto_target_ops): Install it.
11089 * spu-low.c (spu_mourn): New.
11090 (spu_target_ops): Install it.
11091 * win32-low.c (win32_mourn): New.
11092 (win32_target_ops): Install it.
11093
e8470a06
PA
110942010-04-12 Pedro Alves <pedro@codesourcery.com>
11095
11096 * server.h (buffer_xml_printf): Remove redundant `;'.
11097
45ba0d02
PA
110982010-04-12 Pedro Alves <pedro@codesourcery.com>
11099
11100 * regcache.c (set_register_cache): Invalidate regcaches before
11101 changing the register cache layout.
11102 (regcache_invalidate_one): Allow a NULL regcache.
11103 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11104 regcaches before changing the register cache layout or the target
11105 regsets.
11106
59e04013
L
111072010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11108
11109 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11110 variable warning on Linux/x86-64.
11111
8336d594
PA
111122010-04-11 Pedro Alves <pedro@codesourcery.com>
11113
11114 GDBserver disconnected tracing support.
11115
11116 * linux-low.c (linux_remove_process): Delete.
11117 (add_lwp): Don't set last_resume_kind here.
11118 (linux_kill): Use `mourn'.
11119 (linux_detach): Use `thread_db_detach', and `mourn'.
11120 (linux_mourn): New.
11121 (linux_attach_lwp_1): Adjust comment.
11122 (linux_attach): last_resume_kind moved the thread_info; adjust.
11123 (status_pending_p_callback): Adjust.
11124 (linux_wait_for_event_1): Adjust.
11125 (count_events_callback, select_singlestep_lwp_callback)
11126 (select_event_lwp_callback, cancel_breakpoints_callback)
11127 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11128 (proceed_one_lwp): Adjust.
11129 (linux_async): Add debug output.
11130 (linux_thread_stopped): New.
11131 (linux_pause_all): New.
11132 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11133 linux_pause_all.
11134 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11135 (thread_db_free): Delete declaration.
11136 (thread_db_detach, thread_db_mourn): Declare.
11137 * thread-db.c (thread_db_init): Use thread_db_mourn.
11138 (thread_db_free): Delete, split in two.
11139 (disable_thread_event_reporting): New.
11140 (thread_db_detach): New.
11141 (thread_db_mourn): New.
11142
11143 * server.h (struct thread_info) <last_resume_kind>: New field.
11144 <attached>: Add comment.
11145 <gdb_detached>: New field.
11146 (handler_func): Change return type to int.
11147 (handle_serial_event, handle_target_event): Ditto.
11148 (gdb_connected): Declare.
11149 (tracing): Delete.
11150 (disconnected_tracing): Declare.
11151 (stop_tracing): Declare.
11152
11153 * server.c (handle_query) <qSupported>: Report support for
11154 disconnected tracing.
11155 (queue_stop_reply_callback): Account for running threads.
11156 (gdb_wants_thread_stopped): New.
11157 (gdb_wants_all_threads_stopped): New.
11158 (gdb_reattached_process): New.
11159 (handle_status): Clear the `gdb_detached' flag of all processes.
11160 In all-stop, stop all threads.
11161 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11162 (process_serial_event): If the remote connection breaks, or if an
11163 exit was forced with "monitor exit", force an event loop exit.
11164 Handle disconnected tracing on detach.
11165 (handle_serial_event): Adjust.
11166 (handle_target_event): If GDB isn't connected, forward events back
11167 to the inferior, unless the last process exited, in which case,
11168 exit gdbserver. Adjust interface.
11169
11170 * remote-utils.c (remote_open): Don't block in accept. Instead
11171 register an event loop source on the listen socket file
11172 descriptor. Refactor bits into ...
11173 (listen_desc): ... this new global.
11174 (gdb_connected): ... this new function.
11175 (enable_async_notification): ... this new function.
11176 (handle_accept_event): ... this new function.
11177 (remote_close): Clear remote_desc.
11178
11179 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11180
11181 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11182 New fields.
11183 (mourn_inferior): Define.
11184 (target_process_qsupported): Avoid the dangling else problem.
11185 (thread_stopped): Define.
11186 (pause_all): Define.
11187 (target_waitstatus_to_string): Declare.
11188 * target.c (target_waitstatus_to_string): New.
11189
11190 * tracepoint.c (tracing): Make extern.
11191 (disconnected_tracing): New.
11192 (stop_tracing): Make extern. Handle tracing stops due to GDB
11193 disconnecting.
11194 (cmd_qtdisconnected): New.
11195 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11196 (handle_tracepoint_general_set): Handle QTDisconnected.
11197
11198 * event-loop.c (event_handler_func): Change return type to int.
11199 (process_event): Bail out if the event handler wants the event
11200 loop to stop.
11201 (handle_file_event): Ditto.
11202 (start_event_loop): Bail out if the event handler wants the event
11203 loop to stop.
11204
11205 * nto-low.c (nto_target_ops): Adjust.
11206 * spu-low.c (spu_wait): Don't remove the process here.
11207 (spu_target_ops): Adjust.
11208 * win32-low.c (win32_wait): Don't remove the process here.
11209 (win32_target_ops): Adjust.
11210
5d267c4c
PA
112112010-04-11 Pedro Alves <pedro@codesourcery.com>
11212
11213 * regcache.c (realloc_register_cache): Invalidate inferior's
11214 regcache before recreating it.
11215
623ccd72
PA
112162010-04-09 Pedro Alves <pedro@codesourcery.com>
11217
11218 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11219
219f2f23
PA
112202010-04-09 Stan Shebs <stan@codesourcery.com>
11221 Pedro Alves <pedro@codesourcery.com>
11222
11223 * server.h (LONGEST): New.
11224 (struct thread_info) <while_stepping>: New field.
11225 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11226 Declare.
11227 (initialize_tracepoint, handle_tracepoint_general_set)
11228 (handle_tracepoint_query, tracepoint_finished_step)
11229 (tracepoint_was_hit, release_while_stepping_state_list):
11230 (current_traceframe): Declare.
11231 * server.c (handle_general_set): Handle tracepoint packets.
11232 (read_memory): New.
11233 (write_memory): New.
11234 (handle_search_memory_1): Use read_memory.
11235 (handle_query): Report support for conditional tracepoints, trace
11236 state variables, and tracepoint sources. Handle tracepoint
11237 queries.
11238 (main): Initialize the tracepoints module.
11239 (process_serial_event): Handle traceframe reads/writes.
11240
11241 * linux-low.c (handle_tracepoints): New.
11242 (linux_wait_1): Call it.
11243 (linux_resume_one_lwp): Handle while-stepping.
11244 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11245 (linux_target_ops): Install them.
11246 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11247 New field.
11248 * linux-x86-low.c (x86_supports_tracepoints): New.
11249 (the_low_target). Install it.
11250
11251 * mem-break.h (delete_breakpoint): Declare.
11252 * mem-break.c (delete_breakpoint): Make external.
11253
11254 * target.h (struct target_ops): Add `supports_tracepoints',
11255 `read_pc', and `write_pc' fields.
11256 (target_supports_tracepoints): Define.
11257 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11258 (phex_nz): New.
11259
11260 * regcache.h (struct regcache) <registers_owned>: New field.
11261 (init_register_cache, regcache_cpy): Declare.
11262 (regcache_read_pc, regcache_write_pc): Declare.
11263 (register_cache_size): Declare.
11264 (supply_regblock): Declare.
11265 * regcache.c (init_register_cache): New.
11266 (new_register_cache): Use it.
11267 (regcache_cpy): New.
11268 (register_cache_size): New.
11269 (supply_regblock): New.
11270 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11271
219f2f23
PA
11272 * tracepoint.c: New.
11273
11274 * Makefile.in (OBS): Add tracepoint.o.
11275 (tracepoint.o): New rule.
11276
3a13a53b
L
112772010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11278
11279 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11280 (i386-mmx.o): New.
11281 (i386-mmx.c): Likewise.
11282 (i386-mmx-linux.o): Likewise.
11283 (i386-mmx-linux.c): Likewise.
11284
11285 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11286 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11287 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11288 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11289
11290 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11291 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11292 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11293
1570b33e
L
112942010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11295
11296 * Makefile.in (clean): Updated.
11297 (i386-avx.o): New.
11298 (i386-avx.c): Likewise.
11299 (i386-avx-linux.o): Likewise.
11300 (i386-avx-linux.c): Likewise.
11301 (amd64-avx.o): Likewise.
11302 (amd64-avx.c): Likewise.
11303 (amd64-avx-linux.o): Likewise.
11304 (amd64-avx-linux.c): Likewise.
11305
11306 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11307 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11308 (srv_amd64_regobj): Add amd64-avx.o.
11309 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11310 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11311 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11312 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11313 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11314 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11315 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11316
11317 * i387-fp.c: Include "i386-xstate.h".
11318 (i387_xsave): New.
11319 (i387_cache_to_xsave): Likewise.
11320 (i387_xsave_to_cache): Likewise.
11321 (x86_xcr0): Likewise.
11322
11323 * i387-fp.h (i387_cache_to_xsave): Likewise.
11324 (i387_xsave_to_cache): Likewise.
11325 (x86_xcr0): Likewise.
11326
11327 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11328 * linux-crisv32-low.c (target_regsets): Likewise.
11329 * linux-m68k-low.c (target_regsets): Likewise.
11330 * linux-mips-low.c (target_regsets): Likewise.
11331 * linux-ppc-low.c (target_regsets): Likewise.
11332 * linux-s390-low.c (target_regsets): Likewise.
11333 * linux-sh-low.c (target_regsets): Likewise.
11334 * linux-sparc-low.c (target_regsets): Likewise.
11335 * linux-xtensa-low.c (target_regsets): Likewise.
11336
11337 * linux-low.c: Include <sys/uio.h>.
11338 (regsets_fetch_inferior_registers): Support nt_type.
11339 (regsets_store_inferior_registers): Likewise.
11340 (linux_process_qsupported): New.
11341 (linux_target_ops): Add linux_process_qsupported.
11342
11343 * linux-low.h (regset_info): Add nt_type.
11344 (linux_target_ops): Add process_qsupported.
11345
11346 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11347 and <sys/uio.h>.
11348 (init_registers_i386_avx_linux): New.
11349 (init_registers_amd64_avx_linux): Likewise.
11350 (xmltarget_i386_linux_no_xml): Likewise.
11351 (xmltarget_amd64_linux_no_xml): Likewise.
11352 (PTRACE_GETREGSET): Likewise.
11353 (PTRACE_SETREGSET): Likewise.
11354 (x86_fill_xstateregset): Likewise.
11355 (x86_store_xstateregset): Likewise.
11356 (use_xml): Likewise.
11357 (x86_linux_update_xmltarget): Likewise.
11358 (x86_linux_process_qsupported): Likewise.
11359 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11360 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11361 init_registers_i386_linux here. Call
11362 x86_linux_update_xmltarget.
11363 (the_low_target): Add x86_linux_process_qsupported.
11364
11365 * server.c (handle_query): Call target_process_qsupported.
11366
11367 * target.h (target_ops): Add process_qsupported.
11368 (target_process_qsupported): New.
11369
fc7238bb
PA
113702010-04-03 Pedro Alves <pedro@codesourcery.com>
11371
11372 * inferiors.c (add_thread): Set last_status kind to
11373 TARGET_WAITKIND_IGNORE.
11374 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11375 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11376 (linux_wait_1): Move `thread' local definition to block that uses
11377 it. Don't NULL initialize `event_child'.
11378 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11379 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11380 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11381
bdabb078
PA
113822010-04-01 Pedro Alves <pedro@codesourcery.com>
11383
11384 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11385 an extended waitstatus, or by a watchpoint.
11386 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11387 thread was stepping or has been stopped by a watchpoint.
11388
d3bbe7a0
PA
113892010-04-01 Pedro Alves <pedro@codesourcery.com>
11390
11391 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11392 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11393 of another, then delete the previous, and validate all
11394 breakpoints.
11395 (validate_inserted_breakpoint): New.
11396 (delete_disabled_breakpoints): New.
11397 (validate_breakpoints): New.
11398 (check_mem_read): Validate breakpoints before trusting their
11399 shadow. Delete disabled breakpoints.
11400 (check_mem_write): Validate breakpoints before trusting they
11401 should be inserted. Delete disabled breakpoints.
11402 * mem-break.h (validate_breakpoints):
11403 * server.c (handle_query): Validate breakpoints when we see a
11404 qSymbol query.
11405
8b07ae33
PA
114062010-04-01 Pedro Alves <pedro@codesourcery.com>
11407
11408 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11409 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11410 if we could tell there's a GDB breakpoint at stop_pc.
11411 (need_step_over_p): Don't do a step over if we find a GDB
11412 breakpoint at the resume PC.
11413
11414 * mem-break.c (struct raw_breakpoint): New.
11415 (enum bkpt_type): New type `gdb_breakpoint'.
11416 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11417 fields. New field `raw'.
11418 (find_raw_breakpoint_at): New.
11419 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11420 breakpoint instead.
11421 (set_breakpoint_at): Adjust.
11422 (delete_raw_breakpoint): New.
11423 (release_breakpoint): New.
11424 (delete_breakpoint): Rename to...
11425 (delete_breakpoint_1): ... this. Add proc parameter. Use
11426 release_breakpoint. Return ENOENT.
11427 (delete_breakpoint): Reimplement.
11428 (find_breakpoint_at): Delete.
11429 (find_gdb_breakpoint_at): New.
11430 (delete_breakpoint_at): Delete.
11431 (set_gdb_breakpoint_at): New.
11432 (delete_gdb_breakpoint_at): New.
11433 (gdb_breakpoint_here): New.
11434 (set_reinsert_breakpoint): Use release_breakpoint.
11435 (uninsert_breakpoint): Rename to ...
11436 (uninsert_raw_breakpoint): ... this.
11437 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11438 (reinsert_raw_breakpoint): Change parameter type to
11439 raw_breakpoint.
11440 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11441 instead.
11442 (check_breakpoints): Adjust. Use release_breakpoint.
11443 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11444 (breakpoint_inserted_here): Ditto.
11445 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11446 Don't trust the breakpoint's shadow if it is not inserted.
11447 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11448 (delete_all_breakpoints): Adjust.
11449 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11450 use delete_breakpoint_1.
11451
11452 * mem-break.h (breakpoints_supported): Delete declaration.
11453 (set_gdb_breakpoint_at): Declare.
11454 (gdb_breakpoint_here): Declare.
11455 (delete_breakpoint_at): Delete.
11456 (delete_gdb_breakpoint_at): Declare.
11457
11458 * server.h (struct raw_breakpoint): Forward declare.
11459 (struct process_info): New field `raw_breakpoints'.
11460
11461 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11462 breakpoints.
11463
6bf5e0ba
PA
114642010-03-24 Pedro Alves <pedro@codesourcery.com>
11465
11466 * linux-low.c (status_pending_p_callback): Fix comment.
11467 (linux_wait_for_event_1): Move most of the internal breakpoint
11468 handling from here...
11469 (linux_wait_1): ... to here.
11470 (count_events_callback): New.
11471 (select_singlestep_lwp_callback): New.
11472 (select_event_lwp_callback): New.
11473 (cancel_breakpoints_callback): New.
11474 (select_event_lwp): New.
11475 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11476 priority to all LWPs that have had events that should be reported
11477 to the client. Cancel breakpoints when about to reporting the
11478 event to the client, not while stopping lwps. No longer cancel
11479 finished single-steps here.
11480 (cancel_finished_single_step): Delete.
11481 (cancel_finished_single_steps): Delete.
11482
414a389f
PA
114832010-03-24 Pedro Alves <pedro@codesourcery.com>
11484
11485 * mem-break.c (enum bkpt_type): New.
11486 (struct breakpoint): New field `type'.
11487 (set_breakpoint_at): Change return type to struct breakpoint
11488 pointer. Set type to `other_breakpoint' by default.
11489 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11490 in the breakpoint list.
11491 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11492 (reinsert_breakpoint): Rename to ...
11493 (reinsert_raw_breakpoint): ... this.
11494 (reinsert_breakpoints_at): Adjust.
11495 * mem-break.h (struct breakpoint): Declare.
11496 (set_breakpoint_at): Change return type to struct breakpoint
11497 pointer.
11498
2280c721
PA
114992010-03-24 Pedro Alves <pedro@codesourcery.com>
11500
11501 * server.c (handle_query): Assign, not compare.
11502
d50171e4
PA
115032010-03-24 Pedro Alves <pedro@codesourcery.com>
11504
11505 Teach linux gdbserver to step-over-breakpoints.
11506
11507 * linux-low.c (can_hardware_single_step): New.
11508 (supports_breakpoints): New.
11509 (handle_extended_wait): If stopping threads, read the stop pc of
11510 the new cloned LWP.
11511 (get_pc): New.
11512 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11513 low target doesn't support retrieving the PC.
11514 (add_lwp): Set last_resume_kind to resume_continue.
11515 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11516 (linux_attach): Don't clear stop_expected. Set the lwp's
11517 last_resume_kind to resume_stop.
11518 (linux_detach_one_lwp): Don't check for removed breakpoints.
11519 (check_removed_breakpoint): Delete.
11520 (status_pending_p): Rename to ...
11521 (status_pending_p_callback): ... this. Don't check for removed
11522 breakpoints. Don't consider threads that are stopped from GDB's
11523 perspective.
11524 (linux_wait_for_lwp): Always read the stop_pc here.
11525 (cancel_breakpoint): New.
11526 (step_over_bkpt): New global.
11527 (linux_wait_for_event_1): Implement stepping over breakpoints.
11528 (gdb_wants_lwp_stopped): New.
11529 (gdb_wants_all_stopped): New.
11530 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11531 single-step traps here. Store the thread's last reported target
11532 wait status.
11533 (send_sigstop): Don't clear stop_expected. Always set it,
11534 instead.
11535 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11536 (cancel_finished_single_step): New.
11537 (cancel_finished_single_steps): New.
11538 (wait_for_sigstop): Don't cancel finished single-step traps here.
11539 (linux_resume_one_lwp): Don't check for removed breakpoints.
11540 Don't set `step' on non-hardware step archs.
11541 (linux_set_resume_request): Ignore resume_stop requests if already
11542 stopping or stopped. Set the lwp's last_resume_kind.
11543 (resume_status_pending_p): Don't check for removed breakpoints.
11544 (need_step_over_p): New.
11545 (start_step_over): New.
11546 (finish_step_over): New.
11547 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11548 requests. Clear the thread's last reported target waitstatus.
11549 Don't use the `suspended' flag. Don't consider pending breakpoints.
11550 (linux_resume): Start a step-over if necessary.
11551 (proceed_one_lwp): New.
11552 (proceed_all_lwps): New.
11553 (unstop_all_lwps): New.
11554 * linux-low.h (struct lwp_info): Rewrite comment for the
11555 `suspended' flag. Add the `stop_pc' field. Delete the
11556 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11557 Add `'last_resume_kind' and `need_step_over' fields.
11558 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11559 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11560 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11561 (set_raw_breakpoint_at): New.
11562 (set_breakpoint_at): Rewrite to use it.
11563 (reinsert_breakpoint_handler): Delete.
11564 (set_reinsert_breakpoint): New.
11565 (reinsert_breakpoint_by_bp): Delete.
11566 (delete_reinsert_breakpoints): New.
11567 (uninsert_breakpoint): Rewrite.
11568 (uninsert_breakpoints_at): New.
11569 (reinsert_breakpoint): Rewrite.
11570 (reinsert_breakpoints_at): New.
11571 (check_breakpoints): Rewrite.
11572 (breakpoint_here): New.
11573 (breakpoint_inserted_here): New.
11574 (check_mem_read): Adjust.
11575 * mem-break.h (breakpoints_supported, breakpoint_here)
11576 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11577 (reinsert_breakpoint_by_bp): Delete declaration.
11578 (delete_reinsert_breakpoints): Declare.
11579 (reinsert_breakpoint): Delete declaration.
11580 (reinsert_breakpoints_at): Declare.
11581 (uninsert_breakpoint): Delete declaration.
11582 (uninsert_breakpoints_at): Declare.
11583 (check_breakpoints): Adjust prototype.
11584 * server.h: Adjust include order.
11585 (struct thread_info): Declare here. Add a `last_status' field.
11586
30ba68cb
MS
115872010-03-23 Michael Snyder <msnyder@vmware.com>
11588
11589 * server.c (crc32): New function.
11590 (handle_query): Add handling for 'qCRC:' request.
11591
b9a881c2
PA
115922010-03-23 Pedro Alves <pedro@codesourcery.com>
11593
11594 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11595 lwp had been stopped by a watchpoint.
11596
e92d13d5
PA
115972010-03-16 Pedro Alves <pedro@codesourcery.com>
11598
11599 * server.h (internal_error): Declare.
11600 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11601 * utils.c (internal_error): New function.
11602
64daa791
AS
116032010-03-15 Andreas Schwab <schwab@redhat.com>
11604
11605 * configure.srv: Fix typo setting srv_regobj.
11606
f52cd8cd
PA
116072010-03-15 Pedro Alves <pedro@codesourcery.com>
11608
11609 * linux-low.c (fetch_register): Avoid passing a non string literal
11610 format to `error'.
11611 (usr_store_inferior_registers): Ditto.
11612
93ae6fdc
PA
116132010-03-14 Pedro Alves <pedro@codesourcery.com>
11614
11615 * linux-low.c (linux_write_memory): Bail out early if peeking
11616 memory failed.
11617
c3adc08c
PA
116182010-03-14 Pedro Alves <pedro@codesourcery.com>
11619
11620 * linux-low.h (struct lwp_info): New fields
11621 `stopped_by_watchpoint' and `stopped_data_address'.
11622 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11623 here, and cache them in the lwp object.
11624 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11625 directly.
11626 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11627 field.
11628 (linux_stopped_by_watchpoint): Rewrite.
11629 (linux_stopped_data_address): Rewrite.
11630
bce522a2
PA
116312010-03-06 Simo Melenius <simo.melenius@iki.fi>
11632
11633 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11634 switching the current inferior, not before.
11635
90884b2b
L
116362010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11637
11638 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11639 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11640 i386-linux.c and amd64-linux.c.
11641 (reg-i386.o): Removed.
11642 (reg-i386.c): Likewise.
11643 (reg-i386-linux.o): Likewise.
11644 (reg-i386-linux.c): Likewise.
11645 (reg-x86-64.o): Likewise.
11646 (reg-x86-64.c): Likewise.
11647 (reg-x86-64-linux.o): Likewise.
11648 (reg-x86-64-linux.c): Likewise.
11649 (i386.o): New.
11650 (i386.c): Likewise.
11651 (i386-linux.o): Likewise.
11652 (i386-linux.c): Likewise.
11653 (amd64.o): Likewise.
11654 (amd64.c): Likewise.
11655 (amd64-linux.o): Likewise.
11656 (amd64-linux.c): Likewise.
11657
11658 * configure.srv (srv_i386_regobj): New.
11659 (srv_i386_linux_regobj): Likewise.
11660 (srv_amd64_regobj): Likewise.
11661 (srv_amd64_linux_regobj): Likewise.
11662 (srv_i386_32bit_xmlfiles): Likewise.
11663 (srv_i386_64bit_xmlfiles): Likewise.
11664 (srv_i386_xmlfiles): Likewise.
11665 (srv_amd64_xmlfiles): Likewise.
11666 (srv_i386_linux_xmlfiles): Likewise.
11667 (srv_amd64_linux_xmlfiles): Likewise.
11668 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11669 srv_xmlfiles to $srv_i386_xmlfiles.
11670 (i[34567]86-*-mingw32ce*): Likewise.
11671 (i[34567]86-*-mingw*): Likewise.
11672 (i[34567]86-*-nto*): Likewise.
11673 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11674 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11675 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11676 (x86_64-*-linux*): Likewise.
11677
11678 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11679 (init_registers_amd64_linux): New.
11680 (x86_arch_setup): Replace init_registers_x86_64_linux with
11681 init_registers_amd64_linux.
11682
193f13e6
MK
116832010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11684
11685 * configure.ac: Check for libdl. If it is not available link against
11686 static libthread_db.
11687 * configure: Regenerate.
11688
85d721b8
PA
116892010-02-22 Pedro Alves <pedro@codesourcery.com>
11690
11691 PR9605
11692
11693 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11694 handing a read watchpoint.
11695 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11696
6076632b
DE
116972010-02-12 Doug Evans <dje@google.com>
11698
11699 * linux-low.c (linux_supports_tracefork_flag): Document.
11700 (linux_look_up_symbols): Add comment.
11701
3327ccf7
L
117022010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11703
11704 * regcache.c (supply_register): Clear regcache if buf is NULL.
11705
0718675c 117062010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11707 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11708
11709 * inferiors.c (find_inferior): Add function documentation.
11710 (unloaded_dll): Handle the case where the unloaded dll has not
11711 been previously registered in the dll list.
11712
177321bd
DJ
117132010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11714
11715 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11716 (thumb2_breakpoint): New.
11717 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11718
2b009048
DJ
117192010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11720
11721 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11722 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11723 breakpoints.
11724
3be029c7
PA
117252010-01-21 Pedro Alves <pedro@codesourcery.com>
11726
11727 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11728
18f5de3b
JK
117292010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11730
11731 * linux-s390-low.c (s390_collect_ptrace_register)
11732 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11733
3743bb4f
DE
117342010-01-21 Doug Evans <dje@google.com>
11735
14ce3065
DE
11736 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11737 (PTRACE_ARG4_TYPE): New macro.
11738 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11739 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11740 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11741 (usr_store_inferior_registers): Ditto.
11742 (linux_read_memory, linux_write_memory): Ditto.
11743 (linux_test_for_tracefork): Ditto.
11744
3743bb4f
DE
11745 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11746 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11747
8b315be5
PA
117482010-01-21 Pedro Alves <pedro@codesourcery.com>
11749
11750 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11751 target.
11752
85492558
PA
117532010-01-21 Pedro Alves <pedro@codesourcery.com>
11754
11755 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11756 prototype to take a regcache. Adjust.
11757
442ea881
PA
117582010-01-20 Pedro Alves <pedro@codesourcery.com>
11759
11760 * regcache.h (struct thread_info): Forward declare.
11761 (struct regcache): New.
11762 (new_register_cache): Adjust prototype.
11763 (get_thread_regcache): Declare.
11764 (free_register_cache): Adjust prototype.
11765 (registers_to_string, registers_from_string): Ditto.
11766 (supply_register, supply_register_by_name, collect_register)
11767 (collect_register_as_string, collect_register_by_name): Ditto.
11768 * regcache.c (struct inferior_regcache_data): Delete.
11769 (get_regcache): Rename to ...
11770 (get_thread_regcache): ... this. Adjust. Switch inferior before
11771 fetching registers.
11772 (regcache_invalidate_one): Adjust.
11773 (regcache_invalidate): Fix prototype.
11774 (new_register_cache): Return the new register cache.
11775 (free_register_cache): Change prototype.
11776 (realloc_register_cache): Adjust.
11777 (registers_to_string): Change prototype to take a regcache. Adjust.
11778 (registers_from_string): Ditto.
11779 (register_data): Ditto.
11780 (supply_register): Ditto.
11781 (supply_register_by_name): Ditto.
11782 (collect_register): Ditto.
11783 (collect_register_as_string): Ditto.
11784 (collect_register_by_name): Ditto.
11785 * server.c (process_serial_event): Adjust.
11786 * linux-low.h (regset_fill_func, regset_store_func): Change
11787 prototype.
11788 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11789 Change prototype.
11790 * linux-low.c (get_stop_pc): Adjust.
11791 (check_removed_breakpoint): Adjust.
11792 (linux_wait_for_event): Adjust.
11793 (linux_resume_one_lwp): Adjust.
11794 (fetch_register): Add regcache parameter. Adjust.
11795 (usr_store_inferior_registers): Ditto.
11796 (regsets_fetch_inferior_registers): Ditto.
11797 (regsets_store_inferior_registers): Ditto.
11798 (linux_fetch_registers, linux_store_registers): Ditto.
11799 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11800 regcache. Adjust.
43aaf8b6
PA
11801 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11802 Ditto.
442ea881
PA
11803 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11804 prototype to take a regcache.
11805 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11806 * remote-utils.c (convert_ascii_to_int, outreg)
11807 (prepare_resume_reply): Change prototype to take a regcache.
11808 Adjust.
11809 * target.h (struct target_ops) <fetch_registers, store_registers>:
11810 Change prototype to take a regcache.
11811 (fetch_inferior_registers, store_inferior_registers): Change
11812 prototype to take a regcache. Adjust.
11813 * proc-service.c (ps_lgetregs): Adjust.
11814 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11815 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11816 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11817 take a regcache. Adjust.
11818 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11819 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11820 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11821 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11822 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11823 (cris_cannot_fetch_register):
11824 (cris_breakpoint_at): Change prototype to take a regcache.
11825 Adjust.
11826 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11827 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11828 to take a regcache. Adjust.
11829 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11830 Adjust.
11831 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11832 take a regcache. Adjust.
11833 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11834 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11835 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11836 * linux-mips-low.c (mips_get_pc):
11837 (mips_set_pc): Change prototype to take a regcache. Adjust.
11838 (mips_reinsert_addr): Adjust.
11839 (mips_collect_register): Change prototype to take a regcache.
11840 Adjust.
11841 (mips_supply_register):
11842 (mips_collect_register_32bit, mips_supply_register_32bit)
11843 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11844 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11845 * linux-ppc-low.c (ppc_supply_ptrace_register)
11846 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11847 (parse_spufs_run): Adjust.
11848 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11849 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11850 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11851 take a regcache. Adjust.
11852 * linux-s390-low.c (s390_collect_ptrace_register)
11853 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11854 (s390_set_pc): Change prototype to take a regcache. Adjust.
11855 (s390_arch_setup): Adjust.
11856 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11857 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11858 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11859 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11860 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11861 regcache. Adjust.
11862 (sparc_breakpoint_at): Adjust.
11863 * linux-xtensa-low.c (xtensa_fill_gregset):
11864 (xtensa_store_gregset):
11865 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11866 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11867 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11868 prototype to take a regcache. Adjust.
11869 * win32-arm-low.c (arm_fetch_inferior_register)
11870 (arm_store_inferior_register): Change prototype to take a
11871 regcache. Adjust.
11872 * win32-i386-low.c (i386_fetch_inferior_register)
11873 (i386_store_inferior_register): Change prototype to take a
11874 regcache. Adjust.
11875 * win32-low.c (child_fetch_inferior_registers)
11876 (child_store_inferior_registers): Change prototype to take a
11877 regcache. Adjust.
11878 (win32_wait): Adjust.
11879 (win32_fetch_inferior_registers): Change prototype to take a
11880 regcache. Adjust.
11881 (win32_store_inferior_registers): Adjust.
11882 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11883 store_inferior_register>: Change prototype to take a regcache.
11884
60c3d7b0
DE
118852010-01-20 Doug Evans <dje@google.com>
11886
11887 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11888 #ifdef.
11889 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11890 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11891
dc146f7c
VP
118922010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11893
11894 * linux-low.c (linux_core_of_thread): New.
11895 (compare_ints, show_process, list_threads): New.
11896 (linux_qxfer_osdata): Report threads and cores.
11897 (linux_target_op): Register linux_core_of_thread.
11898 * remote-utils.c (prepare_resume_reply): Report the core.
11899 (buffer_xml_printf): Support %d specifier.
11900 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11901 New.
11902 (handle_query): Handle qXfer:threads. Announce availability
11903 thereof.
11904 * target.h (struct target_ops): New field core_of_thread.
11905
7803799a
UW
119062010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11907
11908 * Makefile.in (clean): Remove new generated files.
11909 (reg-s390.o, reg-s390.c): Remove rules.
11910 (reg-s390x.o, reg-s390x.c): Likewise.
11911 (s390-linux32.o, s390-linux32.c): Add rules.
11912 (s390-linux64.o, s390-linux64.c): Likewise.
11913 (s390x-linux64.o, s390x-linux64.c): Likewise.
11914 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11915 * linux-s390-low.c: Include <elf.h>.
11916 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11917 (init_registers_s390): Remove prototype.
11918 (init_registers_s390x): Likewise.
11919 (init_registers_s390_linux32): Add prototype.
11920 (init_registers_s390_linux64): Likewise.
11921 (init_registers_s390x_linux64): Likewise.
11922 (s390_num_regs_3264): New define.
11923 (s390_regmap_3264): New global variable.
11924 (s390_cannot_fetch_register): Remove obsolete check.
11925 (s390_cannot_store_register): Likewise.
11926 (s390_collect_ptrace_register): Handle upper/lower register halves.
11927 (s390_supply_ptrace_register): Likewise.
11928 (s390_fill_gregset): Update to register number changes.
11929 (s390_get_hwcap): New routine.
11930 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11931 Install appropriate regmap and register set.
11932
6e7ffa39
JB
119332010-01-01 Joel Brobecker <brobecker@adacore.com>
11934
11935 * server.c (gdbserver_version): Update copyright year to 2010.
11936 * gdbreplay.c (gdbreplay_version): Likewise.
11937
957f3f49
DE
119382009-12-28 Doug Evans <dje@google.com>
11939
11940 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11941 elf/external.h. Include <elf.h> instead but only if necessary.
11942
ca5c370d
PA
119432009-12-28 Pedro Alves <pedro@codesourcery.com>
11944
11945 * linux-low.c (linux_remove_process): Remove `detaching'
11946 parameter. Don't release/detach from thread_db here.
11947 (linux_kill): Release/detach from thread_db here, ...
11948 (linux_detach): ... and here, before actually detaching.
11949 (linux_wait_1): ... and here, when a process exits.
11950 * thread-db.c (any_thread_of): New.
11951 (thread_db_free): Switch the current inferior to a thread of the
11952 passed in process.
11953
4ee62156
DE
119542009-12-21 Doug Evans <dje@google.com>
11955
d90e6a88
DE
11956 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11957
c5f62d5f
DE
11958 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11959 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11960 warning ifndef __NR_tkill. Move setting of errno there too.
11961 Delete unnecessary resetting of errno after syscall.
11962 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11963
10e86dd7
DE
11964 * configure.ac: Check for dladdr.
11965 * config.in: Regenerate.
11966 * configure: Regenerate.
11967 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11968 (try_thread_db_load): Update.
11969
4ee62156
DE
11970 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11971
00f515da
DE
119722009-12-18 Doug Evans <dje@google.com>
11973
e9464885
DE
11974 * event-loop.c: Include unistd.h if it exists.
11975
07d4f67e
DE
11976 * linux-low.c (my_waitpid): Move definition away from being in
11977 between linux_tracefork_child/linux_test_for_tracefork.
11978
00f515da
DE
11979 * gdb_proc_service.h (psaddr_t): Fix type.
11980 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11981 signature to match glibc.
11982
1de1badb
DE
119832009-12-16 Doug Evans <dje@google.com>
11984
11985 * linux-low.c (linux_read_memory): Fix argument to read.
11986
aeeb81d1
PA
119872009-11-26 Pedro Alves <pedro@codesourcery.com>
11988
11989 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11990 events, don't leave current_inferior pointing at null.
11991
10357975
PA
119922009-11-26 Pedro Alves <pedro@codesourcery.com>
11993
11994 * win32-low.c (LOG): Delete.
11995 (OUTMSG): Output to stderr.
11996 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11997 on compile time LOG macro.
11998 (win32_wait): Fix debug output.
11999
cf6e3471
PA
120002009-11-26 Pedro Alves <pedro@codesourcery.com>
12001
12002 * win32-low.c (win32_add_one_solib): If the dll name is
12003 "ntdll.dll", prepend the system directory to the dll path.
12004
0c85e18e
MK
120052009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12006
12007 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12008
9ac544ce 120092009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12010 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12011
12012 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12013 * configure.ac: Check for __mcoldfire__ and set
12014 gdb_cv_m68k_is_coldfire.
12015 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12016 reg-cf.o and reg-m68k.o.
12017 * configure: Regenerated.
12018
fd7dd3e6
PA
120192009-11-16 Pedro Alves <pedro@codesourcery.com>
12020
12021 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12022 Pass it to thread_db_free.
12023 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12024 proper `detaching' argument to linux_remove_process.
12025 * linux-low.h (thread_db_free): Add `detaching' parameter.
12026 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12027 to thread_db_free.
12028 (thread_db_free): Add `detaching' parameter. Only
12029 call td_ta_clear_event if detaching from process.
12030
75aa492e
MK
120312009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12032
12033 * thread-db.c (thread_db_free): Fix typo.
12034
21e1bee4
PP
120352009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12036
12037 PR gdb/10838
12038 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12039
8838b45e
NS
120402009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12041
12042 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12043 with an i686 compiler.
12044 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12045 needed.
12046 * configure: Rebuilt.
12047
8a35fb51
SL
120482009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12049
12050 PR gdb/10783
12051
12052 * server.c (handle_search_memory_1): Correct read_addr initialization
12053 in loop for searching subsequent chunks.
12054
96f15937
PP
120552009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12056
12057 * configure.ac: New --with-libthread-db option.
12058 * thread-db.c: Allow direct dependence on libthread_db.
12059 (thread_db_free): Adjust.
12060 * config.in: Regenerate.
12061 * configure: Likewise.
889bf7c5 12062
5f7d1694
PP
120632009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12064
12065 PR gdb/10757
12066 * thread-db.c (attach_thread): New function.
12067 (maybe_attach_thread): Return success/failure.
12068 (find_new_threads_callback): Adjust.
889bf7c5
PA
12069 (thread_db_find_new_threads): Loop until no new threads.
12070
88e3b899
PA
120712009-10-13 Pedro Alves <pedro@codesourcery.com>
12072
12073 * proc-service.c (ps_lgetregs): Formatting.
12074
cdbfd419
PP
120752009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12076
12077 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12078 * configure.ac: Adjust.
12079 * linux-low.h (struct process_info_private): Move members to struct
12080 thread_db.
12081 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12082 * linux-low.c (linux_remove_process): Adjust.
12083 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12084 * server.c (handle_query): Move code ...
12085 (handle_monitor_command): ... here. New function.
12086 * target.h (struct target_ops): New member.
12087 * thread-db.c (struct thread_db): New.
12088 (libthread_db_search_path): New variable.
12089 (thread_db_create_event, thread_db_enable_reporting)
12090 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12091 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12092 (try_thread_db_load_1, dladdr_to_soname): New functions.
12093 (try_thread_db_load, thread_db_load_search): New functions.
12094 (thread_db_init): Search for libthread_db.
12095 (thread_db_free): New function.
12096 (thread_db_handle_monitor_command): Likewise.
12097 * config.in: Regenerate.
12098 * configure: Regenerate.
889bf7c5 12099
4168d2d6
UW
121002009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12101
12102 * spu-low.c (spu_kill): Wait for inferior to terminate.
12103 Call clear_inferiors.
12104 (spu_detach): Call clear_inferiors.
12105
81ecdfbb
RW
121062009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12107
12108 * aclocal.m4: Regenerate.
12109 * config.in: Likewise.
12110 * configure: Likewise.
12111
0b9ff2c0
UW
121122009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12113
12114 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12115 (parse_spufs_run): New function.
12116 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12117 (ppc_breakpoint_at): Handle SPU breakpoints.
12118
efcbbd14
UW
121192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12120
12121 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12122 (SPUFS_MAGIC): Define.
12123 (spu_enumerate_spu_ids): New function.
12124 (linux_qxfer_spu): New function.
12125 (linux_target_ops): Install linux_qxfer_spu.
12126
f4d9bade
UW
121272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12128
12129 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12130 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12131 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12132 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12133 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12134 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12135 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12136 (init_registers_powerpc_cell32l): Add prototype.
12137 (init_registers_powerpc_cell64l): Likewise.
12138 (ppc_arch_setup): Detect Cell/B.E. architecture.
12139
96e946ca
RW
121402009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12141
12142 * Makefile.in (datarootdir): New variable.
12143
58d6951d
DJ
121442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12145
12146 * linux-low.c (linux_write_memory): Update debugging output.
12147 * Makefile.in (clean): Add new descriptions.
12148 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12149 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12150 * configure.srv: Add new files for arm*-*-linux*.
12151 * linux-arm-low.c: Add new declarations.
12152 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12153 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12154 (HWCAP_VFPv3D16): New.
12155 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12156 instead of __IWMMXT__.
12157 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12158 (arm_arch_setup): New.
12159 (target_regsets): Remove #ifdef. Add VFP regset.
12160 (the_low_target): Use arm_arch_setup.
12161
12b42a12
DJ
121622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12163
12164 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12165 the main thread again.
12166
ac8c974e
AR
121672009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12168
12169 Adding Neutrino gdbserver.
12170 * configure: Regenerated.
12171 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12172 * configure.srv (i[34567]86-*-nto*): New target.
12173 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12174 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12175 (nto_comctrl) [__QNX__]: New function.
12176 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12177
4424e0c3 121782009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12179
12180 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12181 srv_tgtobj.
12182
912cf4ba
PA
121832009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12184 Pedro Alves <pedro@codesourcery.com>
12185
12186 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12187 don't support CONTEXT_EXTENDED_REGISTERS.
12188 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12189 (the_low_target): Install them.
12190 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12191 failing with ERROR_PIPE_NOT_CONNECTED.
12192
aa5ca48f
DE
121932009-06-30 Doug Evans <dje@google.com>
12194 Pierre Muller <muller@ics.u-strasbg.fr>
12195
12196 Add h/w watchpoint support to x86-linux, win32-i386.
12197 * Makefile.in (SFILES): Add i386-low.c
12198 (i386_low_h): Define.
12199 (i386-low.o): Add dependencies.
12200 (linux-x86-low.o): Add i386-low.h dependency.
12201 (win32-i386-low.o): Ditto.
12202 * i386-low.c: New file.
12203 * i386-low.h: New file.
12204 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12205 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12206 * linux-low.c (linux_add_process): Initialize arch_private.
12207 (linux_remove_process): Free arch_private.
12208 (add_lwp): Initialize arch_private.
12209 (delete_lwp): Free arch_private.
12210 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12211 provided.
12212 * linux-low.h (process_info_private): New member arch_private.
12213 (lwp_info): New member arch_private.
12214 (linux_target_ops): New members new_process, new_thread,
12215 prepare_to_resume.
12216 (ptid_of): New macro.
12217 * linux-x86-low.c: Include stddef.h, i386-low.h.
12218 (arch_process_info): New struct.
12219 (arch_lwp_info): New struct.
12220 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12221 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12222 (i386_dr_low_get_status): New function.
12223 (x86_insert_point, x86_remove_point): New functions.
12224 (x86_stopped_by_watchpoint): New function.
12225 (x86_stopped_data_address): New function.
12226 (x86_linux_new_process, x86_linux_new_thread): New functions.
12227 (x86_linux_prepare_to_resume): New function.
12228 (the_low_target): Add entries for insert_point, remove_point,
12229 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12230 prepare_to_resume.
12231 * server.c (debug_hw_points): New global.
12232 (monitor_show_help): Document set debug-hw-points.
12233 (handle_query): Process "set debug-hw-points".
12234 * server.h (debug_hw_points): Declare.
12235 (paddress): Declare.
12236 * utils.c (NUMCELLS, CELLSIZE): New macros.
12237 (get_sell, xsnprintf, paddress): New functions.
12238 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12239 remove_point, stopped_by_watchpoint, stopped_data_address.
12240 * win32-i386-low.c: Include i386-low.h.
12241 (debug_reg_state): Replaces dr.
12242 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12243 (i386_dr_low_get_status): New function.
12244 (i386_insert_point, i386_remove_point): New functions.
12245 (i386_stopped_by_watchpoint): New function.
12246 (i386_stopped_data_address): New function.
12247 (i386_initial_stuff): Update.
12248 (get_thread_context,set_thread_context,i386_thread_added): Update.
12249 (the_low_target): Add entries for insert_point,
12250 remove_point, stopped_by_watchpoint, stopped_data_address.
12251 * win32-low.c (win32_insert_watchpoint): New function.
12252 (win32_remove_watchpoint): New function.
12253 (win32_stopped_by_watchpoint): New function.
12254 (win32_stopped_data_address): New function.
12255 (win32_target_ops): Add entries for insert_watchpoint,
12256 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12257 * win32-low.h (win32_target_ops): New members insert_point,
12258 remove_point, stopped_by_watchpoint, stopped_data_address.
12259
d993e290
PA
122602009-06-25 Pedro Alves <pedro@codesourcery.com>
12261
12262 * server.c (process_serial_event): Re-return unsupported, not
12263 error, if the type isn't recognized. Re-allow supporting only
12264 insert or remove packets. Also call require_running for
12265 breakpoints. Add missing break statement to default case. Tidy.
12266 * target.h (struct target_ops): Rename insert_watchpoint to
12267 insert_point, and remove_watchpoint to remove_point.
12268
12269 * linux-low.h (struct linux_target_ops): Likewise.
12270 * linux-low.c (linux_insert_watchpoint): Rename to ...
12271 (linux_insert_point): ... this. Adjust.
12272 (linux_remove_watchpoint): Rename to ...
12273 (linux_remove_point): ... this. Adjust.
12274 (linux_target_ops): Adjust.
12275 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12276 (cris_insert_point): ... this.
12277 (cris_remove_watchpoint): Rename to ...
12278 (cris_remove_point): ... this.
12279 (the_low_target): Adjust.
12280
0f54c268
PM
122812009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12282
12283 * server.c (handle_v_kill): Pass signal_pid to
12284 kill_inferior if multi_process is zero.
12285
c6314022
AR
122862009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12287
12288 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12289 * target.h (target_ops): Comment for *_watchpoint to make it clear
12290 the functions can get types '0' and '1'.
12291
4463ce24
AR
122922009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12293
12294 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12295 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12296 * regcache.c (get_regcache): Likewise.
12297 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12298 * win32-low.c (child_fetch_inferior_registers): Remove check for
12299 regno 0.
12300
cf8fd78b
PA
123012009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12302 Pedro Alves <pedro@codesourcery.com>
12303
12304 * target.h (struct target_ops) <supports_multi_process>: New
12305 callback.
12306 (target_supports_multi_process): New.
12307 * server.c (handle_query): Even if GDB reports support, only
12308 enable multi-process if the target also supports it. Report
12309 multi-process support only if the target backend supports it.
12310 * linux-low.c (linux_supports_multi_process): New function.
12311 (linux_target_ops): Install it as target_supports_multi_process
12312 callback.
12313
47c0c975
DE
123142009-05-24 Doug Evans <dje@google.com>
12315
e09875d4
DE
12316 Global renaming of find_thread_pid to find_thread_ptid.
12317 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12318 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12319 All callers updated.
12320
e27d73f6
DE
12321 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12322 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12323 directly.
12324
47c0c975
DE
12325 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12326 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12327 (linux_resume_one_lwp): Ditto.
12328
2acc282a
DE
123292009-05-23 Doug Evans <dje@google.com>
12330
12331 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12332 from struct inferior_list_entry * to struct lwp_info *.
12333 All callers updated.
12334
9f1036c1
DE
123352009-05-13 Doug Evans <dje@google.com>
12336
12337 * linux-x86-low.c: Don't include assert.h.
12338 (x86_siginfo_fixup): Use fatal, not assert.
12339 (x86_arch_setup): Fix comment.
12340
d0722149
DE
123412009-05-12 Doug Evans <dje@google.com>
12342
12343 Biarch support for i386/amd64 gdbserver.
12344 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12345 Add linux-x86-low.c.
12346 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12347 (linux-x86-low.o): Add.
12348 * linux-x86-64-low.c: Delete.
12349 * linux-i386-low.c: Delete.
12350 * linux-x86-low.c: New file.
12351 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12352 linux-x86-low.o.
12353 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12354 linux-x86-low.o.
12355 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12356 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12357 (linux_child_pid_to_exec_file): New function.
12358 (elf_64_header_p, elf_64_file_p): New functions.
12359 (siginfo_fixup): New function.
12360 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12361 give target a chance to convert layout.
12362 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12363 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12364
fdeb2a12
DE
123652009-05-07 Doug Evans <dje@google.com>
12366
12367 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12368 (regsets_store_inferior_registers): Ditto.
12369
a6dbe5df
PA
123702009-05-06 Pedro Alves <pedro@codesourcery.com>
12371
12372 PR server/10048
12373
12374 * linux-low.c (must_set_ptrace_flags): Delete.
12375 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12376 of the global.
12377 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12378 `lwp->must_set_ptrace_flags' instead.
ba42693b 12379 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12380 (linux_wait_1): ... not here.
12381
5091eb23
DE
123822009-04-30 Doug Evans <dje@google.com>
12383
9f767825
DE
12384 * inferiors.c (started_inferior_callback): New function.
12385 (attached_inferior_callback): New function.
12386 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12387 * server.c (print_started_pid, print_attached_pid): New functions.
12388 (detach_or_kill_for_exit): New function.
12389 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12390 * server.h (have_started_inferiors_p): Declare.
12391 (have_attached_inferiors_p): Declare.
12392
5091eb23
DE
12393 * inferiors.c (remove_process): Fix memory leak, free process.
12394 * linux-low.c (linux_remove_process): New function.
12395 (linux_kill): Call it instead of remove_process.
12396 (linux_detach, linux_wait_1): Ditto.
12397
155c8968
PA
123982009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12399
12400 * configure.srv: Add x86 Windows CE target.
12401
7fe519cb
UW
124022009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12403
12404 * inferiors.c (get_thread_process): Make global.
12405 * server.h (get_thread_process): Add prototype.
12406 * thread-db.c (find_one_thread): Use get_thread_process
12407 instead of current_process.
12408 (thread_db_get_tls_address): Do not crash if called when
12409 thread layer is not yet initialized.
12410
5472f405
UW
124112009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12412
12413 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12414 * spu-low.c (current_tid): Rename to ...
12415 (current_ptid): ... this.
12416 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12417 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12418 ptid_get_lwp (current_ptid) instead of current_tid.
12419 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12420 instead of current_tid. Use find_process_pid to verify pid
12421 argument is valid. Pass proper argument to remove_process.
12422 (spu_thread_alive): Compare current_ptid instead of current_tid.
12423 (spu_resume): Likewise.
12424
55ac2b99
PA
124252009-04-02 Pedro Alves <pedro@codesourcery.com>
12426
12427 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12428 variable.
12429
95954743
PA
124302009-04-01 Pedro Alves <pedro@codesourcery.com>
12431
12432 Implement the multiprocess extensions, and add linux multiprocess
12433 support.
12434
12435 * server.h (ULONGEST): Declare.
12436 (struct ptid, ptid_t): New.
12437 (minus_one_ptid, null_ptid): Declare.
12438 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12439 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12440 (struct inferior_list_entry): Change `id' type from unsigned from
12441 to ptid_t.
12442 (struct sym_cache, struct breakpoint, struct
12443 process_info_private): Forward declare.
12444 (struct process_info): Declare.
12445 (current_process): Declare.
12446 (all_processes): Declare.
12447 (initialize_inferiors): Declare.
12448 (add_thread): Adjust to use ptid_t.
12449 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12450 (add_process, remove_process, find_thread_pid): Declare.
12451 (find_inferior_id): Adjust to use ptid_t.
12452 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12453 (multi_process): Declare.
12454 (push_event): Adjust to use ptid_t.
12455 (read_ptid, write_ptid): Declare.
12456 (prepare_resume_reply): Adjust to use ptid_t.
12457 (clear_symbol_cache): Declare.
12458 * inferiors.c (all_processes): New.
12459 (null_ptid, minus_one_ptid): New.
12460 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12461 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12462 (add_thread): Change unsigned long to ptid. Remove gdb_id
12463 parameter. Adjust.
12464 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12465 (gdb_id_to_thread): Rename to ...
12466 (find_thread_pid): ... this. Change unsigned long to ptid.
12467 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12468 (loaded_dll, pull_pid_from_list): Adjust.
12469 (add_process, remove_process, find_process_pid)
12470 (get_thread_process, current_process, initialize_inferiors): New.
12471 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12472 (struct target_waitstatus) <related_pid>: Ditto.
12473 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12474 return type to int.
12475 (struct target_ops) <join>: Add `pid' argument.
12476 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12477 (struct target_ops) <wait>: Add `ptid' field. Change return type
12478 to ptid.
12479 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12480 (mywait): Add `ptid' argument. Change return type to ptid_t.
12481 (target_pid_to_str): Declare.
12482 * target.c (set_desired_inferior): Adjust to use ptids.
12483 (mywait): Add new `ptid' argument. Adjust.
12484 (target_pid_to_str): New.
12485 * mem-break.h (free_all_breakpoints): Declare.
12486 * mem-break.c (breakpoints): Delelete.
12487 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12488 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12489 to use per-process breakpoint list.
12490 (free_all_breakpoints): New.
12491 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12492 (symbol_cache, all_symbols_looked_up): Delete.
12493 (hexchars): New.
12494 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12495 read_ptid): New.
12496 (prepare_resume_reply): Change ptid argument's type from unsigned
12497 long to ptid_t. Adjust. Implement W;process and X;process.
12498 (free_sym_cache, clear_symbol_cache): New.
12499 (look_up_one_symbol): Adjust to per-process symbol cache. *
12500 * server.c (cont_thread, general_thread, step_thread): Change type
12501 to ptid_t.
12502 (attached): Delete.
12503 (multi_process): New.
12504 (last_ptid): Change type to ptid_t.
12505 (struct vstop_notif) <ptid>: Change type to ptid_t.
12506 (queue_stop_reply, push_event): Change `ptid' argument's type to
12507 ptid_t.
12508 (discard_queued_stop_replies): Add `pid' argument.
12509 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12510 changes. Don't reference the `attached' global.
12511 (attach_inferior): Adjust to mywait interface changes.
12512 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12513 features. Handle and report "multiprocess+". Handle
12514 "qAttached:PID".
12515 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12516 changes.
12517 (handle_v_kill): New.
12518 (handle_v_stopped): Adjust to use target_pid_to_str.
12519 (handle_v_requests): Allow multiple attaches and runs when
12520 multiprocess extensions are in effect. Handle "vKill".
12521 (myresume): Adjust to use ptids.
12522 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12523 (handle_status): Adjust to discard_queued_stop_replies interface
12524 change.
12525 (first_thread_of, kill_inferior_callback)
12526 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12527 (main): Call initialize_inferiors. Adjust to use ptids, killing
12528 and detaching from all inferiors. Handle multiprocess packet
12529 variants.
12530 * linux-low.h: Include gdb_proc_service.h.
12531 (struct process_info_private): New.
12532 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12533 <lwpid_of>: Use ptid_get_lwp.
12534 (get_lwp_thread): Adjust.
12535 (struct lwp_info): Add `dead' member.
12536 (find_lwp_pid): Declare.
12537 * linux-low.c (thread_db_active): Delete.
12538 (new_inferior): Adjust comment.
12539 (inferior_pid): Delete.
12540 (linux_add_process): New.
12541 (handle_extended_wait): Adjust.
12542 (add_lwp): Change unsigned long to ptid.
12543 (linux_create_inferior): Add process to processes table. Adjust
12544 to use ptids. Don't set new_inferior here.
12545 (linux_attach_lwp): Rename to ...
12546 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12547 it. Adjust to use ptids.
12548 (linux_attach_lwp): New.
12549 (linux_attach): Add process to processes table. Don't set
12550 new_inferior here.
12551 (struct counter): New.
12552 (second_thread_of_pid_p, last_thread_of_process_p): New.
12553 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12554 multiple processes.
12555 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12556 processes. Remove process from process table.
12557 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12558 to multiple processes.
12559 (any_thread_of): New.
12560 (linux_detach): Add `pid' argument, and handle it. Remove process
12561 from processes table.
12562 (linux_join): Add `pid' argument. Handle it.
12563 (linux_thread_alive): Change unsighed long argument to ptid_t.
12564 Consider dead lwps as not being alive.
12565 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12566 threads we're not interested in.
12567 (same_lwp, find_lwp_pid): New.
12568 (linux_wait_for_lwp): Change `pid' argument's type from int to
12569 ptid_t. Adjust.
12570 (linux_wait_for_event): Rename to ...
12571 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12572 from int to ptid_t. Adjust.
12573 (linux_wait_for_event): New.
12574 (linux_wait_1): Add `ptid' argument. Change return type to
12575 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12576 that exit from the process table.
12577 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12578 Adjust.
12579 (mark_lwp_dead): New.
12580 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12581 stopping all threads, mark its main lwp as dead.
12582 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12583 ptids.
12584 (fetch_register, usr_store_inferior_registers)
12585 (regsets_fetch_inferior_registers)
12586 (regsets_store_inferior_registers, linux_read_memory)
12587 (linux_write_memory): Inline `inferior_pid'.
12588 (linux_look_up_symbols): Adjust to use per-process
12589 `thread_db_active'.
12590 (linux_request_interrupt): Adjust to use ptids.
12591 (linux_read_auxv): Inline `inferior_pid'.
12592 (initialize_low): Don't reference thread_db_active.
12593 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12594 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12595 (ps_getpid): Return the pid of the current inferior.
12596 * thread-db.c (proc_handle, thread_agent): Delete.
12597 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12598 per-process data.
12599 (find_one_thread): Change argument type to ptid_t. Adjust to
12600 per-process data.
12601 (maybe_attach_thread): Adjust to per-process data and ptids.
12602 (thread_db_find_new_threads): Ditto.
12603 (thread_db_init): Ditto.
12604 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12605 processes table. Adjust to use ptids.
12606 (spu_kill, spu_detach): Adjust interface. Remove process from
12607 processes table.
12608 (spu_join, spu_thread_alive): Adjust interface.
12609 (spu_wait): Adjust interface. Remove process from processes
12610 table. Adjust to use ptids.
12611 * win32-low.c (current_inferior_tid): Delete.
12612 (current_inferior_ptid): New.
12613 (debug_event_ptid): New.
12614 (thread_rec): Take a ptid. Adjust.
12615 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12616 (child_delete_thread): Ditto.
12617 (do_initial_child_stuff): Add `attached' argument. Add process to
12618 processes table.
12619 (child_fetch_inferior_registers, child_store_inferior_registers):
12620 Adjust.
12621 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12622 (win32_attach): Pass 1 to do_initial_child_stuff.
12623 (win32_kill): Adjust interface. Remove process from processes
12624 table.
12625 (win32_detach): Ditto.
12626 (win32_join): Adjust interface.
12627 (win32_thread_alive): Take a ptid.
12628 (win32_resume): Adjust to use ptids.
12629 (get_child_debug_event): Ditto.
12630 (win32_wait): Adjust interface. Remove exiting process from
12631 processes table.
12632
bd99dc85
PA
126332009-04-01 Pedro Alves <pedro@codesourcery.com>
12634
12635 Non-stop mode support.
12636
12637 * server.h (non_stop): Declare.
12638 (gdb_client_data, handler_func): Declare.
12639 (delete_file_handler, add_file_handler, start_event_loop):
12640 Declare.
12641 (handle_serial_event, handle_target_event, push_event)
12642 (putpkt_notif): Declare.
12643 * target.h (enum resume_kind): New.
12644 (struct thread_resume): Replace `step' field by `kind' field.
12645 (TARGET_WNOHANG): Define.
12646 (struct target_ops) <wait>: Add `options' argument.
12647 <supports_non_stop, async, start_non_stop>: New fields.
12648 (target_supports_non_stop, target_async): New.
12649 (start_non_stop): Declare.
12650 (mywait): Add `options' argument.
12651 * target.c (mywait): Add `options' argument. Print child exit
12652 notifications here.
12653 (start_non_stop): New.
12654 * server.c (non_stop, own_buf, mem_buf): New globals.
12655 (struct vstop_notif): New.
12656 (notif_queue): New global.
12657 (queue_stop_reply, push_event, discard_queued_stop_replies)
12658 (send_next_stop_reply): New.
12659 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12660 interface changes.
12661 (attach_inferior): In non-stop mode, don't wait for the target
12662 here.
12663 (handle_general_set): Handle QNonStop.
12664 (handle_query): When handling qC, return the current general
12665 thread, instead of the first thread of the list.
12666 (handle_query): If the backend supports non-stop mode, include
12667 QNonStop+ in the qSupported query response.
12668 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12669 and non-stop mode.
12670 (handle_v_attach, handle_v_run): Handle non-stop mode.
12671 (handle_v_stopped): New.
12672 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12673 (myresume): Adjust to use resume_kind. Handle non-stop.
12674 (queue_stop_reply_callback): New.
12675 (handle_status): Handle non-stop mode.
12676 (main): Clear non_stop flag on reconnection. Use the event-loop.
12677 Refactor serial protocol handling from here ...
12678 (process_serial_event): ... to this new function. When GDB
12679 selects any thread, select one here. In non-stop mode, wait until
12680 GDB acks all pending events before exiting.
12681 (handle_serial_event, handle_target_event): New.
12682 * remote-utils.c (remote_open): Install remote_desc in the event
12683 loop.
12684 (remote_close): Remove remote_desc from the event loop.
12685 (putpkt_binary): Rename to...
12686 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12687 (putpkt_binary): New as wrapper around putpkt_binary_1.
12688 (putpkt_notif): New.
12689 (prepare_resume_reply): In non-stop mode, don't change the
12690 general_thread.
12691 * event-loop.c: New.
12692 * Makefile.in (OBJ): Add event-loop.o.
12693 (event-loop.o): New rule.
12694
12695 * linux-low.h (pid_of): Moved here.
12696 (lwpid_of): New.
12697 (get_lwp_thread): Use lwpid_of.
12698 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12699 * linux-low.c (pid_of): Delete.
12700 (inferior_pid): Use lwpid_of.
12701 (linux_event_pipe): New.
12702 (target_is_async_p): New.
12703 (delete_lwp): New.
12704 (handle_extended_wait): Use lwpid_of.
12705 (add_lwp): Don't set lwpid field.
12706 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12707 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12708 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12709 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12710 first. Adjust to linux_wait_for_event interface changes. Use
12711 lwpid_of.
12712 (linux_detach): Don't delete the main lwp here.
12713 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12714 (status_pending_p): Don't consider explicitly suspended lwps.
12715 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12716 pointer. Add OPTIONS argument. Change return type to int. Use
12717 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12718 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12719 pointer. Add status pointer argument. Return a pid instead of a
12720 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12721 changes. In non-stop mode, don't switch to a random thread.
12722 (linux_wait): Rename to...
12723 (linux_wait_1): ... this. Add target_options argument, and handle
12724 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12725 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12726 clean exit and signal exit code. Don't stop all threads in
12727 non-stop mode. In all-stop mode, only stop all threads when
12728 reporting a stop to GDB. Handle explicit thread stop requests.
12729 (async_file_flush, async_file_mark): New.
12730 (linux_wait): New.
12731 (send_sigstop): Use lwpid_of.
12732 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12733 interface changes. In non-stop mode, don't switch to a random
12734 thread.
12735 (linux_resume_one_lwp): Use lwpid_of.
12736 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12737 (linux_resume_one_thread): ... this. Handle resume_stop. In
12738 non-stop mode, don't look for pending flag in all threads.
12739 (resume_status_pending_p): Don't consider explicitly suspended
12740 threads.
12741 (my_waitpid): Reimplement. Emulate __WALL.
12742 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12743 Use lwpid_of.
12744 (sigchld_handler, linux_supports_non_stop, linux_async)
12745 (linux_start_non_stop): New.
12746 (linux_target_ops): Register linux_supports_non_stop, linux_async
12747 and linux_start_non_stop.
12748 (initialize_low): Install SIGCHLD handler.
12749 * thread-db.c (thread_db_create_event, find_one_thread)
12750 (thread_db_get_tls_address): Use lwpid_of.
12751 * win32-low.c (win32_detach): Adjust to use resume_kind.
12752 (win32_wait): Add `options' argument.
12753 * spu-low.c (spu_resume): Adjust to use resume_kind.
12754 (spu_wait): Add `options' argument.
12755
5b1c542e
PA
127562009-04-01 Pedro Alves <pedro@codesourcery.com>
12757
12758 Decouple target code from remote protocol.
12759
12760 * target.h (enum target_waitkind): New.
12761 (struct target_waitstatus): New.
12762 (struct target_ops) <wait>: Return an unsigned long. Take a
12763 target_waitstatus pointer instead of a char pointer.
12764 (mywait): Likewise.
12765 * target.c (mywait): Change prototype to return an unsigned long.
12766 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12767 * server.h (thread_from_wait, old_thread_from_wait): Delete
12768 declarations.
12769 (prepare_resume_reply): Change prototype to take a
12770 target_waitstatus.
12771 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12772 (last_status, last_ptid): New.
12773 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12774 pid instead of a signal.
12775 (attach_inferior): Remove "status" and "signal" parameters.
12776 Adjust.
12777 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12778 not as an address.
12779 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12780 (handle_v_requests, myresume): Remove "status" and "signal"
12781 parameters. Adjust.
12782 (handle_status): New.
12783 (main): Delete local `status'. Adjust.
12784 * remote-utils.c: Include target.h.
12785 (prepare_resume_reply): Change prototype to take a
12786 target_waitstatus. Adjust.
12787
12788 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12789 interface.
12790 * spu-low.c (spu_wait): Adjust.
12791 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12792 Delete.
12793 (win32_wait): Adjust.
12794
2bd7c093
PA
127952009-04-01 Pedro Alves <pedro@codesourcery.com>
12796
12797 * target.h (struct thread_resume): Delete leave_stopped member.
12798 (struct target_ops): Add a `n' argument to the `resume' callback.
12799 * server.c (start_inferior): Adjust.
12800 (handle_v_cont, myresume): Adjust.
12801 * linux-low.c (check_removed_breakpoint): Adjust to resume
12802 interface change, and to removed leave_stopped field.
12803 (resume_ptr): Delete.
12804 (struct thread_resume_array): New.
12805 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12806 resume interface change.
12807 (linux_continue_one_thread, linux_queue_one_thread)
12808 (resume_status_pending_p): Check if the resume field is NULL
12809 instead of checking the leave_stopped member.
12810 (linux_resume): Adjust to the target resume interface change.
12811 * spu-low.c (spu_resume): Adjust to the target resume interface
12812 change.
12813 * win32-low.c (win32_detach, win32_resume): Ditto.
12814
c35fafde
PA
128152009-04-01 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12818 flag.
12819 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12820 pending.
12821 (linux_continue_one_thread): Only preserve the stepping flag if
12822 there's a pending breakpoint.
12823
0a59d50b
PA
128242009-03-31 Pedro Alves <pedro@codesourcery.com>
12825
12826 * server.c (main): After the inferior having exited, call
12827 remote_close before exiting gdbserver.
12828
f04c6d38
TJB
128292009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12830
12831 Fix size of FPSCR in Power 7 processors.
12832 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12833 (PPC_FEATURE_HAS_DFP): New #define.
12834 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12835 size of the FPSCR.
12836
78e5cee6
PA
128372009-03-23 Pedro Alves <pedro@codesourcery.com>
12838
12839 * server.c (handle_query) Whitespace and formatting.
12840
1b3f6016
PA
128412009-03-22 Pedro Alves <pedro@codesourcery.com>
12842
12843 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12844 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12845 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12846 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12847 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12848 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12849 Makefile.in, configure.ac: Fix whitespace throughout.
12850 * configure: Regenerate.
12851
a07b2135
PA
128522009-03-22 Pedro Alves <pedro@codesourcery.com>
12853
12854 * inferiors.c (find_inferior): Make it safe for the callback
12855 function to delete the currently iterated inferior.
12856
67cc2626
PA
128572009-03-22 Pedro Alves <pedro@codesourcery.com>
12858
12859 * Makefile.in (linuw_low_h): Move higher.
12860 (thread-db.o): Depend on $(linux_low_h).
12861
54a0b537
PA
128622009-03-17 Pedro Alves <pedro@codesourcery.com>
12863
12864 Rename "process" to "lwp" throughout.
12865
12866 * linux-low.c (all_processes): Rename to...
12867 (all_lwps): ... this.
12868 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12869 (add_process): Rename to ...
12870 (add_lwp): ... this. Adjust.
12871 (linux_create_inferior): Adjust.
12872 (linux_attach_lwp): Adjust.
12873 (linux_attach): Adjust.
12874 (linux_kill_one_process): Rename to ...
12875 (linux_kill_one_lwp): ... this. Adjust.
12876 (linux_kill): Adjust.
12877 (linux_detach_one_process): Rename to ...
12878 (linux_detach_one_lwp): ... this. Adjust.
12879 (linux_detach): Adjust.
12880 (check_removed_breakpoint): Adjust.
12881 (status_pending_p): Adjust.
12882 (linux_wait_for_process): Rename to ...
12883 (linux_wait_for_lwp): ... this. Adjust.
12884 (linux_wait_for_event): Adjust.
12885 (send_sigstop): Adjust.
12886 (wait_for_sigstop): Adjust.
12887 (stop_all_processes): Rename to ...
12888 (stop_all_lwps): ... this.
12889 (linux_resume_one_process): Rename to ...
12890 (linux_resume_one_lwp): ... this. Adjust.
12891 (linux_set_resume_request, linux_continue_one_thread)
12892 (linux_queue_one_thread, resume_status_pending_p)
12893 (usr_store_inferior_registers, regsets_store_inferior_registers)
12894 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12895 Adjust.
12896 * linux-low.h (get_process): Rename to ...
12897 (get_lwp): ... this. Adjust.
12898 (get_thread_process): Rename to ...
12899 (get_thread_lwp): ... this. Adjust.
12900 (get_process_thread): Rename to ...
12901 (get_lwp_thread): ... this. Adjust.
12902 (struct process_info): Rename to ...
12903 (struct lwp_info): ... this.
12904 (all_processes): Rename to ...
12905 (all_lwps): ... this.
12906 * proc-service.c (ps_lgetregs): Adjust.
12907 * thread-db.c (thread_db_create_event, find_one_thread)
12908 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12909
0b16c5cf
PA
129102009-03-14 Pedro Alves <pedro@codesourcery.com>
12911
12912 * server.c (handle_query): Handle "qAttached".
12913
32de4b9d
NS
129142009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12915
12916 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12917 GPLv3, update license URL.
12918
2aecd87f
DE
129192009-03-01 Doug Evans <dje@google.com>
12920
93efd302 12921 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12922 (server_h): Add gdb_signals.h.
12923 (signals.o): Update.
12924 * server.h (target_signal_from_host,target_signal_to_host_p)
12925 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12926
86b1f9c5
PM
129272009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12928
12929 * remote-utils.c (getpkt): Also generate remote-debug
12930 information if noack_mode is set.
12931
4aa995e1
PA
129322009-02-06 Pedro Alves <pedro@codesourcery.com>
12933
12934 * server.c (handle_query): Report qXfer:siginfo:read and
12935 qXfer:siginfo:write as supported and handle them.
12936 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12937 * linux-low.c (linux_xfer_siginfo): New.
12938 (linux_target_ops): Set it.
12939
62709adf
PA
129402009-01-26 Pedro Alves <pedro@codesourcery.com>
12941
12942 * server.c (gdbserver_usage): Mention --remote-debug.
12943 (main): Accept '--remote-debug' switch.
12944
aef93bd7
DE
129452009-01-18 Doug Evans <dje@google.com>
12946
12947 * regcache.c (new_register_cache): No need to check result of xcalloc.
12948 * server.c (handle_search_memory): Back out calls to xmalloc,
12949 result is checked and error is returned to user upon failure.
12950 (handle_query): Ditto. Add more checks for result of malloc.
12951 (handle_v_cont): Check result of malloc, report error back to
12952 user upon failure.
12953 (handle_v_run): Ditto. Call freeargv.
12954 * server.h (freeargv): Declare.
12955 * utils.c (freeargv): New fn.
12956
54363045
DE
129572009-01-15 Doug Evans <dje@google.com>
12958
f626972c
DE
12959 * gdbreplay.c (perror_with_name): Make arg const char *.
12960 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12961 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12962 * utils.c (perror_with_name): Make arg const char *.
54363045 12963
18aae699
PA
129642009-01-14 Pedro Alves <pedro@codesourcery.com>
12965
12966 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12967 when handling a EXIT_PROCESS_DEBUG_EVENT.
12968
ff703abe
JB
129692009-01-06 Joel Brobecker <brobecker@adacore.com>
12970
12971 * gdbreplay.c (gdbreplay_version): Update copyright year.
12972 * server.c (gdbserver_version): Likewise.
12973
f21cc1a2 129742009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12975
12976 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12977 (handle_extended_wait): Improve comment.
0e21c1ec 12978
bca929d3
DE
129792008-12-13 Doug Evans <dje@google.com>
12980
12981 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12982 * server.h (ATTR_MALLOC): New macro.
12983 (xmalloc,xcalloc,xstrdup): Declare.
12984 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12985 * inferiors.c: Ditto.
12986 * linux-low.c: Ditto.
12987 * mem-break.c: Ditto.
12988 * regcache.c: Ditto.
12989 * remote-utils.c: Ditto.
12990 * server.c: Ditto.
12991 * target.c: Ditto.
12992 * win32-low.c: Ditto.
12993
97438e3f
DE
129942008-12-12 Doug Evans <dje@google.com>
12995
896c7fbb
DE
12996 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12997 in debugging printf.
12998
97438e3f
DE
12999 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13000
e3b886f8
DE
130012008-12-09 Doug Evans <dje@google.com>
13002
13003 * linux-low.h (struct process_info): Delete member tid, unused.
13004 * thread-db.c (find_one_thread): Update.
13005 (maybe_attach_thread): Update.
13006
07e059b5
VP
130072008-12-02 Pedro Alves <pedro@codesourcery.com>
13008
889bf7c5
PA
13009 * target.h (struct target_ops): Add qxfer_osdata member.
13010 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13011 and dirent.h.
13012 (linux_qxfer_osdata): New functions.
13013 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13014 callback.
13015 * server.c (handle_query): Handle "qXfer:osdata:read:".
13016 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13017 (buffer_xml_printf): New functions.
13018 * server.h (struct buffer): New.
13019 (buffer_grow_str, buffer_grow_str0): New macros.
13020 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13021 (buffer_xml_printf): Declare.
07e059b5 13022
4cab47ab
DE
130232008-11-24 Doug Evans <dje@google.com>
13024
13025 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13026
f142445f
DJ
130272008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13028
13029 * server.c (handle_v_run): Always use the supplied argument list.
13030
d0107bb6 130312008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13032
d0107bb6
BW
13033 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13034 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13035
2c4ad781
TJB
130362008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13037
13038 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13039 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13040 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13041 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13042 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13043 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13044 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13045 XML target descriptions.
13046 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13047 when inferior is running on an ISA 2.05 or later processor. Add
13048 special case to return offset for full 64-bit slot of FPSCR when
13049 in 32-bits.
13050
dfb64f85
DJ
130512008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13052
13053 * Makefile.in (SFILES, clean): Added sparc64 files.
13054 (reg-sparc64.o, reg-sparc64.c): New.
13055 * configure.srv (sparc*-*-linux*): New configuration.
13056 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13057 syscall arguments for SPARC.
13058 (regsets_store_inferior_registers): Likewise.
13059 * linux-sparc-low.c: New file.
13060
66b6e1dd
DE
130612008-10-21 Doug Evans <dje@google.com>
13062
13063 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13064 (READLINE_DIR,READLINE_DEP): Delete.
13065 (INTERNAL_CFLAGS): Update.
13066 (LINTFLAGS): Update.
13067
9b710a42
PA
130682008-10-10 Pedro Alves <pedro@codesourcery.com>
13069
13070 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13071 whole argv from the last run, not just argv[0].
13072
5822d809
PA
130732008-09-08 Pedro Alves <pedro@codesourcery.com>
13074
13075 * regcache.c (new_register_cache): Return NULL if the register
13076 cache size isn't known yet.
13077 (free_register_cache): Avoid dereferencing a NULL regcache.
13078
74aac56f
DJ
130792008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13080
13081 * configure.srv: Merge MIPS and MIPS64.
13082
400b20f5
MR
130832008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13084
13085 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13086
677c5bb1
LM
130872008-08-18 Luis Machado <luisgpm@br.ibm.com>
13088
13089 * Makefile.in: Add required vsx dependencies.
13090
13091 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13092 Declare init_registers_powerpc_vsx32l.
13093 Declare init_registers_powerpc_vsx64l.
13094 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13095 (ppc_arch_setup): Check for VSX in hwcap.
13096 (ppc_fill_vsxregset): New function.
13097 (ppc_store_vsxregset): New function.
13098 Add new VSX entry in regset_info target_regsets.
13099
13100 * configure.srv: Add new VSX dependencies.
13101
a6f3e723
SL
131022008-08-12 Pedro Alves <pedro@codesourcery.com>
13103
13104 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13105 (remote_open): Set or clear transport_is_reliable.
13106 (putpkt_binary): Don't expect acks in noack mode.
13107 (getpkt): Don't send ack/nac in noack mode.
13108 * server.c (handle_general_set): Handle QStartNoAckMode.
13109 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13110 qSupported.
13111 (main): Reset noack_mode on every connection.
13112 * server.h (noack_mode): Declare.
13113
a417dc56
RW
131142008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13115
13116 * Makefile.in (GDBREPLAY_OBS): New variable.
13117 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13118
3221518c
UW
131192008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13120 Daniel Jacobowitz <dan@codesourcery.com>
13121
13122 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13123 (usr_store_inferior_registers): Likewise.
13124 (regsets_store_inferior_registers): Likewise.
13125
ec56be1b
PA
131262008-07-31 Rolf Jansen <rj@surtec.com>
13127 Pedro Alves <pedro@codesourcery.com>
13128
13129 * configure.ac: Check for memmem declaration.
13130 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13131 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13132 (disable_packet_qfThreadInfo): Unconditionally compile.
13133 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13134 * configure, config.in: Regenerate.
13135
2fe5e3ff
DE
131362008-07-28 Doug Kwan <dougkwan@google.com>
13137
13138 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13139 (linux_write_memory): Remove declaration of errno.
13140
836acd6d
UW
131412008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13142
13143 * linux-low.c (handle_extended_wait): Do not use "status"
13144 variable uninitialized.
13145
aeba519e
PA
131462008-07-07 Pedro Alves <pedro@codesourcery.com>
13147
13148 * server.c (handle_v_attach): Inhibit reporting dll changes.
13149
db42f210
PA
131502008-06-27 Pedro Alves <pedro@codesourcery.com>
13151
13152 * remote-utils.c (prepare_resume_reply): If requested, don't
13153 output "thread:TID" in the T stop reply.
13154
13155 * server.c (disable_packet_vCont, disable_packet_Tthread)
13156 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13157 (handle_query): If requested, disable support for qC, qfThreadInfo
13158 and qsThreadInfo.
13159 (handle_v_requests): If requested, disable support for vCont.
13160 (gdbserver_show_disableable): New.
13161 (main): Handle --disable-packet and --disable-packet=LIST.
13162
13163 * server.h (disable_packet_vCont, disable_packet_Tthread)
13164 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13165
8e4c5421
CD
131662008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13167
13168 * server.c (gdbserver_usage): Mention --version.
13169
6e23a804
DJ
131702008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13171
13172 * Makefile.in (gdbreplay.o): New rule.
13173
90aa6a40
JM
131742008-06-06 Joseph Myers <joseph@codesourcery.com>
13175
13176 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13177 message, not gdbserver.
13178
c16158bc 131792008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13180 Nathan Sidwell <nathan@codesourcery.com>
13181 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13182
13183 * acinclude.m4: Include ../../config/acx.m4.
13184 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13185 * configure, config.in: Regenerate.
13186 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13187 * server.c (gdbserver_version): Print PKGVERSION.
13188 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13189 (main): Adjust gdbserver_usage calls.
13190 * gdbreplay.c (version, host_name): Add declarations.
13191 (gdbreplay_version, gdbreplay_usage): New.
13192 (main): Accept --version and --help options.
13193
aeb75bf5
DJ
131942008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13195
13196 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13197 (arm_breakpoint_at): Handle Thumb.
13198 (the_low_target): Add comment.
13199
76b233dd
UW
132002008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13201
13202 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13203
08388c79
DE
132042008-05-09 Doug Evans <dje@google.com>
13205
a3c83fae
DE
13206 * server.h (decode_search_memory_packet): Declare.
13207 * remote-utils.c (decode_search_memory_packet): New fn.
13208 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13209 (handle_search_memory): New fn.
13210 (handle_query): Process qSearch:memory packets.
13211
bb9c3d36
UW
132122008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13213
13214 * regcache.c (registers_length): Remove.
13215 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13216 full register packet.
13217 * regcache.h (registers_length): Remove prototype.
13218 * server.h (PBUFSIZ): Define to 16384.
13219
7284e1be
UW
132202008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13221
13222 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13223 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13224 powerpc-64l.o, and powerpc-altivec64l.o.
13225 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13226 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13227 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13228 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13229 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13230 to srv_xmlfiles.
13231
13232 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13233 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13234 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13235 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13236 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13237 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13238 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13239 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13240 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13241 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13242 (clean): Update.
13243
13244 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13245 (init_registers_powerpc_32l): ... this new prototype.
13246 (init_registers_powerpc_32): Remove, replace by ...
13247 (init_registers_powerpc_altivec32l): ... this new prototype.
13248 (init_registers_powerpc_e500): Remove, replace by ...
13249 (init_registers_powerpc_e500l): ... this new prototype.
13250 (init_registers_ppc64): Remove, replace by ...
13251 (init_registers_powerpc_64l): ... this new prototype.
13252 (init_registers_powerpc_64): Remove, replace by ...
13253 (init_registers_powerpc_altivec64l): ... this new prototype.
13254 (ppc_num_regs): Set to 73.
13255 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13256 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13257 (ppc_cannot_store_register): Handle orig_r3 and trap.
13258 (ppc_arch_setup): Update init_registers_... calls.
13259 (ppc_fill_gregset): Handle orig_r3 and trap.
13260
13261 * inferiors.c (clear_inferiors): Reset current_inferior.
13262
fdc59709
PB
132632008-04-23 Paolo Bonzini <bonzini@gnu.org>
13264
889bf7c5
PA
13265 * acinclude.m4: Add override.m4.
13266 * configure: Regenerate.
fdc59709 13267
c9b2f845
UW
132682008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13271 initial call to init_register_ppc64.
13272
550512b8
UW
132732008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13274
43aaf8b6
PA
13275 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13276 single powerpc*-*-linux* case.
550512b8
UW
13277 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13278
b6430ec3
UW
132792008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13280
13281 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13282 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13283 from reg_xmlfiles.
13284 * linux-ppc-low.c: Include <elf.h>.
13285 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13286 (ppc_hwcap): New global variable.
13287 (ppc_regmap): Remove __SPE__ #ifdef sections.
13288 (ppc_regmap_e500): New global variable.
13289 (ppc_cannot_store_register): Update __SPE__ special case.
13290 (ppc_get_hwcap): New function.
13291 (ppc_arch_setup): Use it to determine whether inferior supports
13292 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13293 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13294 Do not access registers if target does not support AltiVec.
13295 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13296 Do not access registers if target does not support SPE.
13297 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13298
52fa2412
UW
132992008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13300
13301 * linux-low.c (disabled_regsets, num_regsets): New.
13302 (use_regsets_p): Delete.
13303 (linux_wait_for_process): Clear disabled_regsets.
13304 (regsets_fetch_inferior_registers): Check and set it.
13305 (regsets_store_inferior_registers): Likewise.
13306 (linux_fetch_registers, linux_store_registers): Do not use
13307 use_regsets_p.
13308 (initialize_low): Allocate disabled_regsets.
13309
e28b3332
DJ
133102008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13311
13312 * Makefile.in (LIBOBJS): New.
13313 (OBS): Use LIBOBJS.
13314 (memmem.o): New rule.
13315 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13316 * configure: Regenerated.
13317
4536995d
UW
133182008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13319
13320 * server.c (handle_query): Never return "unsupported" for
13321 qXfer:features:read queries.
13322
221c031f
UW
133232008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13324
13325 * server.c (get_features_xml): Fix inverted condition.
13326 (handle_query): Always support qXfer:feature:read.
13327
ccd213ac
DJ
133282008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * server.c (wrapper_argv): New.
13331 (start_inferior): Handle wrapper_argv. If set, expect an extra
13332 trap.
13333 (gdbserver_usage): Document --wrapper.
13334 (main): Parse --wrapper.
13335
6fe305f7
UW
133362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13337
13338 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13339 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13340 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13341 (ppc_set_pc): Likewise.
13342 (ppc_arch_setup): New function.
13343 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13344 of collect_register.
889bf7c5 13345 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13346
5b0a002e
UW
133472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13348
13349 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13350 instead of linux-ppc64-low.o.
13351 * linux-ppc64-low.c: Remove file.
13352 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13353 (linux-ppc64-low.o): Remove rule.
13354
13355 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13356 (init_registers_powerpc_64): Likewise.
13357 (ppc_regmap): Conditionally define depending on __powerpc64__.
13358 (ppc_cannot_store_register): Do not special-case "fpscr" when
13359 compiled on __powerpc64__.
13360 (ppc_collect_ptrace_register): New function.
13361 (ppc_supply_ptrace_register): New function.
13362 (ppc_breakpoint): Change type to "unsigned int".
13363 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13364 (the_low_target): Conditionally provide initializers for the
889bf7c5 13365 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13366 collect_ptrace_register and supply_ptrace_register members.
13367
9b4b61c8
UW
133682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13369
13370 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13371 * server.c (gdbserver_xmltarget): Define.
13372 (get_features_xml): Use it to replace "target.xml" and arch_string.
13373
13374 * configure.srv: Remove srv_xmltarget. Add XML files that were
13375 mentioned there to srv_xmlfiles instead. Remove conditional tests
13376 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13377 srv_xmlfiles and srv_regobj to include all possible choices.
13378 * configure.ac (srv_xmltarget): Remove.
13379 (srv_xmlfiles): Do not add "target.xml".
13380 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13381 checks for supplementary target information.
13382 * configure: Regenerate.
13383 * Makefile.in (XML_TARGET): Remove.
13384 (target.xml): Remove rule.
13385 (clean): Do not clean up target.xml.
13386 (.PRECIOUS): Do not mention target.xml.
13387
13388 * target.h (struct target_ops): Remove arch_string member.
13389 * linux-low.c (linux_arch_string): Remove.
13390 (linux_target_ops): Remove arch_string initializer.
13391 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13392 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13393 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13394 * spu-low.c (spu_arch_string): Remove.
13395 (spu_target_ops): Remove arch_string initializer.
13396 * win32-low.c (win32_arch_string): Remove.
13397 (win32_target_ops): Remove arch_string initializer.
13398 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13399 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13400 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13401
ee1a7ae4
UW
134022008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13403
13404 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13405 by collect_ptrace_register and supply_ptrace_register hooks.
13406 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13407 instead of checking for the_low_target.left_pad_xfer.
13408 (usr_store_inferior_registers): Use collect_ptrace_register callback
13409 instead of checking for the_low_target.left_pad_xfer.
13410
13411 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13412 (s390_supply_ptrace_register): Likewise.
13413 (s390_fill_gregset): Call s390_collect_ptrace_register.
13414 (the_low_target): Update.
13415
13416 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13417 (ppc_supply_ptrace_register): Likewise.
13418 (the_low_target): Update.
13419
13420 * linux-i386-low.c (the_low_target): Update.
13421 * linux-x86-64-low.c (the_low_target): Update.
13422
d61ddec4
UW
134232008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13424
13425 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13426 reg-s390.o and reg-s390x.o.
13427
13428 * linux-low.c (new_inferior): New global variable.
13429 (linux_create_inferior, linux_attach): Set it.
13430 (linux_wait_for_process): Call the_low_target.arch_setup after the
13431 target has stopped for the first time.
13432 (initialize_low): Do not call the_low_target.arch_setup.
13433
13434 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13435 (s390_set_pc): Likewise.
13436 (s390_arch_setup): New function.
13437 (the_low_target): Use s390_arch_setup as arch_setup routine.
13438
13439 * regcache.c (realloc_register_cache): New function.
13440 (set_register_cache): Call it for each existing regcache.
13441
d05b4ac3
UW
134422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13443
13444 * server.h (init_registers): Remove prototype.
13445
13446 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13447 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13448 instead of init_registers ().
13449 * linux-arm-low.c (init_registers_arm): Add prototype.
13450 (init_registers_arm_with_iwmmxt): Likewise.
13451 (the_low_target): Add initializer for arch_setup field.
13452 * linux-cris-low.c (init_registers_cris): Add prototype.
13453 (the_low_target): Add initializer for arch_setup field.
13454 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13455 (the_low_target): Add initializer for arch_setup field.
13456 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13457 (the_low_target): Add initializer for arch_setup field.
13458 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13459 (the_low_target): Add initializer for arch_setup field.
13460 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13461 (the_low_target): Add initializer for arch_setup field.
13462 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13465 (init_registers_mips64_linux): Likewise.
13466 (the_low_target): Add initializer for arch_setup field.
13467 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13468 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13471 (init_registers_powerpc_64): Likewise.
13472 (the_low_target): Add initializer for arch_setup field.
13473 * linux-s390-low.c (init_registers_s390): Add prototype.
13474 (init_registers_s390x): Likewise.
13475 (the_low_target): Add initializer for arch_setup field.
13476 * linux-sh-low.c (init_registers_sh): Add prototype.
13477 (the_low_target): Add initializer for arch_setup field.
13478 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13479 (the_low_target): Add initializer for arch_setup field.
13480 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13481 (the_low_target): Add initializer for arch_setup field.
13482
13483 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13484 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13485 instead of init_registers ().
13486 * win32-arm-low.c (init_registers_arm): Add prototype.
13487 (the_low_target): Add initializer for arch_setup field.
13488 * win32-i386-low.c (init_registers_i386): Add prototype.
13489 (the_low_target): Add initializer for arch_setup field.
13490
13491 * spu-low.c (init_registers_spu): Add prototype.
13492 (initialize_low): Call initialie_registers_spu () instead of
13493 initialize_registers ().
13494
fd96d250
PA
134952008-02-19 Pedro Alves <pedro@codesourcery.com>
13496
13497 * server.c (handle_v_requests): When handling the vRun and vAttach
13498 packets, if already debugging a process, don't kill it. Return an
13499 error instead.
13500
d41b6bb4
DJ
135012008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13502
13503 * server.c (handle_query): Correct length check.
13504
5ac588cf
PA
135052008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13506
13507 * win32-low.c (do_initial_child_stuff): Add process handle
13508 parameter. Set current_process_handle and current_process_id from the
13509 parameters. Clear globals.
13510 (win32_create_inferior): Don't set current_process_handle and
13511 current_process_id here. Instead pass them on the call to
13512 do_initial_child_stuff.
13513 (win32_attach): Likewise.
13514 (win32_clear_inferiors): New.
13515 (win32_kill): Don't close the current process handle or the
13516 current thread handle here. Instead call win32_clear_inferiors.
13517 (win32_detach): Don't open a new handle to the process. Call
13518 win32_clear_inferiors.
13519 (win32_join): Don't rely on current_process_handle; open a new
13520 handle using the process id.
13521 (win32_wait): Call win32_clear_inferiors when the inferior process
13522 has exited.
13523
ecd7ecbc
DJ
135242008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * server.c (monitor_show_help): Add "exit".
13527
1525d545
MG
135282008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13529
ecd7ecbc 13530 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13531 (clean): Add reg-xtensa.c.
13532 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13533 * configure.srv (xtensa*-*-linux*) New target.
13534 * linux-xtensa-low.c: New.
13535 * xtensa-xtregs.c: New.
1525d545 13536
59a016f0
PA
135372008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13538
13539 * hostio.c: Don't include errno.h.
13540 (errno_to_fileio_errno): Move to hostio-errno.
13541 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13542 error number outputting to the target->hostio_last_error callback.
13543 (hostio_packet_error): Use FILEIO_EINVAL directly.
13544 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13545 calls to hostio_error.
13546 * hostio-errno.c: New.
13547 * server.h (hostio_last_error_from_errno): Declare.
13548 * target.h (target_ops): Add hostio_last_error member.
13549 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13550 as hostio_last_error handler.
889bf7c5 13551 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13552 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13553 (wince_hostio_last_error): New functions.
13554 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13555 as hostio_last_error handler.
13556 (win32_target_ops) [!_WIN32_WCE]: Register
13557 hostio_last_error_from_errno as hostio_last_error handler.
13558 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13559 (hostio-errno.o): New rule.
13560 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13561 * configure.srv (srv_hostio_err_objs): New variable. Default to
13562 hostio-errno.o.
13563 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13564 * configure: Regenerate.
13565
2d717e4f
DJ
135662008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13567
13568 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13569 (linux_kill, linux_detach): Clean up the process list.
13570 * remote-utils.c (remote_open): Improve port number parsing.
13571 (putpkt_binary, input_interrupt): Only send interrupts if the target
13572 is running.
13573 * server.c (extended_protocol): Make static.
13574 (attached): Define earlier.
13575 (exit_requested, response_needed, program_argv): New variables.
13576 (target_running): New.
13577 (start_inferior): Clear attached here.
13578 (attach_inferior): Set attached here.
13579 (require_running): Define.
13580 (handle_query): Use require_running and target_running. Implement
13581 "monitor exit".
13582 (handle_v_attach, handle_v_run): New.
13583 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13584 (gdbserver_usage): Update.
13585 (main): Redo argument parsing. Handle --debug and --multi. Handle
13586 --attach along with other options or after the port. Save
13587 program_argv. Support no initial program. Resynchronize
13588 communication with GDB after an error. Handle "monitor exit".
13589 Use require_running and target_running. Always allow the extended
13590 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13591 restart in extended mode.
13592 * README: Refer to the GDB manual. Update --attach usage.
13593
7407e2de
AS
135942007-12-20 Andreas Schwab <schwab@suse.de>
13595
13596 * linux-low.c (STACK_SIZE): Define.
13597 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13598 (linux_test_for_tracefork): Likewise.
13599
b65d95c5
DJ
136002007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13601
13602 * linux-low.c (linux_wait_for_event): Update messages. Do not
13603 reinsert auto-delete breakpoints.
13604 * mem-break.c (struct breakpoint): Change return type of handler to
13605 int.
13606 (set_breakpoint_at): Update handler type.
13607 (reinsert_breakpoint_handler): Return 1 instead of calling
13608 delete_breakpoint.
13609 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13610 setting a new one.
13611 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13612 * mem-break.h (set_breakpoint_at): Update handler type.
13613 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13614 * win32-low.c (auto_delete_breakpoint): New.
13615 (get_child_debug_event): Use it.
13616
4e799345
DJ
136172007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * configure.ac: Check for pread and pwrite.
13620 * hostio.c (handle_pread): Fall back to lseek and read.
13621 (handle_pwrite): Fall back to lseek and write.
13622 * config.in, configure: Regenerated.
13623
27524b67
DJ
136242007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * server.c (myresume): Add own_buf argument.
13627 (main): Update calls.
13628
a20d5e98
DJ
136292007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13630
13631 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13632 * remote-utils.c (remote_open): Do not call disable_async_io.
13633 (block_async_io): Delete.
13634 (unblock_async_io): Make static.
13635 (initialize_async_io): New.
13636 * server.c (handle_v_cont): Handle async I/O here.
13637 (myresume): Likewise. Move other common resume tasks here...
13638 (main): ... from here. Call initialize_async_io. Disable async
13639 I/O before the main loop.
13640 * server.h (initialize_async_io): Declare.
13641 (block_async_io, unblock_async_io): Delete prototypes.
13642 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13643
b79d787e
DJ
136442007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13645
13646 * remote-utils.c (readchar): Allow binary data in received messages.
13647
d97903b2
PA
136482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13649
13650 * win32-low.c (attaching): New global.
13651 (win32_create_inferior): Clear the `attaching' global.
13652 (win32_attach): Set the `attaching' global.
13653 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13654 attaching. Only set a breakpoint at the entry point if not
13655 attaching.
13656
311de423
PA
136572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13658
13659 * server.c (main): Don't report dll events on the initial
13660 connection on attaches.
13661
6c2d16d2
PA
136622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13663
13664 * server.c (main): Relax numerical bases supported for the pid of
13665 the --attach command line argument.
13666
5ca906e6
PA
136672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13668
13669 * win32-low.c (win32_attach): Call OpenProcess before
13670 DebugActiveProcess, not after. Add last error output to error
13671 call.
13672
9c6c8194
PA
136732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13674
13675 * win32-low.c (win32_get_thread_context)
13676 (win32_set_thread_context): New functions.
13677 (thread_rec): Use win32_get_thread_context.
13678 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13679 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13680 field.
13681
4d5d1aaa
PA
136822007-12-03 Leo Zayas
13683 Pedro Alves <pedro_alves@portugalmail.pt>
13684
13685 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13686 global variables.
13687 (child_add_thread): Minor cleanup.
13688 (child_continue): Resume artificially suspended threads before
13689 calling ContinueDebugEvent.
13690 (suspend_one_thread): New.
13691 (fake_breakpoint_event): New.
13692 (get_child_debug_event): Change return type to int. Check here if
13693 gdb sent an interrupt request. If a soft interrupt was requested,
13694 fake a breakpoint event. Return 0 if there is no event to handle,
13695 and 1 otherwise.
13696 (win32_wait): Don't check here if gdb sent an interrupt request.
13697 Ensure there is a valid event to handle.
13698 (win32_request_interrupt): Add soft interruption method as last
13699 resort.
13700
c436e841
PA
137012007-12-03 Leo Zayas
13702 Pedro Alves <pedro_alves@portugalmail.pt>
13703
13704 * win32-low.h (win32_thread_info): Add descriptions to the
13705 structure members. Replace `suspend_count' counter by a
13706 `suspended' flag.
13707 * win32-low.c (thread_rec): Update condition of when to get the
13708 context from the inferior. Rely on ContextFlags being set if it
13709 has already been retrieved. Only suspend the inferior thread if
13710 we haven't already. Warn if that fails.
13711 (continue_one_thread): s/suspend_count/suspended/. Only call
13712 ResumeThread once. Warn if that fails.
13713
e7b5fa67
PA
137142007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13715
13716 * win32-low.c (win32_wait): Don't read from the inferior when it
13717 has already exited.
13718
a385171d
PA
137192007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13720
13721 * Makefile.in (win32_low_h): New variable.
13722 (win32-low.o): Add dependency on $(win32_low_h).
13723 (win32-arm-low.o, win32-i386-low.o): New rules.
13724
f80c84b3
DJ
137252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * hostio.c: Correct copyright year.
13728
a6b151f1
DJ
137292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * Makefile.in (OBS): Add hostio.o.
13732 (hostio.o): New rule.
13733 * server.h (handle_vFile): Declare.
13734 * hostio.c: New file.
13735 * server.c (handle_v_requests): Take packet_len and new_packet_len
13736 for binary packets. Call handle_vFile.
13737 (main): Update call to handle_v_requests.
13738
f9387fc3
DJ
137392007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13740
13741 * linux-low.c: Include <sched.h>.
13742
51c2684e
DJ
137432007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13744
13745 * linux-low.c (linux_tracefork_grandchild): New.
13746 (linux_tracefork_child): Use clone.
13747 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13748
75f83163
JB
137492007-10-31 Joel Brobecker <brobecker@adacore.com>
13750
13751 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13752
da5898ce
DJ
137532007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13754
13755 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13756
24a09b5f
DJ
137572007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13758
13759 * inferiors.c (change_inferior_id): Delete.
13760 (add_pid_to_list, pull_pid_from_list): New.
13761 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13762 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13763 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13764 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13765 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13766 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13767 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13768 (using_threads): Always set to 1.
13769 (handle_extended_wait): New.
13770 (add_process): Do not set TID.
13771 (linux_create_inferior): Set must_set_ptrace_flags.
13772 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13773 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13774 (linux_thread_alive): Rename TID argument to LWPID.
13775 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13776 (linux_wait_for_event): Do not use TID or check using_threads. Update
13777 call to dead_thread_notify. Call handle_extended_wait.
13778 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13779 (send_sigstop): Delete sigstop_sent.
13780 (wait_for_sigstop): Avoid TID.
13781 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13782 (linux_test_for_tracefork): New.
13783 (linux_lookup_signals): Use thread_db_active and
13784 linux_supports_tracefork_flag.
13785 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13786 * linux-low.h (get_process_thread): Avoid TID.
13787 (struct process_ifo): Move thread_known and tid to the end. Remove
13788 sigstop_sent.
13789 (linux_attach_lwp, thread_db_init): Update prototypes.
13790 * server.h (change_inferior_id): Delete prototype.
13791 (add_pid_to_list, pull_pid_from_list): New prototypes.
13792 * thread-db.c (thread_db_use_events): New.
13793 (find_first_thread): Rename to...
13794 (find_one_thread): ...this. Update callers and messages. Do not
13795 call fatal. Check thread_db_use_events. Do not call
13796 change_inferior_id or new_thread_notify.
13797 (maybe_attach_thread): Update. Do not call new_thread_notify.
13798 (thread_db_init): Set thread_db_use_events. Check use_events.
13799 * utils.c (fatal, warning): Correct message prefix.
13800
30ed0a8f
DJ
138012007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13802
13803 * Makefile.in (clean): Remove new files.
13804 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13805 (powerpc-64.o, powerpc-64.c): New rules.
13806 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13807 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13808 with SPE.
13809 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13810 SPE targets.
13811 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13812 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13813 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13814 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13815 (target_regsets): Add AltiVec and SPE register sets.
13816 * configure.ac: Check for AltiVec and SPE.
13817 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13818 (ppc_fill_vrregset, ppc_store_vrregset): New.
13819 (target_regsets): Add AltiVec register set.
13820 * configure: Regenerated.
13821
fd462a61
DJ
138222007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * linux-low.c (O_LARGEFILE): Define.
13825 (linux_read_memory): Use /proc/PID/mem.
13826 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13827 * configure, config.in: Regenerated.
13828
69f223ed
DJ
138292007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * linux-low.c (linux_wait_for_event): Do not pass signals while
13832 single-stepping.
13833
aec18585
PA
138342007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13835
13836 * win32-low.c (create_process): New.
13837 (win32_create_inferior): Use create_process instead of
13838 CreateProcess. If create_process failed retry appending an ".exe"
13839 suffix. Store the GetLastError result immediatelly after
13840 create_process calls and use it on the call to error.
13841
34d86ddd
PA
138422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13843
13844 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13845
5a0e3bd0
JB
138462007-08-23 Joel Brobecker <brobecker@adacore.com>
13847
13848 * configure.ac: Switch license to GPLv3.
13849
f88c79e6
MS
138502007-08-01 Michael Snyder <msnyder@access-company.com>
13851
13852 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13853
6b3d9b83
PA
138542007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13855
13856 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13857 typedef.
13858 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13859 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13860 CloseToolhelp32Snapshot.
13861 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13862 CloseToolhelp32Snapshot.
13863
c588c53c
MS
138642007-07-27 Michael Snyder <michael.snyder@access-company.com>
13865
13866 * server.c (main): Check for inferior exit before main loop.
13867
aa0403d9
PA
138682007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13869
13870 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13871 instead of on tmp_desc.
13872
255e7678
DJ
138732007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13874 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13877 (add_thread): Minor cleanups.
13878 (clear_inferiors): Move lower in the file. Clear the DLL
13879 list.
13880 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13881 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13882 (xml_escape_text): New.
13883 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13884 for qSupported.
13885 (handle_v_cont): Report errors.
13886 (gdbserver_version): Update.
13887 (main): Correct size of own_buf. Do not report initial DLL events.
13888 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13889 (unloaded_dll, xml_escape_text): New.
13890 * win32-low.c (enum target_waitkind): Update comments.
13891 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13892 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13893 (win32_EnumProcessModules, win32_GetModuleInformation)
13894 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13895 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13896 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13897 (win32_Module32First, win32_Module32Next, load_toolhelp)
13898 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13899 (get_child_debug_event): Handle DLL events.
13900 (win32_wait): Likewise.
13901
0d37add9
DJ
139022007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13903
13904 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13905 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13906
45e2715e
PA
139072007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13908
13909 * win32-low.c (handle_output_debug_string): Ignore event if not
13910 waiting.
13911
c5674cf1
PA
139122007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13913
13914 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13915
2bbe3cc1
DJ
139162007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13919
ae13219e
DJ
139202007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * inferiors.c (change_inferior_id): Add comment.
13923 * linux-low.c (check_removed_breakpoint): Add an early
13924 prototype. Improve debug output.
13925 (linux_attach): Doc update.
13926 (linux_detach_one_process, linux_detach): Clean up before releasing
13927 each process.
13928 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13929 * linux-low.h (struct process_info): Doc improvement.
13930 * mem-break.c (delete_all_breakpoints): New.
13931 * mem-break.h (delete_all_breakpoints): New prototype.
13932 * thread-db.c (find_first_thread): New.
13933 (thread_db_create_event): Call it instead of
13934 thread_db_find_new_threads. Clean up unused variables.
13935 (maybe_attach_thread): Remove first thread handling.
13936 (thread_db_find_new_threads): Use find_first_thread.
13937 (thread_db_get_tls_address): Likewise.
13938
4105de34
DJ
139392007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13940
13941 * thread-db.c (thread_db_find_new_threads): Add prototype.
13942 (thread_db_create_event): Check for the main thread before adding
13943 a new thread.
13944 (maybe_attach_thread): Only enable event reporting if TID == 0.
13945 (thread_db_get_tls_address): Check for new threads.
13946
2b876972
DJ
139472007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13948
13949 * linux-low.c (linux_create_inferior): Try execv before execvp.
13950 * spu-low.c (spu_create_inferior): Likewise.
13951
7a245884
DJ
139522007-06-13 Mike Frysinger <vapier@gentoo.org>
13953
13954 * linux-low.c (linux_create_inferior): Change execv to execvp.
13955 * spu-low.c (spu_create_inferior): Likewies.
13956
117ce543
DJ
139572007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13958
13959 * Makefile.in (clean): Clean new files instead of deleted ones.
13960 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13961 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13962 rules.
13963 * configure.srv: Specify XML files and new regformats for MIPS and
13964 MIPS64 GNU/Linux.
13965 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13966 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13967 an entry for the restart register.
13968 (mips_cannot_fetch_register, mips_cannot_store_register)
13969 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13970 register names to match the XML descriptions.
13971 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13972 restart register instead of $0.
13973
0e7f50da
UW
139742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13975 Markus Deuling <deuling@de.ibm.com>
13976
13977 * remote-utils.c (decode_xfer_write): New function.
13978 * server.h (decode_xfer_write): Add prototype.
13979 * server.c (handle_query): Add PACKET_LEN argument. Support
13980 qXfer:spu:read and qXfer:spu:write packets.
13981 (main): Pass packet_len to handle_query.
13982 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13983 * target.h (target_ops): Add qxfer_spu.
13984
374c1d38
UW
139852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13986
13987 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13988 accessing non-seekable spufs files.
13989
bb63802a
UW
139902007-05-16 Markus Deuling <deuling@de.ibm.com>
13991
889bf7c5 13992 * server.c (handle_query): Add reply for qC packet.
bb63802a 13993
7390519e
PA
139942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13995 Leo Zayas <lerele@champenstudios@com>
13996
13997 * server.h (check_remote_input_interrupt_request): New function.
13998 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13999 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14000 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14001 (check_remote_input_interrupt_request): New function.
14002 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14003 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14004 winapi_GenerateConsoleCtrlEvent): New typedefs.
14005 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14006 to 250 ms.
14007 (win32_wait): Check for remote interrupt request
14008 with check_remote_input_interrupt_request.
14009 (win32_request_interrupt): New function.
14010 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14011
34b34921
PA
140122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14013
14014 * win32-low.c (debug_registers_changed,
14015 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14016 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14017 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14018 (thread_rec): Get context using the low target.
14019 (child_add_thread): Call thread_added on the low target,
14020 which does the same thing.
14021 (regptr): Delete.
14022 (do_initial_child_stuff): Remove debug registers references.
14023 Set context using the low target. Resume threads after
14024 setting the contexts.
14025 (child_continue): Remove dead variable. Remove debug
14026 registers references.
14027 (child_fetch_inferior_registers): Go through the low target.
14028 (do_child_store_inferior_registers): Remove.
14029 (child_store_inferior_registers): Go through the low target.
14030 (win32_resume): Remove debug registers references.
14031 Set context using the low target.
14032 (handle_exception): Change return type to void. Don't record
14033 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14034 first chance exception.
889bf7c5 14035 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14036 goto loop. Always return after waiting for debug event.
14037 (win32_wait): Convert to switch statement. Handle spurious
14038 events.
14039
14040 * win32-i386-low.c (debug_registers_changed,
14041 debug_registers_used): New.
14042 (initial_stuff): Rename to ...
14043 (i386_initial_stuff): ... this. Clear debug registers
14044 state variables.
14045 (store_debug_registers): Delete.
14046 (i386_get_thread_context): New.
14047 (load_debug_registers): Delete.
14048 (i386_set_thread_context): New.
14049 (i386_thread_added): New.
14050 (single_step): Rename to ...
14051 (i386_single_step): ... this.
14052 (do_fetch_inferior_registers): Rename to ...
14053 (i386_fetch_inferior_register): ... this.
14054 (i386_store_inferior_register): New.
14055 (the_low_target): Adapt to new interface.
14056
14057 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14058 (arm_get_thread_context): New.
14059 (arm_set_thread_context): New.
14060 (regptr): New.
14061 (do_fetch_inferior_registers): Rename to ...
14062 (arm_fetch_inferior_register): ... this.
14063 (arm_store_inferior_register): New.
14064 (arm_wince_breakpoint): Reimplement as unsigned long.
14065 (arm_wince_breakpoint_len): Define.
14066 (the_low_target): Adapt to new interface.
14067
14068 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14069 load_debug_registers. Add get_thread_context, set_thread_context,
14070 thread_added and store_inferior_register. Rename
14071 fetch_inferior_registers to fetch_inferior_register.
14072 (regptr): Remove declaration.
14073
dd6953e1
PA
140742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14075
14076 * linux-low.c (linux_detach): Change return type to int. Return 0.
14077 * spu-low.c (spu_detach): Likewise.
14078
444d6139
PA
140792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14080
14081 * target.h (target_ops): Change return type of detach to int.
14082 Add join.
14083 (join_inferior): New.
14084 * server.c (main): Don't skip detach support on mingw32.
14085 If the inferior doesn't support detaching return error.
14086 Call join_inferior instead of using waitpid.
14087 * linux-low.c (linux_join): New.
14088 (linux_target_op): Add linux_join.
14089 * spu-low.c (spu_join): New.
14090 (spu_target_ops): Add spu_join.
14091 * win32-low.c (win32_detach): Adapt to new interface.
14092 Reopen current_process_handle before detaching. Issue a child
14093 resume before detaching.
14094 (win32_join): New.
14095 (win32_target_op): Add win32_join.
14096
1d5315fe
PA
140972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14098
14099 * win32-low.c (win32-attach): Fix return value.
14100 * target.h (target_ops): Describe ATTACH return values.
14101
bf914831
PA
141022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14103
14104 * win32-low.c (GETPROCADDRESS): Define.
14105 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14106 (winapi_DebugSetProcessKillOnExit): Likewise.
14107 (win32_create_inferior): Force usage of ansi CreateProcessA.
14108 (win32_attach): Use GETPROCADDRESS.
14109 (win32_detach): Likewise.
14110
f72f3e60
PA
141112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14112
14113 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14114
ed50f18f
PA
141152007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14116
14117 * win32-low.c: Commit leftover changes from 2007-03-29.
14118
0c2ead7e
DJ
141192007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14122 fields short instead of int. Add explicit padding.
14123 (i387_cache_to_fsave): Remove unnecessary casts.
14124 (i387_fsave_to_cache): Doc fix.
14125 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14126
73725ff3
DJ
141272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14130 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14131
d99f33d8
PA
141322007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * configure.srv (arm*-*-mingw32ce*): Move near the other
14135 arm targets.
14136
68070c10
PA
141372007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14138
2482afc6 14139 * configure.ac: Add errno checking.
68070c10
PA
14140 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14141 sys/file.h and malloc.h.
14142 (AC_CHECK_DECLS): Add perror.
14143 (srv_mingwce): Handle.
2482afc6 14144 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14145 win32-i386-low.o to srv_tgtobj.
14146 (i[34567]86-*-mingw*): Likewise.
14147 (arm*-*-mingw32ce*): Add case.
14148 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14149 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14150 [__MINGW32CE__] (strerror): New function.
14151 [__MINGW32CE__] (errno): Define to GetLastError.
14152 [__MINGW32CE__] (COUNTOF): New macro.
14153 (remote_open): Remove extra close call.
14154 * mem-break.c (delete_breakpoint_at): New function.
14155 * mem-break.h (delete_breakpoint_at): Declare.
14156 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14157 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14158 [USE_WIN32API] (read, write): Add char* casts.
14159 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14160 * server.h: Include wincecompat.h on Windows CE.
14161 [HAVE_ERRNO_H]: Check.
14162 (perror): Declare if not declared.
14163 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14164 (perror_with_name): Remove errno declaration.
14165 * wincecompat.h: New.
14166 * wincecompat.c: New.
14167 * win32-low.h: New.
14168 * win32-arm-low.c: New.
14169 * win32-i386-low.c: New.
14170 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14171 (OUTMSG2): Make it safe.
14172 (_T): New macro.
14173 (COUNTOF): New macro.
14174 (NUM_REGS): Get it from the low target.
14175 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14176 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14177 (thread_rec): Let low target handle debug registers.
14178 (child_add_thread): Likewise.
14179 (child_init_thread_list): Likewise.
14180 (continue_one_thread): Likewise.
14181 (regptr): New.
14182 (do_child_fetch_inferior_registers): Move to ...
14183 * win32-i386-low.c: ... here, and rename to ...
14184 (do_fetch_inferior_registers): ... this.
889bf7c5 14185 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14186 Go through the low target.
14187 (do_child_store_inferior_registers): Use regptr.
14188 (strwinerror): New function.
14189 (win32_create_inferior): Handle Windows CE.
14190 Use strwinerror instead of strerror on Windows error
14191 codes. Add program to the error output.
14192 Don't close the main thread handle on Windows CE.
14193 (win32_attach): Use coredll.dll on Windows CE.
14194 (win32_kill): Close current process and current
14195 thread handles.
14196 (win32_detach): Use coredll.dll on Windows CE.
14197 (win32_resume): Let low target handle debug registers, and
14198 step request.
14199 (handle_exception): Add/Remove initial breakpoint. Avoid
14200 non-existant WSTOPSIG on Windows CE.
14201 (win32_read_inferior_memory): Cast to remove warning.
14202 (win32_arch_string): Go through the low target.
14203 (initialize_low): Call set_breakpoint_data with the low
14204 target's breakpoint.
14205 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14206 FOP_REGNUM, mappings): Move to ...
14207 * win32-i386-low.c: ... here.
14208 * win32-low.c (win32_thread_info): Move to ...
14209 * win32-low.h: ... here.
14210 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14211 win32-arm-low.c and wincecompat.c.
14212 (all:): Add $EXEEXT.
14213 (install-only:): Likewise.
14214 (gdbserver:): Likewise.
14215 (gdbreplay:): Likewise.
14216 * config.in: Regenerate.
14217 * configure: Regenerate.
14218
41093d81
PA
142192007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14220
14221 * win32-low.c: Rename typedef thread_info to
14222 win32_thread_info throughout.
14223
544afa54
PA
142242007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14225
14226 * win32-i386-low.c: Rename to ...
14227 * win32-low.c: ... this.
14228 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14229 * Makefile.in: Likewise.
14230
bce7165d
PA
142312007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14232
14233 * remote-utils.c (monitor_output): Constify msg parameter.
14234 * server.h (monitor_output): Likewise.
14235 * win32-i386-low.c (handle_output_debug_string): New.
14236 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14237 handle_output_debug_string.
14238 (get_child_debug_event): Likewise.
14239
506c7aa0
DJ
142402007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14241
14242 * server.c (main): Correct strtoul check.
14243
42c81e2a
DJ
142442007-03-27 Jon Ringle <jon@ringle.org>
14245
14246 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14247
9453113a
DJ
142482007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14249
14250 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14251
64a69107
DJ
142522007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * terminal.h: Check HAVE_SGTTY_H.
14255
142562007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14257
14258 * remote-utils.c (remote_open): Print out the assigned port number.
14259
c74d0ad8
DJ
142602007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14261
14262 * remote-utils.c (monitor_output): New function.
14263 * server.c (debug_threads): Define here.
14264 (monitor_show_help): New function.
14265 (handle_query): Handle qRcmd.
14266 (main): Do not handle 'd' packet.
14267 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14268 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14269 of debug_threads.
14270
de7c3b4a
PA
142712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14272
14273 * Makefile.in (EXEEXT): New.
14274 (clean): Use $(EXEEXT).
14275
ef57601b
PA
142762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14277
14278 * target.h (target_ops): Rename send_signal to request_interrupt,
14279 and remove enum target_signal parameter.
14280 * linux-low.c (linux_request_interrupt): Rename from
14281 linux_send_signal, and always send SIGINT.
14282 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14283 and always send SIGINT.
14284 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14285 of send_signal.
14286 (input_interrupt): Likewise.
14287
820f2bda
PA
142882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14289
14290 * server.c (get_features_xml): Check if target implemented
14291 arch_string.
14292 * win32-i386-low.c (win32_arch_string): New.
14293 (win32_target_ops): Add win32_arch_string as arch_string member.
14294
ab39bf24
UW
142952007-02-22 Markus Deuling <deuling@de.ibm.com>
14296
14297 * spu-low.c (spu_arch_string): New.
14298 (spu_target_ops): Add spu_arch_string.
14299
61ff6e04
DJ
143002007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14301
14302 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14303 * configure.ac: Do not check for terminal.h.
14304 * configure, config.in: Regenerated.
14305
fb1e4ffc
DJ
143062007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * Makefile.in (OBS): Add $(XML_BUILTIN).
14309 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14310 (clean): Update.
14311 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14312 (arm-with-iwmmxt.c): New.
14313 * config.in, configure: Regenerate.
14314 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14315 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14316 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14317 (arm*-*-linux*): Add iWMMXt and regset support.
14318 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14319 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14320 (arm_store_wmmxregset, target_regsets): New.
14321 * server.c (get_features_xml): Take annex argument. Check builtin
14322 XML documents.
14323 (handle_query): Handle multiple annexes.
14324
0f48aa01
DJ
143252007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14326
14327 * remote-utils.c [USE_WIN32API] (read, write): Define.
14328 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14329 write.
14330
23181151
DJ
143312007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * linux-i386-low.c (the_low_target): Set arch_string.
14334 * linux-x86-64-low.c (the_low_target): Likewise.
14335 * linux-low.c (linux_arch_string): New.
14336 (linux_target_ops): Add it.
14337 * linux-low.h (struct linux_target_ops): Add arch_string.
14338 * server.c (write_qxfer_response): Use const void * for DATA.
14339 (get_features_xml): New.
14340 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14341 * target.h (struct target_ops): Add arch_string method.
14342
9d606399
DJ
143432007-01-03 Denis Pilat <denis.pilat@st.com>
14344 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * linux-low.c (linux_kill): Handle being called with no threads.
14347 * win32-i386-low.c (win32_kill): Likewise.
14348 (get_child_debug_event): Clear current_process_handle.
14349
143502006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14351 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * remote-utils.c (remote_open): Check the type of specified
14354 serial port devices before opening them.
14355 * server.c (main): Kill the inferior if an error occurs during
14356 the first remote_open.
14357
a5e13d24
DJ
143582006-12-05 Markus Deuling <deuling@de.ibm.com>
14359
14360 * README: Update supported targets.
14361
186947f7
DJ
143622006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * Makefile.in (clean): Remove reg-mips64.c.
14365 (reg-mips64.c, reg-mips64.o): New rules.
14366 * configure.srv: Handle mips64. Include regset support for mips.
14367 * linux-mips-low.c (union mips_register): New.
14368 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14369 (mips_breakpoint, mips_breakpoint_at): Use int.
14370 (mips_collect_register, mips_supply_register)
14371 (mips_collect_register_32bit, mips_supply_register_32bit)
14372 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14373 (mips_store_fpregset, target_regsets): New.
14374 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14375
a13e2c95
UW
143762006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * configure.srv: Add target "spu*-*-*".
14379 * Makefile.in (clean): Remove reg-spu.c.
14380 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14381 * spu-low.c: New file.
14382
cb7283db
DJ
143832006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14384
14385 * configure.ac: Correct td_thr_tls_get_addr test.
14386 * configure: Regenerated.
14387
89be2091
DJ
143882006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14389
14390 * linux-low.c (linux_wait_for_event): Reformat. Use the
14391 pass_signals array.
14392 * remote-utils.c (decode_address_to_semicolon): New.
14393 * server.c (pass_signals, handle_general_set): New.
14394 (handle_query): Mention QPassSignals for qSupported.
14395 (main): Call handle_general_set.
14396 * server.h (pass_signals, decode_address_to_semicolon): New.
14397
000ef4f0
DJ
143982006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * server.c (handle_query): Correct error handling for read_auxv.
14401
b7149293
UW
144022005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14403
14404 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14405 and srv_linux_thread_db to yes.
14406 * linux-s390-low.c (s390_fill_gregset): New function.
14407 (target_regsets): Define data structure.
14408
dae5f5cf
DJ
144092006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14412 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14413 * config.in, configure: Regenerated.
14414 * inferiors.c (gdb_id_to_thread): New function.
14415 (gdb_id_to_thread_id): Use it.
14416 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14417 * linux-low.h (struct process_info): Add th member.
14418 (thread_db_get_tls_address): New prototype.
14419 * remote-utils.c (decode_address): Make non-static.
14420 * server.c (handle_query): Handle qGetTLSAddr.
14421 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14422 * target.h (struct target_ops): Add get_tls_address.
14423 * thread-db.c (maybe_attach_thread): Save the thread handle.
14424 (thread_db_get_tls_address): New.
14425
32ca6d61
DJ
144262006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14429 (linux_resume_one_process): Take a siginfo_t *. Update all
14430 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14431 (struct pending_signals): Add a siginfo_t.
14432 (linux_wait_for_process): Always set last_status.
14433 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14434 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14435 * linux-low.h (struct process_info): Add last_status.
14436
5ffff7c1
DJ
144372006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14438
14439 * remote-utils.c (try_rle): New function.
14440 (putpkt_binary): Use it.
14441
8695c747
DJ
144422006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14443
14444 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14445 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14446 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14447 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14448 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14449 point registers.
14450
290fadea
RS
144512006-08-08 Richard Sandiford <richard@codesourcery.com>
14452
14453 * server.c (terminal_fd): New variable.
14454 (old_foreground_pgrp): Likewise.
14455 (restore_old_foreground_pgrp): New function.
14456 (start_inferior): Record the terminal file descriptor in terminal_fd
14457 and its original foreground group in old_foreground_pgrp. Register
14458 restore_old_foreground_pgrp with atexit().
14459
9f2e1e63
DJ
144602006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14461
14462 * server.c (handle_query): Correct qPart to qXfer.
14463
b80864fb
DJ
144642006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14465
14466 * configure.ac: Check for more headers which are missing on
14467 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14468 * configure.srv: Add Cygwin and mingw32.
14469 * remote-utils.c: Don't include headers unconditionally which
14470 are missing on mingw32. Include <winsock.h> for mingw32.
14471 (remote_open): Adjust for mingw32 support. Flush
14472 standard error after writing to it.
14473 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14474 (unblock_async_io, enable_async_io, disable_async_io)
14475 (readchar, getpkt): Update for Winsock support.
14476 (prepare_resume_reply): Expect a protocol signal number.
14477 * server.c: Disable <sys/wait.h> on mingw32.
14478 (start_inferior): Adjust for mingw32 support. Flush
14479 standard error after writing to it.
14480 (attach_inferior): Likewise. Use protocol signal
14481 numbers.
14482 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14483 and names.
14484 * win32-i386-low.c: New file.
14485 * Makefile.in (XM_CLIBS): Set.
14486 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14487 (win32-i386-low.o): New dependency rule.
14488 * linux-low.c (linux_wait): Use target signal numbers.
14489 * target.h (struct target_ops): Doc fix.
14490 * server.h (target_signal_to_name): New prototype.
14491 * gdbreplay.c: Don't include headers unconditionally which
14492 are missing on mingw32. Include <winsock.h> for mingw32.
14493 (remote_close, remote_open): Adjust for Winsock support.
14494 * configure, config.in: Regenerated.
14495
0876f84a
DJ
144962006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * server.c (decode_xfer_read, write_qxfer_response): New.
14499 (handle_query): Take a packet length argument. Handle
14500 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14501 the qSupported response.
14502 (main): Update call to handle_query.
14503
01f9e8fa
DJ
145042006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14507 (putpkt_binary): Renamed from putpkt and adjusted for binary
14508 data.
14509 (putpkt): New wrapper for putpkt_binary.
14510 (readchar): Don't mask off the high bit.
14511 (decode_X_packet): New function.
14512 * server.c (main): Call putpkt_binary if a handler sets the packet
14513 length. Save the length of the incoming packet. Handle 'X'.
14514 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14515
be2a5f71
DJ
145162006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14517
14518 * server.c (handle_query): Handle qSupported.
14519
ea025f5f
DJ
145202006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * remote-utils.c (all_symbols_looked_up): New variable.
14523 (look_up_one_symbol): Check it.
14524 * server.h (look_up_one_symbol): New declaration.
14525 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14526
9308fc88
DJ
145272006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14530 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14531 (PTRACE_GET_THREAD_AREA): Define.
14532 (ps_get_thread_area): New function.
14533
52fb6437
NS
145342006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14535
14536 * configure.srv (m68k*-*-uclinux*): New target.
14537 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14538 (linux_resume_one_process): Remove extraneous cast.
14539 (linux_read_offsets): New.
14540 (linux_target_op): Add linux_read_offsets on mmuless systems.
14541 * server.c (handle_query): Add qOffsets logic.
14542 * target.h (struct target_ops): Add read_offsets.
14543
21b0f40c
DJ
145442006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14547 (PTRACE_GET_THREAD_AREA): Define.
14548 (ps_get_thread_area): New function.
14549 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14550 (linux-x86-64-low.o): Update.
14551
0050a760
DJ
145522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14553
14554 * configure.ac: Remove checks for prfpregset_t.
14555 * gdb_proc_service.h: New file.
14556 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14557 new "gdb_proc_service.h".
14558 * proc-service.c: Likewise.
14559 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14560 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14561 * Makefile.in (gdb_proc_service_h): Updated.
14562 * configure, config.in: Regenerated.
14563
b92a518e
DJ
145642006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * remote-utils.c (prepare_resume_reply): Move declaration
14567 of gdb_id_from_wait to the top of the block.
14568
545587ee
DJ
145692006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14570
14571 * linux-low.c (regsets_store_inferior_registers): Read the regset
14572 from the target before filling it.
14573
9db87ebd
DJ
145742006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * server.c (attach_inferior): Return SIGTRAP for a successful
14577 attach.
14578
dd24457d
DJ
145792006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * Makefile.in (OBS): Add version.o.
14582 (STAGESTUFF): Delete.
14583 (version.o): Add dependencies.
14584 (version.c): Replace rule.
14585 (clean): Remove version.c.
14586 * server.c (gdbserver_version): New.
14587 (gdbserver_usage): Use printf.
14588 (main): Handle --version and --help.
14589 * server.h (version, host_name): Add declarations.
14590
6f0f660e
EZ
145912005-12-23 Eli Zaretskii <eliz@gnu.org>
14592
889bf7c5
PA
14593 * linux-arm-low.c:
14594 * linux-arm-low.c:
14595 * inferiors.c:
14596 * i387-fp.h:
14597 * i387-fp.c:
14598 * gdbreplay.c:
14599 * regcache.c:
14600 * proc-service.c:
14601 * mem-break.h:
14602 * mem-break.c:
14603 * linux-x86-64-low.c:
14604 * linux-sh-low.c:
14605 * linux-s390-low.c:
14606 * linux-ppc64-low.c:
14607 * linux-ppc-low.c:
14608 * linux-mips-low.c:
14609 * linux-m68k-low.c:
14610 * linux-m32r-low.c:
14611 * linux-low.h:
14612 * linux-low.c:
14613 * linux-ia64-low.c:
14614 * linux-i386-low.c:
14615 * linux-crisv32-low.c:
14616 * thread-db.c:
14617 * terminal.h:
14618 * target.h:
14619 * target.c:
14620 * server.h:
14621 * server.c:
14622 * remote-utils.c:
14623 * regcache.h:
14624 * utils.c:
14625 * Makefile.in:
14626 * configure.ac:
6f0f660e
EZ
14627 * gdbserver.1: Add (C) after Copyright. Update the FSF
14628 address.
14629
9d1fb177
DJ
146302005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14633 (arm_breakpoint_at): Recognize both breakpoints.
14634 (the_low_target): Use the correct breakpoint instruction.
14635
011a70c2
DJ
146362005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14639 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14640 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14641 (the_low_target): Update.
14642
7fb85e41
AS
146432005-10-25 Andreas Schwab <schwab@suse.de>
14644
14645 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14646
14647 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14648 (ia64_num_regs): Reduce to 462.
14649
3db0444b
DJ
146502005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * acinclude.m4: Correct quoting.
14653 * aclocal.m4: Regenerated.
14654
14655 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14656 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14657 (thread_db_init): Call thread_db_err_str.
14658 * configure.ac: Check for TD_VERSION.
14659 * config.in, configure: Regenerated.
14660
bee0189a
DJ
146612005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14662
14663 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14664
e9d25b98
DJ
146652005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14668 is not available. Define HAVE_PTRACE_GETREGS if it is.
14669 * config.in, configure: Regenerated.
14670 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14671 * linux-i386-low.c, linux-m68k-low.c: Update to use
14672 HAVE_PTRACE_GETREGS.
14673 * linux-low.c (regsets_fetch_inferior_registers)
14674 (regsets_store_inferior_registers): Only return 0 if we processed
14675 GENERAL_REGS.
14676 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14677 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14678
a06660f7
DJ
146792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14680
14681 * inferiors.c (struct thread_info): Add gdb_id.
14682 (add_thread): Add gdb_id argument.
14683 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14684 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14685 calls to add_thread.
14686 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14687 * server.c (handle_query): Use thread_to_gdb_id.
14688 (handle_v_cont, main): Use gdb_id_to_thread_id.
14689 * server.h (add_thread): Update prototype.
14690 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14691 prototypes.
14692
5a1f5858
DJ
146932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14694
14695 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14696 left-padded registers.
14697 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14698 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14699
e122f1f5
SE
147002005-07-01 Steve Ellcey <sje@cup.hp.com>
14701
14702 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14703 * configure: Regenerate.
14704 * config.in: Regenerate.
14705 * server.h (NEED_DECLARATION_STRERROR):
14706 Replace with !HAVE_DECL_STRERROR.
14707
d592fa2f
DJ
147082005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14709
14710 * linux-low.c (linux_wait, linux_send_signal): Don't test
14711 an unsigned long variable for > 0 if it could be MAX_ULONG.
14712 * server.c (myresume): Likewise.
14713 * target.c (set_desired_inferior): Likewise.
14714
ccbd4912
MK
147152005-06-13 Mark Kettenis <kettenis@gnu.org>
14716
14717 * configure.ac: Simplify and improve check for socklen_t.
14718 * configure, config.in: Regenerate.
14719
f450004a
DJ
147202005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * acconfig.h: Remove.
14723 * configure.ac: Add a test for socklen_t. Use three-argument
14724 AC_DEFINE throughout.
14725 * config.in: Regenerated using autoheader 2.59.
14726 * configure: Regenerated.
14727
14728 * gdbreplay.c (socklen_t): Provide a default.
14729 (remote_open): Use socklen_t.
14730 * remote-utils.c (socklen_t): Provide a default.
14731 (remote_open): Use socklen_t.
14732 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14733 unsigned char.
14734
14735 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14736 char for buffers.
14737 * linux-low.c (linux_read_memory, linux_write_memory)
14738 (linux_read_auxv): Likewise.
14739 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14740 (check_mem_write): Likewise.
14741 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14742 Likewise.
14743 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14744 (registers_from_string, register_data): Likewise.
14745 * server.c (handle_query, main): Likewise.
14746 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14747 (decode_M_packet): Likewise.
14748 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14749 * target.h (struct target_ops): Update read_memory, write_memory,
14750 and read_auxv.
14751 (read_inferior_memory, write_inferior_memory): Update.
14752 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14753 to unsigned char *.
14754 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14755 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14756 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14757 linux-s390-low.c, linux-sh-low.c: Update for changes in
14758 read_inferior_memory and the_low_target->breakpoint.
14759
eee84df1
DJ
147602005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14761
14762 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14763 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14764 * configure.srv: Add powerpc64-*-linux*.
14765 * linux-ppc64-low.c: New file.
14766
45b134e5
OF
147672005-05-23 Orjan Friberg <orjanf@axis.com>
14768
14769 * linux-cris-low.c: New file with support for CRIS.
14770 * linux-crisv32-low.c: Ditto for CRISv32.
14771 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14772 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14773 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14774 reg-crisv32.o, and reg-crisv32.c to make rules.
14775 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14776 recognized targets.
14777
48d93c75
UW
147782005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14779
14780 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14781 of sizeof (PTRACE_XFER_TYPE).
14782 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14783
e013ee27
OF
147842005-05-12 Orjan Friberg <orjanf@axis.com>
14785
889bf7c5 14786 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14787 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14788 pointers for hardware watchpoint support.
14789 * linux-low.h (struct linux_target_ops): Ditto.
14790 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14791 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14792 to linux_target_ops.
14793 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14794 reply packet.
14795 * server.c (main): Recognize 'Z' and 'z' packets.
14796
b0ded00b
UW
147972005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14798
14799 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14800 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14801 (the_low_target): Add new members.
14802
8643e2ad
DJ
148032005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * proc-service.c (ps_lgetregs): Search all_processes instead of
14806 all_threads.
14807
fc620387
DJ
148082005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14809
14810 * server.c (start_inferior): Change return type to int.
14811 (attach_inferior): Change sigptr to int *.
14812 (handle_v_cont, handle_v_requests): Change signal to int *.
14813 (main): Change signal to int.
14814
148152005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14816
14817 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14818 * configure.srv: Add m32r*-*-linux*.
14819 * linux-m32r-low.c: New file.
14820
e0e76420
DJ
148212005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14824
a1928bad
DJ
148252005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14826
14827 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14828 Take unsigned long arguments for PIDs.
14829 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14830 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14831 (wait_for_sigstop, linux_resume_one_process)
14832 (regsets_fetch_inferior_registers, linux_send_signal)
14833 (linux_read_auxv): Likewise. Update the types of variables holding
14834 PIDs. Update format string specifiers.
14835 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14836 * remote-utils.c (prepare_resume_reply): Likewise.
14837 * server.c (cont_thread, general_thread, step_thread)
14838 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14839 unsigned long.
14840 (handle_query): Update format specifiers.
14841 (handle_v_cont, main): Use strtoul for thread IDs.
14842 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14843 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14844 (general_thread, step_thread, thread_from_wait)
14845 (old_thread_from_wait): Update.
14846 * target.h (struct thread_resume): Use unsigned long for THREAD.
14847 (struct target_ops): Use unsigned long for arguments to attach and
14848 thread_alive.
14849
dcdb98d2
DJ
148502005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * acinclude.m4: Include bfd/bfd.m4 directly.
14853 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14854 <agriffis@toolchain.org>.
14855 * aclocal.m4, configure: Regenerated.
14856
bec39cab
AC
148572005-01-07 Andrew Cagney <cagney@gnu.org>
14858
14859 * configure.ac: Rename configure.in, require autoconf 2.59.
14860 * configure: Re-generate.
14861
434c4c77
DJ
148622004-12-08 Daniel Jacobowitz <dan@debian.org>
14863
14864 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14865 LIBS when finished.
14866 * aclocal.m4: Regenerated.
14867 * configure: Regenerated.
14868
db1d3e1b
AS
148692004-11-21 Andreas Schwab <schwab@suse.de>
14870
14871 * linux-m68k-low.c (m68k_num_gregs): Define.
14872 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14873 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14874 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14875 (m68k_breakpoint_at): New. Add to the_low_target.
14876
14877 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14878 srv_linux_thread_db to yes.
14879
43360365
JB
148802004-10-20 Joel Brobecker <brobecker@gnat.com>
14881
14882 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14883 (ARCH_SET_FS): Likewise.
14884 (ARCH_GET_FS): Likewise.
14885 (ARCH_GET_GS): Likewise.
14886
fd500816
DJ
148872004-10-16 Daniel Jacobowitz <dan@debian.org>
14888
14889 * linux-i386-low.c (ps_get_thread_area): New.
14890 * linux-x86-64-low.c (ps_get_thread_area): New.
14891 * linux-low.c: Include <sys/syscall.h>.
14892 (linux_kill_one_process): Don't kill the first thread here.
14893 (linux_kill): Kill the first thread here.
14894 (kill_lwp): New function.
14895 (send_sigstop, linux_send_signal): Use it.
14896 * proc-service.c: Clean up #ifdefs.
14897 (fpregset_info): Delete.
14898 (ps_lgetregs): Update and enable implementation.
14899 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14900 implementations.
14901 * remote-utils.c (struct sym_cache, symbol_cache): New.
14902 (input_interrupt): Print a clearer message.
14903 (async_io_enabled): New variable.
14904 (enable_async_io, disable_async_io): Use it. Update comments.
14905 (look_up_one_symbol): Use the symbol cache.
14906 * thread-db.c (thread_db_look_up_symbols): New function.
14907 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14908
f6de3c42
DJ
149092004-10-16 Daniel Jacobowitz <dan@debian.org>
14910
14911 * configure.in: Test for -rdynamic.
14912 * configure: Regenerated.
14913 * Makefile (INTERNAL_LDFLAGS): New.
14914 (gdbserver, gdbreplay): Use it.
14915
2c0fc042
AC
149162004-09-02 Andrew Cagney <cagney@gnu.org>
14917
14918 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14919
075b3282
DJ
149202004-03-23 Daniel Jacobowitz <drow@mvista.com>
14921
14922 * linux-low.c (linux_wait): Clear all_processes list also.
14923
fa6a77dc
DJ
149242004-03-12 Daniel Jacobowitz <drow@mvista.com>
14925
14926 * linux-low.c: Include <errno.h>. Remove extern declaration of
14927 errno.
14928
6d782a97
DJ
149292004-03-12 Daniel Jacobowitz <drow@mvista.com>
14930
14931 * gdbreplay.c, server.h, utils.c: Update copyright years.
14932
3a7fb99b
DJ
149332004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14934
14935 * server.c (main): Print child status or termination signal from
14936 variable 'signal', not 'sig'.
14937
c3e735a6
DJ
149382004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14939
14940 * linux-low.c (linux_read_memory): Change return type to
14941 int. Check for and return error from ptrace().
14942 * target.c (read_inferior_memory): Change return type to int. Pass
14943 back return status from the_target->read_memory().
14944 * target.h (struct target_ops): Adapt *read_memory() prototype.
14945 Update comment.
14946 (read_inferior_memory): Adapt prototype.
14947 * server.c (main): Return an error packet if
14948 read_inferior_memory() returns an error.
14949
a59d1c82
DJ
149502004-03-04 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14953 Unify with other clean targets.
14954
dc3f8883
DJ
149552004-02-29 Daniel Jacobowitz <drow@mvista.com>
14956
14957 * server.c (handle_v_cont): Call set_desired_inferior.
14958
89a208da
DJ
149592004-02-29 Daniel Jacobowitz <drow@mvista.com>
14960
14961 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14962
62ea82f5
DJ
149632004-02-29 Daniel Jacobowitz <drow@mvista.com>
14964
14965 * linux-low.c (linux_wait): Unblock async I/O.
14966 (linux_resume): Block and enable async I/O.
14967 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14968 * server.h (block_async_io, unblock_async_io): Add prototypes.
14969
6910d122
DJ
149702004-02-29 Daniel Jacobowitz <drow@mvista.com>
14971
14972 * remote-utils.c (remote_open): Print a status notice after
14973 opening a TCP port.
14974 * server.c (attach_inferior): Print a status notice after
14975 attaching.
14976
149772004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14978
14979 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14980
c89dc5d4
DJ
149812004-02-26 Daniel Jacobowitz <drow@mvista.com>
14982
14983 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14984 error packet.
14985 * server.c, target.h: Update copyright years.
14986
4b8dad4a
RM
149872004-02-25 Roland McGrath <roland@redhat.com>
14988
14989 * target.h (struct target_ops): New member `read_auxv'.
14990 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14991 * linux-low.c (linux_read_auxv): New function.
14992 (linux_target_ops): Initialize `read_auxv' member to that.
14993
d7446758
JB
149942004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14995
14996 Committed by Jim Blandy <jimb@redhat.com>.
14997
14998 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14999 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15000 instead of GPR_SIZE to distiguish s390 and s390x targets.
15001
5544ad89
DJ
150022004-01-31 Daniel Jacobowitz <drow@mvista.com>
15003
15004 * linux-low.c: Update copyright year.
15005 (check_removed_breakpoint): Clear pending_is_breakpoint.
15006 (linux_set_resume_request, linux_queue_one_thread)
15007 (resume_status_pending_p): New functions.
15008 (linux_continue_one_thread): Use process->resume.
15009 (linux_resume): Only resume threads if there are no pending events.
15010 * linux-low.h (struct process_info): Add resume request
15011 pointer.
15012
2a68b70e
DJ
150132004-01-30 Daniel Jacobowitz <drow@mvista.com>
15014
15015 * regcache.c (new_register_cache): Clear the allocated register
15016 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15017
64386c31
DJ
150182003-10-13 Daniel Jacobowitz <drow@mvista.com>
15019
15020 * linux-low.c (linux_resume): Take a struct thread_resume *
15021 argument.
15022 (linux_wait): Update call.
15023 (resume_ptr): New static variable.
15024 (linux_continue_one_thread): Renamed from
15025 linux_continue_one_process. Use resume_ptr.
15026 (linux_resume): Use linux_continue_one_thread.
15027 * server.c (handle_v_cont, handle_v_requests): New functions.
15028 (myresume): New function.
15029 (main): Handle 'v' case.
15030 * target.h (struct thread_resume): New type.
15031 (struct target_ops): Change argument of "resume" to struct
15032 thread_resume *.
15033 (myresume): Delete macro.
15034
c938e9b0
L
150352003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15036
15037 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15038 (uninstall): Support DESTDIR.
15039
7f313d07
BC
15040Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15041
15042 * configure.srv: Add xscale*linux copy of arm*linux entry.
15043
3b2fc2ea
DJ
150442003-07-24 Daniel Jacobowitz <drow@mvista.com>
15045
15046 * linux-arm-low.c (arm_reinsert_addr): New function.
15047 (the_low_target): Add arm_reinsert_addr.
15048
1c0a559e
MK
150492003-07-08 Mark Kettenis <kettenis@gnu.org>
15050
15051 * mem-break.c: Remove whitespace at end of file.
15052
43d5792c
DJ
150532003-06-28 Daniel Jacobowitz <drow@mvista.com>
15054
15055 * configure.in: Check whether we need to prototype strerror.
15056 * server.h: Optionally prototype strerror.
15057 * gdbreplay.c (perror_with_name): Use strerror.
15058 * linux-low.c (linux_attach_lwp): Use strerror.
15059 * utils.c (perror_with_name): Use strerror.
15060 * config.in, configure: Regenerated.
15061
c8a86edf
DJ
150622003-06-28 Daniel Jacobowitz <drow@mvista.com>
15063
15064 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15065 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15066
73d37363
DJ
150672003-06-20 Daniel Jacobowitz <drow@mvista.com>
15068
15069 * Makefile.in (SFILES): Update.
15070 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15071 low-sun3.c: Remove files.
15072
6ad8ae5c
DJ
150732003-06-17 Daniel Jacobowitz <drow@mvista.com>
15074
15075 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15076 (linux_detach_one_process, linux_detach): New functions.
15077 (linux_target_ops): Add linux_detach.
15078 * server.c (main): Handle 'D' packet.
15079 * target.h (struct target_ops): Add "detach" member.
15080 (detach_inferior): Define.
15081
1581182a
MK
150822003-06-13 Mark Kettenis <kettenis@gnu.org>
15083
15084 From Kelley Cook <kelleycook@wideopenwest.com>:
15085 * configure.srv: Accept i[34567]86 variants.
15086
e5379b03
DJ
150872003-06-05 Daniel Jacobowitz <drow@mvista.com>
15088
15089 * linux-low.c (linux_wait_for_event): Correct comment typos.
15090 (linux_resume_one_process): Call check_removed_breakpoint.
15091 (linux_send_signal): New function.
15092 (linux_target_ops): Add linux_send_signal.
15093 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15094 of kill.
15095 * target.h (struct target_ops): Add send_signal.
15096
2ff29de4
JB
150972003-05-29 Jim Blandy <jimb@redhat.com>
15098
15099 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15100 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15101 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15102 away part of the register's value.
15103
254787d4
DJ
151042003-03-26 Daniel Jacobowitz <drow@mvista.com>
15105
15106 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15107 (linux_wait_for_event, linux_init_signals): Likewise.
15108
94e10508
DJ
151092003-03-17 Daniel Jacobowitz <drow@mvista.com>
15110
15111 * configure.in: Check for stdlib.h.
15112 * configure: Regenerated.
15113 * config.in: Regenerated.
15114
4c0711e0
DJ
151152003-01-04 Andreas Schwab <schwab@suse.de>
15116
15117 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15118
ef66e766
AC
151192003-01-02 Andrew Cagney <ac131313@redhat.com>
15120
15121 * Makefile.in: Remove obsolete code.
15122
a1358604
DJ
151232002-11-20 Daniel Jacobowitz <drow@mvista.com>
15124
15125 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15126 defined(PT_FPR0_HI).
15127
23ce3b1c
DJ
151282002-11-17 Stuart Hughes <seh@zee2.com>
15129
15130 * linux-arm-low.c (arm_num_regs): Increase.
15131 (arm_regmap): Include status register.
15132
151332002-11-17 Daniel Jacobowitz <drow@mvista.com>
15134
15135 * linux-low.c (register_addr): Remove incorrect -1 check.
15136
a9fa9f7d
DJ
151372002-08-29 Daniel Jacobowitz <drow@mvista.com>
15138
15139 * linux-low.c (linux_create_inferior): Call setpgid. Return
15140 the new PID.
15141 (unstopped_p, linux_signal_pid): Remove.
15142 (linux_target_ops): Remove linux_signal_pid.
15143 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15144 global instead of target method.
15145 * target.h (struct target_ops): Remove signal_pid. Update comment
15146 for create_inferior.
15147 * server.c (signal_pid): New variable.
15148 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15149 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15150 (attach_inferior): Set signal_pid.
15151
17574093
DJ
151522002-08-23 Daniel Jacobowitz <drow@mvista.com>
15153
15154 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15155
151562002-08-20 Jim Blandy <jimb@redhat.com>
15157
15158 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15159 default for this.
15160
151612002-08-01 Andrew Cagney <cagney@redhat.com>
15162
15163 * Makefile.in: Make chill references obsolete.
15164
151652002-07-24 Kevin Buettner <kevinb@redhat.com>
15166
15167 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15168 * configure: Regenerate.
15169 * config.in: Regenerate.
15170
151712002-07-09 David O'Brien <obrien@FreeBSD.org>
15172
15173 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15174 (perror_with_name, remote_close, remote_open, expect, play): Static.
15175
151762002-07-04 Michal Ludvig <mludvig@suse.cz>
15177
4b8dad4a 15178 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15179 byte offsets instead of an array of indexes.
15180 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15181
151822002-06-13 Daniel Jacobowitz <drow@mvista.com>
15183
15184 * regcache.c: Add comment.
15185
151862002-06-11 Daniel Jacobowitz <drow@mvista.com>
15187
15188 * thread-db.c: New file.
15189 * proc-service.c: New file.
15190 * acinclude.m4: New file.
15191 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15192 proc-service.o, and thread-db.o.
15193 (linux-low.o): Add USE_THREAD_DB.
15194 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15195 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15196 * aclocal.m4: Regenerated.
15197 * config.in: Regenerated.
15198 * configure: Regenerated.
15199 * configure.in: Check for proc_service.h, sys/procfs.h,
15200 thread_db.h, and linux/elf.h headrs.
15201 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15202 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15203 Check for -lthread_db and thread support.
15204 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15205 PowerPC, and SuperH.
15206 * i387-fp.c: Constify arguments.
15207 * i387-fp.h: Likewise.
15208 * inferiors.c: (struct thread_info): Renamed from
15209 `struct inferior_info'. Remove PID member. Use generic inferior
15210 list header. All uses updated.
15211 (inferiors, signal_pid): Removed.
15212 (all_threads): New variable.
15213 (get_thread): Define.
15214 (add_inferior_to_list): New function.
15215 (for_each_inferior): New function.
15216 (change_inferior_id): New function.
15217 (add_inferior): Removed.
15218 (remove_inferior): New function.
15219 (add_thread): New function.
15220 (free_one_thread): New function.
15221 (remove_thread): New function.
15222 (clear_inferiors): Use for_each_inferior and free_one_thread.
15223 (find_inferior): New function.
15224 (find_inferior_id): New function.
15225 (inferior_target_data): Update argument type.
15226 (set_inferior_target_data): Likewise.
15227 (inferior_regcache_data): Likewise.
15228 (set_inferior_regcache_data): Likewise.
15229 * linux-low.c (linux_bp_reinsert): Remove.
15230 (all_processes, stopping_threads, using_thrads)
15231 (struct pending_signals, debug_threads, pid_of): New.
15232 (inferior_pid): Replace with macro.
15233 (struct inferior_linux_data): Remove.
15234 (get_stop_pc, add_process): New functions.
15235 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15236 Use add_process and add_thread.
15237 (linux_attach_lwp): New function, based on old linux_attach. Use
15238 add_process and add_thread. Set stop_expected for new threads.
15239 (linux_attach): New function.
15240 (linux_kill_one_process): New function.
15241 (linux_kill): Kill all LWPs.
15242 (linux_thread_alive): Use find_inferior_id.
15243 (check_removed_breakpoints, status_pending_p): New functions.
15244 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15245 Update. Use WNOHANG. Wait for cloned processes also. Update process
15246 struct for the found process.
15247 (linux_wait_for_event): New function.
15248 (linux_wait): Use it. Support LWPs.
15249 (send_sigstop, wait_for_sigstop, stop_all_processes)
15250 (linux_resume_one_process, linux_continue_one_process): New functions.
15251 (linux_resume): Support LWPs.
15252 (REGISTER_RAW_SIZE): Remove.
15253 (fetch_register): Use register_size instead. Call supply_register.
15254 (usr_store_inferior_registers): Likewise. Call collect_register.
15255 Fix recursive case.
15256 (regsets_fetch_inferior_registers): Improve error message.
15257 (regsets_store_inferior_registers): Add debugging.
15258 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15259 (unstopped_p, linux_signal_pid): New functions.
15260 (linux_target_ops): Add linux_signal_pid.
15261 (linux_init_signals): New function.
15262 (initialize_low): Call it. Initialize using_threads.
15263 * regcache.c (inferior_regcache_data): Add valid
15264 flag.
15265 (get_regcache): Fetch registers lazily. Add fetch argument
15266 and update all callers.
15267 (regcache_invalidate_one, regcache_invalidate): New
15268 functions.
15269 (new_register_cache): Renamed from create_register_cache.
15270 Return the new regcache.
15271 (free_register_cache): Change argument to a void *.
15272 (registers_to_string, registers_from_string): Call get_regcache
15273 with fetch flag set.
15274 (register_data): Make static. Pass fetch flag to get_regcache.
15275 (supply_register): Call get_regcache with fetch flag clear.
15276 (collect_register): Call get_regcache with fetch flag set.
15277 (collect_register_as_string): New function.
15278 * regcache.h: Update.
15279 * remote-utils.c (putpkt): Flush after debug output and use
15280 stderr.
15281 Handle input interrupts while waiting for an ACK.
15282 (input_interrupt): Use signal_pid method.
15283 (getpkt): Flush after debug output and use stderr.
15284 (outreg): Use collect_register_as_string.
15285 (new_thread_notify, dead_thread_notify): New functions.
15286 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15287 and general_thread.
15288 (look_up_one_symbol): Flush after debug output.
15289 * server.c (step_thread, server_waiting): New variables.
15290 (start_inferior): Don't use signal_pid. Update call to mywait.
15291 (attach_inferior): Update call to mywait.
15292 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15293 (main): Don't fetch/store registers explicitly. Use
15294 set_desired_inferior. Support proposed ``Hs'' packet. Update
15295 calls to mywait.
15296 * server.h: Update.
15297 (struct inferior_list, struct_inferior_list_entry): New.
15298 * target.c (set_desired_inferior): New.
15299 (write_inferior_memory): Constify.
15300 (mywait): New function.
15301 * target.h: Update.
15302 (struct target_ops): New signal_pid method.
15303 (mywait): Removed macro, added prototype.
15304
15305 * linux-low.h (regset_func): Removed.
15306 (regset_fill_func, regset_store_func): New.
15307 (enum regset_type): New.
15308 (struct regset_info): Add type field. Use new operation types.
15309 (struct linux_target_ops): stop_pc renamed to get_pc.
15310 Add decr_pc_after_break and breakpoint_at.
15311 (get_process, get_thread_proess, get_process_thread)
15312 (strut process_info, all_processes, linux_attach_lwp)
15313 (thread_db_init): New.
15314
15315 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15316 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15317 (the_low_target): Add new members.
15318 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15319 (i386_store_fpxregset): Constify.
15320 (target_regsets): Add new kind identifier.
15321 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15322 (i386_set_pc): Add debugging.
15323 (i386_breakpoint_at): New function.
15324 (the_low_target): Add new members.
15325 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15326 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15327 (mips_breakpoint_at): New.
15328 (the_low_target): Add new members.
15329 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15330 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15331 (the_low_target): Add new members.
15332 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15333 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15334 (the_low_target): Add new members.
15335 * linux-x86-64-low.c (target_regsets): Add new kind
15336 identifier.
15337
153382002-05-15 Daniel Jacobowitz <drow@mvista.com>
15339
15340 From Martin Pool <mbp@samba.org>:
15341 * server.c (gdbserver_usage): New function.
15342 (main): Call it.
15343
153442002-05-14 Daniel Jacobowitz <drow@mvista.com>
15345
15346 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15347 stop_at -> stop_pc.
15348
153492002-05-04 Andrew Cagney <ac131313@redhat.com>
15350
15351 * Makefile.in: Remove obsolete code.
15352
153532002-04-24 Michal Ludvig <mludvig@suse.cz>
15354
15355 * linux-low.c (regsets_fetch_inferior_registers),
15356 (regsets_store_inferior_registers): Removed cast to int from
15357 ptrace() calls.
15358 * regcache.h: Added declaration of struct inferior_info.
15359
153602002-04-20 Daniel Jacobowitz <drow@mvista.com>
15361
15362 * inferiors.c (struct inferior_info): Add regcache_data.
15363 (add_inferior): Call create_register_cache.
15364 (clear_inferiors): Call free_register_cache.
15365 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15366 * regcache.c (struct inferior_regcache_data): New.
15367 (registers): Remove.
15368 (get_regcache): New function.
15369 (create_register_cache, free_register_cache): New functions.
15370 (set_register_cache): Don't initialize the register cache here.
15371 (registers_to_string, registers_from_string, register_data): Call
15372 get_regcache.
15373 * regcache.h: Add prototypes.
15374 * server.h: Likewise.
15375
153762002-04-20 Daniel Jacobowitz <drow@mvista.com>
15377
15378 * mem-break.c: New file.
15379 * mem-break.h: New file.
15380 * Makefile.in: Add mem-break.o rule; update server.h
15381 dependencies.
15382 * inferiors.c (struct inferior_info): Add target_data
15383 member.
15384 (clear_inferiors): Free target_data member if set.
15385 (inferior_target_data, set_inferior_target_data): New functions.
15386 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15387 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15388 * linux-low.c (linux_bp_reinsert): New variable.
15389 (struct inferior_linux_data): New.
15390 (linux_create_inferior): Use set_inferior_target_data.
15391 (linux_attach): Likewise. Call add_inferior.
15392 (linux_wait_for_one_inferior): New function.
15393 (linux_wait): Call it.
15394 (linux_write_memory): Add const.
15395 (initialize_low): Call set_breakpoint_data.
15396 * linux-low.h (struct linux_target_ops): Add breakpoint
15397 handling members.
15398 * server.c (attach_inferior): Remove extra add_inferior
15399 call.
15400 * server.h: Include mem-break.h. Update inferior.c
15401 prototypes.
15402 * target.c (read_inferior_memory)
15403 (write_inferior_memory): New functions.
15404 * target.h (read_inferior_memory)
15405 (write_inferior_memory): Change macros to prototypes.
15406 (struct target_ops): Update comments. Add const to write_memory
15407 definition.
15408
154092002-04-11 Daniel Jacobowitz <drow@mvista.com>
15410
15411 * linux-low.c (usr_store_inferior_registers): Support
15412 registers which are allowed to fail to store.
15413 * linux-low.h (linux_target_ops): Likewise.
15414 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15415 (ppc_cannot_store_register): FPSCR may not be storable.
15416
154172002-04-09 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * server.h: Include <string.h> if HAVE_STRING_H.
15420 * ChangeLog: Correct paths in last ChangeLog entry.
15421
154222002-04-09 Daniel Jacobowitz <drow@mvista.com>
15423
15424 * linux-low.h: Remove obsolete prototypes.
15425 (struct linux_target_ops): New.
15426 (extern the_low_target): New.
15427 * linux-low.c (num_regs, regmap): Remove declarations.
15428 (register_addr): Use the_low_target explicitly.
15429 (fetch_register): Likewise.
15430 (usr_fetch_inferior_registers): Likewise.
15431 (usr_store_inferior_registers): Likewise.
15432 * linux-arm-low.c (num_regs): Remove.
15433 (arm_num_regs): Define.
15434 (arm_regmap): Renamed from regmap, made static.
15435 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15436 made static.
15437 (arm_cannot_store_register): Renamed from cannot_store_register,
15438 made static.
15439 (the_low_target): New.
15440 * linux-i386-low.c (num_regs): Remove.
15441 (i386_num_regs): Define.
15442 (i386_regmap): Renamed from regmap, made static.
15443 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15444 made static.
15445 (i386_cannot_store_register): Renamed from cannot_store_register,
15446 made static.
15447 (the_low_target): New.
15448 * linux-ia64-low.c (num_regs): Remove.
15449 (ia64_num_regs): Define.
15450 (ia64_regmap): Renamed from regmap, made static.
15451 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15452 made static.
15453 (ia64_cannot_store_register): Renamed from cannot_store_register,
15454 made static.
15455 (the_low_target): New.
15456 * linux-m68k-low.c (num_regs): Remove.
15457 (m68k_num_regs): Define.
15458 (m68k_regmap): Renamed from regmap, made static.
15459 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15460 made static.
15461 (m68k_cannot_store_register): Renamed from cannot_store_register,
15462 made static.
15463 (the_low_target): New.
15464 * linux-mips-low.c (num_regs): Remove.
15465 (mips_num_regs): Define.
15466 (mips_regmap): Renamed from regmap, made static.
15467 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15468 made static.
15469 (mips_cannot_store_register): Renamed from cannot_store_register,
15470 made static.
15471 (the_low_target): New.
15472 * linux-ppc-low.c (num_regs): Remove.
15473 (ppc_num_regs): Define.
15474 (ppc_regmap): Renamed from regmap, made static.
15475 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15476 made static.
15477 (ppc_cannot_store_register): Renamed from cannot_store_register,
15478 made static.
15479 (the_low_target): New.
15480 * linux-s390-low.c (num_regs): Remove.
15481 (s390_num_regs): Define.
15482 (s390_regmap): Renamed from regmap, made static.
15483 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15484 made static.
15485 (s390_cannot_store_register): Renamed from cannot_store_register,
15486 made static.
15487 (the_low_target): New.
15488 * linux-sh-low.c (num_regs): Remove.
15489 (sh_num_regs): Define.
15490 (sh_regmap): Renamed from regmap, made static.
15491 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15492 made static.
15493 (sh_cannot_store_register): Renamed from cannot_store_register,
15494 made static.
15495 (the_low_target): New.
15496 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15497 (the_low_target): New.
15498
154992002-04-09 Daniel Jacobowitz <drow@mvista.com>
15500
15501 * Makefile.in: Add stamp-h target.
15502 * configure.in: Create stamp-h.
15503 * configure: Regenerated.
15504
155052002-04-09 Daniel Jacobowitz <drow@mvista.com>
15506
15507 * inferiors.c: New file.
15508 * target.c: New file.
15509 * target.h: New file.
15510 * Makefile.in: Add target.o and inferiors.o. Update
15511 dependencies.
15512 * linux-low.c (inferior_pid): New static variable,
15513 moved from server.c.
15514 (linux_create_inferior): Renamed from create_inferior.
15515 Call add_inferior. Return 0 on success instead of a PID.
15516 (linux_attach): Renamed from myattach.
15517 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15518 (linux_thread_alive): Renamed from mythread_alive.
15519 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15520 child dies.
15521 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15522 (regsets_store_inferior_registers): Correct error message.
15523 Add missing ``return 0''.
15524 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15525 (linux_store_registers): Renamed from store_inferior_registers.
15526 (linux_read_memory): Renamed from read_inferior_memory.
15527 (linux_write_memory): Renamed from write_inferior_memory.
15528 (linux_target_ops): New structure.
15529 (initialize_low): Call set_target_ops ().
15530 * remote-utils.c (unhexify): New function.
15531 (hexify): New function.
15532 (input_interrupt): Send signals to ``signal_pid''.
15533 * server.c (inferior_pid): Remove.
15534 (start_inferior): Update create_inferior call.
15535 (attach_inferior): Call add_inferior.
15536 (handle_query): New function.
15537 (main): Call handle_query for `q' packets.
15538 * server.h: Include "target.h". Remove obsolete prototypes.
15539 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15540
155412002-04-09 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * Makefile.in: Add WARN_CFLAGS. Update configury
15544 dependencies.
15545 * configure.in: Check for <string.h>
15546 * configure: Regenerate.
15547 * config.in: Regenerate.
15548 * gdbreplay.c: Include needed system headers.
15549 (remote_open): Remove strchr prototype.
15550 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15551 * regcache.c (supply_register): Change buf argument to const void *.
15552 (supply_register_by_name): Likewise.
15553 (collect_register): Change buf argument to void *.
15554 (collect_register_by_name): Likewise.
15555 * regcache.h: Add missing prototypes.
15556 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15557 * server.c (handle_query): New function.
15558 (attached): New static variable, moved out of main.
15559 (main): Quiet longjmp clobber warnings.
15560 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15561 * utils.c (error): Remove NORETURN.
15562 (fatal): Likewise.