PowerPC64 ELFv2 symbols not needed in get_synthetic_symtab
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
289a6840
SM
12017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2
3 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5
256642e8
PA
62017-09-29 Pedro Alves <palves@redhat.com>
7
8 * ax.c (gdb_parse_agent_expr): Constify.
9 * ax.h (gdb_parse_agent_expr): Constify.
10 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
11 Constify.
12 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
13 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
14 * remote-utils.h (read_ptid): Constify.
15 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
16 (process_point_options, process_serial_event): Constify.
17 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
18 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
19 (cmd_qtbuffer): Constify.
20
5b9ca4d4
PA
212017-09-29 Pedro Alves <palves@redhat.com>
22
23 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
24 fails.
25
94c207e0
PA
262017-09-29 Pedro Alves <palves@redhat.com>
27
28 * linux-low.c (handle_extended_wait): Pass parent thread instead
29 of process to thread_db_notice_clone.
30 * linux-low.h (thread_db_notice_clone): Replace parent process
31 parameter with parent thread parameter.
32 * thread-db.c (find_one_thread): Add comment.
33 (thread_db_notice_clone): Replace parent process parameter with
34 parent thread parameter. Temporarily switch to the parent thread.
35
75352e28
SDJ
362017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * gdbthread.h: Include "common-gdbthread.h".
39 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
40 "if" when validating the ptid.
41 * remote-utils.c: Include "gdbthread.h".
42 (prepare_resume_reply): Use "switch_to_thread".
43 * target.c (done_accessing_memory): Likewise.
44
ad339634
AA
452017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
46
47 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
48 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
49 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
50 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
51 s390x-gs-linux64-ipa.o to ipa_obj.
52 * linux-s390-low.c (HWCAP_S390_GS): New define.
53 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
54 New functions.
55 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
56 (s390_arch_setup): Check for guarded-storage support and choose
57 appropriate tdesc.
58 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
59 init_registers_s390x_gs_linux64.
60 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
61 enum value.
62 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
63 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
64
cc4d742f
SM
652017-09-22 Simon Marchi <simon.marchi@ericsson.com>
66
67 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
68
f6327dcb
KB
692017-09-21 Kevin Buettner <kevinb@redhat.com>
70
71 * linux-low.h (struct lwp_info): Add new field, thread_handle.
72 (thread_db_thread_handle): Declare.
73 * linux-low.c (linux_target_ops): Initialize thread_handle.
74 * server.c (handle_qxfer_threads_worker): Add support for
75 "handle" attribute.
76 * target.h (struct target_ops): Add new function pointer,
77 thread_handle.
78 (target_thread_handle): Define.
79 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
80 field in lwp.
81 (thread_db_thread_handle): New function.
82
86299109
KB
832017-09-21 Kevin Buettner <kevinb@redhat.com>
84
85 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
86 * linux-low.h (thread_db_notice_clone): Declare.
87 * thread-db.c (thread_db_notice_clone): New function.
88
f557a88a
PA
892017-09-21 Pedro Alves <palves@redhat.com>
90
91 * server.c (gdb_read_memory, handle_status, process_serial_event)
92 (handle_serial_event, handle_target_event): Adjust to
93 set_desired_thread prototype change.
94 * target.c (set_desired_thread): Remove 'use_general' parameter
95 and adjust.
96 * target.h (set_desired_thread): Remove 'use_general' parameter.
97
223ffa71
TT
982017-09-20 Tom Tromey <tom@tromey.com>
99
100 * target.c (target_terminal::terminal_state): Define.
101 (target_terminal::init): Rename from target_terminal_init.
102 (target_terminal::inferior): Rename from
103 target_terminal_inferior.
104 (target_terminal::ours): Rename from target_terminal_ours.
105 (target_terminal::ours_for_output, target_terminal::info): New.
106
04fd3ba9
SM
1072017-09-16 Simon Marchi <simon.marchi@ericsson.com>
108
109 * server.c (accumulate_file_name_length): Remove.
110 (emit_dll_description): Adjust to std::string change.
111 (handle_qxfer_libraries): Use std::string to hold document.
112
5e187554
SM
1132017-09-16 Simon Marchi <simon.marchi@ericsson.com>
114
115 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
116 return type of xml_escape_text.
117 * server.c (emit_dll_description): Likewise.
118
1526853e
SM
1192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
120
121 * server.c (captured_main): Accept argument for --selftest.
122 Update run_tests call.
123 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
124 when registering selftests.
125
c4dfafab
SDJ
1262017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
127
128 * regcache.c (get_thread_regcache): Update code to use "std::vector"
129 instead of "VEC" for "target_desc.reg_defs".
130 (regcache_cpy): Likewise.
131 (registers_to_string): Likewise.
132 (registers_from_string): Likewise.
133 (find_regno): Likewise.
134 (supply_regblock): Likewise.
135 (regcache_raw_read_unsigned): Likewise.
136 * tdesc.c (init_target_desc): Likewise.
137 (tdesc_create_reg): Likewise.
138 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
139 (struct target_desc) <reg_defs>: Convert to "std::vector".
140 (target_desc): Do not initialize "reg_defs".
141 (~target_desc): Update code to use "std::vector" instead of "VEC"
142 for "target_desc.reg_defs".
143 (operator==): Likewise.
144
124aceb4
SM
1452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
146
147 * inferiors.h (thread_to_gdb_id): Remove.
148 * inferiors.c (thread_to_gdb_id): Remove.
149 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
150 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
151 lynx_store_registers, lynx_read_memory, lynx_write_memory):
152 Likewise.
153 * nto-low.c (nto_fetch_registers, nto_store_registers,
154 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
155
96cde54f
SM
1562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
157
158 * inferiors.h (gdb_id_to_thread_id): Remove.
159 * inferiors.c (gdb_id_to_thread_id): Remove.
160 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
161 removal. Move pid declaration closer to where it's used.
162
e8ca139e
SM
1632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
164
165 * server.c (handle_detach): New function.
166 (process_serial_event): Move code out, call handle_detach.
167
f8a4e119
SM
1682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
169
170 * server.c (require_running): Rename to ...
171 (require_running_or_return): ... this ...
172 (require_running_or_break): ... and this.
173 (handle_query, process_serial_event): Adjust.
174
0eb0a407
SM
1752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
176
177 * linux-low.c (linux_set_resume_request): Remove unused
178 variables.
179
785922a5
SM
1802017-09-15 Simon Marchi <simon.marchi@ericsson.com>
181
182 * server.c (first_thread_of): Remove.
183 (process_serial_event): Replace usage of first_thread_of with
184 find_any_thread_of_pid.
185 * tracepoint.c (same_process_p): Remove.
186 (gdb_agent_about_to_close): Replace usage of same_process_p with
187 find_any_thread_of_pid.
188 * linux-x86-low.c (same_process_callback): Remove.
189 (x86_arch_setup_process_callback): Replace usage of
190 same_process_callback with find_any_thread_of_pid.
191 * thread-db.c (any_thread_of): Remove.
192 (switch_to_process): Replace usage of any_thread_of with
193 find_any_thread_of_pid.
194 * inferiors.c (thread_pid_matches_callback): Remove.
195 (find_thread_process): Adjust to use find_any_thread_of_pid.
196
a059f00c
SDJ
1972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
198
199 * regcache.c (get_thread_regcache): Guard calls to "memset"
200 with "!VEC_empty".
201
cc397f3a
SDJ
2022017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
203
204 * linux-low.c (handle_extended_wait): Use
205 "allocate_target_description" instead of "XNEW".
206 * linux-x86-low.c (initialize_low_arch): Likewise.
207
22916b07
YQ
2082017-09-05 Yao Qi <yao.qi@linaro.org>
209
210 * configure.srv (srv_i386_regobj): Remove.
211 (srv_amd64_regobj): Remove.
212 (srv_regobj): Set it to "" for x86 non-linux targets.
213 * linux-x86-tdesc.c (i386_linux_read_description):
214 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
215 (init_registers_i386): Remove the declaration.
216 (tdesc_i386): Remove the declaration.
217 (lynx_i386_arch_setup): Call i386_create_target_description.
218 * nto-x86-low.c: Likewise.
219 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
220 [!__x86_64__]: include arch/i386.h.
221 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
222
38602d55
YQ
2232017-09-05 Yao Qi <yao.qi@linaro.org>
224
225 * configure.srv (srv_amd64_linux_xmlfiles): Remove
226 i386/amd64-XXX-linux from it.
227
44b886ff
YQ
2282017-09-05 Yao Qi <yao.qi@linaro.org>
229
230 * configure.srv: Empty srv_amd64_linux_regobj if $development is
231 false.
232 (ipa_amd64_linux_regobj): Remove.
233 (ipa_x32_linux_regobj): Remove.
234
b4570e4b
YQ
2352017-09-05 Yao Qi <yao.qi@linaro.org>
236
237 * Makefile.in (arch-amd64.o): New rule.
238 * configure.srv: Append arch-amd64.o.
239 * linux-amd64-ipa.c: Include common/x86-xstate.h.
240 (get_ipa_tdesc): Call amd64_linux_read_description.
241 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
242 and init_registers_amd64_XXX.
243 * linux-x86-low.c (x86_linux_read_description): Call
244 amd64_linux_read_description.
245 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
246 (initialize_low_arch): Don't call init_registers_x32_XXX and
247 init_registers_amd64_XXX.
248 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
249 and tdesc_amd64_XXX.
250 [__x86_64__] (amd64_tdesc_test): New function.
251 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
252 and init_registers_amd64_XXX.
253 * linux-x86-tdesc.c: Include arch/amd64.h.
254 (xcr0_to_tdesc_idx): New function.
255 (i386_linux_read_description): New function.
256 (amd64_get_ipa_tdesc_idx): New function.
257 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
258 (amd64_get_ipa_tdesc): Declare.
259
d1f28ea2
YQ
2602017-09-05 Yao Qi <yao.qi@linaro.org>
261
262 * configure.srv (srv_i386_linux_xmlfiles): Remove
263 i386/i386-XXX-linux.xml from it.
264
25a93583
YQ
2652017-09-05 Yao Qi <yao.qi@linaro.org>
266
267 * configure.srv: Set srv_i386_linux_regobj empty if $development
268 is false.
269 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
270 initialize_low_tdesc.
271 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
272 with #if initialize_low_tdesc.
273 * linux-x86-tdesc-selftest.c: New file.
274 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
275
5f035c07
YQ
2762017-09-05 Yao Qi <yao.qi@linaro.org>
277
278 * Makefile.in (arch-i386.o): New rule.
279 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
280 (x86_64-*-linux*): Likewise.
281 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
282 include arch/i386.h.
283 (i386_linux_read_description): Remove code and call
284 i386_create_target_description.
285 * tdesc.c (allocate_target_description): New function.
286 * tdesc.h (set_tdesc_architecture): Remove declaration.
287 (set_tdesc_osabi): Likewise.
288
0abe8a89
YQ
2892017-09-05 Yao Qi <yao.qi@linaro.org>
290
291 * linux-x86-tdesc.c: Don't include <inttypes.h>.
292 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
293 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
294 .xmltarget.
295 * server.c (get_features_xml): Call tdesc_get_features_xml.
296 * tdesc.c (set_tdesc_architecture): New function.
297 (set_tdesc_osabi): New function.
298 (tdesc_get_features_xml): New function.
299 (tdesc_create_feature): Add an argument.
300 * tdesc.h (struct target_desc) <features>: New field.
301 <arch, osabi>: New field.
302 (~target_desc): xfree features, arch, and osabi.
303 (target_desc::oerator==): Don't compare .xmltarget.
304 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
305 (set_tdesc_osabi): Likewise.
306 (tdesc_get_features_xml): Likewise.
307
0a188386
YQ
3082017-09-05 Yao Qi <yao.qi@linaro.org>
309
310 * linux-x86-tdesc.c: Include selftest.h.
311 (i386_tdesc_test): New function.
312 (initialize_low_tdesc): Call selftests::register_test.
313 * tdesc.h: Include regdef.h.
314 (target_desc): Override operator == and !=.
315
f49ff000
YQ
3162017-09-05 Yao Qi <yao.qi@linaro.org>
317
318 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
319 (ipa_obj): Likewise.
320 * linux-i386-ipa.c: Include common/x86-xstate.h
321 (get_ipa_tdesc): Call i386_linux_read_description.
322 (initialize_low_tracepoint): Don't call init_registers_XXX
323 functions, call initialize_low_tdesc instead.
324 * linux-x86-low.c (x86_linux_read_description): Call
325 i386_linux_read_description.
326 (initialize_low_arch): Don't call init_registers_i386_XXX
327 functions, call initialize_low_tdesc.
328 * linux-x86-tdesc.c: New file.
329 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
330 (i386_get_ipa_tdesc_idx): Declare.
331 (i386_get_ipa_tdesc): Declare.
332 (initialize_low_tdesc): Declare.
333
2b68ef2f
YQ
3342017-09-05 Yao Qi <yao.qi@linaro.org>
335
336 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
337 instead of 0.
338
f7000548
YQ
3392017-09-05 Yao Qi <yao.qi@linaro.org>
340
341 * Makefile.in (IPA_OBJS): Add vec-ipa.o
342 * regcache.c (get_thread_regcache): Use VEC_length.
343 (init_register_cache): Likewise.
344 (regcache_cpy): Likewise.
345 (registers_to_string): Iterate reg_defs via VEC_iterate.
346 (find_regno): Likewise.
347 (find_register_by_number): Use VEC_index.
348 (register_size): Call find_register_by_number.
349 (register_data): Call find_register_by_number.
350 (supply_regblock): Use VEC_length.
351 (regcache_raw_read_unsigned): Likewise.
352 * tdesc.c (init_target_desc): Iterate reg_defs via
353 VEC_iterate.
354 (default_description): Update initializer.
355 (copy_target_description): Don't update field num_registers.
356 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
357 <num_registers>: Remove.
358
50a421ac
SM
3592017-09-04 Simon Marchi <simon.marchi@ericsson.com>
360
361 * Makefile.in (.SECONDARY): Define target.
362
23fdd69e
SM
3632017-09-03 Simon Marchi <simon.marchi@ericsson.com>
364
365 * linux-low.c (linux_wait_1): Adjust.
366 * server.c (queue_stop_reply_callback): Adjust.
367
0a2dde4a
SDJ
3682017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
369
370 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
371 QEnvironmentUnset and QEnvironmentReset packets.
372 (handle_query): Inform remote that QEnvironmentHexEncoded,
373 QEnvironmentUnset and QEnvironmentReset are supported.
374
6afd337d
SM
3752017-08-25 Simon Marchi <simon.marchi@ericsson.com>
376
377 * inferiors.h (inferior_target_data): Rename to ...
378 (thread_target_data): ... this.
379 (inferior_regcache_data): Rename to ...
380 (thread_regcache_data): ... this.
381 (set_inferior_regcache_data): Rename to ...
382 (set_thread_regcache_data): ... this.
383 * inferiors.c (inferior_target_data): Rename to ...
384 (thread_target_data): ... this.
385 (inferior_regcache_data): Rename to ...
386 (thread_regcache_data): ... this.
387 (set_inferior_regcache_data): Rename to ...
388 (set_thread_regcache_data): ... this.
389 (free_one_thread): Update.
390 * linux-low.h (get_thread_lwp): Update.
391 * regcache.c (get_thread_regcache): Update.
392 (regcache_invalidate_thread): Update.
393 (free_register_cache_thread): Update.
394 * win32-i386-low.c (update_debug_registers_callback): Update.
395 (win32_get_current_dr): Update.
396 * win32-low.c (thread_rec): Update.
397 (delete_thread_info): Update.
398 (continue_one_thread): Update.
399 (suspend_one_thread): Update.
400
a160cc46
SM
4012017-08-24 Simon Marchi <simon.marchi@ericsson.com>
402
403 * inferiors.c (set_inferior_target_data): Remove.
404 * inferiors.h (set_inferior_target_data): Remove.
405
6d580b63
YQ
4062017-08-18 Yao Qi <yao.qi@linaro.org>
407
408 * Makefile.in (OBS): Add selftest.o.
409 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
410 * configure, config.in: Re-generated.
411 * server.c: Include common/sefltest.h.
412 (captured_main): Handle option --selftest.
413
f5a29eb0
YQ
4142017-08-09 Yao Qi <yao.qi@linaro.org>
415
416 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
417 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
418 i386-avx-mpx.o and i386-mmx.o.
419 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
420 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
421 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
422 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
423 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
424 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
425 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
426 i386/amd64-avx-mpx.xml.
427
57757c2f
YQ
4282017-08-09 Yao Qi <yao.qi@linaro.org>
429
430 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
431 and x32-avx-avx512.o.
432 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
433 i386/x32-avx-avx512.xml.
434
229d26fc
SM
4352017-07-26 Simon Marchi <simon.marchi@ericsson.com>
436
437 * tracepoint.h (enum class fast_tpoint_collect_result): New
438 enumeration.
439 (fast_tracepoint_collecting): Change return type to
440 fast_tpoint_collect_result.
441 * tracepoint.c (fast_tracepoint_collecting): Likewise.
442 * linux-low.h: Include tracepoint.h.
443 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
444 fast_tpoint_collect_result.
445 * linux-low.c (handle_tracepoints): Adjust.
446 (linux_fast_tracepoint_collecting): Change return type to
447 fast_tpoint_collect_result.
448 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
449 linux_wait_1, stuck_in_jump_pad_callback,
450 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
451 proceed_one_lwp): Adjust to type change.
452
2e1e43e1
YQ
4532017-07-10 Yao Qi <yao.qi@linaro.org>
454
455 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
456
adc764e7
YQ
4572017-06-29 Yao Qi <yao.qi@linaro.org>
458
459 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
460 Remove.
461 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
462
a206891a
SM
4632017-06-20 Simon Marchi <simon.marchi@ericsson.com>
464
465 * Makefile.in (IPA_OBJS): Sort and format one item per line.
466
9a6c7d9c
SDJ
4672017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
468
469 * linux-low.c (linux_create_inferior): Adjust code to access the
470 environment information via 'gdb_environ' class.
471 * lynx-low.c (lynx_create_inferior): Likewise.
472 * server.c (our_environ): Make it an instance of 'gdb_environ'.
473 (get_environ): Return a pointer to 'our_environ'.
474 (captured_main): Initialize 'our_environ'.
475 * server.h (get_environ): Adjust prototype.
476 * spu-low.c (spu_create_inferior): Adjust code to access the
477 environment information via 'gdb_environ' class.
478
ae3e2ccf
SM
4792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
480
481 * linux-low.c (linux_read_memory, linux_write_memory): Remove
482 usage of "register" keyword.
483
3e019bdc
SM
4842017-06-17 Simon Marchi <simon.marchi@ericsson.com>
485
486 * configure: Re-generate.
487
8465943a
SM
4882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
489
490 * configure: Re-generate.
491
cf0dd6f0
SM
4922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
493
494 * Makefile.in (COMPILE.pre): Add "-x c++".
495
9845682b
SDJ
4962017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
497
498 * fork-child.c: Conditionally include <signal.h>.
499
aefd8b33
SDJ
5002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
501
502 * server.c (handle_general_set): Handle new packet
503 "QStartupWithShell".
504 (handle_query): Add "QStartupWithShell" to the list of supported
505 packets.
506 (gdbserver_usage): Add help text explaining the
507 new "--startup-with-shell" and "--no-startup-with-shell" CLI
508 options.
509 (captured_main): Recognize and act upon the presence of the new
510 CLI options.
511
2090129c
SDJ
5122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
513 Pedro Alves <palves@redhat.com>
514
515 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
516 * configure: Regenerate.
517 * configure.srv (srv_linux_obj): Add "fork-child.o" and
518 "fork-inferior.o".
519 (i[34567]86-*-lynxos*): Likewise.
520 (spu*-*-*): Likewise.
521 * fork-child.c: New file.
522 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
523 and "environ.h".
524 (linux_ptrace_fun): New function.
525 (linux_create_inferior): Adjust function prototype to reflect
526 change on "target.h". Adjust function code to use
527 "fork_inferior".
528 (linux_request_interrupt): Delete "signal_pid".
529 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
530 (lynx_ptrace_fun): New function.
531 (lynx_create_inferior): Adjust function prototype to reflect
532 change on "target.h". Adjust function code to use
533 "fork_inferior".
534 * nto-low.c (nto_create_inferior): Adjust function prototype and
535 code to reflect change on "target.h". Update comments.
536 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
537 "common-terminal.h" and "environ.h".
538 (terminal_fd): Moved to fork-child.c.
539 (old_foreground_pgrp): Likewise.
540 (restore_old_foreground_pgrp): Likewise.
541 (last_status): Make it global.
542 (last_ptid): Likewise.
543 (our_environ): New variable.
544 (startup_with_shell): Likewise.
545 (program_name): Likewise.
546 (program_argv): Rename to...
547 (program_args): ...this.
548 (wrapper_argv): New variable.
549 (start_inferior): Delete function.
550 (get_exec_wrapper): New function.
551 (get_exec_file): Likewise.
552 (get_environ): Likewise.
553 (prefork_hook): Likewise.
554 (post_fork_inferior): Likewise.
555 (postfork_hook): Likewise.
556 (postfork_child_hook): Likewise.
557 (handle_v_run): Update code to deal with arguments coming from the
558 remote host. Update calls from "start_inferior" to
559 "create_inferior".
560 (captured_main): Likewise. Initialize environment variable. Call
561 "have_job_control".
562 * server.h (post_fork_inferior): New prototype.
563 (get_environ): Likewise.
564 (last_status): Declare.
565 (last_ptid): Likewise.
566 (signal_pid): Likewise.
567 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
568 (spu_ptrace_fun): New function.
569 (spu_create_inferior): Adjust function prototype to reflect change
570 on "target.h". Adjust function code to use "fork_inferior".
571 * target.c (target_terminal_init): New function.
572 (target_terminal_inferior): Likewise.
573 (target_terminal_ours): Likewise.
574 * target.h: Include <vector>.
575 (struct target_ops) <create_inferior>: Update prototype.
576 (create_inferior): Update macro.
577 * utils.c (gdb_flush_out_err): New function.
578 * win32-low.c (win32_create_inferior): Adjust function prototype
579 and code to reflect change on "target.h".
580
043a4934
SDJ
5812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
582
583 * inferiors.c (switch_to_thread): New function.
584
15652511
SDJ
5852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
586
587 * Makefile.in (SFILE): Add "common/job-control.c".
588 (OBS): Add "job-control.o".
589
21ea5acd
SDJ
5902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
591
592 * Makefile: Remove "@host_makefile_frag@".
593
e13cb306
PA
5942017-05-05 Pedro Alves <palves@redhat.com>
595
596 * configure: Regenerate.
597
c94fee56
SDJ
5982017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
599
600 * configure: Regenerate.
601
a0ff9e1a
SM
6022017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
603
604 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
605 software_single_step change of return type to
606 std::vector<CORE_ADDR>.
607 * linux-low.c (install_software_single_step_breakpoints):
608 Likewise.
609 * linux-low.h (install_software_single_step_breakpoints):
610 Likewise.
611
be628ab8
SDJ
6122017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
613
614 * remote-utils.c: Include "gdb_termios.h" instead of
615 "terminal.h".
616 * terminal.h: Delete file.
617
7c5ded6a
SDJ
6182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
619
620 * server.c: Include <vector>.
621 <program_argv, wrapper_argv>: Convert to std::vector.
622 (start_inferior): Rewrite function to use C++.
623 (handle_v_run): Likewise. Update code that calculates the argv
624 based on the vRun packet; use C++.
625 (captured_main): Likewise.
626
436252de
SM
6272017-04-06 Simon Marchi <simon.marchi@ericsson.com>
628
629 * server.c (handle_v_cont): Initialize thread_resume::thread
630 with null_ptid.
631
9bf2a700
PA
6322017-04-05 Pedro Alves <palves@redhat.com>
633
634 * configure: Regenerate.
635
a121b7c1
PA
6362017-04-05 Pedro Alves <palves@redhat.com>
637
638 * gdbreplay.c (sync_error): Constify.
639 * linux-x86-low.c (push_opcode): Constify.
640
21c8a587
PA
6412017-04-05 Pedro Alves <palves@redhat.com>
642
643 * win32-low.c (get_child_debug_event)
644 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
645 Report TARGET_WAITKIND_SPURIOUS instead.
646
fb32b4f7
PA
6472017-04-05 Pedro Alves <palves@redhat.com>
648
649 * remote-utils.c (remote_prepare, remote_open): Constify.
650 * remote-utils.h (remote_prepare, remote_open): Constify.
651 * server.c (captured_main): Constify 'port' handling.
652
65dd1e59
SM
6532017-04-04 Simon Marchi <simon.marchi@ericsson.com>
654
655 * Makefile.in (clean): Clear .deps.
656
8fa5b777
SM
6572017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
658
659 * .gitignore: Remove generated files, replace with wildcard.
660 * (clean): Replace removal of generated files with wildcard.
661 (version.c): Replace with...
662 (version-generated.c): ...this.
663 (xml-builtin.c): Replace with...
664 (xml-builtin-generated.c): ...this.
665 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
666 (%.c: *regformats*): Replace with...
667 (%-generated.c: *regformats*): ...this.
668
a12e714b
MF
6692017-03-27 Max Filippov <jcmvbkbc@gmail.com>
670
671 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
672 (xtensa_fill_gregset): Call collect_register_by_name for
673 threadptr register.
674 (xtensa_store_gregset): Call supply_register_by_name for
675 threadptr register.
676
1a09b50a
MF
6772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
678
679 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
680 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
681 (xtensa_store_gregset): Call supply_register for all registers in
682 a0_regnum..a0_regnum + C0_NREGS range.
683
1a01e7c6
SM
6842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
687 (ax-ipa.o: ax.c): Remove.
688 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
689 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
690 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
691 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
692 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
693
36bc18a8
SM
6942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
697 (print-utils-ipa.o: ../common/print-utils.c): Remove.
698 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
699 (errors-ipa.o: ../common/errors.c): Remove.
700 (format-ipa.o: ../common/format.c): Remove.
701 (common-utils-ipa.o: ../common/common-utils.c): Remove.
702
a8ebe3d5
SM
7032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * Makefile.in (%-ipa.o: %.c): New rule.
706 (tracepoint-ipa.o: tracepoint.c): Remove.
707 (utils-ipa.o: utils.c): Remove.
708 (remote-utils-ipa.o: remote-utils.c): Remove.
709 (regcache-ipa.o: regcache.c): Remove.
710 (i386-linux-ipa.o: i386-linux.c): Remove.
711 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
712 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
713 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
714 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
715 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
716 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
717 (amd64-linux-ipa.o: amd64-linux.c): Remove.
718 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
719 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
720 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
721 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
722 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
723 (aarch64-ipa.o: aarch64.c): Remove.
724 (s390-linux32-ipa.o: s390-linux32.c): Remove.
725 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
726 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
727 (s390-linux64-ipa.o: s390-linux64.c): Remove.
728 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
729 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
730 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
731 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
732 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
733 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
734 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
735 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
736 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
737 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
738 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
739 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
740 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
741 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
742 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
743 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
744 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
745 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
746 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
747 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
748 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
749 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
750 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
751 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
752 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
753 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
754 (tdesc-ipa.o: tdesc.c): Remove.
755 (x32-linux-ipa.o: x32-linux.c): Remove.
756 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
757 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
758
50cfacb7
SM
7592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * Makefile.in (%.o: ../arch/%.c): New rule.
762 (arm.o: ../arch/arm.c): Remove.
763 (arm-linux.o: ../arch/arm-linux.c): Remove.
764 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
765 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
766
c5a22423
SM
7672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
768
769 * Makefile.in (%.o: ../nat/%.c): New rule.
770 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
771 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
772 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
773 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
774 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
775 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
776 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
777 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
778 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
779 (linux-personality.o: ../nat/linux-personality.c): Remove.
780 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
781 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
782 (x86-linux.o: ../nat/x86-linux.c): Remove.
783 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
784 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
785
6bda016b
SM
7862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
787
788 * Makefile.in (%.o: ../common/%.c): New rule.
789 (signals.o: ../common/signals.c): Remove.
790 (print-utils.o: ../common/print-utils.c): Remove.
791 (rsp-low.o: ../common/rsp-low.c): Remove.
792 (common-utils.o: ../common/common-utils.c): Remove.
793 (posix-strerror.o: ../common/posix-strerror.c): Remove.
794 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
795 (vec.o: ../common/vec.c): Remove.
796 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
797 (xml-utils.o: ../common/xml-utils.c): Remove.
798 (ptid.o: ../common/ptid.c): Remove.
799 (buffer.o: ../common/buffer.c): Remove.
800 (format.o: ../common/format.c): Remove.
801 (filestuff.o: ../common/filestuff.c): Remove.
802 (agent.o: ../common/agent.c): Remove.
803 (errors.o: ../common/errors.c): Remove.
804 (environ.o: ../common/environ.c): Remove.
805 (common-debug.o: ../common/common-debug.c): Remove.
806 (cleanups.o: ../common/cleanups.c): Remove.
807 (common-exceptions.o: ../common/common-exceptions.c): Remove.
808 (fileio.o: ../common/fileio.c): Remove.
809 (common-regcache.o: ../common/common-regcache.c): Remove.
810 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
811 (new-op.o: ../common/new-op.c): Remove.
812 (btrace-common.o: ../common/btrace-common.c): Remove.
813
21122961
SM
8142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * Makefile.in (%.o: ../target/%.c): New rule.
817 (waitstatus.o: ../target/waitstatus.c): Remove.
818
c362e621
SM
8192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
820
821 * Makefile.in
822 (%.c: ../regformats/%.dat,
823 (%.c: ../regformats/arm/%.dat,
824 (%.c: ../regformats/i386/%.dat,
825 (%.c: ../regformats/rs6000/%.dat): New rules.
826 (aarch64.c): Remove.
827 (reg-arm.c): Remove.
828 (arm-with-iwmmxt.c): Remove.
829 (arm-with-vfpv2.c): Remove.
830 (arm-with-vfpv3.c): Remove.
831 (arm-with-neon.c): Remove.
832 (reg-bfin.c): Remove.
833 (reg-cris.c): Remove.
834 (reg-crisv32.c): Remove.
835 (i386.c): Remove.
836 (i386-linux.c): Remove.
837 (i386-avx.c): Remove.
838 (i386-avx-linux.c): Remove.
839 (i386-avx-avx512.c): Remove.
840 (i386-avx-avx512-linux.c): Remove.
841 (i386-mpx.c): Remove.
842 (i386-mpx-linux.c): Remove.
843 (i386-avx-mpx-avx512-pku.c): Remove.
844 (i386-avx-mpx-avx512-pku-linux.c): Remove.
845 (i386-avx-mpx.c): Remove.
846 (i386-avx-mpx-linux.c): Remove.
847 (i386-mmx.c): Remove.
848 (i386-mmx-linux.c): Remove.
849 (reg-ia64.c): Remove.
850 (reg-m32r.c): Remove.
851 (reg-m68k.c): Remove.
852 (reg-cf.c): Remove.
853 (mips-linux.c): Remove.
854 (mips-dsp-linux.c): Remove.
855 (mips64-linux.c): Remove.
856 (mips64-dsp-linux.c): Remove.
857 (nios2-linux.c): Remove.
858 (powerpc-32.c): Remove.
859 (powerpc-32l.c): Remove.
860 (powerpc-altivec32l.c): Remove.
861 (powerpc-cell32l.c): Remove.
862 (powerpc-vsx32l.c): Remove.
863 (powerpc-isa205-32l.c): Remove.
864 (powerpc-isa205-altivec32l.c): Remove.
865 (powerpc-isa205-vsx32l.c): Remove.
866 (powerpc-e500l.c): Remove.
867 (powerpc-64l.c): Remove.
868 (powerpc-altivec64l.c): Remove.
869 (powerpc-cell64l.c): Remove.
870 (powerpc-vsx64l.c): Remove.
871 (powerpc-isa205-64l.c): Remove.
872 (powerpc-isa205-altivec64l.c): Remove.
873 (powerpc-isa205-vsx64l.c): Remove.
874 (s390-linux32.c): Remove.
875 (s390-linux32v1.c): Remove.
876 (s390-linux32v2.c): Remove.
877 (s390-linux64.c): Remove.
878 (s390-linux64v1.c): Remove.
879 (s390-linux64v2.c): Remove.
880 (s390-te-linux64.c): Remove.
881 (s390-vx-linux64.c): Remove.
882 (s390-tevx-linux64.c): Remove.
883 (s390x-linux64.c): Remove.
884 (s390x-linux64v1.c): Remove.
885 (s390x-linux64v2.c): Remove.
886 (s390x-te-linux64.c): Remove.
887 (s390x-vx-linux64.c): Remove.
888 (s390x-tevx-linux64.c): Remove.
889 (tic6x-c64xp-linux.c): Remove.
890 (tic6x-c64x-linux.c): Remove.
891 (tic6x-c62x-linux.c): Remove.
892 (reg-sh.c): Remove.
893 (reg-sparc64.c): Remove.
894 (reg-spu.c): Remove.
895 (amd64.c): Remove.
896 (amd64-linux.c): Remove.
897 (amd64-avx.c): Remove.
898 (amd64-avx-linux.c): Remove.
899 (amd64-avx-avx512.c): Remove.
900 (amd64-avx-avx512-linux.c): Remove.
901 (amd64-mpx.c): Remove.
902 (amd64-mpx-linux.c): Remove.
903 (amd64-avx-mpx-avx512-pku.c): Remove.
904 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
905 (amd64-avx-mpx.c): Remove.
906 (amd64-avx-mpx-linux.c): Remove.
907 (x32.c): Remove.
908 (x32-linux.c): Remove.
909 (x32-avx.c): Remove.
910 (x32-avx-linux.c): Remove.
911 (x32-avx-avx512.c): Remove.
912 (x32-avx-avx512-linux.c): Remove.
913 (reg-xtensa.c): Remove.
914 (reg-tilegx.c): Remove.
915 (reg-tilegx32.c): Remove.
916
1672e0d9
SDJ
9172017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
918
919 * Makefile.in (SFILES): Add "common/environ.c".
920 (OBJS): Add "common/environ.h".
921
239b6d10
WT
9222017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
923
924 * configure.ac: Check if the fs_base and gs_base members of
925 `struct user_regs_struct' exist.
926 * config.in: Regenerated.
927 * configure: Likewise.
928
694b382c
AT
9292017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
930
931 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
932 target_read_memory.
933 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
934 (get_next_pcs_syscall_next_pc): Likewise.
935
7dc53023
LM
9362016-12-23 Luis Machado <lgustavo@codesourcery.com>
937
938 * win32-i386-low.c: Fix incorrect reference to a couple source files.
939 * nto-x86-low.c: Likewise.
940
ad02e4fe
SM
9412016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
942
943 * Makefile.in: Include disable-implicit-rules.mk.
944
dcb07cfa
PA
9452016-11-23 Pedro Alves <palves@redhat.com>
946
947 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
948 (debug_vprintf): Use std::chrono::steady_clock instead of
949 gettimeofday. Use '.' instead of ':'.
950 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
951 (get_timestamp): Use std::chrono::steady_clock instead of
952 gettimeofday.
953
8629c02c
SM
9542016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
955
956 * Makefile.in: Fix whitespace formatting.
957
b593ecca
SM
9582016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
959
960 * Makefile.in (SFILES, OBS): Flatten list and order
961 alphabetically.
962
9986ba08
PA
9632016-11-23 Pedro Alves <palves@redhat.com>
964
965 * event-loop.c (handle_file_event): Use warning.
966 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
967 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
968 Use warning.
969
4eefa7bc
PA
9702016-11-23 Pedro Alves <palves@redhat.com>
971
972 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
973 output.
974 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
975 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
976 debug_printf and debug_flush for debug output.
977 * server.c (handle_general_set): Likewise.
978 * thread-db.c (try_thread_db_load): Use debug_printf for debug
979 output.
980
5443506e
SM
9812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
982
983 * Makefile.in (.c.o): Replace rule with ...
984 (%.o: %.c): ... this one.
985
3b165252
SM
9862016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
987
988 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
989 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
990 make.
991 * configure.ac: Remove checks for the make program.
992 * configure: Re-generate.
993
0bcda685
PA
9942016-10-28 Pedro Alves <palves@redhat.com>
995
996 * Makefile.in (CXX_DIALECT): Get from configure.
997 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
998 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
999 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1000 * config.in: Regenerate.
1001 * configure: Regenerate.
1002
c3805894
YQ
10032016-10-27 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-low.c (linux_supports_range_stepping): Return true if
1006 can_software_single_step return true.
1007
89342618
YQ
10082016-10-27 Yao Qi <yao.qi@linaro.org>
1009
1010 * inferiors.c (find_inferior_in_random): New function.
1011 * inferiors.h (find_inferior_in_random): Declare.
1012 * linux-low.c (linux_wait_for_event_filtered): Call
1013 find_inferior_in_random instead of find_inferior.
1014
e3652c84
YQ
10152016-10-27 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-low.c (linux_wait_1): If single-step breakpoints are
1018 inserted, remove them.
1019
5a04c4cf
PA
10202016-10-26 Pedro Alves <palves@redhat.com>
1021
1022 * linux-low.c (handle_extended_wait): Link parent/child fork
1023 threads.
1024 (linux_wait_1): Unlink them.
1025 (linux_set_resume_request): Ignore resume requests for
1026 already-resumed and unhandled fork child threads.
1027 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1028 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1029 New functions.
1030 (handle_v_requests) <vCont>: Don't call require_running.
1031 * server.h (in_queued_stop_replies): New declaration.
1032
cb93dc7f
YQ
10332016-10-24 Yao Qi <yao.qi@linaro.org>
1034
1035 PR server/20733
1036 * linux-aarch64-low.c (append_insns): Cast the return value to
1037 'uint32_t *'.
1038
a1078bea
YQ
10392016-10-10 Yao Qi <yao.qi@linaro.org>
1040
1041 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1042
1fb77080
SDJ
10432016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1044
1045 * target.c (target_supports_multi_process): New function, moved
1046 from...
1047 * target.h (target_supports_multi_process): ... here. Remove
1048 macro.
1049
39b5a3b9
TT
10502016-10-05 Tom Tromey <tom@tromey.com>
1051
1052 PR remote/20655:
1053 * tracepoint.c (handle_tracepoint_bkpts): Check
1054 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1055
c1d0b70a
YQ
10562016-10-05 Yao Qi <yao.qi@linaro.org>
1057
1058 * configure.srv: Update the path of arm-*.xml files.
1059
0a69eedb
YQ
10602016-10-05 Terry Guo <terry.guo@arm.com>
1061 Yao Qi <yao.qi@linaro.org>
1062
1063 * Makefile.in: Adjust the path of rules.
1064 * configure.srv: Update the path of xml files.
1065 * regformats/arm-with-iwmmxt.dat: Regenerated.
1066 * regformats/arm-with-neon.dat: Likewise.
1067 * regformats/arm-with-vfpv2.dat: Likewise.
1068 * regformats/arm-with-vfpv3.dat Likewise.
1069
17e16485
YQ
10702016-09-30 Yao Qi <yao.qi@linaro.org>
1071
1072 PR gdbserver/20627
1073 * target.c (target_stop_and_wait): Don't call
1074 target_continue_no_signal, use resume_stop instead.
1075
edeeb602
YQ
10762016-09-26 Yao Qi <yao.qi@linaro.org>
1077
1078 * linux-low.c (linux_wait_1): Call debug_exit.
1079
503b1c39
PA
10802016-09-23 Pedro Alves <palves@redhat.com>
1081
1082 * Makefile.in (SFILES): Add common/new-op.c.
1083 (OBS): Add common/new-op.o.
1084 (new-op.o): New rule.
1085
74172ecf
SM
10862016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1087
1088 * .gitinore: Ignore more files.
1089
fc6cda2e
YQ
10902016-09-21 Yao Qi <yao.qi@linaro.org>
1091
1092 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1093 23.
1094
bc1e6c81
SDJ
10952016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1096
1097 * server.c (start_inferior): Call target_mourn_inferior instead of
1098 mourn_inferior; pass ptid_t argument to it.
1099 (resume): Likewise.
1100 (handle_target_event): Likewise.
1101 * target.c (target_mourn_inferior): New function.
1102 * target.h (mourn_inferior): Delete macro.
1103
0e00e962
AA
11042016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1105
1106 * linux-low.c (lwp_is_stepping): New function.
1107
1d8cb77d
CL
11082016-09-06 Carl Love <cel@us.ibm.com>
1109
1110 * server.c (start_inferior): Fixed comment, requested comment change
1111 didn't get updated correctly. Removed reference to ptrace () call as
1112 it is only true on Linux systems.
1113
7313bced
CL
11142016-09-06 Carl Love <cel@us.ibm.com>
1115
1116 * server.c (start_inferior): Do not call
1117 function target_post_create_inferior () if the
1118 inferior process has already exited.
1119
cf6de44d
PA
11202016-09-05 Pedro Alves <palves@redhat.com>
1121
1122 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1123 (COMPILE.pre, CC_LD): Use CXX directly.
1124 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1125 * acinclude.m4: Don't include build-with-cxx.m4.
1126 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1127 * configure: Regenerate.
1128
c1da6748
AT
11292016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1130
1131 PR gdb/19495
1132 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1133 call writing data to own_buf.
1134
f2b9e3df
SDJ
11352016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1136
1137 * target.c (mywait): Call target_wait instead of
1138 the_target->wait.
1139 (target_wait): New function.
1140
049a8570
SDJ
11412016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1142
1143 * server.c (start_inferior): New variable 'ptid'. Replace calls
1144 to the_target->resume by target_continue{,_no_signal}, depending
1145 on the case.
1146 * target.c (target_stop_and_wait): Call target_continue_no_signal
1147 instead of the_target->resume.
1148 (target_continue): New function.
1149
3aa5cfa0
AT
11502016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1151
1152 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1153
754653a7
AZ
11542016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1155
1156 PR server/20491
1157 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1158 ps_prochandle.
1159 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1160 * linux-arm-low.c (ps_get_thread_area): Likewise.
1161 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1162 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1163 * linux-mips-low.c (ps_get_thread_area): Likewise.
1164 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1165 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1166 * linux-x86-low.c (ps_get_thread_area): Likewise.
1167 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1168
ed036b40
PA
11692016-08-19 Pedro Alves <palves@redhat.com>
1170
1171 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1172
c8ef42ee
PA
11732016-08-19 Pedro Alves <palves@redhat.com>
1174
1175 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1176 comment. Use memcpy instead of casting through unsigned long.
1177
9c235a72
PA
11782016-08-19 Pedro Alves <palves@redhat.com>
1179
1180 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1181 allocating around 0x80000000.
1182
201506da
PA
11832016-08-19 Pedro Alves <palves@redhat.com>
1184
1185 PR gdb/20415
1186 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1187 (x32-avx512-linux-ipa.o): New rules.
1188 * configure.ac (x86_64-*-linux*): New x32 check.
1189 * configure.srv (ipa_x32_linux_regobj): New.
1190 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1191 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1192 descriptions.
1193 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1194 descriptions.
1195 * configure: Regenerate.
1196
f348d89a
PA
11972016-08-09 Pedro Alves <palves@redhat.com>
1198
1199 PR gdb/18653
1200 * Makefile.in (OBS): Add signals-state-save-restore.o.
1201 (signals-state-save-restore.o): New rule.
1202 * config.in: Regenerate.
1203 * configure: Regenerate.
1204 * linux-low.c: Include "signals-state-save-restore.h".
1205 (linux_create_inferior): Call
1206 restore_original_signals_state.
1207 * server.c: Include "dispositions-save-restore.h".
1208 (captured_main): Call save_original_signals_state.
1209
1baf5149
PA
12102016-08-05 Pedro Alves <palves@redhat.com>
1211
1212 * configure: Regenerate.
1213
fcd4a73d
YQ
12142016-08-04 Yao Qi <yao.qi@linaro.org>
1215
1216 * linux-low.c (regsets_fetch_inferior_registers): Check
1217 errno is ESRCH or not.
1218
979659d0
YQ
12192016-08-02 Yao Qi <yao.qi@linaro.org>
1220
1221 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1222 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1223 (thread_db_load_search): Update.
1224 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1225 td_ta_set_event and td_ta_event_getmsg.
1226
6598661d
PA
12272016-07-26 Pedro Alves <palves@redhat.com>
1228
1229 PR server/20414
1230 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1231 of unsigned long for 64-bit registers and use uint32_t instead of
1232 unsigned int for 32-bit registers.
1233
9cf12d57
PA
12342016-07-26 Pedro Alves <palves@redhat.com>
1235
1236 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1237 to 'ptrace'.
1238
305450ed
TT
12392016-07-21 Tom Tromey <tom@tromey.com>
1240
1241 * configure: Rebuild.
1242
2583da7c
YQ
12432016-07-21 Yao Qi <yao.qi@linaro.org>
1244
1245 * mem-break.c (find_gdb_breakpoint): Cast bp to
1246 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1247
21536b36
YQ
12482016-07-21 Yao Qi <yao.qi@linaro.org>
1249
1250 * server.c (handle_v_requests): Support s and S actions
1251 if target_supports_software_single_step return true.
1252
8901d193
YQ
12532016-07-21 Yao Qi <yao.qi@linaro.org>
1254
1255 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1256 is resume_step, call maybe_hw_step.
1257 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1258 and unstop them.
1259 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1260 breakpoints or not.
1261 (proceed_one_lwp): If resume request is resume_step, install
1262 reinsert breakpoints and call maybe_hw_step.
1263
0e9a339e
YQ
12642016-07-21 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-low.c (proceed_one_lwp): Declare.
1267 (linux_resume_one_thread): Remove local variable 'step'.
1268 Lift code enqueue signal. Call proceed_one_lwp instead of
1269 linux_resume_one_lwp.
1270
4281b351
YQ
12712016-07-21 Yao Qi <yao.qi@linaro.org>
1272
1273 * linux-low.c (linux_resume_one_thread): Call
1274 enqueue_pending_signal.
1275
984a2c04
YQ
12762016-07-21 Yao Qi <yao.qi@linaro.org>
1277
1278 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1279 * inferiors.c (do_restore_current_thread_cleanup): New function.
1280 (make_cleanup_restore_current_thread): Likewise.
1281 * linux-low.c (install_software_single_step_breakpoints): Call
1282 make_cleanup_restore_current_thread. Switch current_thread to
1283 thread.
1284
bec903c9
YQ
12852016-07-21 Yao Qi <yao.qi@linaro.org>
1286
1287 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1288 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1289 (clone_one_breakpoint): Likewise.
1290 (delete_reinsert_breakpoints): Change parameter to thread.
1291 Callers updated.
1292 (has_reinsert_breakpoints): Likewise.
1293 (uninsert_reinsert_breakpoints): Likewise.
1294 (reinsert_reinsert_breakpoints): Likewise.
1295 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1296 (delete_reinsert_breakpoints): Likewise.
1297 (reinsert_reinsert_breakpoints): Likewise.
1298 (uninsert_reinsert_breakpoints): Likewise.
1299 (has_reinsert_breakpoints): Likewise.
1300
63c40ec7
YQ
13012016-07-21 Yao Qi <yao.qi@linaro.org>
1302
1303 * inferiors.c (get_thread_process): Make parameter const.
1304 * inferiors.h (get_thread_process): Update declaration.
1305 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1306 Add new parameters child_thread and parent_thread. Callers
1307 updated.
1308 * mem-break.h (clone_all_breakpoints): Update declaration.
1309
9aa76cd0
YQ
13102016-07-21 Yao Qi <yao.qi@linaro.org>
1311
1312 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1313 <command_list, handler>: Remove.
1314 (struct gdb_breakpoint): New.
1315 (struct other_breakpoint): New.
1316 (struct reinsert_breakpoint): New.
1317 (is_gdb_breakpoint): New function.
1318 (any_persistent_commands): Update command_list if
1319 is_gdb_breakpoint returns true.
1320 (set_breakpoint): Create breakpoints according to their types.
1321 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1322 (set_gdb_breakpoint_1): Likewise.
1323 (set_gdb_breakpoint): Likewise.
1324 (clear_breakpoint_conditions): Change parameter type to
1325 'struct gdb_breakpoint *'.
1326 (clear_breakpoint_commands): Likewise.
1327 (clear_breakpoint_conditions_and_commands): Likewise.
1328 (add_condition_to_breakpoint): Likewise.
1329 (add_breakpoint_condition): Likewise.
1330 (add_commands_to_breakpoint): Likewise.
1331 (check_breakpoints): Check other_breakpoint.
1332 (clone_one_breakpoint): Clone breakpopint according to its type.
1333 * mem-break.h (struct gdb_breakpoint): Declare.
1334 (set_gdb_breakpoint): Update declaration.
1335 (clear_breakpoint_conditions_and_commands): Likewise.
1336 (add_breakpoint_condition): Likewise.
1337 (add_breakpoint_commands): Likewise.
1338 * server.c (process_point_options): Change parameter type to
1339 'struct gdb_breakpoint *'.
1340
811f8301
YQ
13412016-07-21 Yao Qi <yao.qi@linaro.org>
1342
1343 * mem-break.c (set_breakpoint_at): Rename it to ...
1344 (set_breakpoint_type_at): ... it.
1345 (set_breakpoint_at): Call set_breakpoint_type_at.
1346 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1347 * mem-break.h (set_breakpoint_at): Update comments.
1348
b1c51e36
CLT
13492016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1350
1351 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1352 to buf parameter.
1353 (nios2_store_gregset): Likewise.
1354
ced2dffb
PA
13552016-07-01 Pedro Alves <palves@redhat.com>
1356 Antoine Tremblay <antoine.tremblay@ericsson.com>
1357
1358 * linux-low.c: Change interface to take the target lwp_info
1359 pointer directly and return void. Handle detaching from a zombie
1360 thread.
1361 (linux_detach_lwp_callback): New function.
1362 (linux_detach): Detach from the leader thread after detaching from
1363 the clone threads.
1364
2ac09a5b
YQ
13652016-06-28 Yao Qi <yao.qi@linaro.org>
1366
1367 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1368 for variable new_offset.
1369 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1370 (aarch64_ftrace_insn_reloc_cb): Likewise.
1371 (aarch64_ftrace_insn_reloc_tb): Likewise.
1372 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1373 PRIx64 instead of PRIx32.
1374
79e7fd4f
YQ
13752016-06-28 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1378 (the_low_target): Install arm_get_syscall_trapinfo.
1379
061fc021
YQ
13802016-06-28 Yao Qi <yao.qi@linaro.org>
1381
1382 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1383 function.
1384 (the_low_target): Install aarch64_get_syscall_trapinfo.
1385
4cc32bec
YQ
13862016-06-28 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1389 Callers updated.
1390 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1391 Remove parameter sysno.
1392 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1393 sysret.
1394
782c1122
AA
13952016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1396
1397 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1398 (s390_emit_ne_goto): Likewise.
1399 (s390_emit_lt_goto): Likewise.
1400 (s390_emit_le_goto): Likewise.
1401 (s390_emit_gt_goto): Likewise.
1402 (s390_emit_ge_goto): Likewise.
1403 (s390x_emit_eq_goto): Likewise.
1404 (s390x_emit_ne_goto): Likewise.
1405 (s390x_emit_lt_goto): Likewise.
1406 (s390x_emit_le_goto): Likewise.
1407 (s390x_emit_gt_goto): Likewise.
1408 (s390x_emit_ge_goto): Likewise.
1409 (s390_emit_ops_impl): Mark variable static.
1410 (s390x_emit_ops): Likewise.
1411
2e7b624b
YQ
14122016-06-17 Yao Qi <yao.qi@linaro.org>
1413
1414 * linux-low.c (handle_extended_wait): Call
1415 uninsert_reinsert_breakpoints for the parent process. Remove
1416 reinsert breakpoints from the child process. Reinsert them to
1417 the parent process when vfork is done.
1418 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1419 (reinsert_reinsert_breakpoints): New function.
1420 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1421 (reinsert_reinsert_breakpoints): Declare.
1422
8a81c5d7
YQ
14232016-06-17 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-low.c (handle_extended_wait): If the parent is doing
1426 step-over, remove the reinsert breakpoints from the forked child.
1427
f50bf8e5
YQ
14282016-06-17 Yao Qi <yao.qi@linaro.org>
1429
1430 * linux-low.c (unsuspend_all_lwps): Declare.
1431 (linux_low_filter_event): If thread exited, call finish_step_over.
1432 If step-over is finished, unsuspend other threads.
1433
8376a3cb
YQ
14342016-06-17 Yao Qi <yao.qi@linaro.org>
1435
1436 * linux-low.c (linux_resume_one_lwp_throw): Assert
1437 has_reinsert_breakpoints returns false.
1438 * mem-break.c (delete_disabled_breakpoints): Assert
1439 bp type isn't reinsert_breakpoint.
1440
f79b145d
YQ
14412016-06-17 Yao Qi <yao.qi@linaro.org>
1442
1443 * linux-low.c (maybe_hw_step): New function.
1444 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1445 (finish_step_over): Switch current_thread to lwp temporarily,
1446 and assert has_reinsert_breakpoints returns true.
1447 (proceed_one_lwp): Call maybe_hw_step.
1448 * mem-break.c (has_reinsert_breakpoints): New function.
1449 * mem-break.h (has_reinsert_breakpoints): Declare.
1450
0ae534d2
JT
14512016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1452
1453 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1454
fcdad592
YQ
14552016-05-17 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1458 instead of find_inferior.
1459
9e784964
YQ
14602016-05-05 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1463 Initialize res to zero.
1464
cf2ebb6e
YQ
14652016-05-05 Yao Qi <yao.qi@linaro.org>
1466
1467 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1468 to uint32_t.
1469
c1aebf87
UW
14702016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1471
1472 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1473 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1474 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1475
35fd2deb 14762016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1477 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1478
1479 * tracepoint.c (write_inferior_int8): New function.
1480 (cmd_qtenable_disable): Write enable flag using
1481 write_inferior_int8.
1482
484b3c32
YQ
14832016-04-25 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1486 (need_step_over_p): Return zero if the LWP has pending signals
1487 can be delivered on software single step target.
1488
85ba7d86
YQ
14892016-04-25 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1492 return instead of error.
1493
3539aa13
YQ
14942016-04-22 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1497 to 23.
1498
5b061e98
YQ
14992016-04-22 Yao Qi <yao.qi@linaro.org>
1500
1501 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1502 signal when stepping over breakpoint with software single
1503 step.
1504
3451269c
PA
15052016-04-21 Pedro Alves <palves@redhat.com>
1506
1507 * linux-s390-low.c (s390_collect_ptrace_register)
1508 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1509 add casts.
1510 (s390_check_regset): Use void * instead of gdb_byte *.
1511
a2358508
PA
15122016-04-20 Pedro Alves <palves@redhat.com>
1513
1514 * configure: Renegerate.
1515
6885166d
YQ
15162016-04-20 Yao Qi <yao.qi@linaro.org>
1517
1518 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1519 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1520 number 16.
1521 (arm_store_gregset): Likewise.
1522
2b863f51
WT
15232016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1524
1525 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1526 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1527 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1528 (amd64-avx-mpx-linux.c): New rules.
1529 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1530 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1531 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1532 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1533 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1534 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1535 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1536 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1537 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1538 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1539 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1540 * linux-x86-low.c (x86_linux_read_description): Add case for
1541 X86_XSTATE_AVX_MPX_MASK.
1542 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1543 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1544 init_registers_i386_avx_mpx_linux.
1545 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1546 (initialize_low_tracepoint): Call
1547 init_registers_i386_avx_mpx_linux.
1548 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1549 (initialize_low_tracepoint): Call
1550 init_registers_amd64_avx_mpx_linux.
1551 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1552 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1553 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1554 declarations.
1555
9b30624b
PA
15562016-04-18 Pedro Alves <palves@redhat.com>
1557
1558 * configure: Regenerate.
1559
45e3745e
AT
15602016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1561
1562 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1563 (aarch64_emit_sub): Likewise.
1564
2afc13ff
PA
15652016-04-12 Pedro Alves <palves@redhat.com>
1566
1567 * utils.c (prepare_to_throw_exception): Delete.
1568
6e774b13
SM
15692016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1570
1571 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1572
4dca19f8
MK
15732016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1574
1575 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1576
d0a9981f
MK
15772016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1578
1579 * linux-aarch64-ipa.c: Add <elf.h> include.
1580 * linux-ppc-ipa.c: Add <elf.h> include.
1581 * linux-s390-ipa.c: Add <elf.h> include.
1582
252db07e
MK
15832016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1584
1585 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1586 (get_raw_reg_ptr): Likewise.
1587 (get_trace_state_variable_value_ptr): Likewise.
1588 (set_trace_state_variable_value_ptr): Likewise.
1589 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1590 char *.
1591
14e2b6d9
MK
15922016-03-31 Wei-cheng Wang <cole945@gmail.com>
1593 Marcin Kościelnicki <koriakin@0x04.net>
1594
1595 PR/17221
1596 * linux-ppc-low.c (emit_insns): New function.
1597 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1598 (ppc_emit_prologue): New function.
1599 (ppc_emit_epilogue): New function.
1600 (ppc_emit_add): New function.
1601 (ppc_emit_sub): New function.
1602 (ppc_emit_mul): New function.
1603 (ppc_emit_lsh): New function.
1604 (ppc_emit_rsh_signed): New function.
1605 (ppc_emit_rsh_unsigned): New function.
1606 (ppc_emit_ext): New function.
1607 (ppc_emit_zero_ext): New function.
1608 (ppc_emit_log_not): New function.
1609 (ppc_emit_bit_and): New function.
1610 (ppc_emit_bit_or): New function.
1611 (ppc_emit_bit_xor): New function.
1612 (ppc_emit_bit_not): New function.
1613 (ppc_emit_equal): New function.
1614 (ppc_emit_less_signed): New function.
1615 (ppc_emit_less_unsigned): New function.
1616 (ppc_emit_ref): New function.
1617 (ppc_emit_const): New function.
1618 (ppc_emit_reg): New function.
1619 (ppc_emit_pop): New function.
1620 (ppc_emit_stack_flush): New function.
1621 (ppc_emit_swap): New function.
1622 (ppc_emit_stack_adjust): New function.
1623 (ppc_emit_call): New function.
1624 (ppc_emit_int_call_1): New function.
1625 (ppc_emit_void_call_2): New function.
1626 (ppc_emit_if_goto): New function.
1627 (ppc_emit_goto): New function.
1628 (ppc_emit_eq_goto): New function.
1629 (ppc_emit_ne_goto): New function.
1630 (ppc_emit_lt_goto): New function.
1631 (ppc_emit_le_goto): New function.
1632 (ppc_emit_gt_goto): New function.
1633 (ppc_emit_ge_goto): New function.
1634 (ppc_write_goto_address): New function.
1635 (ppc_emit_ops_impl): New static variable.
1636 (ppc64v1_emit_prologue): New function.
1637 (ppc64v2_emit_prologue): New function.
1638 (ppc64_emit_epilogue): New function.
1639 (ppc64_emit_add): New function.
1640 (ppc64_emit_sub): New function.
1641 (ppc64_emit_mul): New function.
1642 (ppc64_emit_lsh): New function.
1643 (ppc64_emit_rsh_signed): New function.
1644 (ppc64_emit_rsh_unsigned): New function.
1645 (ppc64_emit_ext): New function.
1646 (ppc64_emit_zero_ext): New function.
1647 (ppc64_emit_log_not): New function.
1648 (ppc64_emit_bit_and): New function.
1649 (ppc64_emit_bit_or): New function.
1650 (ppc64_emit_bit_xor): New function.
1651 (ppc64_emit_bit_not): New function.
1652 (ppc64_emit_equal): New function.
1653 (ppc64_emit_less_signed): New function.
1654 (ppc64_emit_less_unsigned): New function.
1655 (ppc64_emit_ref): New function.
1656 (ppc64_emit_const): New function.
1657 (ppc64v1_emit_reg): New function.
1658 (ppc64v2_emit_reg): New function.
1659 (ppc64_emit_pop): New function.
1660 (ppc64_emit_stack_flush): New function.
1661 (ppc64_emit_swap): New function.
1662 (ppc64v1_emit_call): New function.
1663 (ppc64v2_emit_call): New function.
1664 (ppc64v1_emit_int_call_1): New function.
1665 (ppc64v2_emit_int_call_1): New function.
1666 (ppc64v1_emit_void_call_2): New function.
1667 (ppc64v2_emit_void_call_2): New function.
1668 (ppc64_emit_if_goto): New function.
1669 (ppc64_emit_eq_goto): New function.
1670 (ppc64_emit_ne_goto): New function.
1671 (ppc64_emit_lt_goto): New function.
1672 (ppc64_emit_le_goto): New function.
1673 (ppc64_emit_gt_goto): New function.
1674 (ppc64_emit_ge_goto): New function.
1675 (ppc64v1_emit_ops_impl): New static variable.
1676 (ppc64v2_emit_ops_impl): New static variable.
1677 (ppc_emit_ops): New function.
1678 (linux_low_target): Wire in ppc_emit_ops.
1679
a2174ba4
MK
16802016-03-31 Wei-cheng Wang <cole945@gmail.com>
1681 Marcin Kościelnicki <koriakin@0x04.net>
1682
1683 PR/17221
1684 * Makefile.in: Add powerpc-*-ipa.o
1685 * configure.srv: Add ipa_obj for powerpc*-linux.
1686 * linux-ppc-ipa.c: New file.
1687 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1688 includes.
1689 (PPC_FIELD): New macro.
1690 (PPC_SEXT): New macro.
1691 (PPC_OP6): New macro.
1692 (PPC_BO): New macro.
1693 (PPC_LI): New macro.
1694 (PPC_BD): New macro.
1695 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1696 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1697 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1698 (ppc_get_thread_area): New function.
1699 (is_elfv2_inferior): New function.
1700 (gen_ds_form): New function.
1701 (GEN_STD): New macro.
1702 (GEN_STDU): New macro.
1703 (GEN_LD): New macro.
1704 (GEN_LDU): New macro.
1705 (gen_d_form): New function.
1706 (GEN_ADDI): New macro.
1707 (GEN_ADDIS): New macro.
1708 (GEN_LI): New macro.
1709 (GEN_LIS): New macro.
1710 (GEN_ORI): New macro.
1711 (GEN_ORIS): New macro.
1712 (GEN_LWZ): New macro.
1713 (GEN_STW): New macro.
1714 (GEN_STWU): New macro.
1715 (gen_xfx_form): New function.
1716 (GEN_MFSPR): New macro.
1717 (GEN_MTSPR): New macro.
1718 (GEN_MFCR): New macro.
1719 (GEN_MTCR): New macro.
1720 (GEN_SYNC): New macro.
1721 (GEN_LWSYNC): New macro.
1722 (gen_x_form): New function.
1723 (GEN_OR): New macro.
1724 (GEN_MR): New macro.
1725 (GEN_LWARX): New macro.
1726 (GEN_STWCX): New macro.
1727 (GEN_CMPW): New macro.
1728 (gen_md_form): New function.
1729 (GEN_RLDICL): New macro.
1730 (GEN_RLDICR): New macro.
1731 (gen_i_form): New function.
1732 (GEN_B): New macro.
1733 (GEN_BL): New macro.
1734 (gen_b_form): New function.
1735 (GEN_BNE): New macro.
1736 (GEN_LOAD): New macro.
1737 (GEN_STORE): New macro.
1738 (gen_limm): New function.
1739 (gen_atomic_xchg): New function.
1740 (gen_call): New function.
1741 (ppc_relocate_instruction): New function.
1742 (ppc_install_fast_tracepoint_jump_pad): New function.
1743 (ppc_get_min_fast_tracepoint_insn_len): New function.
1744 (ppc_get_ipa_tdesc_idx): New function.
1745 (the_low_target): Wire in the new functions.
1746 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1747 tdescs.
1748 * linux-ppc-tdesc.h: New file.
1749
a13c4696
MK
17502016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1751
1752 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1753 (alloc_jump_pad_buffer): New function.
1754 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1755 (alloc_jump_pad_buffer): New function.
1756 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1757 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1758 (alloc_jump_pad_buffer): New function.
1759 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1760 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1761 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1762 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1763
1cda1512
MK
17642016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1765
1766 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1767 * linux-amd64-ipa.c: Likewise.
1768 * linux-i386-ipa.c: Likewise.
1769 * linux-s390-ipa.c: Likewise.
1770 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1771 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1772 set_trace_state_variable_value_ptr.
1773 (struct ipa_sym_addresses): Likewise.
1774 (symbol_list): Likewise.
1775 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1776 accessing gdb_collect directly.
1777 (gdb_collect_ptr_type): New typedef.
1778 (get_raw_reg_ptr_type): New typedef.
1779 (get_trace_state_variable_value_ptr_type): New typedef.
1780 (set_trace_state_variable_value_ptr_type): New typedef.
1781 (gdb_collect_ptr): New global.
1782 (get_raw_reg_ptr): New global.
1783 (get_trace_state_variable_value_ptr): New global.
1784 (set_trace_state_variable_value_ptr): New global.
1785 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1786 accessing get_raw_reg directly.
1787 (get_get_tsv_func_addr): Likewise for
1788 get_trace_state_variable_value_ptr.
1789 (get_set_tsv_func_addr): Likewise for
1790 set_trace_state_variable_value_ptr.
1791 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1792
72fb5488
SM
17932016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1794
1795 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1796
28170b88
MK
17972016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1798
1799 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1800 packets.
1801 (relocate_instruction): Remove own_buf.
1802 * server.c (own_buf): Make global.
1803 (handle_v_requests): Make global.
1804 * server.h (own_buf): New declaration.
1805 (handle_v_requests): New prototype.
1806
f39e8743
MK
18072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1808
1809 PR 18377
1810 * linux-s390-low.c (add_insns): New function.
1811 (s390_emit_prologue): New function.
1812 (s390_emit_epilogue): New function.
1813 (s390_emit_add): New function.
1814 (s390_emit_sub): New function.
1815 (s390_emit_mul): New function.
1816 (s390_emit_lsh): New function.
1817 (s390_emit_rsh_signed): New function.
1818 (s390_emit_rsh_unsigned): New function.
1819 (s390_emit_ext): New function.
1820 (s390_emit_log_not): New function.
1821 (s390_emit_bit_and): New function.
1822 (s390_emit_bit_or): New function.
1823 (s390_emit_bit_xor): New function.
1824 (s390_emit_bit_not): New function.
1825 (s390_emit_equal): New function.
1826 (s390_emit_less_signed): New function.
1827 (s390_emit_less_unsigned): New function.
1828 (s390_emit_ref): New function.
1829 (s390_emit_if_goto): New function.
1830 (s390_emit_goto): New function.
1831 (s390_write_goto_address): New function.
1832 (s390_emit_litpool): New function.
1833 (s390_emit_const): New function.
1834 (s390_emit_call): New function.
1835 (s390_emit_reg): New function.
1836 (s390_emit_pop): New function.
1837 (s390_emit_stack_flush): New function.
1838 (s390_emit_zero_ext): New function.
1839 (s390_emit_swap): New function.
1840 (s390_emit_stack_adjust): New function.
1841 (s390_emit_set_r2): New function.
1842 (s390_emit_int_call_1): New function.
1843 (s390_emit_void_call_2): New function.
1844 (s390_emit_eq_goto): New function.
1845 (s390_emit_ne_goto): New function.
1846 (s390_emit_lt_goto): New function.
1847 (s390_emit_le_goto): New function.
1848 (s390_emit_gt_goto): New function.
1849 (s390_emit_ge_goto): New function.
1850 (s390x_emit_prologue): New function.
1851 (s390x_emit_epilogue): New function.
1852 (s390x_emit_add): New function.
1853 (s390x_emit_sub): New function.
1854 (s390x_emit_mul): New function.
1855 (s390x_emit_lsh): New function.
1856 (s390x_emit_rsh_signed): New function.
1857 (s390x_emit_rsh_unsigned): New function.
1858 (s390x_emit_ext): New function.
1859 (s390x_emit_log_not): New function.
1860 (s390x_emit_bit_and): New function.
1861 (s390x_emit_bit_or): New function.
1862 (s390x_emit_bit_xor): New function.
1863 (s390x_emit_bit_not): New function.
1864 (s390x_emit_equal): New function.
1865 (s390x_emit_less_signed): New function.
1866 (s390x_emit_less_unsigned): New function.
1867 (s390x_emit_ref): New function.
1868 (s390x_emit_if_goto): New function.
1869 (s390x_emit_const): New function.
1870 (s390x_emit_call): New function.
1871 (s390x_emit_reg): New function.
1872 (s390x_emit_pop): New function.
1873 (s390x_emit_stack_flush): New function.
1874 (s390x_emit_zero_ext): New function.
1875 (s390x_emit_swap): New function.
1876 (s390x_emit_stack_adjust): New function.
1877 (s390x_emit_int_call_1): New function.
1878 (s390x_emit_void_call_2): New function.
1879 (s390x_emit_eq_goto): New function.
1880 (s390x_emit_ne_goto): New function.
1881 (s390x_emit_lt_goto): New function.
1882 (s390x_emit_le_goto): New function.
1883 (s390x_emit_gt_goto): New function.
1884 (s390x_emit_ge_goto): New function.
1885 (s390_emit_ops): New function.
1886 (struct linux_target_ops): Fill in emit_ops hook.
1887
abd9baf9
MK
18882016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1889
1890 PR 18377
1891 * Makefile.in: Add s390 IPA files.
1892 * configure.srv: Build IPA for s390.
1893 * linux-s390-ipa.c: New file.
1894 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1895 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1896 (tdesc_s390_linux32): Likewise.
1897 (init_registers_s390_linux32v1): Likewise.
1898 (tdesc_s390_linux32v1): Likewise.
1899 (init_registers_s390_linux32v2): Likewise.
1900 (tdesc_s390_linux32v2): Likewise.
1901 (init_registers_s390_linux64): Likewise.
1902 (tdesc_s390_linux64): Likewise.
1903 (init_registers_s390_linux64v1): Likewise.
1904 (tdesc_s390_linux64v1): Likewise.
1905 (init_registers_s390_linux64v2): Likewise.
1906 (tdesc_s390_linux64v2): Likewise.
1907 (init_registers_s390_te_linux64): Likewise.
1908 (tdesc_s390_te_linux64): Likewise.
1909 (init_registers_s390_vx_linux64): Likewise.
1910 (tdesc_s390_vx_linux64): Likewise.
1911 (init_registers_s390_tevx_linux64): Likewise.
1912 (tdesc_s390_tevx_linux64): Likewise.
1913 (init_registers_s390x_linux64): Likewise.
1914 (tdesc_s390x_linux64): Likewise.
1915 (init_registers_s390x_linux64v1): Likewise.
1916 (tdesc_s390x_linux64v1): Likewise.
1917 (init_registers_s390x_linux64v2): Likewise.
1918 (tdesc_s390x_linux64v2): Likewise.
1919 (init_registers_s390x_te_linux64): Likewise.
1920 (tdesc_s390x_te_linux64): Likewise.
1921 (init_registers_s390x_vx_linux64): Likewise.
1922 (tdesc_s390x_vx_linux64): Likewise.
1923 (init_registers_s390x_tevx_linux64): Likewise.
1924 (tdesc_s390x_tevx_linux64): Likewise.
1925 (have_hwcap_s390_vx): New static variable.
1926 (s390_arch_setup): Fill have_hwcap_s390_vx.
1927 (s390_get_thread_area): New function.
1928 (s390_ft_entry_gpr_esa): New const.
1929 (s390_ft_entry_gpr_zarch): New const.
1930 (s390_ft_entry_misc): New const.
1931 (s390_ft_entry_fr): New const.
1932 (s390_ft_entry_vr): New const.
1933 (s390_ft_main_31): New const.
1934 (s390_ft_main_64): New const.
1935 (s390_ft_exit_fr): New const.
1936 (s390_ft_exit_vr): New const.
1937 (s390_ft_exit_misc): New const.
1938 (s390_ft_exit_gpr_esa): New const.
1939 (s390_ft_exit_gpr_zarch): New const.
1940 (append_insns): New function.
1941 (s390_relocate_instruction): New function.
1942 (s390_install_fast_tracepoint_jump_pad): New function.
1943 (s390_get_min_fast_tracepoint_insn_len): New function.
1944 (s390_get_ipa_tdesc_idx): New function.
1945 (struct linux_target_ops): Wire in the above functions.
1946 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1947 * linux-s390-tdesc.h: New file.
1948
a4105d04
MK
19492016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1950
1951 * linux-s390-low.c (s390_supports_tracepoints): New function.
1952 (struct linux_target_ops): Fill supports_tracepoints hook.
1953
35ac8b3e
YQ
19542016-03-18 Yao Qi <yao.qi@linaro.org>
1955
1956 * linux-low.c (lwp_signal_can_be_delivered): New function.
1957 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1958
94610ec4
YQ
19592016-03-18 Yao Qi <yao.qi@linaro.org>
1960
1961 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1962 0 if signal is enqueued. Remove 'signal' from one debugging
1963 message. Move one debugging message to some lines below.
1964 Remove code setting 'signal' to 0.
1965
80aea927
YQ
19662016-03-18 Yao Qi <yao.qi@linaro.org>
1967
1968 * linux-low.c (linux_low_filter_event): Remove redundant
1969 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1970
b04fd3be
MK
19712016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1972
1973 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1974 (struct linux_target_ops): Wire in the above.
1975
c40c8d4b
YQ
19762016-03-03 Yao Qi <yao.qi@linaro.org>
1977
1978 * linux-low.c: Update comments to start_step_over.
1979
0f8288ae
YQ
19802016-03-03 Yao Qi <yao.qi@linaro.org>
1981
1982 PR server/19736
1983 * linux-low.c (handle_extended_wait): Set child suspended
1984 if event_lwp->bp_reinsert isn't zero.
1985
fdbd04a8
YQ
19862016-03-02 Yao Qi <yao.qi@linaro.org>
1987
1988 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1989 enqueue_pending_signal.
1990
6896a8fa
MK
19912016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1992
1993 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1994 is actually loaded.
1995
ab503087
MK
19962016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1999 (s390_regmap_3264) [!__s390x__]: New global.
2000 (s390_collect_ptrace_register): Skip map entries containing -1.
2001 (s390_supply_ptrace_register): Ditto.
2002 (s390_fill_gprs_high): New function.
2003 (s390_store_gprs_high): New function.
2004 (s390_regsets): Add NT_S390_HIGH_GPRS.
2005 (s390_get_hwcap): Enable on 31-bit.
2006 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2007 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2008 Detect NT_S390_HIGH_GPRS.
2009 (s390_usrregs_info_3264): Enable on 31-bit.
2010 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2011 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2012
ae91f625
MK
20132016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2014
2015 PR gdb/13808
2016 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2017 * configure.srv: Ditto.
2018 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2019 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2020 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2021 (init_registers_amd64_linux): Remove prototype.
2022 (tdesc_amd64_linux): Remove declaration.
2023 (get_ipa_tdesc): New function.
2024 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2025 initialize remaining tdescs.
2026 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2027 (init_registers_i386_linux): Remove prototype.
2028 (tdesc_i386_linux): Remove declaration.
2029 (get_ipa_tdesc): New function.
2030 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2031 initialize remaining tdescs.
2032 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2033 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2034 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2035 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2036 (x86_get_ipa_tdesc_idx): New function.
2037 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2038 * linux-x86-tdesc.h: New file.
2039 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2040 (target_get_ipa_tdesc_idx): New macro.
2041 * tracepoint.c (ipa_tdesc_idx): New macro.
2042 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2043 (symbol_list): Add ipa_tdesc_idx.
2044 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2045 (ipa_tdesc): Remove.
2046 (ipa_tdesc_idx): New variable.
2047 (get_context_regcache): Use get_ipa_tdesc.
2048 (gdb_collect): Ditto.
2049 (gdb_probe): Ditto.
2050 * tracepoint.h (get_ipa_tdesc): New prototype.
2051 (ipa_tdesc): Remove.
2052
e7ad2f14
PA
20532016-02-24 Pedro Alves <palves@redhat.com>
2054
2055 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2056 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2057 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2058 Factor out common code between the USE_SIGTRAP_SIGINFO and
2059 !USE_SIGTRAP_SIGINFO blocks.
2060 (linux_low_filter_event): Call save_stop_reason instead of
2061 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2062 Update comments.
2063 (linux_wait_1): Update comments.
2064
657f9cde
WW
20652016-02-24 Wei-cheng Wang <cole945@gmail.com>
2066
2067 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2068 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2069 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2070 ppc_insert_point, ppc_remove_point.
2071
b00b61e1
MK
20722016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2073
2074 * linux-s390-low.c (s390_supports_z_point_type): New function.
2075 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2076
553cb527
YQ
20772016-02-16 Yao Qi <yao.qi@linaro.org>
2078
2079 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2080 PC. Get pc from regcache_read_pc.
2081
a5652c21
YQ
20822016-02-12 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2085 or linux_get_pc_32bit.
2086 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2087
ed443b61
YQ
20882016-02-12 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2091 arm_linux_get_next_pcs_fixup.
2092
020ecd38
MK
20932016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2094
2095 * tracepoint.c (x_tracepoint_action_download): Change
2096 write_inferior_data_ptr to write_inferior_data_pointer.
2097 (cmd_qtstart): Likewise.
2098 (write_inferior_data_ptr): Remove.
2099 (download_agent_expr): Change write_inferior_data_ptr to
2100 write_inferior_data_pointer.
2101 (download_tracepoint_1): Likewise.
2102 (download_tracepoint): Likewise.
2103 (download_trace_state_variables): Likewise.
2104
7cae9051
WW
21052016-02-11 Wei-cheng Wang <cole945@gmail.com>
2106 Marcin Kościelnicki <koriakin@0x04.net>
2107
2108 * tracepoint.c (struct tracepoint_action_ops): Remove.
2109 (struct tracepoint_action): Remove ops.
2110 (m_tracepoint_action_download, r_tracepoint_action_download)
2111 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2112 size and offset accordingly.
2113 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2114 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2115 (tracepoint_action_send, tracepoint_action_download): New functions.
2116 Helpers for trace action handlers.
2117 (add_tracepoint_action): Remove setup actions ops.
2118 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2119
9f6a71b4
YQ
21202016-02-10 Yao Qi <yao.qi@linaro.org>
2121
2122 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2123
1e94266c
SM
21242016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2125
2126 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2127 to AC_OUTPUT.
2128 * configure: Regenerate.
2129
8adce034
SM
21302016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2131
2132 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2133 void * to gdb_byte *.
2134 * linux-low.c (siginfo_fixup): Likewise.
2135 (linux_xfer_siginfo): Likewise.
2136 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2137 Likewise.
2138 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2139
93813b37
WT
21402016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2141
2142 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2143 to srv_tgtobj.
2144 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2145 to srv_tgtobj.
2146 * linux-x86-low.c [__x86_64__]: Include
2147 "nat/amd64-linux-siginfo.h".
2148 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2149 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2150 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2151 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2152 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2153 (cpt_si_fd, si_timerid, si_overrun): Move from
2154 nat/amd64-linux-siginfo.c.
2155 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2156
8424cc97
SM
21572016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2158
2159 * server.c (skip_to_semicolon): Remove.
2160 (process_point_options): Use strchrnul instead of
2161 skip_to_semicolon.
2162
4d18591b
YQ
21632016-01-26 Yao Qi <yao.qi@linaro.org>
2164
2165 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2166 * linux-low.c (install_software_single_step_breakpoints): Don't
2167 call regcache_read_pc.
2168 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2169 argument pc.
2170
d8020970
YQ
21712016-01-26 Yao Qi <yao.qi@linaro.org>
2172
2173 * linux-low.c (install_software_single_step_breakpoints): Call
2174 regcache_read_pc instead of get_pc.
2175
8b207339
YQ
21762016-01-26 Yao Qi <yao.qi@linaro.org>
2177
2178 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2179 (unblock_async_io): Rename to ...
2180 (block_unblock_async_io): ... it. New function.
2181 (enable_async_io): Don't install SIGIO handler. Unblock it
2182 instead.
2183 (disable_async_io): Don't ignore SIGIO. Block it instead.
2184 (initialize_async_io): Install SIGIO handler. Don't call
2185 unblock_async_io.
2186
18879fef
YQ
21872016-01-26 Yao Qi <yao.qi@linaro.org>
2188
2189 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2190 first character is '\003', call *the_target->request_interrupt.
2191
a0f8e08a
YQ
21922016-01-25 Yao Qi <yao.qi@linaro.org>
2193
2194 * remote-utils.c (new_thread_notify): Remove.
2195 (dead_thread_notify): Likewise.
2196 * remote-utils.h (new_thread_notify): Remove declaration.
2197 (dead_thread_notify): Likewise.
2198
cc5fd9ab
MK
21992016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2200
2201 * gdb.trace/pending.exp: Fix expected message on continue.
2202
99e8eb11
MK
22032016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2206 it works properly on big-endian machines where sizeof (CORE_ADDR)
2207 != sizeof (void *).
2208
a994041d
PA
22092016-01-21 Pedro Alves <palves@redhat.com>
2210
2211 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2212 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2213 * configure: Regenerate.
2214
f7a6a40d
YQ
22152016-01-21 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2218 is_thumb and set it according to CPSR saved on the stack.
2219 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2220 arm_sigreturn_next_pc.
2221
6f69e520
YQ
22222016-01-18 Yao Qi <yao.qi@linaro.org>
2223
2224 * linux-low.c (linux_set_pc_64bit): New function.
2225 (linux_get_pc_64bit): New function.
2226 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2227 Declare.
2228 * linux-sparc-low.c (debug_threads): Remove declaration.
2229 (sparc_get_pc): Remove.
2230 (the_low_target): Use linux_get_pc_64bit instead of
2231 sparc_get_pc.
2232 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2233 (the_low_target): Use linux_get_pc_64bit and
2234 linux_set_pc_64bit.
2235
276d4552
YQ
22362016-01-18 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-arm-low.c (debug_threads): Remove declaration.
2239 (arm_get_pc, arm_set_pc): Remove.
2240 (the_low_target): Use linux_get_pc_32bit and
2241 linux_set_pc_32bit.
2242 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2243 (the_low_target): Use linux_get_pc_32bit and
2244 linux_set_pc_32bit.
2245 * linux-cris-low.c (debug_threads): Remove declaration.
2246 (cris_get_pc, cris_set_pc,): Remove.
2247 (the_low_target): Use linux_get_pc_32bit and
2248 linux_set_pc_32bit.
2249 * linux-crisv32-low.c (debug_threads): Remove declaration.
2250 (cris_get_pc, cris_set_pc): Remove.
2251 (the_low_target): Use linux_get_pc_32bit and
2252 linux_set_pc_32bit.
2253 * linux-low.c: Include inttypes.h.
2254 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2255 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2256 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2257 (the_low_target): Use linux_get_pc_32bit and
2258 linux_set_pc_32bit.
2259 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2260 (the_low_target): Use linux_get_pc_32bit and
2261 linux_set_pc_32bit.
2262 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2263 (the_low_target): Use linux_get_pc_32bit and
2264 linux_set_pc_32bit.
2265 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2266 (the_low_target): Use linux_get_pc_32bit and
2267 linux_set_pc_32bit.
2268 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2269 (the_low_target): Use linux_get_pc_32bit and
2270 linux_set_pc_32bit.
2271
eb0edac8
GB
22722016-01-18 Gary Benson <gbenson@redhat.com>
2273
2274 * configure.ac (AC_FUNC_FORK): New check.
2275 * config.in: Regenerate.
2276 * configure: Likewise.
2277
1b451dda
YQ
22782016-01-14 Yao Qi <yao.qi@linaro.org>
2279
2280 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2281 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2282 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2283 arm_get_next_pcs_ctor.
2284
82075af2
JS
22852016-01-12 Josh Stone <jistone@redhat.com>
2286 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2287
2288 * inferiors.h: Include "gdb_vecs.h".
2289 (struct process_info): Add syscalls_to_catch.
2290 * inferiors.c (remove_process): Free syscalls_to_catch.
2291 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2292 syscall_return stops.
2293 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2294 * server.c (handle_general_set): Handle QCatchSyscalls.
2295 (handle_query): Report support for QCatchSyscalls.
2296 * target.h (struct target_ops): Add supports_catch_syscall.
2297 (target_supports_catch_syscall): New macro.
2298 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2299 (struct lwp_info): Add syscall_state.
2300 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2301 Maintain syscall_state and syscalls_to_catch across exec.
2302 (get_syscall_trapinfo): New function, proxy to the_low_target.
2303 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2304 (linux_low_filter_event): Toggle syscall_state entry/return for
2305 syscall traps, and set it ignored for all others.
2306 (gdb_catching_syscalls_p): New function.
2307 (gdb_catch_this_syscall_p): New function.
2308 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2309 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2310 (linux_supports_catch_syscall): New function.
2311 (linux_target_ops): Install it.
2312 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2313 (the_low_target): Install it.
2314
8f13a3ce
MF
23152016-01-12 Mike Frysinger <vapier@gentoo.org>
2316
2317 * acinclude.m4: Include new ../warning.m4 file.
2318 * configure: Regenerated.
2319 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2320
5b3da067
MF
23212016-01-12 Mike Frysinger <vapier@gentoo.org>
2322
2323 * ax.c (is_goto_target): Mark static.
2324 * linux-low.c (register_addr): Likewise.
2325 (linux_fetch_registers, linux_store_registers): Likewise.
2326 * mem-break.c (any_persistent_commands): Fix old prototype.
2327 (add_commands_to_breakpoint): Mark static.
2328 * regcache.c (find_register_by_name): Delete unused func.
2329 * remote-utils.c (hex_or_minus_one): Mark static.
2330 * server.c (monitor_show_help): Mark static.
2331 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2332 handle_v_requests): Likewise.
2333
bc504a31
PA
23342016-01-12 Pedro Alves <palves@redhat.com>
2335
2336 Remove use of the registered trademark symbol throughout.
2337
5a0dd67a
YQ
23382016-01-08 Yao Qi <yao.qi@linaro.org>
2339
2340 * remote-utils.c (getpkt): If c is '\003', call target hook
2341 request_interrupt.
2342
b2ca446f
YQ
23432016-01-06 Yao Qi <yao.qi@linaro.org>
2344
2345 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2346 linux-aarch32-low.c.
2347 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2348 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2349 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2350 (thumb2_breakpoint): Declare.
2351 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2352 linux-aarch32-low.h.
2353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2354 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2355 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2356
edd88788
JB
23572016-01-01 Joel Brobecker <brobecker@adacore.com>
2358
2359 * gdbreplay.c (gdbreplay_version): Change copyright year in
2360 version message.
2361 * server.c (gdbserver_version): Likewise.
2362
65da7f14
PP
23632015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2364
2365 * server.c (crc32_table): Delete.
2366 (crc32): Use libiberty's xcrc32 function.
2367
4abd5ed2
JB
23682015-12-22 Joel Brobecker <brobecker@adacore.com>
2369
2370 * lynx-low.c (lynx_delete_thread_callback): New function.
2371 (lynx_mourn): Properly delete our process and all of its
2372 threads. Remove call to clear_inferiors.
2373
0e50fe5c
JB
23742015-12-22 Joel Brobecker <brobecker@adacore.com>
2375
2376 * target.c (thread_search_callback): Add check that
2377 the thread_stopped target callback is not NULL before
2378 calling it.
2379
35adc03f
YQ
23802015-12-21 Yao Qi <yao.qi@linaro.org>
2381
2382 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2383 arm breakpoint.
2384
bd2b2909
AT
23852015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2386
2387 * server.c (handle_query): Call target_supports_software_single_step.
2388
7fe5e27e
AT
23892015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2390
2391 * linux-low.c (single_step): New function.
2392 (linux_resume_one_lwp_throw): Call single_step.
2393 (start_step_over): Likewise.
2394
d9311bfa
AT
23952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2396
2397 * Makefile.in (SFILES): Append arch/arm-linux.c,
2398 arch/arm-get-next-pcs.c.
2399 (arm-linux.o): New rule.
2400 (arm-get-next-pcs.o): New rule.
2401 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2402 arm-linux.o.
2403 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2404 to linux-aarch32-low.c.
2405 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2406 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2407 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2408 (thumb2_breakpoint_len): Likewise.
2409 (arm_is_thumb_mode): Make non-static.
2410 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2411 from linux-aarch32-low.c.
2412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2415 (thumb2_breakpoint_len): Likewise.
2416 (arm_is_thumb_mode): New declaration.
2417 * linux-arm-low.c: Include arch/arm-linux.h
2418 aarch/arm-get-next-pcs.h, sys/syscall.h.
2419 (get_next_pcs_ops): New struct.
2420 (get_next_pcs_addr_bits_remove): New function.
2421 (get_next_pcs_is_thumb): New function.
2422 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2423 (arm_sigreturn_next_pc): Likewise.
2424 (get_next_pcs_syscall_next_pc): Likewise.
2425 (arm_gdbserver_get_next_pcs): Likewise.
2426 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2427 Initialize.
2428 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2429 * server.h: Include gdb_vecs.h.
2430
68ce2059
AT
24312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2432
2433 * Makefile.in (SFILES): Append common/common-regcache.c.
2434 (OBS): Append common-regcache.o.
2435 (common-regcache.o): New rule.
2436 * regcache.c (init_register_cache): Initialize cache to
2437 REG_UNAVAILABLE.
2438 (regcache_raw_read_unsigned): New function.
2439 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2440 register_status enum.
2441
fa5308bd
AT
24422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2443
2444 * linux-aarch64-low.c (the_low_targets): Rename
2445 breakpoint_reinsert_addr to get_next_pcs.
2446 * linux-arm-low.c (the_low_targets): Likewise.
2447 * linux-bfin-low.c (the_low_targets): Likewise.
2448 * linux-cris-low.c (the_low_targets): Likewise.
2449 * linux-crisv32-low.c (the_low_targets): Likewise.
2450 * linux-low.c (can_software_single_step): Likewise.
2451 (install_software_single_step_breakpoints): New function.
2452 (start_step_over): Use install_software_single_step_breakpoints.
2453 * linux-low.h: New CORE_ADDR vector.
2454 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2455 get_next_pcs.
2456 * linux-mips-low.c (the_low_targets): Likewise.
2457 * linux-nios2-low.c (the_low_targets): Likewise.
2458 * linux-sparc-low.c (the_low_targets): Likewise.
2459
4a6ed09b
PA
24602015-12-17 Pedro Alves <palves@redhat.com>
2461
2462 * linux-low.c (linux_kill_one_lwp): Remove references to
2463 LinuxThreads.
2464 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2465 to 'kill'.
2466 (linux_init_signals): Delete.
2467 (initialize_low): Adjust.
2468 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2469
7544db95
PA
24702015-12-16 Pedro Alves <palves@redhat.com>
2471
2472 * configure.ac (compiler warning flags): When testing a
2473 -Wno-foo option, check whether -Wfoo works instead.
2474 * configure: Regenerate.
2475
8020350c
DB
24762015-12-11 Don Breazeal <donb@codesourcery.com>
2477
2478 * server.c (process_serial_event): Don't exit from gdbserver
2479 in remote mode if there are still active inferiors.
2480
db91f502
YQ
24812015-12-11 Yao Qi <yao.qi@linaro.org>
2482
2483 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2484 arm_breakpoint_at if the process is 32-bit.
2485
b37a6290
YQ
24862015-12-11 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2489 arm breakpoint.
2490
17b1509a
YQ
24912015-12-07 Yao Qi <yao.qi@linaro.org>
2492
2493 * configure.srv: Append arm.o to srv_tgtobj for
2494 aarch64*-*-linux* target.
2495 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2496 from linux-arm-low.c.
2497 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2498 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2499 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2500 (thumb2_breakpoint_len): Likewise.
2501 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2502 (arm_breakpoint_kinds): Likewise.
2503 (arm_breakpoint_kind_from_pc): Likewise.
2504 (arm_sw_breakpoint_from_kind): Likewise.
2505 (arm_breakpoint_kind_from_current_state): Likewise.
2506 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2507 (arm_sw_breakpoint_from_kind): Declare.
2508 (arm_breakpoint_kind_from_current_state): Declare.
2509 (arm_breakpoint_at): Declare.
2510 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2511 arm_sw_breakpoint_from_kind if process is 32-bit.
2512 (aarch64_breakpoint_kind_from_pc): New function.
2513 (aarch64_breakpoint_kind_from_current_state): New function.
2514 (the_low_target): Initialize fields breakpoint_kind_from_pc
2515 and breakpoint_kind_from_current_state.
2516 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2517 linux-aarch32-low.c.
2518 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2519 (arm_breakpoint, arm_breakpoint_len): Likewise.
2520 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2521 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2522 (arm_is_thumb_mode): Likewise.
2523 (arm_breakpoint_at): Likewise.
2524 (arm_breakpoint_kind_from_pc): Likewise.
2525 (arm_sw_breakpoint_from_kind): Likewise.
2526 (arm_breakpoint_kind_from_current_state): Likewise.
2527
2528 Revert:
2529 2015-08-04 Yao Qi <yao.qi@linaro.org>
2530
2531 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2532 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2533 * server.c (extended_protocol): Remove "static".
2534 * server.h (extended_protocol): Declare it.
2535
ece66d65
JS
25362015-12-04 Josh Stone <jistone@redhat.com>
2537
2538 * target.h (struct target_ops) <arch_setup>: Rename to ...
2539 (struct target_ops) <post_create_inferior>: ... this.
2540 (target_arch_setup): Rename to ...
2541 (target_post_create_inferior): ... this, calling post_create_inferior.
2542 * server.c (start_inferior): Update target_arch_setup calls to
2543 target_post_create_inferior.
2544 * linux-low.c (linux_low_ptrace_options): Forward declare.
2545 (linux_arch_setup): Update its comment for general use.
2546 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2547 (struct linux_target_ops): Use linux_post_create_inferior.
2548 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2549 to post_create_inferior.
2550 * nto-low.c (struct nto_target_ops): Likewise.
2551 * spu-low.c (struct spu_target_ops): Likewise.
2552 * win32-low.c (struct win32_target_ops): Likewise.
2553
e58c48b4
AT
25542015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555
2556 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2557
fbec8956
AT
25582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2559
2560 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2561 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2562 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2563 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2564 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2565 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2566 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2567 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2568 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2569 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2570 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2571 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2572
9b4c5f87
AT
25732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2574
2575 * linux-low.c (linux_look_up_symbols): Don't call
2576 linux_supports_traceclone.
2577 * linux-low.h (thread_db_init): Remove use_events argument.
2578 * thread-db.c (thread_db_use_event): Remove global variable.
2579 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2580 (struct thread_db) <td_create_bp>: Remove field.
2581 (thread_db_create_event): Remove function.
2582 (thread_db_enable_reporting): Likewise.
2583 (find_one_thread): Don't check for thread_db_use_events.
2584 (attach_thread): Likewise.
2585 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2586 (try_thread_db_load_1): Don't check for thread_db_use_events.
2587 (thread_db_init): Remove use_events argument and thread events
2588 handling.
2589 (remove_thread_event_breakpoints): Remove function.
2590 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2591
7d00775e
AT
25922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2593
2594 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2595 New function.
2596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2597 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2599 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2600 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2601 Initialize.
2602 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2603 New function.
2604 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2605 * linux-low.c (can_hardware_single_step): Use
2606 supports_hardware_single_step.
2607 (can_software_single_step): New function.
2608 (start_step_over): Call can_software_single_step.
2609 (linux_supports_hardware_single_step): New function.
2610 (struct target_ops) <supports_software_single_step>: Initialize.
2611 * linux-low.h (struct linux_target_ops)
2612 <supports_hardware_single_step>: Initialize.
2613 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2614 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2615 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2616 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2617 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2618 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2619 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2621 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2622 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2623 Initialize.
2624 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2625 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2626 Initialize.
2627 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2628 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2629 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2630 New function.
2631 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2632 * target.h (struct target_ops): <supports_software_single_step>:
2633 New field.
2634 (target_supports_software_single_step): New macro.
2635
2d97cd35
AT
26362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2637
2638 * linux-low.c (linux_wait_1): Fix pc advance condition.
2639 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2640 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2641
769ef81f
AT
26422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2643
2644 * linux-arm-low.c (arm_is_thumb_mode): New function.
2645 (arm_breakpoint_at): Use arm_is_thumb_mode.
2646 (arm_breakpoint_kind_from_current_state): New function.
2647 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2648 Initialize.
2649 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2650 (linux_breakpoint_kind_from_current_state): New function.
2651 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2652 * linux-low.h (struct linux_target_ops)
2653 <breakpoint_kind_from_current_state>: New field.
2654 * target.h (struct target_ops): Likewise.
2655 (target_breakpoint_kind_from_current_state): New macro.
2656
1bebeeca
PA
26572015-11-30 Pedro Alves <palves@redhat.com>
2658
2659 * linux-low.c (linux_resume): Wake up the event loop before
2660 returning.
2661
a67a9fae
PA
26622015-11-30 Pedro Alves <palves@redhat.com>
2663
2664 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2665 check.
2666 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2667 to -1.
2668 * target.c (struct thread_search): New structure.
2669 (thread_search_callback): New function.
2670 (prev_general_thread): New global.
2671 (prepare_to_access_memory, done_accessing_memory): New functions.
2672 * target.h (prepare_to_access_memory, done_accessing_memory):
2673 Replace macros with function declarations.
2674
f2faf941
PA
26752015-11-30 Pedro Alves <palves@redhat.com>
2676
2677 PR 14618
2678 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2679 report TARGET_WAITKIND_NO_RESUMED.
2680 * remote-utils.c (prepare_resume_reply): Handle
2681 TARGET_WAITKIND_NO_RESUMED.
2682 * server.c (report_no_resumed): New global.
2683 (handle_query) <qSupported>: Handle "no-resumed+". Report
2684 "no-resumed+" support.
2685 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2686 return error if the client doesn't support no-resumed events.
2687 (push_stop_notification): New function.
2688 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2689 events if the client supports them.
2690
a681f9c9
PA
26912015-11-30 Pedro Alves <palves@redhat.com>
2692
2693 * linux-low.c (thread_still_has_status_pending_p): Don't check
2694 vCont;t here.
2695 (lwp_resumed): New function.
2696 (status_pending_p_callback): Return early if the LWP is not
2697 supposed to be resumed.
2698
65706a29
PA
26992015-11-30 Pedro Alves <palves@redhat.com>
2700
2701 * linux-low.c (handle_extended_wait): Assert that the LWP's
2702 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2703 thread create events, leave the new child's status pending.
2704 (linux_low_filter_event): If GDB wants to hear about thread exit
2705 events, leave the LWP marked dead and don't delete it.
2706 (linux_wait_for_event_filtered): Don't check for thread exit.
2707 (filter_exit_event): New function.
2708 (linux_wait_1): Use it, when returning an exit event.
2709 (linux_resume_one_lwp_throw): Assert that the LWP's
2710 waitstatus is TARGET_WAITKIND_IGNORE.
2711 * remote-utils.c (prepare_resume_reply): Handle
2712 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2713 * server.c (report_thread_events): New global.
2714 (handle_general_set): Handle QThreadEvents.
2715 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2716 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2717 TARGET_WAITKIND_THREAD_EXITED.
2718 * server.h (report_thread_events): Declare.
2719
56cf4bed
PA
27202015-11-30 Pedro Alves <palves@redhat.com>
2721
2722 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2723 the thread's last_resume_kind was resume_stop.
2724
500c1d85
PA
27252015-11-30 Pedro Alves <palves@redhat.com>
2726
2727 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2728 before returning.
2729
de979965
PA
27302015-11-30 Pedro Alves <palves@redhat.com>
2731
2732 * server.c (handle_v_requests): Handle vCtrlC.
2733
34c65914
PA
27342015-11-30 Pedro Alves <palves@redhat.com>
2735
2736 * gdbthread.h (find_any_thread_of_pid): Declare.
2737 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2738 functions.
2739 * server.c (handle_query): If current_thread is NULL, look for
2740 another thread of the selected process.
2741
79efa585 27422015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2743 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2744
2745 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2746 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2747 name in reply.
2748 * target.h (struct target_ops) <thread_name>: New field.
2749 (target_thread_name): New macro.
2750
80d82c19
JB
27512015-11-23 Joel Brobecker <brobecker@adacore.com>
2752
2753 * regcache.h (regcache_invalidate_pid): Add declaration.
2754 * regcache.c (regcache_invalidate_pid): New function, extracted
2755 from regcache_invalidate.
2756 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2757 Add trivial documentation comment.
2758 * lynx-low.c: Use regcache_invalidate_pid instead of
2759 regcache_invalidate.
2760
64da5dd5
JB
27612015-11-23 Joel Brobecker <brobecker@adacore.com>
2762
2763 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2764 and Elf64_auxv_t if the target is Android.
2765
37ce4055
DE
27662015-11-22 Doug Evans <xdje42@gmail.com>
2767
2768 * target.h: #include <sys/types.h>.
2769
06e03fff
PA
27702015-11-19 Pedro Alves <palves@redhat.com>
2771
2772 * linux-low.c (linux_process_qsupported): Change prototype.
2773 Adjust.
2774 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2775 Change prototype.
2776 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2777 and adjust to loop over all features.
2778 * server.c (handle_query) <qSupported>: Adjust to call
2779 target_process_qsupported once, passing it a vector of unprocessed
2780 features.
2781 * target.h (struct target_ops) <process_qsupported>: Change
2782 prototype.
2783 (target_process_qsupported): Adjust.
2784
9a084706
PA
27852015-11-19 Pedro Alves <palves@redhat.com>
2786
2787 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2788 mode.
2789 * configure: Regenerate.
2790
dad44a1f
PA
27912015-11-19 Pedro Alves <palves@redhat.com>
2792
2793 * configure: Regenerate.
2794
231c0592
YQ
27952015-11-19 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2798 type to uint32_t.
2799
6c1c9a8b
YQ
28002015-11-19 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2803 (struct aarch64_operand): Move enum out.
2804
9caa3311
YQ
28052015-11-19 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2808 struct user_fpsimd_state *.
2809 (aarch64_store_fpregset): Likewise.
2810
6a69a054
YQ
28112015-11-19 Yao Qi <yao.qi@linaro.org>
2812
2813 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2814 struct user_pt_regs *.
2815 (aarch64_store_gregset): Likewise.
2816
1798301e
PA
28172015-11-18 Pedro Alves <palves@redhat.com>
2818
2819 * Makefile.in (all_object_files): Add $IPA_OBJS.
2820
ce7715e2
PA
28212015-11-17 Pedro Alves <palves@redhat.com>
2822
2823 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2824 GDB_SIGNAL_0 and gdb_signal_to_string.
2825
c0879059
PA
28262015-11-17 Pedro Alves <palves@redhat.com>
2827
2828 * win32-low.c (handle_output_debug_string): Remove parameter.
2829 (win32_kill): Remove our_status local and adjust call to
2830 handle_output_debug_string.
2831 (get_child_debug_event): Adjust call to
2832 handle_output_debug_string.
2833
1996e237
SM
28342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2835
2836 * linux-mips-low.c (mips_fill_gregset): Add cast.
2837 (mips_store_gregset): Likewise.
2838 (mips_fill_fpregset): Likewise.
2839 (mips_store_fpregset): Likewise.
2840
cbec665b
SM
28412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2842
2843 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2844 priv.
2845
eb3e3c67
SM
28462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2847
2848 * linux-mips-low.c (mips_linux_new_thread): Change type of
2849 watch_type to enum target_hw_bp_type.
2850
171de4b8
SM
28512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2852
2853 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2854 Change return type to arm_hwbp_type.
2855
04248ead
SM
28562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2857
2858 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2859 (arm_store_gregset): Likewise.
2860 * linux-arm-low.c (arm_get_hwcap): Likewise.
2861 (arm_read_description): Likewise.
2862
04b3479c
SM
28632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2864
2865 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2866
2bc84e8a
SM
28672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2868
2869 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2870 (ppc_fill_vsxregset): Likewise.
2871 (ppc_store_vsxregset): Likewise.
2872 (ppc_fill_vrregset): Likewise.
2873 (ppc_store_vrregset): Likewise.
2874 (ppc_fill_evrregset): Likewise.
2875 (ppc_store_evrregset): Likewise.
2876
e6c5bb05
SM
28772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2878
2879 * linux-ppc-low.c (ppc_usrregs_info): Remove
2880 forward-declaration.
2881 (ppc_arch_setup): Move lower in file.
2882
7ea45d72
SM
28832015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2884
2885 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2886 (ps_pdwrite): Likewise.
2887
69291610
HW
28882015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2889
2890 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2891 to after assert checks.
2892
b42945fd
SM
28932015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2894
2895 * proc-service.c (ps_pdread): Add/adjust casts.
2896 (ps_pdwrite): Add/adjust casts.
2897
d6f85c84
SM
28982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2899
2900 * server.c (handle_search_memory_1): Cast return value of
2901 memmem.
2902
f98cd059
SM
29032015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2904
2905 * server.c (write_qxfer_response): Change type of data to
2906 gdb_byte *.
2907
d2412fa5
PA
29082015-10-29 Pedro Alves <palves@redhat.com>
2909
2910 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2911
c17414a2
PA
29122015-10-29 Pedro Alves <palves@redhat.com>
2913
2914 * tracepoint.c (clear_installed_tracepoints): Add casts.
2915
e053fbc4
PA
29162015-10-29 Pedro Alves <palves@redhat.com>
2917
2918 * server.c (handle_v_cont, process_serial_event): Add enum
2919 gdb_signal casts to signal parsing code.
2920
add67df8
PA
29212015-10-29 Pedro Alves <palves@redhat.com>
2922
2923 * linux-low.h (NULL_REGSET): Define.
2924 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2925 * linux-arm-low.c (arm_regsets): Likewise.
2926 * linux-crisv32-low.c (cris_regsets): Likewise.
2927 * linux-m68k-low.c (m68k_regsets): Likewise.
2928 * linux-mips-low.c (mips_regsets): Likewise.
2929 * linux-nios2-low.c (nios2_regsets): Likewise.
2930 * linux-ppc-low.c (ppc_regsets): Likewise.
2931 * linux-s390-low.c (s390_regsets): Likewise.
2932 * linux-sh-low.c (sh_regsets): Likewise.
2933 * linux-sparc-low.c (sparc_regsets): Likewise.
2934 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2935 * linux-tile-low.c (tile_regsets): Likewise.
2936 * linux-x86-low.c (x86_regsets): Likewise.
2937 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2938
50bc912a
PA
29392015-10-29 Pedro Alves <palves@redhat.com>
2940
2941 * linux-low.h (NULL_REGSET): Define.
2942 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2943 * linux-arm-low.c (arm_regsets): Likewise.
2944 * linux-crisv32-low.c (cris_regsets): Likewise.
2945 * linux-m68k-low.c (m68k_regsets): Likewise.
2946 * linux-mips-low.c (mips_regsets): Likewise.
2947 * linux-nios2-low.c (nios2_regsets): Likewise.
2948 * linux-ppc-low.c (ppc_regsets): Likewise.
2949 * linux-s390-low.c (s390_regsets): Likewise.
2950 * linux-sh-low.c (sh_regsets): Likewise.
2951 * linux-sparc-low.c (sparc_regsets): Likewise.
2952 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2953 * linux-tile-low.c (tile_regsets): Likewise.
2954 * linux-x86-low.c (x86_regsets): Likewise.
2955 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2956
682b2546
DE
29572015-10-26 Doug Evans <dje@google.com>
2958
2959 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2960
963843d4
DE
29612015-10-26 Doug Evans <dje@google.com>
2962
2963 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2964
d41401ac
DE
29652015-10-26 Doug Evans <dje@google.com>
2966
2967 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2968 for debug_printf.
2969 (attach_thread, find_new_threads_callback): Ditto.
2970
3db28855
AT
29712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972
2973 * mem-break.h (set_breakpoint_data): Remove.
2974
fb78e89c
AT
29752015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2976
2977 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2978 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2979 (initialize_low): Remove set_breakpoint_data call.
2980 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2981 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2982 (initialize_low): Remove set_breakpoint_data call.
2983 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2984 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2985 (initialize_low): Remove set_breakpoint_data call.
2986
2e6ee069
AT
29872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2988
2989 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2990 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2991 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2992 * target.h (target_breakpoint_kind_from_pc): New macro.
2993
1652a986
AT
29942015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2995
2996 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2997 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2998 the default breakpoint kind.
2999
abeead09
AT
30002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3001
3002 * linux-arm-low.c (arm_supports_z_point_type): Add software
3003 breakpoint support.
3004
b0b4b501
AT
30052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3006
3007 * linux-arm-low.c: Refactor breakpoint definitions.
3008 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3009 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3010
8689682c
AT
30112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3012
3013 * Makefile.in: Add arm.c/o.
3014 * configure.srv: Likewise.
3015 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3016 (arm_breakpoint_kind_from_pc): New function.
3017 (arm_sw_breakpoint_from_kind): Return proper kind.
3018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3019
27165294
AT
30202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3021
3022 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3023 removal.
3024 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3025 (struct raw_breakpoint) <size>: Remove.
3026 (struct raw_breakpoint) <kind>: Add.
3027 (bp_size): New function.
3028 (bp_opcode): Likewise.
3029 (find_raw_breakpoint_at): Adjust for kind.
3030 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3031 (remove_memory_breakpoint): Adjust for kind call bp_size.
3032 (set_raw_breakpoint_at): Adjust for kind.
3033 (set_breakpoint): Likewise.
3034 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3035 (delete_raw_breakpoint): Adjust for kind.
3036 (delete_breakpoint): Likewise.
3037 (find_gdb_breakpoint): Likewise.
3038 (set_gdb_breakpoint_1): Likewise.
3039 (set_gdb_breakpoint): Likewise.
3040 (delete_gdb_breakpoint_1): Likewise.
3041 (delete_gdb_breakpoint): Likewise.
3042 (uninsert_raw_breakpoint): Likewise.
3043 (reinsert_raw_breakpoint): Likewise.
3044 (set_breakpoint_data): Remove.
3045 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3046 (check_mem_read): Adjust for kind call bp_size.
3047 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3048 (clone_one_breakpoint): Adjust for kind.
3049 * mem-break.h (set_gdb_breakpoint): Likewise.
3050 (delete_gdb_breakpoint): Likewise.
3051 * server.c (process_serial_event): Likewise.
3052
dd373349
AT
30532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3054
3055 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3056 (struct linux_target_ops) <breakpoint>: Remove.
3057 (struct linux_target_ops) <breakpoint_len>: Remove.
3058 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3059 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3060 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3061 (arm_sw_breakpoint_from_kind): New function.
3062 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3063 (struct linux_target_ops) <breakpoint>: Remove.
3064 (struct linux_target_ops) <breakpoint_len>: Remove.
3065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3067 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3068 (struct linux_target_ops) <breakpoint>: Remove.
3069 (struct linux_target_ops) <breakpoint_len>: Remove.
3070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3072 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3073 (struct linux_target_ops) <breakpoint>: Remove.
3074 (struct linux_target_ops) <breakpoint_len>: Remove.
3075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3077 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3078 and sw_breakpoint_from_kind to increment the pc.
3079 (linux_breakpoint_kind_from_pc): New function.
3080 (linux_sw_breakpoint_from_kind): New function.
3081 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3082 (initialize_low): Call breakpoint_kind_from_pc and
3083 sw_breakpoint_from_kind to replace breakpoint_data/len.
3084 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3085 New field.
3086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3087 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3088 (struct linux_target_ops) <breakpoint>: Remove.
3089 (struct linux_target_ops) <breakpoint_len>: Remove.
3090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3092 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3093 (struct linux_target_ops) <breakpoint>: Remove.
3094 (struct linux_target_ops) <breakpoint_len>: Remove.
3095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3097 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3098 (struct linux_target_ops) <breakpoint>: Remove.
3099 (struct linux_target_ops) <breakpoint_len>: Remove.
3100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3102 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3103 (struct linux_target_ops) <breakpoint>: Remove.
3104 (struct linux_target_ops) <breakpoint_len>: Remove.
3105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3107 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3108 (struct linux_target_ops) <breakpoint>: Remove.
3109 (struct linux_target_ops) <breakpoint_len>: Remove.
3110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3112 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3113 (struct linux_target_ops) <breakpoint>: Remove.
3114 (struct linux_target_ops) <breakpoint_len>: Remove.
3115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3117 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3118 (struct linux_target_ops) <breakpoint>: Remove.
3119 (struct linux_target_ops) <breakpoint_len>: Remove.
3120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3122 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3123 (struct linux_target_ops) <breakpoint>: Remove.
3124 (struct linux_target_ops) <breakpoint_len>: Remove.
3125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3127 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3128 (struct linux_target_ops) <breakpoint>: Remove.
3129 (struct linux_target_ops) <breakpoint_len>: Remove.
3130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3132 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3133 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
31442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3145
3146 * linux-cris-low.c (cris_get_pc): Remove void arg.
3147
774ee6d2
AR
31482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3149
3150 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3151 variable name.
3152
833dcd29
AR
31532015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3154
3155 * inferiors.c (thread_pid_matches_callback): New function.
3156 (find_thread_process): New function.
3157 (remove_thread): Reset current_thread.
3158 (remove_process): Assert threads have been removed first.
3159
8d689ee5
YQ
31602015-10-15 Yao Qi <yao.qi@linaro.org>
3161
3162 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3163 if it is 3.
3164 (aarch64_remove_point): Likewise.
3165 * regcache.c (regcache_register_size): New function.
3166
1c2e1515
YQ
31672015-10-12 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-aarch64-low.c: Update all callers as emit_load_store
3170 is renamed to aarch64_emit_load_store.
3171
e1c587c3
YQ
31722015-10-12 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c: Update all callers of function renaming
3175 from emit_insn to aarch64_emit_insn.
3176
b6542f81
YQ
31772015-10-12 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3180 arch/aarch64-insn.h.
3181 (struct aarch64_memory_operand): Likewise.
3182 (ENCODE): Likewise.
3183 (emit_insn): Move to arch/aarch64-insn.c.
3184 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3185 (emit_load_store): Move to arch/aarch64-insn.c.
3186 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3187 (can_encode_int32): Remove.
3188
246994ce
YQ
31892015-10-12 Yao Qi <yao.qi@linaro.org>
3190
3191 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3192 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3193 (aarch64_relocate_instruction): Likewise.
3194 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3195 (struct aarch64_insn_visitor): Likewise.
3196
0badd99f
YQ
31972015-10-12 Yao Qi <yao.qi@linaro.org>
3198
3199 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3200 (struct aarch64_insn_visitor): New.
3201 (struct aarch64_insn_relocation_data): New.
3202 (aarch64_ftrace_insn_reloc_b): New function.
3203 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3204 (aarch64_ftrace_insn_reloc_cb): Likewise.
3205 (aarch64_ftrace_insn_reloc_tb): Likewise.
3206 (aarch64_ftrace_insn_reloc_adr): Likewise.
3207 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3208 (aarch64_ftrace_insn_reloc_others): Likewise.
3209 (visitor): New.
3210 (aarch64_relocate_instruction): Use visitor.
3211
dfaffe9d
YQ
32122015-10-12 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3215 int. Add argument buf.
3216 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3217 aarch64_relocate_instruction.
3218
70b439f0
YQ
32192015-10-12 Yao Qi <yao.qi@linaro.org>
3220
3221 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3222 argument insn. Remove local variable insn. Don't call
3223 target_read_uint32.
3224 (aarch64_install_fast_tracepoint_jump_pad): Call
3225 target_read_uint32.
3226
7781c06f
YQ
32272015-09-30 Yao Qi <yao.qi@linaro.org>
3228
3229 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3230 (emit_load_store_pair): Likewise.
3231
9a3c8263
SM
32322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3233
3234 * dll.c (match_dll): Add cast(s).
3235 (unloaded_dll): Likewise.
3236 * linux-low.c (second_thread_of_pid_p): Likewise.
3237 (delete_lwp_callback): Likewise.
3238 (count_events_callback): Likewise.
3239 (select_event_lwp_callback): Likewise.
3240 (linux_set_resume_request): Likewise.
3241 * server.c (accumulate_file_name_length): Likewise.
3242 (emit_dll_description): Likewise.
3243 (handle_qxfer_threads_worker): Likewise.
3244 (visit_actioned_threads): Likewise.
3245 * thread-db.c (any_thread_of): Likewise.
3246 * tracepoint.c (same_process_p): Likewise.
3247 (match_blocktype): Likewise.
3248 (build_traceframe_info_xml): Likewise.
3249
224c3ddb
SM
32502015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3251
3252 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3253 assignment.
3254 (gdb_unparse_agent_expr): Likewise.
3255 * hostio.c (require_data): Likewise.
3256 (handle_pread): Likewise.
3257 * linux-low.c (disable_regset): Likewise.
3258 (fetch_register): Likewise.
3259 (store_register): Likewise.
3260 (get_dynamic): Likewise.
3261 (linux_qxfer_libraries_svr4): Likewise.
3262 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3263 (set_fast_tracepoint_jump): Likewise.
3264 (uninsert_fast_tracepoint_jumps_at): Likewise.
3265 (reinsert_fast_tracepoint_jumps_at): Likewise.
3266 (validate_inserted_breakpoint): Likewise.
3267 (clone_agent_expr): Likewise.
3268 * regcache.c (init_register_cache): Likewise.
3269 * remote-utils.c (putpkt_binary_1): Likewise.
3270 (decode_M_packet): Likewise.
3271 (decode_X_packet): Likewise.
3272 (look_up_one_symbol): Likewise.
3273 (relocate_instruction): Likewise.
3274 (monitor_output): Likewise.
3275 * server.c (handle_search_memory): Likewise.
3276 (handle_qxfer_exec_file): Likewise.
3277 (handle_qxfer_libraries): Likewise.
3278 (handle_qxfer): Likewise.
3279 (handle_query): Likewise.
3280 (handle_v_cont): Likewise.
3281 (handle_v_run): Likewise.
3282 (captured_main): Likewise.
3283 * target.c (write_inferior_memory): Likewise.
3284 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3285 * tracepoint.c (init_trace_buffer): Likewise.
3286 (add_tracepoint_action): Likewise.
3287 (add_traceframe): Likewise.
3288 (add_traceframe_block): Likewise.
3289 (cmd_qtdpsrc): Likewise.
3290 (cmd_qtdv): Likewise.
3291 (cmd_qtstatus): Likewise.
3292 (response_source): Likewise.
3293 (response_tsv): Likewise.
3294 (cmd_qtnotes): Likewise.
3295 (gdb_collect): Likewise.
3296 (initialize_tracepoint): Likewise.
3297
afbe19f8
PL
32982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3299
3300 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3301 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3302 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3303 <NOP>: New.
3304 (enum aarch64_condition_codes): New enum.
3305 (w0): New static global.
3306 (fp): Likewise.
3307 (lr): Likewise.
3308 (struct aarch64_memory_operand) <type>: New
3309 MEMORY_OPERAND_POSTINDEX type.
3310 (postindex_memory_operand): New helper function.
3311 (emit_ret): New function.
3312 (emit_load_store_pair): New function, factored out of emit_stp
3313 with support for MEMORY_OPERAND_POSTINDEX.
3314 (emit_stp): Rewrite using emit_load_store_pair.
3315 (emit_ldp): New function.
3316 (emit_load_store): Likewise.
3317 (emit_ldr): Mention post-index instruction in comment.
3318 (emit_ldrh): New function.
3319 (emit_ldrb): New function.
3320 (emit_ldrsw): Mention post-index instruction in comment.
3321 (emit_str): Likewise.
3322 (emit_subs): New function.
3323 (emit_cmp): Likewise.
3324 (emit_and): Likewise.
3325 (emit_orr): Likewise.
3326 (emit_orn): Likewise.
3327 (emit_eor): Likewise.
3328 (emit_mvn): Likewise.
3329 (emit_lslv): Likewise.
3330 (emit_lsrv): Likewise.
3331 (emit_asrv): Likewise.
3332 (emit_mul): Likewise.
3333 (emit_sbfm): Likewise.
3334 (emit_sbfx): Likewise.
3335 (emit_ubfm): Likewise.
3336 (emit_ubfx): Likewise.
3337 (emit_csinc): Likewise.
3338 (emit_cset): Likewise.
3339 (emit_nop): Likewise.
3340 (emit_ops_insns): New helper function.
3341 (emit_pop): Likewise.
3342 (emit_push): Likewise.
3343 (aarch64_emit_prologue): New function.
3344 (aarch64_emit_epilogue): Likewise.
3345 (aarch64_emit_add): Likewise.
3346 (aarch64_emit_sub): Likewise.
3347 (aarch64_emit_mul): Likewise.
3348 (aarch64_emit_lsh): Likewise.
3349 (aarch64_emit_rsh_signed): Likewise.
3350 (aarch64_emit_rsh_unsigned): Likewise.
3351 (aarch64_emit_ext): Likewise.
3352 (aarch64_emit_log_not): Likewise.
3353 (aarch64_emit_bit_and): Likewise.
3354 (aarch64_emit_bit_or): Likewise.
3355 (aarch64_emit_bit_xor): Likewise.
3356 (aarch64_emit_bit_not): Likewise.
3357 (aarch64_emit_equal): Likewise.
3358 (aarch64_emit_less_signed): Likewise.
3359 (aarch64_emit_less_unsigned): Likewise.
3360 (aarch64_emit_ref): Likewise.
3361 (aarch64_emit_if_goto): Likewise.
3362 (aarch64_emit_goto): Likewise.
3363 (aarch64_write_goto_address): Likewise.
3364 (aarch64_emit_const): Likewise.
3365 (aarch64_emit_call): Likewise.
3366 (aarch64_emit_reg): Likewise.
3367 (aarch64_emit_pop): Likewise.
3368 (aarch64_emit_stack_flush): Likewise.
3369 (aarch64_emit_zero_ext): Likewise.
3370 (aarch64_emit_swap): Likewise.
3371 (aarch64_emit_stack_adjust): Likewise.
3372 (aarch64_emit_int_call_1): Likewise.
3373 (aarch64_emit_void_call_2): Likewise.
3374 (aarch64_emit_eq_goto): Likewise.
3375 (aarch64_emit_ne_goto): Likewise.
3376 (aarch64_emit_lt_goto): Likewise.
3377 (aarch64_emit_le_goto): Likewise.
3378 (aarch64_emit_gt_goto): Likewise.
3379 (aarch64_emit_ge_got): Likewise.
3380 (aarch64_emit_ops_impl): New static global variable.
3381 (aarch64_emit_ops): New target function, return
3382 &aarch64_emit_ops_impl.
3383 (struct linux_target_ops): Install it.
3384
bb903df0
PL
33852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3386
3387 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3388 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3389 aarch64-ipa.o.
3390 * linux-aarch64-ipa.c: New file.
3391 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3392 and endian.h.
3393 (aarch64_get_thread_area): New target method.
3394 (extract_signed_bitfield): New helper function.
3395 (aarch64_decode_ldr_literal): New function.
3396 (enum aarch64_opcodes): New enum.
3397 (struct aarch64_register): New struct.
3398 (struct aarch64_operand): New struct.
3399 (x0): New static global.
3400 (x1): Likewise.
3401 (x2): Likewise.
3402 (x3): Likewise.
3403 (x4): Likewise.
3404 (w2): Likewise.
3405 (ip0): Likewise.
3406 (sp): Likewise.
3407 (xzr): Likewise.
3408 (aarch64_register): New helper function.
3409 (register_operand): Likewise.
3410 (immediate_operand): Likewise.
3411 (struct aarch64_memory_operand): New struct.
3412 (offset_memory_operand): New helper function.
3413 (preindex_memory_operand): Likewise.
3414 (enum aarch64_system_control_registers): New enum.
3415 (ENCODE): New macro.
3416 (emit_insn): New helper function.
3417 (emit_b): New function.
3418 (emit_bcond): Likewise.
3419 (emit_cb): Likewise.
3420 (emit_tb): Likewise.
3421 (emit_blr): Likewise.
3422 (emit_stp): Likewise.
3423 (emit_ldp_q_offset): Likewise.
3424 (emit_stp_q_offset): Likewise.
3425 (emit_load_store): Likewise.
3426 (emit_ldr): Likewise.
3427 (emit_ldrsw): Likewise.
3428 (emit_str): Likewise.
3429 (emit_ldaxr): Likewise.
3430 (emit_stxr): Likewise.
3431 (emit_stlr): Likewise.
3432 (emit_data_processing_reg): Likewise.
3433 (emit_data_processing): Likewise.
3434 (emit_add): Likewise.
3435 (emit_sub): Likewise.
3436 (emit_mov): Likewise.
3437 (emit_movk): Likewise.
3438 (emit_mov_addr): Likewise.
3439 (emit_mrs): Likewise.
3440 (emit_msr): Likewise.
3441 (emit_sevl): Likewise.
3442 (emit_wfe): Likewise.
3443 (append_insns): Likewise.
3444 (can_encode_int32_in): New helper function.
3445 (aarch64_relocate_instruction): New function.
3446 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3447 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3448 (struct linux_target_ops): Install aarch64_get_thread_area,
3449 aarch64_install_fast_tracepoint_jump_pad and
3450 aarch64_get_min_fast_tracepoint_insn_len.
3451
787749ea
PL
34522015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3453
3454 * Makefile.in (aarch64-insn.o): New rule.
3455 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3456
9812b2e6
YQ
34572015-09-21 Yao Qi <yao.qi@linaro.org>
3458
3459 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3460
18fe412b
YQ
34612015-09-21 Yao Qi <yao.qi@linaro.org>
3462
3463 * tracepoint.c (max_jump_pad_size): Remove.
3464
a0cc84cd
YQ
34652015-09-18 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch64-low.c: Don't include sys/uio.h.
3468 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3469
d78908cf
WW
34702015-09-16 Wei-cheng Wang <cole945@gmail.com>
3471
3472 * tracepoint.c (eval_result_type): Change prototype.
3473 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3474
d57e0d50
PA
34752015-09-15 Pedro Alves <palves@redhat.com>
3476
3477 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3478 Check whether to report exec events instead of checking whether
3479 multiprocess is enabled.
3480
5a676acc
PA
34812015-09-15 Pedro Alves <palves@redhat.com>
3482
3483 PR remote/18965
3484 * remote-utils.c (prepare_resume_reply): Merge
3485 TARGET_WAITKIND_VFORK_DONE switch case with the
3486 TARGET_WAITKIND_FORKED case.
3487
7c5d0fad
YQ
34882015-09-15 Yao Qi <yao.qi@linaro.org>
3489
3490 * server.c (handle_query): Check string comparison using
3491 "else if" instead of "if".
3492
750ce8d1
YQ
34932015-09-15 Yao Qi <yao.qi@linaro.org>
3494
3495 * server.c (vCont_supported): New global variable.
3496 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3497 matches. Append ";vContSupported+" to own_buf.
3498 (handle_v_requests): Append ";s;S" to own_buf if target supports
3499 hardware single step or vCont_supported is false.
3500 (capture_main): Set vCont_supported to zero.
3501
70b90b91
YQ
35022015-09-15 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3505 it to ...
3506 (linux_supports_hardware_single_step): ... New function.
3507 (linux_target_ops): Update.
3508 * lynx-low.c (lynx_target_ops): Set field
3509 supports_hardware_single_step to target_can_do_hardware_single_step.
3510 * nto-low.c (nto_target_ops): Likewise.
3511 * spu-low.c (spu_target_ops): Likewise.
3512 * win32-low.c (win32_target_ops): Likewise.
3513 * target.c (target_can_do_hardware_single_step): New function.
3514 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3515 Remove. <supports_hardware_single_step>: New field.
3516 (target_supports_conditional_breakpoints): Remove.
3517 (target_supports_hardware_single_step): New macro.
3518 (target_can_do_hardware_single_step): Declare.
3519 * server.c (handle_query): Use target_supports_hardware_single_step
3520 instead of target_supports_conditional_breakpoints.
3521
ade90bde
YQ
35222015-09-15 Yao Qi <yao.qi@linaro.org>
3523
3524 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3525 function.
3526 (struct linux_target_ops the_low_target): Install
3527 aarch64_linux_siginfo_fixup.
3528
94585166
DB
35292015-09-11 Don Breazeal <donb@codesourcery.com>
3530 Luis Machado <lgustavo@codesourcery.com>
3531
3532 * linux-low.c (linux_mourn): Static declaration.
3533 (linux_arch_setup): Move in front of
3534 handle_extended_wait.
3535 (linux_arch_setup_thread): New function.
3536 (handle_extended_wait): Handle exec events. Call
3537 linux_arch_setup_thread. Make event_lwp argument a
3538 pointer-to-a-pointer.
3539 (check_zombie_leaders): Do not check stopped threads.
3540 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3541 (linux_low_filter_event): Add lwp and thread for exec'ing
3542 non-leader thread if leader thread has been deleted.
3543 Refactor code into linux_arch_setup_thread and call it.
3544 Pass child lwp pointer by reference to handle_extended_wait.
3545 (linux_wait_for_event_filtered): Update comment.
3546 (linux_wait_1): Prevent clobbering exec event status.
3547 (linux_supports_exec_events): New function.
3548 (linux_target_ops) <supports_exec_events>: Initialize new member.
3549 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3550 new member.
3551 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3552 * server.c (report_exec_events): New global variable.
3553 (handle_query): Handle qSupported query for exec-events feature.
3554 (captured_main): Initialize report_exec_events.
3555 * server.h (report_exec_events): Declare new global variable.
3556 * target.h (struct target_ops) <supports_exec_events>: New
3557 member.
3558 (target_supports_exec_events): New macro.
3559 * win32-low.c (win32_target_ops) <supports_exec_events>:
3560 Initialize new member.
3561
0568462b
MM
35622015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3563
3564 * linux-low.c (linux_low_enable_btrace): Remove.
3565 (linux_target_ops): Replace linux_low_enable_btrace with
3566 linux_enable_btrace.
3567
39edd165
YQ
35682015-09-03 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c (aarch64_insert_point): Call
3571 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3572 returns true.
3573
1db33b5a
UW
35742015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3575
3576 * linux-low.c (check_stopped_by_breakpoint): Use
3577 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3578
ab290430
PA
35792015-08-27 Pedro Alves <palves@redhat.com>
3580
3581 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3582
8d749320
SM
35832015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3584
6711b7f8
SM
3585 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3586 the XNEW-family equivalent.
8d749320
SM
3587 (compile_bytecodes): Likewise.
3588 * dll.c (loaded_dll): Likewise.
3589 * event-loop.c (append_callback_event): Likewise.
3590 (create_file_handler): Likewise.
3591 (create_file_event): Likewise.
3592 * hostio.c (handle_open): Likewise.
3593 * inferiors.c (add_thread): Likewise.
3594 (add_process): Likewise.
3595 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3596 * linux-arm-low.c (arm_new_process): Likewise.
3597 (arm_new_thread): Likewise.
3598 * linux-low.c (add_to_pid_list): Likewise.
3599 (linux_add_process): Likewise.
3600 (handle_extended_wait): Likewise.
3601 (add_lwp): Likewise.
3602 (enqueue_one_deferred_signal): Likewise.
3603 (enqueue_pending_signal): Likewise.
3604 (linux_resume_one_lwp_throw): Likewise.
3605 (linux_resume_one_thread): Likewise.
3606 (linux_read_memory): Likewise.
3607 (linux_write_memory): Likewise.
3608 * linux-mips-low.c (mips_linux_new_process): Likewise.
3609 (mips_linux_new_thread): Likewise.
3610 (mips_add_watchpoint): Likewise.
3611 * linux-x86-low.c (initialize_low_arch): Likewise.
3612 * lynx-low.c (lynx_add_process): Likewise.
3613 * mem-break.c (set_raw_breakpoint_at): Likewise.
3614 (set_breakpoint): Likewise.
3615 (add_condition_to_breakpoint): Likewise.
3616 (add_commands_to_breakpoint): Likewise.
3617 (clone_agent_expr): Likewise.
3618 (clone_one_breakpoint): Likewise.
3619 * regcache.c (new_register_cache): Likewise.
3620 * remote-utils.c (look_up_one_symbol): Likewise.
3621 * server.c (queue_stop_reply): Likewise.
3622 (start_inferior): Likewise.
3623 (queue_stop_reply_callback): Likewise.
3624 (handle_target_event): Likewise.
3625 * spu-low.c (fetch_ppc_memory): Likewise.
3626 (store_ppc_memory): Likewise.
3627 * target.c (set_target_ops): Likewise.
3628 * thread-db.c (thread_db_load_search): Likewise.
3629 (try_thread_db_load_1): Likewise.
3630 * tracepoint.c (add_tracepoint): Likewise.
3631 (add_tracepoint_action): Likewise.
3632 (create_trace_state_variable): Likewise.
3633 (cmd_qtdpsrc): Likewise.
3634 (cmd_qtro): Likewise.
3635 (add_while_stepping_state): Likewise.
3636 * win32-low.c (child_add_thread): Likewise.
3637 (get_image_name): Likewise.
3638
ed8b7b42
YQ
36392015-08-25 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3642
db3cb7cb
YQ
36432015-08-25 Yao Qi <yao.qi@linaro.org>
3644
3645 * Makefile.in (aarch64-linux.o): New rule.
3646 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3647 srv_tgtobj.
3648 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3649 (aarch64_init_debug_reg_state): Make it extern.
3650 (aarch64_linux_prepare_to_resume): Remove.
3651
f6011a1c
YQ
36522015-08-25 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3655 lwp_arch_private_info and ptid_of_lwp.
3656
88e2cf7e
YQ
36572015-08-25 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3660 Find proc_info by find_process_pid. All callers updated.
3661
5e35436e
YQ
36622015-08-25 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3665 Remove.
3666 (debug_reg_change_callback): Remove.
3667 (aarch64_notify_debug_reg_change): Remove.
3668
4a8a7965
YQ
36692015-08-25 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3672 Call current_lwp_ptid.
3673
32a271ee
YQ
36742015-08-25 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-aarch64-low.c (debug_reg_change_callback): Use
3677 debug_printf.
3678
0d51c8d7
YQ
36792015-08-25 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3682
31a43dd5
YQ
36832015-08-25 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3686
8ee52567
YQ
36872015-08-25 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3690 the code.
3691
ff3f0f45
YQ
36922015-08-25 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3695 Remove.
3696 (debug_reg_change_callback): Remove argument entry and add argument
3697 lwp. Remove local variable thread. Don't print thread id in the
3698 debugging output. Don't check whether pid of thread equals to pid.
3699 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3700 iterate_over_lwps instead find_inferior.
3701
3d40fbb5
PA
37022015-08-24 Pedro Alves <palves@redhat.com>
3703
3704 * inferiors.c (get_first_process): New function.
3705 * inferiors.h (get_first_process): New declaration.
3706 * remote-utils.c (read_ptid): Default to the first process in the
3707 list, instead of to the current thread's process.
3708
438e1e42
PA
37092015-08-24 Pedro Alves <palves@redhat.com>
3710
3711 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3712 * event-loop.c: Likewise.
3713 * remote-utils.c: Likewise.
3714 * tracepoint.c: Likewise.
3715
a8c6d4fc
PA
37162015-08-24 Pedro Alves <palves@redhat.com>
3717
3718 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3719 ptid_get_lwp.
3720
99b0bb12
PA
37212015-08-21 Pedro Alves <palves@redhat.com>
3722
3723 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3724 instead of literal 1.
3725
f8904751
PA
37262015-08-21 Pedro Alves <palves@redhat.com>
3727
3728 * tdesc.c (default_description): Explicitly zero-initialize.
3729
465a859e
PA
37302015-08-21 Pedro Alves <palves@redhat.com>
3731
3732 PR gdb/18749
3733 * inferiors.c (remove_thread): Discard any pending stop reply for
3734 this thread.
3735 * server.c (remove_all_on_match_pid): Rename to ...
3736 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3737 instead of a pid.
3738 (discard_queued_stop_replies): Change parameter to a ptid. Now
3739 extern.
3740 (handle_v_kill, kill_inferior_callback, captured_main)
3741 (process_serial_event): Adjust.
3742 * server.h (discard_queued_stop_replies): Declare.
3743
f0db101d
PA
37442015-08-21 Pedro Alves <palves@redhat.com>
3745
3746 * linux-low.c (wait_for_sigstop): Always switch to no thread
3747 selected if the previously current thread dies.
3748 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3749 process instead of the current thread's.
3750 * remote-utils.c (input_interrupt): Don't check if there's no
3751 current thread.
3752 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3753 current thread to the general thread fails, error out.
3754 (handle_qxfer_auxv, handle_qxfer_libraries)
3755 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3756 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3757 (handle_query): Check if there's a thread selected instead of
3758 checking whether there's any thread in the thread list.
3759 (handle_qxfer_threads, handle_qxfer_btrace)
3760 (handle_qxfer_btrace_conf): Don't error out early if there's no
3761 thread in the thread list.
3762 (handle_v_cont, myresume): Don't set the current thread to the
3763 continue thread.
3764 (process_serial_event) <Hg handling>: Also set thread_id if the
3765 previous general thread is still alive.
3766 (process_serial_event) <g/G handling>: If setting the current
3767 thread to the general thread fails, error out.
3768 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3769 thread's lwp instead of the current thread's.
3770 * target.c (set_desired_thread): If the desired thread was not
3771 found, leave the current thread pointing to NULL. Return an int
3772 (boolean) indicating success.
3773 * target.h (set_desired_thread): Change return type to int.
3774
40045d91
MF
37752015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3776
3777 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3778 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3779 #includes.
3780 (ps_get_thread_area): New function.
3781
45face3b
GB
37822015-08-19 Gary Benson <gbenson@redhat.com>
3783
3784 * hostio.c (handle_pread): Do not attempt to read more data
3785 than hostio_reply_with_data can fit in a packet.
3786
16d5f642
JB
37872015-08-18 Joel Brobecker <brobecker@adacore.com>
3788
3789 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3790
a738da3a
MF
37912015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3792
3793 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3794
33ebda9d
PA
37952015-08-06 Pedro Alves <palves@redhat.com>
3796
3797 * tracepoint.c (expr_eval_result): Now an int.
3798
a44892be
PA
37992015-08-06 Pedro Alves <palves@redhat.com>
3800
3801 * gdbthread.h (struct regcache): Forward declare.
3802 (struct thread_info) <regcache_data>: Now a struct regcache
3803 pointer.
3804 * inferiors.c (inferior_regcache_data)
3805 (set_inferior_regcache_data): Now work with struct regcache
3806 pointers.
3807 * inferiors.h (struct regcache): Forward declare.
3808 (inferior_regcache_data, set_inferior_regcache_data): Now work
3809 with struct regcache pointers.
3810 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3811 (free_register_cache_thread): Remove struct regcache pointer
3812 casts.
3813
608a1e46
PA
38142015-08-06 Pedro Alves <palves@redhat.com>
3815
3816 * server.c (captured_main): On error, print the exception message
3817 to stderr, and if run_once is set, throw a quit.
3818
f0ce0d3a
PA
38192015-08-06 Pedro Alves <palves@redhat.com>
3820
3821 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3822 the current thread.
3823
bf47e248
PA
38242015-08-06 Pedro Alves <palves@redhat.com>
3825
3826 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3827 reading beyond the passed in buffer length.
3828
b6b9ffcc
PL
38292015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3830
3831 * tracepoint.c (symbol_list) <required>: Remove.
3832
863d01bd
PA
38332015-08-06 Pedro Alves <palves@redhat.com>
3834
3835 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3836 count if stopping and suspending threads.
3837 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3838 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3839 (linux_detach): Complete an ongoing step-over.
3840 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3841 throughout.
3842 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3843 (linux_wait_1): If passing a signal to the inferior after
3844 finishing a step-over, unsuspend and re-resume all lwps. If we
3845 see a single-step event but the thread should be continuing, don't
3846 pass the trap to gdb.
3847 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3848 internal_error instead of gdb_assert.
3849 (enqueue_pending_signal): New function.
3850 (check_ptrace_stopped_lwp_gone): Add debug output.
3851 (start_step_over): Use internal_error instead of gdb_assert.
3852 (complete_ongoing_step_over): New function.
3853 (linux_resume_one_thread): Don't resume a suspended thread.
3854 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3855 it stepping.
3856
00db26fa
PA
38572015-08-06 Pedro Alves <palves@redhat.com>
3858
3859 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3860 (linux_thread_alive): Use lwp_is_marked_dead.
3861 (extended_event_reported): Delete.
3862 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3863 instead of extended_event_reported.
3864 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3865 as well.
3866 (lwp_is_marked_dead): New function.
3867 (lwp_running): Use lwp_is_marked_dead.
3868 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3869 comment.
3870
ad071a30
PA
38712015-08-06 Pedro Alves <palves@redhat.com>
3872
3873 * linux-low.c (linux_wait_1): Move fork event output out of the
3874 !report_to_gdb check. Pass event_child->waitstatus to
3875 target_waitstatus_to_string instead of ourstatus.
3876
524b57e6
YQ
38772015-08-04 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3880 if current_thread is 32 bit.
3881
6085d6f6
YQ
38822015-08-04 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3885 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3886 * server.c (extended_protocol): Remove "static".
3887 * server.h (extended_protocol): Declare it.
3888
8a7e4587
YQ
38892015-08-04 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3892 both aarch64 and aarch32.
3893 (aarch64_set_pc): Likewise.
3894
3b53ae99
YQ
38952015-08-04 Yao Qi <yao.qi@linaro.org>
3896
3897 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3898 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3899 arm-with-neon.xml to srv_xmlfiles.
3900 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3901 (is_64bit_tdesc): New function.
3902 (aarch64_linux_read_description): New function.
3903 (aarch64_arch_setup): Call aarch64_linux_read_description.
3904 (regs_info): Rename to regs_info_aarch64.
3905 (aarch64_regs_info): Return right regs_info.
3906 (initialize_low_arch): Call initialize_low_arch_aarch32.
3907
bd9e6534
YQ
39082015-08-04 Yao Qi <yao.qi@linaro.org>
3909
3910 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3911 * linux-aarch32-low.c: New file.
3912 * linux-aarch32-low.h: New file.
3913 * linux-arm-low.c (arm_fill_gregset): Move it to
3914 linux-aarch32-low.c.
3915 (arm_store_gregset): Likewise.
3916 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3917 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3918 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3919 (regs_info): Rename to regs_info_arm.
3920 (arm_regs_info): Return regs_info_aarch32 if
3921 have_ptrace_getregset is 1 and target description is
3922 arm_with_neon or arm_with_vfpv3.
3923 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3924 Call initialize_low_arch_aarch32 instead.
3925
ded48a5e
YQ
39262015-08-04 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3929 * linux-low.c: ... here.
3930 * linux-low.h (have_ptrace_getregset): Declare it.
3931
96e9210f
PA
39322015-08-04 Pedro Alves <palves@redhat.com>
3933
3934 * thread-db.c (struct thread_db): Use new typedefs.
3935 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3936 CHK calls.
3937 (disable_thread_event_reporting): Cast result of dlsym to
3938 destination function pointer type.
3939 (thread_db_mourn): Use td_ta_delete_ftype.
3940
af60a1ef
SL
39412015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3942
3943 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3944 arch variant.
3945 (CDX_BREAKPOINT): Define for R2.
3946 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3947 (the_low_target): Add comments.
3948
e8b41681
YQ
39492015-07-30 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-arm-low.c (arm_hwcap): Remove it.
3952 (arm_read_description): New local variable arm_hwcap. Don't
3953 set arm_hwcap to zero.
3954
89abb039
YQ
39552015-07-30 Yao Qi <yao.qi@linaro.org>
3956
3957 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3958 Use regcache->tdesc instead.
3959 (arm_store_wmmxregset): Likewise.
3960 (arm_fill_vfpregset): Likewise.
3961 (arm_store_vfpregset): Likewise.
3962
deca266c
YQ
39632015-07-30 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-arm-low.c: Include arch/arm.h.
3966 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3967 (arm_store_gregset): Likewise.
3968
aa58a496
SM
39692015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3970
3971 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3972 ptrace's 4th parameter.
3973
50904b25
YQ
39742015-07-27 Yao Qi <yao.qi@linaro.org>
3975
3976 * configure.srv (case aarch64*-*-linux*): Don't set
3977 srv_linux_usrregs.
3978
5826e159
PA
39792015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3980
3981 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3982 sys/ptrace.h.
3983 * linux-arm-low.c: Likewise.
3984 * linux-cris-low.c: Likewise.
3985 * linux-crisv32-low.c: Likewise.
3986 * linux-low.c: Likewise.
3987 * linux-m68k-low.c: Likewise.
3988 * linux-mips-low.c: Likewise.
3989 * linux-nios2-low.c: Likewise.
3990 * linux-s390-low.c: Likewise.
3991 * linux-sparc-low.c: Likewise.
3992 * linux-tic6x-low.c: Likewise.
3993 * linux-tile-low.c: Likewise.
3994 * linux-x86-low.c: Likewise.
3995
54019719
PA
39962015-07-24 Pedro Alves <palves@redhat.com>
3997
3998 * config.in: Regenerate.
3999 * configure: Regenerate.
4000
eb7aa561
PA
40012015-07-24 Pedro Alves <palves@redhat.com>
4002
4003 * acinclude.m4: Include ../ptrace.m4.
4004 * configure.ac: Call GDB_AC_PTRACE.
4005 * config.in, configure: Regenerate.
4006
55d7b841
YQ
40072015-07-24 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-low.c (linux_create_inferior): Remove setting to
4010 proc->priv->new_inferior.
4011 (linux_attach): Likewise.
4012 (linux_low_filter_event): Likewise.
4013 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4014
c06cbd92
YQ
40152015-07-24 Yao Qi <yao.qi@linaro.org>
4016
4017 * linux-low.c (linux_arch_setup): New function.
4018 (linux_low_filter_event): If proc->tdesc is NULL and
4019 proc->attached is true, call the_low_target.arch_setup.
4020 Otherwise, keep status pending, and return.
4021 (linux_resume_one_lwp_throw): Don't call get_pc if
4022 thread->while_stepping isn't NULL. Don't call
4023 get_thread_regcache if proc->tdesc is NULL.
4024 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4025 (linux_target_ops): Install arch_setup.
4026 * server.c (start_inferior): Call the_target->arch_setup.
4027 * target.h (struct target_ops) <arch_setup>: New field.
4028 (target_arch_setup): New marco.
4029 * lynx-low.c (lynx_target_ops): Update.
4030 * nto-low.c (nto_target_ops): Update.
4031 * spu-low.c (spu_target_ops): Update.
4032 * win32-low.c (win32_target_ops): Update.
4033
5ae3ebba
YQ
40342015-07-24 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-low.c (linux_add_process): Don't set
4037 proc->priv->new_inferior.
4038 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4039 (linux_attach): Likewise.
4040
eb97750b
YQ
40412015-07-24 Yao Qi <yao.qi@linaro.org>
4042
4043 * server.c (start_inferior): Code refactor.
4044
51aee833
YQ
40452015-07-24 Yao Qi <yao.qi@linaro.org>
4046
4047 * server.c (process_serial_event): Set general_thread.
4048
af1b22f3
YQ
40492015-07-21 Yao Qi <yao.qi@linaro.org>
4050
4051 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4052 aarch64_linux_get_debug_reg_capacity.
4053
554717a3
YQ
40542015-07-17 Yao Qi <yao.qi@linaro.org>
4055
4056 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4057 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4058 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4059 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4060 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4061 (AARCH64_HWP_ALIGNMENT): Likewise.
4062 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4063 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4064 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4065 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4066 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4067 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4068 (struct aarch64_debug_reg_state): Likewise.
4069 (struct arch_lwp_info): Likewise.
4070 (aarch64_align_watchpoint): Likewise.
4071 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4072 (aarch64_watchpoint_length): Likewise.
4073 (aarch64_point_encode_ctrl_reg): Likewise
4074 (aarch64_point_is_aligned): Likewise.
4075 (aarch64_align_watchpoint): Likewise.
4076 (aarch64_linux_set_debug_regs):
4077 (aarch64_dr_state_insert_one_point): Likewise.
4078 (aarch64_dr_state_remove_one_point): Likewise.
4079 (aarch64_handle_breakpoint): Likewise.
4080 (aarch64_handle_aligned_watchpoint): Likewise.
4081 (aarch64_handle_unaligned_watchpoint): Likewise.
4082 (aarch64_handle_watchpoint): Likewise.
4083
c67ca4de
YQ
40842015-07-17 Yao Qi <yao.qi@linaro.org>
4085
4086 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4087 and don't aarch64_get_debug_reg_state. All callers update.
4088 (aarch64_handle_aligned_watchpoint): Likewise.
4089 (aarch64_handle_unaligned_watchpoint): Likewise.
4090 (aarch64_handle_watchpoint): Likewise.
4091 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4092 (aarch64_remove_point): Likewise.
4093
25abf979
YQ
40942015-07-17 Yao Qi <yao.qi@linaro.org>
4095
4096 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4097 debug_printf.
4098 (aarch64_handle_unaligned_watchpoint): Likewise.
4099
db1ff28b
JK
41002015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4101
4102 Revert the previous 3 commits:
4103 Move gdb_regex* to common/
4104 Move linux_find_memory_regions_full & co.
4105 gdbserver build-id attribute generator
4106
700ca40f
JK
41072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4108 Jan Kratochvil <jan.kratochvil@redhat.com>
4109
4110 gdbserver build-id attribute generator.
4111 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4112 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4113 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4114 (find_phdr): New.
4115 (get_dynamic): Use find_pdhr to traverse program headers.
4116 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4117 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4118 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4119 (get_hex_build_id): New.
4120 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4121 to reply XML document.
4122
9904185c
JK
41232015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4124 Jan Kratochvil <jan.kratochvil@redhat.com>
4125
4126 * target.c: Include target/target-utils.h and fcntl.h.
4127 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4128 (target_fileio_read_stralloc): New functions.
4129
6e5b4429
JK
41302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4131
4132 * Makefile.in (OBS): Add gdb_regex.o.
4133 (gdb_regex.o): New.
4134 * config.in: Rebuilt.
4135 * configure: Rebuilt.
4136
ddc98fbf
JK
41372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4138 Jan Kratochvil <jan.kratochvil@redhat.com>
4139
4140 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4141 * Makefile.in (OBS): Add target-utils.o.
4142 (linux-maps.o, target-utils.o): New.
4143 * configure.srv (srv_linux_obj): Add linux-maps.o.
4144
e57bb7a0
PL
41452015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4146
4147 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4148 function, return 1.
4149 (the_low_target): Install it.
4150
586b02a9
PA
41512015-07-14 Pedro Alves <palves@redhat.com>
4152
4153 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4154 Instead, ignore ECHILD, and throw an error for other errnos.
4155
58c1b36c
PA
41562015-07-10 Pedro Alves <palves@redhat.com>
4157
4158 * event-loop.c (struct callback_event) <data>: Change type to
4159 gdb_client_data instance instead of gdb_client_data pointer.
4160 (append_callback_event): Adjust.
4161
421530db
PL
41622015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4163
4164 * linux-aarch64-low.c: Add comments for each linux_target_ops
4165 method. Remove comments already covered in target_ops and
4166 linux_target_ops definitions.
4167 (the_low_target): Add comments for each unimplemented method.
4168
c2d65f38
YQ
41692015-07-09 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-aarch64-low.c (aarch64_regmap): Remove.
4172 (aarch64_usrregs_info): Remove.
4173 (regs_info): Set field usrregs to NULL.
4174
b20a6524
MM
41752015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4176
4177 * linux-low.c: Include "rsp-low.h"
4178 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4179 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4180 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4181 (handle_btrace_enable_pt): New.
4182 (handle_btrace_general_set): Support "pt".
4183 (handle_btrace_conf_general_set): Support "pt:size".
4184
96c97461
PL
41852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4186
4187 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4188 Z_PACKET_SW_BP.
4189
37d66942
PL
41902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4191
4192 * linux-aarch64-low.c: Remove comment about endianness.
4193 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4194 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4195 memcmp.
4196
dc06243f
GB
41972015-06-24 Gary Benson <gbenson@redhat.com>
4198
4199 * linux-i386-ipa.c (stdint.h): Do not include.
4200 * lynx-i386-low.c (stdint.h): Likewise.
4201 * lynx-ppc-low.c (stdint.h): Likewise.
4202 * mem-break.c (stdint.h): Likewise.
4203 * thread-db.c (stdint.h): Likewise.
4204 * tracepoint.c (stdint.h): Likewise.
4205 * win32-low.c (stdint.h): Likewise.
4206
124e13d9
SM
42072015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4208
4209 * server.c (write_qxfer_response): Update call to
4210 remote_escape_output.
4211
909c2cda
JK
42122015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4213 Jan Kratochvil <jan.kratochvil@redhat.com>
4214
4215 Merge multiple hex conversions.
4216 * gdbreplay.c (tohex): Rename to 'fromhex'.
4217 (logchar): Use fromhex.
4218
24c05f46
JK
42192015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4220
4221 * server.c (handle_qxfer_libraries): Set `version' attribute for
4222 <library-list>.
4223
14d2069a
GB
42242015-06-10 Gary Benson <gbenson@redhat.com>
4225
4226 * target.h (struct target_ops) <multifs_open>: New field.
4227 <multifs_unlink>: Likewise.
4228 <multifs_readlink>: Likewise.
4229 * linux-low.c (nat/linux-namespaces.h): New include.
4230 (linux_target_ops): Initialize the_target->multifs_open,
4231 the_target->multifs_unlink and the_target->multifs_readlink.
4232 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4233 * hostio.c (hostio_fs_pid): New static variable.
4234 (hostio_handle_new_gdb_connection): New function.
4235 (handle_setfs): Likewise.
4236 (handle_open): Use the_target->multifs_open as appropriate.
4237 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4238 (handle_readlink): Use the_target->multifs_readlink as
4239 appropriate.
4240 (handle_vFile): Handle vFile:setfs packets.
4241 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4242 after target_handle_new_gdb_connection.
4243
4b8b5e72
GB
42442015-06-10 Gary Benson <gbenson@redhat.com>
4245
4246 * configure.ac (AC_CHECK_FUNCS): Add setns.
4247 * config.in: Regenerate.
4248 * configure: Likewise.
4249 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4250 (linux-namespaces.o): New rule.
4251 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4252
3ac2e371
GB
42532015-06-09 Gary Benson <gbenson@redhat.com>
4254
4255 * hostio.c (handle_open): Process mode argument with
4256 fileio_to_host_mode.
4257
ca9b78ce
YQ
42582015-06-01 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4261 * linux-x86-low.c: Likewise.
4262
bfacd19d
DB
42632015-05-28 Don Breazeal <donb@codesourcery.com>
4264
4265 * linux-low.c (handle_extended_wait): Initialize
4266 thread_info.last_resume_kind for new fork children.
4267
452003ef
PA
42682015-05-15 Pedro Alves <palves@redhat.com>
4269
4270 * target.h (target_handle_new_gdb_connection): Rewrite using if
4271 wrapped in do/while.
4272
1041a03c
JB
42732015-05-14 Joel Brobecker <brobecker@adacore.com>
4274
4275 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4276 * configure, config.in: Regenerate.
4277 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4278 Declare typedef.
4279
c269dbdb
DB
42802015-05-12 Don Breazeal <donb@codesourcery.com>
4281
4282 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4283 PTRACE_EVENT_VFORK_DONE.
4284 (linux_low_ptrace_options, extended_event_reported): Add vfork
4285 events.
4286 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4287 and "vforkdone" for RSP 'T' Stop Reply Packet.
4288 * server.h (report_vfork_events): Declare
4289 global variable.
4290
3a8a0396
DB
42912015-05-12 Don Breazeal <donb@codesourcery.com>
4292
4293 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4294 (the_low_target) <new_fork>: Initialize new member.
4295 * linux-arm-low.c (arm_new_fork): New function.
4296 (the_low_target) <new_fork>: Initialize new member.
4297 * linux-low.c (handle_extended_wait): Call new target function
4298 new_fork.
4299 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4300 * linux-mips-low.c (mips_add_watchpoint): New function
4301 extracted from mips_insert_point.
4302 (the_low_target) <new_fork>: Initialize new member.
4303 (mips_linux_new_fork): New function.
4304 (mips_insert_point): Call mips_add_watchpoint.
4305 * linux-x86-low.c (x86_linux_new_fork): New function.
4306 (the_low_target) <new_fork>: Initialize new member.
4307
de0d863e
DB
43082015-05-12 Don Breazeal <donb@codesourcery.com>
4309
4310 * linux-low.c (handle_extended_wait): Implement return value,
4311 rename argument 'event_child' to 'event_lwp', handle
4312 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4313 (linux_low_ptrace_options): New function.
4314 (linux_low_filter_event): Call linux_low_ptrace_options,
4315 use different argument fo linux_enable_event_reporting,
4316 use return value from handle_extended_wait.
4317 (extended_event_reported): New function.
4318 (linux_wait_1): Call extended_event_reported and set
4319 status to report fork events.
4320 (linux_write_memory): Add pid to debug message.
4321 (reset_lwp_ptrace_options_callback): New function.
4322 (linux_handle_new_gdb_connection): New function.
4323 (linux_target_ops): Initialize new structure member.
4324 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4325 * lynx-low.c: Initialize new structure member.
4326 * remote-utils.c (prepare_resume_reply): Implement stop reason
4327 "fork" for "T" stop message.
4328 * server.c (handle_query): Call handle_new_gdb_connection.
4329 * server.h (report_fork_events): Declare global flag.
4330 * target.h (struct target_ops) <handle_new_gdb_connection>:
4331 New member.
4332 (target_handle_new_gdb_connection): New macro.
4333 * win32-low.c: Initialize new structure member.
4334
ddcbc397
DB
43352015-05-12 Don Breazeal <donb@codesourcery.com>
4336
4337 * mem-break.c (APPEND_TO_LIST): Define macro.
4338 (clone_agent_expr): New function.
4339 (clone_one_breakpoint): New function.
4340 (clone_all_breakpoints): New function.
4341 * mem-break.h: Declare new functions.
4342
89245bc0
DB
43432015-05-12 Don Breazeal <donb@codesourcery.com>
4344
4345 * linux-low.c (linux_supports_fork_events): New function.
4346 (linux_supports_vfork_events): New function.
4347 (linux_target_ops): Initialize new structure members.
4348 (initialize_low): Call linux_check_ptrace_features.
4349 * lynx-low.c (lynx_target_ops): Initialize new structure
4350 members.
4351 * server.c (report_fork_events, report_vfork_events):
4352 New global flags.
4353 (handle_query): Add new features to qSupported packet and
4354 response.
4355 (captured_main): Initialize new global variables.
4356 * target.h (struct target_ops) <supports_fork_events>:
4357 New member.
4358 <supports_vfork_events>: New member.
4359 (target_supports_fork_events): New macro.
4360 (target_supports_vfork_events): New macro.
4361 * win32-low.c (win32_target_ops): Initialize new structure
4362 members.
4363
835205d0
GB
43642015-05-12 Gary Benson <gbenson@redhat.com>
4365
4366 * server.c (handle_qxfer_exec_file): Use current process
4367 if annex is empty.
4368
21e94bd9
SL
43692015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4370
4371 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4372 Remove HAVE_PTRACE_GETREGS conditionals.
4373 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4374 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4375
45614f15
YQ
43762015-05-08 Yao Qi <yao.qi@linaro.org>
4377
4378 * linux-low.c (linux_supports_conditional_breakpoints): New
4379 function.
4380 (linux_target_ops): Install new target method.
4381 * lynx-low.c (lynx_target_ops): Install NULL hook for
4382 supports_conditional_breakpoints.
4383 * nto-low.c (nto_target_ops): Likewise.
4384 * spu-low.c (spu_target_ops): Likewise.
4385 * win32-low.c (win32_target_ops): Likewise.
4386 * server.c (handle_query): Check
4387 target_supports_conditional_breakpoints.
4388 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4389 New field.
4390 (target_supports_conditional_breakpoints): New macro.
4391
80ad801e
PA
43922015-05-06 Pedro Alves <palves@redhat.com>
4393
4394 PR server/18081
4395 * server.c (start_inferior): If the process exits, mourn it.
4396
819843c7
GB
43972015-04-21 Gary Benson <gbenson@redhat.com>
4398
4399 * hostio.c (fileio_open_flags_to_host): Factored out to
4400 fileio_to_host_openflags in common/fileio.c. Single use
4401 updated.
4402
a2d5a9d7
MF
44032015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4404
4405 * linux-xtensa-low.c (xtensa_fill_gregset)
4406 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4407 XCHAL_HAVE_LOOP.
4408
deb44829
MF
44092015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4410
4411 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4412 (regs_info): Replace usrregs pointer with NULL.
4413
e57f1de3
GB
44142015-04-17 Gary Benson <gbenson@redhat.com>
4415
4416 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4417 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4418 * server.c (handle_qxfer_exec_file): New function.
4419 (qxfer_packets): Add exec-file entry.
4420 (handle_query): Report qXfer:exec-file:read as supported packet.
4421
62828379
RN
44222015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4423
4424 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4425
b88bb450
GB
44262015-04-09 Gary Benson <gbenson@redhat.com>
4427
4428 * hostio-errno.c (errno_to_fileio_error): Remove function.
4429 Update caller to use remote_fileio_to_fio_error.
4430
c8f4bfdd
YQ
44312015-04-09 Yao Qi <yao.qi@linaro.org>
4432
4433 * linux-low.c (linux_insert_point): Call
4434 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4435 (linux_remove_point): Call remove_memory_breakpoint if type is
4436 raw_bkpt_type_sw.
4437 * linux-x86-low.c (x86_insert_point): Don't call
4438 insert_memory_breakpoint.
4439 (x86_remove_point): Don't call remove_memory_breakpoint.
4440
41f98f02
PA
44412015-04-01 Pedro Alves <palves@redhat.com>
4442 Cleber Rosa <crosa@redhat.com>
4443
4444 * server.c (gdbserver_usage): Reorganize and extend the usage
4445 message.
4446
2bf6fb9d
PA
44472015-03-24 Pedro Alves <palves@redhat.com>
4448
4449 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4450 output. Also dump TRAP_TRACE.
4451 (linux_low_filter_event): In debug output, distinguish a
4452 resume_stop SIGSTOP from a delayed SIGSTOP.
4453
369f6daa
GB
44542015-03-24 Gary Benson <gbenson@redhat.com>
4455
4456 * linux-x86-low.c (x86_linux_new_thread): Moved to
4457 nat/x86-linux.c.
4458 (x86_linux_prepare_to_resume): Likewise.
4459
8e5d4070
GB
44602015-03-24 Gary Benson <gbenson@redhat.com>
4461
4462 * Makefile.in (x86-linux-dregs.o): New rule.
4463 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4464 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4465 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4466 (x86_linux_dr_get): Likewise.
4467 (x86_linux_dr_set): Likewise.
4468 (update_debug_registers_callback): Likewise.
4469 (x86_linux_dr_set_addr): Likewise.
4470 (x86_linux_dr_get_addr): Likewise.
4471 (x86_linux_dr_set_control): Likewise.
4472 (x86_linux_dr_get_control): Likewise.
4473 (x86_linux_dr_get_status): Likewise.
4474 (x86_linux_update_debug_registers): Likewise.
4475
2b95d440
GB
44762015-03-24 Gary Benson <gbenson@redhat.com>
4477
4478 * linux-x86-low.c (x86_linux_update_debug_registers):
4479 New function, factored out from...
4480 (x86_linux_prepare_to_resume): ...this.
4481
14b0bc68
GB
44822015-03-24 Gary Benson <gbenson@redhat.com>
4483
4484 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4485 (x86_linux_dr_set): Likewise.
4486 (update_debug_registers_callback): Likewise.
4487 (x86_linux_dr_set_addr): Likewise.
4488 (x86_linux_dr_get_addr): Likewise.
4489 (x86_linux_dr_set_control): Likewise.
4490 (x86_linux_dr_get_control): Likewise.
4491 (x86_linux_dr_get_status): Likewise.
4492 (x86_linux_prepare_to_resume): Likewise.
4493
5dfe6ca8
GB
44942015-03-24 Gary Benson <gbenson@redhat.com>
4495
4496 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4497 Use perror_with_name. Pass string through gettext.
4498 (x86_linux_dr_set): Likewise.
4499
d33472ad
GB
45002015-03-24 Gary Benson <gbenson@redhat.com>
4501
4502 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4503 (x86_linux_dr_set_addr): ...this.
4504 (x86_dr_low_get_addr): Rename to...
4505 (x86_linux_dr_get_addr): ...this.
4506 (x86_dr_low_set_control): Rename to...
4507 (x86_linux_dr_set_control): ...this.
4508 (x86_dr_low_get_control): Rename to...
4509 (x86_linux_dr_get_control): ...this.
4510 (x86_dr_low_get_status): Rename to...
4511 (x86_linux_dr_get_status): ...this.
4512 (x86_dr_low): Update with new function names.
4513
4b134ca1
GB
45142015-03-24 Gary Benson <gbenson@redhat.com>
4515
4516 * Makefile.in (x86-linux.o): New rule.
4517 * configure.srv: Add x86-linux.o to relevant targets.
4518 * linux-low.c (lwp_set_arch_private_info): New function.
4519 (lwp_arch_private_info): Likewise.
4520 * linux-x86-low.c: Include nat/x86-linux.h.
4521 (arch_lwp_info): Removed structure.
4522 (update_debug_registers_callback):
4523 Use lwp_set_debug_registers_changed.
4524 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4525 and lwp_set_debug_registers_changed.
4526 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4527
34c703da
GB
45282015-03-24 Gary Benson <gbenson@redhat.com>
4529
4530 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4531 * linux-arm-low.c (arm_new_thread): Likewise.
4532 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4533 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4534 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4535 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4536
cff068da
GB
45372015-03-24 Gary Benson <gbenson@redhat.com>
4538
4539 * linux-low.c (ptid_of_lwp): New function.
4540 (lwp_is_stopped): Likewise.
4541 (lwp_stop_reason): Likewise.
4542 * linux-x86-low.c (update_debug_registers_callback):
4543 Use lwp_is_stopped.
4544 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4545 lwp_stop_reason.
4546
b2f7c7e8
GB
45472015-03-24 Gary Benson <gbenson@redhat.com>
4548
4549 * linux-low.h (linux_stop_lwp): Remove declaration.
4550
6d4ee8c6
GB
45512015-03-24 Gary Benson <gbenson@redhat.com>
4552
4553 * linux-low.h: Include nat/linux-nat.h.
4554 * linux-low.c (iterate_over_lwps_args): New structure.
4555 (iterate_over_lwps_filter): New function.
4556 (iterate_over_lwps): Likewise.
4557 * linux-x86-low.c (update_debug_registers_callback):
4558 Update signature to what iterate_over_lwps expects.
4559 Remove PID check that iterate_over_lwps now performs.
4560 (x86_dr_low_set_addr): Use iterate_over_lwps.
4561 (x86_dr_low_set_control): Likewise.
4562
70a0bb6b
GB
45632015-03-24 Gary Benson <gbenson@redhat.com>
4564
4565 * linux-x86-low.c (x86_debug_reg_state): New function.
4566 (x86_linux_prepare_to_resume): Use the above.
4567
7b669087
GB
45682015-03-24 Gary Benson <gbenson@redhat.com>
4569
4570 * linux-low.c (current_lwp_ptid): New function.
4571 * linux-x86-low.c: Include nat/linux-nat.h.
4572 (x86_dr_low_get_addr): Use current_lwp_ptid.
4573 (x86_dr_low_get_control): Likewise.
4574 (x86_dr_low_get_status): Likewise.
4575
eef49a3d
PA
45762015-03-20 Pedro Alves <palves@redhat.com>
4577
4578 * tracepoint.c (cmd_qtstatus): Make "str" const.
4579
b2333d22
PA
45802015-03-20 Pedro Alves <palves@redhat.com>
4581
4582 * server.c (handle_general_set): Make "req_str" const.
4583
23f238d3
PA
45842015-03-19 Pedro Alves <palves@redhat.com>
4585
4586 * linux-low.c (linux_resume_one_lwp): Rename to ...
4587 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4588 instead call perror_with_name.
4589 (check_ptrace_stopped_lwp_gone): New function.
4590 (linux_resume_one_lwp): Reimplement as wrapper around
4591 linux_resume_one_lwp_throw that swallows errors if the LWP is
4592 gone.
4593
91baf43f
PA
45942015-03-19 Pedro Alves <palves@redhat.com>
4595
4596 * linux-low.c (count_events_callback, select_event_lwp_callback):
4597 No longer check whether the thread has resume_stop as last resume
4598 kind.
4599
8bf3b159
PA
46002015-03-19 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (count_events_callback, select_event_lwp_callback):
4603 Use the lwp's status_pending_p field, not the thread's.
4604
b90fc188
PA
46052015-03-19 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (select_event_lwp_callback): Update comments to
4608 no longer mention SIGTRAP.
4609
464b0089
GB
46102015-03-18 Gary Benson <gbenson@redhat.com>
4611
4612 * server.c (handle_query): Do not report vFile:fstat as supported.
4613
aa9e327f
GB
46142015-03-11 Gary Benson <gbenson@redhat.com>
4615
4616 * hostio.c (sys/types.h): New include.
4617 (sys/stat.h): Likewise.
4618 (common-remote-fileio.h): Likewise.
4619 (handle_fstat): New function.
4620 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4621
791c0056
GB
46222015-03-11 Gary Benson <gbenson@redhat.com>
4623
4624 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4625 struct stat.st_blocks and struct stat.st_blksize.
4626 * configure: Regenerate.
4627 * config.in: Likewise.
4628 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4629 (OBS): Add common-remote-fileio.o.
4630 (common-remote-fileio.o): New rule.
4631
9a9df970
PA
46322015-03-09 Pedro Alves <palves@redhat.com>
4633
4634 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4635 'struct sockaddr' pointer in 'accept' call.
4636
9eb1356e
PA
46372015-03-09 Pedro Alves <palves@redhat.com>
4638
4639 Revert:
4640 2015-03-07 Pedro Alves <palves@redhat.com>
4641 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4642 or <winsock2.h> here. Instead include "gdb_socket.h".
4643 (remote_open): Use union gdb_sockaddr_u.
4644 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4645 or <winsock2.h> here. Instead include "gdb_socket.h".
4646 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4647 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4648 or <sys/un.h>.
4649 (init_named_socket, gdb_agent_helper_thread): Use union
4650 gdb_sockaddr_u.
4651
aac331e4
PA
46522015-03-07 Pedro Alves <palves@redhat.com>
4653
4654 * configure.ac (build_warnings): Move
4655 -Wdeclaration-after-statement to the C-specific set.
4656 * configure: Regenerate.
4657
366c75fc
PA
46582015-03-07 Pedro Alves <palves@redhat.com>
4659
4660 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4661 or <winsock2.h> here. Instead include "gdb_socket.h".
4662 (remote_open): Use union gdb_sockaddr_u.
4663 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4664 or <winsock2.h> here. Instead include "gdb_socket.h".
4665 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4666 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4667 or <sys/un.h>.
4668 (init_named_socket, gdb_agent_helper_thread): Use union
4669 gdb_sockaddr_u.
4670
492d29ea
PA
46712015-03-07 Pedro Alves <palves@redhat.com>
4672
4673 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4674 instead.
4675
60a191ed
YQ
46762015-03-06 Yao Qi <yao.qi@linaro.org>
4677
4678 * linux-aarch64-low.c (aarch64_insert_point): Use
4679 show_debug_regs as a boolean.
4680 (aarch64_remove_point): Likewise.
4681
f5771b1d
PA
46822015-03-05 Pedro Alves <palves@redhat.com>
4683
4684 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4685 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4686 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4687 * nto-low.c (nto_target_ops): Likewise.
4688 * spu-low.c (spu_target_ops): Likewise.
4689 * win32-low.c (win32_target_ops): Likewise.
4690
3e572f71
PA
46912015-03-04 Pedro Alves <palves@redhat.com>
4692
72f4393d 4693 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4694 Decide whether a breakpoint triggered based on the SIGTRAP's
4695 siginfo.si_code.
72f4393d
L
4696 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4697 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4698 (linux_low_filter_event): Check for breakpoints before checking
4699 watchpoints.
4700 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4701 siginfo.si_code.
72f4393d
L
4702 (linux_stopped_by_sw_breakpoint)
4703 (linux_supports_stopped_by_sw_breakpoint)
4704 (linux_stopped_by_hw_breakpoint)
4705 (linux_supports_stopped_by_hw_breakpoint): New functions.
4706 (linux_target_ops): Install new target methods.
3e572f71 4707
1ec68e26
PA
47082015-03-04 Pedro Alves <palves@redhat.com>
4709
4710 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4711 * server.c (swbreak_feature, hwbreak_feature): New globals.
4712 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4713 (captured_main): Clear swbreak_feature and hwbreak_feature.
4714 * server.h (swbreak_feature, hwbreak_feature): Declare.
4715 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4716 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4717 supports_stopped_by_hw_breakpoint>: New fields.
4718 (target_supports_stopped_by_sw_breakpoint)
4719 (target_stopped_by_sw_breakpoint)
4720 (target_supports_stopped_by_hw_breakpoint)
4721 (target_stopped_by_hw_breakpoint): Declare.
4722
15c66dd6
PA
47232015-03-04 Pedro Alves <palves@redhat.com>
4724
4725 enum lwp_stop_reason -> enum target_stop_reason
4726 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4727 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4728 (linux_wait_1, stuck_in_jump_pad_callback)
4729 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4730 (linux_stopped_by_watchpoint):
4731 * linux-low.h (enum lwp_stop_reason): Delete.
4732 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4733 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4734
98fc70d6
YQ
47352015-03-04 Yao Qi <yao.qi@linaro.org>
4736
4737 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4738
dd2ac174
GB
47392015-03-03 Gary Benson <gbenson@redhat.com>
4740
4741 * hostio.c (handle_vFile): Fix prefix lengths.
4742
d68e53f4
MM
47432015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4744
4745 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4746 ptr_bits.
4747
bf2d68ab
AA
47482015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4749
4750 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4751 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4752 (clean): Add "rm -f" for above C files.
4753 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4754 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4755 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4756 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4757 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4758 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4759 (init_registers_s390x_vx_linux64)
4760 (init_registers_s390x_tevx_linux64)
4761 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4762 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4763 declarations.
4764 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4765 (s390_store_vxrs_high): New functions.
4766 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4767 NT_S390_VXRS_HIGH.
4768 (s390_arch_setup): Add logic for selecting one of the new target
4769 descriptions. Activate the new vector regsets if applicable.
4770 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4771 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4772 and init_registers_s390x_tevx_linux64.
4773
c966a859
PA
47742015-03-01 Pedro Alves <palves@redhat.com>
4775
4776 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4777 parameter.
4778
4180215b
PA
47792015-02-27 Pedro Alves <palves@redhat.com>
4780
4781 * linux-x86-low.c (u_debugreg_offset): New function.
4782 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4783
749bab01
PA
47842015-02-27 Pedro Alves <palves@redhat.com>
4785
4786 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4787 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4788 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4789 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4790 (ps_lsetfpregs, ps_getpid)
4791 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4792 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4793 (ps_lsetxregs, ps_plog): Declare.
4794
3c14e5a3
PA
47952015-02-27 Pedro Alves <palves@redhat.com>
4796
4797 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4798 IP_AGENT_EXPORT_FUNC.
4799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4800 IP_AGENT_EXPORT_FUNC.
4801 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4802 (IP_AGENT_EXPORT): Delete.
4803 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4804 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4805 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4806 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4807 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4808 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4809 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4810 (traceframe_read_count, traceframe_write_count)
4811 (traceframes_created, trace_state_variables, get_raw_reg)
4812 (get_trace_state_variable_value, set_trace_state_variable_value)
4813 (ust_loaded, helper_thread_id, cmd_buf): Use
4814 IPA_SYM_EXPORTED_NAME.
4815 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4816 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4817 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4818 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4819 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4820 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4821 EXTERN_C_PUSH/EXTERN_C_POP.
4822 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4823 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4824 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4825 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4826 (traceframe_write_count, traceframe_read_count)
4827 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4828 (about_to_request_buffer_space, get_trace_state_variable_value)
4829 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4830 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4831 EXTERN_C_PUSH/EXTERN_C_POP.
4832 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4833 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4834 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4835 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4836 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4837 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4838 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4839 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4840 Define.
4841 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4842 (IP_AGENT_EXPORT_VAR_DECL): Define.
4843 (tracing): Declare.
4844 (gdb_agent_get_raw_reg): Declare.
4845
fe978cb0
PA
48462015-02-27 Tom Tromey <tromey@redhat.com>
4847 Pedro Alves <palves@redhat.com>
4848
4849 Rename symbols whose names are reserved C++ keywords throughout.
4850
3bc3d82a
PA
48512015-02-27 Pedro Alves <palves@redhat.com>
4852
4853 * Makefile.in (COMPILER): New, get it from autoconf.
4854 (CXX): Get from autoconf instead.
4855 (COMPILE.pre): Use COMPILER.
4856 (CC-LD): Rename to ...
4857 (CC_LD): ... this. Use COMPILER.
4858 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4859 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4860 * acinclude.m4: Include build-with-cxx.m4.
4861 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4862 Disable -Werror by default if building in C++ mode.
4863 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4864 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4865 the C++ compiler. Save/restore CXXFLAGS too.
4866 * configure: Regenerate.
4867
07697489
PA
48682015-02-27 Pedro Alves <palves@redhat.com>
4869
4870 * acinclude.m4: Include libiberty.m4.
4871 * configure.ac: Call libiberty_INIT.
4872 * config.in, configure: Regenerate.
4873
9beb7c4e
PA
48742015-02-26 Pedro Alves <palves@redhat.com>
4875
4876 * linux-low.c (linux_wait_1): When incrementing the PC past a
4877 program breakpoint always use the_low_target.breakpoint_len as
4878 increment, rather than the maximum between that and
4879 the_low_target.decr_pc_after_break.
4880
8090aef2
PA
48812015-02-23 Pedro Alves <palves@redhat.com>
4882
4883 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4884 thread was doing a step-over; always adjust the PC if
4885 we stepped over a permanent breakpoint.
4886 (linux_wait_1): If we stepped over breakpoint that was on top of a
4887 permanent breakpoint, manually advance the PC past it.
4888
bc9540e8
PA
48892015-02-23 Pedro Alves <palves@redhat.com>
4890
4891 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4892 modes.
4893 (x86_fill_gregset, x86_store_gregset): Use it when handling
4894 $orig_eax.
4895
2db9a427
PA
48962015-02-20 Pedro Alves <palves@redhat.com>
4897
4898 * thread-db.c: Include "nat/linux-procfs.h".
4899 (thread_db_init): Skip listing new threads if the kernel supports
4900 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4901
afa8d396
PA
49022015-02-20 Pedro Alves <palves@redhat.com>
4903
4904 * linux-low.c (status_pending_p_callback): Use ptid_match.
4905
c9587f88
AT
49062015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4907
4908 PR breakpoints/16812
4909 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4910 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4911 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4912
b05ec7a5
AT
49132015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4914
4915 PR breakpoints/15956
4916 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4917
d33501a5
MM
49182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4919
4920 * linux-low.c (linux_low_btrace_conf): Print size.
4921 * server.c (handle_btrace_conf_general_set): New.
4922 (hanle_general_set): Call handle_btrace_conf_general_set.
4923 (handle_query): Report Qbtrace-conf:bts:size as supported.
4924
f4abbc16
MM
49252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4926
4927 * linux-low.c (linux_low_enable_btrace): Update parameters.
4928 (linux_low_btrace_conf): New.
4929 (linux_target_ops)<to_btrace_conf>: Initialize.
4930 * server.c (current_btrace_conf): New.
4931 (handle_btrace_enable): Rename to ...
4932 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4933 to target_enable_btrace. Update comment. Update users.
4934 (handle_qxfer_btrace_conf): New.
4935 (qxfer_packets): Add btrace-conf entry.
4936 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4937 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4938 (target_ops)<read_btrace_conf>: New.
4939 (target_enable_btrace): Update parameters.
4940 (target_read_btrace_conf): New.
4941
043c3577
MM
49422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4943
4944 * server.c (handle_btrace_general_set): Remove call to
4945 target_supports_btrace.
4946 (supported_btrace_packets): New.
4947 (handle_query): Call supported_btrace_packets.
4948 * target.h: include btrace-common.h.
4949 (btrace_target_info): Removed.
4950 (supports_btrace, target_supports_btrace): Update parameters.
4951
734b0e4b
MM
49522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4953
4954 * Makefile.in (SFILES): Add common/btrace-common.c.
4955 (OBS): Add common/btrace-common.o.
4956 (btrace-common.o): Add build rules.
4957 * linux-low: Include btrace-common.h.
4958 (linux_low_read_btrace): Use struct btrace_data. Call
4959 btrace_data_init and btrace_data_fini.
4960
d6c146e9
PA
49612015-02-06 Pedro Alves <palves@redhat.com>
4962
4963 * thread-db.c (find_new_threads_callback): Add debug output.
4964
20ba1ce6
PA
49652015-02-04 Pedro Alves <palves@redhat.com>
4966
4967 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4968 (resume_stopped_resumed_lwps): New function.
4969 (linux_wait_for_event_filtered): Use it.
4970
8cc73a39
SDJ
49712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4972
4973 * Makefile.in (SFILES): Add linux-personality.c.
4974 (linux-personality.o): New rule.
4975 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4976 list of objects to be built.
4977 * linux-low.c: Include nat/linux-personality.h.
4978 (linux_create_inferior): Remove code to disable address space
4979 randomization (moved to ../nat/linux-personality.c). Create
4980 cleanup to disable address space randomization.
4981
fb23d554
SDJ
49822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4983
4984 * Makefile.in (posix-strerror.o): New rule.
4985 (mingw-strerror.o): Likewise.
4986 * configure: Regenerated.
4987 * configure.ac: Source file ../common/common.host. Initialize new
4988 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4989
cdf43629
YQ
49902015-01-14 Yao Qi <yao@codesourcery.com>
4991
4992 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4993 (ppc-linux.o): New rule.
4994 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4995 * configure.ac: AC_CHECK_FUNCS(getauxval).
4996 * config.in: Re-generated.
4997 * configure: Re-generated.
4998 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4999 ppc64_64bit_inferior_p
5000
514c5338
YQ
50012015-01-14 Yao Qi <yao@codesourcery.com>
5002
5003 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5004 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5005 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5006 (PT_ORIG_R3, PT_TRAP): Likewise.
5007 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5008 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5009 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5010
3368c1e5
JB
50112015-01-10 Joel Brobecker <brobecker@adacore.com>
5012
5013 * i387-fp.c (i387_cache_to_xsave): In look over
5014 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5015 zmmh_low_space field by use of zmmh_high_space.
5016
582511be
PA
50172015-01-09 Pedro Alves <palves@redhat.com>
5018
5019 * linux-low.c (step_over_bkpt): Move higher up in the file.
5020 (handle_extended_wait): Don't store the stop_pc here.
5021 (get_stop_pc): Adjust comments and rename to ...
5022 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5023 stopped for a software breakpoint or hardware breakpoint.
5024 (thread_still_has_status_pending_p): New function.
5025 (status_pending_p_callback): Use
5026 thread_still_has_status_pending_p. If the event is no longer
5027 interesting, resume the LWP.
5028 (handle_tracepoints): Add assert.
5029 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5030 (wstatus_maybe_breakpoint): New function.
5031 (cancel_breakpoint): Delete function.
5032 (check_stopped_by_watchpoint): New function, factored out from
5033 linux_low_filter_event.
5034 (lp_status_maybe_breakpoint): Delete function.
5035 (linux_low_filter_event): Remove filter_ptid argument.
5036 Leave thread group exits pending here. Store the LWP's stop PC.
5037 Always leave events pending.
5038 (linux_wait_for_event_filtered): Pull all events out of the
5039 kernel, and leave them all pending.
5040 (count_events_callback, select_event_lwp_callback): Consider all
5041 events.
5042 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5043 (select_event_lwp): Only give preference to the stepping LWP in
5044 all-stop mode. Adjust comments.
5045 (ignore_event): New function.
5046 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5047 references to cancel_breakpoints. Adjust to renames. Also give
5048 equal priority to all LWPs that have had events in non-stop mode.
5049 If reporting a software breakpoint event, unadjust the LWP's PC.
5050 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5051 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5052 Adjust.
5053 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5054 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5055 (linux_stopped_by_watchpoint): Adjust.
5056 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5057 * linux-low.h (enum lwp_stop_reason): New.
5058 (struct lwp_info) <stop_pc>: Adjust comment.
5059 <stopped_by_watchpoint>: Delete field.
5060 <stop_reason>: New field.
5061 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5062 * mem-break.c (software_breakpoint_inserted_here)
5063 (hardware_breakpoint_inserted_here): New function.
5064 * mem-break.h (software_breakpoint_inserted_here)
5065 (hardware_breakpoint_inserted_here): Declare.
5066 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5067 (cancel_breakpoints): Delete.
5068 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5069 (upload_fast_traceframes): Remove references to
5070 cancel_breakpoints.
5071
a33e3959
PA
50722015-01-09 Pedro Alves <palves@redhat.com>
5073
5074 * thread-db.c (find_new_threads_callback): Ignore thread if the
5075 kernel thread ID is -1.
5076
8784d563
PA
50772015-01-09 Pedro Alves <palves@redhat.com>
5078
5079 * linux-low.c (linux_attach_fail_reason_string): Move to
5080 nat/linux-ptrace.c, and rename.
5081 (linux_attach_lwp): Update comment.
5082 (attach_proc_task_lwp_callback): New function.
5083 (linux_attach): Adjust to rename and use
5084 linux_proc_attach_tgid_threads.
5085 (linux_attach_fail_reason_string): Delete declaration.
5086
76f2b779
JB
50872015-01-01 Joel Brobecker <brobecker@adacore.com>
5088
5089 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5090 * server.c (gdbserver_version): Likewise.
5091
fafcc06a
SDJ
50922014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5093
5094 * remote-utils.c: Include ctype.h.
5095 (input_interrupt): Explicitly handle the case when the char
5096 received is the NUL byte. Improve the printing of non-ASCII
5097 characters.
5098
beed38b8
JB
50992014-12-16 Joel Brobecker <brobecker@adacore.com>
5100
5101 * linux-low.c (linux_low_filter_event): Update call to
5102 linux_enable_event_reporting following the addition of
5103 a new parameter to that function.
5104
bf330350
CU
51052014-12-16 Catalin Udma <catalin.udma@freescale.com>
5106
5107 PR server/17457
5108 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5109 (AARCH64_FPCR_REGNO): Likewise.
5110 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5111 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5112 (aarch64_store_fpregset): Likewise.
5113
5227d625
JB
51142014-12-15 Joel Brobecker <brobecker@adacore.com>
5115
5116 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5117 Remove FIXME comment about assumption about N.
5118
f93b65a0
JB
51192014-12-13 Joel Brobecker <brobecker@adacore.com>
5120
5121 * configure.ac: If large-file support is disabled in GDBserver,
5122 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5123 * configure: Regenerate.
5124
e5a9158d
AA
51252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5126
5127 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5128 warning upon ENODATA from ptrace.
5129 * linux-s390-low.c (s390_store_tdb): New.
5130 (s390_regsets): Add regset for NT_S390_TDB.
5131
feea5f36
AA
51322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5133
5134 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5135 without a fill_function.
5136 * linux-s390-low.c (s390_fill_last_break): Remove.
5137 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5138 (s390_arch_setup): Use regset's size instead of fill_function for
5139 loop end condition.
5140
098dbe61
AA
51412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5142
5143 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5144 the regset's store function when ptrace returned an error.
5145 * regcache.c (get_thread_regcache): Invalidate register cache
5146 before fetching inferior's registers.
5147
28eef672
AA
51482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5149
5150 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5151 while-loop as for-loop.
5152 (regsets_store_inferior_registers): Likewise.
5153
bdca27a2
YQ
51542014-11-28 Yao Qi <yao@codesourcery.com>
5155
5156 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5157 * config.in, configure: Re-generate.
5158 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5159 is defined.
5160
9c232dda
YQ
51612014-11-21 Yao Qi <yao@codesourcery.com>
5162
5163 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5164 (AC_CHECK_HEADERS): Remove malloc.h.
5165 * configure: Re-generated.
5166 * config.in: Re-generated.
5167 * server.h: Don't include alloca.h and malloc.h.
5168 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5169 Don't include malloc.h.
5170
43968415
JB
51712014-11-17 Joel Brobecker <brobecker@adacore.com>
5172
5173 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5174 corresponding ERRNO check in same block.
5175
40e91bc7
PA
51762014-11-12 Pedro Alves <palves@redhat.com>
5177
5178 * server.c (cont_thread): Update comment.
5179 (start_inferior, attach_inferior): No longer clear cont_thread.
5180 (handle_v_cont): No longer set cont_thread.
5181 (captured_main): Clear cont_thread each time a GDB connects.
5182
c2c118cf
PA
51832014-11-12 Pedro Alves <palves@redhat.com>
5184
5185 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5186 thread, and don't resume all threads if the Hc thread has exited.
5187
78708b7c
PA
51882014-11-12 Pedro Alves <palves@redhat.com>
5189
5190 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5191 the process group instead of to a specific LWP.
5192
a2abc7de
PA
51932014-10-15 Pedro Alves <palves@redhat.com>
5194
5195 PR server/17487
5196 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5197 parameter.
5198 (arm_set_thread_context): Delete.
5199 (the_low_target): Adjust.
5200 * win32-i386-low.c (debug_registers_changed)
5201 (debug_registers_used): Delete.
5202 (update_debug_registers_callback): New function.
5203 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5204 needing to update their debug registers.
5205 (win32_get_current_dr): New function.
5206 (x86_dr_low_get_addr, x86_dr_low_get_control)
5207 (x86_dr_low_get_status): Fetch the debug register from the thread
5208 record's context.
5209 (i386_initial_stuff): Adjust.
5210 (i386_get_thread_context): Remove current_event parameter. Don't
5211 clear debug_registers_changed nor copy DR values to
5212 debug_reg_state.
5213 (i386_set_thread_context): Delete.
5214 (i386_prepare_to_resume): New function.
5215 (i386_thread_added): Mark the thread as needing to update irs
5216 debug registers.
5217 (the_low_target): Remove i386_set_thread_context and install
5218 i386_prepare_to_resume.
5219 * win32-low.c (win32_get_thread_context): Adjust.
5220 (win32_set_thread_context): Use SetThreadContext
5221 directly.
5222 (win32_prepare_to_resume): New function.
5223 (win32_require_context): New function, factored out from ...
5224 (thread_rec): ... this.
5225 (continue_one_thread): Call win32_prepare_to_resume on each thread
5226 we're about to continue.
5227 (win32_resume): Call win32_prepare_to_resume on the event thread.
5228 * win32-low.h (struct win32_thread_info)
5229 <debug_registers_changed>: New field.
5230 (struct win32_target_ops): Change prototype of set_thread_context,
5231 delete set_thread_context and add prepare_to_resume.
5232 (win32_require_context): New declaration.
5233
a442d071
GB
52342014-10-08 Gary Benson <gbenson@redhat.com>
5235
5236 * server.h: Do not include common-exceptions.h.
5237
6f1947e8
GB
52382014-10-08 Gary Benson <gbenson@redhat.com>
5239
5240 * server.h: Do not include cleanups.h.
5241
63b434a4
JH
52422014-09-30 James Hogan <james.hogan@imgtec.com>
5243
5244 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5245 mips64-dsp-linux.c.
5246
c4d9ceb6
YQ
52472014-09-23 Yao Qi <yao@codesourcery.com>
5248
5249 * linux-low.c (lp_status_maybe_breakpoint): New function.
5250 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5251 (count_events_callback): Likewise.
5252 (select_event_lwp_callback): Likewise.
5253 (cancel_breakpoints_callback): Likewise.
5254
89a5711c
DB
52552014-09-19 Don Breazeal <donb@codesourcery.com>
5256
5257 * linux-low.c (handle_extended_wait): Call
5258 linux_ptrace_get_extended_event.
5259 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5260 linux_is_extended_waitstatus.
5261
bffc0964
JB
52622014-09-16 Joel Brobecker <brobecker@adacore.com>
5263
5264 * Makefile.in (CPPFLAGS): Define.
5265 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5266 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5267
0bfdf32f
GB
52682014-09-16 Gary Benson <gbenson@redhat.com>
5269
5270 * inferiors.h (current_inferior): Renamed as...
5271 (current_thread): New variable. All uses updated.
5272 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5273 (maybe_move_out_of_jump_pad): Likewise.
5274 (cancel_breakpoint): Likewise.
5275 (linux_low_filter_event): Likewise.
5276 (wait_for_sigstop): Likewise.
5277 (linux_resume_one_lwp): Likewise.
5278 (need_step_over_p): Likewise.
5279 (start_step_over): Likewise.
5280 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5281 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5282 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5283 and save_inferior as saved_thread.
5284 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5285 saved_thread.
5286 (regcache_invalidate_thread): Likewise.
5287 * remote-utils.c (prepare_resume_reply): Likewise.
5288 * thread-db.c (thread_db_get_tls_address): Likewise.
5289 (disable_thread_event_reporting): Likewise.
5290 (remove_thread_event_breakpoints): Likewise.
5291 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5292 as saved_thread.
5293 * target.h (set_desired_inferior): Renamed as...
5294 (set_desired_thread): New declaration. All uses updated.
5295 * server.c (myresume): Updated comment to reference thread instead
5296 of inferior.
5297 (handle_serial_event): Likewise.
5298 (handle_target_event): Likewise.
5299
361c8ade
GB
53002014-09-12 Tom Tromey <tromey@redhat.com>
5301 Gary Benson <gbenson@redhat.com>
5302
5303 * regcache.h: Include common-regcache.h.
5304 (regcache_read_pc): Don't declare.
5305 * regcache.c (get_thread_regcache_for_ptid): New function.
5306
bd9269f7
GB
53072014-09-11 Tom Tromey <tromey@redhat.com>
5308 Gary Benson <gbenson@redhat.com>
5309
5310 * symbol.c: New file.
5311 * Makefile.in (SFILES): Add symbol.c.
5312 (OBS): Add symbol.o.
5313
f8c1d06b
GB
53142014-09-11 Gary Benson <gbenson@redhat.com>
5315
5316 * target.c (target_stop_ptid, target_continue_ptid): New
5317 functions.
5318
721ec300
GB
53192014-09-11 Tom Tromey <tromey@redhat.com>
5320 Gary Benson <gbenson@redhat.com>
5321
5322 * target.h: Include target/target.h.
5323 * target.c (target_read_memory, target_read_uint32)
5324 (target_write_memory): New functions.
5325
c5e92cca
GB
53262014-09-11 Gary Benson <gbenson@redhat.com>
5327
5328 * server.h (debug_hw_points): Don't declare.
5329 * server.c (debug_hw_points): Don't define. Replace all uses
5330 with show_debug_regs.
5331 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5332 all uses with show_debug_regs.
5333
2e4bb98a
EBM
53342014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5335
5336 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5337 endianness into account.
5338 (ppc_supply_ptrace_register): Likewise.
5339
ac740bc7
JH
53402014-09-03 James Hogan <james.hogan@imgtec.com>
5341
5342 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5343 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5344
97ea6506
GB
53452014-09-03 Gary Benson <gbenson@redhat.com>
5346
5347 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5348 ALL_DEBUG_ADDRESS_REGISTERS.
5349
df7e5265
GB
53502014-09-02 Gary Benson <gbenson@redhat.com>
5351
5352 * i386-low.h: Renamed as...
5353 * x86-low.h: New file. All type, function and variable name
5354 prefixes changed from "i386_" to "x86_". All references updated.
5355 * i386-low.c: Renamed as...
5356 * x86-low.c: New file. All type, function and variable name
5357 prefixes changed from "i386_" to "x86_". All references updated.
5358
ed859da7
GB
53592014-09-02 Gary Benson <gbenson@redhat.com>
5360
5361 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5362 (x86_linux_new_thread): Likewise.
5363
860789c7
GB
53642014-08-29 Gary Benson <gbenson@redhat.com>
5365
5366 * server.h (setjmp.h): Do not include.
5367 (toplevel): Do not declare.
5368 (common-exceptions.h): Include.
5369 (cleanups.h): Likewise.
5370 * server.c (toplevel): Do not define.
5371 (exit_code): New static global.
5372 (detach_or_kill_for_exit_cleanup): New function.
5373 (main): New function. Original main renamed to...
5374 (captured_main): New function.
5375 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5376
ff55e1b5
GB
53772014-08-29 Gary Benson <gbenson@redhat.com>
5378
5379 * Makefile.in (SFILES): Add common/common-exceptions.c.
5380 (OBS): Add common-exceptions.o.
5381 (common-exceptions.o): New rule.
5382 * utils.c (prepare_to_throw_exception): New function.
5383
e9bcb658
GB
53842014-08-29 Gary Benson <gbenson@redhat.com>
5385
5386 * config.in: Regenerate.
5387 * configure: Likewise.
5388
e3180625
GB
53892014-08-29 Gary Benson <gbenson@redhat.com>
5390
5391 * Makefile.in (SFILES): Add common/cleanups.c.
5392 (OBS): cleanups.o.
5393 (cleanups.o): New rule.
5394
e3d6ba5d
GB
53952014-08-29 Gary Benson <gbenson@redhat.com>
5396
5397 * utils.c (internal_vwarning): New function.
5398
7096e886
GB
53992014-08-28 Gary Benson <gbenson@redhat.com>
5400
5401 * utils.h (fatal): Remove declaration.
5402 * utils.c (fatal): Remove function.
5403
14ce3192
GB
54042014-08-28 Gary Benson <gbenson@redhat.com>
5405
5406 * tracepoint.c (gdb_agent_init): Replace fatal with
5407 perror_with_name.
5408 (initialize_tracepoint): Likewise.
5409
50278d59
GB
54102014-08-28 Gary Benson <gbenson@redhat.com>
5411
5412 * remote-utils.c (remote_prepare): Replace fatal with error.
5413
aa96c426
GB
54142014-08-28 Gary Benson <gbenson@redhat.com>
5415
5416 * linux-low.c (linux_async): Replace fatal with warning.
5417 Tidy up and return.
5418 (linux_start_non_stop): Return -1 if linux_async failed.
5419
f7160e97
GB
54202014-08-28 Gary Benson <gbenson@redhat.com>
5421
5422 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5423 gdb_assert.
5424 (i386_dr_low_get_addr): Remove vague comment.
5425 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5426 gdb_assert.
5427
38e08fca
GB
54282014-08-28 Gary Benson <gbenson@redhat.com>
5429
5430 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5431 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5432 internal_error.
5433 (linux_resume_one_lwp): Likewise.
5434 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5435 gdb_assert.
5436 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5437 with internal_error.
5438 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5439 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5440 (find_register_by_name): Replace fatal with internal_error.
5441 (find_regno): Likewise.
5442 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5443 * thread-db.c (thread_db_create_event): Likewise.
5444 (thread_db_load_search): Likewise.
5445 (try_thread_db_load_1): Likewise.
5446 * tracepoint.c (get_jump_space_head): Replace fatal with
5447 internal_error.
5448 (claim_trampoline_space): Likewise.
5449 (have_fast_tracepoint_trampoline_buffer): Likewise.
5450 (cmd_qtstart): Likewise.
5451 (stop_tracing): Likewise.
5452 (fast_tracepoint_collecting): Likewise.
5453 (target_malloc): Likewise.
5454 (download_tracepoint): Likewise.
5455 (download_trace_state_variables): Replace check with gdb_assert.
5456 (upload_fast_traceframes): Replace fatal with internal_error.
5457
34abf635
GB
54582014-08-19 Tom Tromey <tromey@redhat.com>
5459 Gary Benson <gbenson@redhat.com>
5460
5461 * Makefile.in (SFILES): Add common/common-debug.c.
5462 (OBS): Add common-debug.o.
5463 (common-debug.o): New rule.
5464 * debug.h (debug_printf): Don't declare.
5465 * debug.c (debug_printf): Renamed and rewritten as...
5466 (debug_vprintf): New function.
5467
f6e94d78
GB
54682014-08-19 Gary Benson <gbenson@redhat.com>
5469
5470 * utils.h: Do not include print-utils.h.
5471
9239eeab
GB
54722014-08-19 Tom Tromey <tromey@redhat.com>
5473 Gary Benson <gbenson@redhat.com>
5474
5475 * server.h: Add static assertion.
5476 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5477
ef87c8bb
GB
54782014-08-19 Tom Tromey <tromey@redhat.com>
5479 Gary Benson <gbenson@redhat.com>
5480
5481 * Makefile.in (SFILES): Add common/errors.c.
5482 (OBS): Add errors.o.
5483 (IPA_OBS): Add errors-ipa.o.
5484 (errors.o): New rule.
5485 (errors-ipa.o): Likewise.
5486 * utils.h (perror_with_name, error, warning): Don't declare.
5487 * utils.c (warning): Renamed and rewritten as...
5488 (vwarning): New function.
5489 (error): Renamed and rewritten as...
5490 (verror): New function.
5491 (internal_error): Renamed and rewritten as...
5492 (internal_verror): New function.
5493
bb974a24
GB
54942014-08-07 Gary Benson <gbenson@redhat.com>
5495
5496 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5497 * configure: Regenerate.
5498 * config.in: Likewise.
5499 * server.h: Do not include errno.h.
5500 * event-loop.c: Likewise.
5501 * hostio-errno.c: Likewise.
5502 * linux-low.c: Likewise.
5503 * remote-utils.c: Likewise.
5504 * spu-low.c: Likewise.
5505 * utils.c: Likewise.
5506 * gdbreplay.c: Unconditionally include errno.h.
5507
6d3d12eb
GB
55082014-08-07 Gary Benson <gbenson@redhat.com>
5509
5510 * server.h: Do not include string.h.
5511 * event-loop.c: Likewise.
5512 * linux-low.c: Likewise.
5513 * regcache.c: Likewise.
5514 * remote-utils.c: Likewise.
5515 * spu-low.c: Likewise.
5516 * utils.c: Likewise.
5517
dccbb609
GB
55182014-08-07 Gary Benson <gbenson@redhat.com>
5519
5520 * server.h: Do not include gdb_assert.h.
5521
e76df0d0
GB
55222014-08-07 Gary Benson <gbenson@redhat.com>
5523
5524 * server.h: Do not include common-utils.h.
5525
4cb9c816
GB
55262014-08-07 Gary Benson <gbenson@redhat.com>
5527
5528 * server.h: Do not include ptid.h.
5529 * notif.h: Likewise.
5530
3995eeee
GB
55312014-08-07 Gary Benson <gbenson@redhat.com>
5532
5533 * server.h: Do not include gdb_locale.h.
5534
cb9f1a9b
GB
55352014-08-07 Gary Benson <gbenson@redhat.com>
5536
5537 * server.h: Do not include gdb/signals.h.
5538 * win32-low.c: Likewise.
5539
a5fceff8
GB
55402014-08-07 Gary Benson <gbenson@redhat.com>
5541
5542 * server.h: Do not include pathmax.h.
5543
b9391142
GB
55442014-08-07 Gary Benson <gbenson@redhat.com>
5545
5546 * server.h: Do not include libiberty.h.
5547 * linux-bfin-low.c: Likewise.
5548
0e443c87
GB
55492014-08-07 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include ansidecl.h.
5552
8ebb3f56
GB
55532014-08-07 Gary Benson <gbenson@redhat.com>
5554
5555 * linux-x86-low.c: Do not include stddef.h.
5556 * lynx-ppc-low.c: Likewise.
5557 * tracepoint.c: Likewise.
5558
8980bdf6
GB
55592014-08-07 Gary Benson <gbenson@redhat.com>
5560
5561 * server.h: Do not include stdarg.h.
5562 * nto-low.c: Likewise.
5563
d7096f71
GB
55642014-08-07 Gary Benson <gbenson@redhat.com>
5565
5566 * server.h: Do not include stdlib.h.
5567 * inferiors.c: Likewise.
5568 * linux-low.c: Likewise.
5569 * regcache.c: Likewise.
5570 * spu-low.c: Likewise.
5571 * tracepoint.c: Likewise.
5572 * utils.c: Likewise.
5573
d02f550d
GB
55742014-08-07 Gary Benson <gbenson@redhat.com>
5575
5576 * server.h: Do not include stdio.h.
5577 * linux-low.c: Likewise.
5578 * remote-utils.c: Likewise.
5579 * spu-low.c: Likewise.
5580 * utils.c: Likewise.
5581 * wincecompat.c: Likewise.
5582
87f6c4e3
GB
55832014-08-06 Gary Benson <gbenson@redhat.com>
5584
5585 * regcache.c (init_register_cache): Move conditionals inside if.
5586
7089dca4
GB
55872014-08-06 Gary Benson <gbenson@redhat.com>
5588
5589 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5590
462f517e
GB
55912014-07-31 Gary Benson <gbenson@redhat.com>
5592
5593 * ax.h: Do not include server.h.
5594 * gdbthread.h: Likewise.
5595 * lynx-low.h: Likewise.
5596 * notif.h: Likewise.
5597
976411d6
GB
55982014-07-30 Gary Benson <gbenson@redhat.com>
5599
5600 * server.h: Include common-defs.h.
5601 Do not include config.h or build-gnulib-gdbserver/config.h.
5602
d41f6d8e
GB
56032014-07-30 Gary Benson <gbenson@redhat.com>
5604
5605 * hostio-errno.c: Move server.h to top of includes list.
5606 * inferiors.c: Likewise.
5607 * linux-x86-low.c: Likewise.
5608 * notif.c: Include server.h.
5609
314c6a35
TT
56102014-07-24 Tom Tromey <tromey@redhat.com>
5611 Gary Benson <gbenson@redhat.com>
5612
5613 * server.h (CORE_ADDR): Now unsigned.
5614
69ff6be5
PA
56152014-07-16 Pedro Alves <palves@redhat.com>
5616
5617 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5618
ce9e3fe7
PA
56192014-07-15 Pedro Alves <palves@redhat.com>
5620
5621 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5622 copy.
5623
e76126e8
PA
56242014-07-11 Pedro Alves <palves@redhat.com>
5625
5626 * linux-low.c (kill_wait_lwp): New function, based on
5627 kill_one_lwp_callback, but use my_waitpid directly.
5628 (kill_one_lwp_callback, linux_kill): Use it.
5629
8e9db26e
PA
56302014-06-23 Pedro Alves <palves@redhat.com>
5631
5632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5633 before setting DR0..DR3.
5634
698b3e08
GB
56352014-06-20 Gary Benson <gbenson@redhat.com>
5636
5637 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5638 * configure: Regenerated.
5639 * config.in: Likewise.
5640
125f8a3d
GB
56412014-06-20 Gary Benson <gbenson@redhat.com>
5642
5643 * Makefile.in (SFILES): Update locations for files moved
5644 from common to nat.
5645 (object file files): Reordered.
5646
42995dbd
GB
56472014-06-20 Gary Benson <gbenson@redhat.com>
5648
5649 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5650 (i386_dr_low_set_addr): Likewise.
5651 (i386_dr_low_get_addr): Likewise.
5652 (i386_dr_low_can_set_control): Likewise.
5653 (i386_dr_low_set_control): Likewise.
5654 (i386_dr_low_get_control): Likewise.
5655 (i386_dr_low_get_status): Likewise.
5656 (i386_get_debug_register_length): Likewise.
5657 * linux-x86-low.c (i386_dr_low_set_addr):
5658 Changed signature. Made static.
5659 (i386_dr_low_get_addr): Likewise.
5660 (i386_dr_low_set_control): Likewise.
5661 (i386_dr_low_get_control): Likewise.
5662 (i386_dr_low_get_status): Likewise.
5663 (i386_dr_low): New global variable.
5664 * win32-i386-low.c (i386_dr_low_set_addr):
5665 Changed signature. Made static.
5666 (i386_dr_low_get_addr): Likewise.
5667 (i386_dr_low_set_control): Likewise.
5668 (i386_dr_low_get_control): Likewise.
5669 (i386_dr_low_get_status): Likewise.
5670 (i386_dr_low): New global variable.
5671
e1d2394b
MS
56722014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5673
5674 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5675 * Makefile.in (AR, AR_FLAGS): Define.
5676 * configure: Regenerate.
5677
3a8ee006
GB
56782014-06-19 Gary Benson <gbenson@redhat.com>
5679
5680 * Makefile.in (i386-dregs.o): New rule.
5681 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5682 * i386-low.c (target.h): Remove include.
5683 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5684 (DR_CONTROL_SHIFT): Likewise.
5685 (DR_CONTROL_SIZE): Likewise.
5686 (DR_RW_EXECUTE): Likewise.
5687 (DR_RW_WRITE): Likewise.
5688 (DR_RW_READ): Likewise.
5689 (DR_RW_IORW): Likewise.
5690 (DR_LEN_1): Likewise.
5691 (DR_LEN_2): Likewise.
5692 (DR_LEN_4): Likewise.
5693 (DR_LEN_8): Likewise.
5694 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5695 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5696 (DR_ENABLE_SIZE): Likewise.
5697 (DR_LOCAL_SLOWDOWN): Likewise.
5698 (DR_GLOBAL_SLOWDOWN): Likewise.
5699 (DR_CONTROL_RESERVED): Likewise.
5700 (I386_DR_CONTROL_MASK): Likewise.
5701 (I386_DR_VACANT): Likewise.
5702 (I386_DR_LOCAL_ENABLE): Likewise.
5703 (I386_DR_GLOBAL_ENABLE): Likewise.
5704 (I386_DR_DISABLE): Likewise.
5705 (I386_DR_SET_RW_LEN): Likewise.
5706 (I386_DR_GET_RW_LEN): Likewise.
5707 (I386_DR_WATCH_HIT): Likewise.
5708 (i386_wp_op_t): Likewise.
5709 (i386_show_dr): Likewise.
5710 (i386_length_and_rw_bits): Likewise.
5711 (i386_insert_aligned_watchpoint): Likewise.
5712 (i386_remove_aligned_watchpoint): Likewise.
5713 (i386_handle_nonaligned_watchpoint): Likewise.
5714 i386_update_inferior_debug_regs(): Likewise.
5715 (i386_dr_insert_watchpoint): Likewise.
5716 (i386_dr_remove_watchpoint): Likewise.
5717 (i386_dr_region_ok_for_watchpoint): Likewise.
5718 (i386_dr_stopped_data_address): Likewise.
5719 (i386_dr_stopped_by_watchpoint): Likewise.
5720
8f26655c
GB
57212014-06-19 Gary Benson <gbenson@redhat.com>
5722
5723 * i386-low.c (i386_dr_show): Renamed to
5724 i386_show_dr and made static. All uses updated.
5725 (i386_dr_length_and_rw_bits): Renamed to
5726 i386_length_and_rw_bits and made static.
5727 All uses updated.
5728 (i386_dr_insert_aligned_watchpoint): Renamed to
5729 i386_insert_aligned_watchpoint and made static.
5730 All uses updated.
5731 (i386_dr_remove_aligned_watchpoint): Renamed to
5732 i386_remove_aligned_watchpoint and made static.
5733 All uses updated.
5734 (i386_dr_update_inferior_debug_regs): Renamed to
5735 i386_update_inferior_debug_regs and made static.
5736 All uses updated.
5737
b9228891
GB
57382014-06-18 Gary Benson <gbenson@redhat.com>
5739
5171def3
GB
5740 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5741 (i386_dr_low_can_set_control): Likewise.
5742 (i386_get_debug_register_length): Likewise.
5743 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5744 (i386_dr_low_can_set_control): Likewise.
5745 (i386_get_debug_register_length): Likewise.
5746
57472014-06-17 Gary Benson <gbenson@redhat.com>
5748
b9228891
GB
5749 * i386-low.h (i386-dregs.h): New include.
5750 (DR_FIRSTADDR): Now in i386-dregs.h.
5751 (DR_LASTADDR): Likewise.
5752 (DR_NADDR): Likewise.
5753 (DR_STATUS): Likewise.
5754 (DR_CONTROL): Likewise.
5755 (i386_debug_reg_state): Likewise.
5756 (i386_dr_insert_watchpoint): Likewise.
5757 (i386_dr_remove_watchpoint): Likewise.
5758 (i386_dr_region_ok_for_watchpoint): Likewise.
5759 (i386_dr_stopped_data_address): Likewise.
5760 (i386_dr_stopped_by_watchpoint): Likewise.
5761 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5762
4be83cc2
GB
57632014-06-18 Gary Benson <gbenson@redhat.com>
5764
5765 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5766 i386_dr_insert_watchpoint.
5767 (i386_low_remove_watchpoint): Renamed to
5768 i386_dr_remove_watchpoint.
5769 (i386_low_region_ok_for_watchpoint): Renamed to
5770 i386_dr_region_ok_for_watchpoint.
5771 (i386_low_stopped_data_address): Renamed to
5772 i386_dr_stopped_data_address.
5773 (i386_low_stopped_by_watchpoint): Renamed to
5774 i386_dr_stopped_by_watchpoint.
5775 * i386-low.c (i386_show_dr): Renamed to
5776 i386_dr_show and made nonstatic. All uses updated.
5777 (i386_length_and_rw_bits): Renamed to
5778 i386_dr_length_and_rw_bits and made nonstatic.
5779 All uses updated.
5780 (i386_insert_aligned_watchpoint): Renamed to
5781 i386_dr_insert_aligned_watchpoint and made nonstatic.
5782 All uses updated.
5783 (i386_remove_aligned_watchpoint): Renamed to
5784 i386_dr_remove_aligned_watchpoint and made nonstatic.
5785 All uses updated.
5786 (i386_update_inferior_debug_regs): Renamed to
5787 i386_dr_update_inferior_debug_regs and made nonstatic.
5788 All uses updated.
5789 (i386_low_insert_watchpoint): Renamed to
5790 i386_dr_insert_watchpoint. All uses updated.
5791 (i386_low_remove_watchpoint): Renamed to
5792 i386_dr_remove_watchpoint. All uses updated.
5793 (i386_low_region_ok_for_watchpoint): Renamed to
5794 i386_dr_region_ok_for_watchpoint. All uses updated.
5795 (i386_low_stopped_data_address): Renamed to
5796 i386_dr_stopped_data_address. All uses updated.
5797 (i386_low_stopped_by_watchpoint): Renamed to
5798 i386_dr_stopped_by_watchpoint. All uses updated.
5799
131aa0d4
GB
58002014-06-18 Gary Benson <gbenson@redhat.com>
5801
5802 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5803 (i386_dr_low_can_set_control): Likewise.
5804 (i386_insert_aligned_watchpoint): New check.
5805
d9305f7f
GB
58062014-06-18 Gary Benson <gbenson@redhat.com>
5807
5808 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5809 Renamed to state.
5810
e927c9fc
GB
58112014-06-18 Gary Benson <gbenson@redhat.com>
5812
5813 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5814 instead of fatal and error.
5815 (i386_handle_nonaligned_watchpoint): Likewise.
5816
1b6d4134
GB
58172014-06-18 Gary Benson <gbenson@redhat.com>
5818
5819 * i386-low.c (i386_get_debug_register_length): New macro.
5820 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5821 (i386_show_dr): Use debug_printf instead of fprintf. Use
5822 phex to format values.
5823
6e62758f
GB
58242014-06-18 Gary Benson <gbenson@redhat.com>
5825
5826 * i386-low.h: Comment changes.
5827 * i386-low.c: Likewise.
5828
fc6e2f03
GB
58292014-06-18 Gary Benson <gbenson@redhat.com>
5830
5831 * i386-low.c: Whitespace changes.
5832
f9d1eeed
TT
58332014-06-12 Tom Tromey <tromey@redhat.com>
5834
5835 * utils.c (freeargv): Remove.
5836
0b04e523
TT
58372014-06-12 Tom Tromey <tromey@redhat.com>
5838
5839 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5840 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5841 (parse_debug_format_options): Likewise.
5842 (gdbserver_usage): Likewise.
5843 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5844 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5845 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5846 against libiberty.
5847 ($(LIBGNU)): Depend on libiberty.
5848 (all-lib): Recurse into all subdirs.
5849 (install-only): Invoke "install" target in subdirs.
5850 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5851 targets.
5852 * configure: Rebuild.
5853 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5854 for vasprintf, vsnprintf, or gettimeofday.
5855 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5856 srv_tgtobj.
5857
270c9937
JB
58582014-06-05 Joel Brobecker <brobecker@adacore.com>
5859
5860 * development.sh: Delete.
5861 * Makefile.in (config.status): Adjust dependency on development.sh.
5862 * configure.ac: Adjust development.sh source call.
5863 * configure: Regenerate.
5864
0a261ed8
PA
58652014-06-02 Pedro Alves <palves@redhat.com>
5866
5867 * ax.c (gdb_free_agent_expr): New function.
5868 * ax.h (gdb_free_agent_expr): New declaration.
5869 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5870 list.
5871 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5872 static.
5873 (clear_breakpoint_conditions_and_commands): New function.
5874 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5875 (clear_breakpoint_conditions_and_commands): New declaration.
5876
e9dae05e
RR
58772014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5878
5879 * linux-aarch64-low.c (asm/ptrace.h): Include.
5880
5876f503
JK
58812014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5882
5883 Fix TLS access for -static -pthread.
5884 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5885 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5886 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5887
802e8e6d
PA
58882014-05-20 Pedro Alves <palves@redhat.com>
5889
5890 * linux-aarch64-low.c (aarch64_insert_point)
5891 (aarch64_remove_point): No longer check whether the type is
5892 supported here. Adjust to new interface.
5893 (the_low_target): Install aarch64_supports_z_point_type as
5894 supports_z_point_type method.
5895 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5896 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5897 instead of a Z packet char. Adjust.
5898 (arm_supports_z_point_type): New function.
5899 (arm_insert_point, arm_remove_point): Adjust to new interface.
5900 (the_low_target): Install arm_supports_z_point_type.
5901 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5902 (cris_insert_point, cris_remove_point): Adjust to new interface.
5903 Don't check whether the type is supported here.
5904 (the_low_target): Install cris_supports_z_point_type.
5905 * linux-low.c (linux_supports_z_point_type): New function.
5906 (linux_insert_point, linux_remove_point): Adjust to new interface.
5907 * linux-low.h (struct linux_target_ops) <insert_point,
5908 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5909 raw_breakpoint pointer parameter.
5910 <supports_z_point_type>: New method.
5911 * linux-mips-low.c (mips_supports_z_point_type): New function.
5912 (mips_insert_point, mips_remove_point): Adjust to new interface.
5913 Use mips_supports_z_point_type.
5914 (the_low_target): Install mips_supports_z_point_type.
5915 * linux-ppc-low.c (the_low_target): Install NULL as
5916 supports_z_point_type method.
5917 * linux-s390-low.c (the_low_target): Install NULL as
5918 supports_z_point_type method.
5919 * linux-sparc-low.c (the_low_target): Install NULL as
5920 supports_z_point_type method.
5921 * linux-x86-low.c (x86_supports_z_point_type): New function.
5922 (x86_insert_point): Adjust to new insert_point interface. Use
5923 insert_memory_breakpoint. Adjust to new
5924 i386_low_insert_watchpoint interface.
5925 (x86_remove_point): Adjust to remove_point interface. Use
5926 remove_memory_breakpoint. Adjust to new
5927 i386_low_remove_watchpoint interface.
5928 (the_low_target): Install x86_supports_z_point_type.
5929 * lynx-low.c (lynx_target_ops): Install NULL as
5930 supports_z_point_type callback.
5931 * nto-low.c (nto_supports_z_point_type): New.
5932 (nto_insert_point, nto_remove_point): Adjust to new interface.
5933 (nto_target_ops): Install nto_supports_z_point_type.
5934 * mem-break.c: Adjust intro comment.
5935 (struct raw_breakpoint) <raw_type, size>: New fields.
5936 <inserted>: Update comment.
5937 <shlib_disabled>: Delete field.
5938 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5939 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5940 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5941 (raw_bkpt_type_to_target_hw_bp_type): New function.
5942 (find_enabled_raw_code_breakpoint_at): New function.
5943 (find_raw_breakpoint_at): New type and size parameters. Use them.
5944 (insert_memory_breakpoint): New function, based off
5945 set_raw_breakpoint_at.
5946 (remove_memory_breakpoint): New function.
5947 (set_raw_breakpoint_at): Reimplement.
5948 (set_breakpoint): New, based on set_breakpoint_at.
5949 (set_breakpoint_at): Reimplement.
5950 (delete_raw_breakpoint): Go through the_target->remove_point
5951 instead of assuming memory breakpoints.
5952 (find_gdb_breakpoint_at): Delete.
5953 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5954 (find_gdb_breakpoint): New function.
5955 (set_gdb_breakpoint_at): Delete.
5956 (z_type_supported): New function.
5957 (set_gdb_breakpoint_1): New function, loosely based off
5958 set_gdb_breakpoint_at.
5959 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5960 (delete_gdb_breakpoint_at): Delete.
5961 (delete_gdb_breakpoint_1): New function, loosely based off
5962 delete_gdb_breakpoint_at.
5963 (delete_gdb_breakpoint): New function.
5964 (clear_gdb_breakpoint_conditions): Rename to ...
5965 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5966 breakpoint.
5967 (add_condition_to_breakpoint): Make static.
5968 (add_breakpoint_condition): Take a struct breakpoint pointer
5969 instead of an address. Adjust.
5970 (gdb_condition_true_at_breakpoint): Rename to ...
5971 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5972 z_type parameter.
5973 (gdb_condition_true_at_breakpoint): Reimplement.
5974 (add_breakpoint_commands): Take a struct breakpoint pointer
5975 instead of an address. Adjust.
5976 (gdb_no_commands_at_breakpoint): Rename to ...
5977 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5978 parameter. Return true if no breakpoint was found. Change debug
5979 output.
5980 (gdb_no_commands_at_breakpoint): Reimplement.
5981 (run_breakpoint_commands): Rename to ...
5982 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5983 and change return type to boolean.
5984 (run_breakpoint_commands): New function.
5985 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5986 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5987 breakpoint. Go through the_target->remove_point instead of
5988 assuming memory breakpoint.
5989 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5990 software and hardware breakpoints.
5991 (reinsert_raw_breakpoint): Go through the_target->insert_point
5992 instead of assuming memory breakpoint.
5993 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5994 software and hardware breakpoints.
5995 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5996 Check both software and hardware breakpoints.
5997 (validate_inserted_breakpoint): Assert the breakpoint is a
5998 software breakpoint. Set the inserted flag to -1 instead of
5999 setting shlib_disabled.
6000 (delete_disabled_breakpoints): Adjust.
6001 (validate_breakpoints): Only validate software breakpoints.
6002 Adjust to inserted flag change.
6003 (check_mem_read, check_mem_write): Skip breakpoint types other
6004 than software breakpoints. Adjust to inserted flag change.
6005 * mem-break.h (enum raw_bkpt_type): New enum.
6006 (raw_breakpoint, struct process_info): Forward declare.
6007 (Z_packet_to_target_hw_bp_type): Delete declaration.
6008 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6009 (set_gdb_breakpoint, delete_gdb_breakpoint)
6010 (clear_breakpoint_conditions): New declarations.
6011 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6012 (breakpoint_inserted_here): Update comment.
6013 (add_breakpoint_condition, add_breakpoint_commands): Replace
6014 address parameter with a breakpoint pointer parameter.
6015 (gdb_breakpoint_here): Update comment.
6016 (delete_gdb_breakpoint_at): Delete.
6017 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6018 * server.c (process_point_options): Take a struct breakpoint
6019 pointer instead of an address. Adjust.
6020 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6021 delete_gdb_breakpoint.
6022 * spu-low.c (spu_target_ops): Install NULL as
6023 supports_z_point_type method.
6024 * target.h: Include mem-break.h.
6025 (struct target_ops) <prepare_to_access_memory>: Update comment.
6026 <supports_z_point_type>: New field.
6027 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6028 instead of a char. Also take a raw breakpoint pointer.
6029 * win32-arm-low.c (the_low_target): Install NULL as
6030 supports_z_point_type.
6031 * win32-i386-low.c (i386_supports_z_point_type): New function.
6032 (i386_insert_point, i386_remove_point): Adjust to new interface.
6033 (the_low_target): Install i386_supports_z_point_type.
6034 * win32-low.c (win32_supports_z_point_type): New function.
6035 (win32_insert_point, win32_remove_point): Adjust to new interface.
6036 (win32_target_ops): Install win32_supports_z_point_type.
6037 * win32-low.h (struct win32_target_ops):
6038 <supports_z_point_type>: New method.
6039 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6040 instead of a char. Also take a raw breakpoint pointer.
6041
932539e3
PA
60422014-05-20 Pedro Alves <palves@redhat.com>
6043
6044 * mem-break.h: Include break-common.h.
6045 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6046 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6047 (Z_packet_to_target_hw_bp_type): New declaration.
6048 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6049 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6050 (Z_PACKET_ACCESS_WP): Delete macros.
6051 (Z_packet_to_hw_type): Delete function.
6052 * i386-low.h: Don't include break-common.h here.
6053 (Z_packet_to_hw_type): Delete declaration.
6054 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6055 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6056 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6057 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6058 * linux-aarch64-low.c: Don't include break-common.h here.
6059 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6060 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6061 (Z_packet_to_target_hw_bp_type): Delete function.
6062 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6063 function.
6064 (mips_insert_point, mips_remove_point): Use
6065 Z_packet_to_target_hw_bp_type.
6066
4ff0d3d8
PA
60672014-05-20 Pedro Alves <palves@redhat.com>
6068
6069 * linux-aarch64-low.c: Include break-common.h.
6070 (enum target_point_type): Delete.
6071 (Z_packet_to_point_type): Rename to ...
6072 (Z_packet_to_target_hw_bp_type): ... this, and return a
6073 target_hw_bp_type instead.
6074 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6075 instead of an enum target_point_type.
6076 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6077 breakpoint type.
6078 (aarch64_dr_state_insert_one_point)
6079 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6080 (aarch64_handle_aligned_watchpoint)
6081 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6082 Take an enum target_hw_bp_type instead of an enum
6083 target_point_type.
6084 (aarch64_supports_z_point_type): New function.
6085 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6086 use Z_packet_to_target_hw_bp_type.
6087
786dc519
JB
60882014-05-20 Joel Brobecker <brobecker@adacore.com>
6089
6090 * configure.ac: Only use -Werror by default when DEVELOPMENT
6091 is true.
6092 * configure: Regenerate.
6093
9e0aa64f
JK
60942014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6095
6096 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6097 * linux-x86-low.c (X86_64_USER_REGS): New.
6098 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6099
2b577b92
YQ
61002014-04-28 Yao Qi <yao@codesourcery.com>
6101
6102 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6103 name.
6104
94611da2
PA
61052014-04-25 Pedro Alves <palves@redhat.com>
6106
6107 PR server/16255
6108 * linux-low.c (linux_attach_fail_reason_string): New function.
6109 (linux_attach_lwp): Delete.
6110 (linux_attach_lwp_1): Rename to ...
6111 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6112 argument. Remove "initial" parameter. Return int instead of
6113 void. Don't error or warn here.
6114 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6115 failure to attach to the tgid. Call warning when failing to
6116 attach to an lwp.
6117 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6118 argument. Remove "initial" parameter. Return int instead of
6119 void. Don't error or warn here.
6120 (linux_attach_fail_reason_string): New declaration.
6121 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6122 interface change. Use linux_attach_fail_reason_string.
6123
01f9f808
MS
61242014-04-24 Michael Sturm <michael.sturm@mintel.com>
6125 Walfred Tedeschi <walfred.tedeschi@intel.com>
6126
6127 * Makefile.in: Added rules to handle new files
6128 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6129 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6130 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6131 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6132 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6133 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6134 x32-avx512-linux.o.
6135 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6136 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6137 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6138 i386/x32-avx512.xml.
6139 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6140 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6141 i386/x32-avx512-linux.xml.
6142 * i387-fp.c (num_avx512_k_registers): New constant for number
6143 of K registers.
6144 (num_avx512_zmmh_low_registers): New constant for number of
6145 lower ZMM registers (0-15).
6146 (num_avx512_zmmh_high_registers): New constant for number of
6147 higher ZMM registers (16-31).
6148 (num_avx512_ymmh_registers): New contant for number of higher
6149 YMM registers (ymm16-31 added by avx521 on x86_64).
6150 (num_avx512_xmm_registers): New constant for number of higher
6151 XMM registers (xmm16-31 added by AVX512 on x86_64).
6152 (struct i387_xsave): Add space for AVX512 registers.
6153 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6154 Add code to handle AVX512 registers.
6155 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6156 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6157 prototypei from generated file.
6158 (tdesc_amd64_avx512_linux): Likewise.
6159 (init_registers_x32_avx512_linux): Likewise.
6160 (tdesc_x32_avx512_linux): Likewise.
6161 (init_registers_i386_avx512_linux): Likewise.
6162 (tdesc_i386_avx512_linux): Likewise.
6163 (x86_64_regmap): Add AVX512 registers.
6164 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6165 mask.
6166 (initialize_low_arch): Add code to initialize AVX512 registers.
6167
51aa91f9
PA
61682014-04-23 Pedro Alves <palves@redhat.com>
6169
6170 * mem-break.c (find_gdb_breakpoint_at): Make static.
6171 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6172
a4165e94
PA
61732014-04-23 Pedro Alves <palves@redhat.com>
6174
6175 * i386-low.c: Don't include break-common.h here.
6176 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6177 prototype to take target_hw_bp_type as argument instead of a Z
6178 packet char.
6179 * i386-low.h: Include break-common.h here.
6180 (Z_packet_to_hw_type): Declare.
6181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6182 prototypes.
6183 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6184 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6185 (x86_remove_point): Convert the packet number to a
6186 target_hw_bp_type before calling i386_low_remove_watchpoint.
6187 * win32-i386-low.c (i386_insert_point): Convert the packet number
6188 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6189 (i386_remove_point): Convert the packet number to a
6190 target_hw_bp_type before calling i386_low_remove_watchpoint.
6191
b8acf843
PA
61922014-04-23 Pedro Alves <palves@redhat.com>
6193
6194 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6195
d708bcd1
PA
61962014-04-10 Pedro Alves <palves@redhat.com>
6197
6198 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6199 Check if the condition or command is NULL before checking if the
6200 breakpoint is known. On success, return true.
6201 * mem-break.h (add_breakpoint_condition): Document return.
6202 (add_breakpoint_commands): Add describing comment.
6203 * server.c (skip_to_semicolon): New function.
6204 (process_point_options): Use it.
6205
2eec7d5b
PA
62062014-04-09 Pedro Alves <palves@redhat.com>
6207
6208 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6209 to lwpid_of.
6210
fa96cb38
PA
62112014-02-27 Pedro Alves <palves@redhat.com>
6212
6213 PR 12702
6214 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6215 macros.
6216 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6217 output.
6218 (last_thread_of_process_p): Take a PID argument instead of a
6219 thread pointer.
6220 (linux_wait_for_lwp): Delete.
6221 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6222 functions.
6223 (linux_low_filter_event): New function, party factored out from
6224 linux_wait_for_event.
6225 (linux_wait_for_event): Rename to ...
6226 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6227 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6228 sigsuspend. Check for zombie leaders.
6229 (linux_wait_for_event): Reimplement as wrapper around
6230 linux_wait_for_event_filtered.
6231 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6232 a normal or signal exit is seen, it's the whole process exiting.
6233 (wait_for_sigstop): No longer a for_each_inferior callback.
6234 Rewrite on top of linux_wait_for_event_filtered.
6235 (stop_all_lwps): Call wait_for_sigstop directly.
6236 * server.c (resume, handle_target_event): Handle
6237 TARGET_WAITKIND_NO_RESUMED.
6238
d763de10
JB
62392014-02-26 Joel Brobecker <brobecker@adacore.com>
6240
6241 * win32-low.c (psapi_get_dll_name,
6242 * win32_CreateToolhelp32Snapshot): Delete.
6243 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6244 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6245 Delete.
6246 (handle_load_dll): Add function description.
6247 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6248
850a0f76
JB
62492014-02-26 Joel Brobecker <brobecker@adacore.com>
6250
6251 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6252 Add comment.
6253 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6254 base address when calling win32_add_one_solib.
6255 (handle_load_dll): Delete local variable load_addr.
6256 Remove 0x1000 offset applied to DLL base address when calling
6257 win32_add_one_solib.
6258 (handle_unload_dll): Add comment.
6259
f25b3fc3
JB
62602014-02-26 Joel Brobecker <brobecker@adacore.com>
6261
6262 * win32-low.c (win32_add_all_dlls): Renames
6263 win32_ensure_ntdll_loaded. Rewrite function documentation.
6264 Adjust implementation to always load all DLLs.
6265 Add 0x1000 offset to DLL base address when calling
6266 win32_add_one_solib.
6267 (child_initialization_done): New static global.
6268 (do_initial_child_stuff): Set child_initialization_done to
6269 zero during child initialization, and 1 after. Replace call
6270 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6271 Add comment.
6272 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6273 (handle_unload_dll): Add function documentation.
6274 (get_child_debug_event): Ignore load and unload DLL events
6275 during child initialization.
6276
d86d4aaf
DE
62772014-02-20 Doug Evans <dje@google.com>
6278
3bc32da3 6279 Remove global all_lwps.
d86d4aaf
DE
6280 * inferiors.h (ptid_of): Move here from linux-low.h.
6281 (pid_of, lwpid_of): Ditto.
6282 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6283 parameter is a struct thread_info * now.
6284 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6285 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6286 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6287 directly.
6288 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6289 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6290 * linux-arm-low.c (update_registers_callback): Update, "entry"
6291 parameter is a struct thread_info * now.
6292 Fetch lwpid from current_inferior directly.
6293 (arm_insert_point): Pass &all_threads to find_inferior instead of
6294 &all_lwps.
6295 (arm_remove_point): Ditto.
6296 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6297 (arm_prepare_to_resume): Fetch pid from thread.
6298 (arm_read_description): Fetch lwpid from current_inferior directly.
6299 * linux-low.c (all_lwps): Delete.
6300 (delete_lwp): Delete call to remove_inferior.
6301 (handle_extended_wait): Fetch lwpid from thread.
6302 (add_lwp): Don't set lwp->entry.id. Remove call to
6303 add_inferior_to_list.
6304 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6305 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6306 (kill_one_lwp_callback): Ditto.
6307 (linux_kill): Don't dereference NULL pointer.
6308 Fetch ptid,lwpid from thread.
6309 (get_detach_signal): Fetch ptid from thread.
6310 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6311 Simplify call to regcache_invalidate_thread.
6312 (delete_lwp_callback): Update, "entry" parameter is a
6313 struct thread_info * now. Fetch pid from thread.
6314 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6315 (status_pending_p_callback): Update, "entry" parameter is a
6316 struct thread_info * now. Fetch ptid from thread.
6317 (find_lwp_pid): Update, "entry" parameter is a
6318 struct thread_info * now.
6319 (linux_wait_for_lwp): Fetch pid from thread.
6320 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6321 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6322 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6323 (dequeue_one_deferred_signal): Ditto.
6324 (cancel_breakpoint): Fetch ptid from current_inferior.
6325 (linux_wait_for_event): Pass &all_threads to find_inferior,
6326 not &all_lwps. Fetch ptid, lwpid from thread.
6327 (count_events_callback): Update, "entry" parameter is a
6328 struct thread_info * now.
6329 (select_singlestep_lwp_callback): Ditto.
6330 (select_event_lwp_callback): Ditto.
6331 (cancel_breakpoints_callback): Ditto.
6332 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6333 not &all_lwps.
6334 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6335 (unsuspend_one_lwp): Update, "entry" parameter is a
6336 struct thread_info * now.
6337 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6338 not &all_lwps.
6339 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6340 Fetch lwpid from thread, not lwp.
6341 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6342 Pass &all_threads to find_inferior, not &all_lwps.
6343 (send_sigstop): Fetch lwpid from thread, not lwp.
6344 (send_sigstop_callback): Update, "entry" parameter is a
6345 struct thread_info * now.
6346 (suspend_and_send_sigstop_callback): Ditto.
6347 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6348 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6349 struct thread_info * now.
6350 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6351 from thread, lwp.
6352 (lwp_running): Update, "entry" parameter is a
6353 struct thread_info * now.
6354 (stop_all_lwps): Fetch ptid from thread.
6355 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6356 (linux_resume_one_lwp): Fetch lwpid from thread.
6357 (linux_set_resume_request): Update, "entry" parameter is a
6358 struct thread_info * now. Fetch pid, lwpid from thread.
6359 (resume_status_pending_p): Update, "entry" parameter is a
6360 struct thread_info * now.
6361 (need_step_over_p): Ditto. Fetch lwpid from thread.
6362 (start_step_over): Fetch lwpid from thread.
6363 (linux_resume_one_thread): Update, "entry" parameter is a
6364 struct thread_info * now. Fetch lwpid from thread.
6365 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6366 (proceed_one_lwp): Update, "entry" parameter is a
6367 struct thread_info * now. Fetch lwpid from thread.
6368 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6369 struct thread_info * now.
6370 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6371 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6372 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6373 directly.
6374 (regsets_store_inferior_registers): Ditto.
6375 (fetch_register, store_register): Ditto.
6376 (linux_read_memory, linux_write_memory): Ditto.
6377 (linux_request_interrupt): Ditto.
6378 (linux_read_auxv): Ditto.
6379 (linux_xfer_siginfo): Ditto.
6380 (linux_qxfer_spu): Ditto.
6381 (linux_qxfer_libraries_svr4): Ditto.
6382 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6383 moved to inferiors.h.
6384 (get_lwp): Delete.
6385 (get_thread_lwp): Update.
6386 (struct lwp_info): Delete member "entry". Simplify comment for
6387 member "thread".
6388 (all_lwps): Delete.
6389 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6390 current_inferior directly.
6391 (update_watch_registers_callback): Update, "entry" parameter is a
6392 struct thread_info * now. Fetch pid from thread.
6393 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6394 (mips_insert_point): Fetch lwpid from current_inferior.
6395 Pass &all_threads to find_inferior, not &all_lwps.
6396 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6397 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6398 directly.
6399 (mips_stopped_data_address): Ditto.
6400 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6401 directly.
6402 * linux-tile-low.c (tile_arch_setup): Ditto.
6403 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6404 (update_debug_registers_callback): Update, "entry" parameter is a
6405 struct thread_info * now. Fetch pid from thread.
6406 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6407 Pass &all_threads to find_inferior, not &all_lwps.
6408 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6409 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6410 Pass &all_threads to find_inferior, not &all_lwps.
6411 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6412 (i386_dr_low_get_status): Ditto.
6413 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6414 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6415 (x86_linux_read_description): Ditto.
6416 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6417
3b8361aa
DE
64182014-02-20 Doug Evans <dje@google.com>
6419
6420 * inferiors.c (get_first_inferior): Fix buglet.
6421
f7667f0d
DE
64222014-02-19 Doug Evans <dje@google.com>
6423
6424 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6425 * inferiors.c (add_thread): Change result type to struct thread_info *.
6426 All callers updated.
6427 (add_lwp): Call add_thread here instead of in callers.
6428 All callers updated.
6429 * linux-low.h (get_lwp_thread): Rewrite.
6430 (struct lwp_info): New member "thread".
6431
b3312d80
DE
64322014-02-19 Doug Evans <dje@google.com>
6433
6434 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6435 All callers updated.
6436
ecc6f45c
DE
64372014-02-19 Doug Evans <dje@google.com>
6438
6439 * inferiors.c (add_thread): Fix whitespace.
6440
649ebbca
DE
64412014-02-19 Doug Evans <dje@google.com>
6442
6443 * dll.c (clear_dlls): Replace accessing list implemention details
6444 with API function.
6445 * gdbthread.h (get_first_thread): Declare.
6446 * inferiors.c (for_each_inferior_with_data): New function.
6447 (get_first_thread): New function.
6448 (find_thread_ptid): Simplify.
6449 (get_first_inferior): New function.
6450 (clear_list): Delete.
6451 (one_inferior_p): New function.
6452 (clear_inferior_list): New function.
6453 (clear_inferiors): Update.
6454 * inferiors.h (for_each_inferior_with_data): Declare.
6455 (clear_inferior_list): Declare.
6456 (one_inferior_p): Declare.
6457 (get_first_inferior): Declare.
6458 * linux-low.c (linux_wait_for_event): Replace accessing list
6459 implemention details with API function.
6460 * server.c (target_running): Ditto.
6461 (accumulate_file_name_length): New function.
6462 (emit_dll_description): New function.
6463 (handle_qxfer_libraries): Replace accessing list implemention
6464 details with API function.
6465 (handle_qxfer_threads_worker): New function.
6466 (handle_qxfer_threads_proper): Replace accessing list implemention
6467 details with API function.
6468 (handle_query): Ditto.
6469 (visit_actioned_threads_callback_ftype): New typedef.
6470 (visit_actioned_threads_data): New struct.
6471 (visit_actioned_threads): Rewrite to be find_inferior callback.
6472 (resume): Call find_inferior.
6473 (handle_status): Replace accessing list implemention
6474 details with API function.
6475 (process_serial_event): Replace accessing list implemention details
6476 with API function.
6477 * target.c (set_desired_inferior): Replace accessing list implemention
6478 details with API function.
6479 * tracepoint.c (same_process_p): New function.
6480 (gdb_agent_about_to_close): Replace accessing list implemention
6481 details with API function.
6482 * win32-low.c (child_delete_thread): Replace accessing list
6483 implemention details with API function.
6484 (match_dll_by_basename): New function.
6485 (dll_is_loaded_by_basename): New function.
6486 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6487 details call to dll_is_loaded_by_basename.
6488
80894984
DE
64892014-02-19 Doug Evans <dje@google.com>
6490
6491 * dll.h (struct dll_info): Add comment.
6492 * gdbthread.h (struct thread_info): Add comment.
6493 (current_ptid): Simplify.
6494 * inferiors.c (add_process): Update.
6495 (remove_process): Update.
6496 * inferiors.h (struct process_info): Rename member "head" to "entry".
6497 * linux-low.c (delete_lwp): Update.
6498 (add_lwp): Update.
6499 (last_thread_of_process_p): Update.
6500 (kill_one_lwp_callback, linux_kill): Update.
6501 (status_pending_p_callback): Update.
6502 (wait_for_sigstop): Update. Simplify read of ptid.
6503 (start_step_over): Update.
6504 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6505 (get_lwp_thread): Update.
6506 (struct lwp_info): Rename member "head" to "entry".
6507 * regcache.h (inferior_list_entry): Delete.
6508 * server.c (kill_inferior_callback): Update.
6509 (detach_or_kill_inferior_callback): Update.
6510 (print_started_pid): Update.
6511 (print_attached_pid): Update.
6512 (process_serial_event): Simplify read of ptid.
6513 * thread-db.c (thread_db_create_event): Update.
6514 (thread_db_get_tls_address): Update.
6515 * win32-low.c (current_inferior_ptid): Simplify.
6516
46917d26
TT
65172014-02-19 Tom Tromey <tromey@redhat.com>
6518
6519 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6520 argument.
6521 (target_supports_btrace): Update.
6522
0759a81e
YQ
65232014-02-14 Yao Qi <yao@codesourcery.com>
6524
6525 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6526 (rsp-low-ipa.o): New target.
6527
a7191e8b
TT
65282014-02-12 Tom Tromey <tromey@redhat.com>
6529
6530 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6531 convert_ascii_to_int.
6532 * regcache.c (registers_to_string): Likewise.
6533 * remote-utils.c (decode_M_packet): Likewise.
6534 * server.c (process_serial_event): Likewise.
6535
ff0e980e
TT
65362014-02-12 Tom Tromey <tromey@redhat.com>
6537
6538 * server.c (handle_query, handle_v_run): Use hex2bin, not
6539 unhexify.
6540 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6541
e9371aff
TT
65422014-02-12 Tom Tromey <tromey@redhat.com>
6543
6544 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6545 convert_int_to_ascii.
6546 * regcache.c (registers_to_string, collect_register_as_string):
6547 Likewise.
6548 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6549 Likewise.
6550 * server.c (process_serial_event): Likewise.
6551 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6552 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6553
971dc0b8
TT
65542014-02-12 Tom Tromey <tromey@redhat.com>
6555
6556 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6557 bin2hex, not hexify.
6558 * tracepoint.c (cmd_qtstatus): Likewise.
6559
0a822afb
TT
65602014-02-12 Tom Tromey <tromey@redhat.com>
6561
6562 * remote-utils.c (monitor_output): Pass explicit length to
6563 hexify.
6564
9c3d6531
TT
65652014-02-12 Tom Tromey <tromey@redhat.com>
6566
6567 * tracepoint.c: Include rsp-low.h.
6568 * server.c: Include rsp-low.h.
6569 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6570 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6571 declare.
6572 * remote-utils.c: Include rsp-low.h.
6573 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6574 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6575 (convert_int_to_ascii, convert_ascii_to_int): Move to
6576 common/rsp-low.c.
6577 * regcache.c: Include rsp-low.h.
6578 * ax.c: Include rsp-low.h.
6579 * Makefile.in (SFILES): Add common/rsp-low.c.
6580 (OBS): Add rsp-low.o.
6581 (rsp-low.o): New target.
6582
01fd3ea5
TT
65832014-02-12 Tom Tromey <tromey@redhat.com>
6584
6585 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6586 Include print-utils.h.
6587 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6588 (plongest, thirty_two, phex_nz): Remove.
6589 * Makefile.in (SFILES): Add common/print-utils.c.
6590 (OBS): Add print-utils.o.
6591 (print-utils-ipa.o): New target.
6592 (print-utils.o): New target.
6593 (IPA_OBJS): Add print-utils-ipa.o.
6594
e99dc820
TT
65952014-02-06 Tom Tromey <tromey@redhat.com>
6596
6597 * Makefile.in (SFILES): Fix indentation.
6598
ee1e2d4f
DE
65992014-02-05 Doug Evans <dje@google.com>
6600
6601 * linux-low.c (linux_wait_for_event): Improve comment.
6602 (linux_wait_1): Keep current_inferior in sync with event_child.
6603
f5a02773
DE
66042014-01-22 Doug Evans <dje@google.com>
6605
6606 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6607
87ce2a04
DE
66082014-01-22 Doug Evans <dje@google.com>
6609
6610 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6611 * configure: Regenerate.
6612 * config.in: Regenerate.
6613 * Makefile.in (SFILES): Add debug.c.
6614 (OBS): Add debug.o.
6615 * debug.c: New file.
6616 * debug.h: New file.
6617 * linux-aarch64-low.c (*): Update all debugging printfs to use
6618 debug_printf instead of fprintf.
6619 * linux-arm-low.c (*): Ditto.
6620 * linux-cris-low.c (*): Ditto.
6621 * linux-crisv32-low.c (*): Ditto.
6622 * linux-m32r-low.c (*): Ditto.
6623 * linux-sparc-low.c (*): Ditto.
6624 * linux-x86.c (*): Ditto.
6625 * linux-low.c (*): Ditto.
6626 (linux_wait_1): Add calls to debug_enter, debug_exit.
6627 (linux_wait): Remove redundant debugging printf.
6628 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6629 (linux_resume, unstop_all_lwps): Ditto.
6630 * mem-break.c (*): Update all debugging printfs to use
6631 debug_printf instead of fprintf.
6632 * remote-utils.c (*): Ditto.
6633 * thread-db.c (*): Ditto.
6634 * server.c #include <ctype.h>, "gdb_vecs.h".
6635 (debug_threads): Moved to debug.c.
6636 (*): Update all debugging printfs to use debug_printf instead of
6637 fprintf.
6638 (start_inferior): Replace call to fflush with call to debug_flush.
6639 (monitor_show_help): Mention set debug-format.
6640 (parse_debug_format_options): New function.
6641 (handle_monitor_command): Handle "monitor set debug-format".
6642 (gdbserver_usage): Mention --debug-format.
6643 (main): Parse --debug-format.
6644 * server.h (debug_threads): Declaration moved to debug.h.
6645 #include "debug.h".
6646 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6647 trace_debug_1 that uses debug_printf.
6648 (tracepoint_look_up_symbols): Update all debugging printfs to use
6649 debug_printf instead of fprintf.
6650
e671835b
BS
66512014-01-20 Baruch Siach <baruch@tkos.co.il>
6652
6653 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6654 sys/ptrace.h.
6655
b5737fa9
PA
66562014-01-17 Pedro Alves <palves@redhat.com>
6657
ea38d2a9 6658 PR build/16445
c7faa97a
PA
6659 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6660 defined after including gdb_proc_service.h.
b5737fa9 6661
40ed484e
DE
66622014-01-16 Doug Evans <dje@google.com>
6663
6664 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6665 (match_dll): Use it.
6666
969c39fb
MM
66672014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6668
6669 * target.h (target_ops) <read_btrace>: Change parameters and
6670 return type to allow error reporting.
6671 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6672 trace reading errors on.
6673 * linux-low.c (linux_low_read_btrace): Pass trace reading
6674 errors on.
6675 (linux_low_disable_btrace): New.
6676
ab7f45ba
DE
66772014-01-15 Doug Evans <dje@google.com>
6678
6679 * inferiors.c (thread_id_to_gdb_id): Delete.
6680 * inferiors.h (thread_id_to_gdb_id): Delete.
6681
66af0f44
EZ
66822014-01-13 Eli Zaretskii <eliz@gnu.org>
6683
6684 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6685 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6686 versions.
6687
9939e131
PA
66882014-01-08 Pedro Alves <palves@redhat.com>
6689
6690 * server.c (handle_status): Don't discard previous queued stop
6691 replies or thread's pending status here.
6692 (main) <disconnection>: Do it here instead.
6693
b7ea362b
PA
66942014-01-08 Pedro Alves <palves@redhat.com>
6695
6696 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6697 * server.c (visit_actioned_threads, handle_pending_status): New
6698 function.
6699 (handle_v_cont): Factor out parts to ...
6700 (resume): ... this new function. If in all-stop, and a thread
6701 being resumed has a pending status, report it without actually
6702 resuming.
6703 (myresume): Adjust to use the new 'resume' function.
6704 (clear_pending_status_callback, set_pending_status_callback)
6705 (find_status_pending_thread_callback): New functions.
6706 (handle_status): Handle the case of multiple threads having
6707 interesting statuses to report. Report threads' real last signal
6708 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6709 with an interesting thread to report the status for, instead of
6710 always reporting the status of the first thread.
6711
28498c42
JB
67122014-01-01 Joel Brobecker <brobecker@adacore.com>
6713
6714 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6715 * gdbreplay.c (gdbreplay_version): Likewise.
6716
f45c82da
YZ
67172013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6718
6719 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6720 iov.iov_len with the real length in use.
6721
379a5e2d
JB
67222013-12-13 Joel Brobecker <brobecker@adacore.com>
6723
6724 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6725 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6726 for all targets that use win32-low.c.
6727 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6728 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6729
4210d83e
PA
67302013-12-13 Pedro Alves <palves@redhat.com>
6731
6732 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6733 if equal to TARGET_WAITKIND_LOADED.
6734 * win32-low.c (cached_status): New static global.
6735 (win32_wait): Add declaration.
6736 (do_initial_child_stuff): Flush all initial pending debug events
6737 up to the initial breakpoint.
6738 (win32_wait): If CACHED_STATUS was set, return that instead
6739 of doing a real wait. Remove the code resuming the execution
6740 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6741 during the initial phase. Also remove the code changing
6742 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6743 TARGET_WAITKIND_STOPPED.
6744
e7f0d979
YQ
67452013-12-11 Yao Qi <yao@codesourcery.com>
6746
6747 * notif.c (handle_notif_ack): Return 0 if no notification
6748 matches.
6749
ebcf782c
DE
67502013-11-20 Doug Evans <dje@google.com>
6751
6752 * linux-low.c (linux_set_resume_request): Fix comment.
6753
20ad9378
DE
67542013-11-20 Doug Evans <dje@google.com>
6755
6756 * linux-low.c (resume_status_pending_p): Tweak comment.
6757
a196ebeb
WT
67582013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6759
6760 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6761 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6762 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6763 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6764 (srv_amd64_regobj): Add amd64-mpx.o.
6765 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6766 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6767 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6768 * i387-fp.c (num_pl_bnd_register) Added constant.
6769 (num_pl_bnd_cfg_registers) Added constant.
6770 (struct i387_xsave) Added reserved area and MPX fields.
6771 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6772 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6773 function.
6774 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6775 (init_registers_amd64_mpx_linux): Declare new function.
6776 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6777 (x86_64_regmap): Add MPX registers.
6778 (x86_linux_read_description): Add MPX case.
6779 (initialize_low_arch): Initialize MPX targets.
6780
0080a2f6
TT
67812013-11-18 Tom Tromey <tromey@redhat.com>
6782
6783 * configure: Rebuild.
6784 * configure.ac: Don't check for stdlib.h.
6785 * gdbreplay.c: Unconditionally include stdlib.h.
6786
2978b111
TT
67872013-11-18 Tom Tromey <tromey@redhat.com>
6788
6789 * config.in: Rebuild.
6790 * configure: Rebuild.
6791 * configure.ac: Don't use AC_HEADER_DIRENT.
6792
a3d08894
TT
67932013-11-18 Tom Tromey <tromey@redhat.com>
6794
6795 * server.h: Don't check HAVE_STRING_H.
6796 * gdbreplay.c: Don't check HAVE_STRING_H.
6797 * configure: Rebuild.
6798
0a5dd17d
TT
67992013-11-18 Tom Tromey <tromey@redhat.com>
6800
6801 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6802 LIBGNU.
6803
1bd2f0ba
TT
68042013-11-08 Tom Tromey <tromey@redhat.com>
6805
6806 * configure, config.in: Rebuild.
6807 * configure.ac: Remove unused configury.
6808
3266f10b
TT
68092013-11-08 Tom Tromey <tromey@redhat.com>
6810
6811 * acinclude.m4: Include common.m4, codeset.m4.
6812 * configure, config.in: Rebuild.
6813 * configure.ac: Use GDB_AC_COMMON.
6814
6682d959
AA
68152013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6816
6817 * linux-s390-low.c (HWCAP_S390_TE): New define.
6818 (s390_arch_setup): Consider the TE field in the HWCAP for
6819 determining 'have_regset_tdb'.
6820
fd0a4d76
SDJ
68212013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6822
6823 PR gdb/16014
6824 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6825 call to sizeof.
6826
1a3d890b
PA
68272013-10-02 Pedro Alves <palves@redhat.com>
6828
6829 * server.c (process_serial_event): Don't output "GDBserver
6830 exiting" if GDB is connected through stdio.
6831 * target.c (mywait): Likewise, be silent if GDB is connected
6832 through stdio.
6833
97ad4581
JB
68342013-10-01 Joel Brobecker <brobecker@adacore.com>
6835
6836 * lynx-low.c (lynx_add_threads_after_attach): New function.
6837 (lynx_attach): Remove call to add_thread. Add call to
6838 lynx_add_threads_after_attach instead.
6839
5b4e221c
MF
68402013-09-28 Mike Frysinger <vapier@gentoo.org>
6841
6842 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6843 * config.in, configure: Regenerated.
6844
ee47b2f8
YQ
68452013-09-18 Yao Qi <yao@codesourcery.com>
6846
6847 PR server/15959
6848 * server.c (start_inferior): Clear 'resume_info'.
6849
d6707650 68502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6851
d6707650
JW
6852 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6853 for each register.
6854
9243dd0e 68552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6856
9243dd0e
JW
6857 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6858 linux-tile-low.o to srv_tgtobj.
6859
c623a6ef
WN
68602013-09-16 Will Newton <will.newton@linaro.org>
6861
6862 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6863 out regs.
6864
fb71d39e
PA
68652013-09-06 Pedro Alves <palves@redhat.com>
6866
6867 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6868 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6869 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6870 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6871 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6872 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6873
8e7e9910
PA
68742013-09-06 Pedro Alves <palves@redhat.com>
6875
6876 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6877 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6878
7c3a12ca
PA
68792013-09-06 Pedro Alves <palves@redhat.com>
6880
6881 * linux-amd64-ipa.c: Include tracepoint.h.
6882 * linux-i386-ipa.c: Include tracepoint.h.
6883
8eb3d7b6
RW
68842013-09-06 Ricard Wanderlof <ricardw@axis.com>
6885
6886 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6887 (ps_get_thread_area): New function.
6888
eddddb9d
RW
68892013-09-06 Ricard Wanderlof <ricardw@axis.com>
6890
6891 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6892 (initialize_low_arch): Call init_registers_crisv32 rather than
6893 init_register_crisv32.
6894
533b0600
PA
68952013-09-05 Pedro Alves <palves@redhat.com>
6896
6897 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6898 to ...
6899 * hostio.h: ... this new file.
6900 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6901 win32-low.c: Include hostio.h.
6902
0ce3d3b5
PA
69032013-09-05 Pedro Alves <palves@redhat.com>
6904
6905 * server.h (gdb_client_data, handler_func, callback_handler_func)
6906 (delete_file_handler, add_file_handler, append_callback_event)
6907 (delete_callback_event, start_event_loop, initialize_event_loop):
6908 Move to event-loop.h and include it.
6909 * event-loop.h: New file.
6910
799cdc37
PA
69112013-09-05 Pedro Alves <palves@redhat.com>
6912
6913 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6914 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6915 (loaded_dll, unloaded_dll): Move to ...
6916 * dll.h: ... this new file.
6917 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6918
6a6bbd9d
PA
69192013-09-05 Pedro Alves <palves@redhat.com>
6920
6921 * server.h (current_process, get_thread_process, all_processes)
6922 (add_inferior_to_list, for_each_inferior, current_inferior)
6923 (remove_inferior, add_process, remove_process, find_process_pid)
6924 (have_started_inferiors_p, have_attached_inferiors_p)
6925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6926 (clear_inferiors, find_inferior, find_inferior_id)
6927 (inferior_target_data, set_inferior_target_data)
6928 (inferior_regcache_data, set_inferior_regcache_data): Move to
6929 inferiors.h, and include it.
6930 * inferiors.h: New file.
6931
f699aaba
PA
69322013-09-05 Pedro Alves <palves@redhat.com>
6933
6934 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6935 Move ...
72f4393d 6936 * ax.h: ... here.
f699aaba 6937
c144c7a0
PA
69382013-09-05 Pedro Alves <palves@redhat.com>
6939
6940 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6941 tracepoint.h.
6942 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6943 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6944 (handle_tracepoint_general_set, handle_tracepoint_query)
6945 (tracepoint_finished_step, tracepoint_was_hit)
6946 (release_while_stepping_state_list, current_traceframe)
6947 (in_readonly_region, traceframe_read_mem)
6948 (fetch_traceframe_registers, traceframe_read_sdata)
6949 (traceframe_read_info, struct fast_tpoint_collect_status)
6950 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6951 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6952 (supply_fast_tracepoint_registers)
6953 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6954 (ipa_tdesc, claim_trampoline_space)
6955 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6956 (agent_mem_read, agent_get_trace_state_variable_value)
6957 (agent_set_trace_state_variable_value, agent_tsv_read)
6958 (agent_mem_read_string, get_raw_reg_func_addr)
6959 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6960 * tracepoint.h: ... this new file.
6961
ff42e6ab
PA
69622013-09-05 Pedro Alves <palves@redhat.com>
6963
6964 * server.h (perror_with_name, error, fatal, warning, paddress)
6965 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6966 include it.
6967 * utils.h: New file.
6968
541af0f4
PA
69692013-09-05 Pedro Alves <palves@redhat.com>
6970
6971 * server.h (remote_debug, noack_mode, transport_is_reliable)
6972 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6973 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6974 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6975 (write_enn, initialize_async_io, enable_async_io)
6976 (disable_async_io, check_remote_input_interrupt_request)
6977 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6978 (dead_thread_notify, prepare_resume_reply)
6979 (decode_address_to_semicolon, decode_address, decode_m_packet)
6980 (decode_M_packet, decode_X_packet, decode_xfer_write)
6981 (decode_search_memory_packet, unhexify, hexify)
6982 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6983 (look_up_one_symbol, relocate_instruction)
6984 (monitor_output): Move to remote-utils.h, and include it.
6985 * remote-utils.h: New file.
6986
eebdf26b
PA
69872013-09-05 Pedro Alves <palves@redhat.com>
6988
6989 * server.h (_): Delete.
6990
3aafd2ff
PA
69912013-09-02 Pedro Alves <palves@redhat.com>
6992
6993 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6994 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6995 allocated.
6996 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6997
cee83bcb
PM
69982013-09-02 Pierre Muller <muller@sourceware.org>
6999
7000 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7001 or WriteProcessMemory complete successfully and handle
7002 ERROR_PARTIAL_COPY error.
7003
9a13b2fa
PA
70042013-09-02 Pedro Alves <palves@redhat.com>
7005
7006 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7007 error instead of EIO.
7008
602e3198
JK
70092013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7010
7011 PR server/15604
7012 * linux-low.c: Include filestuff.h.
7013 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7014 * lynx-low.c: Include filestuff.h.
7015 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7016 * server.c: Include filestuff.h.
7017 (main): Call notice_open_fds.
7018 * spu-low.c: Include filestuff.h.
7019 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7020
96d7229d
LM
70212013-08-22 Luis Machado <lgustavo@codesourcery.com>
7022
7023 * Makefile.in: Explain why ../target and ../nat are not
7024 listed as include file search paths.
7025 (linux-waitpid.o): New object file rule.
7026 * configure.srv (srv_native_linux_obj): New variable.
7027 Replace all occurrences of linux native object files with
7028 $srv_native_linux_obj.
7029 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7030 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7031 (linux_enable_event_reporting): Remove declaration.
7032 (my_waitpid): Moved to common/linux-waitpid.c.
7033 (linux_wait_for_event): Pass ptid when calling
7034 linux_enable_event_reporting.
7035 (linux_supports_tracefork_flag): Remove.
7036 (linux_enable_event_reporting): Likewise.
7037 (linux_tracefork_grandchild): Remove.
7038 (STACK_SIZE): Moved to common/linux-ptrace.c.
7039 (linux_tracefork_child): Remove.
7040 (linux_test_for_tracefork): Remove.
7041 (linux_look_up_symbols): Call linux_supports_traceclone.
7042 (initialize_low): Remove call to linux_test_for_tracefork.
7043 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7044 common/linux-ptrace.h.
7045 (PTRACE_TYPE_ARG4): Likewise.
7046 Include linux-ptrace.h.
7047
32940073
PA
70482013-08-21 Pedro Alves <palves@redhat.com>
7049
7050 * config.in: Renegerate.
7051
33b60d58 70522013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7053
33b60d58
LM
7054 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7055 (SFILES): Remove $(srcdir)/common/target-common.c and
7056 add $(srcdir)/target/waitstatus.c.
7057 (OBS): Remove target-common.o and add waitstatus.o.
7058 (server_h): Remove $(srcdir)/../common/target-common.h and
7059 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7060 and $(srcdir)/../target/waitstatus.h.
7061 (target-common.o): Remove.
7062 (waitstatus.o): New target object file.
7063 * target.h: Do not include target-common.h and
7064 include target/resume.h, target/wait.h and
7065 target/waitstatus.h.
7066
b8e1b30e
LM
70672013-08-13 Luis Machado <lgustavo@codesourcery.com>
7068
7069 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7070 to PTRACE_TYPE_ARG3.
7071 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7072 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7073 PTRACE_TYPE_ARG4.
7074 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7075 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7076
7a60ad40
YQ
70772013-07-27 Jie Zhang <jie@codesourcery.com>
7078 Daniel Jacobowitz <dan@codesourcery.com>
7079 Yao Qi <yao@codesourcery.com>
7080
7081 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7082 (mips-linux-watch.o): New rule.
7083 (mips_linux_watch_h): New variable.
7084 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7085 srv_tgtobj.
7086 * linux-mips-low.c: Include mips-linux-watch.h.
7087 (struct arch_process_info, struct arch_lwp_info): New.
7088 (update_watch_registers_callback): New function.
7089 (mips_linux_new_process, mips_linux_new_thread) New functions.
7090 (mips_linux_prepare_to_resume, mips_insert_point): New
7091 functions.
7092 (mips_remove_point, mips_stopped_by_watchpoint): New
7093 functions.
7094 (rsp_bp_type_to_target_hw_bp_type): New function.
7095 (mips_stopped_data_address): New function.
7096 (the_low_target): Add watchpoint support functions.
7097
de6f69ad
YQ
70982013-07-27 Yao Qi <yao@codesourcery.com>
7099
7100 * i386-low.c: Include break-common.h.
7101 (enum target_hw_bp_type): Remove.
7102
3360c0bf
LM
71032013-07-24 Luis Machado <lgustavo@codesourcery.com>
7104
7105 * Makefile.in (SFILES): /common/target-common.c.
7106 (OBS): Add target-common.o.
7107 (server_h): Add $(srcdir)/../common/target-common.h.
7108 (target-common.o): New target.
7109 * server.c (queue_stop_reply_callback): Free
7110 status string after use.
7111 * target.c (target_waitstatus_to_string): Remove.
7112 * target.h: Include target-common.h.
7113 (resume_kind): Likewise.
7114 (target_waitkind): Likewise.
7115 (target_waitstatus): Likewise.
7116 (TARGET_WNOHANG): Likewise.
7117
bd885420
YQ
71182013-07-04 Yao Qi <yao@codesourcery.com>
7119
7120 * Makefile.in (host_alias): Use @host_noncanonical@.
7121 (target_alias): Use @target_noncanonical@.
7122 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7123 ACX_NONCANONICAL_HOST.
7124 * configure: Regenerated.
7125
7126 Revert:
7127 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7128
7129 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7130 * configure: Rebuild.
7131 * Makefile.in (version_host, version_target): Get from configure.
7132 (version.c): Use $(version_host) and $(version_target).
7133
17ef446e
PA
71342013-07-03 Pedro Alves <palves@redhat.com>
7135
7136 * Makefile.in (config.status): Depend on development.sh.
7137 * acinclude.m4: Include libmcheck.m4.
7138 * configure: Regenerate.
7139
7a9a7487
MG
71402013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7141
7142 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7143 attribute inside the parentheses.
7144 (winapi_DebugSetProcessKillOnExit): Ditto.
7145 (winapi_DebugBreakProcess): Ditto.
7146 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7147
49b64de6
MG
71482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7149
7150 * notif.h (notif_event): Add a dummy member to avoid compiler
7151 errors.
7152
d5749ee7
PA
71532013-07-01 Pedro Alves <palves@redhat.com>
7154
7155 * hostio.c (HOSTIO_PATH_MAX): Define.
7156 (require_filename, handle_open, handle_unlink, handle_readlink):
7157 Use it.
7158
d8d2a3ee
PA
71592013-07-01 Pedro Alves <palves@redhat.com>
7160
7161 * server.h: Include "pathmax.h".
7162 * linux-low.c: Don't include sys/param.h.
7163 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7164 MAXPATHLEN.
7165 * win32-low.c: Don't include sys/param.h.
7166 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7167
bc7dea8d
PA
71682013-07-01 Pedro Alves <palves@redhat.com>
7169
7170 * event-loop.c: Don't check HAVE_UNISTD_H before including
7171 <unistd.h>.
7172 * gdbreplay.c: Likewise.
7173 * remote-utils.c: Likewise.
7174 * server.c: Likewise.
7175 * configure.ac: Don't check for unistd.h.
7176 * configure: Regenerate.
7177
d6c2da54
TT
71782013-06-28 Tom Tromey <tromey@redhat.com>
7179
7180 * Makefile.in (version.c): Use version.in, not
7181 common/version.in.
7182
257b6bec
MG
71832013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7184
7185 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7186 * configure: Rebuild.
7187 * Makefile.in (version_host, version_target): Get from configure.
7188 (version.c): Use $(version_host) and $(version_target).
7189
86ebe149
DK
71902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7191
7192 Fix trace-status to output user name without trailing colon.
7193 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7194
f30aa5af
DK
71952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7196
7197 Fix trace-status to output proper start-time and stop-time.
7198 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7199 output start time and stop time in hex as gdb expects.
7200
28a93511
YQ
72012013-06-26 Pedro Alves <pedro@codesourcery.com>
7202
7203 * tracepoint.c (build_traceframe_info_xml): Output trace state
7204 variables present in the trace buffer.
7205
01208463
TT
72062013-06-24 Tom Tromey <tromey@redhat.com>
7207
7208 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7209 create-version.sh.
7210 (version.o): Remove.
7211 * gdbreplay.c: Include version.h.
7212 (version, host_name): Don't declare.
7213 * server.h: Include version.h.
7214 (version, host_name): Don't declare.
7215
760256f9
PA
72162013-06-12 Pedro Alves <palves@redhat.com>
7217
7218 * linux-x86-low.c (linux_is_elf64): Delete global.
7219 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7220 with local linux_pid_exe_is_elf_64_file use.
7221
030031ee
PA
72222013-06-11 Pedro Alves <palves@redhat.com>
7223
7224 * linux-low.c (regset_disabled, disable_regset): New functions.
7225 (regsets_fetch_inferior_registers)
7226 (regsets_store_inferior_registers): Use them.
7227 (initialize_regsets_info); Don't allocate the disabled_regsets
7228 array here.
7229 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7230 comment.
7231
5da6eb0a
PA
72322013-06-11 Pedro Alves <palves@redhat.com>
7233
7234 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7235 xmalloc.
7236
7e5aaa09
PA
72372013-06-11 Pedro Alves <palves@redhat.com>
7238
7239 * linux-x86-low.c (initialize_low_arch): Call
7240 init_registers_x32_avx_linux.
7241
d878444c
JK
72422013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7243
7244 Fix compatibility with Android Bionic.
7245 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7246 it is not empty.
7247
3aee8918
PA
72482013-06-07 Pedro Alves <palves@redhat.com>
7249
5f2b57b5 7250 PR server/14823
3aee8918
PA
7251 * Makefile.in (OBS): Add tdesc.o.
7252 (IPA_OBJS): Add tdesc-ipa.o.
7253 (tdesc-ipa.o): New rule.
7254 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7255 interface.
7256 * linux-low.c (new_inferior): Delete.
7257 (disabled_regsets, num_regsets): Delete.
7258 (linux_add_process): Adjust to set the new per-process
7259 new_inferior flag.
7260 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7261 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7262 was a stop. When calling arch_setup, switch the current inferior
7263 to the thread that got an event.
7264 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7265 (regsets_fetch_inferior_registers)
7266 (regsets_store_inferior_registers): New regsets_info parameter.
7267 Adjust to use it.
7268 (linux_register_in_regsets): New regs_info parameter. Adjust to
7269 use it.
7270 (register_addr, fetch_register, store_register): New usrregs_info
7271 parameter. Adjust to use it.
7272 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7273 parameter regs_info. Adjust to use it.
7274 (linux_fetch_registers): Get the current inferior's regs_info, and
7275 adjust to use it.
7276 (linux_store_registers): Ditto.
7277 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7278 (initialize_low): Don't initialize the target_regsets here. Call
7279 initialize_low_arch.
7280 * linux-low.h (target_regsets): Delete declaration.
7281 (struct regsets_info): New.
7282 (struct usrregs_info): New.
7283 (struct regs_info): New.
7284 (struct process_info_private) <new_inferior>: New field.
7285 (struct linux_target_ops): Delete the num_regs, regmap, and
7286 regset_bitmap fields. New field regs_info.
7287 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7288 * i387-fp.c (num_xmm_registers): Delete.
7289 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7290 calls to new interface.
7291 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7292 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7293 Infer the number of xmm registers from the regcache's target
7294 description.
7295 * i387-fp.h (num_xmm_registers): Delete.
7296 * inferiors.c (add_thread): Don't install the thread's regcache
7297 here.
7298 * proc-service.c (gregset_info): Fetch the current inferior's
7299 regs_info. Adjust to use it.
7300 * regcache.c: Include tdesc.h.
7301 (register_bytes, reg_defs, num_registers)
7302 (gdbserver_expedite_regs): Delete.
7303 (get_thread_regcache): If the thread doesn't have a regcache yet,
7304 create one, instead of aborting gdbserver.
7305 (regcache_invalidate_one): Rename to ...
7306 (regcache_invalidate_thread): ... this.
7307 (regcache_invalidate_one): New.
7308 (regcache_invalidate): Only invalidate registers of the current
7309 process.
7310 (init_register_cache): Add target_desc parameter, and use it.
7311 (new_register_cache): Ditto. Assert the target description has a
7312 non zero registers_size.
7313 (regcache_cpy): Add assertions. Adjust.
7314 (realloc_register_cache, set_register_cache): Delete.
7315 (registers_to_string, registers_from_string): Adjust.
7316 (find_register_by_name, find_regno, find_register_by_number)
7317 (register_cache_size): Add target_desc parameter, and use it.
7318 (free_register_cache_thread, free_register_cache_thread_one)
7319 (regcache_release, register_cache_size): New.
7320 (register_size): Add target_desc parameter, and use it.
7321 (register_data, supply_register, supply_register_zeroed)
7322 (supply_regblock, supply_register_by_name, collect_register)
7323 (collect_register_as_string, collect_register_by_name): Adjust.
7324 * regcache.h (struct target_desc): Forward declare.
7325 (struct regcache) <tdesc>: New field.
7326 (init_register_cache, new_register_cache): Add target_desc
7327 parameter.
7328 (regcache_invalidate_thread): Declare.
7329 (regcache_invalidate_one): Delete declaration.
7330 (regcache_release): Declare.
7331 (find_register_by_number, register_cache_size, register_size)
7332 (find_regno): Add target_desc parameter.
7333 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7334 declarations.
7335 * remote-utils.c: Include tdesc.h.
7336 (outreg, prepare_resume_reply): Adjust.
7337 * server.c: Include tdesc.h.
7338 (gdbserver_xmltarget): Delete declaration.
7339 (get_features_xml, process_serial_event): Adjust.
7340 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7341 declare.
7342 (struct process_info) <tdesc>: New field.
7343 (ipa_tdesc): Declare.
7344 * tdesc.c: New file.
7345 * tdesc.h: New file.
7346 * tracepoint.c: Include tdesc.h.
7347 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7348 (get_context_regcache): Adjust to pass ipa_tdesc down.
7349 (do_action_at_tracepoint): Adjust to get the register cache size
7350 from the context regcache's description.
7351 (traceframe_walk_blocks): Adjust to get the register cache size
7352 from the current trace frame's description.
7353 (traceframe_get_pc): Adjust to get current trace frame's
7354 description and pass it down.
7355 (gdb_collect): Adjust to get the register cache size from the
7356 IPA's description.
7357 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7358 (gdbserver_xmltarget): Delete.
7359 (initialize_low_tracepoint): Set the ipa's target description.
7360 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7361 (initialize_low_tracepoint): Set the ipa's target description.
7362 * linux-x86-low.c: Include tdesc.h.
7363 [__x86_64__] (is_64bit_tdesc): New.
7364 (ps_get_thread_area, x86_get_thread_area): Use it.
7365 (i386_cannot_store_register): Rename to ...
7366 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7367 (i386_cannot_fetch_register): Rename to ...
7368 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7369 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7370 to new interface.
7371 (target_regsets): Rename to ...
7372 (x86_regsets): ... this.
7373 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7374 interface.
7375 (x86_siginfo_fixup): Use is_64bit_tdesc.
7376 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7377 (tdesc_x32_avx_linux, tdesc_x32_linux)
7378 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7379 Declare.
7380 (x86_linux_update_xmltarget): Delete.
7381 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7382 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7383 (AMD64_LINUX_USER64_CS): New.
7384 (x86_linux_read_description): New, based on
7385 x86_linux_update_xmltarget.
7386 (same_process_callback): New.
7387 (x86_arch_setup_process_callback): New.
7388 (x86_linux_update_xmltarget): New.
7389 (x86_regsets_info): New.
7390 (amd64_linux_regs_info): New.
7391 (i386_linux_usrregs_info): New.
7392 (i386_linux_regs_info): New.
7393 (x86_linux_regs_info): New.
7394 (x86_arch_setup): Reimplement.
7395 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7396 (x86_emit_ops): Ditto.
7397 (the_low_target): Adjust. Install x86_linux_regs_info,
7398 x86_cannot_fetch_register, and x86_cannot_store_register.
7399 (initialize_low_arch): New.
7400 * linux-ia64-low.c (tdesc_ia64): Declare.
7401 (ia64_fetch_register): Adjust.
7402 (ia64_usrregs_info, regs_info): New globals.
7403 (ia64_regs_info): New function.
7404 (the_low_target): Adjust.
7405 (initialize_low_arch): New function.
7406 * linux-sparc-low.c (tdesc_sparc64): Declare.
7407 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7408 Adjust.
7409 (sparc_arch_setup): New function.
7410 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7411 (the_low_target): Adjust.
7412 (initialize_low_arch): New function.
7413 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7414 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7415 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7416 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7417 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7418 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7419 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7420 (tdesc_powerpc_isa205_vsx64l): Declare.
7421 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7422 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7423 (ppc_set_pc, ppc_get_hwcap): Adjust.
7424 (ppc_usrregs_info): Forward declare.
7425 (!__powerpc64__) ppc_regmap_adjusted: New global.
7426 (ppc_arch_setup): Adjust to the current process'es target
7427 description.
7428 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7429 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7430 (ppc_store_evrregset): Adjust.
7431 (target_regsets): Rename to ...
7432 (ppc_regsets): ... this, and make static.
7433 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7434 (ppc_regs_info): New function.
7435 (the_low_target): Adjust.
7436 (initialize_low_arch): New function.
7437 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7438 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7439 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7440 (tdesc_s390x_linux64v2): Declare.
7441 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7442 (s390_fill_gregset, s390_store_last_break): Adjust.
7443 (target_regsets): Rename to ...
7444 (s390_regsets): ... this, and make static.
7445 (s390_get_pc, s390_set_pc): Adjust.
7446 (s390_get_hwcap): New target_desc parameter, and use it.
7447 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7448 (s390_arch_setup): Adjust to set the current process'es target
7449 description. Don't adjust the regmap.
7450 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7451 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7452 (regs_info_3264): New globals.
7453 (s390_regs_info): New function.
7454 (the_low_target): Adjust.
7455 (initialize_low_arch): New function.
7456 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7457 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7458 [__mips64] (init_registers_mips_linux)
7459 (init_registers_mips_dsp_linux): Delete defines.
7460 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7461 (have_dsp): New global.
7462 (mips_read_description): New, based on mips_arch_setup.
7463 (mips_arch_setup): Reimplement.
7464 (get_usrregs_info): New function.
7465 (mips_cannot_fetch_register, mips_cannot_store_register)
7466 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7467 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7468 (target_regsets): Rename to ...
7469 (mips_regsets): ... this, and make static.
7470 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7471 (dsp_regs_info, regs_info): New globals.
7472 (mips_regs_info): New function.
7473 (the_low_target): Adjust.
7474 (initialize_low_arch): New function.
7475 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7476 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7477 Declare.
7478 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7479 (arm_read_description): New, with bits factored from
7480 arm_arch_setup.
7481 (arm_arch_setup): Reimplement.
7482 (target_regsets): Rename to ...
7483 (arm_regsets): ... this, and make static.
7484 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7485 (arm_regs_info): New function.
7486 (the_low_target): Adjust.
7487 (initialize_low_arch): New function.
7488 * linux-m68k-low.c (tdesc_m68k): Declare.
7489 (target_regsets): Rename to ...
7490 (m68k_regsets): ... this, and make static.
7491 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7492 (m68k_regs_info): New function.
7493 (m68k_arch_setup): New function.
7494 (the_low_target): Adjust.
7495 (initialize_low_arch): New function.
7496 * linux-sh-low.c (tdesc_sharch): Declare.
7497 (target_regsets): Rename to ...
7498 (sh_regsets): ... this, and make static.
7499 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7500 (sh_regs_info, sh_arch_setup): New functions.
7501 (the_low_target): Adjust.
7502 (initialize_low_arch): New function.
7503 * linux-bfin-low.c (tdesc_bfin): Declare.
7504 (bfin_arch_setup): New function.
7505 (bfin_usrregs_info, regs_info): New globals.
7506 (bfin_regs_info): New function.
7507 (the_low_target): Adjust.
7508 (initialize_low_arch): New function.
7509 * linux-cris-low.c (tdesc_cris): Declare.
7510 (cris_arch_setup): New function.
7511 (cris_usrregs_info, regs_info): New globals.
7512 (cris_regs_info): New function.
7513 (the_low_target): Adjust.
7514 (initialize_low_arch): New function.
7515 * linux-cris-low.c (tdesc_crisv32): Declare.
7516 (cris_arch_setup): New function.
7517 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7518 (cris_regs_info): New function.
7519 (the_low_target): Adjust.
7520 (initialize_low_arch): New function.
7521 * linux-m32r-low.c (tdesc_m32r): Declare.
7522 (m32r_arch_setup): New function.
7523 (m32r_usrregs_info, regs_info): New globals.
7524 (m32r_regs_info): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7527 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7528 (tic6x_usrregs_info): Forward declare.
7529 (tic6x_read_description): New function, based on ...
7530 (tic6x_arch_setup): ... this. Reimplement.
7531 (target_regsets): Rename to ...
7532 (tic6x_regsets): ... this, and make static.
7533 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7534 (tic6x_regs_info): New function.
7535 (the_low_target): Adjust.
7536 (initialize_low_arch): New function.
7537 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7538 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7539 (target_regsets): Rename to ...
7540 (xtensa_regsets): ... this, and make static.
7541 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7542 globals.
7543 (xtensa_arch_setup, xtensa_regs_info): New functions.
7544 (the_low_target): Adjust.
7545 (initialize_low_arch): New function.
7546 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7547 (nios2_arch_setup): Set the current process'es tdesc.
7548 (target_regsets): Rename to ...
7549 (nios2_regsets): ... this.
7550 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7551 (nios2_regs_info): New function.
7552 (the_low_target): Adjust.
7553 (initialize_low_arch): New function.
a261b8f5
PA
7554 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7555 (aarch64_arch_setup): Set the current process'es tdesc.
7556 (target_regsets): Rename to ...
7557 (aarch64_regsets): ... this.
7558 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7559 (aarch64_regs_info): New function.
7560 (the_low_target): Adjust.
7561 (initialize_low_arch): New function.
3aee8918
PA
7562 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7563 globals.
7564 (target_regsets): Rename to ...
7565 (tile_regsets): ... this.
7566 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7567 (tile_regs_info): New function.
7568 (tile_arch_setup): Set the current process'es tdesc.
7569 (the_low_target): Adjust.
7570 (initialize_low_arch): New function.
7571 * spu-low.c (tdesc_spu): Declare.
7572 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7573 * win32-arm-low.c (tdesc_arm): Declare.
7574 (arm_arch_setup): New function.
7575 (the_low_target): Install arm_arch_setup instead of
7576 init_registers_arm.
7577 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7578 (init_windows_x86): Rename to ...
7579 (i386_arch_setup): ... this. Set `win32_tdesc'.
7580 (the_low_target): Adjust.
7581 * win32-low.c (win32_tdesc): New global.
7582 (child_add_thread): Don't create the thread cache here.
7583 (do_initial_child_stuff): Set the new process'es tdesc.
7584 * win32-low.h (struct target_desc): Forward declare.
7585 (win32_tdesc): Declare.
7586 * lynx-i386-low.c (tdesc_i386): Declare global.
7587 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7588 * lynx-low.c (lynx_tdesc): New global.
7589 (lynx_add_process): Set the new process'es tdesc.
7590 * lynx-low.h (struct target_desc): Forward declare.
7591 (lynx_tdesc): Declare global.
7592 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7593 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7594 * nto-low.c (nto_tdesc): New global.
7595 (do_attach): Set the new process'es tdesc.
7596 * nto-low.h (struct target_desc): Forward declare.
7597 (nto_tdesc): Declare.
7598 * nto-x86-low.c (tdesc_i386): Declare.
7599 (nto_x86_arch_setup): Set `nto_tdesc'.
7600
b1fbec62
GB
76012013-06-04 Gary Benson <gbenson@redhat.com>
7602
7603 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7604 to qSupported response when appropriate.
7605 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7606 with nonzero-length annex.
7607 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7608 arguments supplied in annex.
7609
d1ec4ce7
DE
76102013-05-31 Doug Evans <dje@google.com>
7611
ac44adcb 7612 PR server/15594
d1ec4ce7
DE
7613 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7614 64 bits in 64-cross-32 environment.
7615
9b25f2d3
PA
76162013-05-28 Pedro Alves <palves@redhat.com>
7617
7618 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7619 (aarch64-without-fpu.c): Delete rule.
7620 * configure.srv (aarch64*-*-linux*): Remove references to
7621 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7622 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7623 declaration.
7624
6740dc9c
PA
76252013-05-24 Pedro Alves <palves@redhat.com>
7626
7627 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7628 instead of strchr/decode_address. Error if the range isn't split
7629 with a ','. Don't assume there's be a ':' in the action.
7630
c2d6af84
PA
76312013-05-23 Yao Qi <yao@codesourcery.com>
7632 Pedro Alves <palves@redhat.com>
7633
7634 * linux-low.c (lwp_in_step_range): New function.
7635 (linux_wait_1): If the thread was range stepping and stopped
7636 outside the stepping range, report the stop to GDB. Otherwise,
7637 continue stepping. Add range stepping debug output.
7638 (linux_set_resume_request): Copy the step range from the resume
7639 request to the lwp.
7640 (linux_supports_range_stepping): New.
7641 (linux_target_ops) <supports_range_stepping>: Set to
7642 linux_supports_range_stepping.
7643 * linux-low.h (struct linux_target_ops)
7644 <supports_range_stepping>: New field.
7645 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7646 * linux-x86-low.c (x86_supports_range_stepping): New.
7647 (the_low_target) <supports_range_stepping>: Set to
7648 x86_supports_range_stepping.
7649 * server.c (handle_v_cont): Handle 'r' action.
7650 (handle_v_requests): Append ";r" if the target supports range
7651 stepping.
7652 * target.h (struct thread_resume) <step_range_start,
7653 step_range_end>: New fields.
7654 (struct target_ops) <supports_range_stepping>:
7655 New field.
7656 (target_supports_range_stepping): New macro.
7657
58794e1a
JB
76582013-05-17 Joel Brobecker <brobecker@adacore.com>
7659
7660 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7661 confusion in comment.
7662
d631c5a7
JB
76632013-05-17 Joel Brobecker <brobecker@adacore.com>
7664
7665 * lynx-low.c (struct process_info_private): New type.
7666 (lynx_add_process): New function.
7667 (lynx_create_inferior, lynx_attach): Replace calls to
7668 add_process by calls to lynx_add_process.
7669 (lynx_resume): If PTID is null, then try using
7670 current_process()->private->last_wait_event_ptid.
7671 Add comments.
7672 (lynx_clear_inferiors): Delete. The contents of that function
7673 has been inlined in lynx_mourn;
7674 (lynx_wait_1): Save the ptid in the process's private data.
7675 (lynx_mourn): Free the process' private data. Replace call
7676 to lynx_clear_inferiors by call to clear_inferiors.
7677
96f7a20f
YQ
76782013-05-17 Yao Qi <yao@codesourcery.com>
7679
7680 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7681 the right place.
7682
db0dfaa0
LM
76832013-05-16 Luis Machado <lgustavo@codesourcery.com>
7684
7685 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7686 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7687 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7688 PT_TEXT_END_ADDR guards. Update comments.
7689 (linux_target_op) <read_offsets>: Conditionally define to
7690 linux_read_offsets if the target is UCLIBC and if it defines
7691 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7692
68f5f838
SL
76932013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7694 Andrew Jenner <andrew@codesourcery.com>
7695
7696 * Makefile.in (SFILES): Add linux-nios2-low.c.
7697 (clean): Add action to delete nios2-linux.c.
7698 (nios2-linux.c): New rule.
7699 * configure.srv: Add nios2*-*-linux*.
7700 * linux-nios2-low.c: New.
7701
1ebff1fd
HAQ
77022013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7703
7704 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7705
f6150862
HZ
77062013-04-25 Hui Zhu <hui@codesourcery.com>
7707
7708 PR gdb/15186
f6150862
HZ
7709 * ax.c (ax_printf): Add fflush.
7710
614c279d
TT
77112013-04-22 Tom Tromey <tromey@redhat.com>
7712
7713 * Makefile.in (SFILES): Add filestuff.c.
7714 (OBS): Add filestuff.o.
7715 (filestuff.o): New target.
7716 * config.in, configure: Rebuild.
7717 * configure.ac: Check for fdwalk, pipe2.
7718
7d4e5717
PA
77192013-04-17 Pedro Alves <palves@redhat.com>
7720
7721 * configure.ac (USE_THREAD_DB): Delete variable.
7722 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7723 Don't AC_SUBST USE_THREAD_DB.
7724 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7725 * config.in, configure: Regenerate.
7726
d5c93e41
PA
77272013-04-16 Pedro Alves <palves@redhat.com>
7728
7729 * linux-low.h (struct lwp_info) <thread_known>: Move under
7730 the USE_THREAD_DB #ifdef.
7731
04f5fe89
PA
77322013-04-16 Pedro Alves <palves@redhat.com>
7733
7734 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7735 (linux-low.o): Delete rule.
7736 * linux-low.h: Always include "gdb_thread_db.h" instead of
7737 conditionally including thread_db.h.
7738 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7739 HAVE_THREAD_DB_H.
7740
480b27bf
JK
77412013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7742
7743 * Makefile.in (install-only): Fix make install regression.
7744
43662968
JK
77452013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7746
7747 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7748 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7749 installation.
7750 * gdbserver.1: Remove.
7751
3e74e146
PA
77522013-03-22 Pedro Alves <palves@redhat.com>
7753
7754 * linux-low.c (handle_extended_wait): Don't call
7755 linux_enable_event_reporting.
7756
a8347a2a
TT
77572013-03-15 Tony Theodore <tonyt@logyst.com>
7758
7759 PR build/9098:
7760 * Makefile.in (SHELL): Use @SHELL@.
7761
eeb56fa7
SDJ
77622013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7763
7764 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7765 compiler warning.
7766
4fa7e2ff
JB
77672013-03-13 Joel Brobecker <brobecker@adacore.com>
7768
7769 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7770 Remove extraneous NULL element.
7771
8ddb1965
YQ
77722013-03-13 Yao Qi <yao@codesourcery.com>
7773
7774 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7775 'V' block in trace frame.
7776
9accd112
MM
77772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7778
7779 * target.h (struct target_ops): Add btrace ops.
7780 (target_supports_btrace): New macro.
7781 (target_enable_btrace): New macro.
7782 (target_disable_btrace): New macro.
7783 (target_read_btrace): New macro.
7784 * gdbthread.h (struct thread_info): Add btrace field.
7785 * server.c: Include btrace-common.h.
7786 (handle_btrace_general_set): New function.
7787 (handle_btrace_enable): New function.
7788 (handle_btrace_disable): New function.
7789 (handle_general_set): Call handle_btrace_general_set.
7790 (handle_qxfer_btrace): New function.
7791 (struct qxfer qxfer_packets[]): Add btrace entry.
7792 * inferiors.c (remove_thread): Disable btrace.
7793 * linux-low: Include linux-btrace.h.
7794 (linux_low_enable_btrace): New function.
7795 (linux_low_read_btrace): New function.
7796 (linux_target_ops): Add btrace ops.
7797 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7798 Add srv_linux_btrace=yes.
7799 (x86_64-*-linux*): Add linux-btrace.o.
7800 Add srv_linux_btrace=yes.
7801 * configure.ac: Define HAVE_LINUX_BTRACE.
7802 * config.in: Regenerated.
7803 * configure: Regenerated.
7804
5cc22e4c
MM
78052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7806
7807 * server.c (handle_qxfer): Preserve error message if -3 is
7808 returned.
7809 (qxfer): Document the -3 return value.
7810
7c97f91e
MM
78112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7812
7813 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7814 (linux_btrace_h): New variable.
7815 (linux-btrace.o): New rule.
7816
be9a119c 78172013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7818 Hafiz Abid Qadeer <abidh@codesourcery.com>
7819
7820 * tracepoint.c (trace_buffer_size): New global.
7821 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7822 (init_trace_buffer): Change to one-argument function. Allocate
7823 trace buffer memory.
7824 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7825 handle QTBuffer:size packet.
7826 (cmd_bigqtbuffer_size): New function.
7827 (initialize_tracepoint): Call init_trace_buffer with
7828 DEFAULT_TRACE_BUFFER_SIZE.
7829 * server.c (handle_query): Add QTBuffer:size in the
7830 supported packets.
7831
e64f7499
YQ
78322013-03-07 Yao Qi <yao@codesourcery.com>
7833
7834 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7835 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7836 of -1.
7837 (cmd_qtsp): Adjust condition. Do post increment.
7838 Set cur_action and cur_step_action back to 0.
7839
f0ae6fc3
PA
78402013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7841
7842 PR server/15236
7843 * linux-low.c (linux_write_memory): Return early success if LEN is
7844 zero.
7845
b5b0b0af
CV
78462013-03-05 Corinna Vinschen <vinschen@redhat.de>
7847
334ad4a8 7848 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7849
589bc927
TT
78502013-02-28 Tom Tromey <tromey@redhat.com>
7851
7852 * configure.ac: Invoke AC_SYS_LARGEFILE.
7853 * configure, config.in: Rebuild.
7854
dfe07582
CV
78552013-02-28 Corinna Vinschen <vinschen@redhat.com>
7856
7857 * win32-low.c: Throughout, fix format strings and casts of
7858 printf-like functions to avoid type related warnings on all
7859 platforms.
7860 (get_child_debug_event): Print dwDebugEventCode as hex since
7861 that's how it's usually documented.
7862
736cd585
YQ
78632013-02-28 Yao Qi <yao@codesourcery.com>
7864
7865 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7866 pulongest.
7867
e1f58301
JW
78682013-02-27 Jiong Wang <jiwang@tilera.com>
7869
7870 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7871 (reg-tilegx32.c): New rule.
7872 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7873 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7874 different register info initializer according to elf class.
7875 (init_registers_tilgx32): New function. The tilegx32 register info
7876 initializer.
7877 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7878 (tile_store_gregset): Likewise.
7879
d171ca78
YQ
78802013-02-27 Yao Qi <yao@codesourcery.com>
7881
7882 * server.c (process_point_options): Print debug message when
7883 debug_threads is true.
7884
282bbdf3
YQ
78852013-02-26 Yao Qi <yao@codesourcery.com>
7886
7887 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7888
aca22551
PA
78892013-02-19 Pedro Alves <palves@redhat.com>
7890 Kai Tietz <ktietz@redhat.com>
7891
7892 PR gdb/15161
7893
7894 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7895 instead of strtoul to extract address from packet.
7896 (process_serial_event) <'z'>: Likewise.
7897
4f3cee1c
YQ
78982013-02-18 Yao Qi <yao@codesourcery.com>
7899
7900 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7901
8e1d55a3
PA
79022013-02-14 Pedro Alves <palves@redhat.com>
7903
7904 Plug memory leak.
7905
7906 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7907 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7908
458820da
PA
79092013-02-14 Pedro Alves <palves@redhat.com>
7910
7911 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7912
baea0dae
PA
79132013-02-14 Pedro Alves <palves@redhat.com>
7914
7915 * tracepoint.c (save_string): Delete.
7916 (add_tracepoint_action): Use savestring instead of save_string.
7917
0b1afbb3
PA
79182013-02-12 Pedro Alves <palves@redhat.com>
7919
7920 * linux-xtensa-low.c: Ditto.
7921 * xtensa-xtregs.c: Ditto.
7922
8a4ac37e
PA
79232013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7924
7925 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7926 thread_db.
7927
148de6bb
MS
79282013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7929
7930 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7931 aarch64_num_wp_regs and aarch64_num_bp_regs to
7932 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7933
55fac6e0
MS
79342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7935
7936 * linux-aarch64-low.c (ps_get_thread_area): Replace
7937 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7938
176eb98c
MS
79392013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7940 Marcus Shawcroft <marcus.shawcroft@arm.com>
7941 Nigel Stephens <nigel.stephens@arm.com>
7942 Yufeng Zhang <yufeng.zhang@arm.com>
7943
7944 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7945 (aarch64.c, aarch64-without-fpu.c): New targets.
7946 * configure.srv (aarch64*-*-linux*): New.
7947 * linux-aarch64-low.c: New file.
7948
56f7af9c
MS
79492013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7950
43aaf8b6 7951 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7952 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7953 (dequeue_one_deferred_signal, linux_resume_one_thread)
7954 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7955 (linux_tracefork_grandchild, linux_test_for_tracefork)
7956 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7957 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7958 where the argument is 0.
7959
60f662b0
YQ
79602013-01-25 Yao Qi <yao@codesourcery.com>
7961
7962 * event-loop.c: Include "queue.h".
7963 (gdb_event_p): New typedef.
7964 (struct gdb_event) <next_event>: Remove.
7965 (event_queue): Change to QUEUE(gdb_event_p).
7966 (async_queue_event): Remove.
7967 (gdb_event_xfree): New.
7968 (initialize_event_loop): New.
7969 (process_event): Use API from QUEUE.
7970 (wait_for_event): Likewise.
7971 * server.c (main): Call initialize_event_loop.
7972 * server.h (initialize_event_loop): Declare.
7973
5ae4861a
YQ
79742013-01-18 Yao Qi <yao@codesourcery.com>
7975
7976 * ax.h (struct eval_agent_expr_context): New.
7977 (gdb_eval_agent_expr): Update declaration.
7978 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7979 TFRAME. Add new argument CTX.
7980 * server.h (struct eval_agent_expr_context): Declare.
7981 (agent_mem_read, agent_tsv_read): Update declaration.
7982 (agent_mem_read_string): Likewise.
7983 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7984 (add_traceframe_block): Add new argument TPOINT.
7985 Increase TPOINT->traceframe_usage.
7986 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7987 eval_tracepoint_agent_expr.
7988 (condition_true_at_tracepoint): Likewise.
7989 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7990 (agent_mem_read_string, agent_tsv_read): Likewise.
7991
85e00e85
YQ
79922013-01-16 Yao Qi <yao@codesourcery.com>
7993
7994 * linux-low.c (linux_resume_one_lwp): Don't check
7995 'lwp->bp_reinsert != 0'.
7996
4039cf45
JB
79972013-01-07 Joel Brobecker <brobecker@adacore.com>
7998 Pedro Alves <palves@redhat.com>
7999
8000 * lynx-low.c (ptrace_request_to_str): Define a temporary
8001 macro and use it to simplify this function's implementation.
8002
9044dee2
JB
80032013-01-07 Joel Brobecker <brobecker@adacore.com>
8004
8005 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8006 sets errno.
8007
e6352c8f
JB
80082013-01-07 Joel Brobecker <brobecker@adacore.com>
8009
8010 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8011
50681a27
JB
80122013-01-07 Joel Brobecker <brobecker@adacore.com>
8013
8014 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8015
3f6e77ef
JB
80162013-01-07 Joel Brobecker <brobecker@adacore.com>
8017
8018 * lynx-low.c (lynx_resume): Use the resume_info parameter
8019 to determine the ptid for the lynx_ptrace call, unless
8020 it is equal to minus_one_ptid, in which case we use the
8021 ptid of the current_inferior.
8022 (lynx_wait_1): After having received a thread create/exit
8023 event, resume the inferior's execution using the signaling
8024 thread's ptid, rather than the old ptid.
8025
7fda33ae
JB
80262013-01-07 Joel Brobecker <brobecker@adacore.com>
8027
8028 * lynx-low.c (lynx_resume): Delete variable ret.
8029
b9786c74
JB
80302013-01-01 Joel Brobecker <brobecker@adacore.com>
8031
8032 * gdbreplay.c (gdbreplay_version): Update copyright year.
8033 * server.c (gdbserver_version): Likewise.
8034
8b93d60f
JB
80352012-12-17 Joel Brobecker <brobecker@adacore.com>
8036
8037 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8038 new thread.
8039
037335a7
JB
80402012-12-17 Joel Brobecker <brobecker@adacore.com>
8041
8042 * lynx-low.c (ptrace_request_to_str): Add handling for
8043 PTRACE_GETTRACESIG.
8044
52d4cbd8
JB
80452012-12-17 Joel Brobecker <brobecker@adacore.com>
8046
8047 * lynx-low.c (lynx_attach): Delete variable new_process.
8048
ab8f6ca9
JB
80492012-12-17 Joel Brobecker <brobecker@adacore.com>
8050
8051 * lynx-low.c (lynx_create_inferior): Delete variable
8052 new_process.
8053
78cbc024
JB
80542012-12-17 Joel Brobecker <brobecker@adacore.com>
8055
8056 * lynx-low.c (ptrace_request_to_str): Do not handle
8057 PTRACE_GETTHREADLIST if this macro does not exist.
8058
14a00470
YQ
80592012-12-15 Yao Qi <yao@codesourcery.com>
8060
8061 * Makefile.in (OBS): Add notif.o.
8062 * notif.c, notif.h: New.
8063 * server.c: Include "notif.h".
8064 (struct vstop_notif) <next>: Remove.
8065 <base>: New field.
8066 (queue_stop_reply): Update.
8067 (push_event, send_next_stop_reply): Remove.
8068 (discard_queued_stop_replies): Update.
8069 (notif_stop): New variable.
8070 (handle_v_stopped): Remove.
8071 (handle_v_requests): Don't call handle_v_stopped. Call
8072 handle_ack_notif instead.
8073 (queue_stop_reply_callback): Call notif_event_enque instead
8074 of queue_stop_reply.
8075 (handle_status): Don't call send_next_stop_reply, call
8076 notif_write_event instead.
8077 (kill_inferior_callback): Likewise.
8078 (detach_or_kill_inferior_callback): Likewise.
8079 (main): Call initialize_notif.
8080 (process_serial_event): Call QUEUE_is_empty.
8081 (handle_target_event): Call notif_push instead of push event.
8082 * server.h (push_event): Remove declaration.
8083
61c125b9
TT
80842012-12-10 Tom Tromey <tromey@redhat.com>
8085
8086 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8087 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8088 macros.
8089 (.c.o): Rewrite.
8090 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8091 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8092 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8093 (amd64-linux-ipa.o, ax.o): Rewrite.
8094 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8095 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8096 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8097 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8098 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8099 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8100 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8101 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8102 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8103 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8104 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8105 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8106 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8107 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8108 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8109 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8110 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8111 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8112 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8113 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8114 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8115 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8116 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8117 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8118 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8119 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8120 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8121 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8122 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8123 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8124 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8125 (reg-tilegx.o): Remove.
8126 (all_object_files): New macro.
8127 Include .deps files.
8128 * aclocal.m4, configure: Rebuild.
8129 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8130 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8131 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8132
e90e9ad9
TT
81332012-12-05 Tom Tromey <tromey@redhat.com>
8134
8135 PR gdb/14917:
8136 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8137
02d403bf 81382012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8139
8140 * configure.ac: Check for linux/perf_event.h.
8141 * config.in: Regenerated.
8142 * configure: Regenerated.
8143
0270a750
PA
81442012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8145
8146 * hostio.c (handle_readlink): Decrease buffer size
8147 parameter passed to readlink by one byte.
8148
8c29b58e
YQ
81492012-11-26 Yao Qi <yao@codesourcery.com>
8150
8151 * configure.ac (build_warnings): Append '-Wempty-body'.
8152 * configure: Regenerated.
8153 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8154 body.
8155
8bdce1ff
PM
81562012-11-15 Pierre Muller <muller@sourceware.org>
8157
8158 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8159 * config.in: Regenerate.
8160 * configure: Regenerate.
8161 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8162 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8163 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8164 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8165 header.
8166 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8167 instead of <sys/wait.h> header.
8168 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8169
02d403bf 81702012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8171
8172 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8173 (various make rules): Remove -DGDBSERVER
8174
fbd5db48
YQ
81752012-11-09 Yao Qi <yao@codesourcery.com>
8176
8177 * spu-low.c (current_ptid): Move it to ..
8178 * gdbthread.h: ... here. New.
8179 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8180 * server.c (myresume, process_serial_event): Likewise.
8181 * thread-db.c (thread_db_find_new_threads): Likewise.
8182 * tracepoint.c (run_inferior_command): Likewise.
8183
b3dc46ff
AB
81842012-10-01 Andrew Burgess <aburgess@broadcom.com>
8185
8186 * server.c (handle_search_memory_1): Include access length in
8187 warning message.
8188
07c04788
HPN
81892012-09-05 Michael Brandt <michael.brandt@axis.com>
8190
8191 * linux-crisv32-low.c: Fix compile errors.
8192
918d227b
YQ
81932012-09-04 Yao Qi <yao@codesourcery.com>
8194
8195 * tracepoint.c (cmd_qtsv): Adjust debug message.
8196 Don't check CUR_TPOINT.
8197
18c1b81a
YQ
81982012-08-28 Yao Qi <yao@codesourcery.com>
8199
8200 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8201 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8202 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8203 Remove declarations of xmalloc, xreallloc, xstrdup and
8204 freeargv.
8205 * Makefile.in (libiberty_h): New.
8206 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8207 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8208
dc82f37b
YQ
82092012-08-23 Yao Qi <yao@codesourcery.com>
8210
8211 * server.h: Remove declaration of 'xsnprintf'.
8212
406b1477
KS
82132012-08-22 Keith Seitz <keiths@redhat.com>
8214
8215 * server.h: Include build-gnulib-gbserver/config.h.
8216 * gdbreplay.c: Likewise.
8217
e6712ff1
DE
82182012-08-08 Doug Evans <dje@google.com>
8219
8220 * Makefile.in (SFILES): Add gdb_vecs.c.
8221 (OBS): Add gdb_vecs.o.
8222 (gdb_vecs_h, host_defs_h): New variables.
8223 (thread-db.o): Add $(gdb_vecs_h) dependency.
8224 (gdb_vecs.o): New rule.
8225 * thread-db.c: #include "gdb_vecs.h".
8226 (thread_db_load_search): Use a vector to iterate over path elements.
8227 Handle text appearing after "$pdir".
8228
8229 * configure.ac: Add check for strstr.
8230 * config.in: Regenerate.
8231 * configure: Regenerate.
8232
7c3270ae
UW
82332012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8234
8235 * hostio.c (handle_pread): If pread fails, fall back to attempting
8236 lseek/read.
8237 (handle_pwrite): Likewise for pwrite.
8238
b62e2b27
UW
82392012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8240
8241 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8242 between unsupported TYPE and unimplementable ADDR/LEN combination.
8243 (arm_insert_point): Act on new return value.
8244
78a99e91
PA
82452012-07-31 Pedro Alves <palves@redhat.com>
8246
8247 * server.c (process_point_options): Only skip tokens if we find
8248 one that is unrecognized. Don't treat 'X' specially while
8249 skipping unrecognized tokens.
8250
fcf303ab
UW
82512012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8252
8253 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8254 to 4-byte-align HW breakpoint addresses for Thumb.
8255
7255706c
YQ
82562012-07-27 Yao Qi <yao@codesourcery.com>
8257
8258 PR remote/14161.
8259
8260 * server.h: Declare gdb_agent_about_to_close.
8261 * target.c (kill_inferior): Include "agent.h".
8262 New. Send command 'kill'.
8263 * target.h (kill_inferior): Removed macro.
8264 * tracepoint.c (gdb_agent_about_to_close): New.
8265 (gdb_agent_helper_thread): Handle command 'close'.
8266 Wait endlessly until the inferior stops.
8267 Install gdb_agent_remove_socket to atexit hook.
8268 (agent_socket_name): New static variable.
8269 (gdb_agent_socket_init): Replace local variable 'name' with
8270 'agent_socket_name'.
8271 (gdb_agent_remove_socket): New.
8272
5a3f286f
YQ
82732012-07-27 Yao Qi <yao@codesourcery.com>
8274
8275 * server.c (process_point_options): Stop at 'X' when parsing.
8276
961bd387
ME
82772012-07-19 Michael Eager <eager@eagercon.com>
8278
a261b8f5 8279 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8280 to hw_execute.
8281 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8282 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8283 hardware breakpoint.
8284
aa7c7447
JK
82852012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8286
8287 * gdbserver/linux-low.c (initialize_low): Call
8288 linux_ptrace_init_warnings.
8289
7f216e7c
DE
82902012-07-02 Doug Evans <dje@google.com>
8291
8292 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8293 pointer to int.
8294
d3ce09f5
SS
82952012-07-02 Stan Shebs <stan@codesourcery.com>
8296
8297 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8298 (ax.o): Add it to build rule.
8299 (ax-ipa.o): Ditto.
8300 (OBS): Add format.o.
8301 (IPA_OBS): Add format.o.
8302 * server.c (handle_query): Claim support for breakpoint commands.
8303 (process_point_options): Add command case.
8304 (process_serial_event): Leave running if there are printfs in
8305 effect.
8306 * mem-break.h (any_persistent_commands): Declare.
8307 (add_breakpoint_commands): Declare.
8308 (gdb_no_commands_at_breakpoint): Declare.
8309 (run_breakpoint_commands): Declare.
8310 * mem-break.c (struct point_command_list): New struct.
8311 (struct breakpoint): New field command_list.
8312 (any_persistent_commands): New function.
8313 (add_commands_to_breakpoint): New function.
8314 (add_breakpoint_commands): New function.
8315 (gdb_no_commands_at_breakpoint): New function.
8316 (run_breakpoint_commands): New function.
8317 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8318 locally.
8319 * ax.c: Include format.h.
8320 (ax_printf): New function.
8321 (gdb_eval_agent_expr): Add printf opcode.
8322
2f8f6aed
YQ
83232012-06-13 Yao Qi <yao@codesourcery.com>
8324
8325 * server.c (start_inferior): Remove duplicated writes to fields
8326 'last_resume_kind' and 'last_status' of 'current_inferior'.
8327
0c9070b3
YQ
83282012-06-12 Yao Qi <yao@codesourcery.com>
8329 Pedro Alves <palves@redhat.com>
8330
8331 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8332 comment.
8333 * server.c (handle_v_cont): Extend comment.
8334
c52daf70
YQ
83352012-06-11 Yao Qi <yao@codesourcery.com>
8336
8337 * linux-low.c (linux_attach): Add 'static'.
8338
d38bbb0a
YQ
83392012-06-06 Yao Qi <yao@codesourcery.com>
8340
8341 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8342
89dc0afd
JK
83432012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8344
8345 Fix gcc -flto compilation warning.
8346 * server.c (main): Make variable multi_mode and attach volatile.
8347
75f62ce7
TJB
83482012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8349
8350 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8351 if the platform doesn't know about it.
8352
65f479b6
PA
83532012-05-30 Jeff Kenton <jkenton@tilera.com>
8354
8355 * Makefile.in (SFILES): Add linux-tile-low.c.
8356 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8357 * configure.srv: Handle tilegx-*-linux*.
8358 * linux-tile-low.c: New file.
8359
0c5bf5a9
JK
83602012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8361
8362 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8363
a493e3e2
PA
83642012-05-24 Pedro Alves <palves@redhat.com>
8365
8366 PR gdb/7205
8367
43aaf8b6 8368 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8369
2ea28649
PA
83702012-05-24 Pedro Alves <palves@redhat.com>
8371
8372 PR gdb/7205
8373
8374 Replace target_signal with gdb_signal throughout.
8375
8d409d16
MR
83762012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8377
8378 * linux-low.c (linux_store_registers): Avoid the copying sequence
8379 when no data has been retrieved by ptrace.
8380
23512c01
MGD
83812012-05-22 Will Deacon <will.deacon@arm.com>
8382
8383 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8384 Include asm/ptrace.h.
8385 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8386 already defined.
8387
4934b29e
MR
83882012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8389
8390 * linux-low.c (linux_store_registers): Don't re-retrieve data
8391 with ptrace that has already been obtained from /proc. Always
8392 copy any data retrieved with ptrace to the buffer supplied.
8393
bde24c0a
PA
83942012-05-11 Yao Qi <yao@codesourcery.com>
8395 Pedro Alves <palves@redhat.com>
8396
8397 * linux-low.c (enum stopping_threads_kind): New.
8398 (stopping_threads): Change type to `enum stopping_threads_kind'.
8399 (handle_extended_wait): If stopping and suspending threads, leave
8400 the new_lwp suspended too.
8401 (linux_wait_for_event): Adjust.
8402 (stop_all_lwps): Set `stopping_threads' to
8403 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8404 whether we're suspending threads or just stopping them. Assert no
8405 recursion happens.
8406
623b6bdf
YQ
84072012-04-29 Yao Qi <yao@codesourcery.com>
8408
8409 * server.h: Move some code to ...
8410 * gdbthread.h: ... here. New.
8411 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8412 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8413 (nto-low.o, win32-low.o): Likewise.
8414 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8415 * regcache.c, remote-utils.c, server.c: Likewise.
8416 * target.c, tracepoint.c, win32-low.c: Likewise.
8417
f15f9948
TJB
84182012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8419
8420 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8421 (PTRACE_ARG4_TYPE): Likewise.
8422 (PTRACE_XFER_TYPE): Likewise.
8423 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8424 ptrace to PTRACE_ARG3_TYPE.
8425 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8426 (PTRACE_ARG4_TYPE): Likewise.
8427 (PTRACE_XFER_TYPE): Likewise.
8428 (linux_detach_one_lwp): Cast fourth argument of
8429 ptrace to long then PTRACE_ARG4_TYPE.
8430 (regsets_fetch_inferior_registers): Cast third argument of
8431 ptrace to long then PTRACE_ARG3_TYPE.
8432 (regsets_store_inferior_registers): Likewise.
8433
38ea300a
PA
84342012-04-20 Pedro Alves <palves@redhat.com>
8435
8436 * configure: Regenerate.
8437
c971b7fa
PA
84382012-04-19 Pedro Alves <palves@redhat.com>
8439
43aaf8b6 8440 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8441 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8442 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8443 (all, install-only, uninstall, clean-info, all-lib, clean): No
8444 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8445 (maintainer-clean realclean distclean): Use subdir_do.
8446 (subdir_do): New.
8447 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8448 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8449 * acinclude.m4: Include acx_configure_dir.m4.
8450 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8451 calls. Call AC_PROG_RANLIB. Configure gnulib using
8452 ACX_CONFIGURE_DIR.
8453 (GNULIB): New.
8454 (GNULIB_STDINT_H): Adjust.
8455 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8456 * gdbreplay.c: Include build-gnulib/config.h.
8457 * server.h: Likewise.
8458 * aclocal.m4: Regenerate.
8459 * config.in: Regenerate.
8460 * configure: Regenerate.
c971b7fa 8461
809277f8
PA
84622012-04-19 Pedro Alves <palves@redhat.com>
8463
8464 * Makefile.in (LIBGNU, INCGNU): Adjust.
8465 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8466 (all, install-only, uninstall, clean-info, all-lib, clean)
8467 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8468 * configure.ac: Adjust AC_OUTPUT output.
8469 * aclocal.m4: Regenerate.
8470 * configure: Regenerate.
8471
fd9bb8b8
PA
84722012-04-19 Pedro Alves <palves@redhat.com>
8473
8474 * Makefile.in (generated_files): New.
8475 (server_h): Remove the explicit dependency on config.h, and depend
8476 on $generated_files.
8477
1c298c66
PA
84782012-04-19 Pedro Alves <palves@redhat.com>
8479
8480 * Makefile.in (INCGNU): Add -Ignulib.
8481
57c4b50b
PA
84822012-04-19 Pedro Alves <palves@redhat.com>
8483
8484 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8485 (INCGNU): ... this, and spell out -I here.
8486 (GNULIB_LIB): Rename to ...
8487 (LIBGNU): ... this.
8488 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8489
1030e047
PA
84902012-04-19 Pedro Alves <palves@redhat.com>
8491
8492 * config.in: Regenerate.
8493
447d4319
PA
84942012-04-19 Pedro Alves <palves@redhat.com>
8495
8496 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8497 * server.h (memmem): Remove declaration.
8498 * config.in: Regenerate.
8499 * configure: Regenerate.
8500
aad9eab9
YQ
85012012-04-19 Yao Qi <yao@codesourcery.com>
8502
8503 * Makefile.in (SFILES): Add common/vec.c.
8504 (OBS): Add vec.o.
8505 (vec.o): New rule.
8506
3e10640f
YQ
85072012-04-19 Yao Qi <yao@codesourcery.com>
8508
8509 * remote-utils.c (prepare_resume_reply): Replace with macro
8510 target_core_of_thread.
8511 * server.c (handle_qxfer_threads_proper): Likewise.
8512 * target.h (traget_core_of_thread): New macro.
8513
71622373
PA
85142012-04-18 Pedro Alves <palves@redhat.com>
8515
8516 * aclocal.m4: Regenerate.
8517 * configure: Regenerate.
8518
80d26939
YQ
85192012-04-16 Yao Qi <yao@codesourcery.com>
8520
8521 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8522 duplicated on address.
8523
42476b70
YQ
85242012-04-16 Yao Qi <yao@codesourcery.com>
8525
8526 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8527 (struct tracepoint_action_ops) <send>: New field.
8528 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8529 (agent_expr_send, x_tracepoint_action_send): New.
8530 (l_tracepoint_action_send): New.
8531 (cmd_qtdp): Download and install tracepoint
8532 according to `use_agent'.
8533 (run_inferior_command): Add one more parameter `len'.
8534 Update callers.
8535 (tracepoint_send_agent): New.
8536 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8537
7bc83639
YQ
85382012-04-16 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c (download_tracepoints): Moved to ...
8541 (cmd_qtstart): ... here.
8542
5f18041e
YQ
85432012-04-14 Yao Qi <yao@codesourcery.com>
8544
8545 * tracepoint.c: Include inttypes.h.
8546 (struct collect_memory_action): Use sized types.
8547 (struct tracepoint): Likewise.
8548 (cmd_qtdp, stop_tracing): Update print specifiers.
8549 (cmd_qtp, response_tracepoint): Likewise.
8550 (collect_data_at_tracepoint): Likewise.
8551 (collect_data_at_step): Likewise.
8552
55a8c076
YQ
85532012-04-14 Yao Qi <yao@codesourcery.com>
8554
8555 Import gnulib module inttypes.
8556 * aclocal.m4, config.in, configure: Regenerated.
8557
dc750257
YQ
85582012-04-14 Yao Qi <yao@codesourcery.com>
8559
8560 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8561 Makefile and config.status at last.
8562
0ab5faf9
YQ
85632012-04-13 Yao Qi <yao@codesourcery.com>
8564
8565 * tracepoint.c: Include stdint.h unconditionally.
8566
18f5fd81
TJB
85672012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8568
8569 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8570 on BFD_HAVE_SYS_PROCFS_TYPE.
8571 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8572 * configure: Regenerate.
8573 * config.in: Likewise.
8574
4d47af5c
L
85752012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8576
8577 * Makefile.in (clean): Also remove x32.c x32-linux.c
8578 x32-avx.c x32-avx-linux.c.
8579 (x32.o): New target.
8580 (x32.c): Likewise.
8581 (x32-linux.o): Likewise.
8582 (x32-linux.c): Likewise.
8583 (x32-avx.o): Likewise.
8584 (x32-avx.c): Likewise.
8585 (x32-avx-linux.o): Likewise.
8586 (x32-avx-linux.c): Likewise.
8587
8588 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8589 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8590 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8591 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8592 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8593 i386/x32-avx-linux.xml.
8594
8595 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8596 (init_registers_x32_avx_linux): Likwise.
8597 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8598 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8599
ecedbe58
PA
86002012-04-13 Pedro Alves <palves@redhat.com>
8601
8602 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8603 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8604 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8605 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8606 the sub-make.
8607
c92b5177
L
86082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8609
8610 * linux-x86-low.c (compat_x32_clock_t): New.
8611 (compat_x32_siginfo_t): Likewise.
8612 (compat_x32_siginfo_from_siginfo): Likewise.
8613 (siginfo_from_compat_x32_siginfo): Likewise.
8614 (linux_is_elf64): Likewise.
8615 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8616 and siginfo_from_compat_x32_siginfo for x32.
8617 (x86_arch_setup): Set linux_is_elf64.
8618
214d508e
L
86192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8620
8621 PR gdb/13969
8622 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8623 e_machine field.
8624 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8625 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8626 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8627 compatible with process.
8628
c9a1864a
YQ
86292012-04-12 Yao Qi <yao@codesourcery.com>
8630
8631 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8632 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8633 (install-only, install-info, clean): Handle sub dir gnulib.
8634 (all-lib, am--refresh): New targets.
8635 (memmem.o): Remove target.
8636 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8637 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8638 (AC_REPLACE_FUNCS): Remove memmem.
8639 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8640 (AC_OUTPUT): Generate Makefile in gnulib/.
8641 * aclocal.m4, config.in, configure: Regenerated.
8642
367ba2c2
MR
86432012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8644
8645 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8646
9d236627
PA
86472012-04-05 Pedro Alves <palves@redhat.com>
8648
8649 -Werror=strict-aliasing
8650
8651 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8652 pointer.
8653
111217b3
PA
86542012-04-04 Pedro Alves <palves@redhat.com>
8655
8656 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8657 (sparc_store_gregset_from_stack, sparc_store_gregset)
8658 (sparc_breakpoint_at): Fix formatting.
8659
8365dcf5
TJB
86602012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8661
8662 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8663 are available.
8664 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8665 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8666 * config.in: Regenerate.
8667 * configure: Likewise.
8668
689cc2ae
PA
86692012-03-29 Pedro Alves <palves@redhat.com>
8670
8671 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8672 Correct ptrace arguments.
8673
c14dfd32
PA
86742012-03-28 Pedro Alves <palves@redhat.com>
8675
8676 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8677 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8678 (IA64_FR1_REGNUM): New defines.
8679 (ia64_fetch_register): New.
8680 (the_low_target): Install it.
8681 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8682 field.
8683 * linux-low.c (linux_fetch_registers): Try the
8684 the_low_target.fetch_register hook first.
8685
8686 * linux-arm-low.c (the_low_target): Adjust.
8687 * linux-bfin-low.c (the_low_target): Adjust.
8688 * linux-cris-low.c (the_low_target): Adjust.
8689 * linux-crisv32-low.c (the_low_target): Adjust.
8690 * linux-m32r-low.c (the_low_target): Adjust.
8691 * linux-m68k-low.c (the_low_target): Adjust.
8692 * linux-mips-low.c (the_low_target): Adjust.
8693 * linux-ppc-low.c (the_low_target): Adjust.
8694 * linux-s390-low.c (the_low_target): Adjust.
8695 * linux-sh-low.c (the_low_target): Adjust.
8696 * linux-sparc-low.c (the_low_target): Adjust.
8697 * linux-tic6x-low.c (the_low_target): Adjust.
8698 * linux-x86-low.c (the_low_target): Adjust.
8699 * linux-xtensa-low.c (the_low_target): Adjust.
8700
63c88e13
PA
87012012-03-26 Pedro Alves <palves@redhat.com>
8702
8703 * server.c (handle_qxfer_libraries): Don't bail early if
8704 the_target->qxfer_libraries_svr4 is not NULL.
8705
fb723180
PA
87062012-03-26 Pedro Alves <palves@redhat.com>
8707
8708 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8709
0afae3cf
PA
87102012-03-23 Pedro Alves <palves@redhat.com>
8711
8712 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8713 "library-list-svr4" element's start tag when the the DSO list is
8714 empty.
8715
485f1ee4
PA
87162012-03-23 Pedro Alves <palves@redhat.com>
8717
8718 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8719 a variable whose type size is the same as the inferior's pointer
8720 size.
8721
a5362b9a
TS
87222012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8723
8724 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8725 struct siginfo.
8726 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8727 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8728 * linux-low.h: Include <signal.h>.
8729 (struct siginfo): Remove forward declaration.
8730 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8731 struct siginfo.
8732
d226c142
MF
87332012-03-21 Mike Frysinger <vapier@gentoo.org>
8734
8735 * .gitignore: Ignore more files.
8736
122f36ef
PA
87372012-03-19 Pedro Alves <palves@redhat.com>
8738 Jan Kratochvil <jan.kratochvil@redhat.com>
8739
8740 * server.c (cont_thread, general_thread): Add describing comments.
8741 (start_inferior): Clear `cont_thread'.
8742 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8743 of a process.
8744
fc3e5175
YQ
87452012-03-15 Yao Qi <yao@codesourcery.com>
8746
8747 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8748 handling to ...
8749 (cmd_qtdp): ... here.
8750
8d0d92cd
YQ
87512012-03-15 Yao Qi <yao@codesourcery.com>
8752
8753 * tracepoint.c (struct tracepoint_action_ops): New.
8754 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8755 (m_tracepoint_action_download): New.
8756 (r_tracepoint_action_download): New.
8757 (x_tracepoint_action_download): New.
8758 (l_tracepoint_action_download): New.
8759 (add_tracepoint_action): Install `action->ops' according type.
8760 (download_tracepoint_1): Move code `download' function pointer
8761 of various tracepoint_action_ops.
8762
87b0bb13
JK
87632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8764
8765 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8766 linux_ptrace_attach_warnings.
8767
5f572dec
JK
87682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8769
8770 * Makefile.in (linux-ptrace.o): New.
8771 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8772 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8773 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8774 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8775 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8776 of these targets.
8777 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8778
f4647387
YQ
87792012-03-08 Yao Qi <yao@codesourcery.com>
8780 Pedro Alves <palves@redhat.com>
8781
8782 Fix PR server/13392.
8783 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8784 offset of JMP insn.
8785 * tracepoint.c (remove_tracepoint): New.
8786 (cmd_qtdp): Call remove_tracepoint when failed to install.
8787
9b224c5e
PA
87882012-03-07 Pedro Alves <palves@redhat.com>
8789
8790 * linux-low.c (get_detach_signal): New.
8791 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8792 Pass on pending signals to PTRACE_DETACH. Check the result of the
8793 ptrace call.
8794 * server.c (program_signals, program_signals_p): New.
8795 (handle_general_set): Handle QProgramSignals.
8796 * server.h (program_signals, program_signals_p): Declare.
8797
e237a7e2
JK
87982012-03-05 Pedro Alves <palves@redhat.com>
8799 Jan Kratochvil <jan.kratochvil@redhat.com>
8800
8801 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8802 New comment why.
8803
5808517f
YQ
88042012-03-03 Yao Qi <yao@codesourcery.com>
8805
8806 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8807 agent_look_up_symbols.
8808
58b4daa5
YQ
88092012-03-03 Yao Qi <yao@codesourcery.com>
8810
8811 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8812 (linux-x86-low.o): Likewise.
8813 * server.h: Remove in_process_agent_loaded.
8814 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8815 common/agent.c.
8816 Update callers.
8817
8ffcbaaf
YQ
88182012-03-03 Yao Qi <yao@codesourcery.com>
8819
8820 * tracepoint.c (gdb_agent_capability): New global.
8821 (in_process_agent_loaded_ust): Renamed to
8822 `in_process_agent_supports_ust'.
8823 Update callers.
8824 (in_process_agent_supports_ust): Call agent_capability_check.
8825 (clear_installed_tracepoints): Assert that agent supports
8826 agent.
8827
d1feda86
YQ
88282012-03-03 Yao Qi <yao@codesourcery.com>
8829
8830 * linux-low.c (linux_supports_agent): New.
8831 (linux_target_ops): Initialize field `supports_agent' with
8832 linux_supports_agent.
8833 * target.h (struct target_ops) <supports_agent>: New.
8834 (target_supports_agent): New macro.
8835 * server.c (handle_general_set): Handle packet 'QAgent'.
8836 (handle_query): Send `QAgent+'.
8837 * Makefile.in (server.o): Depends on agent.h.
8838
2fa291ac
YQ
88392012-03-03 Yao Qi <yao@codesourcery.com>
8840
8841 * Makefile.in (OBS): Add agent.o.
8842 Add new rule for agent.o.
8843 Track dependence of tracepoint.c on agent.h.
8844 * tracepoint.c (run_inferior_command_1):
8845 (run_inferior_command): Call agent_run_command.
8846 (gdb_ust_connect_sync_socket): Deleted. Move it to
8847 common/agent.c.
8848 (resume_thread, stop_thread): Likewise.
8849 (gdb_ust_socket_init): Renamed to ...
8850 (gdb_agent_socket_init): ... New.
8851 (gdb_ust_thread): Renamed to ...
8852 (gdb_agent_helper_thread): ... New.
8853 (gdb_ust_init): Move some code to ...
8854 (gdb_agent_init): ... here. New.
8855 [HAVE_UST]: Call gdb_ust_init.
8856 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8857 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8858 * config.in, configure: Regenerated.
8859
05044653
PA
88602012-03-02 Pedro Alves <palves@redhat.com>
8861
8862 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8863 * linux-low.c (struct simple_pid_list): New.
8864 (stopped_pids): New a struct simple_pid_list pointer.
8865 (add_to_pid_list, pull_pid_from_list): New.
8866 (handle_extended_wait): Don't assume the first signal new children
8867 report is SIGSTOP. Adjust call to pull_pid_from_list.
8868 (linux_wait_for_lwp): Adjust.
8869
8d00225b
YQ
88702012-03-02 Yao Qi <yao@codesourcery.com>
8871
8872 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8873 debug log.
8874
19560ba5
YQ
88752012-03-02 Yao Qi <yao@codesourcery.com>
8876
8877 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8878 `stop_pc' and `tpoint'. Update caller.
8879
1faeff08
MR
88802012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8881
8882 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8883 * linux-low.c (use_linux_regsets): New macro.
8884 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8885 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8886 (linux_register_in_regsets): New function.
8887 (usr_fetch_inferior_registers): Skip registers covered by
8888 regsets.
8889 (usr_store_inferior_registers): Likewise.
8890 (usr_fetch_inferior_registers): New macro.
8891 (usr_store_inferior_registers): Likewise.
8892 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8893 (linux_store_registers): Likewise.
8894 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8895 prototype.
8896 (init_registers_mips64_dsp_linux): Likewise.
8897 (init_registers_mips_linux): New macro.
8898 (init_registers_mips_dsp_linux): Likewise.
8899 (mips_dsp_num_regs): Likewise.
8900 (DSP_BASE, DSP_CONTROL): New fallback macros.
8901 (mips_base_regs): New macro.
8902 (mips_regmap): Use it. Fix the size.
8903 (mips_dsp_regmap): New variable.
8904 (mips_dsp_regset_bitmap): Likewise.
8905 (mips_arch_setup): New function.
8906 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8907 than mips_regmap.
8908 (mips_cannot_store_register): Likewise.
8909 (the_low_target): Update .arch_setup, .num_regs and .regmap
8910 initializers. Add .regset_bitmap initializer.
8911 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8912 initializer.
8913 * linux-bfin-low.c (the_low_target): Likewise.
8914 * linux-cris-low.c (the_low_target): Likewise.
8915 * linux-crisv32-low.c (the_low_target): Likewise.
8916 * linux-ia64-low.c (the_low_target): Likewise.
8917 * linux-m32r-low.c (the_low_target): Likewise.
8918 * linux-m68k-low.c (the_low_target): Likewise.
8919 * linux-ppc-low.c (the_low_target): Likewise.
8920 * linux-s390-low.c (the_low_target): Likewise.
8921 * linux-sh-low.c (the_low_target): Likewise.
8922 * linux-sparc-low.c (the_low_target): Likewise.
8923 * linux-tic6x-low.c (the_low_target): Likewise.
8924 * linux-x86-low.c (the_low_target): Likewise.
8925 * linux-xtensa-low.c (the_low_target): Likewise.
8926 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8927 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8928 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8929 srv_xmlfiles.
8930 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8931 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8932
c03e6ccc
YQ
89332012-02-29 Yao Qi <yao@codesourcery.com>
8934 Pedro Alves <palves@redhat.com>
8935
8936 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8937 `step_over_finished' is true.
8938
644cebc9
PA
89392012-02-27 Pedro Alves <palves@redhat.com>
8940
8941 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8942 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8943
c14d7ab2
PA
89442012-02-27 Pedro Alves <palves@redhat.com>
8945
8946 PR server/9684
8947 * linux-low.c (pid_is_stopped): New.
8948 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8949
412c89dd
LM
89502012-02-25 Luis Machado <lgustavo@codesourcery.com>
8951
8952 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8953 of conditions.
8954
b745defe
MR
89552012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8956
8957 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8958
9f3a5c85
LM
89592012-02-24 Luis Machado <lgustavo@codesourcery>
8960
8961 * server.c (handle_query): Advertise support for target-side
8962 breakpoint condition evaluation.
8963 (process_point_options): New function.
8964 (process_serial_event): When inserting a breakpoint, check for
8965 a target-side condition that should be evaluated.
8966
8967 * mem-break.c: Include regcache.h and ax.h.
8968 (point_cond_list_t): New data structure.
8969 (breakpoint) <cond_list>: New field.
8970 (find_gdb_breakpoint_at): Make non-static.
8971 (delete_gdb_breakpoint_at): Clear any target-side
8972 conditions.
8973 (clear_gdb_breakpoint_conditions): New function.
8974 (add_condition_to_breakpoint): Likewise.
8975 (add_breakpoint_condition): Likewise.
8976 (gdb_condition_true_at_breakpoint): Likewise.
8977 (gdb_breakpoint_here): Return result directly instead
8978 of going through a local variable.
8979
8980 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8981 (clear_gdb_breakpoint_conditions): Likewise.
8982 (add_breakpoint_condition): Likewise.
8983 (gdb_condition_true_at_breakpoint): Likewise.
8984
8985 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8986 (need_step_over_p): Take target-side breakpoint condition into
8987 consideration.
8988
5e1dc496
LM
89892012-02-24 Luis Machado <lgustavo@codesourcery>
8990
8991 * server.h: Include tracepoint.h.
8992 (agent_mem_read, agent_get_trace_state_variable_value,
8993 agent_set_trace_state_variable_value,
8994 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8995 get_set_tsv_func_addr): New prototypes.
8996
8997 * ax.h: New include file.
8998 * ax.c: New source file.
8999
9000 * tracepoint.c: Include ax.h.
9001 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9002 agent_expr, eval_result_type): Move to ax.h.
9003 (parse_agent_expr): Rename to ...
9004 (gdb_parse_agent_expr): ... this, make it non-static and move
9005 to ax.h.
9006 (unparse_agent_expr) Rename to ...
9007 (gdb_unparse_agent_expr): ... this, make it non-static and move
9008 to ax.h.
9009 (eval_agent_expr): Rename to ...
9010 (eval_tracepoint_agent_expr): ... this.
9011 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9012 forward declarations.
9013 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9014 (agent_get_trace_state_variable_value): New function.
9015 (agent_set_trace_state_variable_value): New function.
9016 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9017 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9018 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9019 (condition_true_at_tracepoint): Likewise.
9020 (parse_agent_expr): Rename to ...
9021 (gdb_parse_agent_expr): ... this and move to ax.c.
9022 (unparse_agent_expr): Rename to ...
9023 (gdb_unparse_agent_expr): ... this and move to ax.c.
9024 (gdb_agent_op_name): Move to ax.c.
9025 (eval_agent_expr): Rename to ...
9026 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9027 and move to ax.c.
9028 (eval_tracepoint_agent_expr): New function.
9029 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9030 non-static.
5e1dc496
LM
9031 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9032 ax.c.
9033 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9034 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9035 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9036 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9037 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9038 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9039 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9040 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9041 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9042 (compile_bytecodes): Remove forward declaration.
9043 (is_goto_target): Move to ax.c.
9044 (compile_bytecodes): Move to ax.c and call
9045 agent_get_trace_state_variable_value (...) and
9046 agent_set_trace_state_variable_value (...).
9047
9048 * Makefile.in: Update ax.c and IPA dependencies.
9049
277e4e52
PA
90502012-02-24 Pedro Alves <palves@redhat.com>
9051
9052 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9053 (cmd_bigqtbuffer_circular): ... this. Only handle
9054 'QTBuffer:circular:'.
9055 (handle_tracepoint_general_set): Adjust.
9056
bf4c19f7
YQ
90572012-02-16 Yao Qi <yao@codesourcery.com>
9058
9059 * inferiors.c: Move code to ...
9060 * dll.c: .... here. New.
9061 * server.h: Declare clear_dlls.
9062 * Makefile.in (SFILES): Add dll.c.
9063 (OBS): Add dll.o
9064 (dll.o): New rule.
9065
d73f2619
YQ
90662012-02-11 Yao Qi <yao@codesourcery.com>
9067
9068 * server.c: (handle_monitor_command): Add a new parameter
9069 `own_buf'.
9070 (handle_query): Update caller.
9071
f8255c2a
JB
90722012-02-09 Joel Brobecker <brobecker@adacore.com>
9073
9074 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9075 * configure, config.in: Regenerate.
9076 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9077 is not defined.
9078
da84f473
PA
90792012-02-02 Pedro Alves <palves@redhat.com>
9080
9081 Try SIGKILL first, then PTRACE_KILL.
9082 * linux-low.c (linux_kill_one_lwp): New.
9083 (linux_kill_one_lwp): Rename to ...
9084 (kill_one_lwp_callback): ... this. Use the new
9085 linux_kill_one_lwp.
9086
e886a173
PA
90872012-02-02 Pedro Alves <palves@redhat.com>
9088
9089 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9090 inferior.
9091
be07f1a2
PA
90922012-01-27 Pedro Alves <palves@redhat.com>
9093
9094 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9095 (elf_64_file_p): Make static.
9096 (linux_pid_exe_is_elf_64_file): New.
9097 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9098 Delete declarations.
9099 (linux_pid_exe_is_elf_64_file): Declare.
9100 * linux-x86-low.c (x86_arch_setup): Use
9101 linux_pid_exe_is_elf_64_file.
9102
d8301ad1
JK
91032012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9104
9105 * linux-low.c (linux_wait_for_event_1): Rename to ...
9106 (linux_wait_for_event): ... here and merge it with former
9107 linux_wait_for_event - new variable wait_ptid, use it.
9108 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9109
01b17894
PA
91102012-01-23 Pedro Alves <palves@redhat.com>
9111
9112 * server.c (main): Avoid yet another case of infinite loop while
9113 detaching/killing after a longjmp.
9114
e825046f
JK
91152012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9116
9117 Code cleanup.
9118 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9119
b9e7b9c3
UW
91202012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9121
9122 * hostio.c (handle_readlink): New function.
9123 (handle_vFile): Call it to handle "vFile:readlink" packets.
9124
901f9912
UW
91252012-01-20 Pedro Alves <palves@redhat.com>
9126 Ulrich Weigand <ulrich.weigand@linaro.org>
9127
9128 * server.c (handle_v_requests): Only support vAttach and vRun to
9129 start multiple processes when in extended protocol mode.
9130
fc1ab1a0
PA
91312012-01-17 Pedro Alves <palves@redhat.com>
9132
9133 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9134 memalign plus mprotect to allocate the scratch buffer.
9135
7d5d4e98
PA
91362012-01-13 Pedro Alves <palves@redhat.com>
9137
9138 * server.c (attach_inferior): Clear `cont_thread'.
9139
f128d5e9
PA
91402012-01-13 Pedro Alves <palves@redhat.com>
9141
9142 * server.c (main): Avoid infinite loop while detaching/killing
9143 after a longjmp.
9144
06db92f0
DE
91452012-01-09 Doug Evans <dje@google.com>
9146
9147 * server.c (start_inferior): Set last_ptid in --wrapper case.
9148
32d92999
YQ
91492012-01-06 Yao Qi <yao@codesourcery.com>
9150
9151 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9152 defined.
9153 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9154
5e0a92a9
YQ
91552012-01-04 Yao Qi <yao@codesourcery.com>
9156
9157 * tracepoint.c (cmd_qtdp): Print debug message
9158 for static tracepoint.
9159
ae639e8c
YQ
91602012-01-04 Yao Qi <yao@codesourcery.com>
9161
9162 * tracepoint.c (trace_vdebug): Differentiate debug message
9163 between gdbserver and IPA.
9164
f72429c5
YQ
91652012-01-03 Yao Qi <yao@codesourcery.com>
9166
9167 * tracepoint.c (tracepoint_was_hit): Don't collect for
9168 static tracepoint.
9169
12c3e59c
JB
91702012-01-02 Joel Brobecker <brobecker@adacore.com>
9171
9172 * terminal.h: Reformat copyright header.
9173
67827812
JB
91742012-01-02 Joel Brobecker <brobecker@adacore.com>
9175
9176 * server.c (gdbserver_version): Update copyright year.
9177 * gdbreplay.c (gdbreplay_version): Likewise.
9178
3e52c33d
JK
91792011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9180
9181 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9182
9183 Revert:
9184 2011-12-18 Hui Zhu <teawater@gmail.com>
9185 * linux-low.c (linux_create_inferior): Save return value to ret.
9186
66f1260e
HZ
91872011-12-18 Hui Zhu <teawater@gmail.com>
9188
9189 * linux-low.c (linux_create_inferior): Save return value to ret.
9190
e77616d7
DE
91912011-12-16 Doug Evans <dje@google.com>
9192
e7b06c57
DE
9193 * linux-low.c (linux_create_inferior): If stdio connection,
9194 redirect stdin from /dev/null, stdout to stderr.
9195 * remote-utils.c (remote_is_stdio): New static global.
9196 (remote_connection_is_stdio): New function.
9197 (remote_prepare): Handle stdio connection.
9198 (remote_open): Ditto.
9199 (remote_close): Don't close stdin for stdio connections.
9200 (read_prim,write_prim): New functions. Replace all calls to
9201 read/write to these.
9202 * server.c (main): Watch for "-" argument. Move call to
9203 remote_prepare before start_inferior.
9204 * server.h (STDIO_CONNECTION_NAME): New macro.
9205 (remote_connection_is_stdio): Declare.
9206
e77616d7
DE
9207 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9208 in debugging output.
9209
82067193
YQ
92102011-12-15 Yao Qi <yao@codesourcery.com>
9211
9212 * tracepoint.c: Include sys/syscall.h.
9213 (gdb_ust_thread): Remove preprocessor conditional.
9214
82bfbe7e
PA
92152011-12-14 Pedro Alves <pedro@codesourcery.com>
9216
9217 * linux-low.c (linux_detach_one_lwp): Call
9218 the_low_target.prepare_to_resume before detaching.
9219
712c6575
YQ
92202011-12-14 Yao Qi <yao@codesourcery.com>
9221
9222 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9223 of write.
9224
d54d1edf
YQ
92252011-12-14 Yao Qi <yao@codesourcery.com>
9226
9227 * i386-low.c (i386_low_stopped_data_address): Initialize local
9228 variable `control'.
9229
6210a125
PA
92302011-12-13 Pedro Alves <pedro@codesourcery.com>
9231
9232 PR remote/13492
9233
9234 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9235 DR_CONTROL unless necessary. Extend comments.
9236 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9237 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9238
2ece8244
YQ
92392011-12-13 Yao Qi <yao@codesourcery.com>
9240
9241 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9242 macros.
9243 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9244
784867a5
JK
92452011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9246
9247 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9248 Print new debug message for such case.
9249
6bf36717
JK
92502011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9251
9252 Fix overlapping memcpy.
9253 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9254 the read_inferior_memory transfer.
9255 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9256 write_inferior_memory transfer.
9257 (set_fast_tracepoint_jump): New variable buf. Use it for the
9258 read_inferior_memory and write_inferior_memory transfers.
9259 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9260 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9261 Use it for the write_inferior_memory transfer.
9262 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9263 buffers.
9264
50275556
MR
92652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9266
9267 * linux-low.c (fetch_register, store_register): Make code
9268 consistent, fix formatting.
9269
7325beb4
MR
92702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9271
9272 * linux-low.c (usr_store_inferior_registers): Factor out code
9273 to handle individual registers into...
9274 (store_register): ... this new function.
9275
c642a434
UW
92762011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9277
9278 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9279 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9280 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9281 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9282 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9283 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9284 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9285 (srv_xmlfiles): Add new XML files.
9286
9287 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9288 and <sys/uio.h>.
9289 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9290 (init_registers_s390_linux32v1): Add prototype.
9291 (init_registers_s390_linux32v2): Likewise.
9292 (init_registers_s390_linux64v1): Likewise.
9293 (init_registers_s390_linux64v2): Likewise.
9294 (init_registers_s390x_linux64v1): Likewise.
9295 (init_registers_s390x_linux64v2): Likewise.
9296 (s390_num_regs): Increment to 52.
9297 (s390_regmap): Add orig_r2 register.
9298 (s390_num_regs_3264): Increment to 68.
9299 (s390_regmap_3264): Add orig_r2 register.
9300 (s390_collect_ptrace_register): Handle orig_r2 register.
9301 (s390_supply_ptrace_register): Likewise.
9302 (s390_fill_last_break): New function.
9303 (s390_store_last_break): Likewise.
9304 (s390_fill_system_call): New function.
9305 (s390_store_system_call): Likewise.
9306 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9307 register sets.
9308 (s390_check_regset): New function.
9309 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9310 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9311 Update target_regsets for available register sets.
9312
2268b414
JK
93132011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9314 Jan Kratochvil <jan.kratochvil@redhat.com>
9315
9316 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9317 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9318 New.
9319 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9320 * linux-low.h (struct process_info_private): New member r_debug.
9321 * server.c (handle_qxfer_libraries): Call
9322 the_target->qxfer_libraries_svr4.
9323 (handle_qxfer_libraries_svr4): New function.
9324 (qxfer_packets): New entry "libraries-svr4".
9325 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9326 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9327 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9328 PACKET_qXfer_libraries_svr4.
9329
d6db1fab
UW
93302011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9331
9332 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9333 PSW address/mask between 8-byte and 16-byte formats.
9334 (s390_supply_ptrace_register): Likewise.
9335 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9336 basic addressing mode bit.
9337
242f5f1c
SS
93382011-11-24 Stan Shebs <stan@codesourcery.com>
9339
9340 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9341
f196051f
SS
93422011-11-17 Stan Shebs <stan@codesourcery.com>
9343
9344 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9345 (tracing_start_time): New global.
9346 (tracing_stop_time): New global.
9347 (tracing_user_name): New global.
9348 (tracing_notes): New global.
9349 (tracing_stop_note): New global.
9350 (cmd_qtstart): Set traceframe_usage, start_time.
9351 (stop_tracing): Set stop_time.
9352 (cmd_qtstatus): Report additional status.
9353 (cmd_qtp): New function.
9354 (handle_tracepoint_query): Call it.
9355 (cmd_qtnotes): New function.
9356 (handle_tracepoint_general_set): Call it.
9357 (get_timestamp): Rename from tsv_get_timestamp.
9358
405f8e94
SS
93592011-11-14 Stan Shebs <stan@codesourcery.com>
9360 Kwok Cheung Yeung <kcy@codesourcery.com>
9361
9362 * linux-x86-low.c (small_jump_insn): New.
9363 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9364 trampoline and error message, build a trampoline and issue a small
9365 jump instruction to it.
9366 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9367 trampoline and error message.
9368 (x86_get_min_fast_tracepoint_insn_len): New.
9369 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9370 * linux-low.h (struct linux_target_ops): Add arguments to
9371 install_fast_tracepoint_jump_pad operation, add new operation.
9372 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9373 arguments.
9374 (linux_get_min_fast_tracepoint_insn_len): New function.
9375 (linux_target_op): Add new operation.
9376 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9377 (gdb_trampoline_buffer_end): Ditto.
9378 (gdb_trampoline_buffer_error): Ditto.
9379 (struct ipa_sym_addresses): Add fields for new IPA variables.
9380 (symbol_list): Add entries for new IPA variables.
9381 (struct tracepoint): Add fields to hold the address range of the
9382 trampoline used by the tracepoint.
9383 (trampoline_buffer_head): New static variable.
9384 (trampoline_buffer_tail): Ditto.
9385 (claim_trampoline_space): New function.
9386 (have_fast_tracepoint_trampoline_buffer): New function.
9387 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9388 structure.
9389 (install_fast_tracepoint): Ditto, also add error buffer argument.
9390 (cmd_qtminftpilen): New function.
9391 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9392 (fast_tracepoint_from_trampoline_address): New function.
9393 (fast_tracepoint_collecting): Handle trampoline as part of jump
9394 pad space.
9395 (set_trampoline_buffer_space): New function.
9396 (initialize_tracepoint): Initialize new IPA variables.
9397 * target.h (struct target_ops): Add arguments to
9398 install_fast_tracepoint_jump_pad operation, add new
9399 get_min_fast_tracepoint_insn_len operation.
9400 (target_get_min_fast_tracepoint_insn_len): New.
9401 (install_fast_tracepoint_jump_pad): Add arguments.
9402 * server.h (IPA_BUFSIZ): Define.
9403 * linux-i386-ipa.c: Include extra header files.
9404 (initialize_fast_tracepoint_trampoline_buffer): New function.
9405 (initialize_low_tracepoint): Call it.
9406 * server.h (set_trampoline_buffer_space): Declare.
9407 (claim_trampoline_space): Ditto.
9408 (have_fast_tracepoint_trampoline_buffer): Ditto.
9409
1e4d1764
YQ
94102011-11-14 Yao Qi <yao@codesourcery.com>
9411
9412 * server.c (handle_query): Handle InstallInTrace for qSupported.
9413 * tracepoint.c (add_tracepoint): Sort list.
9414 (install_tracepoint, download_tracepoint): New.
9415 (cmd_qtdp): Call them to install and download tracepoints.
9416 (sort_tracepoints): Removed.
9417 (cmd_qtstart): Update.
9418
5c73ff4e
YQ
94192011-11-14 Yao Qi <yao@codesourcery.com>
9420
9421 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9422 * mem-break.h: Declare.
9423 * tracepoint.c (cmd_qtstart): Move some code to ...
9424 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9425 New.
9426 (download_tracepoints): Move some code to ...
9427 (download_tracepoint_1): ... here. New.
9428
86a30030
YQ
94292011-11-08 Yao Qi <yao@codesourcery.com>
9430
9431 * remote-utils.c (relocate_instruction): A comment fix.
9432
8d26e50c
JB
94332011-11-07 Joel Brobecker <brobecker@adacore.com>
9434
9435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9436 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9437 dr_status_mirror and dr_control_mirror from debug_reg_state.
9438 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9439 (i386_initial_stuff): Remove use of deleted globals.
9440 (i386_get_thread_context, i386_set_thread_context,
9441 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9442 from debug_reg_state.
9443
a59306a3
YQ
94442011-11-05 Yao Qi <yao@codesourcery.com>
9445
9446 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9447 address as TPOINT's.
9448
3065dfb6
SS
94492011-11-02 Stan Shebs <stan@codesourcery.com>
9450
9451 * tracepoint.c (agent_mem_read_string): New function.
9452 (eval_agent_expr): Call it for tracenz.
9453 * server.c (handle_query): Report support for tracenz.
9454
fd0d8c7c
YQ
94552011-11-02 Yao Qi <yao@codesourcery.com>
9456
9457 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9458
609086b1
YQ
94592011-11-02 Yao Qi <yao@codesourcery.com>
9460
9461 * target.h: Fix a typo in comment.
9462
b9fd1791
PA
94632011-10-31 Pedro Alves <pedro@codesourcery.com>
9464
9465 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9466 clobber the breakpoints' shadows with fast tracepoint jumps.
9467 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9468 * target.c (write_inferior_memory): Also pass MYADDR down to
9469 check_mem_write.
9470
03583c20
UW
94712011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9472
9473 * configure.ac: Check support for personality routine.
9474 * configure: Regenerate.
9475 * config.in: Likewise.
9476 * linux-low.c: Include <sys/personality.h>.
9477 Define ADDR_NO_RANDOMIZE if necessary.
9478 (linux_create_inferior): Disable address space randomization when
9479 forking inferior, if requested.
9480 (linux_supports_disable_randomization): New function.
9481 (linux_target_ops): Install it.
9482 * server.h (disable_randomization): Declare.
9483 * server.c (disable_randomization): New global variable.
9484 (handle_general_set): Handle QDisableRandomization.
9485 (handle_query): Likewise for qSupported.
9486 (main): Support --disable-randomization and --no-disable-randomization
9487 command line arguments.
9488 * target.h (struct target_ops): Add supports_disable_randomization.
9489 (target_supports_disable_randomization): New macro.
9490
723b724b
MF
94912011-09-29 Mike Frysinger <vapier@gentoo.org>
9492
9493 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9494 ifdef check.
9495 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9496 [!PT_GETDSBT] (target_loadmap): New definition.
9497 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9498 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9499 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9500 and PT_GETDSBT to LINUX_LOADMAP.
9501 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9502 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9503
55329a5c 95042011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9505
9506 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9507 (arm_linux_hwbp_cap): New static variable.
9508 (arm_linux_get_hwbp_cap): Replace by ...
9509 (arm_linux_init_hwbp_cap): ... this new function.
9510 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9511 (arm_linux_get_hw_watchpoint_count): Likewise.
9512 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9513 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9514 (arm_prepare_to_resume): Use perror_with_name instead of error.
9515
55329a5c 95162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9517
9518 * linux-arm-low.c: Include <signal.h>.
9519 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9520 (struct arm_linux_hwbp_cap): New data type.
9521 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9522 (struct arm_linux_hw_breakpoint): New data type.
9523 (MAX_BPTS, MAX_WPTS): Define.
9524 (struct arch_process_info, struct arch_lwp_info): New data types.
9525 (arm_linux_get_hwbp_cap): New function.
9526 (arm_linux_get_hw_breakpoint_count): Likewise.
9527 (arm_linux_get_hw_watchpoint_count): Likewise.
9528 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9529 (arm_hwbp_control_initialize): Likewise.
9530 (arm_hwbp_control_is_enabled): Likewise.
9531 (arm_hwbp_control_is_initialized): Likewise.
9532 (arm_hwbp_control_disable): Likewise.
9533 (arm_linux_hw_breakpoint_equal): Likewise.
9534 (arm_linux_hw_point_initialize): Likewise.
9535 (struct update_registers_data): New data structure.
9536 (update_registers_callback: New function.
9537 (arm_insert_point): Likewise.
9538 (arm_remove_point): Likewise.
9539 (arm_stopped_by_watchpoint): Likewise.
9540 (arm_stopped_data_address): Likewise.
9541 (arm_new_process): Likewise.
9542 (arm_new_thread): Likewise.
9543 (arm_prepare_to_resume): Likewise.
9544 (the_low_target): Register arm_insert_point, arm_remove_point,
9545 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9546 arm_new_thread, and arm_prepare_to_resume.
9547
6b9801d4
SS
95482011-09-15 Stan Shebs <stan@codesourcery.com>
9549
9550 * server.h (struct emit_ops): Add compare-goto fields.
9551 * tracepoint.c (gdb_agent_op_sizes): New table.
9552 (emit_eq_goto): New function.
9553 (emit_ne_goto): New function.
9554 (emit_lt_goto): New function.
9555 (emit_le_goto): New function.
9556 (emit_gt_goto): New function.
9557 (emit_ge_goto): New function.
9558 (is_goto_target): New function.
9559 (compile_bytecodes): Recognize special cases of compare-goto
9560 combinations and call specialized emitters for them.
9561 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9562 (amd64_emit_ne_goto): New function.
9563 (amd64_emit_lt_goto): New function.
9564 (amd64_emit_le_goto): New function.
9565 (amd64_emit_gt_goto): New function.
9566 (amd64_emit_ge_goto): New function.
9567 (amd64_emit_ops): Add the new functions.
9568 (i386_emit_eq_goto): New function.
9569 (i386_emit_ne_goto): New function.
9570 (i386_emit_lt_goto): New function.
9571 (i386_emit_le_goto): New function.
9572 (i386_emit_gt_goto): New function.
9573 (i386_emit_ge_goto): New function.
9574 (i386_emit_ops): Add the new functions.
9575
bf15cbda
SS
95762011-09-08 Stan Shebs <stan@codesourcery.com>
9577
9578 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9579 (i386_emit_epilogue): Restore %ebx.
9580
943ca1dd
JZ
95812011-08-31 Jie Zhang <jzhang918@gmail.com>
9582
9583 * server.c (step_thread): Remove definition.
9584 (process_serial_event): Don't handle Hs.
9585 * server.h (step_thread): Remove declaration.
9586 * target.c (set_desired_inferior): Remove use of step_thread.
9587
e3deef73
LM
95882011-08-24 Luis Machado <lgustavo@codesourcery.com>
9589
9590 * linux-low.c: Include linux-procfs.h.
9591 (linux_attach_lwp_1): Update comments.
9592 (linux_attach): Scan for existing threads when attaching to a
9593 process that is the tgid.
9594 * Makefile.in: Update dependencies.
9595
13da1c97
LM
95962011-08-24 Luis Machado <lgustavo@codesourcery.com>
9597
9598 * configure.srv: Add linux-procfs.o dependencies.
9599
881127c9
YQ
96002011-08-14 Yao Qi <yao@codesourcery.com>
9601
9602 * target.h (struct target_ops): Fix indent.
9603 * win32-low.c (win32_target_ops): Fix comment.
9604
58dbd541
YQ
96052011-08-14 Andrew Jenner <andrew@codesourcery.com>
9606 Yao Qi <yao@codesourcery.com>
9607
9608 * Makefile.in (clean): Remove tic6x-*.c files.
9609 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9610 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9611 (tic6x-c64xp-linux.c): Likewise.
9612 * configure.srv: Add support for tic6x-*-uclinux.
9613 * linux-tic6x-low.c: New.
9614 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9615
78d85199
YQ
96162011-08-14 Andrew Stubbs <ams@codesourcery.com>
9617 Yao Qi <yao@codesourcery.com>
9618
9619 * target.h (struct target_ops): Add read_loadmap.
9620 * linux-low.c (struct target_loadseg): New type.
9621 (struct target_loadmap): New type.
9622 (linux_read_loadmap): New function.
9623 (linux_target_ops): Add linux_read_loadmap.
9624 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9625 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9626 to NULL.
78d85199 9627
a959a88d
EZ
96282011-08-05 Eli Zaretskii <eliz@gnu.org>
9629
9630 * win32-low.c: Include <stdint.h>.
9631
1ced966e
PA
96322011-07-22 Pedro Alves <pedro@codesourcery.com>
9633
9634 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9635 to the inferior here.
9636 (i386_remove_aligned_watchpoint): Ditto.
9637 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9638 fit part of the watchpoint in the debug registers.
9639 (i386_update_inferior_debug_regs): New.
9640 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9641 registers, and only update the inferior on success.
9642 (i386_low_remove_watchpoint): Ditto.
9643
d26e3629
KY
96442011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9645
9646 * linux-low.c (compare_ints, unique, list_threads, show_process,
9647 linux_core_of_thread): Delete.
9648 (linux_target_ops): Change linux_core_of_thread to
9649 linux_common_core_of_thread.
9650 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9651 * utils.c (malloc_failure): Change type of argument.
9652 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9653 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9654 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9655 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9656 (IPA_OBJS): Add common-utils-ipa.o.
9657 (ptid_h, linux_osdata_h): New macros.
9658 (server_h): Add common/common-utils.h, common/xml-utils.h,
9659 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9660 common/ptid.h.
9661 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9662 ptid.o, buffer.o): New rules.
9663 (linux-low.o): Add common/linux-osdata.h as a dependency.
9664 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9665 * configure.ac: Add AC_HEADER_DIRENT check.
9666 * config.in: Regenerate.
9667 * configure: Regenerate.
9668 * remote-utils.c (xml_escape_text): Delete.
9669 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9670 buffer_xml_printf): Move to common/buffer.c.
9671 * server.c (main): Remove call to initialize_inferiors.
9672 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9673 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9674 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9675 internal_error, gdb_assert, gdb_assert_fail): Delete.
9676 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9677 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9678 common/buffer.h.
9679 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9680 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9681 initialize_inferiors): Delete.
9682
2275a1a7
PA
96832011-07-20 Pedro Alves <pedro@codesourcery.com>
9684
9685 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9686 symbol error.
9687
0a5b1e09
PA
96882011-05-31 Pedro Alves <pedro@codesourcery.com>
9689
9690 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9691 assertion.
9692 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9693
6938fd34
YQ
96942011-05-26 Yao Qi <yao@codesourcery.com>
9695
9696 * Makefile.in (thread-db.o): Track dependence to
9697 common/gdb_thread_db.h.
9698 * thread-db.c: include gdb_thread_db.h from right place.
9699
b481f9e0
TT
97002011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9701
9702 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9703 __FILE__ and __LINE__ to internal_error.
9704
98a5dd13
DE
97052011-05-13 Doug Evans <dje@google.com>
9706
9707 * thread-db.c (try_thread_db_load_from_sdir): New function.
9708 (try_thread_db_load_from_dir): New function.
9709 (thread_db_load_search): Handle $sdir, ignore $pdir.
9710 Remove trying of system directories if search of
9711 libthread-db-search-path fails, that is now done via $sdir.
9712
d248b706
KY
97132011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9714
9715 * server.c (handle_query): Add EnableDisableTracepoints to the list
9716 of supported features.
43aaf8b6 9717 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9718 tracepoints.
43aaf8b6
PA
9719 (cmd_qtenable_disable): New.
9720 (cmd_qtstart): Install tracepoints even if disabled.
9721 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9722 receiving a QTEnable or QTDisable packet.
9723 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9724 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9725 tracepoints.
9726 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9727
84e578fb
DE
97282011-05-10 Doug Evans <dje@google.com>
9729
9730 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9731
71f55dd8
DE
97322011-05-04 Doug Evans <dje@google.com>
9733
9734 * linux-low.c (linux_join): Skip process lookup.
9735 * spu-low.c (spu_join): Ditto.
9736 * server.c (join_inferiors_callback): Delete.
9737 (process_serial_event): For 'D' packet (detach) call join_inferior
9738 directly.
9739
4d393d60
JM
97402011-05-04 Joseph Myers <joseph@codesourcery.com>
9741
9742 * README: Don't mention xscale*-*-linux*.
9743 * configure.srv (xscale*-*-linux*): Don't handle target.
9744
b00ad6ff
NF
97452011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9746
9747 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9748 casting pointers.
9749 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9750 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9751 (i386_emit_void_call_2): Likewise.
9752
af96c192
YQ
97532011-04-26 Yao Qi <yao@codesourcery.com>
9754
43aaf8b6
PA
9755 * linux-low.c: Move common macros to linux-ptrace.h.
9756 Include linux-ptrace.h.
af96c192
YQ
9757 * Makefile.in (linux_ptrace_h): New.
9758 (linux-low.o): Depends on linux-ptrace.h.
9759
03f2bd59
JK
97602011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9761
9762 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9763 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9764 (remote_prepare): New function with most of the TCP code from ...
9765 (remote_open): ... here. Detect PORT here unconditionally. Move also
9766 setting transport_is_reliable.
9767 * server.c (run_once): New variable.
9768 (gdbserver_usage): Document it.
9769 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9770 the first run if RUN_ONCE.
9771 * server.h (run_once, remote_prepare): New declarations.
9772
7a9dd1b2
TT
97732011-04-19 Tom Tromey <tromey@redhat.com>
9774
9775 * win32-low.c (handle_load_dll): Remove duplicate "the".
9776
81239425
PM
97772011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9778
9779 Remove support for old Cygwin 1.5 versions.
9780 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9781 function to avoid warning.
9782 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9783 warning.
9784
9e0627f1
PM
97852011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9786
9787 * gdbserver/server.h (Macro _): Define it if not available.
9788
588eebee
MS
97892011-03-14 Michael Snyder <msnyder@vmware.com>
9790
348af9f7 9791 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9792
43f70d4c
JB
97932011-03-10 Joel Brobecker <brobecker@adacore.com>
9794
9795 * Makefile.in (maintainer-clean realclean distclean): Remove
9796 "make ... subdir_do" command.
9797
348af9f7
MS
97982011-03-10 Michael Snyder <msnyder@vmware.com>
9799
9800 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9801
9802 * server.c (handle_v_run): Free alloced buffer on early return.
9803
e637a4f5
YQ
98042011-03-09 Yao Qi <yao@codesourcery.com>
9805
9806 Revert:
9807 2011-03-04 Yao Qi <yao@codesourcery.com>
9808
9809 * Makefile.in: Remove GNU make feature --directory.
9810
9811 2011-03-05 Yao Qi <yao@codesourcery.com>
9812
9813 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9814 (subdir_do): New make target. Copied from gdb/Makefile.
9815 (maintainer-clean, realclean, distclean, clean): Call corresponding
9816 make targets in common/Makefile.
9817
9818 2011-02-11 Yao Qi <yao@codesourcery.com>
9819
9820 * configure.ac: Call AC_PROG_RANLIB.
9821 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9822 * configure: Regenerate.
9823
e6edda56
JK
98242011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9825
9826 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9827
e5141119
JB
98282011-03-06 Yao Qi <yao@codesourcery.com>
9829
9830 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9831
64794aa4
JB
98322011-03-05 Yao Qi <yao@codesourcery.com>
9833
9834 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9835 (subdir_do): New make target. Copied from gdb/Makefile.
9836 (maintainer-clean, realclean, distclean, clean): Call corresponding
9837 make targets in common/Makefile.
9838
7a762829
YQ
98392011-03-04 Yao Qi <yao@codesourcery.com>
9840
9841 * Makefile.in: Remove GNU make feature --directory.
9842
348af9f7
MS
98432011-03-04 Michael Snyder <msnyder@vmware.com>
9844
9845 * server.c (queue_stop_reply): Call xmalloc not malloc.
9846
98472011-03-02 Michael Snyder <msnyder@vmware.com>
9848
9849 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9850
9f72fee2
MS
98512011-02-28 Michael Snyder <msnyder@vmware.com>
9852
588eebee
MS
9853 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9854 (cmd_qtframe): Ditto.
9855 (cmd_qtbuffer): Ditto.
9856 (cmd_bigqtbuffer): Ditto.
9857
9f72fee2
MS
9858 * utils.c (decimal2str): Initialize 'width' to nine, then
9859 don't mess with it.
9860
8040bd49
UW
98612011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9862
9863 * hostio.c (require_data): Free *data, not data.
9864
7e52cbd0
JK
98652011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9866
9867 * hostio.c (require_data): Use free, not xfree.
9868
9130f83e
MS
98692011-02-27 Michael Snyder <msnyder@vmware.com>
9870
4b812f4e
MS
9871 * server.c (handle_query): Discard unused value.
9872
9130f83e
MS
9873 * hostio.c (require_data): Free malloc memory before returning
9874 error.
9875
69d37113
MS
98762011-02-26 Michael Snyder <msnyder@vmware.com>
9877
9878 * linux-low.c (list_threads): Call closedir for dirent.
9879
35f5825a
MS
98802011-02-27 Michael Snyder <msnyder@vmware.com>
9881
2a589cef
MS
9882 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9883 a case statement falls through.
9884
0adea5f7
MS
9885 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9886
35f5825a
MS
9887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9888 in comparison.
9889
238f1c74
MS
98902011-02-26 Michael Snyder <msnyder@vmware.com>
9891
9892 * utils.c (decimal2str): Eliminate dead code and dead param.
9893 (pulongest): Drop dead param from call to decimal2str.
9894 (plongest): Ditto.
9895
633ff500
JB
98962011-02-24 Joel Brobecker <brobecker@adacore.com>
9897
9898 Revert the following patch (not approved yet):
9899 2011-02-21 Hui Zhu <teawater@gmail.com>
9900 * tracepoint.c (tp_printf): New function.
9901 (eval_agent_expr): Handle gdb_agent_op_printf.
9902
f9c6ff72
HZ
99032011-02-21 Hui Zhu <teawater@gmail.com>
9904
9905 * tracepoint.c (tp_printf): New function.
9906 (eval_agent_expr): Handle gdb_agent_op_printf.
9907
94d5e490
TT
99082011-02-18 Tom Tromey <tromey@redhat.com>
9909
9910 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9911 (tracepoint.o): Likewise.
9912 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9913 (gdb_agent_op_names): Likewise.
9914
c7f96d2b
TT
99152011-02-18 Tom Tromey <tromey@redhat.com>
9916
9917 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9918 gdb_agent_op_rot>: New constants.
9919 (gdb_agent_op_names): Add pick and roll.
9920 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9921 cases.
9922
0feedb2c
JK
99232011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9924
9925 * aclocal.m4: Regenerated with aclocal-1.11.1.
9926
b3b9301e
PA
99272011-02-14 Pedro Alves <pedro@codesourcery.com>
9928
9929 * server.c (handle_qxfer_traceframe_info): New.
9930 (qxfer_packets): Register "traceframe-info".
9931 (handle_query): Report support for qXfer:traceframe-info:read+.
9932 * tracepoint.c (match_blocktype): New.
9933 (traceframe_find_block_type): Rename to ...
9934 (traceframe_walk_blocks): ... this. Add callback filter argument,
9935 and use it.
9936 (traceframe_find_block_type): New, reimplemented on top of
9937 traceframe_walk_blocks.
9938 (build_traceframe_info_xml): New.
9939 (traceframe_read_info): New.
9940 * server.h (traceframe_read_info): Declare.
9941
4f3e6fb7
YQ
99422011-02-11 Yao Qi <yao@codesourcery.com>
9943
9944 * configure.ac: Call AC_PROG_RANLIB.
9945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9946 * configure: Regenerate.
9947
764880b7
PA
99482011-02-07 Pedro Alves <pedro@codesourcery.com>
9949
9950 * server.c (gdb_read_memory): Change return semantics to allow
9951 partial transfers.
9952 (handle_search_memory_1): Adjust.
9953 (process_serial_event) <'m' packet>: Handle partial transfers.
9954 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9955
1c79eb8a
PA
99562011-01-28 Pedro Alves <pedro@codesourcery.com>
9957
9958 * regcache.c (init_register_cache): Initialize
9959 regcache->register_status.
9960 (free_register_cache): Release regcache->register_status.
9961 (regcache_cpy): Copy register_status.
9962 (registers_to_string): Print 'x's for unavailable registers.
9963 (supply_register): Mark the register's status valid or
9964 unavailable, depending on whether a buffer was passed in or not.
9965 (supply_register_zeroed): New.
9966 (supply_regblock): Mark the registers' status valid or
9967 unavailable, depending on whether a buffer was passed in or not.
9968 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9969 (struct regcache): New `register_status' field.
9970 (supply_register_zeroed): Declare.
9971 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9972 supply_register_zeroed, rather than passing a NULL buffer to
9973 supply_register.
9974 * tracepoint.c (fetch_traceframe_registers): Update comment.
9975
85724a0e
PA
99762011-01-28 Pedro Alves <pedro@codesourcery.com>
9977
9978 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9979 buffer explicit.
9980
d08aafef
PA
99812011-01-25 Pedro Alves <pedro@codesourcery.com>
9982
9983 * server.h (decode_xfer_write): Change prototype.
9984 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9985 and don't extract the annex here.
9986 * server.c (decode_xfer_read): Remove `annex' parameter,
9987 and don't extract the annex here.
9988 (decode_xfer): New.
9989 (struct qxfer): New.
9990 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9991 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9992 (handle_qxfer_statictrace): New functions, abstracted out from
9993 handle_query, and made to use the struct qxfer interface.
9994 (handle_threads_qxfer_proper): Rename to ...
9995 (handle_qxfer_threads_proper): ... this.
9996 (handle_threads_qxfer): Rename to ...
9997 (handle_qxfer_threads): ... this. Adjust.
9998 (qxfer_packets): New array.
9999 (handle_qxfer): New function.
10000 (handle_query): Use handle_qxfer.
10001
493e2a69
MS
100022011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10003
10004 * gdbreplay.c: Shorten lines of >= 80 columns.
10005 * linux-low.c: Ditto.
10006 * linux-ppc-low.c: Ditto.
10007 * linux-s390-low.c: Ditto.
10008 * linux-sparc-low.c: Ditto.
10009 * linux-x86-low.c: Ditto.
10010 * linux-xtensa-low.c: Ditto.
10011 * mem-break.c: Ditto.
10012 * nto-low.c: Ditto.
10013 * regcache.h: Ditto.
10014 * remote-utils.c: Ditto.
10015 * server.c: Ditto.
10016 * server.h: Ditto.
10017 * thread-db.c: Ditto.
10018 * tracepoint.c: Ditto.
10019 * utils.c: Ditto.
10020 * win32-low.h: Ditto.
10021
44944448
JB
100222011-01-05 Joel Brobecker <brobecker@adacore.com>
10023
10024 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10025 update.
10026
71ce852c
JB
100272011-01-01 Joel Brobecker <brobecker@adacore.com>
10028
10029 * server.c (gdbserver_version): Update copyright year in version
10030 output.
10031 * gdbreplay.c (gdbreplay_version): Ditto.
10032
eb826dc6
MF
100332010-12-29 Jie Zhang <jie.zhang@analog.com>
10034
10035 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10036 * linux-bfin-low.c: New file.
10037 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10038 PT_DATA_ADDR for BFIN targets.
10039 * Makefile.in (SFILES): Add linux-bfin-low.c.
10040 (clean): Remove reg-bfin.c.
10041 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10042 * README: Mention supported Blackfin targets.
10043
39ab222a
MF
100442010-12-23 Mike Frysinger <vapier@gentoo.org>
10045
10046 * .gitignore: New file.
10047
a1f2ce7d
MF
100482010-11-16 Mike Frysinger <vapier@gentoo.org>
10049
10050 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10051
f474844c
JZ
100522010-10-22 Jie Zhang <jie@codesourcery.com>
10053
10054 * Makefile.in: Add FLAGS_TO_PASS variable.
10055 (install): Remove dependency of install-only and recursively
10056 invoke make for install-only.
10057
f1048712
DE
100582010-10-04 Doug Evans <dje@google.com>
10059
10060 * Makefile.in (uninstall): Use $(DESTDIR).
10061
b53a1623
PA
100622010-09-24 Pedro Alves <pedro@codesourcery.com>
10063
e6ee044d
PA
10064 PR gdb/11842
10065
b53a1623
PA
10066 * linux-x86-low.c (compat_siginfo_from_siginfo)
10067 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10068 si_code is < 0. Check for si_code == SI_TIMER before checking for
10069 si_code < 0.
10070
fa1bd1e4
JB
100712010-09-13 Joel Brobecker <brobecker@adacore.com>
10072
10073 * lynx-i386-low.c: New file.
10074 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10075
47fac8f8
JB
100762010-09-13 Joel Brobecker <brobecker@adacore.com>
10077
10078 * lynx-low.c (ptrace_request_to_str): Remove handling for
10079 request values that have been removed in LynxOS 5.x.
10080
1adfc54d
JB
100812010-09-13 Joel Brobecker <brobecker@adacore.com>
10082
10083 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10084 <ptrace.h>
10085
c2a66c29
NS
100862010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10087
10088 * configure.ac: Add --enable-inprocess-agent option.
10089 * configure: Rebuilt.
10090
32fcada3
YQ
100912010-09-06 Yao Qi <yao@codesourcery.com>
10092
10093 * linux-low.c (linux_kill): Remove unused variable.
10094 (linux_stabilize_threads): Likewise.
10095 * server.c (start_inferior): Likewise.
10096 (queue_stop_reply_callback): Likewise.
10097 * tracepoint.c (do_action_at_tracepoint): Likewise.
10098
0cccb683
YQ
100992010-09-06 Yao Qi <yao@codesourcery.com>
10100
10101 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10102 on return.
10103
423ec54c
JK
101042010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10105
10106 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10107
12ac6819
PA
101082010-09-06 Pedro Alves <pedro@codesourcery.com>
10109
10110 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10111 "$(IPA_DEPFILES)".
10112
8ed54b31
JB
101132010-09-01 Joel Brobecker <brobecker@adacore.com>
10114
10115 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10116 gdbserver/lynx-ppc-low.c: New files.
10117 * Makefile.in (lynx_low_h): New variable.
10118 (lynx-low.o, lynx-ppc-low.o): New rules.
10119 * configure.ac: On LynxOS, link with -lnetinet.
10120 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10121 * configure: regenerate.
10122
bb0116a4
JB
101232010-09-01 Joel Brobecker <brobecker@adacore.com>
10124
10125 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10126 * configure.ac: Add check for vasprintf and vsnprintf.
10127 * configure, config.in: Regenerate.
10128 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10129
a778ab81 101302010-09-01 Joel Brobecker <brobecker@adacore.com>
10131
10132 * gdbreplay.c: Move include of alloca.h up, next to include of
10133 malloc.h.
10134 * server.h: Add include of malloc.h.
10135 * mem-break.c: Remove include of malloc.h.
10136 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10137
8b034a19 101382010-09-01 Joel Brobecker <brobecker@adacore.com>
10139
10140 * Makefile.in (memmem.o): Build with -Wno-error.
10141
101422010-09-01 Joel Brobecker <brobecker@adacore.com>
10143
10144 * utils.c (xsnprintf): Make non-static.
10145 * server.h: Add xsnprintf declaration.
10146 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10147 replace calls to snprintf by calls to xsnprintf throughout.
10148
101492010-09-01 Joel Brobecker <brobecker@adacore.com>
10150
10151 * configure.ac: Add configure check for alloca.
10152 * configure, config.in: Regenerate.
10153 * server.h: Include alloca.h if it exists.
10154 * gdbreplay.c: Include alloca.h if it exists.
10155
1a981360
PA
101562010-08-28 Pedro Alves <pedro@codesourcery.com>
10157
10158 * linux-low.c (__SIGRTMIN): Define if not already defined.
10159 (linux_create_inferior): Check for __ANDROID__ rather than
10160 __SIGRTMIN.
10161 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10162 are already deferred.
10163 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10164 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10165 stopped and already has a pending signal to report.
10166 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10167 a pending signal to report or is moving out of a jump pad.
10168 (linux_init_signals): Check for __ANDROID__ rather than
10169 __SIGRTMIN.
10170
b4d51a55
PA
101712010-08-28 Pedro Alves <pedro@codesourcery.com>
10172
10173 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10174 debug_threads check. Avoid a linear search when not doing debug
10175 output.
10176
ec48365d
PA
101772010-08-27 Pedro Alves <pedro@codesourcery.com>
10178
10179 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10180 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10181 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10182 (process_event): Change local fd's type to gdb_fildes_t.
10183 (create_file_handler): Adjust prototype.
10184 (delete_file_handler): Adjust prototype.
10185 (handle_file_event): Adjust prototype. Use pfildes.
10186 (create_file_event): Adjsut prototype.
10187 * remote-utils.c (remote_desc, listen_desc): Change type to
10188 gdb_fildes_t.
10189 * server.h: New gdb_fildes_t typedef.
10190 [USE_WIN32API]: Include winsock2.h.
10191 (delete_file_handler, add_file_handler): Adjust prototypes.
10192 (pfildes): Declare.
10193 * utils.c (pfildes): New.
10194
854d88f0
PA
101952010-08-27 Pedro Alves <pedro@codesourcery.com>
10196
10197 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10198 * configure: Regenerate.
10199
0146f85b
PA
102002010-08-27 Pedro Alves <pedro@codesourcery.com>
10201
10202 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10203 (linux_done_accessing_memory): ... this.
10204 (linux_target_ops): Adjust.
10205 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10206 * nto-low.c (nto_target_ops): Adjust comment.
10207 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10208 * spu-low.c (spu_target_ops): Adjust comment.
10209 * target.h (target_ops): Rename unprepare_to_access_memory field
10210 to done_accessing_memory.
10211 (unprepare_to_access_memory): Rename to ...
10212 (done_accessing_memory): ... this.
10213
90d74c30
PA
102142010-08-26 Pedro Alves <pedro@codesourcery.com>
10215
10216 * linux-low.c (linux_prepare_to_access_memory): New.
10217 (linux_unprepare_to_access_memory): New.
10218 (linux_target_ops): Install them.
10219 * server.c (read_memory): Rename to ...
10220 (gdb_read_memory): ... this. Use
10221 prepare_to_access_memory/prepare_to_access_memory.
10222 (write_memory): Rename to ...
10223 (gdb_write_memory): ... this. Use
10224 prepare_to_access_memory/prepare_to_access_memory.
10225 (handle_search_memory_1): Adjust.
10226 (process_serial_event): Adjust.
10227 * target.h (struct target_ops): New fields
10228 prepare_to_access_memory and unprepare_to_access_memory.
10229 (prepare_to_access_memory, unprepare_to_access_memory): New.
10230 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10231 prepare_to_access_memory/prepare_to_access_memory.
10232 * nto-low.c (nto_target_ops): Adjust.
10233 * spu-low.c (spu_target_ops): Adjust.
10234 * win32-low.c (win32_target_ops): Adjust.
10235
fd467969
PA
102362010-08-26 Pedro Alves <pedro@codesourcery.com>
10237
10238 * Makefile.in (WARN_CFLAGS): Get it from configure.
10239 (WERROR_CFLAGS): New.
10240 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10241 * configure.ac: Introduce --enable-werror, which adds -Werror to
10242 the compiler command line. Enabled by default. Disable with
10243 --disable-werror. Add -Wdeclaration-after-statement
10244 Wpointer-arith and -Wformat-nonliteral to warning flags.
10245 * configure: Regenerate.
10246
331e2f5f
PA
102472010-08-26 Pedro Alves <pedro@codesourcery.com>
10248
10249 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10250
e581f2b4
PA
102512010-08-26 Pedro Alves <pedro@codesourcery.com>
10252
10253 * gdbreplay.c (remote_error): New.
10254 (gdbchar): New.
10255 (expect): Use gdbchar. Check for error reading from GDB.
10256 Clarify sync error output.
10257 (play): Check for errors writing to GDB.
10258 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10259 * remote-utils.c (getpkt): Check for errors writing to the remote
10260 descriptor.
10261
3c11dd79
PA
102622010-08-25 Pedro Alves <pedro@codesourcery.com>
10263
10264 * linux-low.c (linux_wait_1): Move non-debugging code out of
10265 `debug_threads' control.
10266
d20a8ad9
PA
102672010-08-25 Pedro Alves <pedro@codesourcery.com>
10268
10269 * linux-low.c (linux_wait_1): Don't set last_status here.
10270 * server.c (push_event, queue_stop_reply_callback): Assert we're
10271 not pushing a TARGET_WAITKIND_IGNORE event.
10272 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10273 (myresume, handle_target_event): Set the thread's last_resume_kind
10274 and last_status from the target returned status.
10275
964e4306
PA
102762010-08-25 Pedro Alves <pedro@codesourcery.com>
10277
10278 PR threads/10729
10279
10280 * linux-x86-low.c (update_debug_registers_callback): New.
10281 (i386_dr_low_set_addr): Use it.
10282 (i386_dr_low_get_addr): New.
10283 (i386_dr_low_set_control): Use update_debug_registers_callback.
10284 (i386_dr_low_get_control): New.
10285 (i386_dr_low_get_status): Adjust.
10286 * linux-low.c (linux_stop_lwp): New.
10287 * linux-low.h (linux_stop_lwp): Declare.
10288
10289 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10290 argument instead of a i386_debug_reg_state.
10291 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10292 a i386_debug_reg_state.
10293 (i386_insert_aligned_watchpoint): Adjust.
10294 (i386_remove_aligned_watchpoint): Adjust.
10295 (i386_low_stopped_data_address): Read the debug registers from the
10296 inferior instead of from the mirrors.
10297 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10298 (i386_dr_low_get_addr): Declare.
10299 (i386_dr_low_get_control): Declare.
10300 (i386_dr_low_get_status): Change prototype.
10301
10302 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10303 (i386_dr_low_get_addr): New.
10304 (i386_dr_low_get_control): New.
10305 (i386_dr_low_get_status): Adjust prototype. Return
10306 dr_status_mirror.
10307 (i386_initial_stuff): Clear dr_status_mirror and
10308 dr_control_mirror.
10309 (i386_get_thread_context): Adjust.
10310 (i386_set_thread_context): Adjust.
10311 (i386_thread_added): Adjust.
10312
5f21a75b
PA
103132010-08-24 Pedro Alves <pedro@codesourcery.com>
10314
10315 * linux-low.h (linux_thread_area): Delete declaration.
10316
3e4c1235
TS
103172010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10318
10319 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10320 after its termination.
10321
1971b033
PA
103222010-08-09 Pedro Alves <pedro@codesourcery.com>
10323
10324 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10325 (gdb_wants_all_stopped): Delete.
10326 (linux_wait_1): Don't call them.
10327 * server.c (handle_v_cont): Tag all threads as want-stopped.
10328 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10329 stopped as "client-wants-stopped".
10330
310444ac
PA
103312010-07-31 Pedro Alves <pedro@codesourcery.com>
10332
10333 * Makefile.in (signals_h): New.
10334 (server_h): Depend on it.
10335 (server.o): Don't depend on $(signals_def).
10336 (signals.o): Depend on $(signals_def).
10337
a19cae16
JK
103382010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10339
10340 * Makefile.in (signals_def): New.
10341 (server_h): Append include/gdb/signals.h and signals_def.
10342 (server.o): Append signals_def.
10343
30d50328
JK
103442010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10345
10346 * server.c (handle_target_event): Use target_signal_to_host for
10347 resume_info.sig initialization.
10348 * target.h (struct thread_resume) <sig>: New comment.
10349
5c3216e2
OS
103502010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10351
c6f46ca0
OS
10352 * server.c (handle_query): strcpy() the returned string from paddress()
10353 instead of sprintf().
5c3216e2
OS
10354 * utils.c (paddress): Return phex_nz().
10355
6bd31874
JB
103562010-07-07 Joel Brobecker <brobecker@adacore.com>
10357
10358 * server.c (handle_v_cont): Call mourn_inferior if process
10359 just exited.
10360 (myresume): Likewise.
10361
0fb4aa4b
PA
103622010-07-01 Pedro Alves <pedro@codesourcery.com>
10363
10364 Static tracepoints, and integration with UST.
10365
10366 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10367 * mem-break.c (uninsert_all_breakpoints)
10368 (reinsert_all_breakpoints): New.
10369 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10370 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10371 (gdb_agent_ust_loaded, helper_thread_id)
10372 (gdb_agent_helper_thread_id): New macros.
10373 (struct ipa_sym_addresses): Add addr_ust_loaded,
10374 addr_helper_thread_id, addr_cmd_buf.
10375 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10376 (in_process_agent_loaded_ust): New.
10377 (write_e_ust_not_loaded): New.
10378 (maybe_write_ipa_ust_not_loaded): New.
10379 (struct collect_static_trace_data_action): New.
10380 (enum tracepoint_type) <static_tracepoint>: New.
10381 (struct tracepoint) <handle>: Mention static tracepoints.
10382 (struct static_tracepoint_ctx): New.
10383 (CMD_BUF_SIZE): New.
10384 (add_tracepoint_action): Handle static tracepoint actions.
10385 (unprobe_marker_at): New.
10386 (clear_installed_tracepoints): Handle static tracepoints.
10387 (cmd_qtdp): Handle static tracepoints.
10388 (probe_marker_at): New.
10389 (cmd_qtstart): Handle static tracepoints.
10390 (response_tracepoint): Handle static tracepoints.
10391 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10392 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10393 (get_context_regcache): Handle static tracepoints.
10394 (do_action_at_tracepoint): Handle static tracepoint actions.
10395 (traceframe_find_block_type): Handle static trace data blocks.
10396 (traceframe_read_sdata): New.
10397 (download_tracepoints): Download static tracepoint actions.
10398 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10399 (GDB_PROBE_NAME): New.
10400 (ust_ops): New.
10401 (GET_UST_SYM): New.
10402 (USTF): New.
10403 (dlsym_ust): New.
10404 (ust_marker_to_static_tracepoint): New.
10405 (gdb_probe): New.
10406 (collect_ust_data_at_tracepoint): New.
10407 (gdb_ust_probe): New.
10408 (UNIX_PATH_MAX, SOCK_DIR): New.
10409 (gdb_ust_connect_sync_socket): New.
10410 (resume_thread, stop_thread): New.
10411 (run_inferior_command): New.
10412 (init_named_socket): New.
10413 (gdb_ust_socket_init): New.
10414 (cstr_to_hexstr): New.
10415 (next_st): New.
10416 (first_marker, next_marker): New.
10417 (response_ust_marker): New.
10418 (cmd_qtfstm, cmd_qtsstm): New.
10419 (unprobe_marker_at, probe_marker_at): New.
10420 (cmd_qtstmat, gdb_ust_thread): New.
10421 (gdb_ust_init): New.
10422 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10423 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10424 (ST_REGENTRY): New.
10425 (x86_64_st_collect_regmap): New.
10426 (X86_64_NUM_ST_COLLECT_GREGS): New.
10427 (AMD64_RIP_REGNUM): New.
10428 (supply_static_tracepoint_registers): New.
10429 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10430 (ST_REGENTRY): New.
10431 (i386_st_collect_regmap): New.
10432 (i386_NUM_ST_COLLECT_GREGS): New.
10433 (supply_static_tracepoint_registers): New.
10434 * server.c (handle_query): Handle qXfer:statictrace:read.
10435 <qSupported>: Report support for StaticTracepoints, and
10436 qXfer:statictrace:read features.
10437 * server.h (traceframe_read_sdata)
10438 (supply_static_tracepoint_registers): Declare.
10439 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10440 (unpack_varlen_hex): Include in IPA build.
10441 * Makefile.in (ustlibs, ustinc): New.
10442 (IPA_OBJS): Add remote-utils-ipa.o.
10443 ($(IPA_LIB)): Link -ldl and -lpthread.
10444 (UST_CFLAGS): New.
10445 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10446 * config.in, configure: Regenerate.
10447
9e4344e5
PA
104482010-06-20 Ian Lance Taylor <iant@google.com>
10449 Pedro Alves <pedro@codesourcery.com>
10450
10451 * linux-x86-low.c (always_true): Delete.
10452 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10453 trying to fool the compiler with always_true.
10454
c6beb2cb
PA
104552010-06-20 Pedro Alves <pedro@codesourcery.com>
10456
10457 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10458 conditions in gdbserver.
10459
d2ed6730
UW
104602010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10461
10462 * spu-low.c (spu_read_memory): Wrap around local store limit.
10463 (spu_write_memory): Likewise.
10464
4e29fb54
PA
104652010-06-15 Pedro Alves <pedro@codesourcery.com>
10466
10467 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10468 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10469 LONGEST uses.
10470 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10471 uses.
10472 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10473 uses with LONGEST uses.
10474
6a271cae
PA
104752010-06-14 Stan Shebs <stan@codesourcery.com>
10476 Pedro Alves <pedro@codesourcery.com>
10477
10478 Bytecode compiler.
10479
10480 * linux-x86-low.c: Include limits.h.
10481 (add_insns): New.
10482 (always_true): New.
10483 (EMIT_ASM): New.
10484 (EMIT_ASM32): New.
10485 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10486 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10487 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10488 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10489 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10490 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10491 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10492 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10493 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10494 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10495 (amd64_emit_void_call_2): New.
10496 (amd64_emit_ops): New.
10497 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10498 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10499 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10500 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10501 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10502 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10503 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10504 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10505 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10506 (i386_emit_stack_adjust, i386_emit_int_call_1)
10507 (i386_emit_void_call_2): New.
10508 (i386_emit_ops): New.
10509 (x86_emit_ops): New.
10510 (the_low_target): Install x86_emit_ops.
10511 * server.h (struct emit_ops): New.
10512 (get_raw_reg_func_addr): Declare.
10513 (current_insn_ptr, emit_error): Declare.
10514 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10515 (set_trace_state_variable_value): New defines.
10516 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10517 addr_get_trace_state_variable_value and
10518 addr_set_trace_state_variable_value.
10519 (symbol_list): New fields for get_raw_reg,
10520 get_trace_state_variable_value and set_trace_state_variable_value.
10521 (condfn): New typedef.
10522 (struct tracepoint): New field `compiled_cond'.
10523 (do_action_at_tracepoint): Clear compiled_cond.
10524 (get_trace_state_variable_value, set_trace_state_variable_value):
10525 Export in the IPA.
10526 (condition_true_at_tracepoint): If there's a compiled condition,
10527 run that.
10528 (current_insn_ptr, emit_error): New globals.
10529 (struct bytecode_address): New.
10530 (get_raw_reg_func_addr): New.
10531 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10532 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10533 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10534 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10535 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10536 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10537 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10538 (compile_tracepoint_condition, compile_bytecodes): New.
10539 * target.h (emit_ops): Forward declare.
10540 (struct target_ops): New field emit_ops.
10541 (target_emit_ops): New.
10542 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10543 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10544 * linux-low.c (linux_emit_ops): New.
10545 (linux_target_ops): Install it.
10546 * linux-low.h (struct linux_target_ops): New field emit_ops.
10547
92b72907
UW
105482010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10549
10550 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10551 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10552
fa593d66
PA
105532010-06-01 Pedro Alves <pedro@codesourcery.com>
10554 Stan Shebs <stan@codesourcery.com>
10555
10556 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10557 (all): Depend on $(extra_libraries).
10558 (install-only): Install the IPA.
10559 (IPA_OBJS, IPA_LIB): New.
10560 (clean): Remove the IPA lib.
10561 (IPAGENT_CFLAGS): New.
10562 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10563 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10564 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10565 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10566 * configure.ac: Check for atomic builtins support in the compiler.
10567 (IPA_DEPFILES, extra_libraries): Define.
10568 * configure.srv (ipa_obj): Add description.
10569 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10570 (i[34567]86-*-linux*): Set ipa_obj.
10571 (x86_64-*-linux*): Set ipa_obj.
10572 * linux-low.c (stabilizing_threads): New.
10573 (supports_fast_tracepoints): New.
10574 (linux_detach): Stabilize threads before detaching.
10575 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10576 the lwp is either not stabilizing, or is moving out of a jump pad.
10577 (linux_fast_tracepoint_collecting): New.
10578 (maybe_move_out_of_jump_pad): New.
10579 (enqueue_one_deferred_signal): New.
10580 (dequeue_one_deferred_signal): New.
10581 (linux_wait_for_event_1): If moving out of a jump pad, defer
10582 pending signals to later.
10583 (linux_stabilize_threads): New.
10584 (linux_wait_1): Check if threads need moving out of jump pads, and
10585 do it if so.
10586 (stuck_in_jump_pad_callback): New.
10587 (move_out_of_jump_pad_callback): New.
10588 (lwp_running): New.
10589 (linux_resume_one_lwp): Handle moving out of jump pads.
10590 (linux_set_resume_request): Dequeue deferred signals.
10591 (need_step_over_p): Also step over fast tracepoint jumps.
10592 (start_step_over): Also uninsert fast tracepoint jumps.
10593 (finish_step_over): Also reinsert fast tracepoint jumps.
10594 (linux_install_fast_tracepoint_jump): New.
10595 (linux_target_ops): Install linux_stabilize_threads and
10596 linux_install_fast_tracepoint_jump_pad.
10597 * linux-low.h (linux_target_ops) <get_thread_area,
10598 install_fast_tracepoint_jump_pad>: New fields.
10599 (struct lwp_info) <collecting_fast_tracepoint,
10600 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10601 (linux_get_thread_area): Declare.
10602 * linux-x86-low.c (jump_insn): New.
10603 (x86_get_thread_area): New.
10604 (append_insns): New.
10605 (push_opcode): New.
10606 (amd64_install_fast_tracepoint_jump_pad): New.
10607 (i386_install_fast_tracepoint_jump_pad): New.
10608 (x86_install_fast_tracepoint_jump_pad): New.
10609 (the_low_target): Install x86_get_thread_area and
10610 x86_install_fast_tracepoint_jump_pad.
10611 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10612 (struct fast_tracepoint_jump): New.
10613 (fast_tracepoint_jump_insn): New.
10614 (fast_tracepoint_jump_shadow): New.
10615 (find_fast_tracepoint_jump_at): New.
10616 (fast_tracepoint_jump_here): New.
10617 (delete_fast_tracepoint_jump): New.
10618 (set_fast_tracepoint_jump): New.
10619 (uninsert_fast_tracepoint_jumps_at): New.
10620 (reinsert_fast_tracepoint_jumps_at): New.
10621 (set_breakpoint_at): Use write_inferior_memory.
10622 (uninsert_raw_breakpoint): Use write_inferior_memory.
10623 (check_mem_read): Mask out fast tracepoint jumps.
10624 (check_mem_write): Mask out fast tracepoint jumps.
10625 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10626 (set_fast_tracepoint_jump): Declare.
10627 (delete_fast_tracepoint_jump)
10628 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10629 (reinsert_fast_tracepoint_jumps_at): Declare.
10630 * regcache.c: Don't compile many functions when building the
10631 in-process agent library.
10632 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10633 the register buffer in the heap.
10634 (free_register_cache): If the register buffer isn't owned by the
10635 regcache, don't free it.
10636 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10637 pre-existing register caches.
10638 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10639 type.
10640 (convert_ascii_to_int): : Constify `from' parameter type.
10641 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10642 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10643 the needed buffer in-place.
10644 (relocate_instruction): New.
10645 * server.c (handle_query) <qSymbols>: If the target supports
10646 tracepoints, give it a chance of looking up symbols. Report
10647 support for fast tracepoints.
10648 (handle_status): Stabilize threads.
10649 (process_serial_event): Adjust.
10650 * server.h (struct fast_tracepoint_jump): Forward declare.
10651 (struct process_info) <fast_tracepoint_jumps>: New field.
10652 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10653 (decode_X_packet, decode_M_packet): Adjust.
10654 (relocate_instruction): Declare.
10655 (in_process_agent_loaded): Declare.
10656 (tracepoint_look_up_symbols): Declare.
10657 (struct fast_tpoint_collect_status): Declare.
10658 (fast_tracepoint_collecting): Declare.
10659 (force_unlock_trace_buffer): Declare.
10660 (handle_tracepoint_bkpts): Declare.
10661 (initialize_low_tracepoint)
10662 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10663 * target.h (struct target_ops) <stabilize_threads,
10664 install_fast_tracepoint_jump_pad>: New fields.
10665 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10666 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10667 [HAVE_STDINT_H]: Include stdint.h.
10668 (trace_debug_1): Rename to ...
10669 (trace_vdebug): ... this.
10670 (trace_debug): Rename to ...
10671 (trace_debug_1): ... this. Add `level' parameter.
10672 (trace_debug): New.
10673 (ATTR_USED, ATTR_NOINLINE): New.
10674 (IP_AGENT_EXPORT): New.
10675 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10676 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10677 (about_to_request_buffer_space, trace_buffer_is_full)
10678 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10679 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10680 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10681 (traceframe_write_count, traceframes_created)
10682 (trace_state_variables)
10683 New renaming defines.
10684 (struct ipa_sym_addresses): New.
10685 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10686 (symbol_list): New.
10687 (ipa_sym_addrs): New.
10688 (all_tracepoint_symbols_looked_up): New.
10689 (in_process_agent_loaded): New.
10690 (write_e_ipa_not_loaded): New.
10691 (maybe_write_ipa_not_loaded): New.
10692 (tracepoint_look_up_symbols): New.
10693 (debug_threads) [IN_PROCESS_AGENT]: New.
10694 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10695 (UNKNOWN_SIDE_EFFECTS): New.
10696 (stop_tracing): New.
10697 (flush_trace_buffer): New.
10698 (stop_tracing_bkpt): New.
10699 (flush_trace_buffer_bkpt): New.
10700 (read_inferior_integer): New.
10701 (read_inferior_uinteger): New.
10702 (read_inferior_data_pointer): New.
10703 (write_inferior_data_pointer): New.
10704 (write_inferior_integer): New.
10705 (write_inferior_uinteger): New.
10706 (struct collect_static_trace_data_action): Delete.
10707 (enum tracepoint_type): New.
10708 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10709 <actions_str, step_actions, step_actions_str>: Only include in
10710 GDBserver.
fa593d66
PA
10711 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10712 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10713 (tracepoints): Use IP_AGENT_EXPORT.
10714 (last_tracepoint): Don't include in the IPA.
10715 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10716 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10717 (alloced_trace_state_variables): New.
10718 (trace_state_variables): Use IP_AGENT_EXPORT.
10719 (traceframe_t): Delete unused variable.
10720 (circular_trace_buffer): Don't include in the IPA.
10721 (trace_buffer_start): Delete.
10722 (struct trace_buffer_control): New.
10723 (trace_buffer_free): Delete.
10724 (struct ipa_trace_buffer_control): New.
10725 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10726 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10727 New.
10728 (trace_buffer_ctrl): New.
10729 (TRACE_BUFFER_CTRL_CURR): New.
10730 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10731 Reimplement as macros.
10732 (trace_buffer_wrap): Delete.
10733 (traceframe_write_count, traceframe_read_count)
10734 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10735 (struct tracepoint_hit_ctx) <type>: New field.
10736 (struct fast_tracepoint_ctx): New.
10737 (memory_barrier): New.
10738 (cmpxchg): New.
10739 (record_tracepoint_error): Update atomically in the IPA.
10740 (clear_inferior_trace_buffer): New.
10741 (about_to_request_buffer_space): New.
10742 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10743 updating the same buffer.
10744 (add_tracepoint): Default the tracepoint's type to trap
10745 tracepoint, and orig_size to -1.
10746 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10747 internal variables.
10748 (create_trace_state_variable): New parameter `gdb'. Handle it.
10749 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10750 (cmd_qtdp): Handle fast tracepoints.
10751 (cmd_qtdv): Adjust.
10752 (max_jump_pad_size): New.
10753 (gdb_jump_pad_head): New.
10754 (get_jump_space_head): New.
10755 (claim_jump_space): New.
10756 (sort_tracepoints): New.
10757 (MAX_JUMP_SIZE): New.
10758 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10759 IPA.
10760 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10761 support. Upload fast traceframes, and delete internal IPA
10762 breakpoints.
10763 (stop_tracing_handler): New.
10764 (flush_trace_buffer_handler): New.
10765 (cmd_qtstop): Upload fast tracepoints.
10766 (response_tracepoint): Handle fast tracepoints.
10767 (tracepoint_finished_step): Upload fast traceframes. Set the
10768 tracepoint hit context's tracepoint type.
10769 (handle_tracepoint_bkpts): New.
10770 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10771 type. Add comment about fast tracepoints.
10772 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10773 non-existing action_str field.
10774 (get_context_regcache): Handle fast tracepoints.
10775 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10776 to the regcache.
10777 (fast_tracepoint_from_jump_pad_address): New.
10778 (fast_tracepoint_from_ipa_tpoint_address): New.
10779 (collecting_t): New.
10780 (force_unlock_trace_buffer): New.
10781 (fast_tracepoint_collecting): New.
10782 (collecting): New.
10783 (gdb_collect): New.
10784 (write_inferior_data_ptr): New.
10785 (target_tp_heap): New.
10786 (target_malloc): New.
10787 (download_agent_expr): New.
10788 (UALIGN): New.
10789 (download_tracepoints): New.
10790 (download_trace_state_variables): New.
10791 (upload_fast_traceframes): New.
10792 (IPA_FIRST_TRACEFRAME): New.
10793 (IPA_NEXT_TRACEFRAME_1): New.
10794 (IPA_NEXT_TRACEFRAME): New.
10795 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10796 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10797 (gdb_jump_pad_buffer_end): New.
10798 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10799 (initialize_tracepoint): Adjust.
10800 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10801 buffer. Initialize the low module.
10802 * utils.c (PREFIX, TOOLNAME): New.
10803 (malloc_failure): Use PREFIX.
10804 (error): In the IPA, an error causes an exit.
10805 (fatal, warning): Use PREFIX.
10806 (internal_error): Use TOOLNAME.
10807 (NUMCELLS): Increase to 10.
10808 * configure, config.in: Regenerate.
10809
d149dd1d
PA
108102010-06-01 Pedro Alves <pedro@codesourcery.com>
10811
10812 * server.c (handle_query) <qSupported>: Do two passes over the
10813 qSupported string to avoid nesting strtok.
10814
f6528abd
JK
108152010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10816
10817 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10818 (CDEPS): New.
10819 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10820 -Wl,--dynamic-list.
10821 * configure: Regenerate.
10822 * proc-service.list: New.
10823
ca2a87a0
JK
108242010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10825
10826 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10827 New comment.
10828
363a6e9f
OS
108292010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10830
10831 * gdbreplay.c (remote_open): Check error return from socket() call by
10832 its equality to -1 not by it being negative.
10833 * remote-utils.c (remote_open): Likewise.
10834
d23b6cb1
PA
108352010-05-23 Pedro Alves <pedro@codesourcery.com>
10836
10837 * config.h: Regenerate.
10838
28d3cf85
MK
108392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10840
10841 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10842 doesn't provide PTRACE_GET_THREAD_AREA.
10843
fea36a59
MK
108442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10845
10846 * linux-m68k-low.c: Include <asm/ptrace.h>
10847 (ps_get_thread_area): Implement.
10848
24b066ba
DE
108492010-05-03 Doug Evans <dje@google.com>
10850
10851 * event-loop.c (struct callback_event): New struct.
10852 (callback_list): New global.
10853 (append_callback_event, delete_callback_event): New functions.
10854 (process_callback): New function.
10855 (start_event_loop): Call it.
10856 * remote-utils.c (NOT_SCHEDULED): Define.
10857 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10858 moved out of readchar.
10859 (readchar): Rewrite. Call reschedule before returning.
10860 (reset_readchar): New function.
10861 (remote_close): Call it.
10862 (process_remaining, reschedule): New functions.
10863 * server.h (callback_handler_func): New typedef.
10864 (append_callback_event, delete_callback_event): Declare.
10865
9836d6ea
PA
108662010-05-03 Pedro Alves <pedro@codesourcery.com>
10867
10868 * proc-service.c (ps_pglobal_lookup): Use
10869 thread_db_look_up_one_symbol.
10870 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10871 parameter. Use it instead of all_symbols_looked_up.
10872 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10873 field.
10874 (all_symbols_looked_up): Don't declare.
10875 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10876 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10877 field.
10878 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10879 Set all_symbols_looked_up here.
10880 (thread_db_look_up_one_symbol): New.
10881 (thread_db_get_tls_address): Adjust.
10882 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10883 thread_db object on the heap, and tentatively set it in the
10884 process structure.
10885 (thread_db_init): Don't set all_symbols_looked_up here.
10886 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10887
7984d532
PA
108882010-05-03 Pedro Alves <pedro@codesourcery.com>
10889
10890 * linux-low.c (linux_kill, linux_detach): Adjust.
10891 (status_pending_p_callback): Remove redundant statement. Check
10892 for !TARGET_WAITIKIND_IGNORE, instead of
10893 TARGET_WAITKIND_STOPPED.
10894 (handle_tracepoints): Make sure LWP is locked. Adjust.
10895 (linux_wait_for_event_1): Adjust.
10896 (linux_cancel_breakpoints): New.
10897 (unsuspend_one_lwp): New.
10898 (unsuspend_all_lwps): New.
10899 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10900 (send_sigstop_callback): Change return type to int, add new
10901 `except' parameter and handle it.
10902 (suspend_and_send_sigstop_callback): New.
10903 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10904 pass them down. If SUSPEND, also increment the lwp's suspend
10905 count.
10906 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10907 (need_step_over_p): Don't consider suspended LWPs.
10908 (start_step_over): Adjust.
10909 (proceed_one_lwp): Change return type to int, add new `except'
10910 parameter and handle it.
10911 (unsuspend_and_proceed_one_lwp): New.
10912 (proceed_all_lwps): Use find_inferior instead of
10913 for_each_inferior.
10914 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10915 also decrement the suspend count of LWPs. Pass `except' down,
10916 instead of hacking its suspend count.
10917 (linux_pause_all): Add `freeze' parameter. Adjust.
10918 (linux_unpause_all): New.
10919 (linux_target_ops): Install linux_unpause_all.
10920 * server.c (handle_status): Adjust.
10921 * target.h (struct target_ops): New fields `unpause_all' and
10922 `cancel_breakpoints'. Add new parameter to `pause_all'.
10923 (pause_all): Add new `freeze' parameter.
10924 (unpause_all): New.
10925 (cancel_breakpoints): New.
10926 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10927 cancel breakpoints.
10928 (cmd_qtstart): Pause threads.
10929 (stop_tracing): Pause threads, and cancel breakpoints.
10930 * win32-low.c (win32_target_ops): Adjust.
10931
e471f25b
PA
109322010-05-03 Pedro Alves <pedro@codesourcery.com>
10933
10934 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10935 the inferior right away from here...
10936 (linux_wait_1): ... to here, and adjust to check the thread's
10937 last_resume_kind instead of the lwp's step or stop_expected flags.
10938
1915ef4f
PA
109392010-05-02 Pedro Alves <pedro@codesourcery.com>
10940
10941 * README: Use consistent `GDB' and `GDBserver' spellings.
10942
f9e39928
PA
109432010-05-02 Pedro Alves <pedro@codesourcery.com>
10944
10945 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10946 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10947 (linux_detach_one_lwp): Assume the lwp is stopped.
10948 (any_thread_of): Delete.
10949 (linux_detach): Stop all lwps here. Don't blindly delete all
10950 breakpoints.
10951 (delete_lwp_callback): New.
10952 (linux_mourn): Delete all lwps of the process that is gone.
10953 (linux_wait_1): Don't delete the last lwp of the process here.
10954 * mem-break.h (mark_breakpoints_out): Declare.
10955 * mem-break.c (mark_breakpoints_out): New.
10956 (free_all_breakpoints): Use it.
10957 * server.c (handle_target_event): If the process is gone, mark
10958 breakpoints out.
10959 * thread-db.c (struct thread_db) <create_bp>: New field.
10960 (thread_db_enable_reporting): Fix prototype. Store a thread event
10961 breakpoint reference in the thread_db struct.
10962 (thread_db_load_search): Clear the thread_db object.
10963 (try_thread_db_load_1): Ditto.
10964 (switch_to_process): New.
10965 (disable_thread_event_reporting): Use it.
10966 (remove_thread_event_breakpoints): New.
10967 (thread_db_detach, thread_db_mourn): Use it.
10968
1e7fc18c
PA
109692010-05-01 Pedro Alves <pedro@codesourcery.com>
10970
10971 * linux-low.c (linux_enable_event_reporting): New.
10972 (linux_wait_for_event_1, handle_extended_wait): Use it.
10973
02fc4de7
PA
109742010-04-30 Pedro Alves <pedro@codesourcery.com>
10975
10976 * linux-low.c (linux_kill_one_lwp, linux_kill)
10977 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10978 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10979 SIGSTOP even if the LWP is stopped.
10980 (send_sigstop_callback): New.
10981 (stop_all_lwps): Use send_sigstop_callback instead.
10982 (linux_resume_one_thread): Adjust.
10983 (proceed_one_lwp): Still proceed an LWP that the client has
10984 requested to stop, if we haven't reported it as stopped yet. Make
10985 sure that LWPs the client want stopped, have a pending SIGSTOP.
10986
bc3b5632
DE
109872010-04-26 Doug Evans <dje@google.com>
10988
ae1ada35
DE
10989 * server.c (handle_general_set): Make static.
10990
bc3b5632
DE
10991 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10992 Print received char after testing for error/eof instead of before.
10993 (input_interrupt): Tweak comment.
10994
65730243
DE
109952010-04-23 Doug Evans <dje@google.com>
10996
10997 * server.c (start_inferior): Print inferior argv if --debug.
10998
a8ae7dc0
AR
109992010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11000
11001 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11002 * nto-x86-low.c: Include server.h
11003
1c07cc19
PM
110042010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11005
11006 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11007 be consistent with other sources of this directory.
11008 (init_registers_amd64): Correct name of source file of this function
11009 in the comment.
11010
e0a61e09
PM
110112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11012
11013 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11014 64-bit executables.
11015
54709339
PM
110162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11017
11018 * win32-i386-low.c: Add 64-bit support.
11019 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11020 (init_registers_amd64): Declare.
11021 (mappings): Add 64-bit version of array.
11022 (init_windows_x86): New function.
11023 (the_low_target): Change init_arch field to init_windows_x86.
11024
e8f0053d
PM
110252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11026
11027 * win32-low.c: Adapt to support also 64-bit architecture.
11028 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11029 (get_image_name): Use SIZE_T type for local variable `done'.
11030 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11031 (toolhelp_get_dll_name): Idem.
11032 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11033 Use uintptr_t typecast to avoid warning.
11034 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11035 (handle_exception): Use phex_nz to avoid warning.
11036 (win32_wait): Remove unused local variable `process'.
11037
c481e77e
PM
110382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11039
11040 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11041 `amd64-avx.o'.
11042
12ea4b69
PM
110432010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11044
11045 * configure.ac: Use `ws2_32' library for srv_mingw.
11046 * configure: Regenerate.
11047 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11048 * remote-utils.c: Likewise.
11049
f6d1620c
L
110502010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11051
11052 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11053 if __x86_64__ is defined.
11054
8e642873
PM
110552010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11056
11057 * configure: Regenerate.
11058
711e434b
PM
110592010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11060
11061 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11062 * target.h (target_ops): New get_tib_address field.
11063 * win32-low.h (win32_thread_info): Add thread_local_base field.
11064 * win32-low.c (child_add_thread): Add tlb argument.
11065 Set thread_local_base field to TLB.
11066 (get_child_debug_event): Adapt to child_add_thread change.
11067 (win32_get_tib_address): New function.
11068 (win32_target_ops): Set get_tib_address field to
11069 win32_get_tib_address.
11070 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11071
505106cd
PA
110722010-04-12 Pedro Alves <pedro@codesourcery.com>
11073
505106cd
PA
11074 * linux-low.c (linux_mourn): Also remove the process.
11075 * server.c (handle_target_event): Don't remove the process here.
11076 * nto-low.c (nto_mourn): New.
11077 (nto_target_ops): Install it.
11078 * spu-low.c (spu_mourn): New.
11079 (spu_target_ops): Install it.
11080 * win32-low.c (win32_mourn): New.
11081 (win32_target_ops): Install it.
11082
e8470a06
PA
110832010-04-12 Pedro Alves <pedro@codesourcery.com>
11084
11085 * server.h (buffer_xml_printf): Remove redundant `;'.
11086
45ba0d02
PA
110872010-04-12 Pedro Alves <pedro@codesourcery.com>
11088
11089 * regcache.c (set_register_cache): Invalidate regcaches before
11090 changing the register cache layout.
11091 (regcache_invalidate_one): Allow a NULL regcache.
11092 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11093 regcaches before changing the register cache layout or the target
11094 regsets.
11095
59e04013
L
110962010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11097
11098 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11099 variable warning on Linux/x86-64.
11100
8336d594
PA
111012010-04-11 Pedro Alves <pedro@codesourcery.com>
11102
11103 GDBserver disconnected tracing support.
11104
11105 * linux-low.c (linux_remove_process): Delete.
11106 (add_lwp): Don't set last_resume_kind here.
11107 (linux_kill): Use `mourn'.
11108 (linux_detach): Use `thread_db_detach', and `mourn'.
11109 (linux_mourn): New.
11110 (linux_attach_lwp_1): Adjust comment.
11111 (linux_attach): last_resume_kind moved the thread_info; adjust.
11112 (status_pending_p_callback): Adjust.
11113 (linux_wait_for_event_1): Adjust.
11114 (count_events_callback, select_singlestep_lwp_callback)
11115 (select_event_lwp_callback, cancel_breakpoints_callback)
11116 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11117 (proceed_one_lwp): Adjust.
11118 (linux_async): Add debug output.
11119 (linux_thread_stopped): New.
11120 (linux_pause_all): New.
11121 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11122 linux_pause_all.
11123 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11124 (thread_db_free): Delete declaration.
11125 (thread_db_detach, thread_db_mourn): Declare.
11126 * thread-db.c (thread_db_init): Use thread_db_mourn.
11127 (thread_db_free): Delete, split in two.
11128 (disable_thread_event_reporting): New.
11129 (thread_db_detach): New.
11130 (thread_db_mourn): New.
11131
11132 * server.h (struct thread_info) <last_resume_kind>: New field.
11133 <attached>: Add comment.
11134 <gdb_detached>: New field.
11135 (handler_func): Change return type to int.
11136 (handle_serial_event, handle_target_event): Ditto.
11137 (gdb_connected): Declare.
11138 (tracing): Delete.
11139 (disconnected_tracing): Declare.
11140 (stop_tracing): Declare.
11141
11142 * server.c (handle_query) <qSupported>: Report support for
11143 disconnected tracing.
11144 (queue_stop_reply_callback): Account for running threads.
11145 (gdb_wants_thread_stopped): New.
11146 (gdb_wants_all_threads_stopped): New.
11147 (gdb_reattached_process): New.
11148 (handle_status): Clear the `gdb_detached' flag of all processes.
11149 In all-stop, stop all threads.
11150 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11151 (process_serial_event): If the remote connection breaks, or if an
11152 exit was forced with "monitor exit", force an event loop exit.
11153 Handle disconnected tracing on detach.
11154 (handle_serial_event): Adjust.
11155 (handle_target_event): If GDB isn't connected, forward events back
11156 to the inferior, unless the last process exited, in which case,
11157 exit gdbserver. Adjust interface.
11158
11159 * remote-utils.c (remote_open): Don't block in accept. Instead
11160 register an event loop source on the listen socket file
11161 descriptor. Refactor bits into ...
11162 (listen_desc): ... this new global.
11163 (gdb_connected): ... this new function.
11164 (enable_async_notification): ... this new function.
11165 (handle_accept_event): ... this new function.
11166 (remote_close): Clear remote_desc.
11167
11168 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11169
11170 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11171 New fields.
11172 (mourn_inferior): Define.
11173 (target_process_qsupported): Avoid the dangling else problem.
11174 (thread_stopped): Define.
11175 (pause_all): Define.
11176 (target_waitstatus_to_string): Declare.
11177 * target.c (target_waitstatus_to_string): New.
11178
11179 * tracepoint.c (tracing): Make extern.
11180 (disconnected_tracing): New.
11181 (stop_tracing): Make extern. Handle tracing stops due to GDB
11182 disconnecting.
11183 (cmd_qtdisconnected): New.
11184 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11185 (handle_tracepoint_general_set): Handle QTDisconnected.
11186
11187 * event-loop.c (event_handler_func): Change return type to int.
11188 (process_event): Bail out if the event handler wants the event
11189 loop to stop.
11190 (handle_file_event): Ditto.
11191 (start_event_loop): Bail out if the event handler wants the event
11192 loop to stop.
11193
11194 * nto-low.c (nto_target_ops): Adjust.
11195 * spu-low.c (spu_wait): Don't remove the process here.
11196 (spu_target_ops): Adjust.
11197 * win32-low.c (win32_wait): Don't remove the process here.
11198 (win32_target_ops): Adjust.
11199
5d267c4c
PA
112002010-04-11 Pedro Alves <pedro@codesourcery.com>
11201
11202 * regcache.c (realloc_register_cache): Invalidate inferior's
11203 regcache before recreating it.
11204
623ccd72
PA
112052010-04-09 Pedro Alves <pedro@codesourcery.com>
11206
11207 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11208
219f2f23
PA
112092010-04-09 Stan Shebs <stan@codesourcery.com>
11210 Pedro Alves <pedro@codesourcery.com>
11211
11212 * server.h (LONGEST): New.
11213 (struct thread_info) <while_stepping>: New field.
11214 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11215 Declare.
11216 (initialize_tracepoint, handle_tracepoint_general_set)
11217 (handle_tracepoint_query, tracepoint_finished_step)
11218 (tracepoint_was_hit, release_while_stepping_state_list):
11219 (current_traceframe): Declare.
11220 * server.c (handle_general_set): Handle tracepoint packets.
11221 (read_memory): New.
11222 (write_memory): New.
11223 (handle_search_memory_1): Use read_memory.
11224 (handle_query): Report support for conditional tracepoints, trace
11225 state variables, and tracepoint sources. Handle tracepoint
11226 queries.
11227 (main): Initialize the tracepoints module.
11228 (process_serial_event): Handle traceframe reads/writes.
11229
11230 * linux-low.c (handle_tracepoints): New.
11231 (linux_wait_1): Call it.
11232 (linux_resume_one_lwp): Handle while-stepping.
11233 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11234 (linux_target_ops): Install them.
11235 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11236 New field.
11237 * linux-x86-low.c (x86_supports_tracepoints): New.
11238 (the_low_target). Install it.
11239
11240 * mem-break.h (delete_breakpoint): Declare.
11241 * mem-break.c (delete_breakpoint): Make external.
11242
11243 * target.h (struct target_ops): Add `supports_tracepoints',
11244 `read_pc', and `write_pc' fields.
11245 (target_supports_tracepoints): Define.
11246 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11247 (phex_nz): New.
11248
11249 * regcache.h (struct regcache) <registers_owned>: New field.
11250 (init_register_cache, regcache_cpy): Declare.
11251 (regcache_read_pc, regcache_write_pc): Declare.
11252 (register_cache_size): Declare.
11253 (supply_regblock): Declare.
11254 * regcache.c (init_register_cache): New.
11255 (new_register_cache): Use it.
11256 (regcache_cpy): New.
11257 (register_cache_size): New.
11258 (supply_regblock): New.
11259 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11260
219f2f23
PA
11261 * tracepoint.c: New.
11262
11263 * Makefile.in (OBS): Add tracepoint.o.
11264 (tracepoint.o): New rule.
11265
3a13a53b
L
112662010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11267
11268 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11269 (i386-mmx.o): New.
11270 (i386-mmx.c): Likewise.
11271 (i386-mmx-linux.o): Likewise.
11272 (i386-mmx-linux.c): Likewise.
11273
11274 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11275 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11276 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11277 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11278
11279 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11280 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11281 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11282
1570b33e
L
112832010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11284
11285 * Makefile.in (clean): Updated.
11286 (i386-avx.o): New.
11287 (i386-avx.c): Likewise.
11288 (i386-avx-linux.o): Likewise.
11289 (i386-avx-linux.c): Likewise.
11290 (amd64-avx.o): Likewise.
11291 (amd64-avx.c): Likewise.
11292 (amd64-avx-linux.o): Likewise.
11293 (amd64-avx-linux.c): Likewise.
11294
11295 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11296 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11297 (srv_amd64_regobj): Add amd64-avx.o.
11298 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11299 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11300 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11301 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11302 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11303 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11304 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11305
11306 * i387-fp.c: Include "i386-xstate.h".
11307 (i387_xsave): New.
11308 (i387_cache_to_xsave): Likewise.
11309 (i387_xsave_to_cache): Likewise.
11310 (x86_xcr0): Likewise.
11311
11312 * i387-fp.h (i387_cache_to_xsave): Likewise.
11313 (i387_xsave_to_cache): Likewise.
11314 (x86_xcr0): Likewise.
11315
11316 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11317 * linux-crisv32-low.c (target_regsets): Likewise.
11318 * linux-m68k-low.c (target_regsets): Likewise.
11319 * linux-mips-low.c (target_regsets): Likewise.
11320 * linux-ppc-low.c (target_regsets): Likewise.
11321 * linux-s390-low.c (target_regsets): Likewise.
11322 * linux-sh-low.c (target_regsets): Likewise.
11323 * linux-sparc-low.c (target_regsets): Likewise.
11324 * linux-xtensa-low.c (target_regsets): Likewise.
11325
11326 * linux-low.c: Include <sys/uio.h>.
11327 (regsets_fetch_inferior_registers): Support nt_type.
11328 (regsets_store_inferior_registers): Likewise.
11329 (linux_process_qsupported): New.
11330 (linux_target_ops): Add linux_process_qsupported.
11331
11332 * linux-low.h (regset_info): Add nt_type.
11333 (linux_target_ops): Add process_qsupported.
11334
11335 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11336 and <sys/uio.h>.
11337 (init_registers_i386_avx_linux): New.
11338 (init_registers_amd64_avx_linux): Likewise.
11339 (xmltarget_i386_linux_no_xml): Likewise.
11340 (xmltarget_amd64_linux_no_xml): Likewise.
11341 (PTRACE_GETREGSET): Likewise.
11342 (PTRACE_SETREGSET): Likewise.
11343 (x86_fill_xstateregset): Likewise.
11344 (x86_store_xstateregset): Likewise.
11345 (use_xml): Likewise.
11346 (x86_linux_update_xmltarget): Likewise.
11347 (x86_linux_process_qsupported): Likewise.
11348 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11349 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11350 init_registers_i386_linux here. Call
11351 x86_linux_update_xmltarget.
11352 (the_low_target): Add x86_linux_process_qsupported.
11353
11354 * server.c (handle_query): Call target_process_qsupported.
11355
11356 * target.h (target_ops): Add process_qsupported.
11357 (target_process_qsupported): New.
11358
fc7238bb
PA
113592010-04-03 Pedro Alves <pedro@codesourcery.com>
11360
11361 * inferiors.c (add_thread): Set last_status kind to
11362 TARGET_WAITKIND_IGNORE.
11363 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11364 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11365 (linux_wait_1): Move `thread' local definition to block that uses
11366 it. Don't NULL initialize `event_child'.
11367 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11368 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11369 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11370
bdabb078
PA
113712010-04-01 Pedro Alves <pedro@codesourcery.com>
11372
11373 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11374 an extended waitstatus, or by a watchpoint.
11375 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11376 thread was stepping or has been stopped by a watchpoint.
11377
d3bbe7a0
PA
113782010-04-01 Pedro Alves <pedro@codesourcery.com>
11379
11380 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11381 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11382 of another, then delete the previous, and validate all
11383 breakpoints.
11384 (validate_inserted_breakpoint): New.
11385 (delete_disabled_breakpoints): New.
11386 (validate_breakpoints): New.
11387 (check_mem_read): Validate breakpoints before trusting their
11388 shadow. Delete disabled breakpoints.
11389 (check_mem_write): Validate breakpoints before trusting they
11390 should be inserted. Delete disabled breakpoints.
11391 * mem-break.h (validate_breakpoints):
11392 * server.c (handle_query): Validate breakpoints when we see a
11393 qSymbol query.
11394
8b07ae33
PA
113952010-04-01 Pedro Alves <pedro@codesourcery.com>
11396
11397 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11398 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11399 if we could tell there's a GDB breakpoint at stop_pc.
11400 (need_step_over_p): Don't do a step over if we find a GDB
11401 breakpoint at the resume PC.
11402
11403 * mem-break.c (struct raw_breakpoint): New.
11404 (enum bkpt_type): New type `gdb_breakpoint'.
11405 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11406 fields. New field `raw'.
11407 (find_raw_breakpoint_at): New.
11408 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11409 breakpoint instead.
11410 (set_breakpoint_at): Adjust.
11411 (delete_raw_breakpoint): New.
11412 (release_breakpoint): New.
11413 (delete_breakpoint): Rename to...
11414 (delete_breakpoint_1): ... this. Add proc parameter. Use
11415 release_breakpoint. Return ENOENT.
11416 (delete_breakpoint): Reimplement.
11417 (find_breakpoint_at): Delete.
11418 (find_gdb_breakpoint_at): New.
11419 (delete_breakpoint_at): Delete.
11420 (set_gdb_breakpoint_at): New.
11421 (delete_gdb_breakpoint_at): New.
11422 (gdb_breakpoint_here): New.
11423 (set_reinsert_breakpoint): Use release_breakpoint.
11424 (uninsert_breakpoint): Rename to ...
11425 (uninsert_raw_breakpoint): ... this.
11426 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11427 (reinsert_raw_breakpoint): Change parameter type to
11428 raw_breakpoint.
11429 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11430 instead.
11431 (check_breakpoints): Adjust. Use release_breakpoint.
11432 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11433 (breakpoint_inserted_here): Ditto.
11434 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11435 Don't trust the breakpoint's shadow if it is not inserted.
11436 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11437 (delete_all_breakpoints): Adjust.
11438 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11439 use delete_breakpoint_1.
11440
11441 * mem-break.h (breakpoints_supported): Delete declaration.
11442 (set_gdb_breakpoint_at): Declare.
11443 (gdb_breakpoint_here): Declare.
11444 (delete_breakpoint_at): Delete.
11445 (delete_gdb_breakpoint_at): Declare.
11446
11447 * server.h (struct raw_breakpoint): Forward declare.
11448 (struct process_info): New field `raw_breakpoints'.
11449
11450 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11451 breakpoints.
11452
6bf5e0ba
PA
114532010-03-24 Pedro Alves <pedro@codesourcery.com>
11454
11455 * linux-low.c (status_pending_p_callback): Fix comment.
11456 (linux_wait_for_event_1): Move most of the internal breakpoint
11457 handling from here...
11458 (linux_wait_1): ... to here.
11459 (count_events_callback): New.
11460 (select_singlestep_lwp_callback): New.
11461 (select_event_lwp_callback): New.
11462 (cancel_breakpoints_callback): New.
11463 (select_event_lwp): New.
11464 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11465 priority to all LWPs that have had events that should be reported
11466 to the client. Cancel breakpoints when about to reporting the
11467 event to the client, not while stopping lwps. No longer cancel
11468 finished single-steps here.
11469 (cancel_finished_single_step): Delete.
11470 (cancel_finished_single_steps): Delete.
11471
414a389f
PA
114722010-03-24 Pedro Alves <pedro@codesourcery.com>
11473
11474 * mem-break.c (enum bkpt_type): New.
11475 (struct breakpoint): New field `type'.
11476 (set_breakpoint_at): Change return type to struct breakpoint
11477 pointer. Set type to `other_breakpoint' by default.
11478 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11479 in the breakpoint list.
11480 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11481 (reinsert_breakpoint): Rename to ...
11482 (reinsert_raw_breakpoint): ... this.
11483 (reinsert_breakpoints_at): Adjust.
11484 * mem-break.h (struct breakpoint): Declare.
11485 (set_breakpoint_at): Change return type to struct breakpoint
11486 pointer.
11487
2280c721
PA
114882010-03-24 Pedro Alves <pedro@codesourcery.com>
11489
11490 * server.c (handle_query): Assign, not compare.
11491
d50171e4
PA
114922010-03-24 Pedro Alves <pedro@codesourcery.com>
11493
11494 Teach linux gdbserver to step-over-breakpoints.
11495
11496 * linux-low.c (can_hardware_single_step): New.
11497 (supports_breakpoints): New.
11498 (handle_extended_wait): If stopping threads, read the stop pc of
11499 the new cloned LWP.
11500 (get_pc): New.
11501 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11502 low target doesn't support retrieving the PC.
11503 (add_lwp): Set last_resume_kind to resume_continue.
11504 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11505 (linux_attach): Don't clear stop_expected. Set the lwp's
11506 last_resume_kind to resume_stop.
11507 (linux_detach_one_lwp): Don't check for removed breakpoints.
11508 (check_removed_breakpoint): Delete.
11509 (status_pending_p): Rename to ...
11510 (status_pending_p_callback): ... this. Don't check for removed
11511 breakpoints. Don't consider threads that are stopped from GDB's
11512 perspective.
11513 (linux_wait_for_lwp): Always read the stop_pc here.
11514 (cancel_breakpoint): New.
11515 (step_over_bkpt): New global.
11516 (linux_wait_for_event_1): Implement stepping over breakpoints.
11517 (gdb_wants_lwp_stopped): New.
11518 (gdb_wants_all_stopped): New.
11519 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11520 single-step traps here. Store the thread's last reported target
11521 wait status.
11522 (send_sigstop): Don't clear stop_expected. Always set it,
11523 instead.
11524 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11525 (cancel_finished_single_step): New.
11526 (cancel_finished_single_steps): New.
11527 (wait_for_sigstop): Don't cancel finished single-step traps here.
11528 (linux_resume_one_lwp): Don't check for removed breakpoints.
11529 Don't set `step' on non-hardware step archs.
11530 (linux_set_resume_request): Ignore resume_stop requests if already
11531 stopping or stopped. Set the lwp's last_resume_kind.
11532 (resume_status_pending_p): Don't check for removed breakpoints.
11533 (need_step_over_p): New.
11534 (start_step_over): New.
11535 (finish_step_over): New.
11536 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11537 requests. Clear the thread's last reported target waitstatus.
11538 Don't use the `suspended' flag. Don't consider pending breakpoints.
11539 (linux_resume): Start a step-over if necessary.
11540 (proceed_one_lwp): New.
11541 (proceed_all_lwps): New.
11542 (unstop_all_lwps): New.
11543 * linux-low.h (struct lwp_info): Rewrite comment for the
11544 `suspended' flag. Add the `stop_pc' field. Delete the
11545 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11546 Add `'last_resume_kind' and `need_step_over' fields.
11547 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11548 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11549 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11550 (set_raw_breakpoint_at): New.
11551 (set_breakpoint_at): Rewrite to use it.
11552 (reinsert_breakpoint_handler): Delete.
11553 (set_reinsert_breakpoint): New.
11554 (reinsert_breakpoint_by_bp): Delete.
11555 (delete_reinsert_breakpoints): New.
11556 (uninsert_breakpoint): Rewrite.
11557 (uninsert_breakpoints_at): New.
11558 (reinsert_breakpoint): Rewrite.
11559 (reinsert_breakpoints_at): New.
11560 (check_breakpoints): Rewrite.
11561 (breakpoint_here): New.
11562 (breakpoint_inserted_here): New.
11563 (check_mem_read): Adjust.
11564 * mem-break.h (breakpoints_supported, breakpoint_here)
11565 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11566 (reinsert_breakpoint_by_bp): Delete declaration.
11567 (delete_reinsert_breakpoints): Declare.
11568 (reinsert_breakpoint): Delete declaration.
11569 (reinsert_breakpoints_at): Declare.
11570 (uninsert_breakpoint): Delete declaration.
11571 (uninsert_breakpoints_at): Declare.
11572 (check_breakpoints): Adjust prototype.
11573 * server.h: Adjust include order.
11574 (struct thread_info): Declare here. Add a `last_status' field.
11575
30ba68cb
MS
115762010-03-23 Michael Snyder <msnyder@vmware.com>
11577
11578 * server.c (crc32): New function.
11579 (handle_query): Add handling for 'qCRC:' request.
11580
b9a881c2
PA
115812010-03-23 Pedro Alves <pedro@codesourcery.com>
11582
11583 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11584 lwp had been stopped by a watchpoint.
11585
e92d13d5
PA
115862010-03-16 Pedro Alves <pedro@codesourcery.com>
11587
11588 * server.h (internal_error): Declare.
11589 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11590 * utils.c (internal_error): New function.
11591
64daa791
AS
115922010-03-15 Andreas Schwab <schwab@redhat.com>
11593
11594 * configure.srv: Fix typo setting srv_regobj.
11595
f52cd8cd
PA
115962010-03-15 Pedro Alves <pedro@codesourcery.com>
11597
11598 * linux-low.c (fetch_register): Avoid passing a non string literal
11599 format to `error'.
11600 (usr_store_inferior_registers): Ditto.
11601
93ae6fdc
PA
116022010-03-14 Pedro Alves <pedro@codesourcery.com>
11603
11604 * linux-low.c (linux_write_memory): Bail out early if peeking
11605 memory failed.
11606
c3adc08c
PA
116072010-03-14 Pedro Alves <pedro@codesourcery.com>
11608
11609 * linux-low.h (struct lwp_info): New fields
11610 `stopped_by_watchpoint' and `stopped_data_address'.
11611 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11612 here, and cache them in the lwp object.
11613 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11614 directly.
11615 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11616 field.
11617 (linux_stopped_by_watchpoint): Rewrite.
11618 (linux_stopped_data_address): Rewrite.
11619
bce522a2
PA
116202010-03-06 Simo Melenius <simo.melenius@iki.fi>
11621
11622 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11623 switching the current inferior, not before.
11624
90884b2b
L
116252010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11626
11627 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11628 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11629 i386-linux.c and amd64-linux.c.
11630 (reg-i386.o): Removed.
11631 (reg-i386.c): Likewise.
11632 (reg-i386-linux.o): Likewise.
11633 (reg-i386-linux.c): Likewise.
11634 (reg-x86-64.o): Likewise.
11635 (reg-x86-64.c): Likewise.
11636 (reg-x86-64-linux.o): Likewise.
11637 (reg-x86-64-linux.c): Likewise.
11638 (i386.o): New.
11639 (i386.c): Likewise.
11640 (i386-linux.o): Likewise.
11641 (i386-linux.c): Likewise.
11642 (amd64.o): Likewise.
11643 (amd64.c): Likewise.
11644 (amd64-linux.o): Likewise.
11645 (amd64-linux.c): Likewise.
11646
11647 * configure.srv (srv_i386_regobj): New.
11648 (srv_i386_linux_regobj): Likewise.
11649 (srv_amd64_regobj): Likewise.
11650 (srv_amd64_linux_regobj): Likewise.
11651 (srv_i386_32bit_xmlfiles): Likewise.
11652 (srv_i386_64bit_xmlfiles): Likewise.
11653 (srv_i386_xmlfiles): Likewise.
11654 (srv_amd64_xmlfiles): Likewise.
11655 (srv_i386_linux_xmlfiles): Likewise.
11656 (srv_amd64_linux_xmlfiles): Likewise.
11657 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11658 srv_xmlfiles to $srv_i386_xmlfiles.
11659 (i[34567]86-*-mingw32ce*): Likewise.
11660 (i[34567]86-*-mingw*): Likewise.
11661 (i[34567]86-*-nto*): Likewise.
11662 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11663 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11664 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11665 (x86_64-*-linux*): Likewise.
11666
11667 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11668 (init_registers_amd64_linux): New.
11669 (x86_arch_setup): Replace init_registers_x86_64_linux with
11670 init_registers_amd64_linux.
11671
193f13e6
MK
116722010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11673
11674 * configure.ac: Check for libdl. If it is not available link against
11675 static libthread_db.
11676 * configure: Regenerate.
11677
85d721b8
PA
116782010-02-22 Pedro Alves <pedro@codesourcery.com>
11679
11680 PR9605
11681
11682 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11683 handing a read watchpoint.
11684 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11685
6076632b
DE
116862010-02-12 Doug Evans <dje@google.com>
11687
11688 * linux-low.c (linux_supports_tracefork_flag): Document.
11689 (linux_look_up_symbols): Add comment.
11690
3327ccf7
L
116912010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11692
11693 * regcache.c (supply_register): Clear regcache if buf is NULL.
11694
0718675c 116952010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11696 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11697
11698 * inferiors.c (find_inferior): Add function documentation.
11699 (unloaded_dll): Handle the case where the unloaded dll has not
11700 been previously registered in the dll list.
11701
177321bd
DJ
117022010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11703
11704 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11705 (thumb2_breakpoint): New.
11706 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11707
2b009048
DJ
117082010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11711 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11712 breakpoints.
11713
3be029c7
PA
117142010-01-21 Pedro Alves <pedro@codesourcery.com>
11715
11716 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11717
18f5de3b
JK
117182010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11719
11720 * linux-s390-low.c (s390_collect_ptrace_register)
11721 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11722
3743bb4f
DE
117232010-01-21 Doug Evans <dje@google.com>
11724
14ce3065
DE
11725 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11726 (PTRACE_ARG4_TYPE): New macro.
11727 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11728 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11729 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11730 (usr_store_inferior_registers): Ditto.
11731 (linux_read_memory, linux_write_memory): Ditto.
11732 (linux_test_for_tracefork): Ditto.
11733
3743bb4f
DE
11734 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11735 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11736
8b315be5
PA
117372010-01-21 Pedro Alves <pedro@codesourcery.com>
11738
11739 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11740 target.
11741
85492558
PA
117422010-01-21 Pedro Alves <pedro@codesourcery.com>
11743
11744 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11745 prototype to take a regcache. Adjust.
11746
442ea881
PA
117472010-01-20 Pedro Alves <pedro@codesourcery.com>
11748
11749 * regcache.h (struct thread_info): Forward declare.
11750 (struct regcache): New.
11751 (new_register_cache): Adjust prototype.
11752 (get_thread_regcache): Declare.
11753 (free_register_cache): Adjust prototype.
11754 (registers_to_string, registers_from_string): Ditto.
11755 (supply_register, supply_register_by_name, collect_register)
11756 (collect_register_as_string, collect_register_by_name): Ditto.
11757 * regcache.c (struct inferior_regcache_data): Delete.
11758 (get_regcache): Rename to ...
11759 (get_thread_regcache): ... this. Adjust. Switch inferior before
11760 fetching registers.
11761 (regcache_invalidate_one): Adjust.
11762 (regcache_invalidate): Fix prototype.
11763 (new_register_cache): Return the new register cache.
11764 (free_register_cache): Change prototype.
11765 (realloc_register_cache): Adjust.
11766 (registers_to_string): Change prototype to take a regcache. Adjust.
11767 (registers_from_string): Ditto.
11768 (register_data): Ditto.
11769 (supply_register): Ditto.
11770 (supply_register_by_name): Ditto.
11771 (collect_register): Ditto.
11772 (collect_register_as_string): Ditto.
11773 (collect_register_by_name): Ditto.
11774 * server.c (process_serial_event): Adjust.
11775 * linux-low.h (regset_fill_func, regset_store_func): Change
11776 prototype.
11777 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11778 Change prototype.
11779 * linux-low.c (get_stop_pc): Adjust.
11780 (check_removed_breakpoint): Adjust.
11781 (linux_wait_for_event): Adjust.
11782 (linux_resume_one_lwp): Adjust.
11783 (fetch_register): Add regcache parameter. Adjust.
11784 (usr_store_inferior_registers): Ditto.
11785 (regsets_fetch_inferior_registers): Ditto.
11786 (regsets_store_inferior_registers): Ditto.
11787 (linux_fetch_registers, linux_store_registers): Ditto.
11788 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11789 regcache. Adjust.
43aaf8b6
PA
11790 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11791 Ditto.
442ea881
PA
11792 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11793 prototype to take a regcache.
11794 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11795 * remote-utils.c (convert_ascii_to_int, outreg)
11796 (prepare_resume_reply): Change prototype to take a regcache.
11797 Adjust.
11798 * target.h (struct target_ops) <fetch_registers, store_registers>:
11799 Change prototype to take a regcache.
11800 (fetch_inferior_registers, store_inferior_registers): Change
11801 prototype to take a regcache. Adjust.
11802 * proc-service.c (ps_lgetregs): Adjust.
11803 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11804 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11805 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11806 take a regcache. Adjust.
11807 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11808 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11809 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11810 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11811 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11812 (cris_cannot_fetch_register):
11813 (cris_breakpoint_at): Change prototype to take a regcache.
11814 Adjust.
11815 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11816 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11817 to take a regcache. Adjust.
11818 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11819 Adjust.
11820 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11821 take a regcache. Adjust.
11822 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11823 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11824 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11825 * linux-mips-low.c (mips_get_pc):
11826 (mips_set_pc): Change prototype to take a regcache. Adjust.
11827 (mips_reinsert_addr): Adjust.
11828 (mips_collect_register): Change prototype to take a regcache.
11829 Adjust.
11830 (mips_supply_register):
11831 (mips_collect_register_32bit, mips_supply_register_32bit)
11832 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11833 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11834 * linux-ppc-low.c (ppc_supply_ptrace_register)
11835 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11836 (parse_spufs_run): Adjust.
11837 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11838 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11839 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11840 take a regcache. Adjust.
11841 * linux-s390-low.c (s390_collect_ptrace_register)
11842 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11843 (s390_set_pc): Change prototype to take a regcache. Adjust.
11844 (s390_arch_setup): Adjust.
11845 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11846 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11847 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11848 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11849 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11850 regcache. Adjust.
11851 (sparc_breakpoint_at): Adjust.
11852 * linux-xtensa-low.c (xtensa_fill_gregset):
11853 (xtensa_store_gregset):
11854 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11855 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11856 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11857 prototype to take a regcache. Adjust.
11858 * win32-arm-low.c (arm_fetch_inferior_register)
11859 (arm_store_inferior_register): Change prototype to take a
11860 regcache. Adjust.
11861 * win32-i386-low.c (i386_fetch_inferior_register)
11862 (i386_store_inferior_register): Change prototype to take a
11863 regcache. Adjust.
11864 * win32-low.c (child_fetch_inferior_registers)
11865 (child_store_inferior_registers): Change prototype to take a
11866 regcache. Adjust.
11867 (win32_wait): Adjust.
11868 (win32_fetch_inferior_registers): Change prototype to take a
11869 regcache. Adjust.
11870 (win32_store_inferior_registers): Adjust.
11871 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11872 store_inferior_register>: Change prototype to take a regcache.
11873
60c3d7b0
DE
118742010-01-20 Doug Evans <dje@google.com>
11875
11876 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11877 #ifdef.
11878 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11879 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11880
dc146f7c
VP
118812010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11882
11883 * linux-low.c (linux_core_of_thread): New.
11884 (compare_ints, show_process, list_threads): New.
11885 (linux_qxfer_osdata): Report threads and cores.
11886 (linux_target_op): Register linux_core_of_thread.
11887 * remote-utils.c (prepare_resume_reply): Report the core.
11888 (buffer_xml_printf): Support %d specifier.
11889 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11890 New.
11891 (handle_query): Handle qXfer:threads. Announce availability
11892 thereof.
11893 * target.h (struct target_ops): New field core_of_thread.
11894
7803799a
UW
118952010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11896
11897 * Makefile.in (clean): Remove new generated files.
11898 (reg-s390.o, reg-s390.c): Remove rules.
11899 (reg-s390x.o, reg-s390x.c): Likewise.
11900 (s390-linux32.o, s390-linux32.c): Add rules.
11901 (s390-linux64.o, s390-linux64.c): Likewise.
11902 (s390x-linux64.o, s390x-linux64.c): Likewise.
11903 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11904 * linux-s390-low.c: Include <elf.h>.
11905 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11906 (init_registers_s390): Remove prototype.
11907 (init_registers_s390x): Likewise.
11908 (init_registers_s390_linux32): Add prototype.
11909 (init_registers_s390_linux64): Likewise.
11910 (init_registers_s390x_linux64): Likewise.
11911 (s390_num_regs_3264): New define.
11912 (s390_regmap_3264): New global variable.
11913 (s390_cannot_fetch_register): Remove obsolete check.
11914 (s390_cannot_store_register): Likewise.
11915 (s390_collect_ptrace_register): Handle upper/lower register halves.
11916 (s390_supply_ptrace_register): Likewise.
11917 (s390_fill_gregset): Update to register number changes.
11918 (s390_get_hwcap): New routine.
11919 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11920 Install appropriate regmap and register set.
11921
6e7ffa39
JB
119222010-01-01 Joel Brobecker <brobecker@adacore.com>
11923
11924 * server.c (gdbserver_version): Update copyright year to 2010.
11925 * gdbreplay.c (gdbreplay_version): Likewise.
11926
957f3f49
DE
119272009-12-28 Doug Evans <dje@google.com>
11928
11929 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11930 elf/external.h. Include <elf.h> instead but only if necessary.
11931
ca5c370d
PA
119322009-12-28 Pedro Alves <pedro@codesourcery.com>
11933
11934 * linux-low.c (linux_remove_process): Remove `detaching'
11935 parameter. Don't release/detach from thread_db here.
11936 (linux_kill): Release/detach from thread_db here, ...
11937 (linux_detach): ... and here, before actually detaching.
11938 (linux_wait_1): ... and here, when a process exits.
11939 * thread-db.c (any_thread_of): New.
11940 (thread_db_free): Switch the current inferior to a thread of the
11941 passed in process.
11942
4ee62156
DE
119432009-12-21 Doug Evans <dje@google.com>
11944
d90e6a88
DE
11945 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11946
c5f62d5f
DE
11947 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11948 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11949 warning ifndef __NR_tkill. Move setting of errno there too.
11950 Delete unnecessary resetting of errno after syscall.
11951 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11952
10e86dd7
DE
11953 * configure.ac: Check for dladdr.
11954 * config.in: Regenerate.
11955 * configure: Regenerate.
11956 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11957 (try_thread_db_load): Update.
11958
4ee62156
DE
11959 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11960
00f515da
DE
119612009-12-18 Doug Evans <dje@google.com>
11962
e9464885
DE
11963 * event-loop.c: Include unistd.h if it exists.
11964
07d4f67e
DE
11965 * linux-low.c (my_waitpid): Move definition away from being in
11966 between linux_tracefork_child/linux_test_for_tracefork.
11967
00f515da
DE
11968 * gdb_proc_service.h (psaddr_t): Fix type.
11969 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11970 signature to match glibc.
11971
1de1badb
DE
119722009-12-16 Doug Evans <dje@google.com>
11973
11974 * linux-low.c (linux_read_memory): Fix argument to read.
11975
aeeb81d1
PA
119762009-11-26 Pedro Alves <pedro@codesourcery.com>
11977
11978 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11979 events, don't leave current_inferior pointing at null.
11980
10357975
PA
119812009-11-26 Pedro Alves <pedro@codesourcery.com>
11982
11983 * win32-low.c (LOG): Delete.
11984 (OUTMSG): Output to stderr.
11985 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11986 on compile time LOG macro.
11987 (win32_wait): Fix debug output.
11988
cf6e3471
PA
119892009-11-26 Pedro Alves <pedro@codesourcery.com>
11990
11991 * win32-low.c (win32_add_one_solib): If the dll name is
11992 "ntdll.dll", prepend the system directory to the dll path.
11993
0c85e18e
MK
119942009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11997
9ac544ce 119982009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11999 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12000
12001 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12002 * configure.ac: Check for __mcoldfire__ and set
12003 gdb_cv_m68k_is_coldfire.
12004 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12005 reg-cf.o and reg-m68k.o.
12006 * configure: Regenerated.
12007
fd7dd3e6
PA
120082009-11-16 Pedro Alves <pedro@codesourcery.com>
12009
12010 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12011 Pass it to thread_db_free.
12012 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12013 proper `detaching' argument to linux_remove_process.
12014 * linux-low.h (thread_db_free): Add `detaching' parameter.
12015 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12016 to thread_db_free.
12017 (thread_db_free): Add `detaching' parameter. Only
12018 call td_ta_clear_event if detaching from process.
12019
75aa492e
MK
120202009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12021
12022 * thread-db.c (thread_db_free): Fix typo.
12023
21e1bee4
PP
120242009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12025
12026 PR gdb/10838
12027 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12028
8838b45e
NS
120292009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12030
12031 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12032 with an i686 compiler.
12033 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12034 needed.
12035 * configure: Rebuilt.
12036
8a35fb51
SL
120372009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12038
12039 PR gdb/10783
12040
12041 * server.c (handle_search_memory_1): Correct read_addr initialization
12042 in loop for searching subsequent chunks.
12043
96f15937
PP
120442009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12045
12046 * configure.ac: New --with-libthread-db option.
12047 * thread-db.c: Allow direct dependence on libthread_db.
12048 (thread_db_free): Adjust.
12049 * config.in: Regenerate.
12050 * configure: Likewise.
889bf7c5 12051
5f7d1694
PP
120522009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12053
12054 PR gdb/10757
12055 * thread-db.c (attach_thread): New function.
12056 (maybe_attach_thread): Return success/failure.
12057 (find_new_threads_callback): Adjust.
889bf7c5
PA
12058 (thread_db_find_new_threads): Loop until no new threads.
12059
88e3b899
PA
120602009-10-13 Pedro Alves <pedro@codesourcery.com>
12061
12062 * proc-service.c (ps_lgetregs): Formatting.
12063
cdbfd419
PP
120642009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12065
12066 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12067 * configure.ac: Adjust.
12068 * linux-low.h (struct process_info_private): Move members to struct
12069 thread_db.
12070 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12071 * linux-low.c (linux_remove_process): Adjust.
12072 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12073 * server.c (handle_query): Move code ...
12074 (handle_monitor_command): ... here. New function.
12075 * target.h (struct target_ops): New member.
12076 * thread-db.c (struct thread_db): New.
12077 (libthread_db_search_path): New variable.
12078 (thread_db_create_event, thread_db_enable_reporting)
12079 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12080 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12081 (try_thread_db_load_1, dladdr_to_soname): New functions.
12082 (try_thread_db_load, thread_db_load_search): New functions.
12083 (thread_db_init): Search for libthread_db.
12084 (thread_db_free): New function.
12085 (thread_db_handle_monitor_command): Likewise.
12086 * config.in: Regenerate.
12087 * configure: Regenerate.
889bf7c5 12088
4168d2d6
UW
120892009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12090
12091 * spu-low.c (spu_kill): Wait for inferior to terminate.
12092 Call clear_inferiors.
12093 (spu_detach): Call clear_inferiors.
12094
81ecdfbb
RW
120952009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12096
12097 * aclocal.m4: Regenerate.
12098 * config.in: Likewise.
12099 * configure: Likewise.
12100
0b9ff2c0
UW
121012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12102
12103 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12104 (parse_spufs_run): New function.
12105 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12106 (ppc_breakpoint_at): Handle SPU breakpoints.
12107
efcbbd14
UW
121082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12109
12110 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12111 (SPUFS_MAGIC): Define.
12112 (spu_enumerate_spu_ids): New function.
12113 (linux_qxfer_spu): New function.
12114 (linux_target_ops): Install linux_qxfer_spu.
12115
f4d9bade
UW
121162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12117
12118 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12119 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12120 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12121 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12122 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12123 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12124 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12125 (init_registers_powerpc_cell32l): Add prototype.
12126 (init_registers_powerpc_cell64l): Likewise.
12127 (ppc_arch_setup): Detect Cell/B.E. architecture.
12128
96e946ca
RW
121292009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12130
12131 * Makefile.in (datarootdir): New variable.
12132
58d6951d
DJ
121332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12134
12135 * linux-low.c (linux_write_memory): Update debugging output.
12136 * Makefile.in (clean): Add new descriptions.
12137 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12138 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12139 * configure.srv: Add new files for arm*-*-linux*.
12140 * linux-arm-low.c: Add new declarations.
12141 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12142 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12143 (HWCAP_VFPv3D16): New.
12144 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12145 instead of __IWMMXT__.
12146 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12147 (arm_arch_setup): New.
12148 (target_regsets): Remove #ifdef. Add VFP regset.
12149 (the_low_target): Use arm_arch_setup.
12150
12b42a12
DJ
121512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12152
12153 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12154 the main thread again.
12155
ac8c974e
AR
121562009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12157
12158 Adding Neutrino gdbserver.
12159 * configure: Regenerated.
12160 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12161 * configure.srv (i[34567]86-*-nto*): New target.
12162 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12163 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12164 (nto_comctrl) [__QNX__]: New function.
12165 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12166
4424e0c3 121672009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12168
12169 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12170 srv_tgtobj.
12171
912cf4ba
PA
121722009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12173 Pedro Alves <pedro@codesourcery.com>
12174
12175 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12176 don't support CONTEXT_EXTENDED_REGISTERS.
12177 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12178 (the_low_target): Install them.
12179 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12180 failing with ERROR_PIPE_NOT_CONNECTED.
12181
aa5ca48f
DE
121822009-06-30 Doug Evans <dje@google.com>
12183 Pierre Muller <muller@ics.u-strasbg.fr>
12184
12185 Add h/w watchpoint support to x86-linux, win32-i386.
12186 * Makefile.in (SFILES): Add i386-low.c
12187 (i386_low_h): Define.
12188 (i386-low.o): Add dependencies.
12189 (linux-x86-low.o): Add i386-low.h dependency.
12190 (win32-i386-low.o): Ditto.
12191 * i386-low.c: New file.
12192 * i386-low.h: New file.
12193 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12194 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12195 * linux-low.c (linux_add_process): Initialize arch_private.
12196 (linux_remove_process): Free arch_private.
12197 (add_lwp): Initialize arch_private.
12198 (delete_lwp): Free arch_private.
12199 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12200 provided.
12201 * linux-low.h (process_info_private): New member arch_private.
12202 (lwp_info): New member arch_private.
12203 (linux_target_ops): New members new_process, new_thread,
12204 prepare_to_resume.
12205 (ptid_of): New macro.
12206 * linux-x86-low.c: Include stddef.h, i386-low.h.
12207 (arch_process_info): New struct.
12208 (arch_lwp_info): New struct.
12209 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12210 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12211 (i386_dr_low_get_status): New function.
12212 (x86_insert_point, x86_remove_point): New functions.
12213 (x86_stopped_by_watchpoint): New function.
12214 (x86_stopped_data_address): New function.
12215 (x86_linux_new_process, x86_linux_new_thread): New functions.
12216 (x86_linux_prepare_to_resume): New function.
12217 (the_low_target): Add entries for insert_point, remove_point,
12218 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12219 prepare_to_resume.
12220 * server.c (debug_hw_points): New global.
12221 (monitor_show_help): Document set debug-hw-points.
12222 (handle_query): Process "set debug-hw-points".
12223 * server.h (debug_hw_points): Declare.
12224 (paddress): Declare.
12225 * utils.c (NUMCELLS, CELLSIZE): New macros.
12226 (get_sell, xsnprintf, paddress): New functions.
12227 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12228 remove_point, stopped_by_watchpoint, stopped_data_address.
12229 * win32-i386-low.c: Include i386-low.h.
12230 (debug_reg_state): Replaces dr.
12231 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12232 (i386_dr_low_get_status): New function.
12233 (i386_insert_point, i386_remove_point): New functions.
12234 (i386_stopped_by_watchpoint): New function.
12235 (i386_stopped_data_address): New function.
12236 (i386_initial_stuff): Update.
12237 (get_thread_context,set_thread_context,i386_thread_added): Update.
12238 (the_low_target): Add entries for insert_point,
12239 remove_point, stopped_by_watchpoint, stopped_data_address.
12240 * win32-low.c (win32_insert_watchpoint): New function.
12241 (win32_remove_watchpoint): New function.
12242 (win32_stopped_by_watchpoint): New function.
12243 (win32_stopped_data_address): New function.
12244 (win32_target_ops): Add entries for insert_watchpoint,
12245 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12246 * win32-low.h (win32_target_ops): New members insert_point,
12247 remove_point, stopped_by_watchpoint, stopped_data_address.
12248
d993e290
PA
122492009-06-25 Pedro Alves <pedro@codesourcery.com>
12250
12251 * server.c (process_serial_event): Re-return unsupported, not
12252 error, if the type isn't recognized. Re-allow supporting only
12253 insert or remove packets. Also call require_running for
12254 breakpoints. Add missing break statement to default case. Tidy.
12255 * target.h (struct target_ops): Rename insert_watchpoint to
12256 insert_point, and remove_watchpoint to remove_point.
12257
12258 * linux-low.h (struct linux_target_ops): Likewise.
12259 * linux-low.c (linux_insert_watchpoint): Rename to ...
12260 (linux_insert_point): ... this. Adjust.
12261 (linux_remove_watchpoint): Rename to ...
12262 (linux_remove_point): ... this. Adjust.
12263 (linux_target_ops): Adjust.
12264 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12265 (cris_insert_point): ... this.
12266 (cris_remove_watchpoint): Rename to ...
12267 (cris_remove_point): ... this.
12268 (the_low_target): Adjust.
12269
0f54c268
PM
122702009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12271
12272 * server.c (handle_v_kill): Pass signal_pid to
12273 kill_inferior if multi_process is zero.
12274
c6314022
AR
122752009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12276
12277 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12278 * target.h (target_ops): Comment for *_watchpoint to make it clear
12279 the functions can get types '0' and '1'.
12280
4463ce24
AR
122812009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12282
12283 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12284 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12285 * regcache.c (get_regcache): Likewise.
12286 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12287 * win32-low.c (child_fetch_inferior_registers): Remove check for
12288 regno 0.
12289
cf8fd78b
PA
122902009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12291 Pedro Alves <pedro@codesourcery.com>
12292
12293 * target.h (struct target_ops) <supports_multi_process>: New
12294 callback.
12295 (target_supports_multi_process): New.
12296 * server.c (handle_query): Even if GDB reports support, only
12297 enable multi-process if the target also supports it. Report
12298 multi-process support only if the target backend supports it.
12299 * linux-low.c (linux_supports_multi_process): New function.
12300 (linux_target_ops): Install it as target_supports_multi_process
12301 callback.
12302
47c0c975
DE
123032009-05-24 Doug Evans <dje@google.com>
12304
e09875d4
DE
12305 Global renaming of find_thread_pid to find_thread_ptid.
12306 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12307 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12308 All callers updated.
12309
e27d73f6
DE
12310 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12311 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12312 directly.
12313
47c0c975
DE
12314 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12315 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12316 (linux_resume_one_lwp): Ditto.
12317
2acc282a
DE
123182009-05-23 Doug Evans <dje@google.com>
12319
12320 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12321 from struct inferior_list_entry * to struct lwp_info *.
12322 All callers updated.
12323
9f1036c1
DE
123242009-05-13 Doug Evans <dje@google.com>
12325
12326 * linux-x86-low.c: Don't include assert.h.
12327 (x86_siginfo_fixup): Use fatal, not assert.
12328 (x86_arch_setup): Fix comment.
12329
d0722149
DE
123302009-05-12 Doug Evans <dje@google.com>
12331
12332 Biarch support for i386/amd64 gdbserver.
12333 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12334 Add linux-x86-low.c.
12335 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12336 (linux-x86-low.o): Add.
12337 * linux-x86-64-low.c: Delete.
12338 * linux-i386-low.c: Delete.
12339 * linux-x86-low.c: New file.
12340 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12341 linux-x86-low.o.
12342 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12343 linux-x86-low.o.
12344 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12345 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12346 (linux_child_pid_to_exec_file): New function.
12347 (elf_64_header_p, elf_64_file_p): New functions.
12348 (siginfo_fixup): New function.
12349 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12350 give target a chance to convert layout.
12351 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12352 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12353
fdeb2a12
DE
123542009-05-07 Doug Evans <dje@google.com>
12355
12356 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12357 (regsets_store_inferior_registers): Ditto.
12358
a6dbe5df
PA
123592009-05-06 Pedro Alves <pedro@codesourcery.com>
12360
12361 PR server/10048
12362
12363 * linux-low.c (must_set_ptrace_flags): Delete.
12364 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12365 of the global.
12366 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12367 `lwp->must_set_ptrace_flags' instead.
ba42693b 12368 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12369 (linux_wait_1): ... not here.
12370
5091eb23
DE
123712009-04-30 Doug Evans <dje@google.com>
12372
9f767825
DE
12373 * inferiors.c (started_inferior_callback): New function.
12374 (attached_inferior_callback): New function.
12375 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12376 * server.c (print_started_pid, print_attached_pid): New functions.
12377 (detach_or_kill_for_exit): New function.
12378 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12379 * server.h (have_started_inferiors_p): Declare.
12380 (have_attached_inferiors_p): Declare.
12381
5091eb23
DE
12382 * inferiors.c (remove_process): Fix memory leak, free process.
12383 * linux-low.c (linux_remove_process): New function.
12384 (linux_kill): Call it instead of remove_process.
12385 (linux_detach, linux_wait_1): Ditto.
12386
155c8968
PA
123872009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12388
12389 * configure.srv: Add x86 Windows CE target.
12390
7fe519cb
UW
123912009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12392
12393 * inferiors.c (get_thread_process): Make global.
12394 * server.h (get_thread_process): Add prototype.
12395 * thread-db.c (find_one_thread): Use get_thread_process
12396 instead of current_process.
12397 (thread_db_get_tls_address): Do not crash if called when
12398 thread layer is not yet initialized.
12399
5472f405
UW
124002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12401
12402 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12403 * spu-low.c (current_tid): Rename to ...
12404 (current_ptid): ... this.
12405 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12406 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12407 ptid_get_lwp (current_ptid) instead of current_tid.
12408 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12409 instead of current_tid. Use find_process_pid to verify pid
12410 argument is valid. Pass proper argument to remove_process.
12411 (spu_thread_alive): Compare current_ptid instead of current_tid.
12412 (spu_resume): Likewise.
12413
55ac2b99
PA
124142009-04-02 Pedro Alves <pedro@codesourcery.com>
12415
12416 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12417 variable.
12418
95954743
PA
124192009-04-01 Pedro Alves <pedro@codesourcery.com>
12420
12421 Implement the multiprocess extensions, and add linux multiprocess
12422 support.
12423
12424 * server.h (ULONGEST): Declare.
12425 (struct ptid, ptid_t): New.
12426 (minus_one_ptid, null_ptid): Declare.
12427 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12428 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12429 (struct inferior_list_entry): Change `id' type from unsigned from
12430 to ptid_t.
12431 (struct sym_cache, struct breakpoint, struct
12432 process_info_private): Forward declare.
12433 (struct process_info): Declare.
12434 (current_process): Declare.
12435 (all_processes): Declare.
12436 (initialize_inferiors): Declare.
12437 (add_thread): Adjust to use ptid_t.
12438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12439 (add_process, remove_process, find_thread_pid): Declare.
12440 (find_inferior_id): Adjust to use ptid_t.
12441 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12442 (multi_process): Declare.
12443 (push_event): Adjust to use ptid_t.
12444 (read_ptid, write_ptid): Declare.
12445 (prepare_resume_reply): Adjust to use ptid_t.
12446 (clear_symbol_cache): Declare.
12447 * inferiors.c (all_processes): New.
12448 (null_ptid, minus_one_ptid): New.
12449 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12450 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12451 (add_thread): Change unsigned long to ptid. Remove gdb_id
12452 parameter. Adjust.
12453 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12454 (gdb_id_to_thread): Rename to ...
12455 (find_thread_pid): ... this. Change unsigned long to ptid.
12456 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12457 (loaded_dll, pull_pid_from_list): Adjust.
12458 (add_process, remove_process, find_process_pid)
12459 (get_thread_process, current_process, initialize_inferiors): New.
12460 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12461 (struct target_waitstatus) <related_pid>: Ditto.
12462 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12463 return type to int.
12464 (struct target_ops) <join>: Add `pid' argument.
12465 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12466 (struct target_ops) <wait>: Add `ptid' field. Change return type
12467 to ptid.
12468 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12469 (mywait): Add `ptid' argument. Change return type to ptid_t.
12470 (target_pid_to_str): Declare.
12471 * target.c (set_desired_inferior): Adjust to use ptids.
12472 (mywait): Add new `ptid' argument. Adjust.
12473 (target_pid_to_str): New.
12474 * mem-break.h (free_all_breakpoints): Declare.
12475 * mem-break.c (breakpoints): Delelete.
12476 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12477 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12478 to use per-process breakpoint list.
12479 (free_all_breakpoints): New.
12480 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12481 (symbol_cache, all_symbols_looked_up): Delete.
12482 (hexchars): New.
12483 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12484 read_ptid): New.
12485 (prepare_resume_reply): Change ptid argument's type from unsigned
12486 long to ptid_t. Adjust. Implement W;process and X;process.
12487 (free_sym_cache, clear_symbol_cache): New.
12488 (look_up_one_symbol): Adjust to per-process symbol cache. *
12489 * server.c (cont_thread, general_thread, step_thread): Change type
12490 to ptid_t.
12491 (attached): Delete.
12492 (multi_process): New.
12493 (last_ptid): Change type to ptid_t.
12494 (struct vstop_notif) <ptid>: Change type to ptid_t.
12495 (queue_stop_reply, push_event): Change `ptid' argument's type to
12496 ptid_t.
12497 (discard_queued_stop_replies): Add `pid' argument.
12498 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12499 changes. Don't reference the `attached' global.
12500 (attach_inferior): Adjust to mywait interface changes.
12501 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12502 features. Handle and report "multiprocess+". Handle
12503 "qAttached:PID".
12504 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12505 changes.
12506 (handle_v_kill): New.
12507 (handle_v_stopped): Adjust to use target_pid_to_str.
12508 (handle_v_requests): Allow multiple attaches and runs when
12509 multiprocess extensions are in effect. Handle "vKill".
12510 (myresume): Adjust to use ptids.
12511 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12512 (handle_status): Adjust to discard_queued_stop_replies interface
12513 change.
12514 (first_thread_of, kill_inferior_callback)
12515 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12516 (main): Call initialize_inferiors. Adjust to use ptids, killing
12517 and detaching from all inferiors. Handle multiprocess packet
12518 variants.
12519 * linux-low.h: Include gdb_proc_service.h.
12520 (struct process_info_private): New.
12521 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12522 <lwpid_of>: Use ptid_get_lwp.
12523 (get_lwp_thread): Adjust.
12524 (struct lwp_info): Add `dead' member.
12525 (find_lwp_pid): Declare.
12526 * linux-low.c (thread_db_active): Delete.
12527 (new_inferior): Adjust comment.
12528 (inferior_pid): Delete.
12529 (linux_add_process): New.
12530 (handle_extended_wait): Adjust.
12531 (add_lwp): Change unsigned long to ptid.
12532 (linux_create_inferior): Add process to processes table. Adjust
12533 to use ptids. Don't set new_inferior here.
12534 (linux_attach_lwp): Rename to ...
12535 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12536 it. Adjust to use ptids.
12537 (linux_attach_lwp): New.
12538 (linux_attach): Add process to processes table. Don't set
12539 new_inferior here.
12540 (struct counter): New.
12541 (second_thread_of_pid_p, last_thread_of_process_p): New.
12542 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12543 multiple processes.
12544 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12545 processes. Remove process from process table.
12546 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12547 to multiple processes.
12548 (any_thread_of): New.
12549 (linux_detach): Add `pid' argument, and handle it. Remove process
12550 from processes table.
12551 (linux_join): Add `pid' argument. Handle it.
12552 (linux_thread_alive): Change unsighed long argument to ptid_t.
12553 Consider dead lwps as not being alive.
12554 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12555 threads we're not interested in.
12556 (same_lwp, find_lwp_pid): New.
12557 (linux_wait_for_lwp): Change `pid' argument's type from int to
12558 ptid_t. Adjust.
12559 (linux_wait_for_event): Rename to ...
12560 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12561 from int to ptid_t. Adjust.
12562 (linux_wait_for_event): New.
12563 (linux_wait_1): Add `ptid' argument. Change return type to
12564 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12565 that exit from the process table.
12566 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12567 Adjust.
12568 (mark_lwp_dead): New.
12569 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12570 stopping all threads, mark its main lwp as dead.
12571 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12572 ptids.
12573 (fetch_register, usr_store_inferior_registers)
12574 (regsets_fetch_inferior_registers)
12575 (regsets_store_inferior_registers, linux_read_memory)
12576 (linux_write_memory): Inline `inferior_pid'.
12577 (linux_look_up_symbols): Adjust to use per-process
12578 `thread_db_active'.
12579 (linux_request_interrupt): Adjust to use ptids.
12580 (linux_read_auxv): Inline `inferior_pid'.
12581 (initialize_low): Don't reference thread_db_active.
12582 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12583 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12584 (ps_getpid): Return the pid of the current inferior.
12585 * thread-db.c (proc_handle, thread_agent): Delete.
12586 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12587 per-process data.
12588 (find_one_thread): Change argument type to ptid_t. Adjust to
12589 per-process data.
12590 (maybe_attach_thread): Adjust to per-process data and ptids.
12591 (thread_db_find_new_threads): Ditto.
12592 (thread_db_init): Ditto.
12593 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12594 processes table. Adjust to use ptids.
12595 (spu_kill, spu_detach): Adjust interface. Remove process from
12596 processes table.
12597 (spu_join, spu_thread_alive): Adjust interface.
12598 (spu_wait): Adjust interface. Remove process from processes
12599 table. Adjust to use ptids.
12600 * win32-low.c (current_inferior_tid): Delete.
12601 (current_inferior_ptid): New.
12602 (debug_event_ptid): New.
12603 (thread_rec): Take a ptid. Adjust.
12604 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12605 (child_delete_thread): Ditto.
12606 (do_initial_child_stuff): Add `attached' argument. Add process to
12607 processes table.
12608 (child_fetch_inferior_registers, child_store_inferior_registers):
12609 Adjust.
12610 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12611 (win32_attach): Pass 1 to do_initial_child_stuff.
12612 (win32_kill): Adjust interface. Remove process from processes
12613 table.
12614 (win32_detach): Ditto.
12615 (win32_join): Adjust interface.
12616 (win32_thread_alive): Take a ptid.
12617 (win32_resume): Adjust to use ptids.
12618 (get_child_debug_event): Ditto.
12619 (win32_wait): Adjust interface. Remove exiting process from
12620 processes table.
12621
bd99dc85
PA
126222009-04-01 Pedro Alves <pedro@codesourcery.com>
12623
12624 Non-stop mode support.
12625
12626 * server.h (non_stop): Declare.
12627 (gdb_client_data, handler_func): Declare.
12628 (delete_file_handler, add_file_handler, start_event_loop):
12629 Declare.
12630 (handle_serial_event, handle_target_event, push_event)
12631 (putpkt_notif): Declare.
12632 * target.h (enum resume_kind): New.
12633 (struct thread_resume): Replace `step' field by `kind' field.
12634 (TARGET_WNOHANG): Define.
12635 (struct target_ops) <wait>: Add `options' argument.
12636 <supports_non_stop, async, start_non_stop>: New fields.
12637 (target_supports_non_stop, target_async): New.
12638 (start_non_stop): Declare.
12639 (mywait): Add `options' argument.
12640 * target.c (mywait): Add `options' argument. Print child exit
12641 notifications here.
12642 (start_non_stop): New.
12643 * server.c (non_stop, own_buf, mem_buf): New globals.
12644 (struct vstop_notif): New.
12645 (notif_queue): New global.
12646 (queue_stop_reply, push_event, discard_queued_stop_replies)
12647 (send_next_stop_reply): New.
12648 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12649 interface changes.
12650 (attach_inferior): In non-stop mode, don't wait for the target
12651 here.
12652 (handle_general_set): Handle QNonStop.
12653 (handle_query): When handling qC, return the current general
12654 thread, instead of the first thread of the list.
12655 (handle_query): If the backend supports non-stop mode, include
12656 QNonStop+ in the qSupported query response.
12657 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12658 and non-stop mode.
12659 (handle_v_attach, handle_v_run): Handle non-stop mode.
12660 (handle_v_stopped): New.
12661 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12662 (myresume): Adjust to use resume_kind. Handle non-stop.
12663 (queue_stop_reply_callback): New.
12664 (handle_status): Handle non-stop mode.
12665 (main): Clear non_stop flag on reconnection. Use the event-loop.
12666 Refactor serial protocol handling from here ...
12667 (process_serial_event): ... to this new function. When GDB
12668 selects any thread, select one here. In non-stop mode, wait until
12669 GDB acks all pending events before exiting.
12670 (handle_serial_event, handle_target_event): New.
12671 * remote-utils.c (remote_open): Install remote_desc in the event
12672 loop.
12673 (remote_close): Remove remote_desc from the event loop.
12674 (putpkt_binary): Rename to...
12675 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12676 (putpkt_binary): New as wrapper around putpkt_binary_1.
12677 (putpkt_notif): New.
12678 (prepare_resume_reply): In non-stop mode, don't change the
12679 general_thread.
12680 * event-loop.c: New.
12681 * Makefile.in (OBJ): Add event-loop.o.
12682 (event-loop.o): New rule.
12683
12684 * linux-low.h (pid_of): Moved here.
12685 (lwpid_of): New.
12686 (get_lwp_thread): Use lwpid_of.
12687 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12688 * linux-low.c (pid_of): Delete.
12689 (inferior_pid): Use lwpid_of.
12690 (linux_event_pipe): New.
12691 (target_is_async_p): New.
12692 (delete_lwp): New.
12693 (handle_extended_wait): Use lwpid_of.
12694 (add_lwp): Don't set lwpid field.
12695 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12696 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12697 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12698 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12699 first. Adjust to linux_wait_for_event interface changes. Use
12700 lwpid_of.
12701 (linux_detach): Don't delete the main lwp here.
12702 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12703 (status_pending_p): Don't consider explicitly suspended lwps.
12704 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12705 pointer. Add OPTIONS argument. Change return type to int. Use
12706 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12707 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12708 pointer. Add status pointer argument. Return a pid instead of a
12709 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12710 changes. In non-stop mode, don't switch to a random thread.
12711 (linux_wait): Rename to...
12712 (linux_wait_1): ... this. Add target_options argument, and handle
12713 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12714 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12715 clean exit and signal exit code. Don't stop all threads in
12716 non-stop mode. In all-stop mode, only stop all threads when
12717 reporting a stop to GDB. Handle explicit thread stop requests.
12718 (async_file_flush, async_file_mark): New.
12719 (linux_wait): New.
12720 (send_sigstop): Use lwpid_of.
12721 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12722 interface changes. In non-stop mode, don't switch to a random
12723 thread.
12724 (linux_resume_one_lwp): Use lwpid_of.
12725 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12726 (linux_resume_one_thread): ... this. Handle resume_stop. In
12727 non-stop mode, don't look for pending flag in all threads.
12728 (resume_status_pending_p): Don't consider explicitly suspended
12729 threads.
12730 (my_waitpid): Reimplement. Emulate __WALL.
12731 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12732 Use lwpid_of.
12733 (sigchld_handler, linux_supports_non_stop, linux_async)
12734 (linux_start_non_stop): New.
12735 (linux_target_ops): Register linux_supports_non_stop, linux_async
12736 and linux_start_non_stop.
12737 (initialize_low): Install SIGCHLD handler.
12738 * thread-db.c (thread_db_create_event, find_one_thread)
12739 (thread_db_get_tls_address): Use lwpid_of.
12740 * win32-low.c (win32_detach): Adjust to use resume_kind.
12741 (win32_wait): Add `options' argument.
12742 * spu-low.c (spu_resume): Adjust to use resume_kind.
12743 (spu_wait): Add `options' argument.
12744
5b1c542e
PA
127452009-04-01 Pedro Alves <pedro@codesourcery.com>
12746
12747 Decouple target code from remote protocol.
12748
12749 * target.h (enum target_waitkind): New.
12750 (struct target_waitstatus): New.
12751 (struct target_ops) <wait>: Return an unsigned long. Take a
12752 target_waitstatus pointer instead of a char pointer.
12753 (mywait): Likewise.
12754 * target.c (mywait): Change prototype to return an unsigned long.
12755 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12756 * server.h (thread_from_wait, old_thread_from_wait): Delete
12757 declarations.
12758 (prepare_resume_reply): Change prototype to take a
12759 target_waitstatus.
12760 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12761 (last_status, last_ptid): New.
12762 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12763 pid instead of a signal.
12764 (attach_inferior): Remove "status" and "signal" parameters.
12765 Adjust.
12766 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12767 not as an address.
12768 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12769 (handle_v_requests, myresume): Remove "status" and "signal"
12770 parameters. Adjust.
12771 (handle_status): New.
12772 (main): Delete local `status'. Adjust.
12773 * remote-utils.c: Include target.h.
12774 (prepare_resume_reply): Change prototype to take a
12775 target_waitstatus. Adjust.
12776
12777 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12778 interface.
12779 * spu-low.c (spu_wait): Adjust.
12780 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12781 Delete.
12782 (win32_wait): Adjust.
12783
2bd7c093
PA
127842009-04-01 Pedro Alves <pedro@codesourcery.com>
12785
12786 * target.h (struct thread_resume): Delete leave_stopped member.
12787 (struct target_ops): Add a `n' argument to the `resume' callback.
12788 * server.c (start_inferior): Adjust.
12789 (handle_v_cont, myresume): Adjust.
12790 * linux-low.c (check_removed_breakpoint): Adjust to resume
12791 interface change, and to removed leave_stopped field.
12792 (resume_ptr): Delete.
12793 (struct thread_resume_array): New.
12794 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12795 resume interface change.
12796 (linux_continue_one_thread, linux_queue_one_thread)
12797 (resume_status_pending_p): Check if the resume field is NULL
12798 instead of checking the leave_stopped member.
12799 (linux_resume): Adjust to the target resume interface change.
12800 * spu-low.c (spu_resume): Adjust to the target resume interface
12801 change.
12802 * win32-low.c (win32_detach, win32_resume): Ditto.
12803
c35fafde
PA
128042009-04-01 Pedro Alves <pedro@codesourcery.com>
12805
12806 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12807 flag.
12808 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12809 pending.
12810 (linux_continue_one_thread): Only preserve the stepping flag if
12811 there's a pending breakpoint.
12812
0a59d50b
PA
128132009-03-31 Pedro Alves <pedro@codesourcery.com>
12814
12815 * server.c (main): After the inferior having exited, call
12816 remote_close before exiting gdbserver.
12817
f04c6d38
TJB
128182009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12819
12820 Fix size of FPSCR in Power 7 processors.
12821 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12822 (PPC_FEATURE_HAS_DFP): New #define.
12823 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12824 size of the FPSCR.
12825
78e5cee6
PA
128262009-03-23 Pedro Alves <pedro@codesourcery.com>
12827
12828 * server.c (handle_query) Whitespace and formatting.
12829
1b3f6016
PA
128302009-03-22 Pedro Alves <pedro@codesourcery.com>
12831
12832 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12833 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12834 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12835 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12836 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12837 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12838 Makefile.in, configure.ac: Fix whitespace throughout.
12839 * configure: Regenerate.
12840
a07b2135
PA
128412009-03-22 Pedro Alves <pedro@codesourcery.com>
12842
12843 * inferiors.c (find_inferior): Make it safe for the callback
12844 function to delete the currently iterated inferior.
12845
67cc2626
PA
128462009-03-22 Pedro Alves <pedro@codesourcery.com>
12847
12848 * Makefile.in (linuw_low_h): Move higher.
12849 (thread-db.o): Depend on $(linux_low_h).
12850
54a0b537
PA
128512009-03-17 Pedro Alves <pedro@codesourcery.com>
12852
12853 Rename "process" to "lwp" throughout.
12854
12855 * linux-low.c (all_processes): Rename to...
12856 (all_lwps): ... this.
12857 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12858 (add_process): Rename to ...
12859 (add_lwp): ... this. Adjust.
12860 (linux_create_inferior): Adjust.
12861 (linux_attach_lwp): Adjust.
12862 (linux_attach): Adjust.
12863 (linux_kill_one_process): Rename to ...
12864 (linux_kill_one_lwp): ... this. Adjust.
12865 (linux_kill): Adjust.
12866 (linux_detach_one_process): Rename to ...
12867 (linux_detach_one_lwp): ... this. Adjust.
12868 (linux_detach): Adjust.
12869 (check_removed_breakpoint): Adjust.
12870 (status_pending_p): Adjust.
12871 (linux_wait_for_process): Rename to ...
12872 (linux_wait_for_lwp): ... this. Adjust.
12873 (linux_wait_for_event): Adjust.
12874 (send_sigstop): Adjust.
12875 (wait_for_sigstop): Adjust.
12876 (stop_all_processes): Rename to ...
12877 (stop_all_lwps): ... this.
12878 (linux_resume_one_process): Rename to ...
12879 (linux_resume_one_lwp): ... this. Adjust.
12880 (linux_set_resume_request, linux_continue_one_thread)
12881 (linux_queue_one_thread, resume_status_pending_p)
12882 (usr_store_inferior_registers, regsets_store_inferior_registers)
12883 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12884 Adjust.
12885 * linux-low.h (get_process): Rename to ...
12886 (get_lwp): ... this. Adjust.
12887 (get_thread_process): Rename to ...
12888 (get_thread_lwp): ... this. Adjust.
12889 (get_process_thread): Rename to ...
12890 (get_lwp_thread): ... this. Adjust.
12891 (struct process_info): Rename to ...
12892 (struct lwp_info): ... this.
12893 (all_processes): Rename to ...
12894 (all_lwps): ... this.
12895 * proc-service.c (ps_lgetregs): Adjust.
12896 * thread-db.c (thread_db_create_event, find_one_thread)
12897 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12898
0b16c5cf
PA
128992009-03-14 Pedro Alves <pedro@codesourcery.com>
12900
12901 * server.c (handle_query): Handle "qAttached".
12902
32de4b9d
NS
129032009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12904
12905 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12906 GPLv3, update license URL.
12907
2aecd87f
DE
129082009-03-01 Doug Evans <dje@google.com>
12909
93efd302 12910 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12911 (server_h): Add gdb_signals.h.
12912 (signals.o): Update.
12913 * server.h (target_signal_from_host,target_signal_to_host_p)
12914 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12915
86b1f9c5
PM
129162009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12917
12918 * remote-utils.c (getpkt): Also generate remote-debug
12919 information if noack_mode is set.
12920
4aa995e1
PA
129212009-02-06 Pedro Alves <pedro@codesourcery.com>
12922
12923 * server.c (handle_query): Report qXfer:siginfo:read and
12924 qXfer:siginfo:write as supported and handle them.
12925 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12926 * linux-low.c (linux_xfer_siginfo): New.
12927 (linux_target_ops): Set it.
12928
62709adf
PA
129292009-01-26 Pedro Alves <pedro@codesourcery.com>
12930
12931 * server.c (gdbserver_usage): Mention --remote-debug.
12932 (main): Accept '--remote-debug' switch.
12933
aef93bd7
DE
129342009-01-18 Doug Evans <dje@google.com>
12935
12936 * regcache.c (new_register_cache): No need to check result of xcalloc.
12937 * server.c (handle_search_memory): Back out calls to xmalloc,
12938 result is checked and error is returned to user upon failure.
12939 (handle_query): Ditto. Add more checks for result of malloc.
12940 (handle_v_cont): Check result of malloc, report error back to
12941 user upon failure.
12942 (handle_v_run): Ditto. Call freeargv.
12943 * server.h (freeargv): Declare.
12944 * utils.c (freeargv): New fn.
12945
54363045
DE
129462009-01-15 Doug Evans <dje@google.com>
12947
f626972c
DE
12948 * gdbreplay.c (perror_with_name): Make arg const char *.
12949 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12950 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12951 * utils.c (perror_with_name): Make arg const char *.
54363045 12952
18aae699
PA
129532009-01-14 Pedro Alves <pedro@codesourcery.com>
12954
12955 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12956 when handling a EXIT_PROCESS_DEBUG_EVENT.
12957
ff703abe
JB
129582009-01-06 Joel Brobecker <brobecker@adacore.com>
12959
12960 * gdbreplay.c (gdbreplay_version): Update copyright year.
12961 * server.c (gdbserver_version): Likewise.
12962
f21cc1a2 129632009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12964
12965 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12966 (handle_extended_wait): Improve comment.
0e21c1ec 12967
bca929d3
DE
129682008-12-13 Doug Evans <dje@google.com>
12969
12970 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12971 * server.h (ATTR_MALLOC): New macro.
12972 (xmalloc,xcalloc,xstrdup): Declare.
12973 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12974 * inferiors.c: Ditto.
12975 * linux-low.c: Ditto.
12976 * mem-break.c: Ditto.
12977 * regcache.c: Ditto.
12978 * remote-utils.c: Ditto.
12979 * server.c: Ditto.
12980 * target.c: Ditto.
12981 * win32-low.c: Ditto.
12982
97438e3f
DE
129832008-12-12 Doug Evans <dje@google.com>
12984
896c7fbb
DE
12985 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12986 in debugging printf.
12987
97438e3f
DE
12988 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12989
e3b886f8
DE
129902008-12-09 Doug Evans <dje@google.com>
12991
12992 * linux-low.h (struct process_info): Delete member tid, unused.
12993 * thread-db.c (find_one_thread): Update.
12994 (maybe_attach_thread): Update.
12995
07e059b5
VP
129962008-12-02 Pedro Alves <pedro@codesourcery.com>
12997
889bf7c5
PA
12998 * target.h (struct target_ops): Add qxfer_osdata member.
12999 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13000 and dirent.h.
13001 (linux_qxfer_osdata): New functions.
13002 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13003 callback.
13004 * server.c (handle_query): Handle "qXfer:osdata:read:".
13005 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13006 (buffer_xml_printf): New functions.
13007 * server.h (struct buffer): New.
13008 (buffer_grow_str, buffer_grow_str0): New macros.
13009 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13010 (buffer_xml_printf): Declare.
07e059b5 13011
4cab47ab
DE
130122008-11-24 Doug Evans <dje@google.com>
13013
13014 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13015
f142445f
DJ
130162008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13017
13018 * server.c (handle_v_run): Always use the supplied argument list.
13019
d0107bb6 130202008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13021
d0107bb6
BW
13022 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13023 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13024
2c4ad781
TJB
130252008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13026
13027 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13028 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13029 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13030 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13031 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13032 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13033 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13034 XML target descriptions.
13035 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13036 when inferior is running on an ISA 2.05 or later processor. Add
13037 special case to return offset for full 64-bit slot of FPSCR when
13038 in 32-bits.
13039
dfb64f85
DJ
130402008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13041
13042 * Makefile.in (SFILES, clean): Added sparc64 files.
13043 (reg-sparc64.o, reg-sparc64.c): New.
13044 * configure.srv (sparc*-*-linux*): New configuration.
13045 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13046 syscall arguments for SPARC.
13047 (regsets_store_inferior_registers): Likewise.
13048 * linux-sparc-low.c: New file.
13049
66b6e1dd
DE
130502008-10-21 Doug Evans <dje@google.com>
13051
13052 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13053 (READLINE_DIR,READLINE_DEP): Delete.
13054 (INTERNAL_CFLAGS): Update.
13055 (LINTFLAGS): Update.
13056
9b710a42
PA
130572008-10-10 Pedro Alves <pedro@codesourcery.com>
13058
13059 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13060 whole argv from the last run, not just argv[0].
13061
5822d809
PA
130622008-09-08 Pedro Alves <pedro@codesourcery.com>
13063
13064 * regcache.c (new_register_cache): Return NULL if the register
13065 cache size isn't known yet.
13066 (free_register_cache): Avoid dereferencing a NULL regcache.
13067
74aac56f
DJ
130682008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13069
13070 * configure.srv: Merge MIPS and MIPS64.
13071
400b20f5
MR
130722008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13073
13074 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13075
677c5bb1
LM
130762008-08-18 Luis Machado <luisgpm@br.ibm.com>
13077
13078 * Makefile.in: Add required vsx dependencies.
13079
13080 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13081 Declare init_registers_powerpc_vsx32l.
13082 Declare init_registers_powerpc_vsx64l.
13083 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13084 (ppc_arch_setup): Check for VSX in hwcap.
13085 (ppc_fill_vsxregset): New function.
13086 (ppc_store_vsxregset): New function.
13087 Add new VSX entry in regset_info target_regsets.
13088
13089 * configure.srv: Add new VSX dependencies.
13090
a6f3e723
SL
130912008-08-12 Pedro Alves <pedro@codesourcery.com>
13092
13093 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13094 (remote_open): Set or clear transport_is_reliable.
13095 (putpkt_binary): Don't expect acks in noack mode.
13096 (getpkt): Don't send ack/nac in noack mode.
13097 * server.c (handle_general_set): Handle QStartNoAckMode.
13098 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13099 qSupported.
13100 (main): Reset noack_mode on every connection.
13101 * server.h (noack_mode): Declare.
13102
a417dc56
RW
131032008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13104
13105 * Makefile.in (GDBREPLAY_OBS): New variable.
13106 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13107
3221518c
UW
131082008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13109 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13112 (usr_store_inferior_registers): Likewise.
13113 (regsets_store_inferior_registers): Likewise.
13114
ec56be1b
PA
131152008-07-31 Rolf Jansen <rj@surtec.com>
13116 Pedro Alves <pedro@codesourcery.com>
13117
13118 * configure.ac: Check for memmem declaration.
13119 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13120 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13121 (disable_packet_qfThreadInfo): Unconditionally compile.
13122 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13123 * configure, config.in: Regenerate.
13124
2fe5e3ff
DE
131252008-07-28 Doug Kwan <dougkwan@google.com>
13126
13127 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13128 (linux_write_memory): Remove declaration of errno.
13129
836acd6d
UW
131302008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13131
13132 * linux-low.c (handle_extended_wait): Do not use "status"
13133 variable uninitialized.
13134
aeba519e
PA
131352008-07-07 Pedro Alves <pedro@codesourcery.com>
13136
13137 * server.c (handle_v_attach): Inhibit reporting dll changes.
13138
db42f210
PA
131392008-06-27 Pedro Alves <pedro@codesourcery.com>
13140
13141 * remote-utils.c (prepare_resume_reply): If requested, don't
13142 output "thread:TID" in the T stop reply.
13143
13144 * server.c (disable_packet_vCont, disable_packet_Tthread)
13145 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13146 (handle_query): If requested, disable support for qC, qfThreadInfo
13147 and qsThreadInfo.
13148 (handle_v_requests): If requested, disable support for vCont.
13149 (gdbserver_show_disableable): New.
13150 (main): Handle --disable-packet and --disable-packet=LIST.
13151
13152 * server.h (disable_packet_vCont, disable_packet_Tthread)
13153 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13154
8e4c5421
CD
131552008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13156
13157 * server.c (gdbserver_usage): Mention --version.
13158
6e23a804
DJ
131592008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13160
13161 * Makefile.in (gdbreplay.o): New rule.
13162
90aa6a40
JM
131632008-06-06 Joseph Myers <joseph@codesourcery.com>
13164
13165 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13166 message, not gdbserver.
13167
c16158bc 131682008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13169 Nathan Sidwell <nathan@codesourcery.com>
13170 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13171
13172 * acinclude.m4: Include ../../config/acx.m4.
13173 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13174 * configure, config.in: Regenerate.
13175 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13176 * server.c (gdbserver_version): Print PKGVERSION.
13177 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13178 (main): Adjust gdbserver_usage calls.
13179 * gdbreplay.c (version, host_name): Add declarations.
13180 (gdbreplay_version, gdbreplay_usage): New.
13181 (main): Accept --version and --help options.
13182
aeb75bf5
DJ
131832008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13184
13185 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13186 (arm_breakpoint_at): Handle Thumb.
13187 (the_low_target): Add comment.
13188
76b233dd
UW
131892008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13190
13191 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13192
08388c79
DE
131932008-05-09 Doug Evans <dje@google.com>
13194
a3c83fae
DE
13195 * server.h (decode_search_memory_packet): Declare.
13196 * remote-utils.c (decode_search_memory_packet): New fn.
13197 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13198 (handle_search_memory): New fn.
13199 (handle_query): Process qSearch:memory packets.
13200
bb9c3d36
UW
132012008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13202
13203 * regcache.c (registers_length): Remove.
13204 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13205 full register packet.
13206 * regcache.h (registers_length): Remove prototype.
13207 * server.h (PBUFSIZ): Define to 16384.
13208
7284e1be
UW
132092008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13210
13211 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13212 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13213 powerpc-64l.o, and powerpc-altivec64l.o.
13214 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13215 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13216 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13217 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13218 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13219 to srv_xmlfiles.
13220
13221 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13222 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13223 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13224 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13225 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13226 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13227 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13228 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13229 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13230 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13231 (clean): Update.
13232
13233 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13234 (init_registers_powerpc_32l): ... this new prototype.
13235 (init_registers_powerpc_32): Remove, replace by ...
13236 (init_registers_powerpc_altivec32l): ... this new prototype.
13237 (init_registers_powerpc_e500): Remove, replace by ...
13238 (init_registers_powerpc_e500l): ... this new prototype.
13239 (init_registers_ppc64): Remove, replace by ...
13240 (init_registers_powerpc_64l): ... this new prototype.
13241 (init_registers_powerpc_64): Remove, replace by ...
13242 (init_registers_powerpc_altivec64l): ... this new prototype.
13243 (ppc_num_regs): Set to 73.
13244 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13245 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13246 (ppc_cannot_store_register): Handle orig_r3 and trap.
13247 (ppc_arch_setup): Update init_registers_... calls.
13248 (ppc_fill_gregset): Handle orig_r3 and trap.
13249
13250 * inferiors.c (clear_inferiors): Reset current_inferior.
13251
fdc59709
PB
132522008-04-23 Paolo Bonzini <bonzini@gnu.org>
13253
889bf7c5
PA
13254 * acinclude.m4: Add override.m4.
13255 * configure: Regenerate.
fdc59709 13256
c9b2f845
UW
132572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13258
13259 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13260 initial call to init_register_ppc64.
13261
550512b8
UW
132622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13263
43aaf8b6
PA
13264 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13265 single powerpc*-*-linux* case.
550512b8
UW
13266 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13267
b6430ec3
UW
132682008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13271 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13272 from reg_xmlfiles.
13273 * linux-ppc-low.c: Include <elf.h>.
13274 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13275 (ppc_hwcap): New global variable.
13276 (ppc_regmap): Remove __SPE__ #ifdef sections.
13277 (ppc_regmap_e500): New global variable.
13278 (ppc_cannot_store_register): Update __SPE__ special case.
13279 (ppc_get_hwcap): New function.
13280 (ppc_arch_setup): Use it to determine whether inferior supports
13281 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13282 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13283 Do not access registers if target does not support AltiVec.
13284 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13285 Do not access registers if target does not support SPE.
13286 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13287
52fa2412
UW
132882008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * linux-low.c (disabled_regsets, num_regsets): New.
13291 (use_regsets_p): Delete.
13292 (linux_wait_for_process): Clear disabled_regsets.
13293 (regsets_fetch_inferior_registers): Check and set it.
13294 (regsets_store_inferior_registers): Likewise.
13295 (linux_fetch_registers, linux_store_registers): Do not use
13296 use_regsets_p.
13297 (initialize_low): Allocate disabled_regsets.
13298
e28b3332
DJ
132992008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13300
13301 * Makefile.in (LIBOBJS): New.
13302 (OBS): Use LIBOBJS.
13303 (memmem.o): New rule.
13304 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13305 * configure: Regenerated.
13306
4536995d
UW
133072008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13308
13309 * server.c (handle_query): Never return "unsupported" for
13310 qXfer:features:read queries.
13311
221c031f
UW
133122008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13313
13314 * server.c (get_features_xml): Fix inverted condition.
13315 (handle_query): Always support qXfer:feature:read.
13316
ccd213ac
DJ
133172008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13318
13319 * server.c (wrapper_argv): New.
13320 (start_inferior): Handle wrapper_argv. If set, expect an extra
13321 trap.
13322 (gdbserver_usage): Document --wrapper.
13323 (main): Parse --wrapper.
13324
6fe305f7
UW
133252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13326
13327 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13328 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13329 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13330 (ppc_set_pc): Likewise.
13331 (ppc_arch_setup): New function.
13332 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13333 of collect_register.
889bf7c5 13334 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13335
5b0a002e
UW
133362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13337
13338 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13339 instead of linux-ppc64-low.o.
13340 * linux-ppc64-low.c: Remove file.
13341 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13342 (linux-ppc64-low.o): Remove rule.
13343
13344 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13345 (init_registers_powerpc_64): Likewise.
13346 (ppc_regmap): Conditionally define depending on __powerpc64__.
13347 (ppc_cannot_store_register): Do not special-case "fpscr" when
13348 compiled on __powerpc64__.
13349 (ppc_collect_ptrace_register): New function.
13350 (ppc_supply_ptrace_register): New function.
13351 (ppc_breakpoint): Change type to "unsigned int".
13352 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13353 (the_low_target): Conditionally provide initializers for the
889bf7c5 13354 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13355 collect_ptrace_register and supply_ptrace_register members.
13356
9b4b61c8
UW
133572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13358
13359 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13360 * server.c (gdbserver_xmltarget): Define.
13361 (get_features_xml): Use it to replace "target.xml" and arch_string.
13362
13363 * configure.srv: Remove srv_xmltarget. Add XML files that were
13364 mentioned there to srv_xmlfiles instead. Remove conditional tests
13365 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13366 srv_xmlfiles and srv_regobj to include all possible choices.
13367 * configure.ac (srv_xmltarget): Remove.
13368 (srv_xmlfiles): Do not add "target.xml".
13369 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13370 checks for supplementary target information.
13371 * configure: Regenerate.
13372 * Makefile.in (XML_TARGET): Remove.
13373 (target.xml): Remove rule.
13374 (clean): Do not clean up target.xml.
13375 (.PRECIOUS): Do not mention target.xml.
13376
13377 * target.h (struct target_ops): Remove arch_string member.
13378 * linux-low.c (linux_arch_string): Remove.
13379 (linux_target_ops): Remove arch_string initializer.
13380 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13381 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13382 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13383 * spu-low.c (spu_arch_string): Remove.
13384 (spu_target_ops): Remove arch_string initializer.
13385 * win32-low.c (win32_arch_string): Remove.
13386 (win32_target_ops): Remove arch_string initializer.
13387 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13388 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13389 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13390
ee1a7ae4
UW
133912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13392
13393 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13394 by collect_ptrace_register and supply_ptrace_register hooks.
13395 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13396 instead of checking for the_low_target.left_pad_xfer.
13397 (usr_store_inferior_registers): Use collect_ptrace_register callback
13398 instead of checking for the_low_target.left_pad_xfer.
13399
13400 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13401 (s390_supply_ptrace_register): Likewise.
13402 (s390_fill_gregset): Call s390_collect_ptrace_register.
13403 (the_low_target): Update.
13404
13405 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13406 (ppc_supply_ptrace_register): Likewise.
13407 (the_low_target): Update.
13408
13409 * linux-i386-low.c (the_low_target): Update.
13410 * linux-x86-64-low.c (the_low_target): Update.
13411
d61ddec4
UW
134122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13413
13414 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13415 reg-s390.o and reg-s390x.o.
13416
13417 * linux-low.c (new_inferior): New global variable.
13418 (linux_create_inferior, linux_attach): Set it.
13419 (linux_wait_for_process): Call the_low_target.arch_setup after the
13420 target has stopped for the first time.
13421 (initialize_low): Do not call the_low_target.arch_setup.
13422
13423 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13424 (s390_set_pc): Likewise.
13425 (s390_arch_setup): New function.
13426 (the_low_target): Use s390_arch_setup as arch_setup routine.
13427
13428 * regcache.c (realloc_register_cache): New function.
13429 (set_register_cache): Call it for each existing regcache.
13430
d05b4ac3
UW
134312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13432
13433 * server.h (init_registers): Remove prototype.
13434
13435 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13436 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13437 instead of init_registers ().
13438 * linux-arm-low.c (init_registers_arm): Add prototype.
13439 (init_registers_arm_with_iwmmxt): Likewise.
13440 (the_low_target): Add initializer for arch_setup field.
13441 * linux-cris-low.c (init_registers_cris): Add prototype.
13442 (the_low_target): Add initializer for arch_setup field.
13443 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13444 (the_low_target): Add initializer for arch_setup field.
13445 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13446 (the_low_target): Add initializer for arch_setup field.
13447 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13448 (the_low_target): Add initializer for arch_setup field.
13449 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13450 (the_low_target): Add initializer for arch_setup field.
13451 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13452 (the_low_target): Add initializer for arch_setup field.
13453 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13454 (init_registers_mips64_linux): Likewise.
13455 (the_low_target): Add initializer for arch_setup field.
13456 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13457 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13458 (the_low_target): Add initializer for arch_setup field.
13459 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13460 (init_registers_powerpc_64): Likewise.
13461 (the_low_target): Add initializer for arch_setup field.
13462 * linux-s390-low.c (init_registers_s390): Add prototype.
13463 (init_registers_s390x): Likewise.
13464 (the_low_target): Add initializer for arch_setup field.
13465 * linux-sh-low.c (init_registers_sh): Add prototype.
13466 (the_low_target): Add initializer for arch_setup field.
13467 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13468 (the_low_target): Add initializer for arch_setup field.
13469 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13470 (the_low_target): Add initializer for arch_setup field.
13471
13472 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13473 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13474 instead of init_registers ().
13475 * win32-arm-low.c (init_registers_arm): Add prototype.
13476 (the_low_target): Add initializer for arch_setup field.
13477 * win32-i386-low.c (init_registers_i386): Add prototype.
13478 (the_low_target): Add initializer for arch_setup field.
13479
13480 * spu-low.c (init_registers_spu): Add prototype.
13481 (initialize_low): Call initialie_registers_spu () instead of
13482 initialize_registers ().
13483
fd96d250
PA
134842008-02-19 Pedro Alves <pedro@codesourcery.com>
13485
13486 * server.c (handle_v_requests): When handling the vRun and vAttach
13487 packets, if already debugging a process, don't kill it. Return an
13488 error instead.
13489
d41b6bb4
DJ
134902008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13491
13492 * server.c (handle_query): Correct length check.
13493
5ac588cf
PA
134942008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13495
13496 * win32-low.c (do_initial_child_stuff): Add process handle
13497 parameter. Set current_process_handle and current_process_id from the
13498 parameters. Clear globals.
13499 (win32_create_inferior): Don't set current_process_handle and
13500 current_process_id here. Instead pass them on the call to
13501 do_initial_child_stuff.
13502 (win32_attach): Likewise.
13503 (win32_clear_inferiors): New.
13504 (win32_kill): Don't close the current process handle or the
13505 current thread handle here. Instead call win32_clear_inferiors.
13506 (win32_detach): Don't open a new handle to the process. Call
13507 win32_clear_inferiors.
13508 (win32_join): Don't rely on current_process_handle; open a new
13509 handle using the process id.
13510 (win32_wait): Call win32_clear_inferiors when the inferior process
13511 has exited.
13512
ecd7ecbc
DJ
135132008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13514
13515 * server.c (monitor_show_help): Add "exit".
13516
1525d545
MG
135172008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13518
ecd7ecbc 13519 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13520 (clean): Add reg-xtensa.c.
13521 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13522 * configure.srv (xtensa*-*-linux*) New target.
13523 * linux-xtensa-low.c: New.
13524 * xtensa-xtregs.c: New.
1525d545 13525
59a016f0
PA
135262008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13527
13528 * hostio.c: Don't include errno.h.
13529 (errno_to_fileio_errno): Move to hostio-errno.
13530 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13531 error number outputting to the target->hostio_last_error callback.
13532 (hostio_packet_error): Use FILEIO_EINVAL directly.
13533 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13534 calls to hostio_error.
13535 * hostio-errno.c: New.
13536 * server.h (hostio_last_error_from_errno): Declare.
13537 * target.h (target_ops): Add hostio_last_error member.
13538 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13539 as hostio_last_error handler.
889bf7c5 13540 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13541 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13542 (wince_hostio_last_error): New functions.
13543 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13544 as hostio_last_error handler.
13545 (win32_target_ops) [!_WIN32_WCE]: Register
13546 hostio_last_error_from_errno as hostio_last_error handler.
13547 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13548 (hostio-errno.o): New rule.
13549 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13550 * configure.srv (srv_hostio_err_objs): New variable. Default to
13551 hostio-errno.o.
13552 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13553 * configure: Regenerate.
13554
2d717e4f
DJ
135552008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13556
13557 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13558 (linux_kill, linux_detach): Clean up the process list.
13559 * remote-utils.c (remote_open): Improve port number parsing.
13560 (putpkt_binary, input_interrupt): Only send interrupts if the target
13561 is running.
13562 * server.c (extended_protocol): Make static.
13563 (attached): Define earlier.
13564 (exit_requested, response_needed, program_argv): New variables.
13565 (target_running): New.
13566 (start_inferior): Clear attached here.
13567 (attach_inferior): Set attached here.
13568 (require_running): Define.
13569 (handle_query): Use require_running and target_running. Implement
13570 "monitor exit".
13571 (handle_v_attach, handle_v_run): New.
13572 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13573 (gdbserver_usage): Update.
13574 (main): Redo argument parsing. Handle --debug and --multi. Handle
13575 --attach along with other options or after the port. Save
13576 program_argv. Support no initial program. Resynchronize
13577 communication with GDB after an error. Handle "monitor exit".
13578 Use require_running and target_running. Always allow the extended
13579 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13580 restart in extended mode.
13581 * README: Refer to the GDB manual. Update --attach usage.
13582
7407e2de
AS
135832007-12-20 Andreas Schwab <schwab@suse.de>
13584
13585 * linux-low.c (STACK_SIZE): Define.
13586 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13587 (linux_test_for_tracefork): Likewise.
13588
b65d95c5
DJ
135892007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-low.c (linux_wait_for_event): Update messages. Do not
13592 reinsert auto-delete breakpoints.
13593 * mem-break.c (struct breakpoint): Change return type of handler to
13594 int.
13595 (set_breakpoint_at): Update handler type.
13596 (reinsert_breakpoint_handler): Return 1 instead of calling
13597 delete_breakpoint.
13598 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13599 setting a new one.
13600 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13601 * mem-break.h (set_breakpoint_at): Update handler type.
13602 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13603 * win32-low.c (auto_delete_breakpoint): New.
13604 (get_child_debug_event): Use it.
13605
4e799345
DJ
136062007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * configure.ac: Check for pread and pwrite.
13609 * hostio.c (handle_pread): Fall back to lseek and read.
13610 (handle_pwrite): Fall back to lseek and write.
13611 * config.in, configure: Regenerated.
13612
27524b67
DJ
136132007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13614
13615 * server.c (myresume): Add own_buf argument.
13616 (main): Update calls.
13617
a20d5e98
DJ
136182007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13619
13620 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13621 * remote-utils.c (remote_open): Do not call disable_async_io.
13622 (block_async_io): Delete.
13623 (unblock_async_io): Make static.
13624 (initialize_async_io): New.
13625 * server.c (handle_v_cont): Handle async I/O here.
13626 (myresume): Likewise. Move other common resume tasks here...
13627 (main): ... from here. Call initialize_async_io. Disable async
13628 I/O before the main loop.
13629 * server.h (initialize_async_io): Declare.
13630 (block_async_io, unblock_async_io): Delete prototypes.
13631 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13632
b79d787e
DJ
136332007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13634
13635 * remote-utils.c (readchar): Allow binary data in received messages.
13636
d97903b2
PA
136372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13638
13639 * win32-low.c (attaching): New global.
13640 (win32_create_inferior): Clear the `attaching' global.
13641 (win32_attach): Set the `attaching' global.
13642 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13643 attaching. Only set a breakpoint at the entry point if not
13644 attaching.
13645
311de423
PA
136462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13647
13648 * server.c (main): Don't report dll events on the initial
13649 connection on attaches.
13650
6c2d16d2
PA
136512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13652
13653 * server.c (main): Relax numerical bases supported for the pid of
13654 the --attach command line argument.
13655
5ca906e6
PA
136562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13657
13658 * win32-low.c (win32_attach): Call OpenProcess before
13659 DebugActiveProcess, not after. Add last error output to error
13660 call.
13661
9c6c8194
PA
136622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13663
13664 * win32-low.c (win32_get_thread_context)
13665 (win32_set_thread_context): New functions.
13666 (thread_rec): Use win32_get_thread_context.
13667 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13668 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13669 field.
13670
4d5d1aaa
PA
136712007-12-03 Leo Zayas
13672 Pedro Alves <pedro_alves@portugalmail.pt>
13673
13674 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13675 global variables.
13676 (child_add_thread): Minor cleanup.
13677 (child_continue): Resume artificially suspended threads before
13678 calling ContinueDebugEvent.
13679 (suspend_one_thread): New.
13680 (fake_breakpoint_event): New.
13681 (get_child_debug_event): Change return type to int. Check here if
13682 gdb sent an interrupt request. If a soft interrupt was requested,
13683 fake a breakpoint event. Return 0 if there is no event to handle,
13684 and 1 otherwise.
13685 (win32_wait): Don't check here if gdb sent an interrupt request.
13686 Ensure there is a valid event to handle.
13687 (win32_request_interrupt): Add soft interruption method as last
13688 resort.
13689
c436e841
PA
136902007-12-03 Leo Zayas
13691 Pedro Alves <pedro_alves@portugalmail.pt>
13692
13693 * win32-low.h (win32_thread_info): Add descriptions to the
13694 structure members. Replace `suspend_count' counter by a
13695 `suspended' flag.
13696 * win32-low.c (thread_rec): Update condition of when to get the
13697 context from the inferior. Rely on ContextFlags being set if it
13698 has already been retrieved. Only suspend the inferior thread if
13699 we haven't already. Warn if that fails.
13700 (continue_one_thread): s/suspend_count/suspended/. Only call
13701 ResumeThread once. Warn if that fails.
13702
e7b5fa67
PA
137032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13704
13705 * win32-low.c (win32_wait): Don't read from the inferior when it
13706 has already exited.
13707
a385171d
PA
137082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13709
13710 * Makefile.in (win32_low_h): New variable.
13711 (win32-low.o): Add dependency on $(win32_low_h).
13712 (win32-arm-low.o, win32-i386-low.o): New rules.
13713
f80c84b3
DJ
137142007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * hostio.c: Correct copyright year.
13717
a6b151f1
DJ
137182007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13719
13720 * Makefile.in (OBS): Add hostio.o.
13721 (hostio.o): New rule.
13722 * server.h (handle_vFile): Declare.
13723 * hostio.c: New file.
13724 * server.c (handle_v_requests): Take packet_len and new_packet_len
13725 for binary packets. Call handle_vFile.
13726 (main): Update call to handle_v_requests.
13727
f9387fc3
DJ
137282007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13729
13730 * linux-low.c: Include <sched.h>.
13731
51c2684e
DJ
137322007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * linux-low.c (linux_tracefork_grandchild): New.
13735 (linux_tracefork_child): Use clone.
13736 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13737
75f83163
JB
137382007-10-31 Joel Brobecker <brobecker@adacore.com>
13739
13740 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13741
da5898ce
DJ
137422007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13745
24a09b5f
DJ
137462007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * inferiors.c (change_inferior_id): Delete.
13749 (add_pid_to_list, pull_pid_from_list): New.
13750 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13751 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13752 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13753 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13754 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13755 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13756 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13757 (using_threads): Always set to 1.
13758 (handle_extended_wait): New.
13759 (add_process): Do not set TID.
13760 (linux_create_inferior): Set must_set_ptrace_flags.
13761 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13762 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13763 (linux_thread_alive): Rename TID argument to LWPID.
13764 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13765 (linux_wait_for_event): Do not use TID or check using_threads. Update
13766 call to dead_thread_notify. Call handle_extended_wait.
13767 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13768 (send_sigstop): Delete sigstop_sent.
13769 (wait_for_sigstop): Avoid TID.
13770 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13771 (linux_test_for_tracefork): New.
13772 (linux_lookup_signals): Use thread_db_active and
13773 linux_supports_tracefork_flag.
13774 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13775 * linux-low.h (get_process_thread): Avoid TID.
13776 (struct process_ifo): Move thread_known and tid to the end. Remove
13777 sigstop_sent.
13778 (linux_attach_lwp, thread_db_init): Update prototypes.
13779 * server.h (change_inferior_id): Delete prototype.
13780 (add_pid_to_list, pull_pid_from_list): New prototypes.
13781 * thread-db.c (thread_db_use_events): New.
13782 (find_first_thread): Rename to...
13783 (find_one_thread): ...this. Update callers and messages. Do not
13784 call fatal. Check thread_db_use_events. Do not call
13785 change_inferior_id or new_thread_notify.
13786 (maybe_attach_thread): Update. Do not call new_thread_notify.
13787 (thread_db_init): Set thread_db_use_events. Check use_events.
13788 * utils.c (fatal, warning): Correct message prefix.
13789
30ed0a8f
DJ
137902007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13791
13792 * Makefile.in (clean): Remove new files.
13793 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13794 (powerpc-64.o, powerpc-64.c): New rules.
13795 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13796 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13797 with SPE.
13798 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13799 SPE targets.
13800 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13801 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13802 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13803 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13804 (target_regsets): Add AltiVec and SPE register sets.
13805 * configure.ac: Check for AltiVec and SPE.
13806 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13807 (ppc_fill_vrregset, ppc_store_vrregset): New.
13808 (target_regsets): Add AltiVec register set.
13809 * configure: Regenerated.
13810
fd462a61
DJ
138112007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13812
13813 * linux-low.c (O_LARGEFILE): Define.
13814 (linux_read_memory): Use /proc/PID/mem.
13815 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13816 * configure, config.in: Regenerated.
13817
69f223ed
DJ
138182007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * linux-low.c (linux_wait_for_event): Do not pass signals while
13821 single-stepping.
13822
aec18585
PA
138232007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13824
13825 * win32-low.c (create_process): New.
13826 (win32_create_inferior): Use create_process instead of
13827 CreateProcess. If create_process failed retry appending an ".exe"
13828 suffix. Store the GetLastError result immediatelly after
13829 create_process calls and use it on the call to error.
13830
34d86ddd
PA
138312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13832
13833 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13834
5a0e3bd0
JB
138352007-08-23 Joel Brobecker <brobecker@adacore.com>
13836
13837 * configure.ac: Switch license to GPLv3.
13838
f88c79e6
MS
138392007-08-01 Michael Snyder <msnyder@access-company.com>
13840
13841 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13842
6b3d9b83
PA
138432007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13844
13845 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13846 typedef.
13847 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13848 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13849 CloseToolhelp32Snapshot.
13850 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13851 CloseToolhelp32Snapshot.
13852
c588c53c
MS
138532007-07-27 Michael Snyder <michael.snyder@access-company.com>
13854
13855 * server.c (main): Check for inferior exit before main loop.
13856
aa0403d9
PA
138572007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13858
13859 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13860 instead of on tmp_desc.
13861
255e7678
DJ
138622007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13863 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13866 (add_thread): Minor cleanups.
13867 (clear_inferiors): Move lower in the file. Clear the DLL
13868 list.
13869 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13870 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13871 (xml_escape_text): New.
13872 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13873 for qSupported.
13874 (handle_v_cont): Report errors.
13875 (gdbserver_version): Update.
13876 (main): Correct size of own_buf. Do not report initial DLL events.
13877 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13878 (unloaded_dll, xml_escape_text): New.
13879 * win32-low.c (enum target_waitkind): Update comments.
13880 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13881 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13882 (win32_EnumProcessModules, win32_GetModuleInformation)
13883 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13884 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13885 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13886 (win32_Module32First, win32_Module32Next, load_toolhelp)
13887 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13888 (get_child_debug_event): Handle DLL events.
13889 (win32_wait): Likewise.
13890
0d37add9
DJ
138912007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13892
13893 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13894 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13895
45e2715e
PA
138962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13897
13898 * win32-low.c (handle_output_debug_string): Ignore event if not
13899 waiting.
13900
c5674cf1
PA
139012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13904
2bbe3cc1
DJ
139052007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13906
13907 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13908
ae13219e
DJ
139092007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * inferiors.c (change_inferior_id): Add comment.
13912 * linux-low.c (check_removed_breakpoint): Add an early
13913 prototype. Improve debug output.
13914 (linux_attach): Doc update.
13915 (linux_detach_one_process, linux_detach): Clean up before releasing
13916 each process.
13917 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13918 * linux-low.h (struct process_info): Doc improvement.
13919 * mem-break.c (delete_all_breakpoints): New.
13920 * mem-break.h (delete_all_breakpoints): New prototype.
13921 * thread-db.c (find_first_thread): New.
13922 (thread_db_create_event): Call it instead of
13923 thread_db_find_new_threads. Clean up unused variables.
13924 (maybe_attach_thread): Remove first thread handling.
13925 (thread_db_find_new_threads): Use find_first_thread.
13926 (thread_db_get_tls_address): Likewise.
13927
4105de34
DJ
139282007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * thread-db.c (thread_db_find_new_threads): Add prototype.
13931 (thread_db_create_event): Check for the main thread before adding
13932 a new thread.
13933 (maybe_attach_thread): Only enable event reporting if TID == 0.
13934 (thread_db_get_tls_address): Check for new threads.
13935
2b876972
DJ
139362007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * linux-low.c (linux_create_inferior): Try execv before execvp.
13939 * spu-low.c (spu_create_inferior): Likewise.
13940
7a245884
DJ
139412007-06-13 Mike Frysinger <vapier@gentoo.org>
13942
13943 * linux-low.c (linux_create_inferior): Change execv to execvp.
13944 * spu-low.c (spu_create_inferior): Likewies.
13945
117ce543
DJ
139462007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * Makefile.in (clean): Clean new files instead of deleted ones.
13949 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13950 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13951 rules.
13952 * configure.srv: Specify XML files and new regformats for MIPS and
13953 MIPS64 GNU/Linux.
13954 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13955 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13956 an entry for the restart register.
13957 (mips_cannot_fetch_register, mips_cannot_store_register)
13958 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13959 register names to match the XML descriptions.
13960 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13961 restart register instead of $0.
13962
0e7f50da
UW
139632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13964 Markus Deuling <deuling@de.ibm.com>
13965
13966 * remote-utils.c (decode_xfer_write): New function.
13967 * server.h (decode_xfer_write): Add prototype.
13968 * server.c (handle_query): Add PACKET_LEN argument. Support
13969 qXfer:spu:read and qXfer:spu:write packets.
13970 (main): Pass packet_len to handle_query.
13971 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13972 * target.h (target_ops): Add qxfer_spu.
13973
374c1d38
UW
139742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13975
13976 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13977 accessing non-seekable spufs files.
13978
bb63802a
UW
139792007-05-16 Markus Deuling <deuling@de.ibm.com>
13980
889bf7c5 13981 * server.c (handle_query): Add reply for qC packet.
bb63802a 13982
7390519e
PA
139832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13984 Leo Zayas <lerele@champenstudios@com>
13985
13986 * server.h (check_remote_input_interrupt_request): New function.
13987 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13988 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13989 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13990 (check_remote_input_interrupt_request): New function.
13991 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13992 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13993 winapi_GenerateConsoleCtrlEvent): New typedefs.
13994 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13995 to 250 ms.
13996 (win32_wait): Check for remote interrupt request
13997 with check_remote_input_interrupt_request.
13998 (win32_request_interrupt): New function.
13999 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14000
34b34921
PA
140012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14002
14003 * win32-low.c (debug_registers_changed,
14004 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14005 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14006 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14007 (thread_rec): Get context using the low target.
14008 (child_add_thread): Call thread_added on the low target,
14009 which does the same thing.
14010 (regptr): Delete.
14011 (do_initial_child_stuff): Remove debug registers references.
14012 Set context using the low target. Resume threads after
14013 setting the contexts.
14014 (child_continue): Remove dead variable. Remove debug
14015 registers references.
14016 (child_fetch_inferior_registers): Go through the low target.
14017 (do_child_store_inferior_registers): Remove.
14018 (child_store_inferior_registers): Go through the low target.
14019 (win32_resume): Remove debug registers references.
14020 Set context using the low target.
14021 (handle_exception): Change return type to void. Don't record
14022 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14023 first chance exception.
889bf7c5 14024 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14025 goto loop. Always return after waiting for debug event.
14026 (win32_wait): Convert to switch statement. Handle spurious
14027 events.
14028
14029 * win32-i386-low.c (debug_registers_changed,
14030 debug_registers_used): New.
14031 (initial_stuff): Rename to ...
14032 (i386_initial_stuff): ... this. Clear debug registers
14033 state variables.
14034 (store_debug_registers): Delete.
14035 (i386_get_thread_context): New.
14036 (load_debug_registers): Delete.
14037 (i386_set_thread_context): New.
14038 (i386_thread_added): New.
14039 (single_step): Rename to ...
14040 (i386_single_step): ... this.
14041 (do_fetch_inferior_registers): Rename to ...
14042 (i386_fetch_inferior_register): ... this.
14043 (i386_store_inferior_register): New.
14044 (the_low_target): Adapt to new interface.
14045
14046 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14047 (arm_get_thread_context): New.
14048 (arm_set_thread_context): New.
14049 (regptr): New.
14050 (do_fetch_inferior_registers): Rename to ...
14051 (arm_fetch_inferior_register): ... this.
14052 (arm_store_inferior_register): New.
14053 (arm_wince_breakpoint): Reimplement as unsigned long.
14054 (arm_wince_breakpoint_len): Define.
14055 (the_low_target): Adapt to new interface.
14056
14057 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14058 load_debug_registers. Add get_thread_context, set_thread_context,
14059 thread_added and store_inferior_register. Rename
14060 fetch_inferior_registers to fetch_inferior_register.
14061 (regptr): Remove declaration.
14062
dd6953e1
PA
140632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14064
14065 * linux-low.c (linux_detach): Change return type to int. Return 0.
14066 * spu-low.c (spu_detach): Likewise.
14067
444d6139
PA
140682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14069
14070 * target.h (target_ops): Change return type of detach to int.
14071 Add join.
14072 (join_inferior): New.
14073 * server.c (main): Don't skip detach support on mingw32.
14074 If the inferior doesn't support detaching return error.
14075 Call join_inferior instead of using waitpid.
14076 * linux-low.c (linux_join): New.
14077 (linux_target_op): Add linux_join.
14078 * spu-low.c (spu_join): New.
14079 (spu_target_ops): Add spu_join.
14080 * win32-low.c (win32_detach): Adapt to new interface.
14081 Reopen current_process_handle before detaching. Issue a child
14082 resume before detaching.
14083 (win32_join): New.
14084 (win32_target_op): Add win32_join.
14085
1d5315fe
PA
140862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14087
14088 * win32-low.c (win32-attach): Fix return value.
14089 * target.h (target_ops): Describe ATTACH return values.
14090
bf914831
PA
140912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14092
14093 * win32-low.c (GETPROCADDRESS): Define.
14094 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14095 (winapi_DebugSetProcessKillOnExit): Likewise.
14096 (win32_create_inferior): Force usage of ansi CreateProcessA.
14097 (win32_attach): Use GETPROCADDRESS.
14098 (win32_detach): Likewise.
14099
f72f3e60
PA
141002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14101
14102 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14103
ed50f18f
PA
141042007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14105
14106 * win32-low.c: Commit leftover changes from 2007-03-29.
14107
0c2ead7e
DJ
141082007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14111 fields short instead of int. Add explicit padding.
14112 (i387_cache_to_fsave): Remove unnecessary casts.
14113 (i387_fsave_to_cache): Doc fix.
14114 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14115
73725ff3
DJ
141162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14117
14118 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14119 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14120
d99f33d8
PA
141212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14122
14123 * configure.srv (arm*-*-mingw32ce*): Move near the other
14124 arm targets.
14125
68070c10
PA
141262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14127
2482afc6 14128 * configure.ac: Add errno checking.
68070c10
PA
14129 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14130 sys/file.h and malloc.h.
14131 (AC_CHECK_DECLS): Add perror.
14132 (srv_mingwce): Handle.
2482afc6 14133 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14134 win32-i386-low.o to srv_tgtobj.
14135 (i[34567]86-*-mingw*): Likewise.
14136 (arm*-*-mingw32ce*): Add case.
14137 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14138 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14139 [__MINGW32CE__] (strerror): New function.
14140 [__MINGW32CE__] (errno): Define to GetLastError.
14141 [__MINGW32CE__] (COUNTOF): New macro.
14142 (remote_open): Remove extra close call.
14143 * mem-break.c (delete_breakpoint_at): New function.
14144 * mem-break.h (delete_breakpoint_at): Declare.
14145 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14146 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14147 [USE_WIN32API] (read, write): Add char* casts.
14148 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14149 * server.h: Include wincecompat.h on Windows CE.
14150 [HAVE_ERRNO_H]: Check.
14151 (perror): Declare if not declared.
14152 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14153 (perror_with_name): Remove errno declaration.
14154 * wincecompat.h: New.
14155 * wincecompat.c: New.
14156 * win32-low.h: New.
14157 * win32-arm-low.c: New.
14158 * win32-i386-low.c: New.
14159 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14160 (OUTMSG2): Make it safe.
14161 (_T): New macro.
14162 (COUNTOF): New macro.
14163 (NUM_REGS): Get it from the low target.
14164 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14165 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14166 (thread_rec): Let low target handle debug registers.
14167 (child_add_thread): Likewise.
14168 (child_init_thread_list): Likewise.
14169 (continue_one_thread): Likewise.
14170 (regptr): New.
14171 (do_child_fetch_inferior_registers): Move to ...
14172 * win32-i386-low.c: ... here, and rename to ...
14173 (do_fetch_inferior_registers): ... this.
889bf7c5 14174 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14175 Go through the low target.
14176 (do_child_store_inferior_registers): Use regptr.
14177 (strwinerror): New function.
14178 (win32_create_inferior): Handle Windows CE.
14179 Use strwinerror instead of strerror on Windows error
14180 codes. Add program to the error output.
14181 Don't close the main thread handle on Windows CE.
14182 (win32_attach): Use coredll.dll on Windows CE.
14183 (win32_kill): Close current process and current
14184 thread handles.
14185 (win32_detach): Use coredll.dll on Windows CE.
14186 (win32_resume): Let low target handle debug registers, and
14187 step request.
14188 (handle_exception): Add/Remove initial breakpoint. Avoid
14189 non-existant WSTOPSIG on Windows CE.
14190 (win32_read_inferior_memory): Cast to remove warning.
14191 (win32_arch_string): Go through the low target.
14192 (initialize_low): Call set_breakpoint_data with the low
14193 target's breakpoint.
14194 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14195 FOP_REGNUM, mappings): Move to ...
14196 * win32-i386-low.c: ... here.
14197 * win32-low.c (win32_thread_info): Move to ...
14198 * win32-low.h: ... here.
14199 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14200 win32-arm-low.c and wincecompat.c.
14201 (all:): Add $EXEEXT.
14202 (install-only:): Likewise.
14203 (gdbserver:): Likewise.
14204 (gdbreplay:): Likewise.
14205 * config.in: Regenerate.
14206 * configure: Regenerate.
14207
41093d81
PA
142082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14209
14210 * win32-low.c: Rename typedef thread_info to
14211 win32_thread_info throughout.
14212
544afa54
PA
142132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14214
14215 * win32-i386-low.c: Rename to ...
14216 * win32-low.c: ... this.
14217 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14218 * Makefile.in: Likewise.
14219
bce7165d
PA
142202007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14221
14222 * remote-utils.c (monitor_output): Constify msg parameter.
14223 * server.h (monitor_output): Likewise.
14224 * win32-i386-low.c (handle_output_debug_string): New.
14225 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14226 handle_output_debug_string.
14227 (get_child_debug_event): Likewise.
14228
506c7aa0
DJ
142292007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14230
14231 * server.c (main): Correct strtoul check.
14232
42c81e2a
DJ
142332007-03-27 Jon Ringle <jon@ringle.org>
14234
14235 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14236
9453113a
DJ
142372007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14238
14239 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14240
64a69107
DJ
142412007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14242
14243 * terminal.h: Check HAVE_SGTTY_H.
14244
142452007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14246
14247 * remote-utils.c (remote_open): Print out the assigned port number.
14248
c74d0ad8
DJ
142492007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14250
14251 * remote-utils.c (monitor_output): New function.
14252 * server.c (debug_threads): Define here.
14253 (monitor_show_help): New function.
14254 (handle_query): Handle qRcmd.
14255 (main): Do not handle 'd' packet.
14256 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14257 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14258 of debug_threads.
14259
de7c3b4a
PA
142602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14261
14262 * Makefile.in (EXEEXT): New.
14263 (clean): Use $(EXEEXT).
14264
ef57601b
PA
142652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14266
14267 * target.h (target_ops): Rename send_signal to request_interrupt,
14268 and remove enum target_signal parameter.
14269 * linux-low.c (linux_request_interrupt): Rename from
14270 linux_send_signal, and always send SIGINT.
14271 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14272 and always send SIGINT.
14273 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14274 of send_signal.
14275 (input_interrupt): Likewise.
14276
820f2bda
PA
142772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14278
14279 * server.c (get_features_xml): Check if target implemented
14280 arch_string.
14281 * win32-i386-low.c (win32_arch_string): New.
14282 (win32_target_ops): Add win32_arch_string as arch_string member.
14283
ab39bf24
UW
142842007-02-22 Markus Deuling <deuling@de.ibm.com>
14285
14286 * spu-low.c (spu_arch_string): New.
14287 (spu_target_ops): Add spu_arch_string.
14288
61ff6e04
DJ
142892007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14292 * configure.ac: Do not check for terminal.h.
14293 * configure, config.in: Regenerated.
14294
fb1e4ffc
DJ
142952007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * Makefile.in (OBS): Add $(XML_BUILTIN).
14298 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14299 (clean): Update.
14300 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14301 (arm-with-iwmmxt.c): New.
14302 * config.in, configure: Regenerate.
14303 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14304 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14305 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14306 (arm*-*-linux*): Add iWMMXt and regset support.
14307 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14308 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14309 (arm_store_wmmxregset, target_regsets): New.
14310 * server.c (get_features_xml): Take annex argument. Check builtin
14311 XML documents.
14312 (handle_query): Handle multiple annexes.
14313
0f48aa01
DJ
143142007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * remote-utils.c [USE_WIN32API] (read, write): Define.
14317 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14318 write.
14319
23181151
DJ
143202007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * linux-i386-low.c (the_low_target): Set arch_string.
14323 * linux-x86-64-low.c (the_low_target): Likewise.
14324 * linux-low.c (linux_arch_string): New.
14325 (linux_target_ops): Add it.
14326 * linux-low.h (struct linux_target_ops): Add arch_string.
14327 * server.c (write_qxfer_response): Use const void * for DATA.
14328 (get_features_xml): New.
14329 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14330 * target.h (struct target_ops): Add arch_string method.
14331
9d606399
DJ
143322007-01-03 Denis Pilat <denis.pilat@st.com>
14333 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (linux_kill): Handle being called with no threads.
14336 * win32-i386-low.c (win32_kill): Likewise.
14337 (get_child_debug_event): Clear current_process_handle.
14338
143392006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14340 Daniel Jacobowitz <dan@codesourcery.com>
14341
14342 * remote-utils.c (remote_open): Check the type of specified
14343 serial port devices before opening them.
14344 * server.c (main): Kill the inferior if an error occurs during
14345 the first remote_open.
14346
a5e13d24
DJ
143472006-12-05 Markus Deuling <deuling@de.ibm.com>
14348
14349 * README: Update supported targets.
14350
186947f7
DJ
143512006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * Makefile.in (clean): Remove reg-mips64.c.
14354 (reg-mips64.c, reg-mips64.o): New rules.
14355 * configure.srv: Handle mips64. Include regset support for mips.
14356 * linux-mips-low.c (union mips_register): New.
14357 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14358 (mips_breakpoint, mips_breakpoint_at): Use int.
14359 (mips_collect_register, mips_supply_register)
14360 (mips_collect_register_32bit, mips_supply_register_32bit)
14361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14362 (mips_store_fpregset, target_regsets): New.
14363 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14364
a13e2c95
UW
143652006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14366
14367 * configure.srv: Add target "spu*-*-*".
14368 * Makefile.in (clean): Remove reg-spu.c.
14369 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14370 * spu-low.c: New file.
14371
cb7283db
DJ
143722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * configure.ac: Correct td_thr_tls_get_addr test.
14375 * configure: Regenerated.
14376
89be2091
DJ
143772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14378
14379 * linux-low.c (linux_wait_for_event): Reformat. Use the
14380 pass_signals array.
14381 * remote-utils.c (decode_address_to_semicolon): New.
14382 * server.c (pass_signals, handle_general_set): New.
14383 (handle_query): Mention QPassSignals for qSupported.
14384 (main): Call handle_general_set.
14385 * server.h (pass_signals, decode_address_to_semicolon): New.
14386
000ef4f0
DJ
143872006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * server.c (handle_query): Correct error handling for read_auxv.
14390
b7149293
UW
143912005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14392
14393 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14394 and srv_linux_thread_db to yes.
14395 * linux-s390-low.c (s390_fill_gregset): New function.
14396 (target_regsets): Define data structure.
14397
dae5f5cf
DJ
143982006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14399
14400 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14401 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14402 * config.in, configure: Regenerated.
14403 * inferiors.c (gdb_id_to_thread): New function.
14404 (gdb_id_to_thread_id): Use it.
14405 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14406 * linux-low.h (struct process_info): Add th member.
14407 (thread_db_get_tls_address): New prototype.
14408 * remote-utils.c (decode_address): Make non-static.
14409 * server.c (handle_query): Handle qGetTLSAddr.
14410 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14411 * target.h (struct target_ops): Add get_tls_address.
14412 * thread-db.c (maybe_attach_thread): Save the thread handle.
14413 (thread_db_get_tls_address): New.
14414
32ca6d61
DJ
144152006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14416
14417 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14418 (linux_resume_one_process): Take a siginfo_t *. Update all
14419 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14420 (struct pending_signals): Add a siginfo_t.
14421 (linux_wait_for_process): Always set last_status.
14422 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14423 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14424 * linux-low.h (struct process_info): Add last_status.
14425
5ffff7c1
DJ
144262006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * remote-utils.c (try_rle): New function.
14429 (putpkt_binary): Use it.
14430
8695c747
DJ
144312006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14432
14433 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14434 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14435 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14436 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14437 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14438 point registers.
14439
290fadea
RS
144402006-08-08 Richard Sandiford <richard@codesourcery.com>
14441
14442 * server.c (terminal_fd): New variable.
14443 (old_foreground_pgrp): Likewise.
14444 (restore_old_foreground_pgrp): New function.
14445 (start_inferior): Record the terminal file descriptor in terminal_fd
14446 and its original foreground group in old_foreground_pgrp. Register
14447 restore_old_foreground_pgrp with atexit().
14448
9f2e1e63
DJ
144492006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14450
14451 * server.c (handle_query): Correct qPart to qXfer.
14452
b80864fb
DJ
144532006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * configure.ac: Check for more headers which are missing on
14456 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14457 * configure.srv: Add Cygwin and mingw32.
14458 * remote-utils.c: Don't include headers unconditionally which
14459 are missing on mingw32. Include <winsock.h> for mingw32.
14460 (remote_open): Adjust for mingw32 support. Flush
14461 standard error after writing to it.
14462 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14463 (unblock_async_io, enable_async_io, disable_async_io)
14464 (readchar, getpkt): Update for Winsock support.
14465 (prepare_resume_reply): Expect a protocol signal number.
14466 * server.c: Disable <sys/wait.h> on mingw32.
14467 (start_inferior): Adjust for mingw32 support. Flush
14468 standard error after writing to it.
14469 (attach_inferior): Likewise. Use protocol signal
14470 numbers.
14471 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14472 and names.
14473 * win32-i386-low.c: New file.
14474 * Makefile.in (XM_CLIBS): Set.
14475 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14476 (win32-i386-low.o): New dependency rule.
14477 * linux-low.c (linux_wait): Use target signal numbers.
14478 * target.h (struct target_ops): Doc fix.
14479 * server.h (target_signal_to_name): New prototype.
14480 * gdbreplay.c: Don't include headers unconditionally which
14481 are missing on mingw32. Include <winsock.h> for mingw32.
14482 (remote_close, remote_open): Adjust for Winsock support.
14483 * configure, config.in: Regenerated.
14484
0876f84a
DJ
144852006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * server.c (decode_xfer_read, write_qxfer_response): New.
14488 (handle_query): Take a packet length argument. Handle
14489 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14490 the qSupported response.
14491 (main): Update call to handle_query.
14492
01f9e8fa
DJ
144932006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14494
14495 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14496 (putpkt_binary): Renamed from putpkt and adjusted for binary
14497 data.
14498 (putpkt): New wrapper for putpkt_binary.
14499 (readchar): Don't mask off the high bit.
14500 (decode_X_packet): New function.
14501 * server.c (main): Call putpkt_binary if a handler sets the packet
14502 length. Save the length of the incoming packet. Handle 'X'.
14503 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14504
be2a5f71
DJ
145052006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14506
14507 * server.c (handle_query): Handle qSupported.
14508
ea025f5f
DJ
145092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * remote-utils.c (all_symbols_looked_up): New variable.
14512 (look_up_one_symbol): Check it.
14513 * server.h (look_up_one_symbol): New declaration.
14514 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14515
9308fc88
DJ
145162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14517
14518 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14519 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14520 (PTRACE_GET_THREAD_AREA): Define.
14521 (ps_get_thread_area): New function.
14522
52fb6437
NS
145232006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14524
14525 * configure.srv (m68k*-*-uclinux*): New target.
14526 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14527 (linux_resume_one_process): Remove extraneous cast.
14528 (linux_read_offsets): New.
14529 (linux_target_op): Add linux_read_offsets on mmuless systems.
14530 * server.c (handle_query): Add qOffsets logic.
14531 * target.h (struct target_ops): Add read_offsets.
14532
21b0f40c
DJ
145332006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14536 (PTRACE_GET_THREAD_AREA): Define.
14537 (ps_get_thread_area): New function.
14538 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14539 (linux-x86-64-low.o): Update.
14540
0050a760
DJ
145412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14542
14543 * configure.ac: Remove checks for prfpregset_t.
14544 * gdb_proc_service.h: New file.
14545 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14546 new "gdb_proc_service.h".
14547 * proc-service.c: Likewise.
14548 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14549 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14550 * Makefile.in (gdb_proc_service_h): Updated.
14551 * configure, config.in: Regenerated.
14552
b92a518e
DJ
145532006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * remote-utils.c (prepare_resume_reply): Move declaration
14556 of gdb_id_from_wait to the top of the block.
14557
545587ee
DJ
145582006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * linux-low.c (regsets_store_inferior_registers): Read the regset
14561 from the target before filling it.
14562
9db87ebd
DJ
145632006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14564
14565 * server.c (attach_inferior): Return SIGTRAP for a successful
14566 attach.
14567
dd24457d
DJ
145682006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14569
14570 * Makefile.in (OBS): Add version.o.
14571 (STAGESTUFF): Delete.
14572 (version.o): Add dependencies.
14573 (version.c): Replace rule.
14574 (clean): Remove version.c.
14575 * server.c (gdbserver_version): New.
14576 (gdbserver_usage): Use printf.
14577 (main): Handle --version and --help.
14578 * server.h (version, host_name): Add declarations.
14579
6f0f660e
EZ
145802005-12-23 Eli Zaretskii <eliz@gnu.org>
14581
889bf7c5
PA
14582 * linux-arm-low.c:
14583 * linux-arm-low.c:
14584 * inferiors.c:
14585 * i387-fp.h:
14586 * i387-fp.c:
14587 * gdbreplay.c:
14588 * regcache.c:
14589 * proc-service.c:
14590 * mem-break.h:
14591 * mem-break.c:
14592 * linux-x86-64-low.c:
14593 * linux-sh-low.c:
14594 * linux-s390-low.c:
14595 * linux-ppc64-low.c:
14596 * linux-ppc-low.c:
14597 * linux-mips-low.c:
14598 * linux-m68k-low.c:
14599 * linux-m32r-low.c:
14600 * linux-low.h:
14601 * linux-low.c:
14602 * linux-ia64-low.c:
14603 * linux-i386-low.c:
14604 * linux-crisv32-low.c:
14605 * thread-db.c:
14606 * terminal.h:
14607 * target.h:
14608 * target.c:
14609 * server.h:
14610 * server.c:
14611 * remote-utils.c:
14612 * regcache.h:
14613 * utils.c:
14614 * Makefile.in:
14615 * configure.ac:
6f0f660e
EZ
14616 * gdbserver.1: Add (C) after Copyright. Update the FSF
14617 address.
14618
9d1fb177
DJ
146192005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14622 (arm_breakpoint_at): Recognize both breakpoints.
14623 (the_low_target): Use the correct breakpoint instruction.
14624
011a70c2
DJ
146252005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14626
14627 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14628 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14629 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14630 (the_low_target): Update.
14631
7fb85e41
AS
146322005-10-25 Andreas Schwab <schwab@suse.de>
14633
14634 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14635
14636 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14637 (ia64_num_regs): Reduce to 462.
14638
3db0444b
DJ
146392005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14640
14641 * acinclude.m4: Correct quoting.
14642 * aclocal.m4: Regenerated.
14643
14644 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14645 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14646 (thread_db_init): Call thread_db_err_str.
14647 * configure.ac: Check for TD_VERSION.
14648 * config.in, configure: Regenerated.
14649
bee0189a
DJ
146502005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14651
14652 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14653
e9d25b98
DJ
146542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14657 is not available. Define HAVE_PTRACE_GETREGS if it is.
14658 * config.in, configure: Regenerated.
14659 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14660 * linux-i386-low.c, linux-m68k-low.c: Update to use
14661 HAVE_PTRACE_GETREGS.
14662 * linux-low.c (regsets_fetch_inferior_registers)
14663 (regsets_store_inferior_registers): Only return 0 if we processed
14664 GENERAL_REGS.
14665 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14666 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14667
a06660f7
DJ
146682005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14669
14670 * inferiors.c (struct thread_info): Add gdb_id.
14671 (add_thread): Add gdb_id argument.
14672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14673 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14674 calls to add_thread.
14675 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14676 * server.c (handle_query): Use thread_to_gdb_id.
14677 (handle_v_cont, main): Use gdb_id_to_thread_id.
14678 * server.h (add_thread): Update prototype.
14679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14680 prototypes.
14681
5a1f5858
DJ
146822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14685 left-padded registers.
14686 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14687 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14688
e122f1f5
SE
146892005-07-01 Steve Ellcey <sje@cup.hp.com>
14690
14691 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14692 * configure: Regenerate.
14693 * config.in: Regenerate.
14694 * server.h (NEED_DECLARATION_STRERROR):
14695 Replace with !HAVE_DECL_STRERROR.
14696
d592fa2f
DJ
146972005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14698
14699 * linux-low.c (linux_wait, linux_send_signal): Don't test
14700 an unsigned long variable for > 0 if it could be MAX_ULONG.
14701 * server.c (myresume): Likewise.
14702 * target.c (set_desired_inferior): Likewise.
14703
ccbd4912
MK
147042005-06-13 Mark Kettenis <kettenis@gnu.org>
14705
14706 * configure.ac: Simplify and improve check for socklen_t.
14707 * configure, config.in: Regenerate.
14708
f450004a
DJ
147092005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * acconfig.h: Remove.
14712 * configure.ac: Add a test for socklen_t. Use three-argument
14713 AC_DEFINE throughout.
14714 * config.in: Regenerated using autoheader 2.59.
14715 * configure: Regenerated.
14716
14717 * gdbreplay.c (socklen_t): Provide a default.
14718 (remote_open): Use socklen_t.
14719 * remote-utils.c (socklen_t): Provide a default.
14720 (remote_open): Use socklen_t.
14721 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14722 unsigned char.
14723
14724 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14725 char for buffers.
14726 * linux-low.c (linux_read_memory, linux_write_memory)
14727 (linux_read_auxv): Likewise.
14728 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14729 (check_mem_write): Likewise.
14730 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14731 Likewise.
14732 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14733 (registers_from_string, register_data): Likewise.
14734 * server.c (handle_query, main): Likewise.
14735 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14736 (decode_M_packet): Likewise.
14737 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14738 * target.h (struct target_ops): Update read_memory, write_memory,
14739 and read_auxv.
14740 (read_inferior_memory, write_inferior_memory): Update.
14741 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14742 to unsigned char *.
14743 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14744 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14745 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14746 linux-s390-low.c, linux-sh-low.c: Update for changes in
14747 read_inferior_memory and the_low_target->breakpoint.
14748
eee84df1
DJ
147492005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14750
14751 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14752 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14753 * configure.srv: Add powerpc64-*-linux*.
14754 * linux-ppc64-low.c: New file.
14755
45b134e5
OF
147562005-05-23 Orjan Friberg <orjanf@axis.com>
14757
14758 * linux-cris-low.c: New file with support for CRIS.
14759 * linux-crisv32-low.c: Ditto for CRISv32.
14760 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14761 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14762 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14763 reg-crisv32.o, and reg-crisv32.c to make rules.
14764 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14765 recognized targets.
14766
48d93c75
UW
147672005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14768
14769 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14770 of sizeof (PTRACE_XFER_TYPE).
14771 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14772
e013ee27
OF
147732005-05-12 Orjan Friberg <orjanf@axis.com>
14774
889bf7c5 14775 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14777 pointers for hardware watchpoint support.
14778 * linux-low.h (struct linux_target_ops): Ditto.
14779 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14780 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14781 to linux_target_ops.
14782 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14783 reply packet.
14784 * server.c (main): Recognize 'Z' and 'z' packets.
14785
b0ded00b
UW
147862005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14787
14788 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14789 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14790 (the_low_target): Add new members.
14791
8643e2ad
DJ
147922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * proc-service.c (ps_lgetregs): Search all_processes instead of
14795 all_threads.
14796
fc620387
DJ
147972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14798
14799 * server.c (start_inferior): Change return type to int.
14800 (attach_inferior): Change sigptr to int *.
14801 (handle_v_cont, handle_v_requests): Change signal to int *.
14802 (main): Change signal to int.
14803
148042005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14805
14806 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14807 * configure.srv: Add m32r*-*-linux*.
14808 * linux-m32r-low.c: New file.
14809
e0e76420
DJ
148102005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14813
a1928bad
DJ
148142005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14817 Take unsigned long arguments for PIDs.
14818 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14819 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14820 (wait_for_sigstop, linux_resume_one_process)
14821 (regsets_fetch_inferior_registers, linux_send_signal)
14822 (linux_read_auxv): Likewise. Update the types of variables holding
14823 PIDs. Update format string specifiers.
14824 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14825 * remote-utils.c (prepare_resume_reply): Likewise.
14826 * server.c (cont_thread, general_thread, step_thread)
14827 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14828 unsigned long.
14829 (handle_query): Update format specifiers.
14830 (handle_v_cont, main): Use strtoul for thread IDs.
14831 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14832 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14833 (general_thread, step_thread, thread_from_wait)
14834 (old_thread_from_wait): Update.
14835 * target.h (struct thread_resume): Use unsigned long for THREAD.
14836 (struct target_ops): Use unsigned long for arguments to attach and
14837 thread_alive.
14838
dcdb98d2
DJ
148392005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * acinclude.m4: Include bfd/bfd.m4 directly.
14842 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14843 <agriffis@toolchain.org>.
14844 * aclocal.m4, configure: Regenerated.
14845
bec39cab
AC
148462005-01-07 Andrew Cagney <cagney@gnu.org>
14847
14848 * configure.ac: Rename configure.in, require autoconf 2.59.
14849 * configure: Re-generate.
14850
434c4c77
DJ
148512004-12-08 Daniel Jacobowitz <dan@debian.org>
14852
14853 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14854 LIBS when finished.
14855 * aclocal.m4: Regenerated.
14856 * configure: Regenerated.
14857
db1d3e1b
AS
148582004-11-21 Andreas Schwab <schwab@suse.de>
14859
14860 * linux-m68k-low.c (m68k_num_gregs): Define.
14861 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14862 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14863 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14864 (m68k_breakpoint_at): New. Add to the_low_target.
14865
14866 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14867 srv_linux_thread_db to yes.
14868
43360365
JB
148692004-10-20 Joel Brobecker <brobecker@gnat.com>
14870
14871 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14872 (ARCH_SET_FS): Likewise.
14873 (ARCH_GET_FS): Likewise.
14874 (ARCH_GET_GS): Likewise.
14875
fd500816
DJ
148762004-10-16 Daniel Jacobowitz <dan@debian.org>
14877
14878 * linux-i386-low.c (ps_get_thread_area): New.
14879 * linux-x86-64-low.c (ps_get_thread_area): New.
14880 * linux-low.c: Include <sys/syscall.h>.
14881 (linux_kill_one_process): Don't kill the first thread here.
14882 (linux_kill): Kill the first thread here.
14883 (kill_lwp): New function.
14884 (send_sigstop, linux_send_signal): Use it.
14885 * proc-service.c: Clean up #ifdefs.
14886 (fpregset_info): Delete.
14887 (ps_lgetregs): Update and enable implementation.
14888 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14889 implementations.
14890 * remote-utils.c (struct sym_cache, symbol_cache): New.
14891 (input_interrupt): Print a clearer message.
14892 (async_io_enabled): New variable.
14893 (enable_async_io, disable_async_io): Use it. Update comments.
14894 (look_up_one_symbol): Use the symbol cache.
14895 * thread-db.c (thread_db_look_up_symbols): New function.
14896 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14897
f6de3c42
DJ
148982004-10-16 Daniel Jacobowitz <dan@debian.org>
14899
14900 * configure.in: Test for -rdynamic.
14901 * configure: Regenerated.
14902 * Makefile (INTERNAL_LDFLAGS): New.
14903 (gdbserver, gdbreplay): Use it.
14904
2c0fc042
AC
149052004-09-02 Andrew Cagney <cagney@gnu.org>
14906
14907 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14908
075b3282
DJ
149092004-03-23 Daniel Jacobowitz <drow@mvista.com>
14910
14911 * linux-low.c (linux_wait): Clear all_processes list also.
14912
fa6a77dc
DJ
149132004-03-12 Daniel Jacobowitz <drow@mvista.com>
14914
14915 * linux-low.c: Include <errno.h>. Remove extern declaration of
14916 errno.
14917
6d782a97
DJ
149182004-03-12 Daniel Jacobowitz <drow@mvista.com>
14919
14920 * gdbreplay.c, server.h, utils.c: Update copyright years.
14921
3a7fb99b
DJ
149222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14923
14924 * server.c (main): Print child status or termination signal from
14925 variable 'signal', not 'sig'.
14926
c3e735a6
DJ
149272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14928
14929 * linux-low.c (linux_read_memory): Change return type to
14930 int. Check for and return error from ptrace().
14931 * target.c (read_inferior_memory): Change return type to int. Pass
14932 back return status from the_target->read_memory().
14933 * target.h (struct target_ops): Adapt *read_memory() prototype.
14934 Update comment.
14935 (read_inferior_memory): Adapt prototype.
14936 * server.c (main): Return an error packet if
14937 read_inferior_memory() returns an error.
14938
a59d1c82
DJ
149392004-03-04 Daniel Jacobowitz <drow@mvista.com>
14940
14941 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14942 Unify with other clean targets.
14943
dc3f8883
DJ
149442004-02-29 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * server.c (handle_v_cont): Call set_desired_inferior.
14947
89a208da
DJ
149482004-02-29 Daniel Jacobowitz <drow@mvista.com>
14949
14950 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14951
62ea82f5
DJ
149522004-02-29 Daniel Jacobowitz <drow@mvista.com>
14953
14954 * linux-low.c (linux_wait): Unblock async I/O.
14955 (linux_resume): Block and enable async I/O.
14956 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14957 * server.h (block_async_io, unblock_async_io): Add prototypes.
14958
6910d122
DJ
149592004-02-29 Daniel Jacobowitz <drow@mvista.com>
14960
14961 * remote-utils.c (remote_open): Print a status notice after
14962 opening a TCP port.
14963 * server.c (attach_inferior): Print a status notice after
14964 attaching.
14965
149662004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14967
14968 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14969
c89dc5d4
DJ
149702004-02-26 Daniel Jacobowitz <drow@mvista.com>
14971
14972 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14973 error packet.
14974 * server.c, target.h: Update copyright years.
14975
4b8dad4a
RM
149762004-02-25 Roland McGrath <roland@redhat.com>
14977
14978 * target.h (struct target_ops): New member `read_auxv'.
14979 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14980 * linux-low.c (linux_read_auxv): New function.
14981 (linux_target_ops): Initialize `read_auxv' member to that.
14982
d7446758
JB
149832004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14984
14985 Committed by Jim Blandy <jimb@redhat.com>.
14986
14987 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14988 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14989 instead of GPR_SIZE to distiguish s390 and s390x targets.
14990
5544ad89
DJ
149912004-01-31 Daniel Jacobowitz <drow@mvista.com>
14992
14993 * linux-low.c: Update copyright year.
14994 (check_removed_breakpoint): Clear pending_is_breakpoint.
14995 (linux_set_resume_request, linux_queue_one_thread)
14996 (resume_status_pending_p): New functions.
14997 (linux_continue_one_thread): Use process->resume.
14998 (linux_resume): Only resume threads if there are no pending events.
14999 * linux-low.h (struct process_info): Add resume request
15000 pointer.
15001
2a68b70e
DJ
150022004-01-30 Daniel Jacobowitz <drow@mvista.com>
15003
15004 * regcache.c (new_register_cache): Clear the allocated register
15005 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15006
64386c31
DJ
150072003-10-13 Daniel Jacobowitz <drow@mvista.com>
15008
15009 * linux-low.c (linux_resume): Take a struct thread_resume *
15010 argument.
15011 (linux_wait): Update call.
15012 (resume_ptr): New static variable.
15013 (linux_continue_one_thread): Renamed from
15014 linux_continue_one_process. Use resume_ptr.
15015 (linux_resume): Use linux_continue_one_thread.
15016 * server.c (handle_v_cont, handle_v_requests): New functions.
15017 (myresume): New function.
15018 (main): Handle 'v' case.
15019 * target.h (struct thread_resume): New type.
15020 (struct target_ops): Change argument of "resume" to struct
15021 thread_resume *.
15022 (myresume): Delete macro.
15023
c938e9b0
L
150242003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15025
15026 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15027 (uninstall): Support DESTDIR.
15028
7f313d07
BC
15029Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15030
15031 * configure.srv: Add xscale*linux copy of arm*linux entry.
15032
3b2fc2ea
DJ
150332003-07-24 Daniel Jacobowitz <drow@mvista.com>
15034
15035 * linux-arm-low.c (arm_reinsert_addr): New function.
15036 (the_low_target): Add arm_reinsert_addr.
15037
1c0a559e
MK
150382003-07-08 Mark Kettenis <kettenis@gnu.org>
15039
15040 * mem-break.c: Remove whitespace at end of file.
15041
43d5792c
DJ
150422003-06-28 Daniel Jacobowitz <drow@mvista.com>
15043
15044 * configure.in: Check whether we need to prototype strerror.
15045 * server.h: Optionally prototype strerror.
15046 * gdbreplay.c (perror_with_name): Use strerror.
15047 * linux-low.c (linux_attach_lwp): Use strerror.
15048 * utils.c (perror_with_name): Use strerror.
15049 * config.in, configure: Regenerated.
15050
c8a86edf
DJ
150512003-06-28 Daniel Jacobowitz <drow@mvista.com>
15052
15053 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15054 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15055
73d37363
DJ
150562003-06-20 Daniel Jacobowitz <drow@mvista.com>
15057
15058 * Makefile.in (SFILES): Update.
15059 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15060 low-sun3.c: Remove files.
15061
6ad8ae5c
DJ
150622003-06-17 Daniel Jacobowitz <drow@mvista.com>
15063
15064 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15065 (linux_detach_one_process, linux_detach): New functions.
15066 (linux_target_ops): Add linux_detach.
15067 * server.c (main): Handle 'D' packet.
15068 * target.h (struct target_ops): Add "detach" member.
15069 (detach_inferior): Define.
15070
1581182a
MK
150712003-06-13 Mark Kettenis <kettenis@gnu.org>
15072
15073 From Kelley Cook <kelleycook@wideopenwest.com>:
15074 * configure.srv: Accept i[34567]86 variants.
15075
e5379b03
DJ
150762003-06-05 Daniel Jacobowitz <drow@mvista.com>
15077
15078 * linux-low.c (linux_wait_for_event): Correct comment typos.
15079 (linux_resume_one_process): Call check_removed_breakpoint.
15080 (linux_send_signal): New function.
15081 (linux_target_ops): Add linux_send_signal.
15082 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15083 of kill.
15084 * target.h (struct target_ops): Add send_signal.
15085
2ff29de4
JB
150862003-05-29 Jim Blandy <jimb@redhat.com>
15087
15088 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15089 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15090 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15091 away part of the register's value.
15092
254787d4
DJ
150932003-03-26 Daniel Jacobowitz <drow@mvista.com>
15094
15095 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15096 (linux_wait_for_event, linux_init_signals): Likewise.
15097
94e10508
DJ
150982003-03-17 Daniel Jacobowitz <drow@mvista.com>
15099
15100 * configure.in: Check for stdlib.h.
15101 * configure: Regenerated.
15102 * config.in: Regenerated.
15103
4c0711e0
DJ
151042003-01-04 Andreas Schwab <schwab@suse.de>
15105
15106 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15107
ef66e766
AC
151082003-01-02 Andrew Cagney <ac131313@redhat.com>
15109
15110 * Makefile.in: Remove obsolete code.
15111
a1358604
DJ
151122002-11-20 Daniel Jacobowitz <drow@mvista.com>
15113
15114 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15115 defined(PT_FPR0_HI).
15116
23ce3b1c
DJ
151172002-11-17 Stuart Hughes <seh@zee2.com>
15118
15119 * linux-arm-low.c (arm_num_regs): Increase.
15120 (arm_regmap): Include status register.
15121
151222002-11-17 Daniel Jacobowitz <drow@mvista.com>
15123
15124 * linux-low.c (register_addr): Remove incorrect -1 check.
15125
a9fa9f7d
DJ
151262002-08-29 Daniel Jacobowitz <drow@mvista.com>
15127
15128 * linux-low.c (linux_create_inferior): Call setpgid. Return
15129 the new PID.
15130 (unstopped_p, linux_signal_pid): Remove.
15131 (linux_target_ops): Remove linux_signal_pid.
15132 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15133 global instead of target method.
15134 * target.h (struct target_ops): Remove signal_pid. Update comment
15135 for create_inferior.
15136 * server.c (signal_pid): New variable.
15137 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15138 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15139 (attach_inferior): Set signal_pid.
15140
17574093
DJ
151412002-08-23 Daniel Jacobowitz <drow@mvista.com>
15142
15143 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15144
151452002-08-20 Jim Blandy <jimb@redhat.com>
15146
15147 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15148 default for this.
15149
151502002-08-01 Andrew Cagney <cagney@redhat.com>
15151
15152 * Makefile.in: Make chill references obsolete.
15153
151542002-07-24 Kevin Buettner <kevinb@redhat.com>
15155
15156 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15157 * configure: Regenerate.
15158 * config.in: Regenerate.
15159
151602002-07-09 David O'Brien <obrien@FreeBSD.org>
15161
15162 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15163 (perror_with_name, remote_close, remote_open, expect, play): Static.
15164
151652002-07-04 Michal Ludvig <mludvig@suse.cz>
15166
4b8dad4a 15167 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15168 byte offsets instead of an array of indexes.
15169 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15170
151712002-06-13 Daniel Jacobowitz <drow@mvista.com>
15172
15173 * regcache.c: Add comment.
15174
151752002-06-11 Daniel Jacobowitz <drow@mvista.com>
15176
15177 * thread-db.c: New file.
15178 * proc-service.c: New file.
15179 * acinclude.m4: New file.
15180 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15181 proc-service.o, and thread-db.o.
15182 (linux-low.o): Add USE_THREAD_DB.
15183 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15184 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15185 * aclocal.m4: Regenerated.
15186 * config.in: Regenerated.
15187 * configure: Regenerated.
15188 * configure.in: Check for proc_service.h, sys/procfs.h,
15189 thread_db.h, and linux/elf.h headrs.
15190 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15191 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15192 Check for -lthread_db and thread support.
15193 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15194 PowerPC, and SuperH.
15195 * i387-fp.c: Constify arguments.
15196 * i387-fp.h: Likewise.
15197 * inferiors.c: (struct thread_info): Renamed from
15198 `struct inferior_info'. Remove PID member. Use generic inferior
15199 list header. All uses updated.
15200 (inferiors, signal_pid): Removed.
15201 (all_threads): New variable.
15202 (get_thread): Define.
15203 (add_inferior_to_list): New function.
15204 (for_each_inferior): New function.
15205 (change_inferior_id): New function.
15206 (add_inferior): Removed.
15207 (remove_inferior): New function.
15208 (add_thread): New function.
15209 (free_one_thread): New function.
15210 (remove_thread): New function.
15211 (clear_inferiors): Use for_each_inferior and free_one_thread.
15212 (find_inferior): New function.
15213 (find_inferior_id): New function.
15214 (inferior_target_data): Update argument type.
15215 (set_inferior_target_data): Likewise.
15216 (inferior_regcache_data): Likewise.
15217 (set_inferior_regcache_data): Likewise.
15218 * linux-low.c (linux_bp_reinsert): Remove.
15219 (all_processes, stopping_threads, using_thrads)
15220 (struct pending_signals, debug_threads, pid_of): New.
15221 (inferior_pid): Replace with macro.
15222 (struct inferior_linux_data): Remove.
15223 (get_stop_pc, add_process): New functions.
15224 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15225 Use add_process and add_thread.
15226 (linux_attach_lwp): New function, based on old linux_attach. Use
15227 add_process and add_thread. Set stop_expected for new threads.
15228 (linux_attach): New function.
15229 (linux_kill_one_process): New function.
15230 (linux_kill): Kill all LWPs.
15231 (linux_thread_alive): Use find_inferior_id.
15232 (check_removed_breakpoints, status_pending_p): New functions.
15233 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15234 Update. Use WNOHANG. Wait for cloned processes also. Update process
15235 struct for the found process.
15236 (linux_wait_for_event): New function.
15237 (linux_wait): Use it. Support LWPs.
15238 (send_sigstop, wait_for_sigstop, stop_all_processes)
15239 (linux_resume_one_process, linux_continue_one_process): New functions.
15240 (linux_resume): Support LWPs.
15241 (REGISTER_RAW_SIZE): Remove.
15242 (fetch_register): Use register_size instead. Call supply_register.
15243 (usr_store_inferior_registers): Likewise. Call collect_register.
15244 Fix recursive case.
15245 (regsets_fetch_inferior_registers): Improve error message.
15246 (regsets_store_inferior_registers): Add debugging.
15247 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15248 (unstopped_p, linux_signal_pid): New functions.
15249 (linux_target_ops): Add linux_signal_pid.
15250 (linux_init_signals): New function.
15251 (initialize_low): Call it. Initialize using_threads.
15252 * regcache.c (inferior_regcache_data): Add valid
15253 flag.
15254 (get_regcache): Fetch registers lazily. Add fetch argument
15255 and update all callers.
15256 (regcache_invalidate_one, regcache_invalidate): New
15257 functions.
15258 (new_register_cache): Renamed from create_register_cache.
15259 Return the new regcache.
15260 (free_register_cache): Change argument to a void *.
15261 (registers_to_string, registers_from_string): Call get_regcache
15262 with fetch flag set.
15263 (register_data): Make static. Pass fetch flag to get_regcache.
15264 (supply_register): Call get_regcache with fetch flag clear.
15265 (collect_register): Call get_regcache with fetch flag set.
15266 (collect_register_as_string): New function.
15267 * regcache.h: Update.
15268 * remote-utils.c (putpkt): Flush after debug output and use
15269 stderr.
15270 Handle input interrupts while waiting for an ACK.
15271 (input_interrupt): Use signal_pid method.
15272 (getpkt): Flush after debug output and use stderr.
15273 (outreg): Use collect_register_as_string.
15274 (new_thread_notify, dead_thread_notify): New functions.
15275 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15276 and general_thread.
15277 (look_up_one_symbol): Flush after debug output.
15278 * server.c (step_thread, server_waiting): New variables.
15279 (start_inferior): Don't use signal_pid. Update call to mywait.
15280 (attach_inferior): Update call to mywait.
15281 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15282 (main): Don't fetch/store registers explicitly. Use
15283 set_desired_inferior. Support proposed ``Hs'' packet. Update
15284 calls to mywait.
15285 * server.h: Update.
15286 (struct inferior_list, struct_inferior_list_entry): New.
15287 * target.c (set_desired_inferior): New.
15288 (write_inferior_memory): Constify.
15289 (mywait): New function.
15290 * target.h: Update.
15291 (struct target_ops): New signal_pid method.
15292 (mywait): Removed macro, added prototype.
15293
15294 * linux-low.h (regset_func): Removed.
15295 (regset_fill_func, regset_store_func): New.
15296 (enum regset_type): New.
15297 (struct regset_info): Add type field. Use new operation types.
15298 (struct linux_target_ops): stop_pc renamed to get_pc.
15299 Add decr_pc_after_break and breakpoint_at.
15300 (get_process, get_thread_proess, get_process_thread)
15301 (strut process_info, all_processes, linux_attach_lwp)
15302 (thread_db_init): New.
15303
15304 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15305 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15306 (the_low_target): Add new members.
15307 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15308 (i386_store_fpxregset): Constify.
15309 (target_regsets): Add new kind identifier.
15310 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15311 (i386_set_pc): Add debugging.
15312 (i386_breakpoint_at): New function.
15313 (the_low_target): Add new members.
15314 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15315 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15316 (mips_breakpoint_at): New.
15317 (the_low_target): Add new members.
15318 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15319 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15320 (the_low_target): Add new members.
15321 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15322 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15323 (the_low_target): Add new members.
15324 * linux-x86-64-low.c (target_regsets): Add new kind
15325 identifier.
15326
153272002-05-15 Daniel Jacobowitz <drow@mvista.com>
15328
15329 From Martin Pool <mbp@samba.org>:
15330 * server.c (gdbserver_usage): New function.
15331 (main): Call it.
15332
153332002-05-14 Daniel Jacobowitz <drow@mvista.com>
15334
15335 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15336 stop_at -> stop_pc.
15337
153382002-05-04 Andrew Cagney <ac131313@redhat.com>
15339
15340 * Makefile.in: Remove obsolete code.
15341
153422002-04-24 Michal Ludvig <mludvig@suse.cz>
15343
15344 * linux-low.c (regsets_fetch_inferior_registers),
15345 (regsets_store_inferior_registers): Removed cast to int from
15346 ptrace() calls.
15347 * regcache.h: Added declaration of struct inferior_info.
15348
153492002-04-20 Daniel Jacobowitz <drow@mvista.com>
15350
15351 * inferiors.c (struct inferior_info): Add regcache_data.
15352 (add_inferior): Call create_register_cache.
15353 (clear_inferiors): Call free_register_cache.
15354 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15355 * regcache.c (struct inferior_regcache_data): New.
15356 (registers): Remove.
15357 (get_regcache): New function.
15358 (create_register_cache, free_register_cache): New functions.
15359 (set_register_cache): Don't initialize the register cache here.
15360 (registers_to_string, registers_from_string, register_data): Call
15361 get_regcache.
15362 * regcache.h: Add prototypes.
15363 * server.h: Likewise.
15364
153652002-04-20 Daniel Jacobowitz <drow@mvista.com>
15366
15367 * mem-break.c: New file.
15368 * mem-break.h: New file.
15369 * Makefile.in: Add mem-break.o rule; update server.h
15370 dependencies.
15371 * inferiors.c (struct inferior_info): Add target_data
15372 member.
15373 (clear_inferiors): Free target_data member if set.
15374 (inferior_target_data, set_inferior_target_data): New functions.
15375 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15376 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15377 * linux-low.c (linux_bp_reinsert): New variable.
15378 (struct inferior_linux_data): New.
15379 (linux_create_inferior): Use set_inferior_target_data.
15380 (linux_attach): Likewise. Call add_inferior.
15381 (linux_wait_for_one_inferior): New function.
15382 (linux_wait): Call it.
15383 (linux_write_memory): Add const.
15384 (initialize_low): Call set_breakpoint_data.
15385 * linux-low.h (struct linux_target_ops): Add breakpoint
15386 handling members.
15387 * server.c (attach_inferior): Remove extra add_inferior
15388 call.
15389 * server.h: Include mem-break.h. Update inferior.c
15390 prototypes.
15391 * target.c (read_inferior_memory)
15392 (write_inferior_memory): New functions.
15393 * target.h (read_inferior_memory)
15394 (write_inferior_memory): Change macros to prototypes.
15395 (struct target_ops): Update comments. Add const to write_memory
15396 definition.
15397
153982002-04-11 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * linux-low.c (usr_store_inferior_registers): Support
15401 registers which are allowed to fail to store.
15402 * linux-low.h (linux_target_ops): Likewise.
15403 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15404 (ppc_cannot_store_register): FPSCR may not be storable.
15405
154062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * server.h: Include <string.h> if HAVE_STRING_H.
15409 * ChangeLog: Correct paths in last ChangeLog entry.
15410
154112002-04-09 Daniel Jacobowitz <drow@mvista.com>
15412
15413 * linux-low.h: Remove obsolete prototypes.
15414 (struct linux_target_ops): New.
15415 (extern the_low_target): New.
15416 * linux-low.c (num_regs, regmap): Remove declarations.
15417 (register_addr): Use the_low_target explicitly.
15418 (fetch_register): Likewise.
15419 (usr_fetch_inferior_registers): Likewise.
15420 (usr_store_inferior_registers): Likewise.
15421 * linux-arm-low.c (num_regs): Remove.
15422 (arm_num_regs): Define.
15423 (arm_regmap): Renamed from regmap, made static.
15424 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15425 made static.
15426 (arm_cannot_store_register): Renamed from cannot_store_register,
15427 made static.
15428 (the_low_target): New.
15429 * linux-i386-low.c (num_regs): Remove.
15430 (i386_num_regs): Define.
15431 (i386_regmap): Renamed from regmap, made static.
15432 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15433 made static.
15434 (i386_cannot_store_register): Renamed from cannot_store_register,
15435 made static.
15436 (the_low_target): New.
15437 * linux-ia64-low.c (num_regs): Remove.
15438 (ia64_num_regs): Define.
15439 (ia64_regmap): Renamed from regmap, made static.
15440 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15441 made static.
15442 (ia64_cannot_store_register): Renamed from cannot_store_register,
15443 made static.
15444 (the_low_target): New.
15445 * linux-m68k-low.c (num_regs): Remove.
15446 (m68k_num_regs): Define.
15447 (m68k_regmap): Renamed from regmap, made static.
15448 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15449 made static.
15450 (m68k_cannot_store_register): Renamed from cannot_store_register,
15451 made static.
15452 (the_low_target): New.
15453 * linux-mips-low.c (num_regs): Remove.
15454 (mips_num_regs): Define.
15455 (mips_regmap): Renamed from regmap, made static.
15456 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15457 made static.
15458 (mips_cannot_store_register): Renamed from cannot_store_register,
15459 made static.
15460 (the_low_target): New.
15461 * linux-ppc-low.c (num_regs): Remove.
15462 (ppc_num_regs): Define.
15463 (ppc_regmap): Renamed from regmap, made static.
15464 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15465 made static.
15466 (ppc_cannot_store_register): Renamed from cannot_store_register,
15467 made static.
15468 (the_low_target): New.
15469 * linux-s390-low.c (num_regs): Remove.
15470 (s390_num_regs): Define.
15471 (s390_regmap): Renamed from regmap, made static.
15472 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15473 made static.
15474 (s390_cannot_store_register): Renamed from cannot_store_register,
15475 made static.
15476 (the_low_target): New.
15477 * linux-sh-low.c (num_regs): Remove.
15478 (sh_num_regs): Define.
15479 (sh_regmap): Renamed from regmap, made static.
15480 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15481 made static.
15482 (sh_cannot_store_register): Renamed from cannot_store_register,
15483 made static.
15484 (the_low_target): New.
15485 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15486 (the_low_target): New.
15487
154882002-04-09 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * Makefile.in: Add stamp-h target.
15491 * configure.in: Create stamp-h.
15492 * configure: Regenerated.
15493
154942002-04-09 Daniel Jacobowitz <drow@mvista.com>
15495
15496 * inferiors.c: New file.
15497 * target.c: New file.
15498 * target.h: New file.
15499 * Makefile.in: Add target.o and inferiors.o. Update
15500 dependencies.
15501 * linux-low.c (inferior_pid): New static variable,
15502 moved from server.c.
15503 (linux_create_inferior): Renamed from create_inferior.
15504 Call add_inferior. Return 0 on success instead of a PID.
15505 (linux_attach): Renamed from myattach.
15506 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15507 (linux_thread_alive): Renamed from mythread_alive.
15508 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15509 child dies.
15510 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15511 (regsets_store_inferior_registers): Correct error message.
15512 Add missing ``return 0''.
15513 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15514 (linux_store_registers): Renamed from store_inferior_registers.
15515 (linux_read_memory): Renamed from read_inferior_memory.
15516 (linux_write_memory): Renamed from write_inferior_memory.
15517 (linux_target_ops): New structure.
15518 (initialize_low): Call set_target_ops ().
15519 * remote-utils.c (unhexify): New function.
15520 (hexify): New function.
15521 (input_interrupt): Send signals to ``signal_pid''.
15522 * server.c (inferior_pid): Remove.
15523 (start_inferior): Update create_inferior call.
15524 (attach_inferior): Call add_inferior.
15525 (handle_query): New function.
15526 (main): Call handle_query for `q' packets.
15527 * server.h: Include "target.h". Remove obsolete prototypes.
15528 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15529
155302002-04-09 Daniel Jacobowitz <drow@mvista.com>
15531
15532 * Makefile.in: Add WARN_CFLAGS. Update configury
15533 dependencies.
15534 * configure.in: Check for <string.h>
15535 * configure: Regenerate.
15536 * config.in: Regenerate.
15537 * gdbreplay.c: Include needed system headers.
15538 (remote_open): Remove strchr prototype.
15539 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15540 * regcache.c (supply_register): Change buf argument to const void *.
15541 (supply_register_by_name): Likewise.
15542 (collect_register): Change buf argument to void *.
15543 (collect_register_by_name): Likewise.
15544 * regcache.h: Add missing prototypes.
15545 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15546 * server.c (handle_query): New function.
15547 (attached): New static variable, moved out of main.
15548 (main): Quiet longjmp clobber warnings.
15549 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15550 * utils.c (error): Remove NORETURN.
15551 (fatal): Likewise.
This page took 1.901328 seconds and 4 git commands to generate.