]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
lwp_info: Make the arch code free arch_lwp_info
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
466eecee
SM
12017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-aarch64-low.c (the_low_target): Add thread delete
4 callback.
5 * linux-arm-low.c (arm_delete_thread): New function.
6 (the_low_target): Add thread delete callback.
7 * linux-bfin-low.c (the_low_target): Likewise.
8 * linux-crisv32-low.c (the_low_target): Likewise.
9 * linux-low.c (delete_lwp): Invoke delete_thread callback if
10 set.
11 * linux-low.h (struct linux_target_ops) <delete_thread>: New
12 field.
13 * linux-m32r-low.c (the_low_target): Add thread delete callback.
14 * linux-mips-low.c (mips_linux_delete_thread): New function.
15 (the_low_target): Add thread delete callback.
16 * linux-ppc-low.c (the_low_target): Likewise.
17 * linux-s390-low.c (the_low_target): Likewise.
18 * linux-sh-low.c (the_low_target): Likewise.
19 * linux-tic6x-low.c (the_low_target): Likewise.
20 * linux-tile-low.c (the_low_target): Likewise.
21 * linux-x86-low.c (the_low_target): Likewise.
22 * linux-xtensa-low.c (the_low_target): Likewise.
23
b79f7801
YZ
242017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
25
26 * win32-low.c: Include "common-inferior.h".
27
bc3b087d
SDJ
282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
29
30 * inferiors.c (set_inferior_cwd): New function.
31 * server.c (handle_general_set): Handle QSetWorkingDir packet.
32 (handle_query): Inform that QSetWorkingDir is supported.
33 * win32-low.c (create_process): Pass the inferior's cwd to
34 CreateProcess.
35
d092c5a2
SDJ
362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * inferiors.c (current_inferior_cwd): New global variable.
39 (get_inferior_cwd): New function.
40 * inferiors.h (struct process_info) <cwd>: New field.
41
7da0a886
SDJ
422017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
43
44 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
45 (OBS): Add gdb_tilde_expand.o.
46
289a6840
SM
472017-10-02 Simon Marchi <simon.marchi@ericsson.com>
48
49 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
50 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
51
256642e8
PA
522017-09-29 Pedro Alves <palves@redhat.com>
53
54 * ax.c (gdb_parse_agent_expr): Constify.
55 * ax.h (gdb_parse_agent_expr): Constify.
56 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
57 Constify.
58 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
59 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
60 * remote-utils.h (read_ptid): Constify.
61 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
62 (process_point_options, process_serial_event): Constify.
63 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
64 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
65 (cmd_qtbuffer): Constify.
66
5b9ca4d4
PA
672017-09-29 Pedro Alves <palves@redhat.com>
68
69 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
70 fails.
71
94c207e0
PA
722017-09-29 Pedro Alves <palves@redhat.com>
73
74 * linux-low.c (handle_extended_wait): Pass parent thread instead
75 of process to thread_db_notice_clone.
76 * linux-low.h (thread_db_notice_clone): Replace parent process
77 parameter with parent thread parameter.
78 * thread-db.c (find_one_thread): Add comment.
79 (thread_db_notice_clone): Replace parent process parameter with
80 parent thread parameter. Temporarily switch to the parent thread.
81
75352e28
SDJ
822017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
83
84 * gdbthread.h: Include "common-gdbthread.h".
85 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
86 "if" when validating the ptid.
87 * remote-utils.c: Include "gdbthread.h".
88 (prepare_resume_reply): Use "switch_to_thread".
89 * target.c (done_accessing_memory): Likewise.
90
ad339634
AA
912017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
92
93 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
94 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
95 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
96 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
97 s390x-gs-linux64-ipa.o to ipa_obj.
98 * linux-s390-low.c (HWCAP_S390_GS): New define.
99 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
100 New functions.
101 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
102 (s390_arch_setup): Check for guarded-storage support and choose
103 appropriate tdesc.
104 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
105 init_registers_s390x_gs_linux64.
106 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
107 enum value.
108 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
109 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
110
cc4d742f
SM
1112017-09-22 Simon Marchi <simon.marchi@ericsson.com>
112
113 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
114
f6327dcb
KB
1152017-09-21 Kevin Buettner <kevinb@redhat.com>
116
117 * linux-low.h (struct lwp_info): Add new field, thread_handle.
118 (thread_db_thread_handle): Declare.
119 * linux-low.c (linux_target_ops): Initialize thread_handle.
120 * server.c (handle_qxfer_threads_worker): Add support for
121 "handle" attribute.
122 * target.h (struct target_ops): Add new function pointer,
123 thread_handle.
124 (target_thread_handle): Define.
125 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
126 field in lwp.
127 (thread_db_thread_handle): New function.
128
86299109
KB
1292017-09-21 Kevin Buettner <kevinb@redhat.com>
130
131 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
132 * linux-low.h (thread_db_notice_clone): Declare.
133 * thread-db.c (thread_db_notice_clone): New function.
134
f557a88a
PA
1352017-09-21 Pedro Alves <palves@redhat.com>
136
137 * server.c (gdb_read_memory, handle_status, process_serial_event)
138 (handle_serial_event, handle_target_event): Adjust to
139 set_desired_thread prototype change.
140 * target.c (set_desired_thread): Remove 'use_general' parameter
141 and adjust.
142 * target.h (set_desired_thread): Remove 'use_general' parameter.
143
223ffa71
TT
1442017-09-20 Tom Tromey <tom@tromey.com>
145
146 * target.c (target_terminal::terminal_state): Define.
147 (target_terminal::init): Rename from target_terminal_init.
148 (target_terminal::inferior): Rename from
149 target_terminal_inferior.
150 (target_terminal::ours): Rename from target_terminal_ours.
151 (target_terminal::ours_for_output, target_terminal::info): New.
152
04fd3ba9
SM
1532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
154
155 * server.c (accumulate_file_name_length): Remove.
156 (emit_dll_description): Adjust to std::string change.
157 (handle_qxfer_libraries): Use std::string to hold document.
158
5e187554
SM
1592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
160
161 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
162 return type of xml_escape_text.
163 * server.c (emit_dll_description): Likewise.
164
1526853e
SM
1652017-09-16 Simon Marchi <simon.marchi@ericsson.com>
166
167 * server.c (captured_main): Accept argument for --selftest.
168 Update run_tests call.
169 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
170 when registering selftests.
171
c4dfafab
SDJ
1722017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * regcache.c (get_thread_regcache): Update code to use "std::vector"
175 instead of "VEC" for "target_desc.reg_defs".
176 (regcache_cpy): Likewise.
177 (registers_to_string): Likewise.
178 (registers_from_string): Likewise.
179 (find_regno): Likewise.
180 (supply_regblock): Likewise.
181 (regcache_raw_read_unsigned): Likewise.
182 * tdesc.c (init_target_desc): Likewise.
183 (tdesc_create_reg): Likewise.
184 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
185 (struct target_desc) <reg_defs>: Convert to "std::vector".
186 (target_desc): Do not initialize "reg_defs".
187 (~target_desc): Update code to use "std::vector" instead of "VEC"
188 for "target_desc.reg_defs".
189 (operator==): Likewise.
190
124aceb4
SM
1912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
192
193 * inferiors.h (thread_to_gdb_id): Remove.
194 * inferiors.c (thread_to_gdb_id): Remove.
195 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
196 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
197 lynx_store_registers, lynx_read_memory, lynx_write_memory):
198 Likewise.
199 * nto-low.c (nto_fetch_registers, nto_store_registers,
200 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
201
96cde54f
SM
2022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
203
204 * inferiors.h (gdb_id_to_thread_id): Remove.
205 * inferiors.c (gdb_id_to_thread_id): Remove.
206 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
207 removal. Move pid declaration closer to where it's used.
208
e8ca139e
SM
2092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
210
211 * server.c (handle_detach): New function.
212 (process_serial_event): Move code out, call handle_detach.
213
f8a4e119
SM
2142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
215
216 * server.c (require_running): Rename to ...
217 (require_running_or_return): ... this ...
218 (require_running_or_break): ... and this.
219 (handle_query, process_serial_event): Adjust.
220
0eb0a407
SM
2212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
222
223 * linux-low.c (linux_set_resume_request): Remove unused
224 variables.
225
785922a5
SM
2262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
227
228 * server.c (first_thread_of): Remove.
229 (process_serial_event): Replace usage of first_thread_of with
230 find_any_thread_of_pid.
231 * tracepoint.c (same_process_p): Remove.
232 (gdb_agent_about_to_close): Replace usage of same_process_p with
233 find_any_thread_of_pid.
234 * linux-x86-low.c (same_process_callback): Remove.
235 (x86_arch_setup_process_callback): Replace usage of
236 same_process_callback with find_any_thread_of_pid.
237 * thread-db.c (any_thread_of): Remove.
238 (switch_to_process): Replace usage of any_thread_of with
239 find_any_thread_of_pid.
240 * inferiors.c (thread_pid_matches_callback): Remove.
241 (find_thread_process): Adjust to use find_any_thread_of_pid.
242
a059f00c
SDJ
2432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
244
245 * regcache.c (get_thread_regcache): Guard calls to "memset"
246 with "!VEC_empty".
247
cc397f3a
SDJ
2482017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
249
250 * linux-low.c (handle_extended_wait): Use
251 "allocate_target_description" instead of "XNEW".
252 * linux-x86-low.c (initialize_low_arch): Likewise.
253
22916b07
YQ
2542017-09-05 Yao Qi <yao.qi@linaro.org>
255
256 * configure.srv (srv_i386_regobj): Remove.
257 (srv_amd64_regobj): Remove.
258 (srv_regobj): Set it to "" for x86 non-linux targets.
259 * linux-x86-tdesc.c (i386_linux_read_description):
260 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
261 (init_registers_i386): Remove the declaration.
262 (tdesc_i386): Remove the declaration.
263 (lynx_i386_arch_setup): Call i386_create_target_description.
264 * nto-x86-low.c: Likewise.
265 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
266 [!__x86_64__]: include arch/i386.h.
267 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
268
38602d55
YQ
2692017-09-05 Yao Qi <yao.qi@linaro.org>
270
271 * configure.srv (srv_amd64_linux_xmlfiles): Remove
272 i386/amd64-XXX-linux from it.
273
44b886ff
YQ
2742017-09-05 Yao Qi <yao.qi@linaro.org>
275
276 * configure.srv: Empty srv_amd64_linux_regobj if $development is
277 false.
278 (ipa_amd64_linux_regobj): Remove.
279 (ipa_x32_linux_regobj): Remove.
280
b4570e4b
YQ
2812017-09-05 Yao Qi <yao.qi@linaro.org>
282
283 * Makefile.in (arch-amd64.o): New rule.
284 * configure.srv: Append arch-amd64.o.
285 * linux-amd64-ipa.c: Include common/x86-xstate.h.
286 (get_ipa_tdesc): Call amd64_linux_read_description.
287 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
288 and init_registers_amd64_XXX.
289 * linux-x86-low.c (x86_linux_read_description): Call
290 amd64_linux_read_description.
291 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
292 (initialize_low_arch): Don't call init_registers_x32_XXX and
293 init_registers_amd64_XXX.
294 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
295 and tdesc_amd64_XXX.
296 [__x86_64__] (amd64_tdesc_test): New function.
297 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
298 and init_registers_amd64_XXX.
299 * linux-x86-tdesc.c: Include arch/amd64.h.
300 (xcr0_to_tdesc_idx): New function.
301 (i386_linux_read_description): New function.
302 (amd64_get_ipa_tdesc_idx): New function.
303 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
304 (amd64_get_ipa_tdesc): Declare.
305
d1f28ea2
YQ
3062017-09-05 Yao Qi <yao.qi@linaro.org>
307
308 * configure.srv (srv_i386_linux_xmlfiles): Remove
309 i386/i386-XXX-linux.xml from it.
310
25a93583
YQ
3112017-09-05 Yao Qi <yao.qi@linaro.org>
312
313 * configure.srv: Set srv_i386_linux_regobj empty if $development
314 is false.
315 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
316 initialize_low_tdesc.
317 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
318 with #if initialize_low_tdesc.
319 * linux-x86-tdesc-selftest.c: New file.
320 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
321
5f035c07
YQ
3222017-09-05 Yao Qi <yao.qi@linaro.org>
323
324 * Makefile.in (arch-i386.o): New rule.
325 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
326 (x86_64-*-linux*): Likewise.
327 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
328 include arch/i386.h.
329 (i386_linux_read_description): Remove code and call
330 i386_create_target_description.
331 * tdesc.c (allocate_target_description): New function.
332 * tdesc.h (set_tdesc_architecture): Remove declaration.
333 (set_tdesc_osabi): Likewise.
334
0abe8a89
YQ
3352017-09-05 Yao Qi <yao.qi@linaro.org>
336
337 * linux-x86-tdesc.c: Don't include <inttypes.h>.
338 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
339 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
340 .xmltarget.
341 * server.c (get_features_xml): Call tdesc_get_features_xml.
342 * tdesc.c (set_tdesc_architecture): New function.
343 (set_tdesc_osabi): New function.
344 (tdesc_get_features_xml): New function.
345 (tdesc_create_feature): Add an argument.
346 * tdesc.h (struct target_desc) <features>: New field.
347 <arch, osabi>: New field.
348 (~target_desc): xfree features, arch, and osabi.
349 (target_desc::oerator==): Don't compare .xmltarget.
350 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
351 (set_tdesc_osabi): Likewise.
352 (tdesc_get_features_xml): Likewise.
353
0a188386
YQ
3542017-09-05 Yao Qi <yao.qi@linaro.org>
355
356 * linux-x86-tdesc.c: Include selftest.h.
357 (i386_tdesc_test): New function.
358 (initialize_low_tdesc): Call selftests::register_test.
359 * tdesc.h: Include regdef.h.
360 (target_desc): Override operator == and !=.
361
f49ff000
YQ
3622017-09-05 Yao Qi <yao.qi@linaro.org>
363
364 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
365 (ipa_obj): Likewise.
366 * linux-i386-ipa.c: Include common/x86-xstate.h
367 (get_ipa_tdesc): Call i386_linux_read_description.
368 (initialize_low_tracepoint): Don't call init_registers_XXX
369 functions, call initialize_low_tdesc instead.
370 * linux-x86-low.c (x86_linux_read_description): Call
371 i386_linux_read_description.
372 (initialize_low_arch): Don't call init_registers_i386_XXX
373 functions, call initialize_low_tdesc.
374 * linux-x86-tdesc.c: New file.
375 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
376 (i386_get_ipa_tdesc_idx): Declare.
377 (i386_get_ipa_tdesc): Declare.
378 (initialize_low_tdesc): Declare.
379
2b68ef2f
YQ
3802017-09-05 Yao Qi <yao.qi@linaro.org>
381
382 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
383 instead of 0.
384
f7000548
YQ
3852017-09-05 Yao Qi <yao.qi@linaro.org>
386
387 * Makefile.in (IPA_OBJS): Add vec-ipa.o
388 * regcache.c (get_thread_regcache): Use VEC_length.
389 (init_register_cache): Likewise.
390 (regcache_cpy): Likewise.
391 (registers_to_string): Iterate reg_defs via VEC_iterate.
392 (find_regno): Likewise.
393 (find_register_by_number): Use VEC_index.
394 (register_size): Call find_register_by_number.
395 (register_data): Call find_register_by_number.
396 (supply_regblock): Use VEC_length.
397 (regcache_raw_read_unsigned): Likewise.
398 * tdesc.c (init_target_desc): Iterate reg_defs via
399 VEC_iterate.
400 (default_description): Update initializer.
401 (copy_target_description): Don't update field num_registers.
402 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
403 <num_registers>: Remove.
404
50a421ac
SM
4052017-09-04 Simon Marchi <simon.marchi@ericsson.com>
406
407 * Makefile.in (.SECONDARY): Define target.
408
23fdd69e
SM
4092017-09-03 Simon Marchi <simon.marchi@ericsson.com>
410
411 * linux-low.c (linux_wait_1): Adjust.
412 * server.c (queue_stop_reply_callback): Adjust.
413
0a2dde4a
SDJ
4142017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
415
416 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
417 QEnvironmentUnset and QEnvironmentReset packets.
418 (handle_query): Inform remote that QEnvironmentHexEncoded,
419 QEnvironmentUnset and QEnvironmentReset are supported.
420
6afd337d
SM
4212017-08-25 Simon Marchi <simon.marchi@ericsson.com>
422
423 * inferiors.h (inferior_target_data): Rename to ...
424 (thread_target_data): ... this.
425 (inferior_regcache_data): Rename to ...
426 (thread_regcache_data): ... this.
427 (set_inferior_regcache_data): Rename to ...
428 (set_thread_regcache_data): ... this.
429 * inferiors.c (inferior_target_data): Rename to ...
430 (thread_target_data): ... this.
431 (inferior_regcache_data): Rename to ...
432 (thread_regcache_data): ... this.
433 (set_inferior_regcache_data): Rename to ...
434 (set_thread_regcache_data): ... this.
435 (free_one_thread): Update.
436 * linux-low.h (get_thread_lwp): Update.
437 * regcache.c (get_thread_regcache): Update.
438 (regcache_invalidate_thread): Update.
439 (free_register_cache_thread): Update.
440 * win32-i386-low.c (update_debug_registers_callback): Update.
441 (win32_get_current_dr): Update.
442 * win32-low.c (thread_rec): Update.
443 (delete_thread_info): Update.
444 (continue_one_thread): Update.
445 (suspend_one_thread): Update.
446
a160cc46
SM
4472017-08-24 Simon Marchi <simon.marchi@ericsson.com>
448
449 * inferiors.c (set_inferior_target_data): Remove.
450 * inferiors.h (set_inferior_target_data): Remove.
451
6d580b63
YQ
4522017-08-18 Yao Qi <yao.qi@linaro.org>
453
454 * Makefile.in (OBS): Add selftest.o.
455 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
456 * configure, config.in: Re-generated.
457 * server.c: Include common/sefltest.h.
458 (captured_main): Handle option --selftest.
459
f5a29eb0
YQ
4602017-08-09 Yao Qi <yao.qi@linaro.org>
461
462 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
463 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
464 i386-avx-mpx.o and i386-mmx.o.
465 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
466 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
467 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
468 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
469 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
470 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
471 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
472 i386/amd64-avx-mpx.xml.
473
57757c2f
YQ
4742017-08-09 Yao Qi <yao.qi@linaro.org>
475
476 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
477 and x32-avx-avx512.o.
478 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
479 i386/x32-avx-avx512.xml.
480
229d26fc
SM
4812017-07-26 Simon Marchi <simon.marchi@ericsson.com>
482
483 * tracepoint.h (enum class fast_tpoint_collect_result): New
484 enumeration.
485 (fast_tracepoint_collecting): Change return type to
486 fast_tpoint_collect_result.
487 * tracepoint.c (fast_tracepoint_collecting): Likewise.
488 * linux-low.h: Include tracepoint.h.
489 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
490 fast_tpoint_collect_result.
491 * linux-low.c (handle_tracepoints): Adjust.
492 (linux_fast_tracepoint_collecting): Change return type to
493 fast_tpoint_collect_result.
494 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
495 linux_wait_1, stuck_in_jump_pad_callback,
496 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
497 proceed_one_lwp): Adjust to type change.
498
2e1e43e1
YQ
4992017-07-10 Yao Qi <yao.qi@linaro.org>
500
501 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
502
adc764e7
YQ
5032017-06-29 Yao Qi <yao.qi@linaro.org>
504
505 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
506 Remove.
507 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
508
a206891a
SM
5092017-06-20 Simon Marchi <simon.marchi@ericsson.com>
510
511 * Makefile.in (IPA_OBJS): Sort and format one item per line.
512
9a6c7d9c
SDJ
5132017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
514
515 * linux-low.c (linux_create_inferior): Adjust code to access the
516 environment information via 'gdb_environ' class.
517 * lynx-low.c (lynx_create_inferior): Likewise.
518 * server.c (our_environ): Make it an instance of 'gdb_environ'.
519 (get_environ): Return a pointer to 'our_environ'.
520 (captured_main): Initialize 'our_environ'.
521 * server.h (get_environ): Adjust prototype.
522 * spu-low.c (spu_create_inferior): Adjust code to access the
523 environment information via 'gdb_environ' class.
524
ae3e2ccf
SM
5252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
526
527 * linux-low.c (linux_read_memory, linux_write_memory): Remove
528 usage of "register" keyword.
529
3e019bdc
SM
5302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
531
532 * configure: Re-generate.
533
8465943a
SM
5342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
535
536 * configure: Re-generate.
537
cf0dd6f0
SM
5382017-06-17 Simon Marchi <simon.marchi@ericsson.com>
539
540 * Makefile.in (COMPILE.pre): Add "-x c++".
541
9845682b
SDJ
5422017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
543
544 * fork-child.c: Conditionally include <signal.h>.
545
aefd8b33
SDJ
5462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
547
548 * server.c (handle_general_set): Handle new packet
549 "QStartupWithShell".
550 (handle_query): Add "QStartupWithShell" to the list of supported
551 packets.
552 (gdbserver_usage): Add help text explaining the
553 new "--startup-with-shell" and "--no-startup-with-shell" CLI
554 options.
555 (captured_main): Recognize and act upon the presence of the new
556 CLI options.
557
2090129c
SDJ
5582017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
559 Pedro Alves <palves@redhat.com>
560
561 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
562 * configure: Regenerate.
563 * configure.srv (srv_linux_obj): Add "fork-child.o" and
564 "fork-inferior.o".
565 (i[34567]86-*-lynxos*): Likewise.
566 (spu*-*-*): Likewise.
567 * fork-child.c: New file.
568 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
569 and "environ.h".
570 (linux_ptrace_fun): New function.
571 (linux_create_inferior): Adjust function prototype to reflect
572 change on "target.h". Adjust function code to use
573 "fork_inferior".
574 (linux_request_interrupt): Delete "signal_pid".
575 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
576 (lynx_ptrace_fun): New function.
577 (lynx_create_inferior): Adjust function prototype to reflect
578 change on "target.h". Adjust function code to use
579 "fork_inferior".
580 * nto-low.c (nto_create_inferior): Adjust function prototype and
581 code to reflect change on "target.h". Update comments.
582 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
583 "common-terminal.h" and "environ.h".
584 (terminal_fd): Moved to fork-child.c.
585 (old_foreground_pgrp): Likewise.
586 (restore_old_foreground_pgrp): Likewise.
587 (last_status): Make it global.
588 (last_ptid): Likewise.
589 (our_environ): New variable.
590 (startup_with_shell): Likewise.
591 (program_name): Likewise.
592 (program_argv): Rename to...
593 (program_args): ...this.
594 (wrapper_argv): New variable.
595 (start_inferior): Delete function.
596 (get_exec_wrapper): New function.
597 (get_exec_file): Likewise.
598 (get_environ): Likewise.
599 (prefork_hook): Likewise.
600 (post_fork_inferior): Likewise.
601 (postfork_hook): Likewise.
602 (postfork_child_hook): Likewise.
603 (handle_v_run): Update code to deal with arguments coming from the
604 remote host. Update calls from "start_inferior" to
605 "create_inferior".
606 (captured_main): Likewise. Initialize environment variable. Call
607 "have_job_control".
608 * server.h (post_fork_inferior): New prototype.
609 (get_environ): Likewise.
610 (last_status): Declare.
611 (last_ptid): Likewise.
612 (signal_pid): Likewise.
613 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
614 (spu_ptrace_fun): New function.
615 (spu_create_inferior): Adjust function prototype to reflect change
616 on "target.h". Adjust function code to use "fork_inferior".
617 * target.c (target_terminal_init): New function.
618 (target_terminal_inferior): Likewise.
619 (target_terminal_ours): Likewise.
620 * target.h: Include <vector>.
621 (struct target_ops) <create_inferior>: Update prototype.
622 (create_inferior): Update macro.
623 * utils.c (gdb_flush_out_err): New function.
624 * win32-low.c (win32_create_inferior): Adjust function prototype
625 and code to reflect change on "target.h".
626
043a4934
SDJ
6272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
628
629 * inferiors.c (switch_to_thread): New function.
630
15652511
SDJ
6312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
632
633 * Makefile.in (SFILE): Add "common/job-control.c".
634 (OBS): Add "job-control.o".
635
21ea5acd
SDJ
6362017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
637
638 * Makefile: Remove "@host_makefile_frag@".
639
e13cb306
PA
6402017-05-05 Pedro Alves <palves@redhat.com>
641
642 * configure: Regenerate.
643
c94fee56
SDJ
6442017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
645
646 * configure: Regenerate.
647
a0ff9e1a
SM
6482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
649
650 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
651 software_single_step change of return type to
652 std::vector<CORE_ADDR>.
653 * linux-low.c (install_software_single_step_breakpoints):
654 Likewise.
655 * linux-low.h (install_software_single_step_breakpoints):
656 Likewise.
657
be628ab8
SDJ
6582017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
659
660 * remote-utils.c: Include "gdb_termios.h" instead of
661 "terminal.h".
662 * terminal.h: Delete file.
663
7c5ded6a
SDJ
6642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
665
666 * server.c: Include <vector>.
667 <program_argv, wrapper_argv>: Convert to std::vector.
668 (start_inferior): Rewrite function to use C++.
669 (handle_v_run): Likewise. Update code that calculates the argv
670 based on the vRun packet; use C++.
671 (captured_main): Likewise.
672
436252de
SM
6732017-04-06 Simon Marchi <simon.marchi@ericsson.com>
674
675 * server.c (handle_v_cont): Initialize thread_resume::thread
676 with null_ptid.
677
9bf2a700
PA
6782017-04-05 Pedro Alves <palves@redhat.com>
679
680 * configure: Regenerate.
681
a121b7c1
PA
6822017-04-05 Pedro Alves <palves@redhat.com>
683
684 * gdbreplay.c (sync_error): Constify.
685 * linux-x86-low.c (push_opcode): Constify.
686
21c8a587
PA
6872017-04-05 Pedro Alves <palves@redhat.com>
688
689 * win32-low.c (get_child_debug_event)
690 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
691 Report TARGET_WAITKIND_SPURIOUS instead.
692
fb32b4f7
PA
6932017-04-05 Pedro Alves <palves@redhat.com>
694
695 * remote-utils.c (remote_prepare, remote_open): Constify.
696 * remote-utils.h (remote_prepare, remote_open): Constify.
697 * server.c (captured_main): Constify 'port' handling.
698
65dd1e59
SM
6992017-04-04 Simon Marchi <simon.marchi@ericsson.com>
700
701 * Makefile.in (clean): Clear .deps.
702
8fa5b777
SM
7032017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * .gitignore: Remove generated files, replace with wildcard.
706 * (clean): Replace removal of generated files with wildcard.
707 (version.c): Replace with...
708 (version-generated.c): ...this.
709 (xml-builtin.c): Replace with...
710 (xml-builtin-generated.c): ...this.
711 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
712 (%.c: *regformats*): Replace with...
713 (%-generated.c: *regformats*): ...this.
714
a12e714b
MF
7152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
716
717 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
718 (xtensa_fill_gregset): Call collect_register_by_name for
719 threadptr register.
720 (xtensa_store_gregset): Call supply_register_by_name for
721 threadptr register.
722
1a09b50a
MF
7232017-03-27 Max Filippov <jcmvbkbc@gmail.com>
724
725 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
726 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
727 (xtensa_store_gregset): Call supply_register for all registers in
728 a0_regnum..a0_regnum + C0_NREGS range.
729
1a01e7c6
SM
7302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
731
732 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
733 (ax-ipa.o: ax.c): Remove.
734 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
735 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
736 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
737 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
738 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
739
36bc18a8
SM
7402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
743 (print-utils-ipa.o: ../common/print-utils.c): Remove.
744 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
745 (errors-ipa.o: ../common/errors.c): Remove.
746 (format-ipa.o: ../common/format.c): Remove.
747 (common-utils-ipa.o: ../common/common-utils.c): Remove.
748
a8ebe3d5
SM
7492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * Makefile.in (%-ipa.o: %.c): New rule.
752 (tracepoint-ipa.o: tracepoint.c): Remove.
753 (utils-ipa.o: utils.c): Remove.
754 (remote-utils-ipa.o: remote-utils.c): Remove.
755 (regcache-ipa.o: regcache.c): Remove.
756 (i386-linux-ipa.o: i386-linux.c): Remove.
757 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
758 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
759 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
760 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
761 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
762 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
763 (amd64-linux-ipa.o: amd64-linux.c): Remove.
764 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
765 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
766 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
767 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
768 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
769 (aarch64-ipa.o: aarch64.c): Remove.
770 (s390-linux32-ipa.o: s390-linux32.c): Remove.
771 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
772 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
773 (s390-linux64-ipa.o: s390-linux64.c): Remove.
774 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
775 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
776 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
777 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
778 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
779 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
780 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
781 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
782 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
783 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
784 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
785 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
786 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
787 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
788 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
789 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
790 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
791 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
792 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
793 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
794 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
795 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
796 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
797 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
798 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
799 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
800 (tdesc-ipa.o: tdesc.c): Remove.
801 (x32-linux-ipa.o: x32-linux.c): Remove.
802 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
803 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
804
50cfacb7
SM
8052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
806
807 * Makefile.in (%.o: ../arch/%.c): New rule.
808 (arm.o: ../arch/arm.c): Remove.
809 (arm-linux.o: ../arch/arm-linux.c): Remove.
810 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
811 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
812
c5a22423
SM
8132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
814
815 * Makefile.in (%.o: ../nat/%.c): New rule.
816 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
817 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
818 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
819 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
820 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
821 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
822 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
823 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
824 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
825 (linux-personality.o: ../nat/linux-personality.c): Remove.
826 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
827 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
828 (x86-linux.o: ../nat/x86-linux.c): Remove.
829 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
830 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
831
6bda016b
SM
8322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
833
834 * Makefile.in (%.o: ../common/%.c): New rule.
835 (signals.o: ../common/signals.c): Remove.
836 (print-utils.o: ../common/print-utils.c): Remove.
837 (rsp-low.o: ../common/rsp-low.c): Remove.
838 (common-utils.o: ../common/common-utils.c): Remove.
839 (posix-strerror.o: ../common/posix-strerror.c): Remove.
840 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
841 (vec.o: ../common/vec.c): Remove.
842 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
843 (xml-utils.o: ../common/xml-utils.c): Remove.
844 (ptid.o: ../common/ptid.c): Remove.
845 (buffer.o: ../common/buffer.c): Remove.
846 (format.o: ../common/format.c): Remove.
847 (filestuff.o: ../common/filestuff.c): Remove.
848 (agent.o: ../common/agent.c): Remove.
849 (errors.o: ../common/errors.c): Remove.
850 (environ.o: ../common/environ.c): Remove.
851 (common-debug.o: ../common/common-debug.c): Remove.
852 (cleanups.o: ../common/cleanups.c): Remove.
853 (common-exceptions.o: ../common/common-exceptions.c): Remove.
854 (fileio.o: ../common/fileio.c): Remove.
855 (common-regcache.o: ../common/common-regcache.c): Remove.
856 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
857 (new-op.o: ../common/new-op.c): Remove.
858 (btrace-common.o: ../common/btrace-common.c): Remove.
859
21122961
SM
8602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
861
862 * Makefile.in (%.o: ../target/%.c): New rule.
863 (waitstatus.o: ../target/waitstatus.c): Remove.
864
c362e621
SM
8652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
866
867 * Makefile.in
868 (%.c: ../regformats/%.dat,
869 (%.c: ../regformats/arm/%.dat,
870 (%.c: ../regformats/i386/%.dat,
871 (%.c: ../regformats/rs6000/%.dat): New rules.
872 (aarch64.c): Remove.
873 (reg-arm.c): Remove.
874 (arm-with-iwmmxt.c): Remove.
875 (arm-with-vfpv2.c): Remove.
876 (arm-with-vfpv3.c): Remove.
877 (arm-with-neon.c): Remove.
878 (reg-bfin.c): Remove.
879 (reg-cris.c): Remove.
880 (reg-crisv32.c): Remove.
881 (i386.c): Remove.
882 (i386-linux.c): Remove.
883 (i386-avx.c): Remove.
884 (i386-avx-linux.c): Remove.
885 (i386-avx-avx512.c): Remove.
886 (i386-avx-avx512-linux.c): Remove.
887 (i386-mpx.c): Remove.
888 (i386-mpx-linux.c): Remove.
889 (i386-avx-mpx-avx512-pku.c): Remove.
890 (i386-avx-mpx-avx512-pku-linux.c): Remove.
891 (i386-avx-mpx.c): Remove.
892 (i386-avx-mpx-linux.c): Remove.
893 (i386-mmx.c): Remove.
894 (i386-mmx-linux.c): Remove.
895 (reg-ia64.c): Remove.
896 (reg-m32r.c): Remove.
897 (reg-m68k.c): Remove.
898 (reg-cf.c): Remove.
899 (mips-linux.c): Remove.
900 (mips-dsp-linux.c): Remove.
901 (mips64-linux.c): Remove.
902 (mips64-dsp-linux.c): Remove.
903 (nios2-linux.c): Remove.
904 (powerpc-32.c): Remove.
905 (powerpc-32l.c): Remove.
906 (powerpc-altivec32l.c): Remove.
907 (powerpc-cell32l.c): Remove.
908 (powerpc-vsx32l.c): Remove.
909 (powerpc-isa205-32l.c): Remove.
910 (powerpc-isa205-altivec32l.c): Remove.
911 (powerpc-isa205-vsx32l.c): Remove.
912 (powerpc-e500l.c): Remove.
913 (powerpc-64l.c): Remove.
914 (powerpc-altivec64l.c): Remove.
915 (powerpc-cell64l.c): Remove.
916 (powerpc-vsx64l.c): Remove.
917 (powerpc-isa205-64l.c): Remove.
918 (powerpc-isa205-altivec64l.c): Remove.
919 (powerpc-isa205-vsx64l.c): Remove.
920 (s390-linux32.c): Remove.
921 (s390-linux32v1.c): Remove.
922 (s390-linux32v2.c): Remove.
923 (s390-linux64.c): Remove.
924 (s390-linux64v1.c): Remove.
925 (s390-linux64v2.c): Remove.
926 (s390-te-linux64.c): Remove.
927 (s390-vx-linux64.c): Remove.
928 (s390-tevx-linux64.c): Remove.
929 (s390x-linux64.c): Remove.
930 (s390x-linux64v1.c): Remove.
931 (s390x-linux64v2.c): Remove.
932 (s390x-te-linux64.c): Remove.
933 (s390x-vx-linux64.c): Remove.
934 (s390x-tevx-linux64.c): Remove.
935 (tic6x-c64xp-linux.c): Remove.
936 (tic6x-c64x-linux.c): Remove.
937 (tic6x-c62x-linux.c): Remove.
938 (reg-sh.c): Remove.
939 (reg-sparc64.c): Remove.
940 (reg-spu.c): Remove.
941 (amd64.c): Remove.
942 (amd64-linux.c): Remove.
943 (amd64-avx.c): Remove.
944 (amd64-avx-linux.c): Remove.
945 (amd64-avx-avx512.c): Remove.
946 (amd64-avx-avx512-linux.c): Remove.
947 (amd64-mpx.c): Remove.
948 (amd64-mpx-linux.c): Remove.
949 (amd64-avx-mpx-avx512-pku.c): Remove.
950 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
951 (amd64-avx-mpx.c): Remove.
952 (amd64-avx-mpx-linux.c): Remove.
953 (x32.c): Remove.
954 (x32-linux.c): Remove.
955 (x32-avx.c): Remove.
956 (x32-avx-linux.c): Remove.
957 (x32-avx-avx512.c): Remove.
958 (x32-avx-avx512-linux.c): Remove.
959 (reg-xtensa.c): Remove.
960 (reg-tilegx.c): Remove.
961 (reg-tilegx32.c): Remove.
962
1672e0d9
SDJ
9632017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
964
965 * Makefile.in (SFILES): Add "common/environ.c".
966 (OBJS): Add "common/environ.h".
967
239b6d10
WT
9682017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
969
970 * configure.ac: Check if the fs_base and gs_base members of
971 `struct user_regs_struct' exist.
972 * config.in: Regenerated.
973 * configure: Likewise.
974
694b382c
AT
9752017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
976
977 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
978 target_read_memory.
979 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
980 (get_next_pcs_syscall_next_pc): Likewise.
981
7dc53023
LM
9822016-12-23 Luis Machado <lgustavo@codesourcery.com>
983
984 * win32-i386-low.c: Fix incorrect reference to a couple source files.
985 * nto-x86-low.c: Likewise.
986
ad02e4fe
SM
9872016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
988
989 * Makefile.in: Include disable-implicit-rules.mk.
990
dcb07cfa
PA
9912016-11-23 Pedro Alves <palves@redhat.com>
992
993 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
994 (debug_vprintf): Use std::chrono::steady_clock instead of
995 gettimeofday. Use '.' instead of ':'.
996 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
997 (get_timestamp): Use std::chrono::steady_clock instead of
998 gettimeofday.
999
8629c02c
SM
10002016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1001
1002 * Makefile.in: Fix whitespace formatting.
1003
b593ecca
SM
10042016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1005
1006 * Makefile.in (SFILES, OBS): Flatten list and order
1007 alphabetically.
1008
9986ba08
PA
10092016-11-23 Pedro Alves <palves@redhat.com>
1010
1011 * event-loop.c (handle_file_event): Use warning.
1012 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1013 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1014 Use warning.
1015
4eefa7bc
PA
10162016-11-23 Pedro Alves <palves@redhat.com>
1017
1018 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1019 output.
1020 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1021 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1022 debug_printf and debug_flush for debug output.
1023 * server.c (handle_general_set): Likewise.
1024 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1025 output.
1026
5443506e
SM
10272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1028
1029 * Makefile.in (.c.o): Replace rule with ...
1030 (%.o: %.c): ... this one.
1031
3b165252
SM
10322016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1033
1034 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1035 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1036 make.
1037 * configure.ac: Remove checks for the make program.
1038 * configure: Re-generate.
1039
0bcda685
PA
10402016-10-28 Pedro Alves <palves@redhat.com>
1041
1042 * Makefile.in (CXX_DIALECT): Get from configure.
1043 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1044 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1045 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1046 * config.in: Regenerate.
1047 * configure: Regenerate.
1048
c3805894
YQ
10492016-10-27 Yao Qi <yao.qi@linaro.org>
1050
1051 * linux-low.c (linux_supports_range_stepping): Return true if
1052 can_software_single_step return true.
1053
89342618
YQ
10542016-10-27 Yao Qi <yao.qi@linaro.org>
1055
1056 * inferiors.c (find_inferior_in_random): New function.
1057 * inferiors.h (find_inferior_in_random): Declare.
1058 * linux-low.c (linux_wait_for_event_filtered): Call
1059 find_inferior_in_random instead of find_inferior.
1060
e3652c84
YQ
10612016-10-27 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-low.c (linux_wait_1): If single-step breakpoints are
1064 inserted, remove them.
1065
5a04c4cf
PA
10662016-10-26 Pedro Alves <palves@redhat.com>
1067
1068 * linux-low.c (handle_extended_wait): Link parent/child fork
1069 threads.
1070 (linux_wait_1): Unlink them.
1071 (linux_set_resume_request): Ignore resume requests for
1072 already-resumed and unhandled fork child threads.
1073 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1074 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1075 New functions.
1076 (handle_v_requests) <vCont>: Don't call require_running.
1077 * server.h (in_queued_stop_replies): New declaration.
1078
cb93dc7f
YQ
10792016-10-24 Yao Qi <yao.qi@linaro.org>
1080
1081 PR server/20733
1082 * linux-aarch64-low.c (append_insns): Cast the return value to
1083 'uint32_t *'.
1084
a1078bea
YQ
10852016-10-10 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1088
1fb77080
SDJ
10892016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1090
1091 * target.c (target_supports_multi_process): New function, moved
1092 from...
1093 * target.h (target_supports_multi_process): ... here. Remove
1094 macro.
1095
39b5a3b9
TT
10962016-10-05 Tom Tromey <tom@tromey.com>
1097
1098 PR remote/20655:
1099 * tracepoint.c (handle_tracepoint_bkpts): Check
1100 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1101
c1d0b70a
YQ
11022016-10-05 Yao Qi <yao.qi@linaro.org>
1103
1104 * configure.srv: Update the path of arm-*.xml files.
1105
0a69eedb
YQ
11062016-10-05 Terry Guo <terry.guo@arm.com>
1107 Yao Qi <yao.qi@linaro.org>
1108
1109 * Makefile.in: Adjust the path of rules.
1110 * configure.srv: Update the path of xml files.
1111 * regformats/arm-with-iwmmxt.dat: Regenerated.
1112 * regformats/arm-with-neon.dat: Likewise.
1113 * regformats/arm-with-vfpv2.dat: Likewise.
1114 * regformats/arm-with-vfpv3.dat Likewise.
1115
17e16485
YQ
11162016-09-30 Yao Qi <yao.qi@linaro.org>
1117
1118 PR gdbserver/20627
1119 * target.c (target_stop_and_wait): Don't call
1120 target_continue_no_signal, use resume_stop instead.
1121
edeeb602
YQ
11222016-09-26 Yao Qi <yao.qi@linaro.org>
1123
1124 * linux-low.c (linux_wait_1): Call debug_exit.
1125
503b1c39
PA
11262016-09-23 Pedro Alves <palves@redhat.com>
1127
1128 * Makefile.in (SFILES): Add common/new-op.c.
1129 (OBS): Add common/new-op.o.
1130 (new-op.o): New rule.
1131
74172ecf
SM
11322016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1133
1134 * .gitinore: Ignore more files.
1135
fc6cda2e
YQ
11362016-09-21 Yao Qi <yao.qi@linaro.org>
1137
1138 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1139 23.
1140
bc1e6c81
SDJ
11412016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1142
1143 * server.c (start_inferior): Call target_mourn_inferior instead of
1144 mourn_inferior; pass ptid_t argument to it.
1145 (resume): Likewise.
1146 (handle_target_event): Likewise.
1147 * target.c (target_mourn_inferior): New function.
1148 * target.h (mourn_inferior): Delete macro.
1149
0e00e962
AA
11502016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1151
1152 * linux-low.c (lwp_is_stepping): New function.
1153
1d8cb77d
CL
11542016-09-06 Carl Love <cel@us.ibm.com>
1155
1156 * server.c (start_inferior): Fixed comment, requested comment change
1157 didn't get updated correctly. Removed reference to ptrace () call as
1158 it is only true on Linux systems.
1159
7313bced
CL
11602016-09-06 Carl Love <cel@us.ibm.com>
1161
1162 * server.c (start_inferior): Do not call
1163 function target_post_create_inferior () if the
1164 inferior process has already exited.
1165
cf6de44d
PA
11662016-09-05 Pedro Alves <palves@redhat.com>
1167
1168 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1169 (COMPILE.pre, CC_LD): Use CXX directly.
1170 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1171 * acinclude.m4: Don't include build-with-cxx.m4.
1172 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1173 * configure: Regenerate.
1174
c1da6748
AT
11752016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1176
1177 PR gdb/19495
1178 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1179 call writing data to own_buf.
1180
f2b9e3df
SDJ
11812016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1182
1183 * target.c (mywait): Call target_wait instead of
1184 the_target->wait.
1185 (target_wait): New function.
1186
049a8570
SDJ
11872016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1188
1189 * server.c (start_inferior): New variable 'ptid'. Replace calls
1190 to the_target->resume by target_continue{,_no_signal}, depending
1191 on the case.
1192 * target.c (target_stop_and_wait): Call target_continue_no_signal
1193 instead of the_target->resume.
1194 (target_continue): New function.
1195
3aa5cfa0
AT
11962016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1197
1198 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1199
754653a7
AZ
12002016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1201
1202 PR server/20491
1203 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1204 ps_prochandle.
1205 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1206 * linux-arm-low.c (ps_get_thread_area): Likewise.
1207 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1208 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1209 * linux-mips-low.c (ps_get_thread_area): Likewise.
1210 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1211 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1212 * linux-x86-low.c (ps_get_thread_area): Likewise.
1213 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1214
ed036b40
PA
12152016-08-19 Pedro Alves <palves@redhat.com>
1216
1217 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1218
c8ef42ee
PA
12192016-08-19 Pedro Alves <palves@redhat.com>
1220
1221 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1222 comment. Use memcpy instead of casting through unsigned long.
1223
9c235a72
PA
12242016-08-19 Pedro Alves <palves@redhat.com>
1225
1226 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1227 allocating around 0x80000000.
1228
201506da
PA
12292016-08-19 Pedro Alves <palves@redhat.com>
1230
1231 PR gdb/20415
1232 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1233 (x32-avx512-linux-ipa.o): New rules.
1234 * configure.ac (x86_64-*-linux*): New x32 check.
1235 * configure.srv (ipa_x32_linux_regobj): New.
1236 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1237 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1238 descriptions.
1239 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1240 descriptions.
1241 * configure: Regenerate.
1242
f348d89a
PA
12432016-08-09 Pedro Alves <palves@redhat.com>
1244
1245 PR gdb/18653
1246 * Makefile.in (OBS): Add signals-state-save-restore.o.
1247 (signals-state-save-restore.o): New rule.
1248 * config.in: Regenerate.
1249 * configure: Regenerate.
1250 * linux-low.c: Include "signals-state-save-restore.h".
1251 (linux_create_inferior): Call
1252 restore_original_signals_state.
1253 * server.c: Include "dispositions-save-restore.h".
1254 (captured_main): Call save_original_signals_state.
1255
1baf5149
PA
12562016-08-05 Pedro Alves <palves@redhat.com>
1257
1258 * configure: Regenerate.
1259
fcd4a73d
YQ
12602016-08-04 Yao Qi <yao.qi@linaro.org>
1261
1262 * linux-low.c (regsets_fetch_inferior_registers): Check
1263 errno is ESRCH or not.
1264
979659d0
YQ
12652016-08-02 Yao Qi <yao.qi@linaro.org>
1266
1267 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1268 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1269 (thread_db_load_search): Update.
1270 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1271 td_ta_set_event and td_ta_event_getmsg.
1272
6598661d
PA
12732016-07-26 Pedro Alves <palves@redhat.com>
1274
1275 PR server/20414
1276 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1277 of unsigned long for 64-bit registers and use uint32_t instead of
1278 unsigned int for 32-bit registers.
1279
9cf12d57
PA
12802016-07-26 Pedro Alves <palves@redhat.com>
1281
1282 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1283 to 'ptrace'.
1284
305450ed
TT
12852016-07-21 Tom Tromey <tom@tromey.com>
1286
1287 * configure: Rebuild.
1288
2583da7c
YQ
12892016-07-21 Yao Qi <yao.qi@linaro.org>
1290
1291 * mem-break.c (find_gdb_breakpoint): Cast bp to
1292 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1293
21536b36
YQ
12942016-07-21 Yao Qi <yao.qi@linaro.org>
1295
1296 * server.c (handle_v_requests): Support s and S actions
1297 if target_supports_software_single_step return true.
1298
8901d193
YQ
12992016-07-21 Yao Qi <yao.qi@linaro.org>
1300
1301 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1302 is resume_step, call maybe_hw_step.
1303 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1304 and unstop them.
1305 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1306 breakpoints or not.
1307 (proceed_one_lwp): If resume request is resume_step, install
1308 reinsert breakpoints and call maybe_hw_step.
1309
0e9a339e
YQ
13102016-07-21 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-low.c (proceed_one_lwp): Declare.
1313 (linux_resume_one_thread): Remove local variable 'step'.
1314 Lift code enqueue signal. Call proceed_one_lwp instead of
1315 linux_resume_one_lwp.
1316
4281b351
YQ
13172016-07-21 Yao Qi <yao.qi@linaro.org>
1318
1319 * linux-low.c (linux_resume_one_thread): Call
1320 enqueue_pending_signal.
1321
984a2c04
YQ
13222016-07-21 Yao Qi <yao.qi@linaro.org>
1323
1324 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1325 * inferiors.c (do_restore_current_thread_cleanup): New function.
1326 (make_cleanup_restore_current_thread): Likewise.
1327 * linux-low.c (install_software_single_step_breakpoints): Call
1328 make_cleanup_restore_current_thread. Switch current_thread to
1329 thread.
1330
bec903c9
YQ
13312016-07-21 Yao Qi <yao.qi@linaro.org>
1332
1333 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1334 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1335 (clone_one_breakpoint): Likewise.
1336 (delete_reinsert_breakpoints): Change parameter to thread.
1337 Callers updated.
1338 (has_reinsert_breakpoints): Likewise.
1339 (uninsert_reinsert_breakpoints): Likewise.
1340 (reinsert_reinsert_breakpoints): Likewise.
1341 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1342 (delete_reinsert_breakpoints): Likewise.
1343 (reinsert_reinsert_breakpoints): Likewise.
1344 (uninsert_reinsert_breakpoints): Likewise.
1345 (has_reinsert_breakpoints): Likewise.
1346
63c40ec7
YQ
13472016-07-21 Yao Qi <yao.qi@linaro.org>
1348
1349 * inferiors.c (get_thread_process): Make parameter const.
1350 * inferiors.h (get_thread_process): Update declaration.
1351 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1352 Add new parameters child_thread and parent_thread. Callers
1353 updated.
1354 * mem-break.h (clone_all_breakpoints): Update declaration.
1355
9aa76cd0
YQ
13562016-07-21 Yao Qi <yao.qi@linaro.org>
1357
1358 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1359 <command_list, handler>: Remove.
1360 (struct gdb_breakpoint): New.
1361 (struct other_breakpoint): New.
1362 (struct reinsert_breakpoint): New.
1363 (is_gdb_breakpoint): New function.
1364 (any_persistent_commands): Update command_list if
1365 is_gdb_breakpoint returns true.
1366 (set_breakpoint): Create breakpoints according to their types.
1367 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1368 (set_gdb_breakpoint_1): Likewise.
1369 (set_gdb_breakpoint): Likewise.
1370 (clear_breakpoint_conditions): Change parameter type to
1371 'struct gdb_breakpoint *'.
1372 (clear_breakpoint_commands): Likewise.
1373 (clear_breakpoint_conditions_and_commands): Likewise.
1374 (add_condition_to_breakpoint): Likewise.
1375 (add_breakpoint_condition): Likewise.
1376 (add_commands_to_breakpoint): Likewise.
1377 (check_breakpoints): Check other_breakpoint.
1378 (clone_one_breakpoint): Clone breakpopint according to its type.
1379 * mem-break.h (struct gdb_breakpoint): Declare.
1380 (set_gdb_breakpoint): Update declaration.
1381 (clear_breakpoint_conditions_and_commands): Likewise.
1382 (add_breakpoint_condition): Likewise.
1383 (add_breakpoint_commands): Likewise.
1384 * server.c (process_point_options): Change parameter type to
1385 'struct gdb_breakpoint *'.
1386
811f8301
YQ
13872016-07-21 Yao Qi <yao.qi@linaro.org>
1388
1389 * mem-break.c (set_breakpoint_at): Rename it to ...
1390 (set_breakpoint_type_at): ... it.
1391 (set_breakpoint_at): Call set_breakpoint_type_at.
1392 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1393 * mem-break.h (set_breakpoint_at): Update comments.
1394
b1c51e36
CLT
13952016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1396
1397 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1398 to buf parameter.
1399 (nios2_store_gregset): Likewise.
1400
ced2dffb
PA
14012016-07-01 Pedro Alves <palves@redhat.com>
1402 Antoine Tremblay <antoine.tremblay@ericsson.com>
1403
1404 * linux-low.c: Change interface to take the target lwp_info
1405 pointer directly and return void. Handle detaching from a zombie
1406 thread.
1407 (linux_detach_lwp_callback): New function.
1408 (linux_detach): Detach from the leader thread after detaching from
1409 the clone threads.
1410
2ac09a5b
YQ
14112016-06-28 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1414 for variable new_offset.
1415 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1416 (aarch64_ftrace_insn_reloc_cb): Likewise.
1417 (aarch64_ftrace_insn_reloc_tb): Likewise.
1418 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1419 PRIx64 instead of PRIx32.
1420
79e7fd4f
YQ
14212016-06-28 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1424 (the_low_target): Install arm_get_syscall_trapinfo.
1425
061fc021
YQ
14262016-06-28 Yao Qi <yao.qi@linaro.org>
1427
1428 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1429 function.
1430 (the_low_target): Install aarch64_get_syscall_trapinfo.
1431
4cc32bec
YQ
14322016-06-28 Yao Qi <yao.qi@linaro.org>
1433
1434 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1435 Callers updated.
1436 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1437 Remove parameter sysno.
1438 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1439 sysret.
1440
782c1122
AA
14412016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1442
1443 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1444 (s390_emit_ne_goto): Likewise.
1445 (s390_emit_lt_goto): Likewise.
1446 (s390_emit_le_goto): Likewise.
1447 (s390_emit_gt_goto): Likewise.
1448 (s390_emit_ge_goto): Likewise.
1449 (s390x_emit_eq_goto): Likewise.
1450 (s390x_emit_ne_goto): Likewise.
1451 (s390x_emit_lt_goto): Likewise.
1452 (s390x_emit_le_goto): Likewise.
1453 (s390x_emit_gt_goto): Likewise.
1454 (s390x_emit_ge_goto): Likewise.
1455 (s390_emit_ops_impl): Mark variable static.
1456 (s390x_emit_ops): Likewise.
1457
2e7b624b
YQ
14582016-06-17 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-low.c (handle_extended_wait): Call
1461 uninsert_reinsert_breakpoints for the parent process. Remove
1462 reinsert breakpoints from the child process. Reinsert them to
1463 the parent process when vfork is done.
1464 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1465 (reinsert_reinsert_breakpoints): New function.
1466 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1467 (reinsert_reinsert_breakpoints): Declare.
1468
8a81c5d7
YQ
14692016-06-17 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-low.c (handle_extended_wait): If the parent is doing
1472 step-over, remove the reinsert breakpoints from the forked child.
1473
f50bf8e5
YQ
14742016-06-17 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-low.c (unsuspend_all_lwps): Declare.
1477 (linux_low_filter_event): If thread exited, call finish_step_over.
1478 If step-over is finished, unsuspend other threads.
1479
8376a3cb
YQ
14802016-06-17 Yao Qi <yao.qi@linaro.org>
1481
1482 * linux-low.c (linux_resume_one_lwp_throw): Assert
1483 has_reinsert_breakpoints returns false.
1484 * mem-break.c (delete_disabled_breakpoints): Assert
1485 bp type isn't reinsert_breakpoint.
1486
f79b145d
YQ
14872016-06-17 Yao Qi <yao.qi@linaro.org>
1488
1489 * linux-low.c (maybe_hw_step): New function.
1490 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1491 (finish_step_over): Switch current_thread to lwp temporarily,
1492 and assert has_reinsert_breakpoints returns true.
1493 (proceed_one_lwp): Call maybe_hw_step.
1494 * mem-break.c (has_reinsert_breakpoints): New function.
1495 * mem-break.h (has_reinsert_breakpoints): Declare.
1496
0ae534d2
JT
14972016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1498
1499 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1500
fcdad592
YQ
15012016-05-17 Yao Qi <yao.qi@linaro.org>
1502
1503 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1504 instead of find_inferior.
1505
9e784964
YQ
15062016-05-05 Yao Qi <yao.qi@linaro.org>
1507
1508 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1509 Initialize res to zero.
1510
cf2ebb6e
YQ
15112016-05-05 Yao Qi <yao.qi@linaro.org>
1512
1513 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1514 to uint32_t.
1515
c1aebf87
UW
15162016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1517
1518 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1519 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1520 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1521
35fd2deb 15222016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1523 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1524
1525 * tracepoint.c (write_inferior_int8): New function.
1526 (cmd_qtenable_disable): Write enable flag using
1527 write_inferior_int8.
1528
484b3c32
YQ
15292016-04-25 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1532 (need_step_over_p): Return zero if the LWP has pending signals
1533 can be delivered on software single step target.
1534
85ba7d86
YQ
15352016-04-25 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1538 return instead of error.
1539
3539aa13
YQ
15402016-04-22 Yao Qi <yao.qi@linaro.org>
1541
1542 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1543 to 23.
1544
5b061e98
YQ
15452016-04-22 Yao Qi <yao.qi@linaro.org>
1546
1547 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1548 signal when stepping over breakpoint with software single
1549 step.
1550
3451269c
PA
15512016-04-21 Pedro Alves <palves@redhat.com>
1552
1553 * linux-s390-low.c (s390_collect_ptrace_register)
1554 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1555 add casts.
1556 (s390_check_regset): Use void * instead of gdb_byte *.
1557
a2358508
PA
15582016-04-20 Pedro Alves <palves@redhat.com>
1559
1560 * configure: Renegerate.
1561
6885166d
YQ
15622016-04-20 Yao Qi <yao.qi@linaro.org>
1563
1564 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1565 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1566 number 16.
1567 (arm_store_gregset): Likewise.
1568
2b863f51
WT
15692016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1570
1571 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1572 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1573 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1574 (amd64-avx-mpx-linux.c): New rules.
1575 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1576 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1577 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1578 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1579 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1580 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1581 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1582 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1583 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1584 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1585 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1586 * linux-x86-low.c (x86_linux_read_description): Add case for
1587 X86_XSTATE_AVX_MPX_MASK.
1588 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1589 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1590 init_registers_i386_avx_mpx_linux.
1591 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1592 (initialize_low_tracepoint): Call
1593 init_registers_i386_avx_mpx_linux.
1594 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1595 (initialize_low_tracepoint): Call
1596 init_registers_amd64_avx_mpx_linux.
1597 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1598 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1599 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1600 declarations.
1601
9b30624b
PA
16022016-04-18 Pedro Alves <palves@redhat.com>
1603
1604 * configure: Regenerate.
1605
45e3745e
AT
16062016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1607
1608 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1609 (aarch64_emit_sub): Likewise.
1610
2afc13ff
PA
16112016-04-12 Pedro Alves <palves@redhat.com>
1612
1613 * utils.c (prepare_to_throw_exception): Delete.
1614
6e774b13
SM
16152016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1616
1617 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1618
4dca19f8
MK
16192016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1620
1621 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1622
d0a9981f
MK
16232016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1624
1625 * linux-aarch64-ipa.c: Add <elf.h> include.
1626 * linux-ppc-ipa.c: Add <elf.h> include.
1627 * linux-s390-ipa.c: Add <elf.h> include.
1628
252db07e
MK
16292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1630
1631 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1632 (get_raw_reg_ptr): Likewise.
1633 (get_trace_state_variable_value_ptr): Likewise.
1634 (set_trace_state_variable_value_ptr): Likewise.
1635 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1636 char *.
1637
14e2b6d9
MK
16382016-03-31 Wei-cheng Wang <cole945@gmail.com>
1639 Marcin Kościelnicki <koriakin@0x04.net>
1640
1641 PR/17221
1642 * linux-ppc-low.c (emit_insns): New function.
1643 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1644 (ppc_emit_prologue): New function.
1645 (ppc_emit_epilogue): New function.
1646 (ppc_emit_add): New function.
1647 (ppc_emit_sub): New function.
1648 (ppc_emit_mul): New function.
1649 (ppc_emit_lsh): New function.
1650 (ppc_emit_rsh_signed): New function.
1651 (ppc_emit_rsh_unsigned): New function.
1652 (ppc_emit_ext): New function.
1653 (ppc_emit_zero_ext): New function.
1654 (ppc_emit_log_not): New function.
1655 (ppc_emit_bit_and): New function.
1656 (ppc_emit_bit_or): New function.
1657 (ppc_emit_bit_xor): New function.
1658 (ppc_emit_bit_not): New function.
1659 (ppc_emit_equal): New function.
1660 (ppc_emit_less_signed): New function.
1661 (ppc_emit_less_unsigned): New function.
1662 (ppc_emit_ref): New function.
1663 (ppc_emit_const): New function.
1664 (ppc_emit_reg): New function.
1665 (ppc_emit_pop): New function.
1666 (ppc_emit_stack_flush): New function.
1667 (ppc_emit_swap): New function.
1668 (ppc_emit_stack_adjust): New function.
1669 (ppc_emit_call): New function.
1670 (ppc_emit_int_call_1): New function.
1671 (ppc_emit_void_call_2): New function.
1672 (ppc_emit_if_goto): New function.
1673 (ppc_emit_goto): New function.
1674 (ppc_emit_eq_goto): New function.
1675 (ppc_emit_ne_goto): New function.
1676 (ppc_emit_lt_goto): New function.
1677 (ppc_emit_le_goto): New function.
1678 (ppc_emit_gt_goto): New function.
1679 (ppc_emit_ge_goto): New function.
1680 (ppc_write_goto_address): New function.
1681 (ppc_emit_ops_impl): New static variable.
1682 (ppc64v1_emit_prologue): New function.
1683 (ppc64v2_emit_prologue): New function.
1684 (ppc64_emit_epilogue): New function.
1685 (ppc64_emit_add): New function.
1686 (ppc64_emit_sub): New function.
1687 (ppc64_emit_mul): New function.
1688 (ppc64_emit_lsh): New function.
1689 (ppc64_emit_rsh_signed): New function.
1690 (ppc64_emit_rsh_unsigned): New function.
1691 (ppc64_emit_ext): New function.
1692 (ppc64_emit_zero_ext): New function.
1693 (ppc64_emit_log_not): New function.
1694 (ppc64_emit_bit_and): New function.
1695 (ppc64_emit_bit_or): New function.
1696 (ppc64_emit_bit_xor): New function.
1697 (ppc64_emit_bit_not): New function.
1698 (ppc64_emit_equal): New function.
1699 (ppc64_emit_less_signed): New function.
1700 (ppc64_emit_less_unsigned): New function.
1701 (ppc64_emit_ref): New function.
1702 (ppc64_emit_const): New function.
1703 (ppc64v1_emit_reg): New function.
1704 (ppc64v2_emit_reg): New function.
1705 (ppc64_emit_pop): New function.
1706 (ppc64_emit_stack_flush): New function.
1707 (ppc64_emit_swap): New function.
1708 (ppc64v1_emit_call): New function.
1709 (ppc64v2_emit_call): New function.
1710 (ppc64v1_emit_int_call_1): New function.
1711 (ppc64v2_emit_int_call_1): New function.
1712 (ppc64v1_emit_void_call_2): New function.
1713 (ppc64v2_emit_void_call_2): New function.
1714 (ppc64_emit_if_goto): New function.
1715 (ppc64_emit_eq_goto): New function.
1716 (ppc64_emit_ne_goto): New function.
1717 (ppc64_emit_lt_goto): New function.
1718 (ppc64_emit_le_goto): New function.
1719 (ppc64_emit_gt_goto): New function.
1720 (ppc64_emit_ge_goto): New function.
1721 (ppc64v1_emit_ops_impl): New static variable.
1722 (ppc64v2_emit_ops_impl): New static variable.
1723 (ppc_emit_ops): New function.
1724 (linux_low_target): Wire in ppc_emit_ops.
1725
a2174ba4
MK
17262016-03-31 Wei-cheng Wang <cole945@gmail.com>
1727 Marcin Kościelnicki <koriakin@0x04.net>
1728
1729 PR/17221
1730 * Makefile.in: Add powerpc-*-ipa.o
1731 * configure.srv: Add ipa_obj for powerpc*-linux.
1732 * linux-ppc-ipa.c: New file.
1733 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1734 includes.
1735 (PPC_FIELD): New macro.
1736 (PPC_SEXT): New macro.
1737 (PPC_OP6): New macro.
1738 (PPC_BO): New macro.
1739 (PPC_LI): New macro.
1740 (PPC_BD): New macro.
1741 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1742 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1743 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1744 (ppc_get_thread_area): New function.
1745 (is_elfv2_inferior): New function.
1746 (gen_ds_form): New function.
1747 (GEN_STD): New macro.
1748 (GEN_STDU): New macro.
1749 (GEN_LD): New macro.
1750 (GEN_LDU): New macro.
1751 (gen_d_form): New function.
1752 (GEN_ADDI): New macro.
1753 (GEN_ADDIS): New macro.
1754 (GEN_LI): New macro.
1755 (GEN_LIS): New macro.
1756 (GEN_ORI): New macro.
1757 (GEN_ORIS): New macro.
1758 (GEN_LWZ): New macro.
1759 (GEN_STW): New macro.
1760 (GEN_STWU): New macro.
1761 (gen_xfx_form): New function.
1762 (GEN_MFSPR): New macro.
1763 (GEN_MTSPR): New macro.
1764 (GEN_MFCR): New macro.
1765 (GEN_MTCR): New macro.
1766 (GEN_SYNC): New macro.
1767 (GEN_LWSYNC): New macro.
1768 (gen_x_form): New function.
1769 (GEN_OR): New macro.
1770 (GEN_MR): New macro.
1771 (GEN_LWARX): New macro.
1772 (GEN_STWCX): New macro.
1773 (GEN_CMPW): New macro.
1774 (gen_md_form): New function.
1775 (GEN_RLDICL): New macro.
1776 (GEN_RLDICR): New macro.
1777 (gen_i_form): New function.
1778 (GEN_B): New macro.
1779 (GEN_BL): New macro.
1780 (gen_b_form): New function.
1781 (GEN_BNE): New macro.
1782 (GEN_LOAD): New macro.
1783 (GEN_STORE): New macro.
1784 (gen_limm): New function.
1785 (gen_atomic_xchg): New function.
1786 (gen_call): New function.
1787 (ppc_relocate_instruction): New function.
1788 (ppc_install_fast_tracepoint_jump_pad): New function.
1789 (ppc_get_min_fast_tracepoint_insn_len): New function.
1790 (ppc_get_ipa_tdesc_idx): New function.
1791 (the_low_target): Wire in the new functions.
1792 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1793 tdescs.
1794 * linux-ppc-tdesc.h: New file.
1795
a13c4696
MK
17962016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1797
1798 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1799 (alloc_jump_pad_buffer): New function.
1800 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1801 (alloc_jump_pad_buffer): New function.
1802 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1803 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1804 (alloc_jump_pad_buffer): New function.
1805 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1806 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1807 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1808 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1809
1cda1512
MK
18102016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1811
1812 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1813 * linux-amd64-ipa.c: Likewise.
1814 * linux-i386-ipa.c: Likewise.
1815 * linux-s390-ipa.c: Likewise.
1816 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1817 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1818 set_trace_state_variable_value_ptr.
1819 (struct ipa_sym_addresses): Likewise.
1820 (symbol_list): Likewise.
1821 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1822 accessing gdb_collect directly.
1823 (gdb_collect_ptr_type): New typedef.
1824 (get_raw_reg_ptr_type): New typedef.
1825 (get_trace_state_variable_value_ptr_type): New typedef.
1826 (set_trace_state_variable_value_ptr_type): New typedef.
1827 (gdb_collect_ptr): New global.
1828 (get_raw_reg_ptr): New global.
1829 (get_trace_state_variable_value_ptr): New global.
1830 (set_trace_state_variable_value_ptr): New global.
1831 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1832 accessing get_raw_reg directly.
1833 (get_get_tsv_func_addr): Likewise for
1834 get_trace_state_variable_value_ptr.
1835 (get_set_tsv_func_addr): Likewise for
1836 set_trace_state_variable_value_ptr.
1837 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1838
72fb5488
SM
18392016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1840
1841 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1842
28170b88
MK
18432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1844
1845 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1846 packets.
1847 (relocate_instruction): Remove own_buf.
1848 * server.c (own_buf): Make global.
1849 (handle_v_requests): Make global.
1850 * server.h (own_buf): New declaration.
1851 (handle_v_requests): New prototype.
1852
f39e8743
MK
18532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1854
1855 PR 18377
1856 * linux-s390-low.c (add_insns): New function.
1857 (s390_emit_prologue): New function.
1858 (s390_emit_epilogue): New function.
1859 (s390_emit_add): New function.
1860 (s390_emit_sub): New function.
1861 (s390_emit_mul): New function.
1862 (s390_emit_lsh): New function.
1863 (s390_emit_rsh_signed): New function.
1864 (s390_emit_rsh_unsigned): New function.
1865 (s390_emit_ext): New function.
1866 (s390_emit_log_not): New function.
1867 (s390_emit_bit_and): New function.
1868 (s390_emit_bit_or): New function.
1869 (s390_emit_bit_xor): New function.
1870 (s390_emit_bit_not): New function.
1871 (s390_emit_equal): New function.
1872 (s390_emit_less_signed): New function.
1873 (s390_emit_less_unsigned): New function.
1874 (s390_emit_ref): New function.
1875 (s390_emit_if_goto): New function.
1876 (s390_emit_goto): New function.
1877 (s390_write_goto_address): New function.
1878 (s390_emit_litpool): New function.
1879 (s390_emit_const): New function.
1880 (s390_emit_call): New function.
1881 (s390_emit_reg): New function.
1882 (s390_emit_pop): New function.
1883 (s390_emit_stack_flush): New function.
1884 (s390_emit_zero_ext): New function.
1885 (s390_emit_swap): New function.
1886 (s390_emit_stack_adjust): New function.
1887 (s390_emit_set_r2): New function.
1888 (s390_emit_int_call_1): New function.
1889 (s390_emit_void_call_2): New function.
1890 (s390_emit_eq_goto): New function.
1891 (s390_emit_ne_goto): New function.
1892 (s390_emit_lt_goto): New function.
1893 (s390_emit_le_goto): New function.
1894 (s390_emit_gt_goto): New function.
1895 (s390_emit_ge_goto): New function.
1896 (s390x_emit_prologue): New function.
1897 (s390x_emit_epilogue): New function.
1898 (s390x_emit_add): New function.
1899 (s390x_emit_sub): New function.
1900 (s390x_emit_mul): New function.
1901 (s390x_emit_lsh): New function.
1902 (s390x_emit_rsh_signed): New function.
1903 (s390x_emit_rsh_unsigned): New function.
1904 (s390x_emit_ext): New function.
1905 (s390x_emit_log_not): New function.
1906 (s390x_emit_bit_and): New function.
1907 (s390x_emit_bit_or): New function.
1908 (s390x_emit_bit_xor): New function.
1909 (s390x_emit_bit_not): New function.
1910 (s390x_emit_equal): New function.
1911 (s390x_emit_less_signed): New function.
1912 (s390x_emit_less_unsigned): New function.
1913 (s390x_emit_ref): New function.
1914 (s390x_emit_if_goto): New function.
1915 (s390x_emit_const): New function.
1916 (s390x_emit_call): New function.
1917 (s390x_emit_reg): New function.
1918 (s390x_emit_pop): New function.
1919 (s390x_emit_stack_flush): New function.
1920 (s390x_emit_zero_ext): New function.
1921 (s390x_emit_swap): New function.
1922 (s390x_emit_stack_adjust): New function.
1923 (s390x_emit_int_call_1): New function.
1924 (s390x_emit_void_call_2): New function.
1925 (s390x_emit_eq_goto): New function.
1926 (s390x_emit_ne_goto): New function.
1927 (s390x_emit_lt_goto): New function.
1928 (s390x_emit_le_goto): New function.
1929 (s390x_emit_gt_goto): New function.
1930 (s390x_emit_ge_goto): New function.
1931 (s390_emit_ops): New function.
1932 (struct linux_target_ops): Fill in emit_ops hook.
1933
abd9baf9
MK
19342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1935
1936 PR 18377
1937 * Makefile.in: Add s390 IPA files.
1938 * configure.srv: Build IPA for s390.
1939 * linux-s390-ipa.c: New file.
1940 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1941 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1942 (tdesc_s390_linux32): Likewise.
1943 (init_registers_s390_linux32v1): Likewise.
1944 (tdesc_s390_linux32v1): Likewise.
1945 (init_registers_s390_linux32v2): Likewise.
1946 (tdesc_s390_linux32v2): Likewise.
1947 (init_registers_s390_linux64): Likewise.
1948 (tdesc_s390_linux64): Likewise.
1949 (init_registers_s390_linux64v1): Likewise.
1950 (tdesc_s390_linux64v1): Likewise.
1951 (init_registers_s390_linux64v2): Likewise.
1952 (tdesc_s390_linux64v2): Likewise.
1953 (init_registers_s390_te_linux64): Likewise.
1954 (tdesc_s390_te_linux64): Likewise.
1955 (init_registers_s390_vx_linux64): Likewise.
1956 (tdesc_s390_vx_linux64): Likewise.
1957 (init_registers_s390_tevx_linux64): Likewise.
1958 (tdesc_s390_tevx_linux64): Likewise.
1959 (init_registers_s390x_linux64): Likewise.
1960 (tdesc_s390x_linux64): Likewise.
1961 (init_registers_s390x_linux64v1): Likewise.
1962 (tdesc_s390x_linux64v1): Likewise.
1963 (init_registers_s390x_linux64v2): Likewise.
1964 (tdesc_s390x_linux64v2): Likewise.
1965 (init_registers_s390x_te_linux64): Likewise.
1966 (tdesc_s390x_te_linux64): Likewise.
1967 (init_registers_s390x_vx_linux64): Likewise.
1968 (tdesc_s390x_vx_linux64): Likewise.
1969 (init_registers_s390x_tevx_linux64): Likewise.
1970 (tdesc_s390x_tevx_linux64): Likewise.
1971 (have_hwcap_s390_vx): New static variable.
1972 (s390_arch_setup): Fill have_hwcap_s390_vx.
1973 (s390_get_thread_area): New function.
1974 (s390_ft_entry_gpr_esa): New const.
1975 (s390_ft_entry_gpr_zarch): New const.
1976 (s390_ft_entry_misc): New const.
1977 (s390_ft_entry_fr): New const.
1978 (s390_ft_entry_vr): New const.
1979 (s390_ft_main_31): New const.
1980 (s390_ft_main_64): New const.
1981 (s390_ft_exit_fr): New const.
1982 (s390_ft_exit_vr): New const.
1983 (s390_ft_exit_misc): New const.
1984 (s390_ft_exit_gpr_esa): New const.
1985 (s390_ft_exit_gpr_zarch): New const.
1986 (append_insns): New function.
1987 (s390_relocate_instruction): New function.
1988 (s390_install_fast_tracepoint_jump_pad): New function.
1989 (s390_get_min_fast_tracepoint_insn_len): New function.
1990 (s390_get_ipa_tdesc_idx): New function.
1991 (struct linux_target_ops): Wire in the above functions.
1992 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1993 * linux-s390-tdesc.h: New file.
1994
a4105d04
MK
19952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1996
1997 * linux-s390-low.c (s390_supports_tracepoints): New function.
1998 (struct linux_target_ops): Fill supports_tracepoints hook.
1999
35ac8b3e
YQ
20002016-03-18 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-low.c (lwp_signal_can_be_delivered): New function.
2003 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2004
94610ec4
YQ
20052016-03-18 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2008 0 if signal is enqueued. Remove 'signal' from one debugging
2009 message. Move one debugging message to some lines below.
2010 Remove code setting 'signal' to 0.
2011
80aea927
YQ
20122016-03-18 Yao Qi <yao.qi@linaro.org>
2013
2014 * linux-low.c (linux_low_filter_event): Remove redundant
2015 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2016
b04fd3be
MK
20172016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2018
2019 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2020 (struct linux_target_ops): Wire in the above.
2021
c40c8d4b
YQ
20222016-03-03 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-low.c: Update comments to start_step_over.
2025
0f8288ae
YQ
20262016-03-03 Yao Qi <yao.qi@linaro.org>
2027
2028 PR server/19736
2029 * linux-low.c (handle_extended_wait): Set child suspended
2030 if event_lwp->bp_reinsert isn't zero.
2031
fdbd04a8
YQ
20322016-03-02 Yao Qi <yao.qi@linaro.org>
2033
2034 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2035 enqueue_pending_signal.
2036
6896a8fa
MK
20372016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2038
2039 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2040 is actually loaded.
2041
ab503087
MK
20422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2043
2044 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2045 (s390_regmap_3264) [!__s390x__]: New global.
2046 (s390_collect_ptrace_register): Skip map entries containing -1.
2047 (s390_supply_ptrace_register): Ditto.
2048 (s390_fill_gprs_high): New function.
2049 (s390_store_gprs_high): New function.
2050 (s390_regsets): Add NT_S390_HIGH_GPRS.
2051 (s390_get_hwcap): Enable on 31-bit.
2052 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2053 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2054 Detect NT_S390_HIGH_GPRS.
2055 (s390_usrregs_info_3264): Enable on 31-bit.
2056 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2057 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2058
ae91f625
MK
20592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2060
2061 PR gdb/13808
2062 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2063 * configure.srv: Ditto.
2064 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2065 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2066 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2067 (init_registers_amd64_linux): Remove prototype.
2068 (tdesc_amd64_linux): Remove declaration.
2069 (get_ipa_tdesc): New function.
2070 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2071 initialize remaining tdescs.
2072 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2073 (init_registers_i386_linux): Remove prototype.
2074 (tdesc_i386_linux): Remove declaration.
2075 (get_ipa_tdesc): New function.
2076 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2077 initialize remaining tdescs.
2078 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2079 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2080 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2081 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2082 (x86_get_ipa_tdesc_idx): New function.
2083 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2084 * linux-x86-tdesc.h: New file.
2085 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2086 (target_get_ipa_tdesc_idx): New macro.
2087 * tracepoint.c (ipa_tdesc_idx): New macro.
2088 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2089 (symbol_list): Add ipa_tdesc_idx.
2090 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2091 (ipa_tdesc): Remove.
2092 (ipa_tdesc_idx): New variable.
2093 (get_context_regcache): Use get_ipa_tdesc.
2094 (gdb_collect): Ditto.
2095 (gdb_probe): Ditto.
2096 * tracepoint.h (get_ipa_tdesc): New prototype.
2097 (ipa_tdesc): Remove.
2098
e7ad2f14
PA
20992016-02-24 Pedro Alves <palves@redhat.com>
2100
2101 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2102 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2103 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2104 Factor out common code between the USE_SIGTRAP_SIGINFO and
2105 !USE_SIGTRAP_SIGINFO blocks.
2106 (linux_low_filter_event): Call save_stop_reason instead of
2107 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2108 Update comments.
2109 (linux_wait_1): Update comments.
2110
657f9cde
WW
21112016-02-24 Wei-cheng Wang <cole945@gmail.com>
2112
2113 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2114 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2115 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2116 ppc_insert_point, ppc_remove_point.
2117
b00b61e1
MK
21182016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2119
2120 * linux-s390-low.c (s390_supports_z_point_type): New function.
2121 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2122
553cb527
YQ
21232016-02-16 Yao Qi <yao.qi@linaro.org>
2124
2125 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2126 PC. Get pc from regcache_read_pc.
2127
a5652c21
YQ
21282016-02-12 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2131 or linux_get_pc_32bit.
2132 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2133
ed443b61
YQ
21342016-02-12 Yao Qi <yao.qi@linaro.org>
2135
2136 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2137 arm_linux_get_next_pcs_fixup.
2138
020ecd38
MK
21392016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2140
2141 * tracepoint.c (x_tracepoint_action_download): Change
2142 write_inferior_data_ptr to write_inferior_data_pointer.
2143 (cmd_qtstart): Likewise.
2144 (write_inferior_data_ptr): Remove.
2145 (download_agent_expr): Change write_inferior_data_ptr to
2146 write_inferior_data_pointer.
2147 (download_tracepoint_1): Likewise.
2148 (download_tracepoint): Likewise.
2149 (download_trace_state_variables): Likewise.
2150
7cae9051
WW
21512016-02-11 Wei-cheng Wang <cole945@gmail.com>
2152 Marcin Kościelnicki <koriakin@0x04.net>
2153
2154 * tracepoint.c (struct tracepoint_action_ops): Remove.
2155 (struct tracepoint_action): Remove ops.
2156 (m_tracepoint_action_download, r_tracepoint_action_download)
2157 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2158 size and offset accordingly.
2159 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2160 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2161 (tracepoint_action_send, tracepoint_action_download): New functions.
2162 Helpers for trace action handlers.
2163 (add_tracepoint_action): Remove setup actions ops.
2164 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2165
9f6a71b4
YQ
21662016-02-10 Yao Qi <yao.qi@linaro.org>
2167
2168 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2169
1e94266c
SM
21702016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2171
2172 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2173 to AC_OUTPUT.
2174 * configure: Regenerate.
2175
8adce034
SM
21762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2177
2178 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2179 void * to gdb_byte *.
2180 * linux-low.c (siginfo_fixup): Likewise.
2181 (linux_xfer_siginfo): Likewise.
2182 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2183 Likewise.
2184 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2185
93813b37
WT
21862016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2187
2188 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2189 to srv_tgtobj.
2190 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2191 to srv_tgtobj.
2192 * linux-x86-low.c [__x86_64__]: Include
2193 "nat/amd64-linux-siginfo.h".
2194 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2195 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2196 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2197 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2198 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2199 (cpt_si_fd, si_timerid, si_overrun): Move from
2200 nat/amd64-linux-siginfo.c.
2201 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2202
8424cc97
SM
22032016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2204
2205 * server.c (skip_to_semicolon): Remove.
2206 (process_point_options): Use strchrnul instead of
2207 skip_to_semicolon.
2208
4d18591b
YQ
22092016-01-26 Yao Qi <yao.qi@linaro.org>
2210
2211 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2212 * linux-low.c (install_software_single_step_breakpoints): Don't
2213 call regcache_read_pc.
2214 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2215 argument pc.
2216
d8020970
YQ
22172016-01-26 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-low.c (install_software_single_step_breakpoints): Call
2220 regcache_read_pc instead of get_pc.
2221
8b207339
YQ
22222016-01-26 Yao Qi <yao.qi@linaro.org>
2223
2224 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2225 (unblock_async_io): Rename to ...
2226 (block_unblock_async_io): ... it. New function.
2227 (enable_async_io): Don't install SIGIO handler. Unblock it
2228 instead.
2229 (disable_async_io): Don't ignore SIGIO. Block it instead.
2230 (initialize_async_io): Install SIGIO handler. Don't call
2231 unblock_async_io.
2232
18879fef
YQ
22332016-01-26 Yao Qi <yao.qi@linaro.org>
2234
2235 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2236 first character is '\003', call *the_target->request_interrupt.
2237
a0f8e08a
YQ
22382016-01-25 Yao Qi <yao.qi@linaro.org>
2239
2240 * remote-utils.c (new_thread_notify): Remove.
2241 (dead_thread_notify): Likewise.
2242 * remote-utils.h (new_thread_notify): Remove declaration.
2243 (dead_thread_notify): Likewise.
2244
cc5fd9ab
MK
22452016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2246
2247 * gdb.trace/pending.exp: Fix expected message on continue.
2248
99e8eb11
MK
22492016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2250
2251 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2252 it works properly on big-endian machines where sizeof (CORE_ADDR)
2253 != sizeof (void *).
2254
a994041d
PA
22552016-01-21 Pedro Alves <palves@redhat.com>
2256
2257 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2258 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2259 * configure: Regenerate.
2260
f7a6a40d
YQ
22612016-01-21 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2264 is_thumb and set it according to CPSR saved on the stack.
2265 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2266 arm_sigreturn_next_pc.
2267
6f69e520
YQ
22682016-01-18 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-low.c (linux_set_pc_64bit): New function.
2271 (linux_get_pc_64bit): New function.
2272 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2273 Declare.
2274 * linux-sparc-low.c (debug_threads): Remove declaration.
2275 (sparc_get_pc): Remove.
2276 (the_low_target): Use linux_get_pc_64bit instead of
2277 sparc_get_pc.
2278 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2279 (the_low_target): Use linux_get_pc_64bit and
2280 linux_set_pc_64bit.
2281
276d4552
YQ
22822016-01-18 Yao Qi <yao.qi@linaro.org>
2283
2284 * linux-arm-low.c (debug_threads): Remove declaration.
2285 (arm_get_pc, arm_set_pc): Remove.
2286 (the_low_target): Use linux_get_pc_32bit and
2287 linux_set_pc_32bit.
2288 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2289 (the_low_target): Use linux_get_pc_32bit and
2290 linux_set_pc_32bit.
2291 * linux-cris-low.c (debug_threads): Remove declaration.
2292 (cris_get_pc, cris_set_pc,): Remove.
2293 (the_low_target): Use linux_get_pc_32bit and
2294 linux_set_pc_32bit.
2295 * linux-crisv32-low.c (debug_threads): Remove declaration.
2296 (cris_get_pc, cris_set_pc): Remove.
2297 (the_low_target): Use linux_get_pc_32bit and
2298 linux_set_pc_32bit.
2299 * linux-low.c: Include inttypes.h.
2300 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2301 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2302 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2303 (the_low_target): Use linux_get_pc_32bit and
2304 linux_set_pc_32bit.
2305 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2306 (the_low_target): Use linux_get_pc_32bit and
2307 linux_set_pc_32bit.
2308 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2309 (the_low_target): Use linux_get_pc_32bit and
2310 linux_set_pc_32bit.
2311 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2312 (the_low_target): Use linux_get_pc_32bit and
2313 linux_set_pc_32bit.
2314 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2315 (the_low_target): Use linux_get_pc_32bit and
2316 linux_set_pc_32bit.
2317
eb0edac8
GB
23182016-01-18 Gary Benson <gbenson@redhat.com>
2319
2320 * configure.ac (AC_FUNC_FORK): New check.
2321 * config.in: Regenerate.
2322 * configure: Likewise.
2323
1b451dda
YQ
23242016-01-14 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2327 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2328 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2329 arm_get_next_pcs_ctor.
2330
82075af2
JS
23312016-01-12 Josh Stone <jistone@redhat.com>
2332 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2333
2334 * inferiors.h: Include "gdb_vecs.h".
2335 (struct process_info): Add syscalls_to_catch.
2336 * inferiors.c (remove_process): Free syscalls_to_catch.
2337 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2338 syscall_return stops.
2339 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2340 * server.c (handle_general_set): Handle QCatchSyscalls.
2341 (handle_query): Report support for QCatchSyscalls.
2342 * target.h (struct target_ops): Add supports_catch_syscall.
2343 (target_supports_catch_syscall): New macro.
2344 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2345 (struct lwp_info): Add syscall_state.
2346 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2347 Maintain syscall_state and syscalls_to_catch across exec.
2348 (get_syscall_trapinfo): New function, proxy to the_low_target.
2349 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2350 (linux_low_filter_event): Toggle syscall_state entry/return for
2351 syscall traps, and set it ignored for all others.
2352 (gdb_catching_syscalls_p): New function.
2353 (gdb_catch_this_syscall_p): New function.
2354 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2355 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2356 (linux_supports_catch_syscall): New function.
2357 (linux_target_ops): Install it.
2358 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2359 (the_low_target): Install it.
2360
8f13a3ce
MF
23612016-01-12 Mike Frysinger <vapier@gentoo.org>
2362
2363 * acinclude.m4: Include new ../warning.m4 file.
2364 * configure: Regenerated.
2365 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2366
5b3da067
MF
23672016-01-12 Mike Frysinger <vapier@gentoo.org>
2368
2369 * ax.c (is_goto_target): Mark static.
2370 * linux-low.c (register_addr): Likewise.
2371 (linux_fetch_registers, linux_store_registers): Likewise.
2372 * mem-break.c (any_persistent_commands): Fix old prototype.
2373 (add_commands_to_breakpoint): Mark static.
2374 * regcache.c (find_register_by_name): Delete unused func.
2375 * remote-utils.c (hex_or_minus_one): Mark static.
2376 * server.c (monitor_show_help): Mark static.
2377 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2378 handle_v_requests): Likewise.
2379
bc504a31
PA
23802016-01-12 Pedro Alves <palves@redhat.com>
2381
2382 Remove use of the registered trademark symbol throughout.
2383
5a0dd67a
YQ
23842016-01-08 Yao Qi <yao.qi@linaro.org>
2385
2386 * remote-utils.c (getpkt): If c is '\003', call target hook
2387 request_interrupt.
2388
b2ca446f
YQ
23892016-01-06 Yao Qi <yao.qi@linaro.org>
2390
2391 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2392 linux-aarch32-low.c.
2393 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2394 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2395 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2396 (thumb2_breakpoint): Declare.
2397 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2398 linux-aarch32-low.h.
2399 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2400 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2401 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2402
edd88788
JB
24032016-01-01 Joel Brobecker <brobecker@adacore.com>
2404
2405 * gdbreplay.c (gdbreplay_version): Change copyright year in
2406 version message.
2407 * server.c (gdbserver_version): Likewise.
2408
65da7f14
PP
24092015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2410
2411 * server.c (crc32_table): Delete.
2412 (crc32): Use libiberty's xcrc32 function.
2413
4abd5ed2
JB
24142015-12-22 Joel Brobecker <brobecker@adacore.com>
2415
2416 * lynx-low.c (lynx_delete_thread_callback): New function.
2417 (lynx_mourn): Properly delete our process and all of its
2418 threads. Remove call to clear_inferiors.
2419
0e50fe5c
JB
24202015-12-22 Joel Brobecker <brobecker@adacore.com>
2421
2422 * target.c (thread_search_callback): Add check that
2423 the thread_stopped target callback is not NULL before
2424 calling it.
2425
35adc03f
YQ
24262015-12-21 Yao Qi <yao.qi@linaro.org>
2427
2428 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2429 arm breakpoint.
2430
bd2b2909
AT
24312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2432
2433 * server.c (handle_query): Call target_supports_software_single_step.
2434
7fe5e27e
AT
24352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2436
2437 * linux-low.c (single_step): New function.
2438 (linux_resume_one_lwp_throw): Call single_step.
2439 (start_step_over): Likewise.
2440
d9311bfa
AT
24412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2442
2443 * Makefile.in (SFILES): Append arch/arm-linux.c,
2444 arch/arm-get-next-pcs.c.
2445 (arm-linux.o): New rule.
2446 (arm-get-next-pcs.o): New rule.
2447 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2448 arm-linux.o.
2449 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2450 to linux-aarch32-low.c.
2451 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2452 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2453 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2454 (thumb2_breakpoint_len): Likewise.
2455 (arm_is_thumb_mode): Make non-static.
2456 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2457 from linux-aarch32-low.c.
2458 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2459 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2460 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2461 (thumb2_breakpoint_len): Likewise.
2462 (arm_is_thumb_mode): New declaration.
2463 * linux-arm-low.c: Include arch/arm-linux.h
2464 aarch/arm-get-next-pcs.h, sys/syscall.h.
2465 (get_next_pcs_ops): New struct.
2466 (get_next_pcs_addr_bits_remove): New function.
2467 (get_next_pcs_is_thumb): New function.
2468 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2469 (arm_sigreturn_next_pc): Likewise.
2470 (get_next_pcs_syscall_next_pc): Likewise.
2471 (arm_gdbserver_get_next_pcs): Likewise.
2472 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2473 Initialize.
2474 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2475 * server.h: Include gdb_vecs.h.
2476
68ce2059
AT
24772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2478
2479 * Makefile.in (SFILES): Append common/common-regcache.c.
2480 (OBS): Append common-regcache.o.
2481 (common-regcache.o): New rule.
2482 * regcache.c (init_register_cache): Initialize cache to
2483 REG_UNAVAILABLE.
2484 (regcache_raw_read_unsigned): New function.
2485 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2486 register_status enum.
2487
fa5308bd
AT
24882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2489
2490 * linux-aarch64-low.c (the_low_targets): Rename
2491 breakpoint_reinsert_addr to get_next_pcs.
2492 * linux-arm-low.c (the_low_targets): Likewise.
2493 * linux-bfin-low.c (the_low_targets): Likewise.
2494 * linux-cris-low.c (the_low_targets): Likewise.
2495 * linux-crisv32-low.c (the_low_targets): Likewise.
2496 * linux-low.c (can_software_single_step): Likewise.
2497 (install_software_single_step_breakpoints): New function.
2498 (start_step_over): Use install_software_single_step_breakpoints.
2499 * linux-low.h: New CORE_ADDR vector.
2500 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2501 get_next_pcs.
2502 * linux-mips-low.c (the_low_targets): Likewise.
2503 * linux-nios2-low.c (the_low_targets): Likewise.
2504 * linux-sparc-low.c (the_low_targets): Likewise.
2505
4a6ed09b
PA
25062015-12-17 Pedro Alves <palves@redhat.com>
2507
2508 * linux-low.c (linux_kill_one_lwp): Remove references to
2509 LinuxThreads.
2510 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2511 to 'kill'.
2512 (linux_init_signals): Delete.
2513 (initialize_low): Adjust.
2514 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2515
7544db95
PA
25162015-12-16 Pedro Alves <palves@redhat.com>
2517
2518 * configure.ac (compiler warning flags): When testing a
2519 -Wno-foo option, check whether -Wfoo works instead.
2520 * configure: Regenerate.
2521
8020350c
DB
25222015-12-11 Don Breazeal <donb@codesourcery.com>
2523
2524 * server.c (process_serial_event): Don't exit from gdbserver
2525 in remote mode if there are still active inferiors.
2526
db91f502
YQ
25272015-12-11 Yao Qi <yao.qi@linaro.org>
2528
2529 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2530 arm_breakpoint_at if the process is 32-bit.
2531
b37a6290
YQ
25322015-12-11 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2535 arm breakpoint.
2536
17b1509a
YQ
25372015-12-07 Yao Qi <yao.qi@linaro.org>
2538
2539 * configure.srv: Append arm.o to srv_tgtobj for
2540 aarch64*-*-linux* target.
2541 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2542 from linux-arm-low.c.
2543 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2544 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2545 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2546 (thumb2_breakpoint_len): Likewise.
2547 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2548 (arm_breakpoint_kinds): Likewise.
2549 (arm_breakpoint_kind_from_pc): Likewise.
2550 (arm_sw_breakpoint_from_kind): Likewise.
2551 (arm_breakpoint_kind_from_current_state): Likewise.
2552 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2553 (arm_sw_breakpoint_from_kind): Declare.
2554 (arm_breakpoint_kind_from_current_state): Declare.
2555 (arm_breakpoint_at): Declare.
2556 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2557 arm_sw_breakpoint_from_kind if process is 32-bit.
2558 (aarch64_breakpoint_kind_from_pc): New function.
2559 (aarch64_breakpoint_kind_from_current_state): New function.
2560 (the_low_target): Initialize fields breakpoint_kind_from_pc
2561 and breakpoint_kind_from_current_state.
2562 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2563 linux-aarch32-low.c.
2564 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2565 (arm_breakpoint, arm_breakpoint_len): Likewise.
2566 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2567 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2568 (arm_is_thumb_mode): Likewise.
2569 (arm_breakpoint_at): Likewise.
2570 (arm_breakpoint_kind_from_pc): Likewise.
2571 (arm_sw_breakpoint_from_kind): Likewise.
2572 (arm_breakpoint_kind_from_current_state): Likewise.
2573
2574 Revert:
2575 2015-08-04 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2578 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2579 * server.c (extended_protocol): Remove "static".
2580 * server.h (extended_protocol): Declare it.
2581
ece66d65
JS
25822015-12-04 Josh Stone <jistone@redhat.com>
2583
2584 * target.h (struct target_ops) <arch_setup>: Rename to ...
2585 (struct target_ops) <post_create_inferior>: ... this.
2586 (target_arch_setup): Rename to ...
2587 (target_post_create_inferior): ... this, calling post_create_inferior.
2588 * server.c (start_inferior): Update target_arch_setup calls to
2589 target_post_create_inferior.
2590 * linux-low.c (linux_low_ptrace_options): Forward declare.
2591 (linux_arch_setup): Update its comment for general use.
2592 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2593 (struct linux_target_ops): Use linux_post_create_inferior.
2594 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2595 to post_create_inferior.
2596 * nto-low.c (struct nto_target_ops): Likewise.
2597 * spu-low.c (struct spu_target_ops): Likewise.
2598 * win32-low.c (struct win32_target_ops): Likewise.
2599
e58c48b4
AT
26002015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2601
2602 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2603
fbec8956
AT
26042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2605
2606 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2607 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2608 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2609 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2610 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2611 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2612 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2613 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2614 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2615 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2616 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2617 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2618
9b4c5f87
AT
26192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2620
2621 * linux-low.c (linux_look_up_symbols): Don't call
2622 linux_supports_traceclone.
2623 * linux-low.h (thread_db_init): Remove use_events argument.
2624 * thread-db.c (thread_db_use_event): Remove global variable.
2625 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2626 (struct thread_db) <td_create_bp>: Remove field.
2627 (thread_db_create_event): Remove function.
2628 (thread_db_enable_reporting): Likewise.
2629 (find_one_thread): Don't check for thread_db_use_events.
2630 (attach_thread): Likewise.
2631 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2632 (try_thread_db_load_1): Don't check for thread_db_use_events.
2633 (thread_db_init): Remove use_events argument and thread events
2634 handling.
2635 (remove_thread_event_breakpoints): Remove function.
2636 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2637
7d00775e
AT
26382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2639
2640 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2641 New function.
2642 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2643 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2644 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2645 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2646 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2647 Initialize.
2648 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2649 New function.
2650 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2651 * linux-low.c (can_hardware_single_step): Use
2652 supports_hardware_single_step.
2653 (can_software_single_step): New function.
2654 (start_step_over): Call can_software_single_step.
2655 (linux_supports_hardware_single_step): New function.
2656 (struct target_ops) <supports_software_single_step>: Initialize.
2657 * linux-low.h (struct linux_target_ops)
2658 <supports_hardware_single_step>: Initialize.
2659 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2660 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2661 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2662 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2663 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2664 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2665 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2666 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2667 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2668 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2669 Initialize.
2670 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2671 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2672 Initialize.
2673 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2674 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2675 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2676 New function.
2677 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2678 * target.h (struct target_ops): <supports_software_single_step>:
2679 New field.
2680 (target_supports_software_single_step): New macro.
2681
2d97cd35
AT
26822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2683
2684 * linux-low.c (linux_wait_1): Fix pc advance condition.
2685 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2686 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2687
769ef81f
AT
26882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2689
2690 * linux-arm-low.c (arm_is_thumb_mode): New function.
2691 (arm_breakpoint_at): Use arm_is_thumb_mode.
2692 (arm_breakpoint_kind_from_current_state): New function.
2693 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2694 Initialize.
2695 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2696 (linux_breakpoint_kind_from_current_state): New function.
2697 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2698 * linux-low.h (struct linux_target_ops)
2699 <breakpoint_kind_from_current_state>: New field.
2700 * target.h (struct target_ops): Likewise.
2701 (target_breakpoint_kind_from_current_state): New macro.
2702
1bebeeca
PA
27032015-11-30 Pedro Alves <palves@redhat.com>
2704
2705 * linux-low.c (linux_resume): Wake up the event loop before
2706 returning.
2707
a67a9fae
PA
27082015-11-30 Pedro Alves <palves@redhat.com>
2709
2710 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2711 check.
2712 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2713 to -1.
2714 * target.c (struct thread_search): New structure.
2715 (thread_search_callback): New function.
2716 (prev_general_thread): New global.
2717 (prepare_to_access_memory, done_accessing_memory): New functions.
2718 * target.h (prepare_to_access_memory, done_accessing_memory):
2719 Replace macros with function declarations.
2720
f2faf941
PA
27212015-11-30 Pedro Alves <palves@redhat.com>
2722
2723 PR 14618
2724 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2725 report TARGET_WAITKIND_NO_RESUMED.
2726 * remote-utils.c (prepare_resume_reply): Handle
2727 TARGET_WAITKIND_NO_RESUMED.
2728 * server.c (report_no_resumed): New global.
2729 (handle_query) <qSupported>: Handle "no-resumed+". Report
2730 "no-resumed+" support.
2731 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2732 return error if the client doesn't support no-resumed events.
2733 (push_stop_notification): New function.
2734 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2735 events if the client supports them.
2736
a681f9c9
PA
27372015-11-30 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (thread_still_has_status_pending_p): Don't check
2740 vCont;t here.
2741 (lwp_resumed): New function.
2742 (status_pending_p_callback): Return early if the LWP is not
2743 supposed to be resumed.
2744
65706a29
PA
27452015-11-30 Pedro Alves <palves@redhat.com>
2746
2747 * linux-low.c (handle_extended_wait): Assert that the LWP's
2748 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2749 thread create events, leave the new child's status pending.
2750 (linux_low_filter_event): If GDB wants to hear about thread exit
2751 events, leave the LWP marked dead and don't delete it.
2752 (linux_wait_for_event_filtered): Don't check for thread exit.
2753 (filter_exit_event): New function.
2754 (linux_wait_1): Use it, when returning an exit event.
2755 (linux_resume_one_lwp_throw): Assert that the LWP's
2756 waitstatus is TARGET_WAITKIND_IGNORE.
2757 * remote-utils.c (prepare_resume_reply): Handle
2758 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2759 * server.c (report_thread_events): New global.
2760 (handle_general_set): Handle QThreadEvents.
2761 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2762 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2763 TARGET_WAITKIND_THREAD_EXITED.
2764 * server.h (report_thread_events): Declare.
2765
56cf4bed
PA
27662015-11-30 Pedro Alves <palves@redhat.com>
2767
2768 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2769 the thread's last_resume_kind was resume_stop.
2770
500c1d85
PA
27712015-11-30 Pedro Alves <palves@redhat.com>
2772
2773 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2774 before returning.
2775
de979965
PA
27762015-11-30 Pedro Alves <palves@redhat.com>
2777
2778 * server.c (handle_v_requests): Handle vCtrlC.
2779
34c65914
PA
27802015-11-30 Pedro Alves <palves@redhat.com>
2781
2782 * gdbthread.h (find_any_thread_of_pid): Declare.
2783 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2784 functions.
2785 * server.c (handle_query): If current_thread is NULL, look for
2786 another thread of the selected process.
2787
79efa585 27882015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2789 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2790
2791 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2792 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2793 name in reply.
2794 * target.h (struct target_ops) <thread_name>: New field.
2795 (target_thread_name): New macro.
2796
80d82c19
JB
27972015-11-23 Joel Brobecker <brobecker@adacore.com>
2798
2799 * regcache.h (regcache_invalidate_pid): Add declaration.
2800 * regcache.c (regcache_invalidate_pid): New function, extracted
2801 from regcache_invalidate.
2802 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2803 Add trivial documentation comment.
2804 * lynx-low.c: Use regcache_invalidate_pid instead of
2805 regcache_invalidate.
2806
64da5dd5
JB
28072015-11-23 Joel Brobecker <brobecker@adacore.com>
2808
2809 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2810 and Elf64_auxv_t if the target is Android.
2811
37ce4055
DE
28122015-11-22 Doug Evans <xdje42@gmail.com>
2813
2814 * target.h: #include <sys/types.h>.
2815
06e03fff
PA
28162015-11-19 Pedro Alves <palves@redhat.com>
2817
2818 * linux-low.c (linux_process_qsupported): Change prototype.
2819 Adjust.
2820 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2821 Change prototype.
2822 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2823 and adjust to loop over all features.
2824 * server.c (handle_query) <qSupported>: Adjust to call
2825 target_process_qsupported once, passing it a vector of unprocessed
2826 features.
2827 * target.h (struct target_ops) <process_qsupported>: Change
2828 prototype.
2829 (target_process_qsupported): Adjust.
2830
9a084706
PA
28312015-11-19 Pedro Alves <palves@redhat.com>
2832
2833 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2834 mode.
2835 * configure: Regenerate.
2836
dad44a1f
PA
28372015-11-19 Pedro Alves <palves@redhat.com>
2838
2839 * configure: Regenerate.
2840
231c0592
YQ
28412015-11-19 Yao Qi <yao.qi@linaro.org>
2842
2843 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2844 type to uint32_t.
2845
6c1c9a8b
YQ
28462015-11-19 Yao Qi <yao.qi@linaro.org>
2847
2848 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2849 (struct aarch64_operand): Move enum out.
2850
9caa3311
YQ
28512015-11-19 Yao Qi <yao.qi@linaro.org>
2852
2853 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2854 struct user_fpsimd_state *.
2855 (aarch64_store_fpregset): Likewise.
2856
6a69a054
YQ
28572015-11-19 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2860 struct user_pt_regs *.
2861 (aarch64_store_gregset): Likewise.
2862
1798301e
PA
28632015-11-18 Pedro Alves <palves@redhat.com>
2864
2865 * Makefile.in (all_object_files): Add $IPA_OBJS.
2866
ce7715e2
PA
28672015-11-17 Pedro Alves <palves@redhat.com>
2868
2869 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2870 GDB_SIGNAL_0 and gdb_signal_to_string.
2871
c0879059
PA
28722015-11-17 Pedro Alves <palves@redhat.com>
2873
2874 * win32-low.c (handle_output_debug_string): Remove parameter.
2875 (win32_kill): Remove our_status local and adjust call to
2876 handle_output_debug_string.
2877 (get_child_debug_event): Adjust call to
2878 handle_output_debug_string.
2879
1996e237
SM
28802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2881
2882 * linux-mips-low.c (mips_fill_gregset): Add cast.
2883 (mips_store_gregset): Likewise.
2884 (mips_fill_fpregset): Likewise.
2885 (mips_store_fpregset): Likewise.
2886
cbec665b
SM
28872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2888
2889 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2890 priv.
2891
eb3e3c67
SM
28922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2893
2894 * linux-mips-low.c (mips_linux_new_thread): Change type of
2895 watch_type to enum target_hw_bp_type.
2896
171de4b8
SM
28972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2898
2899 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2900 Change return type to arm_hwbp_type.
2901
04248ead
SM
29022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2903
2904 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2905 (arm_store_gregset): Likewise.
2906 * linux-arm-low.c (arm_get_hwcap): Likewise.
2907 (arm_read_description): Likewise.
2908
04b3479c
SM
29092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2910
2911 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2912
2bc84e8a
SM
29132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2914
2915 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2916 (ppc_fill_vsxregset): Likewise.
2917 (ppc_store_vsxregset): Likewise.
2918 (ppc_fill_vrregset): Likewise.
2919 (ppc_store_vrregset): Likewise.
2920 (ppc_fill_evrregset): Likewise.
2921 (ppc_store_evrregset): Likewise.
2922
e6c5bb05
SM
29232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * linux-ppc-low.c (ppc_usrregs_info): Remove
2926 forward-declaration.
2927 (ppc_arch_setup): Move lower in file.
2928
7ea45d72
SM
29292015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2930
2931 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2932 (ps_pdwrite): Likewise.
2933
69291610
HW
29342015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2935
2936 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2937 to after assert checks.
2938
b42945fd
SM
29392015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2940
2941 * proc-service.c (ps_pdread): Add/adjust casts.
2942 (ps_pdwrite): Add/adjust casts.
2943
d6f85c84
SM
29442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 * server.c (handle_search_memory_1): Cast return value of
2947 memmem.
2948
f98cd059
SM
29492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2950
2951 * server.c (write_qxfer_response): Change type of data to
2952 gdb_byte *.
2953
d2412fa5
PA
29542015-10-29 Pedro Alves <palves@redhat.com>
2955
2956 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2957
c17414a2
PA
29582015-10-29 Pedro Alves <palves@redhat.com>
2959
2960 * tracepoint.c (clear_installed_tracepoints): Add casts.
2961
e053fbc4
PA
29622015-10-29 Pedro Alves <palves@redhat.com>
2963
2964 * server.c (handle_v_cont, process_serial_event): Add enum
2965 gdb_signal casts to signal parsing code.
2966
add67df8
PA
29672015-10-29 Pedro Alves <palves@redhat.com>
2968
2969 * linux-low.h (NULL_REGSET): Define.
2970 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2971 * linux-arm-low.c (arm_regsets): Likewise.
2972 * linux-crisv32-low.c (cris_regsets): Likewise.
2973 * linux-m68k-low.c (m68k_regsets): Likewise.
2974 * linux-mips-low.c (mips_regsets): Likewise.
2975 * linux-nios2-low.c (nios2_regsets): Likewise.
2976 * linux-ppc-low.c (ppc_regsets): Likewise.
2977 * linux-s390-low.c (s390_regsets): Likewise.
2978 * linux-sh-low.c (sh_regsets): Likewise.
2979 * linux-sparc-low.c (sparc_regsets): Likewise.
2980 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2981 * linux-tile-low.c (tile_regsets): Likewise.
2982 * linux-x86-low.c (x86_regsets): Likewise.
2983 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2984
50bc912a
PA
29852015-10-29 Pedro Alves <palves@redhat.com>
2986
2987 * linux-low.h (NULL_REGSET): Define.
2988 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2989 * linux-arm-low.c (arm_regsets): Likewise.
2990 * linux-crisv32-low.c (cris_regsets): Likewise.
2991 * linux-m68k-low.c (m68k_regsets): Likewise.
2992 * linux-mips-low.c (mips_regsets): Likewise.
2993 * linux-nios2-low.c (nios2_regsets): Likewise.
2994 * linux-ppc-low.c (ppc_regsets): Likewise.
2995 * linux-s390-low.c (s390_regsets): Likewise.
2996 * linux-sh-low.c (sh_regsets): Likewise.
2997 * linux-sparc-low.c (sparc_regsets): Likewise.
2998 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2999 * linux-tile-low.c (tile_regsets): Likewise.
3000 * linux-x86-low.c (x86_regsets): Likewise.
3001 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3002
682b2546
DE
30032015-10-26 Doug Evans <dje@google.com>
3004
3005 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3006
963843d4
DE
30072015-10-26 Doug Evans <dje@google.com>
3008
3009 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3010
d41401ac
DE
30112015-10-26 Doug Evans <dje@google.com>
3012
3013 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3014 for debug_printf.
3015 (attach_thread, find_new_threads_callback): Ditto.
3016
3db28855
AT
30172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3018
3019 * mem-break.h (set_breakpoint_data): Remove.
3020
fb78e89c
AT
30212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3022
3023 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3024 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3025 (initialize_low): Remove set_breakpoint_data call.
3026 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3027 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3028 (initialize_low): Remove set_breakpoint_data call.
3029 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3030 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3031 (initialize_low): Remove set_breakpoint_data call.
3032
2e6ee069
AT
30332015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3034
3035 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3036 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3037 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3038 * target.h (target_breakpoint_kind_from_pc): New macro.
3039
1652a986
AT
30402015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3041
3042 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3043 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3044 the default breakpoint kind.
3045
abeead09
AT
30462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3047
3048 * linux-arm-low.c (arm_supports_z_point_type): Add software
3049 breakpoint support.
3050
b0b4b501
AT
30512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3052
3053 * linux-arm-low.c: Refactor breakpoint definitions.
3054 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3055 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3056
8689682c
AT
30572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3058
3059 * Makefile.in: Add arm.c/o.
3060 * configure.srv: Likewise.
3061 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3062 (arm_breakpoint_kind_from_pc): New function.
3063 (arm_sw_breakpoint_from_kind): Return proper kind.
3064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3065
27165294
AT
30662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3067
3068 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3069 removal.
3070 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3071 (struct raw_breakpoint) <size>: Remove.
3072 (struct raw_breakpoint) <kind>: Add.
3073 (bp_size): New function.
3074 (bp_opcode): Likewise.
3075 (find_raw_breakpoint_at): Adjust for kind.
3076 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3077 (remove_memory_breakpoint): Adjust for kind call bp_size.
3078 (set_raw_breakpoint_at): Adjust for kind.
3079 (set_breakpoint): Likewise.
3080 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3081 (delete_raw_breakpoint): Adjust for kind.
3082 (delete_breakpoint): Likewise.
3083 (find_gdb_breakpoint): Likewise.
3084 (set_gdb_breakpoint_1): Likewise.
3085 (set_gdb_breakpoint): Likewise.
3086 (delete_gdb_breakpoint_1): Likewise.
3087 (delete_gdb_breakpoint): Likewise.
3088 (uninsert_raw_breakpoint): Likewise.
3089 (reinsert_raw_breakpoint): Likewise.
3090 (set_breakpoint_data): Remove.
3091 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3092 (check_mem_read): Adjust for kind call bp_size.
3093 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3094 (clone_one_breakpoint): Adjust for kind.
3095 * mem-break.h (set_gdb_breakpoint): Likewise.
3096 (delete_gdb_breakpoint): Likewise.
3097 * server.c (process_serial_event): Likewise.
3098
dd373349
AT
30992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3100
3101 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3102 (struct linux_target_ops) <breakpoint>: Remove.
3103 (struct linux_target_ops) <breakpoint_len>: Remove.
3104 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3105 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3106 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3107 (arm_sw_breakpoint_from_kind): New function.
3108 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3109 (struct linux_target_ops) <breakpoint>: Remove.
3110 (struct linux_target_ops) <breakpoint_len>: Remove.
3111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3113 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3114 (struct linux_target_ops) <breakpoint>: Remove.
3115 (struct linux_target_ops) <breakpoint_len>: Remove.
3116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3118 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3119 (struct linux_target_ops) <breakpoint>: Remove.
3120 (struct linux_target_ops) <breakpoint_len>: Remove.
3121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3123 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3124 and sw_breakpoint_from_kind to increment the pc.
3125 (linux_breakpoint_kind_from_pc): New function.
3126 (linux_sw_breakpoint_from_kind): New function.
3127 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3128 (initialize_low): Call breakpoint_kind_from_pc and
3129 sw_breakpoint_from_kind to replace breakpoint_data/len.
3130 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3131 New field.
3132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3133 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3139 (struct linux_target_ops) <breakpoint>: Remove.
3140 (struct linux_target_ops) <breakpoint_len>: Remove.
3141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3143 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3144 (struct linux_target_ops) <breakpoint>: Remove.
3145 (struct linux_target_ops) <breakpoint_len>: Remove.
3146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3148 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3149 (struct linux_target_ops) <breakpoint>: Remove.
3150 (struct linux_target_ops) <breakpoint_len>: Remove.
3151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3153 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3154 (struct linux_target_ops) <breakpoint>: Remove.
3155 (struct linux_target_ops) <breakpoint_len>: Remove.
3156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3158 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3159 (struct linux_target_ops) <breakpoint>: Remove.
3160 (struct linux_target_ops) <breakpoint_len>: Remove.
3161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3163 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3164 (struct linux_target_ops) <breakpoint>: Remove.
3165 (struct linux_target_ops) <breakpoint_len>: Remove.
3166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3168 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3169 (struct linux_target_ops) <breakpoint>: Remove.
3170 (struct linux_target_ops) <breakpoint_len>: Remove.
3171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3173 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3174 (struct linux_target_ops) <breakpoint>: Remove.
3175 (struct linux_target_ops) <breakpoint_len>: Remove.
3176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3178 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3179 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3180 (struct linux_target_ops) <breakpoint>: Remove.
3181 (struct linux_target_ops) <breakpoint_len>: Remove.
3182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3184 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3185 (struct linux_target_ops) <breakpoint>: Remove.
3186 (struct linux_target_ops) <breakpoint_len>: Remove.
3187 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3188 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3189
4cd98a19
AT
31902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3191
3192 * linux-cris-low.c (cris_get_pc): Remove void arg.
3193
774ee6d2
AR
31942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3195
3196 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3197 variable name.
3198
833dcd29
AR
31992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3200
3201 * inferiors.c (thread_pid_matches_callback): New function.
3202 (find_thread_process): New function.
3203 (remove_thread): Reset current_thread.
3204 (remove_process): Assert threads have been removed first.
3205
8d689ee5
YQ
32062015-10-15 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3209 if it is 3.
3210 (aarch64_remove_point): Likewise.
3211 * regcache.c (regcache_register_size): New function.
3212
1c2e1515
YQ
32132015-10-12 Yao Qi <yao.qi@linaro.org>
3214
3215 * linux-aarch64-low.c: Update all callers as emit_load_store
3216 is renamed to aarch64_emit_load_store.
3217
e1c587c3
YQ
32182015-10-12 Yao Qi <yao.qi@linaro.org>
3219
3220 * linux-aarch64-low.c: Update all callers of function renaming
3221 from emit_insn to aarch64_emit_insn.
3222
b6542f81
YQ
32232015-10-12 Yao Qi <yao.qi@linaro.org>
3224
3225 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3226 arch/aarch64-insn.h.
3227 (struct aarch64_memory_operand): Likewise.
3228 (ENCODE): Likewise.
3229 (emit_insn): Move to arch/aarch64-insn.c.
3230 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3231 (emit_load_store): Move to arch/aarch64-insn.c.
3232 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3233 (can_encode_int32): Remove.
3234
246994ce
YQ
32352015-10-12 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3238 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3239 (aarch64_relocate_instruction): Likewise.
3240 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3241 (struct aarch64_insn_visitor): Likewise.
3242
0badd99f
YQ
32432015-10-12 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3246 (struct aarch64_insn_visitor): New.
3247 (struct aarch64_insn_relocation_data): New.
3248 (aarch64_ftrace_insn_reloc_b): New function.
3249 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3250 (aarch64_ftrace_insn_reloc_cb): Likewise.
3251 (aarch64_ftrace_insn_reloc_tb): Likewise.
3252 (aarch64_ftrace_insn_reloc_adr): Likewise.
3253 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3254 (aarch64_ftrace_insn_reloc_others): Likewise.
3255 (visitor): New.
3256 (aarch64_relocate_instruction): Use visitor.
3257
dfaffe9d
YQ
32582015-10-12 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3261 int. Add argument buf.
3262 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3263 aarch64_relocate_instruction.
3264
70b439f0
YQ
32652015-10-12 Yao Qi <yao.qi@linaro.org>
3266
3267 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3268 argument insn. Remove local variable insn. Don't call
3269 target_read_uint32.
3270 (aarch64_install_fast_tracepoint_jump_pad): Call
3271 target_read_uint32.
3272
7781c06f
YQ
32732015-09-30 Yao Qi <yao.qi@linaro.org>
3274
3275 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3276 (emit_load_store_pair): Likewise.
3277
9a3c8263
SM
32782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3279
3280 * dll.c (match_dll): Add cast(s).
3281 (unloaded_dll): Likewise.
3282 * linux-low.c (second_thread_of_pid_p): Likewise.
3283 (delete_lwp_callback): Likewise.
3284 (count_events_callback): Likewise.
3285 (select_event_lwp_callback): Likewise.
3286 (linux_set_resume_request): Likewise.
3287 * server.c (accumulate_file_name_length): Likewise.
3288 (emit_dll_description): Likewise.
3289 (handle_qxfer_threads_worker): Likewise.
3290 (visit_actioned_threads): Likewise.
3291 * thread-db.c (any_thread_of): Likewise.
3292 * tracepoint.c (same_process_p): Likewise.
3293 (match_blocktype): Likewise.
3294 (build_traceframe_info_xml): Likewise.
3295
224c3ddb
SM
32962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3297
3298 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3299 assignment.
3300 (gdb_unparse_agent_expr): Likewise.
3301 * hostio.c (require_data): Likewise.
3302 (handle_pread): Likewise.
3303 * linux-low.c (disable_regset): Likewise.
3304 (fetch_register): Likewise.
3305 (store_register): Likewise.
3306 (get_dynamic): Likewise.
3307 (linux_qxfer_libraries_svr4): Likewise.
3308 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3309 (set_fast_tracepoint_jump): Likewise.
3310 (uninsert_fast_tracepoint_jumps_at): Likewise.
3311 (reinsert_fast_tracepoint_jumps_at): Likewise.
3312 (validate_inserted_breakpoint): Likewise.
3313 (clone_agent_expr): Likewise.
3314 * regcache.c (init_register_cache): Likewise.
3315 * remote-utils.c (putpkt_binary_1): Likewise.
3316 (decode_M_packet): Likewise.
3317 (decode_X_packet): Likewise.
3318 (look_up_one_symbol): Likewise.
3319 (relocate_instruction): Likewise.
3320 (monitor_output): Likewise.
3321 * server.c (handle_search_memory): Likewise.
3322 (handle_qxfer_exec_file): Likewise.
3323 (handle_qxfer_libraries): Likewise.
3324 (handle_qxfer): Likewise.
3325 (handle_query): Likewise.
3326 (handle_v_cont): Likewise.
3327 (handle_v_run): Likewise.
3328 (captured_main): Likewise.
3329 * target.c (write_inferior_memory): Likewise.
3330 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3331 * tracepoint.c (init_trace_buffer): Likewise.
3332 (add_tracepoint_action): Likewise.
3333 (add_traceframe): Likewise.
3334 (add_traceframe_block): Likewise.
3335 (cmd_qtdpsrc): Likewise.
3336 (cmd_qtdv): Likewise.
3337 (cmd_qtstatus): Likewise.
3338 (response_source): Likewise.
3339 (response_tsv): Likewise.
3340 (cmd_qtnotes): Likewise.
3341 (gdb_collect): Likewise.
3342 (initialize_tracepoint): Likewise.
3343
afbe19f8
PL
33442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3345
3346 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3347 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3348 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3349 <NOP>: New.
3350 (enum aarch64_condition_codes): New enum.
3351 (w0): New static global.
3352 (fp): Likewise.
3353 (lr): Likewise.
3354 (struct aarch64_memory_operand) <type>: New
3355 MEMORY_OPERAND_POSTINDEX type.
3356 (postindex_memory_operand): New helper function.
3357 (emit_ret): New function.
3358 (emit_load_store_pair): New function, factored out of emit_stp
3359 with support for MEMORY_OPERAND_POSTINDEX.
3360 (emit_stp): Rewrite using emit_load_store_pair.
3361 (emit_ldp): New function.
3362 (emit_load_store): Likewise.
3363 (emit_ldr): Mention post-index instruction in comment.
3364 (emit_ldrh): New function.
3365 (emit_ldrb): New function.
3366 (emit_ldrsw): Mention post-index instruction in comment.
3367 (emit_str): Likewise.
3368 (emit_subs): New function.
3369 (emit_cmp): Likewise.
3370 (emit_and): Likewise.
3371 (emit_orr): Likewise.
3372 (emit_orn): Likewise.
3373 (emit_eor): Likewise.
3374 (emit_mvn): Likewise.
3375 (emit_lslv): Likewise.
3376 (emit_lsrv): Likewise.
3377 (emit_asrv): Likewise.
3378 (emit_mul): Likewise.
3379 (emit_sbfm): Likewise.
3380 (emit_sbfx): Likewise.
3381 (emit_ubfm): Likewise.
3382 (emit_ubfx): Likewise.
3383 (emit_csinc): Likewise.
3384 (emit_cset): Likewise.
3385 (emit_nop): Likewise.
3386 (emit_ops_insns): New helper function.
3387 (emit_pop): Likewise.
3388 (emit_push): Likewise.
3389 (aarch64_emit_prologue): New function.
3390 (aarch64_emit_epilogue): Likewise.
3391 (aarch64_emit_add): Likewise.
3392 (aarch64_emit_sub): Likewise.
3393 (aarch64_emit_mul): Likewise.
3394 (aarch64_emit_lsh): Likewise.
3395 (aarch64_emit_rsh_signed): Likewise.
3396 (aarch64_emit_rsh_unsigned): Likewise.
3397 (aarch64_emit_ext): Likewise.
3398 (aarch64_emit_log_not): Likewise.
3399 (aarch64_emit_bit_and): Likewise.
3400 (aarch64_emit_bit_or): Likewise.
3401 (aarch64_emit_bit_xor): Likewise.
3402 (aarch64_emit_bit_not): Likewise.
3403 (aarch64_emit_equal): Likewise.
3404 (aarch64_emit_less_signed): Likewise.
3405 (aarch64_emit_less_unsigned): Likewise.
3406 (aarch64_emit_ref): Likewise.
3407 (aarch64_emit_if_goto): Likewise.
3408 (aarch64_emit_goto): Likewise.
3409 (aarch64_write_goto_address): Likewise.
3410 (aarch64_emit_const): Likewise.
3411 (aarch64_emit_call): Likewise.
3412 (aarch64_emit_reg): Likewise.
3413 (aarch64_emit_pop): Likewise.
3414 (aarch64_emit_stack_flush): Likewise.
3415 (aarch64_emit_zero_ext): Likewise.
3416 (aarch64_emit_swap): Likewise.
3417 (aarch64_emit_stack_adjust): Likewise.
3418 (aarch64_emit_int_call_1): Likewise.
3419 (aarch64_emit_void_call_2): Likewise.
3420 (aarch64_emit_eq_goto): Likewise.
3421 (aarch64_emit_ne_goto): Likewise.
3422 (aarch64_emit_lt_goto): Likewise.
3423 (aarch64_emit_le_goto): Likewise.
3424 (aarch64_emit_gt_goto): Likewise.
3425 (aarch64_emit_ge_got): Likewise.
3426 (aarch64_emit_ops_impl): New static global variable.
3427 (aarch64_emit_ops): New target function, return
3428 &aarch64_emit_ops_impl.
3429 (struct linux_target_ops): Install it.
3430
bb903df0
PL
34312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3432
3433 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3434 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3435 aarch64-ipa.o.
3436 * linux-aarch64-ipa.c: New file.
3437 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3438 and endian.h.
3439 (aarch64_get_thread_area): New target method.
3440 (extract_signed_bitfield): New helper function.
3441 (aarch64_decode_ldr_literal): New function.
3442 (enum aarch64_opcodes): New enum.
3443 (struct aarch64_register): New struct.
3444 (struct aarch64_operand): New struct.
3445 (x0): New static global.
3446 (x1): Likewise.
3447 (x2): Likewise.
3448 (x3): Likewise.
3449 (x4): Likewise.
3450 (w2): Likewise.
3451 (ip0): Likewise.
3452 (sp): Likewise.
3453 (xzr): Likewise.
3454 (aarch64_register): New helper function.
3455 (register_operand): Likewise.
3456 (immediate_operand): Likewise.
3457 (struct aarch64_memory_operand): New struct.
3458 (offset_memory_operand): New helper function.
3459 (preindex_memory_operand): Likewise.
3460 (enum aarch64_system_control_registers): New enum.
3461 (ENCODE): New macro.
3462 (emit_insn): New helper function.
3463 (emit_b): New function.
3464 (emit_bcond): Likewise.
3465 (emit_cb): Likewise.
3466 (emit_tb): Likewise.
3467 (emit_blr): Likewise.
3468 (emit_stp): Likewise.
3469 (emit_ldp_q_offset): Likewise.
3470 (emit_stp_q_offset): Likewise.
3471 (emit_load_store): Likewise.
3472 (emit_ldr): Likewise.
3473 (emit_ldrsw): Likewise.
3474 (emit_str): Likewise.
3475 (emit_ldaxr): Likewise.
3476 (emit_stxr): Likewise.
3477 (emit_stlr): Likewise.
3478 (emit_data_processing_reg): Likewise.
3479 (emit_data_processing): Likewise.
3480 (emit_add): Likewise.
3481 (emit_sub): Likewise.
3482 (emit_mov): Likewise.
3483 (emit_movk): Likewise.
3484 (emit_mov_addr): Likewise.
3485 (emit_mrs): Likewise.
3486 (emit_msr): Likewise.
3487 (emit_sevl): Likewise.
3488 (emit_wfe): Likewise.
3489 (append_insns): Likewise.
3490 (can_encode_int32_in): New helper function.
3491 (aarch64_relocate_instruction): New function.
3492 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3493 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3494 (struct linux_target_ops): Install aarch64_get_thread_area,
3495 aarch64_install_fast_tracepoint_jump_pad and
3496 aarch64_get_min_fast_tracepoint_insn_len.
3497
787749ea
PL
34982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3499
3500 * Makefile.in (aarch64-insn.o): New rule.
3501 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3502
9812b2e6
YQ
35032015-09-21 Yao Qi <yao.qi@linaro.org>
3504
3505 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3506
18fe412b
YQ
35072015-09-21 Yao Qi <yao.qi@linaro.org>
3508
3509 * tracepoint.c (max_jump_pad_size): Remove.
3510
a0cc84cd
YQ
35112015-09-18 Yao Qi <yao.qi@linaro.org>
3512
3513 * linux-aarch64-low.c: Don't include sys/uio.h.
3514 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3515
d78908cf
WW
35162015-09-16 Wei-cheng Wang <cole945@gmail.com>
3517
3518 * tracepoint.c (eval_result_type): Change prototype.
3519 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3520
d57e0d50
PA
35212015-09-15 Pedro Alves <palves@redhat.com>
3522
3523 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3524 Check whether to report exec events instead of checking whether
3525 multiprocess is enabled.
3526
5a676acc
PA
35272015-09-15 Pedro Alves <palves@redhat.com>
3528
3529 PR remote/18965
3530 * remote-utils.c (prepare_resume_reply): Merge
3531 TARGET_WAITKIND_VFORK_DONE switch case with the
3532 TARGET_WAITKIND_FORKED case.
3533
7c5d0fad
YQ
35342015-09-15 Yao Qi <yao.qi@linaro.org>
3535
3536 * server.c (handle_query): Check string comparison using
3537 "else if" instead of "if".
3538
750ce8d1
YQ
35392015-09-15 Yao Qi <yao.qi@linaro.org>
3540
3541 * server.c (vCont_supported): New global variable.
3542 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3543 matches. Append ";vContSupported+" to own_buf.
3544 (handle_v_requests): Append ";s;S" to own_buf if target supports
3545 hardware single step or vCont_supported is false.
3546 (capture_main): Set vCont_supported to zero.
3547
70b90b91
YQ
35482015-09-15 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3551 it to ...
3552 (linux_supports_hardware_single_step): ... New function.
3553 (linux_target_ops): Update.
3554 * lynx-low.c (lynx_target_ops): Set field
3555 supports_hardware_single_step to target_can_do_hardware_single_step.
3556 * nto-low.c (nto_target_ops): Likewise.
3557 * spu-low.c (spu_target_ops): Likewise.
3558 * win32-low.c (win32_target_ops): Likewise.
3559 * target.c (target_can_do_hardware_single_step): New function.
3560 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3561 Remove. <supports_hardware_single_step>: New field.
3562 (target_supports_conditional_breakpoints): Remove.
3563 (target_supports_hardware_single_step): New macro.
3564 (target_can_do_hardware_single_step): Declare.
3565 * server.c (handle_query): Use target_supports_hardware_single_step
3566 instead of target_supports_conditional_breakpoints.
3567
ade90bde
YQ
35682015-09-15 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3571 function.
3572 (struct linux_target_ops the_low_target): Install
3573 aarch64_linux_siginfo_fixup.
3574
94585166
DB
35752015-09-11 Don Breazeal <donb@codesourcery.com>
3576 Luis Machado <lgustavo@codesourcery.com>
3577
3578 * linux-low.c (linux_mourn): Static declaration.
3579 (linux_arch_setup): Move in front of
3580 handle_extended_wait.
3581 (linux_arch_setup_thread): New function.
3582 (handle_extended_wait): Handle exec events. Call
3583 linux_arch_setup_thread. Make event_lwp argument a
3584 pointer-to-a-pointer.
3585 (check_zombie_leaders): Do not check stopped threads.
3586 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3587 (linux_low_filter_event): Add lwp and thread for exec'ing
3588 non-leader thread if leader thread has been deleted.
3589 Refactor code into linux_arch_setup_thread and call it.
3590 Pass child lwp pointer by reference to handle_extended_wait.
3591 (linux_wait_for_event_filtered): Update comment.
3592 (linux_wait_1): Prevent clobbering exec event status.
3593 (linux_supports_exec_events): New function.
3594 (linux_target_ops) <supports_exec_events>: Initialize new member.
3595 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3596 new member.
3597 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3598 * server.c (report_exec_events): New global variable.
3599 (handle_query): Handle qSupported query for exec-events feature.
3600 (captured_main): Initialize report_exec_events.
3601 * server.h (report_exec_events): Declare new global variable.
3602 * target.h (struct target_ops) <supports_exec_events>: New
3603 member.
3604 (target_supports_exec_events): New macro.
3605 * win32-low.c (win32_target_ops) <supports_exec_events>:
3606 Initialize new member.
3607
0568462b
MM
36082015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3609
3610 * linux-low.c (linux_low_enable_btrace): Remove.
3611 (linux_target_ops): Replace linux_low_enable_btrace with
3612 linux_enable_btrace.
3613
39edd165
YQ
36142015-09-03 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-aarch64-low.c (aarch64_insert_point): Call
3617 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3618 returns true.
3619
1db33b5a
UW
36202015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3621
3622 * linux-low.c (check_stopped_by_breakpoint): Use
3623 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3624
ab290430
PA
36252015-08-27 Pedro Alves <palves@redhat.com>
3626
3627 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3628
8d749320
SM
36292015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3630
6711b7f8
SM
3631 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3632 the XNEW-family equivalent.
8d749320
SM
3633 (compile_bytecodes): Likewise.
3634 * dll.c (loaded_dll): Likewise.
3635 * event-loop.c (append_callback_event): Likewise.
3636 (create_file_handler): Likewise.
3637 (create_file_event): Likewise.
3638 * hostio.c (handle_open): Likewise.
3639 * inferiors.c (add_thread): Likewise.
3640 (add_process): Likewise.
3641 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3642 * linux-arm-low.c (arm_new_process): Likewise.
3643 (arm_new_thread): Likewise.
3644 * linux-low.c (add_to_pid_list): Likewise.
3645 (linux_add_process): Likewise.
3646 (handle_extended_wait): Likewise.
3647 (add_lwp): Likewise.
3648 (enqueue_one_deferred_signal): Likewise.
3649 (enqueue_pending_signal): Likewise.
3650 (linux_resume_one_lwp_throw): Likewise.
3651 (linux_resume_one_thread): Likewise.
3652 (linux_read_memory): Likewise.
3653 (linux_write_memory): Likewise.
3654 * linux-mips-low.c (mips_linux_new_process): Likewise.
3655 (mips_linux_new_thread): Likewise.
3656 (mips_add_watchpoint): Likewise.
3657 * linux-x86-low.c (initialize_low_arch): Likewise.
3658 * lynx-low.c (lynx_add_process): Likewise.
3659 * mem-break.c (set_raw_breakpoint_at): Likewise.
3660 (set_breakpoint): Likewise.
3661 (add_condition_to_breakpoint): Likewise.
3662 (add_commands_to_breakpoint): Likewise.
3663 (clone_agent_expr): Likewise.
3664 (clone_one_breakpoint): Likewise.
3665 * regcache.c (new_register_cache): Likewise.
3666 * remote-utils.c (look_up_one_symbol): Likewise.
3667 * server.c (queue_stop_reply): Likewise.
3668 (start_inferior): Likewise.
3669 (queue_stop_reply_callback): Likewise.
3670 (handle_target_event): Likewise.
3671 * spu-low.c (fetch_ppc_memory): Likewise.
3672 (store_ppc_memory): Likewise.
3673 * target.c (set_target_ops): Likewise.
3674 * thread-db.c (thread_db_load_search): Likewise.
3675 (try_thread_db_load_1): Likewise.
3676 * tracepoint.c (add_tracepoint): Likewise.
3677 (add_tracepoint_action): Likewise.
3678 (create_trace_state_variable): Likewise.
3679 (cmd_qtdpsrc): Likewise.
3680 (cmd_qtro): Likewise.
3681 (add_while_stepping_state): Likewise.
3682 * win32-low.c (child_add_thread): Likewise.
3683 (get_image_name): Likewise.
3684
ed8b7b42
YQ
36852015-08-25 Yao Qi <yao.qi@linaro.org>
3686
3687 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3688
db3cb7cb
YQ
36892015-08-25 Yao Qi <yao.qi@linaro.org>
3690
3691 * Makefile.in (aarch64-linux.o): New rule.
3692 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3693 srv_tgtobj.
3694 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3695 (aarch64_init_debug_reg_state): Make it extern.
3696 (aarch64_linux_prepare_to_resume): Remove.
3697
f6011a1c
YQ
36982015-08-25 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3701 lwp_arch_private_info and ptid_of_lwp.
3702
88e2cf7e
YQ
37032015-08-25 Yao Qi <yao.qi@linaro.org>
3704
3705 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3706 Find proc_info by find_process_pid. All callers updated.
3707
5e35436e
YQ
37082015-08-25 Yao Qi <yao.qi@linaro.org>
3709
3710 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3711 Remove.
3712 (debug_reg_change_callback): Remove.
3713 (aarch64_notify_debug_reg_change): Remove.
3714
4a8a7965
YQ
37152015-08-25 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3718 Call current_lwp_ptid.
3719
32a271ee
YQ
37202015-08-25 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-aarch64-low.c (debug_reg_change_callback): Use
3723 debug_printf.
3724
0d51c8d7
YQ
37252015-08-25 Yao Qi <yao.qi@linaro.org>
3726
3727 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3728
31a43dd5
YQ
37292015-08-25 Yao Qi <yao.qi@linaro.org>
3730
3731 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3732
8ee52567
YQ
37332015-08-25 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3736 the code.
3737
ff3f0f45
YQ
37382015-08-25 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3741 Remove.
3742 (debug_reg_change_callback): Remove argument entry and add argument
3743 lwp. Remove local variable thread. Don't print thread id in the
3744 debugging output. Don't check whether pid of thread equals to pid.
3745 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3746 iterate_over_lwps instead find_inferior.
3747
3d40fbb5
PA
37482015-08-24 Pedro Alves <palves@redhat.com>
3749
3750 * inferiors.c (get_first_process): New function.
3751 * inferiors.h (get_first_process): New declaration.
3752 * remote-utils.c (read_ptid): Default to the first process in the
3753 list, instead of to the current thread's process.
3754
438e1e42
PA
37552015-08-24 Pedro Alves <palves@redhat.com>
3756
3757 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3758 * event-loop.c: Likewise.
3759 * remote-utils.c: Likewise.
3760 * tracepoint.c: Likewise.
3761
a8c6d4fc
PA
37622015-08-24 Pedro Alves <palves@redhat.com>
3763
3764 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3765 ptid_get_lwp.
3766
99b0bb12
PA
37672015-08-21 Pedro Alves <palves@redhat.com>
3768
3769 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3770 instead of literal 1.
3771
f8904751
PA
37722015-08-21 Pedro Alves <palves@redhat.com>
3773
3774 * tdesc.c (default_description): Explicitly zero-initialize.
3775
465a859e
PA
37762015-08-21 Pedro Alves <palves@redhat.com>
3777
3778 PR gdb/18749
3779 * inferiors.c (remove_thread): Discard any pending stop reply for
3780 this thread.
3781 * server.c (remove_all_on_match_pid): Rename to ...
3782 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3783 instead of a pid.
3784 (discard_queued_stop_replies): Change parameter to a ptid. Now
3785 extern.
3786 (handle_v_kill, kill_inferior_callback, captured_main)
3787 (process_serial_event): Adjust.
3788 * server.h (discard_queued_stop_replies): Declare.
3789
f0db101d
PA
37902015-08-21 Pedro Alves <palves@redhat.com>
3791
3792 * linux-low.c (wait_for_sigstop): Always switch to no thread
3793 selected if the previously current thread dies.
3794 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3795 process instead of the current thread's.
3796 * remote-utils.c (input_interrupt): Don't check if there's no
3797 current thread.
3798 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3799 current thread to the general thread fails, error out.
3800 (handle_qxfer_auxv, handle_qxfer_libraries)
3801 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3802 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3803 (handle_query): Check if there's a thread selected instead of
3804 checking whether there's any thread in the thread list.
3805 (handle_qxfer_threads, handle_qxfer_btrace)
3806 (handle_qxfer_btrace_conf): Don't error out early if there's no
3807 thread in the thread list.
3808 (handle_v_cont, myresume): Don't set the current thread to the
3809 continue thread.
3810 (process_serial_event) <Hg handling>: Also set thread_id if the
3811 previous general thread is still alive.
3812 (process_serial_event) <g/G handling>: If setting the current
3813 thread to the general thread fails, error out.
3814 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3815 thread's lwp instead of the current thread's.
3816 * target.c (set_desired_thread): If the desired thread was not
3817 found, leave the current thread pointing to NULL. Return an int
3818 (boolean) indicating success.
3819 * target.h (set_desired_thread): Change return type to int.
3820
40045d91
MF
38212015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3822
3823 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3824 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3825 #includes.
3826 (ps_get_thread_area): New function.
3827
45face3b
GB
38282015-08-19 Gary Benson <gbenson@redhat.com>
3829
3830 * hostio.c (handle_pread): Do not attempt to read more data
3831 than hostio_reply_with_data can fit in a packet.
3832
16d5f642
JB
38332015-08-18 Joel Brobecker <brobecker@adacore.com>
3834
3835 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3836
a738da3a
MF
38372015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3838
3839 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3840
33ebda9d
PA
38412015-08-06 Pedro Alves <palves@redhat.com>
3842
3843 * tracepoint.c (expr_eval_result): Now an int.
3844
a44892be
PA
38452015-08-06 Pedro Alves <palves@redhat.com>
3846
3847 * gdbthread.h (struct regcache): Forward declare.
3848 (struct thread_info) <regcache_data>: Now a struct regcache
3849 pointer.
3850 * inferiors.c (inferior_regcache_data)
3851 (set_inferior_regcache_data): Now work with struct regcache
3852 pointers.
3853 * inferiors.h (struct regcache): Forward declare.
3854 (inferior_regcache_data, set_inferior_regcache_data): Now work
3855 with struct regcache pointers.
3856 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3857 (free_register_cache_thread): Remove struct regcache pointer
3858 casts.
3859
608a1e46
PA
38602015-08-06 Pedro Alves <palves@redhat.com>
3861
3862 * server.c (captured_main): On error, print the exception message
3863 to stderr, and if run_once is set, throw a quit.
3864
f0ce0d3a
PA
38652015-08-06 Pedro Alves <palves@redhat.com>
3866
3867 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3868 the current thread.
3869
bf47e248
PA
38702015-08-06 Pedro Alves <palves@redhat.com>
3871
3872 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3873 reading beyond the passed in buffer length.
3874
b6b9ffcc
PL
38752015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3876
3877 * tracepoint.c (symbol_list) <required>: Remove.
3878
863d01bd
PA
38792015-08-06 Pedro Alves <palves@redhat.com>
3880
3881 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3882 count if stopping and suspending threads.
3883 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3884 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3885 (linux_detach): Complete an ongoing step-over.
3886 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3887 throughout.
3888 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3889 (linux_wait_1): If passing a signal to the inferior after
3890 finishing a step-over, unsuspend and re-resume all lwps. If we
3891 see a single-step event but the thread should be continuing, don't
3892 pass the trap to gdb.
3893 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3894 internal_error instead of gdb_assert.
3895 (enqueue_pending_signal): New function.
3896 (check_ptrace_stopped_lwp_gone): Add debug output.
3897 (start_step_over): Use internal_error instead of gdb_assert.
3898 (complete_ongoing_step_over): New function.
3899 (linux_resume_one_thread): Don't resume a suspended thread.
3900 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3901 it stepping.
3902
00db26fa
PA
39032015-08-06 Pedro Alves <palves@redhat.com>
3904
3905 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3906 (linux_thread_alive): Use lwp_is_marked_dead.
3907 (extended_event_reported): Delete.
3908 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3909 instead of extended_event_reported.
3910 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3911 as well.
3912 (lwp_is_marked_dead): New function.
3913 (lwp_running): Use lwp_is_marked_dead.
3914 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3915 comment.
3916
ad071a30
PA
39172015-08-06 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (linux_wait_1): Move fork event output out of the
3920 !report_to_gdb check. Pass event_child->waitstatus to
3921 target_waitstatus_to_string instead of ourstatus.
3922
524b57e6
YQ
39232015-08-04 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3926 if current_thread is 32 bit.
3927
6085d6f6
YQ
39282015-08-04 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3931 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3932 * server.c (extended_protocol): Remove "static".
3933 * server.h (extended_protocol): Declare it.
3934
8a7e4587
YQ
39352015-08-04 Yao Qi <yao.qi@linaro.org>
3936
3937 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3938 both aarch64 and aarch32.
3939 (aarch64_set_pc): Likewise.
3940
3b53ae99
YQ
39412015-08-04 Yao Qi <yao.qi@linaro.org>
3942
3943 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3944 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3945 arm-with-neon.xml to srv_xmlfiles.
3946 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3947 (is_64bit_tdesc): New function.
3948 (aarch64_linux_read_description): New function.
3949 (aarch64_arch_setup): Call aarch64_linux_read_description.
3950 (regs_info): Rename to regs_info_aarch64.
3951 (aarch64_regs_info): Return right regs_info.
3952 (initialize_low_arch): Call initialize_low_arch_aarch32.
3953
bd9e6534
YQ
39542015-08-04 Yao Qi <yao.qi@linaro.org>
3955
3956 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3957 * linux-aarch32-low.c: New file.
3958 * linux-aarch32-low.h: New file.
3959 * linux-arm-low.c (arm_fill_gregset): Move it to
3960 linux-aarch32-low.c.
3961 (arm_store_gregset): Likewise.
3962 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3963 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3964 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3965 (regs_info): Rename to regs_info_arm.
3966 (arm_regs_info): Return regs_info_aarch32 if
3967 have_ptrace_getregset is 1 and target description is
3968 arm_with_neon or arm_with_vfpv3.
3969 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3970 Call initialize_low_arch_aarch32 instead.
3971
ded48a5e
YQ
39722015-08-04 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3975 * linux-low.c: ... here.
3976 * linux-low.h (have_ptrace_getregset): Declare it.
3977
96e9210f
PA
39782015-08-04 Pedro Alves <palves@redhat.com>
3979
3980 * thread-db.c (struct thread_db): Use new typedefs.
3981 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3982 CHK calls.
3983 (disable_thread_event_reporting): Cast result of dlsym to
3984 destination function pointer type.
3985 (thread_db_mourn): Use td_ta_delete_ftype.
3986
af60a1ef
SL
39872015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3988
3989 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3990 arch variant.
3991 (CDX_BREAKPOINT): Define for R2.
3992 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3993 (the_low_target): Add comments.
3994
e8b41681
YQ
39952015-07-30 Yao Qi <yao.qi@linaro.org>
3996
3997 * linux-arm-low.c (arm_hwcap): Remove it.
3998 (arm_read_description): New local variable arm_hwcap. Don't
3999 set arm_hwcap to zero.
4000
89abb039
YQ
40012015-07-30 Yao Qi <yao.qi@linaro.org>
4002
4003 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4004 Use regcache->tdesc instead.
4005 (arm_store_wmmxregset): Likewise.
4006 (arm_fill_vfpregset): Likewise.
4007 (arm_store_vfpregset): Likewise.
4008
deca266c
YQ
40092015-07-30 Yao Qi <yao.qi@linaro.org>
4010
4011 * linux-arm-low.c: Include arch/arm.h.
4012 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4013 (arm_store_gregset): Likewise.
4014
aa58a496
SM
40152015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4016
4017 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4018 ptrace's 4th parameter.
4019
50904b25
YQ
40202015-07-27 Yao Qi <yao.qi@linaro.org>
4021
4022 * configure.srv (case aarch64*-*-linux*): Don't set
4023 srv_linux_usrregs.
4024
5826e159
PA
40252015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4026
4027 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4028 sys/ptrace.h.
4029 * linux-arm-low.c: Likewise.
4030 * linux-cris-low.c: Likewise.
4031 * linux-crisv32-low.c: Likewise.
4032 * linux-low.c: Likewise.
4033 * linux-m68k-low.c: Likewise.
4034 * linux-mips-low.c: Likewise.
4035 * linux-nios2-low.c: Likewise.
4036 * linux-s390-low.c: Likewise.
4037 * linux-sparc-low.c: Likewise.
4038 * linux-tic6x-low.c: Likewise.
4039 * linux-tile-low.c: Likewise.
4040 * linux-x86-low.c: Likewise.
4041
54019719
PA
40422015-07-24 Pedro Alves <palves@redhat.com>
4043
4044 * config.in: Regenerate.
4045 * configure: Regenerate.
4046
eb7aa561
PA
40472015-07-24 Pedro Alves <palves@redhat.com>
4048
4049 * acinclude.m4: Include ../ptrace.m4.
4050 * configure.ac: Call GDB_AC_PTRACE.
4051 * config.in, configure: Regenerate.
4052
55d7b841
YQ
40532015-07-24 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-low.c (linux_create_inferior): Remove setting to
4056 proc->priv->new_inferior.
4057 (linux_attach): Likewise.
4058 (linux_low_filter_event): Likewise.
4059 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4060
c06cbd92
YQ
40612015-07-24 Yao Qi <yao.qi@linaro.org>
4062
4063 * linux-low.c (linux_arch_setup): New function.
4064 (linux_low_filter_event): If proc->tdesc is NULL and
4065 proc->attached is true, call the_low_target.arch_setup.
4066 Otherwise, keep status pending, and return.
4067 (linux_resume_one_lwp_throw): Don't call get_pc if
4068 thread->while_stepping isn't NULL. Don't call
4069 get_thread_regcache if proc->tdesc is NULL.
4070 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4071 (linux_target_ops): Install arch_setup.
4072 * server.c (start_inferior): Call the_target->arch_setup.
4073 * target.h (struct target_ops) <arch_setup>: New field.
4074 (target_arch_setup): New marco.
4075 * lynx-low.c (lynx_target_ops): Update.
4076 * nto-low.c (nto_target_ops): Update.
4077 * spu-low.c (spu_target_ops): Update.
4078 * win32-low.c (win32_target_ops): Update.
4079
5ae3ebba
YQ
40802015-07-24 Yao Qi <yao.qi@linaro.org>
4081
4082 * linux-low.c (linux_add_process): Don't set
4083 proc->priv->new_inferior.
4084 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4085 (linux_attach): Likewise.
4086
eb97750b
YQ
40872015-07-24 Yao Qi <yao.qi@linaro.org>
4088
4089 * server.c (start_inferior): Code refactor.
4090
51aee833
YQ
40912015-07-24 Yao Qi <yao.qi@linaro.org>
4092
4093 * server.c (process_serial_event): Set general_thread.
4094
af1b22f3
YQ
40952015-07-21 Yao Qi <yao.qi@linaro.org>
4096
4097 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4098 aarch64_linux_get_debug_reg_capacity.
4099
554717a3
YQ
41002015-07-17 Yao Qi <yao.qi@linaro.org>
4101
4102 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4103 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4104 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4105 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4106 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4107 (AARCH64_HWP_ALIGNMENT): Likewise.
4108 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4109 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4110 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4111 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4112 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4113 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4114 (struct aarch64_debug_reg_state): Likewise.
4115 (struct arch_lwp_info): Likewise.
4116 (aarch64_align_watchpoint): Likewise.
4117 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4118 (aarch64_watchpoint_length): Likewise.
4119 (aarch64_point_encode_ctrl_reg): Likewise
4120 (aarch64_point_is_aligned): Likewise.
4121 (aarch64_align_watchpoint): Likewise.
4122 (aarch64_linux_set_debug_regs):
4123 (aarch64_dr_state_insert_one_point): Likewise.
4124 (aarch64_dr_state_remove_one_point): Likewise.
4125 (aarch64_handle_breakpoint): Likewise.
4126 (aarch64_handle_aligned_watchpoint): Likewise.
4127 (aarch64_handle_unaligned_watchpoint): Likewise.
4128 (aarch64_handle_watchpoint): Likewise.
4129
c67ca4de
YQ
41302015-07-17 Yao Qi <yao.qi@linaro.org>
4131
4132 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4133 and don't aarch64_get_debug_reg_state. All callers update.
4134 (aarch64_handle_aligned_watchpoint): Likewise.
4135 (aarch64_handle_unaligned_watchpoint): Likewise.
4136 (aarch64_handle_watchpoint): Likewise.
4137 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4138 (aarch64_remove_point): Likewise.
4139
25abf979
YQ
41402015-07-17 Yao Qi <yao.qi@linaro.org>
4141
4142 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4143 debug_printf.
4144 (aarch64_handle_unaligned_watchpoint): Likewise.
4145
db1ff28b
JK
41462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4147
4148 Revert the previous 3 commits:
4149 Move gdb_regex* to common/
4150 Move linux_find_memory_regions_full & co.
4151 gdbserver build-id attribute generator
4152
700ca40f
JK
41532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4154 Jan Kratochvil <jan.kratochvil@redhat.com>
4155
4156 gdbserver build-id attribute generator.
4157 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4158 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4159 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4160 (find_phdr): New.
4161 (get_dynamic): Use find_pdhr to traverse program headers.
4162 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4163 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4164 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4165 (get_hex_build_id): New.
4166 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4167 to reply XML document.
4168
9904185c
JK
41692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4170 Jan Kratochvil <jan.kratochvil@redhat.com>
4171
4172 * target.c: Include target/target-utils.h and fcntl.h.
4173 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4174 (target_fileio_read_stralloc): New functions.
4175
6e5b4429
JK
41762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4177
4178 * Makefile.in (OBS): Add gdb_regex.o.
4179 (gdb_regex.o): New.
4180 * config.in: Rebuilt.
4181 * configure: Rebuilt.
4182
ddc98fbf
JK
41832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4184 Jan Kratochvil <jan.kratochvil@redhat.com>
4185
4186 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4187 * Makefile.in (OBS): Add target-utils.o.
4188 (linux-maps.o, target-utils.o): New.
4189 * configure.srv (srv_linux_obj): Add linux-maps.o.
4190
e57bb7a0
PL
41912015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4192
4193 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4194 function, return 1.
4195 (the_low_target): Install it.
4196
586b02a9
PA
41972015-07-14 Pedro Alves <palves@redhat.com>
4198
4199 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4200 Instead, ignore ECHILD, and throw an error for other errnos.
4201
58c1b36c
PA
42022015-07-10 Pedro Alves <palves@redhat.com>
4203
4204 * event-loop.c (struct callback_event) <data>: Change type to
4205 gdb_client_data instance instead of gdb_client_data pointer.
4206 (append_callback_event): Adjust.
4207
421530db
PL
42082015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4209
4210 * linux-aarch64-low.c: Add comments for each linux_target_ops
4211 method. Remove comments already covered in target_ops and
4212 linux_target_ops definitions.
4213 (the_low_target): Add comments for each unimplemented method.
4214
c2d65f38
YQ
42152015-07-09 Yao Qi <yao.qi@linaro.org>
4216
4217 * linux-aarch64-low.c (aarch64_regmap): Remove.
4218 (aarch64_usrregs_info): Remove.
4219 (regs_info): Set field usrregs to NULL.
4220
b20a6524
MM
42212015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4222
4223 * linux-low.c: Include "rsp-low.h"
4224 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4225 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4226 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4227 (handle_btrace_enable_pt): New.
4228 (handle_btrace_general_set): Support "pt".
4229 (handle_btrace_conf_general_set): Support "pt:size".
4230
96c97461
PL
42312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4232
4233 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4234 Z_PACKET_SW_BP.
4235
37d66942
PL
42362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4237
4238 * linux-aarch64-low.c: Remove comment about endianness.
4239 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4240 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4241 memcmp.
4242
dc06243f
GB
42432015-06-24 Gary Benson <gbenson@redhat.com>
4244
4245 * linux-i386-ipa.c (stdint.h): Do not include.
4246 * lynx-i386-low.c (stdint.h): Likewise.
4247 * lynx-ppc-low.c (stdint.h): Likewise.
4248 * mem-break.c (stdint.h): Likewise.
4249 * thread-db.c (stdint.h): Likewise.
4250 * tracepoint.c (stdint.h): Likewise.
4251 * win32-low.c (stdint.h): Likewise.
4252
124e13d9
SM
42532015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4254
4255 * server.c (write_qxfer_response): Update call to
4256 remote_escape_output.
4257
909c2cda
JK
42582015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4259 Jan Kratochvil <jan.kratochvil@redhat.com>
4260
4261 Merge multiple hex conversions.
4262 * gdbreplay.c (tohex): Rename to 'fromhex'.
4263 (logchar): Use fromhex.
4264
24c05f46
JK
42652015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4266
4267 * server.c (handle_qxfer_libraries): Set `version' attribute for
4268 <library-list>.
4269
14d2069a
GB
42702015-06-10 Gary Benson <gbenson@redhat.com>
4271
4272 * target.h (struct target_ops) <multifs_open>: New field.
4273 <multifs_unlink>: Likewise.
4274 <multifs_readlink>: Likewise.
4275 * linux-low.c (nat/linux-namespaces.h): New include.
4276 (linux_target_ops): Initialize the_target->multifs_open,
4277 the_target->multifs_unlink and the_target->multifs_readlink.
4278 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4279 * hostio.c (hostio_fs_pid): New static variable.
4280 (hostio_handle_new_gdb_connection): New function.
4281 (handle_setfs): Likewise.
4282 (handle_open): Use the_target->multifs_open as appropriate.
4283 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4284 (handle_readlink): Use the_target->multifs_readlink as
4285 appropriate.
4286 (handle_vFile): Handle vFile:setfs packets.
4287 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4288 after target_handle_new_gdb_connection.
4289
4b8b5e72
GB
42902015-06-10 Gary Benson <gbenson@redhat.com>
4291
4292 * configure.ac (AC_CHECK_FUNCS): Add setns.
4293 * config.in: Regenerate.
4294 * configure: Likewise.
4295 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4296 (linux-namespaces.o): New rule.
4297 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4298
3ac2e371
GB
42992015-06-09 Gary Benson <gbenson@redhat.com>
4300
4301 * hostio.c (handle_open): Process mode argument with
4302 fileio_to_host_mode.
4303
ca9b78ce
YQ
43042015-06-01 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4307 * linux-x86-low.c: Likewise.
4308
bfacd19d
DB
43092015-05-28 Don Breazeal <donb@codesourcery.com>
4310
4311 * linux-low.c (handle_extended_wait): Initialize
4312 thread_info.last_resume_kind for new fork children.
4313
452003ef
PA
43142015-05-15 Pedro Alves <palves@redhat.com>
4315
4316 * target.h (target_handle_new_gdb_connection): Rewrite using if
4317 wrapped in do/while.
4318
1041a03c
JB
43192015-05-14 Joel Brobecker <brobecker@adacore.com>
4320
4321 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4322 * configure, config.in: Regenerate.
4323 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4324 Declare typedef.
4325
c269dbdb
DB
43262015-05-12 Don Breazeal <donb@codesourcery.com>
4327
4328 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4329 PTRACE_EVENT_VFORK_DONE.
4330 (linux_low_ptrace_options, extended_event_reported): Add vfork
4331 events.
4332 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4333 and "vforkdone" for RSP 'T' Stop Reply Packet.
4334 * server.h (report_vfork_events): Declare
4335 global variable.
4336
3a8a0396
DB
43372015-05-12 Don Breazeal <donb@codesourcery.com>
4338
4339 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4340 (the_low_target) <new_fork>: Initialize new member.
4341 * linux-arm-low.c (arm_new_fork): New function.
4342 (the_low_target) <new_fork>: Initialize new member.
4343 * linux-low.c (handle_extended_wait): Call new target function
4344 new_fork.
4345 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4346 * linux-mips-low.c (mips_add_watchpoint): New function
4347 extracted from mips_insert_point.
4348 (the_low_target) <new_fork>: Initialize new member.
4349 (mips_linux_new_fork): New function.
4350 (mips_insert_point): Call mips_add_watchpoint.
4351 * linux-x86-low.c (x86_linux_new_fork): New function.
4352 (the_low_target) <new_fork>: Initialize new member.
4353
de0d863e
DB
43542015-05-12 Don Breazeal <donb@codesourcery.com>
4355
4356 * linux-low.c (handle_extended_wait): Implement return value,
4357 rename argument 'event_child' to 'event_lwp', handle
4358 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4359 (linux_low_ptrace_options): New function.
4360 (linux_low_filter_event): Call linux_low_ptrace_options,
4361 use different argument fo linux_enable_event_reporting,
4362 use return value from handle_extended_wait.
4363 (extended_event_reported): New function.
4364 (linux_wait_1): Call extended_event_reported and set
4365 status to report fork events.
4366 (linux_write_memory): Add pid to debug message.
4367 (reset_lwp_ptrace_options_callback): New function.
4368 (linux_handle_new_gdb_connection): New function.
4369 (linux_target_ops): Initialize new structure member.
4370 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4371 * lynx-low.c: Initialize new structure member.
4372 * remote-utils.c (prepare_resume_reply): Implement stop reason
4373 "fork" for "T" stop message.
4374 * server.c (handle_query): Call handle_new_gdb_connection.
4375 * server.h (report_fork_events): Declare global flag.
4376 * target.h (struct target_ops) <handle_new_gdb_connection>:
4377 New member.
4378 (target_handle_new_gdb_connection): New macro.
4379 * win32-low.c: Initialize new structure member.
4380
ddcbc397
DB
43812015-05-12 Don Breazeal <donb@codesourcery.com>
4382
4383 * mem-break.c (APPEND_TO_LIST): Define macro.
4384 (clone_agent_expr): New function.
4385 (clone_one_breakpoint): New function.
4386 (clone_all_breakpoints): New function.
4387 * mem-break.h: Declare new functions.
4388
89245bc0
DB
43892015-05-12 Don Breazeal <donb@codesourcery.com>
4390
4391 * linux-low.c (linux_supports_fork_events): New function.
4392 (linux_supports_vfork_events): New function.
4393 (linux_target_ops): Initialize new structure members.
4394 (initialize_low): Call linux_check_ptrace_features.
4395 * lynx-low.c (lynx_target_ops): Initialize new structure
4396 members.
4397 * server.c (report_fork_events, report_vfork_events):
4398 New global flags.
4399 (handle_query): Add new features to qSupported packet and
4400 response.
4401 (captured_main): Initialize new global variables.
4402 * target.h (struct target_ops) <supports_fork_events>:
4403 New member.
4404 <supports_vfork_events>: New member.
4405 (target_supports_fork_events): New macro.
4406 (target_supports_vfork_events): New macro.
4407 * win32-low.c (win32_target_ops): Initialize new structure
4408 members.
4409
835205d0
GB
44102015-05-12 Gary Benson <gbenson@redhat.com>
4411
4412 * server.c (handle_qxfer_exec_file): Use current process
4413 if annex is empty.
4414
21e94bd9
SL
44152015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4416
4417 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4418 Remove HAVE_PTRACE_GETREGS conditionals.
4419 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4420 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4421
45614f15
YQ
44222015-05-08 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-low.c (linux_supports_conditional_breakpoints): New
4425 function.
4426 (linux_target_ops): Install new target method.
4427 * lynx-low.c (lynx_target_ops): Install NULL hook for
4428 supports_conditional_breakpoints.
4429 * nto-low.c (nto_target_ops): Likewise.
4430 * spu-low.c (spu_target_ops): Likewise.
4431 * win32-low.c (win32_target_ops): Likewise.
4432 * server.c (handle_query): Check
4433 target_supports_conditional_breakpoints.
4434 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4435 New field.
4436 (target_supports_conditional_breakpoints): New macro.
4437
80ad801e
PA
44382015-05-06 Pedro Alves <palves@redhat.com>
4439
4440 PR server/18081
4441 * server.c (start_inferior): If the process exits, mourn it.
4442
819843c7
GB
44432015-04-21 Gary Benson <gbenson@redhat.com>
4444
4445 * hostio.c (fileio_open_flags_to_host): Factored out to
4446 fileio_to_host_openflags in common/fileio.c. Single use
4447 updated.
4448
a2d5a9d7
MF
44492015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4450
4451 * linux-xtensa-low.c (xtensa_fill_gregset)
4452 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4453 XCHAL_HAVE_LOOP.
4454
deb44829
MF
44552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4456
4457 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4458 (regs_info): Replace usrregs pointer with NULL.
4459
e57f1de3
GB
44602015-04-17 Gary Benson <gbenson@redhat.com>
4461
4462 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4463 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4464 * server.c (handle_qxfer_exec_file): New function.
4465 (qxfer_packets): Add exec-file entry.
4466 (handle_query): Report qXfer:exec-file:read as supported packet.
4467
62828379
RN
44682015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4469
4470 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4471
b88bb450
GB
44722015-04-09 Gary Benson <gbenson@redhat.com>
4473
4474 * hostio-errno.c (errno_to_fileio_error): Remove function.
4475 Update caller to use remote_fileio_to_fio_error.
4476
c8f4bfdd
YQ
44772015-04-09 Yao Qi <yao.qi@linaro.org>
4478
4479 * linux-low.c (linux_insert_point): Call
4480 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4481 (linux_remove_point): Call remove_memory_breakpoint if type is
4482 raw_bkpt_type_sw.
4483 * linux-x86-low.c (x86_insert_point): Don't call
4484 insert_memory_breakpoint.
4485 (x86_remove_point): Don't call remove_memory_breakpoint.
4486
41f98f02
PA
44872015-04-01 Pedro Alves <palves@redhat.com>
4488 Cleber Rosa <crosa@redhat.com>
4489
4490 * server.c (gdbserver_usage): Reorganize and extend the usage
4491 message.
4492
2bf6fb9d
PA
44932015-03-24 Pedro Alves <palves@redhat.com>
4494
4495 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4496 output. Also dump TRAP_TRACE.
4497 (linux_low_filter_event): In debug output, distinguish a
4498 resume_stop SIGSTOP from a delayed SIGSTOP.
4499
369f6daa
GB
45002015-03-24 Gary Benson <gbenson@redhat.com>
4501
4502 * linux-x86-low.c (x86_linux_new_thread): Moved to
4503 nat/x86-linux.c.
4504 (x86_linux_prepare_to_resume): Likewise.
4505
8e5d4070
GB
45062015-03-24 Gary Benson <gbenson@redhat.com>
4507
4508 * Makefile.in (x86-linux-dregs.o): New rule.
4509 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4510 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4511 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4512 (x86_linux_dr_get): Likewise.
4513 (x86_linux_dr_set): Likewise.
4514 (update_debug_registers_callback): Likewise.
4515 (x86_linux_dr_set_addr): Likewise.
4516 (x86_linux_dr_get_addr): Likewise.
4517 (x86_linux_dr_set_control): Likewise.
4518 (x86_linux_dr_get_control): Likewise.
4519 (x86_linux_dr_get_status): Likewise.
4520 (x86_linux_update_debug_registers): Likewise.
4521
2b95d440
GB
45222015-03-24 Gary Benson <gbenson@redhat.com>
4523
4524 * linux-x86-low.c (x86_linux_update_debug_registers):
4525 New function, factored out from...
4526 (x86_linux_prepare_to_resume): ...this.
4527
14b0bc68
GB
45282015-03-24 Gary Benson <gbenson@redhat.com>
4529
4530 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4531 (x86_linux_dr_set): Likewise.
4532 (update_debug_registers_callback): Likewise.
4533 (x86_linux_dr_set_addr): Likewise.
4534 (x86_linux_dr_get_addr): Likewise.
4535 (x86_linux_dr_set_control): Likewise.
4536 (x86_linux_dr_get_control): Likewise.
4537 (x86_linux_dr_get_status): Likewise.
4538 (x86_linux_prepare_to_resume): Likewise.
4539
5dfe6ca8
GB
45402015-03-24 Gary Benson <gbenson@redhat.com>
4541
4542 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4543 Use perror_with_name. Pass string through gettext.
4544 (x86_linux_dr_set): Likewise.
4545
d33472ad
GB
45462015-03-24 Gary Benson <gbenson@redhat.com>
4547
4548 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4549 (x86_linux_dr_set_addr): ...this.
4550 (x86_dr_low_get_addr): Rename to...
4551 (x86_linux_dr_get_addr): ...this.
4552 (x86_dr_low_set_control): Rename to...
4553 (x86_linux_dr_set_control): ...this.
4554 (x86_dr_low_get_control): Rename to...
4555 (x86_linux_dr_get_control): ...this.
4556 (x86_dr_low_get_status): Rename to...
4557 (x86_linux_dr_get_status): ...this.
4558 (x86_dr_low): Update with new function names.
4559
4b134ca1
GB
45602015-03-24 Gary Benson <gbenson@redhat.com>
4561
4562 * Makefile.in (x86-linux.o): New rule.
4563 * configure.srv: Add x86-linux.o to relevant targets.
4564 * linux-low.c (lwp_set_arch_private_info): New function.
4565 (lwp_arch_private_info): Likewise.
4566 * linux-x86-low.c: Include nat/x86-linux.h.
4567 (arch_lwp_info): Removed structure.
4568 (update_debug_registers_callback):
4569 Use lwp_set_debug_registers_changed.
4570 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4571 and lwp_set_debug_registers_changed.
4572 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4573
34c703da
GB
45742015-03-24 Gary Benson <gbenson@redhat.com>
4575
4576 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4577 * linux-arm-low.c (arm_new_thread): Likewise.
4578 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4579 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4580 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4581 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4582
cff068da
GB
45832015-03-24 Gary Benson <gbenson@redhat.com>
4584
4585 * linux-low.c (ptid_of_lwp): New function.
4586 (lwp_is_stopped): Likewise.
4587 (lwp_stop_reason): Likewise.
4588 * linux-x86-low.c (update_debug_registers_callback):
4589 Use lwp_is_stopped.
4590 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4591 lwp_stop_reason.
4592
b2f7c7e8
GB
45932015-03-24 Gary Benson <gbenson@redhat.com>
4594
4595 * linux-low.h (linux_stop_lwp): Remove declaration.
4596
6d4ee8c6
GB
45972015-03-24 Gary Benson <gbenson@redhat.com>
4598
4599 * linux-low.h: Include nat/linux-nat.h.
4600 * linux-low.c (iterate_over_lwps_args): New structure.
4601 (iterate_over_lwps_filter): New function.
4602 (iterate_over_lwps): Likewise.
4603 * linux-x86-low.c (update_debug_registers_callback):
4604 Update signature to what iterate_over_lwps expects.
4605 Remove PID check that iterate_over_lwps now performs.
4606 (x86_dr_low_set_addr): Use iterate_over_lwps.
4607 (x86_dr_low_set_control): Likewise.
4608
70a0bb6b
GB
46092015-03-24 Gary Benson <gbenson@redhat.com>
4610
4611 * linux-x86-low.c (x86_debug_reg_state): New function.
4612 (x86_linux_prepare_to_resume): Use the above.
4613
7b669087
GB
46142015-03-24 Gary Benson <gbenson@redhat.com>
4615
4616 * linux-low.c (current_lwp_ptid): New function.
4617 * linux-x86-low.c: Include nat/linux-nat.h.
4618 (x86_dr_low_get_addr): Use current_lwp_ptid.
4619 (x86_dr_low_get_control): Likewise.
4620 (x86_dr_low_get_status): Likewise.
4621
eef49a3d
PA
46222015-03-20 Pedro Alves <palves@redhat.com>
4623
4624 * tracepoint.c (cmd_qtstatus): Make "str" const.
4625
b2333d22
PA
46262015-03-20 Pedro Alves <palves@redhat.com>
4627
4628 * server.c (handle_general_set): Make "req_str" const.
4629
23f238d3
PA
46302015-03-19 Pedro Alves <palves@redhat.com>
4631
4632 * linux-low.c (linux_resume_one_lwp): Rename to ...
4633 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4634 instead call perror_with_name.
4635 (check_ptrace_stopped_lwp_gone): New function.
4636 (linux_resume_one_lwp): Reimplement as wrapper around
4637 linux_resume_one_lwp_throw that swallows errors if the LWP is
4638 gone.
4639
91baf43f
PA
46402015-03-19 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (count_events_callback, select_event_lwp_callback):
4643 No longer check whether the thread has resume_stop as last resume
4644 kind.
4645
8bf3b159
PA
46462015-03-19 Pedro Alves <palves@redhat.com>
4647
4648 * linux-low.c (count_events_callback, select_event_lwp_callback):
4649 Use the lwp's status_pending_p field, not the thread's.
4650
b90fc188
PA
46512015-03-19 Pedro Alves <palves@redhat.com>
4652
4653 * linux-low.c (select_event_lwp_callback): Update comments to
4654 no longer mention SIGTRAP.
4655
464b0089
GB
46562015-03-18 Gary Benson <gbenson@redhat.com>
4657
4658 * server.c (handle_query): Do not report vFile:fstat as supported.
4659
aa9e327f
GB
46602015-03-11 Gary Benson <gbenson@redhat.com>
4661
4662 * hostio.c (sys/types.h): New include.
4663 (sys/stat.h): Likewise.
4664 (common-remote-fileio.h): Likewise.
4665 (handle_fstat): New function.
4666 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4667
791c0056
GB
46682015-03-11 Gary Benson <gbenson@redhat.com>
4669
4670 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4671 struct stat.st_blocks and struct stat.st_blksize.
4672 * configure: Regenerate.
4673 * config.in: Likewise.
4674 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4675 (OBS): Add common-remote-fileio.o.
4676 (common-remote-fileio.o): New rule.
4677
9a9df970
PA
46782015-03-09 Pedro Alves <palves@redhat.com>
4679
4680 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4681 'struct sockaddr' pointer in 'accept' call.
4682
9eb1356e
PA
46832015-03-09 Pedro Alves <palves@redhat.com>
4684
4685 Revert:
4686 2015-03-07 Pedro Alves <palves@redhat.com>
4687 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4688 or <winsock2.h> here. Instead include "gdb_socket.h".
4689 (remote_open): Use union gdb_sockaddr_u.
4690 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4691 or <winsock2.h> here. Instead include "gdb_socket.h".
4692 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4693 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4694 or <sys/un.h>.
4695 (init_named_socket, gdb_agent_helper_thread): Use union
4696 gdb_sockaddr_u.
4697
aac331e4
PA
46982015-03-07 Pedro Alves <palves@redhat.com>
4699
4700 * configure.ac (build_warnings): Move
4701 -Wdeclaration-after-statement to the C-specific set.
4702 * configure: Regenerate.
4703
366c75fc
PA
47042015-03-07 Pedro Alves <palves@redhat.com>
4705
4706 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4707 or <winsock2.h> here. Instead include "gdb_socket.h".
4708 (remote_open): Use union gdb_sockaddr_u.
4709 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4710 or <winsock2.h> here. Instead include "gdb_socket.h".
4711 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4712 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4713 or <sys/un.h>.
4714 (init_named_socket, gdb_agent_helper_thread): Use union
4715 gdb_sockaddr_u.
4716
492d29ea
PA
47172015-03-07 Pedro Alves <palves@redhat.com>
4718
4719 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4720 instead.
4721
60a191ed
YQ
47222015-03-06 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-aarch64-low.c (aarch64_insert_point): Use
4725 show_debug_regs as a boolean.
4726 (aarch64_remove_point): Likewise.
4727
f5771b1d
PA
47282015-03-05 Pedro Alves <palves@redhat.com>
4729
4730 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4731 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4732 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4733 * nto-low.c (nto_target_ops): Likewise.
4734 * spu-low.c (spu_target_ops): Likewise.
4735 * win32-low.c (win32_target_ops): Likewise.
4736
3e572f71
PA
47372015-03-04 Pedro Alves <palves@redhat.com>
4738
72f4393d 4739 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4740 Decide whether a breakpoint triggered based on the SIGTRAP's
4741 siginfo.si_code.
72f4393d
L
4742 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4743 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4744 (linux_low_filter_event): Check for breakpoints before checking
4745 watchpoints.
4746 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4747 siginfo.si_code.
72f4393d
L
4748 (linux_stopped_by_sw_breakpoint)
4749 (linux_supports_stopped_by_sw_breakpoint)
4750 (linux_stopped_by_hw_breakpoint)
4751 (linux_supports_stopped_by_hw_breakpoint): New functions.
4752 (linux_target_ops): Install new target methods.
3e572f71 4753
1ec68e26
PA
47542015-03-04 Pedro Alves <palves@redhat.com>
4755
4756 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4757 * server.c (swbreak_feature, hwbreak_feature): New globals.
4758 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4759 (captured_main): Clear swbreak_feature and hwbreak_feature.
4760 * server.h (swbreak_feature, hwbreak_feature): Declare.
4761 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4762 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4763 supports_stopped_by_hw_breakpoint>: New fields.
4764 (target_supports_stopped_by_sw_breakpoint)
4765 (target_stopped_by_sw_breakpoint)
4766 (target_supports_stopped_by_hw_breakpoint)
4767 (target_stopped_by_hw_breakpoint): Declare.
4768
15c66dd6
PA
47692015-03-04 Pedro Alves <palves@redhat.com>
4770
4771 enum lwp_stop_reason -> enum target_stop_reason
4772 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4773 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4774 (linux_wait_1, stuck_in_jump_pad_callback)
4775 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4776 (linux_stopped_by_watchpoint):
4777 * linux-low.h (enum lwp_stop_reason): Delete.
4778 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4779 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4780
98fc70d6
YQ
47812015-03-04 Yao Qi <yao.qi@linaro.org>
4782
4783 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4784
dd2ac174
GB
47852015-03-03 Gary Benson <gbenson@redhat.com>
4786
4787 * hostio.c (handle_vFile): Fix prefix lengths.
4788
d68e53f4
MM
47892015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4790
4791 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4792 ptr_bits.
4793
bf2d68ab
AA
47942015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4795
4796 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4797 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4798 (clean): Add "rm -f" for above C files.
4799 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4800 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4801 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4802 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4803 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4804 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4805 (init_registers_s390x_vx_linux64)
4806 (init_registers_s390x_tevx_linux64)
4807 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4808 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4809 declarations.
4810 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4811 (s390_store_vxrs_high): New functions.
4812 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4813 NT_S390_VXRS_HIGH.
4814 (s390_arch_setup): Add logic for selecting one of the new target
4815 descriptions. Activate the new vector regsets if applicable.
4816 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4817 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4818 and init_registers_s390x_tevx_linux64.
4819
c966a859
PA
48202015-03-01 Pedro Alves <palves@redhat.com>
4821
4822 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4823 parameter.
4824
4180215b
PA
48252015-02-27 Pedro Alves <palves@redhat.com>
4826
4827 * linux-x86-low.c (u_debugreg_offset): New function.
4828 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4829
749bab01
PA
48302015-02-27 Pedro Alves <palves@redhat.com>
4831
4832 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4833 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4834 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4835 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4836 (ps_lsetfpregs, ps_getpid)
4837 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4838 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4839 (ps_lsetxregs, ps_plog): Declare.
4840
3c14e5a3
PA
48412015-02-27 Pedro Alves <palves@redhat.com>
4842
4843 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4844 IP_AGENT_EXPORT_FUNC.
4845 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4846 IP_AGENT_EXPORT_FUNC.
4847 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4848 (IP_AGENT_EXPORT): Delete.
4849 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4850 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4851 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4852 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4853 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4854 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4855 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4856 (traceframe_read_count, traceframe_write_count)
4857 (traceframes_created, trace_state_variables, get_raw_reg)
4858 (get_trace_state_variable_value, set_trace_state_variable_value)
4859 (ust_loaded, helper_thread_id, cmd_buf): Use
4860 IPA_SYM_EXPORTED_NAME.
4861 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4862 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4863 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4864 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4865 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4866 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4867 EXTERN_C_PUSH/EXTERN_C_POP.
4868 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4869 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4870 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4871 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4872 (traceframe_write_count, traceframe_read_count)
4873 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4874 (about_to_request_buffer_space, get_trace_state_variable_value)
4875 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4876 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4877 EXTERN_C_PUSH/EXTERN_C_POP.
4878 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4879 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4880 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4881 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4882 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4883 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4884 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4885 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4886 Define.
4887 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4888 (IP_AGENT_EXPORT_VAR_DECL): Define.
4889 (tracing): Declare.
4890 (gdb_agent_get_raw_reg): Declare.
4891
fe978cb0
PA
48922015-02-27 Tom Tromey <tromey@redhat.com>
4893 Pedro Alves <palves@redhat.com>
4894
4895 Rename symbols whose names are reserved C++ keywords throughout.
4896
3bc3d82a
PA
48972015-02-27 Pedro Alves <palves@redhat.com>
4898
4899 * Makefile.in (COMPILER): New, get it from autoconf.
4900 (CXX): Get from autoconf instead.
4901 (COMPILE.pre): Use COMPILER.
4902 (CC-LD): Rename to ...
4903 (CC_LD): ... this. Use COMPILER.
4904 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4905 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4906 * acinclude.m4: Include build-with-cxx.m4.
4907 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4908 Disable -Werror by default if building in C++ mode.
4909 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4910 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4911 the C++ compiler. Save/restore CXXFLAGS too.
4912 * configure: Regenerate.
4913
07697489
PA
49142015-02-27 Pedro Alves <palves@redhat.com>
4915
4916 * acinclude.m4: Include libiberty.m4.
4917 * configure.ac: Call libiberty_INIT.
4918 * config.in, configure: Regenerate.
4919
9beb7c4e
PA
49202015-02-26 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (linux_wait_1): When incrementing the PC past a
4923 program breakpoint always use the_low_target.breakpoint_len as
4924 increment, rather than the maximum between that and
4925 the_low_target.decr_pc_after_break.
4926
8090aef2
PA
49272015-02-23 Pedro Alves <palves@redhat.com>
4928
4929 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4930 thread was doing a step-over; always adjust the PC if
4931 we stepped over a permanent breakpoint.
4932 (linux_wait_1): If we stepped over breakpoint that was on top of a
4933 permanent breakpoint, manually advance the PC past it.
4934
bc9540e8
PA
49352015-02-23 Pedro Alves <palves@redhat.com>
4936
4937 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4938 modes.
4939 (x86_fill_gregset, x86_store_gregset): Use it when handling
4940 $orig_eax.
4941
2db9a427
PA
49422015-02-20 Pedro Alves <palves@redhat.com>
4943
4944 * thread-db.c: Include "nat/linux-procfs.h".
4945 (thread_db_init): Skip listing new threads if the kernel supports
4946 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4947
afa8d396
PA
49482015-02-20 Pedro Alves <palves@redhat.com>
4949
4950 * linux-low.c (status_pending_p_callback): Use ptid_match.
4951
c9587f88
AT
49522015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4953
4954 PR breakpoints/16812
4955 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4956 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4957 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4958
b05ec7a5
AT
49592015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4960
4961 PR breakpoints/15956
4962 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4963
d33501a5
MM
49642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4965
4966 * linux-low.c (linux_low_btrace_conf): Print size.
4967 * server.c (handle_btrace_conf_general_set): New.
4968 (hanle_general_set): Call handle_btrace_conf_general_set.
4969 (handle_query): Report Qbtrace-conf:bts:size as supported.
4970
f4abbc16
MM
49712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4972
4973 * linux-low.c (linux_low_enable_btrace): Update parameters.
4974 (linux_low_btrace_conf): New.
4975 (linux_target_ops)<to_btrace_conf>: Initialize.
4976 * server.c (current_btrace_conf): New.
4977 (handle_btrace_enable): Rename to ...
4978 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4979 to target_enable_btrace. Update comment. Update users.
4980 (handle_qxfer_btrace_conf): New.
4981 (qxfer_packets): Add btrace-conf entry.
4982 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4983 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4984 (target_ops)<read_btrace_conf>: New.
4985 (target_enable_btrace): Update parameters.
4986 (target_read_btrace_conf): New.
4987
043c3577
MM
49882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4989
4990 * server.c (handle_btrace_general_set): Remove call to
4991 target_supports_btrace.
4992 (supported_btrace_packets): New.
4993 (handle_query): Call supported_btrace_packets.
4994 * target.h: include btrace-common.h.
4995 (btrace_target_info): Removed.
4996 (supports_btrace, target_supports_btrace): Update parameters.
4997
734b0e4b
MM
49982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4999
5000 * Makefile.in (SFILES): Add common/btrace-common.c.
5001 (OBS): Add common/btrace-common.o.
5002 (btrace-common.o): Add build rules.
5003 * linux-low: Include btrace-common.h.
5004 (linux_low_read_btrace): Use struct btrace_data. Call
5005 btrace_data_init and btrace_data_fini.
5006
d6c146e9
PA
50072015-02-06 Pedro Alves <palves@redhat.com>
5008
5009 * thread-db.c (find_new_threads_callback): Add debug output.
5010
20ba1ce6
PA
50112015-02-04 Pedro Alves <palves@redhat.com>
5012
5013 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5014 (resume_stopped_resumed_lwps): New function.
5015 (linux_wait_for_event_filtered): Use it.
5016
8cc73a39
SDJ
50172015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5018
5019 * Makefile.in (SFILES): Add linux-personality.c.
5020 (linux-personality.o): New rule.
5021 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5022 list of objects to be built.
5023 * linux-low.c: Include nat/linux-personality.h.
5024 (linux_create_inferior): Remove code to disable address space
5025 randomization (moved to ../nat/linux-personality.c). Create
5026 cleanup to disable address space randomization.
5027
fb23d554
SDJ
50282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5029
5030 * Makefile.in (posix-strerror.o): New rule.
5031 (mingw-strerror.o): Likewise.
5032 * configure: Regenerated.
5033 * configure.ac: Source file ../common/common.host. Initialize new
5034 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5035
cdf43629
YQ
50362015-01-14 Yao Qi <yao@codesourcery.com>
5037
5038 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5039 (ppc-linux.o): New rule.
5040 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5041 * configure.ac: AC_CHECK_FUNCS(getauxval).
5042 * config.in: Re-generated.
5043 * configure: Re-generated.
5044 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5045 ppc64_64bit_inferior_p
5046
514c5338
YQ
50472015-01-14 Yao Qi <yao@codesourcery.com>
5048
5049 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5050 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5051 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5052 (PT_ORIG_R3, PT_TRAP): Likewise.
5053 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5054 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5055 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5056
3368c1e5
JB
50572015-01-10 Joel Brobecker <brobecker@adacore.com>
5058
5059 * i387-fp.c (i387_cache_to_xsave): In look over
5060 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5061 zmmh_low_space field by use of zmmh_high_space.
5062
582511be
PA
50632015-01-09 Pedro Alves <palves@redhat.com>
5064
5065 * linux-low.c (step_over_bkpt): Move higher up in the file.
5066 (handle_extended_wait): Don't store the stop_pc here.
5067 (get_stop_pc): Adjust comments and rename to ...
5068 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5069 stopped for a software breakpoint or hardware breakpoint.
5070 (thread_still_has_status_pending_p): New function.
5071 (status_pending_p_callback): Use
5072 thread_still_has_status_pending_p. If the event is no longer
5073 interesting, resume the LWP.
5074 (handle_tracepoints): Add assert.
5075 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5076 (wstatus_maybe_breakpoint): New function.
5077 (cancel_breakpoint): Delete function.
5078 (check_stopped_by_watchpoint): New function, factored out from
5079 linux_low_filter_event.
5080 (lp_status_maybe_breakpoint): Delete function.
5081 (linux_low_filter_event): Remove filter_ptid argument.
5082 Leave thread group exits pending here. Store the LWP's stop PC.
5083 Always leave events pending.
5084 (linux_wait_for_event_filtered): Pull all events out of the
5085 kernel, and leave them all pending.
5086 (count_events_callback, select_event_lwp_callback): Consider all
5087 events.
5088 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5089 (select_event_lwp): Only give preference to the stepping LWP in
5090 all-stop mode. Adjust comments.
5091 (ignore_event): New function.
5092 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5093 references to cancel_breakpoints. Adjust to renames. Also give
5094 equal priority to all LWPs that have had events in non-stop mode.
5095 If reporting a software breakpoint event, unadjust the LWP's PC.
5096 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5097 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5098 Adjust.
5099 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5100 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5101 (linux_stopped_by_watchpoint): Adjust.
5102 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5103 * linux-low.h (enum lwp_stop_reason): New.
5104 (struct lwp_info) <stop_pc>: Adjust comment.
5105 <stopped_by_watchpoint>: Delete field.
5106 <stop_reason>: New field.
5107 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5108 * mem-break.c (software_breakpoint_inserted_here)
5109 (hardware_breakpoint_inserted_here): New function.
5110 * mem-break.h (software_breakpoint_inserted_here)
5111 (hardware_breakpoint_inserted_here): Declare.
5112 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5113 (cancel_breakpoints): Delete.
5114 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5115 (upload_fast_traceframes): Remove references to
5116 cancel_breakpoints.
5117
a33e3959
PA
51182015-01-09 Pedro Alves <palves@redhat.com>
5119
5120 * thread-db.c (find_new_threads_callback): Ignore thread if the
5121 kernel thread ID is -1.
5122
8784d563
PA
51232015-01-09 Pedro Alves <palves@redhat.com>
5124
5125 * linux-low.c (linux_attach_fail_reason_string): Move to
5126 nat/linux-ptrace.c, and rename.
5127 (linux_attach_lwp): Update comment.
5128 (attach_proc_task_lwp_callback): New function.
5129 (linux_attach): Adjust to rename and use
5130 linux_proc_attach_tgid_threads.
5131 (linux_attach_fail_reason_string): Delete declaration.
5132
76f2b779
JB
51332015-01-01 Joel Brobecker <brobecker@adacore.com>
5134
5135 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5136 * server.c (gdbserver_version): Likewise.
5137
fafcc06a
SDJ
51382014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5139
5140 * remote-utils.c: Include ctype.h.
5141 (input_interrupt): Explicitly handle the case when the char
5142 received is the NUL byte. Improve the printing of non-ASCII
5143 characters.
5144
beed38b8
JB
51452014-12-16 Joel Brobecker <brobecker@adacore.com>
5146
5147 * linux-low.c (linux_low_filter_event): Update call to
5148 linux_enable_event_reporting following the addition of
5149 a new parameter to that function.
5150
bf330350
CU
51512014-12-16 Catalin Udma <catalin.udma@freescale.com>
5152
5153 PR server/17457
5154 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5155 (AARCH64_FPCR_REGNO): Likewise.
5156 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5157 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5158 (aarch64_store_fpregset): Likewise.
5159
5227d625
JB
51602014-12-15 Joel Brobecker <brobecker@adacore.com>
5161
5162 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5163 Remove FIXME comment about assumption about N.
5164
f93b65a0
JB
51652014-12-13 Joel Brobecker <brobecker@adacore.com>
5166
5167 * configure.ac: If large-file support is disabled in GDBserver,
5168 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5169 * configure: Regenerate.
5170
e5a9158d
AA
51712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5172
5173 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5174 warning upon ENODATA from ptrace.
5175 * linux-s390-low.c (s390_store_tdb): New.
5176 (s390_regsets): Add regset for NT_S390_TDB.
5177
feea5f36
AA
51782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5179
5180 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5181 without a fill_function.
5182 * linux-s390-low.c (s390_fill_last_break): Remove.
5183 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5184 (s390_arch_setup): Use regset's size instead of fill_function for
5185 loop end condition.
5186
098dbe61
AA
51872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5188
5189 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5190 the regset's store function when ptrace returned an error.
5191 * regcache.c (get_thread_regcache): Invalidate register cache
5192 before fetching inferior's registers.
5193
28eef672
AA
51942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5195
5196 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5197 while-loop as for-loop.
5198 (regsets_store_inferior_registers): Likewise.
5199
bdca27a2
YQ
52002014-11-28 Yao Qi <yao@codesourcery.com>
5201
5202 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5203 * config.in, configure: Re-generate.
5204 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5205 is defined.
5206
9c232dda
YQ
52072014-11-21 Yao Qi <yao@codesourcery.com>
5208
5209 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5210 (AC_CHECK_HEADERS): Remove malloc.h.
5211 * configure: Re-generated.
5212 * config.in: Re-generated.
5213 * server.h: Don't include alloca.h and malloc.h.
5214 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5215 Don't include malloc.h.
5216
43968415
JB
52172014-11-17 Joel Brobecker <brobecker@adacore.com>
5218
5219 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5220 corresponding ERRNO check in same block.
5221
40e91bc7
PA
52222014-11-12 Pedro Alves <palves@redhat.com>
5223
5224 * server.c (cont_thread): Update comment.
5225 (start_inferior, attach_inferior): No longer clear cont_thread.
5226 (handle_v_cont): No longer set cont_thread.
5227 (captured_main): Clear cont_thread each time a GDB connects.
5228
c2c118cf
PA
52292014-11-12 Pedro Alves <palves@redhat.com>
5230
5231 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5232 thread, and don't resume all threads if the Hc thread has exited.
5233
78708b7c
PA
52342014-11-12 Pedro Alves <palves@redhat.com>
5235
5236 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5237 the process group instead of to a specific LWP.
5238
a2abc7de
PA
52392014-10-15 Pedro Alves <palves@redhat.com>
5240
5241 PR server/17487
5242 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5243 parameter.
5244 (arm_set_thread_context): Delete.
5245 (the_low_target): Adjust.
5246 * win32-i386-low.c (debug_registers_changed)
5247 (debug_registers_used): Delete.
5248 (update_debug_registers_callback): New function.
5249 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5250 needing to update their debug registers.
5251 (win32_get_current_dr): New function.
5252 (x86_dr_low_get_addr, x86_dr_low_get_control)
5253 (x86_dr_low_get_status): Fetch the debug register from the thread
5254 record's context.
5255 (i386_initial_stuff): Adjust.
5256 (i386_get_thread_context): Remove current_event parameter. Don't
5257 clear debug_registers_changed nor copy DR values to
5258 debug_reg_state.
5259 (i386_set_thread_context): Delete.
5260 (i386_prepare_to_resume): New function.
5261 (i386_thread_added): Mark the thread as needing to update irs
5262 debug registers.
5263 (the_low_target): Remove i386_set_thread_context and install
5264 i386_prepare_to_resume.
5265 * win32-low.c (win32_get_thread_context): Adjust.
5266 (win32_set_thread_context): Use SetThreadContext
5267 directly.
5268 (win32_prepare_to_resume): New function.
5269 (win32_require_context): New function, factored out from ...
5270 (thread_rec): ... this.
5271 (continue_one_thread): Call win32_prepare_to_resume on each thread
5272 we're about to continue.
5273 (win32_resume): Call win32_prepare_to_resume on the event thread.
5274 * win32-low.h (struct win32_thread_info)
5275 <debug_registers_changed>: New field.
5276 (struct win32_target_ops): Change prototype of set_thread_context,
5277 delete set_thread_context and add prepare_to_resume.
5278 (win32_require_context): New declaration.
5279
a442d071
GB
52802014-10-08 Gary Benson <gbenson@redhat.com>
5281
5282 * server.h: Do not include common-exceptions.h.
5283
6f1947e8
GB
52842014-10-08 Gary Benson <gbenson@redhat.com>
5285
5286 * server.h: Do not include cleanups.h.
5287
63b434a4
JH
52882014-09-30 James Hogan <james.hogan@imgtec.com>
5289
5290 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5291 mips64-dsp-linux.c.
5292
c4d9ceb6
YQ
52932014-09-23 Yao Qi <yao@codesourcery.com>
5294
5295 * linux-low.c (lp_status_maybe_breakpoint): New function.
5296 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5297 (count_events_callback): Likewise.
5298 (select_event_lwp_callback): Likewise.
5299 (cancel_breakpoints_callback): Likewise.
5300
89a5711c
DB
53012014-09-19 Don Breazeal <donb@codesourcery.com>
5302
5303 * linux-low.c (handle_extended_wait): Call
5304 linux_ptrace_get_extended_event.
5305 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5306 linux_is_extended_waitstatus.
5307
bffc0964
JB
53082014-09-16 Joel Brobecker <brobecker@adacore.com>
5309
5310 * Makefile.in (CPPFLAGS): Define.
5311 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5312 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5313
0bfdf32f
GB
53142014-09-16 Gary Benson <gbenson@redhat.com>
5315
5316 * inferiors.h (current_inferior): Renamed as...
5317 (current_thread): New variable. All uses updated.
5318 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5319 (maybe_move_out_of_jump_pad): Likewise.
5320 (cancel_breakpoint): Likewise.
5321 (linux_low_filter_event): Likewise.
5322 (wait_for_sigstop): Likewise.
5323 (linux_resume_one_lwp): Likewise.
5324 (need_step_over_p): Likewise.
5325 (start_step_over): Likewise.
5326 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5327 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5328 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5329 and save_inferior as saved_thread.
5330 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5331 saved_thread.
5332 (regcache_invalidate_thread): Likewise.
5333 * remote-utils.c (prepare_resume_reply): Likewise.
5334 * thread-db.c (thread_db_get_tls_address): Likewise.
5335 (disable_thread_event_reporting): Likewise.
5336 (remove_thread_event_breakpoints): Likewise.
5337 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5338 as saved_thread.
5339 * target.h (set_desired_inferior): Renamed as...
5340 (set_desired_thread): New declaration. All uses updated.
5341 * server.c (myresume): Updated comment to reference thread instead
5342 of inferior.
5343 (handle_serial_event): Likewise.
5344 (handle_target_event): Likewise.
5345
361c8ade
GB
53462014-09-12 Tom Tromey <tromey@redhat.com>
5347 Gary Benson <gbenson@redhat.com>
5348
5349 * regcache.h: Include common-regcache.h.
5350 (regcache_read_pc): Don't declare.
5351 * regcache.c (get_thread_regcache_for_ptid): New function.
5352
bd9269f7
GB
53532014-09-11 Tom Tromey <tromey@redhat.com>
5354 Gary Benson <gbenson@redhat.com>
5355
5356 * symbol.c: New file.
5357 * Makefile.in (SFILES): Add symbol.c.
5358 (OBS): Add symbol.o.
5359
f8c1d06b
GB
53602014-09-11 Gary Benson <gbenson@redhat.com>
5361
5362 * target.c (target_stop_ptid, target_continue_ptid): New
5363 functions.
5364
721ec300
GB
53652014-09-11 Tom Tromey <tromey@redhat.com>
5366 Gary Benson <gbenson@redhat.com>
5367
5368 * target.h: Include target/target.h.
5369 * target.c (target_read_memory, target_read_uint32)
5370 (target_write_memory): New functions.
5371
c5e92cca
GB
53722014-09-11 Gary Benson <gbenson@redhat.com>
5373
5374 * server.h (debug_hw_points): Don't declare.
5375 * server.c (debug_hw_points): Don't define. Replace all uses
5376 with show_debug_regs.
5377 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5378 all uses with show_debug_regs.
5379
2e4bb98a
EBM
53802014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5381
5382 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5383 endianness into account.
5384 (ppc_supply_ptrace_register): Likewise.
5385
ac740bc7
JH
53862014-09-03 James Hogan <james.hogan@imgtec.com>
5387
5388 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5389 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5390
97ea6506
GB
53912014-09-03 Gary Benson <gbenson@redhat.com>
5392
5393 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5394 ALL_DEBUG_ADDRESS_REGISTERS.
5395
df7e5265
GB
53962014-09-02 Gary Benson <gbenson@redhat.com>
5397
5398 * i386-low.h: Renamed as...
5399 * x86-low.h: New file. All type, function and variable name
5400 prefixes changed from "i386_" to "x86_". All references updated.
5401 * i386-low.c: Renamed as...
5402 * x86-low.c: New file. All type, function and variable name
5403 prefixes changed from "i386_" to "x86_". All references updated.
5404
ed859da7
GB
54052014-09-02 Gary Benson <gbenson@redhat.com>
5406
5407 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5408 (x86_linux_new_thread): Likewise.
5409
860789c7
GB
54102014-08-29 Gary Benson <gbenson@redhat.com>
5411
5412 * server.h (setjmp.h): Do not include.
5413 (toplevel): Do not declare.
5414 (common-exceptions.h): Include.
5415 (cleanups.h): Likewise.
5416 * server.c (toplevel): Do not define.
5417 (exit_code): New static global.
5418 (detach_or_kill_for_exit_cleanup): New function.
5419 (main): New function. Original main renamed to...
5420 (captured_main): New function.
5421 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5422
ff55e1b5
GB
54232014-08-29 Gary Benson <gbenson@redhat.com>
5424
5425 * Makefile.in (SFILES): Add common/common-exceptions.c.
5426 (OBS): Add common-exceptions.o.
5427 (common-exceptions.o): New rule.
5428 * utils.c (prepare_to_throw_exception): New function.
5429
e9bcb658
GB
54302014-08-29 Gary Benson <gbenson@redhat.com>
5431
5432 * config.in: Regenerate.
5433 * configure: Likewise.
5434
e3180625
GB
54352014-08-29 Gary Benson <gbenson@redhat.com>
5436
5437 * Makefile.in (SFILES): Add common/cleanups.c.
5438 (OBS): cleanups.o.
5439 (cleanups.o): New rule.
5440
e3d6ba5d
GB
54412014-08-29 Gary Benson <gbenson@redhat.com>
5442
5443 * utils.c (internal_vwarning): New function.
5444
7096e886
GB
54452014-08-28 Gary Benson <gbenson@redhat.com>
5446
5447 * utils.h (fatal): Remove declaration.
5448 * utils.c (fatal): Remove function.
5449
14ce3192
GB
54502014-08-28 Gary Benson <gbenson@redhat.com>
5451
5452 * tracepoint.c (gdb_agent_init): Replace fatal with
5453 perror_with_name.
5454 (initialize_tracepoint): Likewise.
5455
50278d59
GB
54562014-08-28 Gary Benson <gbenson@redhat.com>
5457
5458 * remote-utils.c (remote_prepare): Replace fatal with error.
5459
aa96c426
GB
54602014-08-28 Gary Benson <gbenson@redhat.com>
5461
5462 * linux-low.c (linux_async): Replace fatal with warning.
5463 Tidy up and return.
5464 (linux_start_non_stop): Return -1 if linux_async failed.
5465
f7160e97
GB
54662014-08-28 Gary Benson <gbenson@redhat.com>
5467
5468 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5469 gdb_assert.
5470 (i386_dr_low_get_addr): Remove vague comment.
5471 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5472 gdb_assert.
5473
38e08fca
GB
54742014-08-28 Gary Benson <gbenson@redhat.com>
5475
5476 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5477 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5478 internal_error.
5479 (linux_resume_one_lwp): Likewise.
5480 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5481 gdb_assert.
5482 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5483 with internal_error.
5484 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5485 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5486 (find_register_by_name): Replace fatal with internal_error.
5487 (find_regno): Likewise.
5488 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5489 * thread-db.c (thread_db_create_event): Likewise.
5490 (thread_db_load_search): Likewise.
5491 (try_thread_db_load_1): Likewise.
5492 * tracepoint.c (get_jump_space_head): Replace fatal with
5493 internal_error.
5494 (claim_trampoline_space): Likewise.
5495 (have_fast_tracepoint_trampoline_buffer): Likewise.
5496 (cmd_qtstart): Likewise.
5497 (stop_tracing): Likewise.
5498 (fast_tracepoint_collecting): Likewise.
5499 (target_malloc): Likewise.
5500 (download_tracepoint): Likewise.
5501 (download_trace_state_variables): Replace check with gdb_assert.
5502 (upload_fast_traceframes): Replace fatal with internal_error.
5503
34abf635
GB
55042014-08-19 Tom Tromey <tromey@redhat.com>
5505 Gary Benson <gbenson@redhat.com>
5506
5507 * Makefile.in (SFILES): Add common/common-debug.c.
5508 (OBS): Add common-debug.o.
5509 (common-debug.o): New rule.
5510 * debug.h (debug_printf): Don't declare.
5511 * debug.c (debug_printf): Renamed and rewritten as...
5512 (debug_vprintf): New function.
5513
f6e94d78
GB
55142014-08-19 Gary Benson <gbenson@redhat.com>
5515
5516 * utils.h: Do not include print-utils.h.
5517
9239eeab
GB
55182014-08-19 Tom Tromey <tromey@redhat.com>
5519 Gary Benson <gbenson@redhat.com>
5520
5521 * server.h: Add static assertion.
5522 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5523
ef87c8bb
GB
55242014-08-19 Tom Tromey <tromey@redhat.com>
5525 Gary Benson <gbenson@redhat.com>
5526
5527 * Makefile.in (SFILES): Add common/errors.c.
5528 (OBS): Add errors.o.
5529 (IPA_OBS): Add errors-ipa.o.
5530 (errors.o): New rule.
5531 (errors-ipa.o): Likewise.
5532 * utils.h (perror_with_name, error, warning): Don't declare.
5533 * utils.c (warning): Renamed and rewritten as...
5534 (vwarning): New function.
5535 (error): Renamed and rewritten as...
5536 (verror): New function.
5537 (internal_error): Renamed and rewritten as...
5538 (internal_verror): New function.
5539
bb974a24
GB
55402014-08-07 Gary Benson <gbenson@redhat.com>
5541
5542 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5543 * configure: Regenerate.
5544 * config.in: Likewise.
5545 * server.h: Do not include errno.h.
5546 * event-loop.c: Likewise.
5547 * hostio-errno.c: Likewise.
5548 * linux-low.c: Likewise.
5549 * remote-utils.c: Likewise.
5550 * spu-low.c: Likewise.
5551 * utils.c: Likewise.
5552 * gdbreplay.c: Unconditionally include errno.h.
5553
6d3d12eb
GB
55542014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include string.h.
5557 * event-loop.c: Likewise.
5558 * linux-low.c: Likewise.
5559 * regcache.c: Likewise.
5560 * remote-utils.c: Likewise.
5561 * spu-low.c: Likewise.
5562 * utils.c: Likewise.
5563
dccbb609
GB
55642014-08-07 Gary Benson <gbenson@redhat.com>
5565
5566 * server.h: Do not include gdb_assert.h.
5567
e76df0d0
GB
55682014-08-07 Gary Benson <gbenson@redhat.com>
5569
5570 * server.h: Do not include common-utils.h.
5571
4cb9c816
GB
55722014-08-07 Gary Benson <gbenson@redhat.com>
5573
5574 * server.h: Do not include ptid.h.
5575 * notif.h: Likewise.
5576
3995eeee
GB
55772014-08-07 Gary Benson <gbenson@redhat.com>
5578
5579 * server.h: Do not include gdb_locale.h.
5580
cb9f1a9b
GB
55812014-08-07 Gary Benson <gbenson@redhat.com>
5582
5583 * server.h: Do not include gdb/signals.h.
5584 * win32-low.c: Likewise.
5585
a5fceff8
GB
55862014-08-07 Gary Benson <gbenson@redhat.com>
5587
5588 * server.h: Do not include pathmax.h.
5589
b9391142
GB
55902014-08-07 Gary Benson <gbenson@redhat.com>
5591
5592 * server.h: Do not include libiberty.h.
5593 * linux-bfin-low.c: Likewise.
5594
0e443c87
GB
55952014-08-07 Gary Benson <gbenson@redhat.com>
5596
5597 * server.h: Do not include ansidecl.h.
5598
8ebb3f56
GB
55992014-08-07 Gary Benson <gbenson@redhat.com>
5600
5601 * linux-x86-low.c: Do not include stddef.h.
5602 * lynx-ppc-low.c: Likewise.
5603 * tracepoint.c: Likewise.
5604
8980bdf6
GB
56052014-08-07 Gary Benson <gbenson@redhat.com>
5606
5607 * server.h: Do not include stdarg.h.
5608 * nto-low.c: Likewise.
5609
d7096f71
GB
56102014-08-07 Gary Benson <gbenson@redhat.com>
5611
5612 * server.h: Do not include stdlib.h.
5613 * inferiors.c: Likewise.
5614 * linux-low.c: Likewise.
5615 * regcache.c: Likewise.
5616 * spu-low.c: Likewise.
5617 * tracepoint.c: Likewise.
5618 * utils.c: Likewise.
5619
d02f550d
GB
56202014-08-07 Gary Benson <gbenson@redhat.com>
5621
5622 * server.h: Do not include stdio.h.
5623 * linux-low.c: Likewise.
5624 * remote-utils.c: Likewise.
5625 * spu-low.c: Likewise.
5626 * utils.c: Likewise.
5627 * wincecompat.c: Likewise.
5628
87f6c4e3
GB
56292014-08-06 Gary Benson <gbenson@redhat.com>
5630
5631 * regcache.c (init_register_cache): Move conditionals inside if.
5632
7089dca4
GB
56332014-08-06 Gary Benson <gbenson@redhat.com>
5634
5635 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5636
462f517e
GB
56372014-07-31 Gary Benson <gbenson@redhat.com>
5638
5639 * ax.h: Do not include server.h.
5640 * gdbthread.h: Likewise.
5641 * lynx-low.h: Likewise.
5642 * notif.h: Likewise.
5643
976411d6
GB
56442014-07-30 Gary Benson <gbenson@redhat.com>
5645
5646 * server.h: Include common-defs.h.
5647 Do not include config.h or build-gnulib-gdbserver/config.h.
5648
d41f6d8e
GB
56492014-07-30 Gary Benson <gbenson@redhat.com>
5650
5651 * hostio-errno.c: Move server.h to top of includes list.
5652 * inferiors.c: Likewise.
5653 * linux-x86-low.c: Likewise.
5654 * notif.c: Include server.h.
5655
314c6a35
TT
56562014-07-24 Tom Tromey <tromey@redhat.com>
5657 Gary Benson <gbenson@redhat.com>
5658
5659 * server.h (CORE_ADDR): Now unsigned.
5660
69ff6be5
PA
56612014-07-16 Pedro Alves <palves@redhat.com>
5662
5663 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5664
ce9e3fe7
PA
56652014-07-15 Pedro Alves <palves@redhat.com>
5666
5667 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5668 copy.
5669
e76126e8
PA
56702014-07-11 Pedro Alves <palves@redhat.com>
5671
5672 * linux-low.c (kill_wait_lwp): New function, based on
5673 kill_one_lwp_callback, but use my_waitpid directly.
5674 (kill_one_lwp_callback, linux_kill): Use it.
5675
8e9db26e
PA
56762014-06-23 Pedro Alves <palves@redhat.com>
5677
5678 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5679 before setting DR0..DR3.
5680
698b3e08
GB
56812014-06-20 Gary Benson <gbenson@redhat.com>
5682
5683 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5684 * configure: Regenerated.
5685 * config.in: Likewise.
5686
125f8a3d
GB
56872014-06-20 Gary Benson <gbenson@redhat.com>
5688
5689 * Makefile.in (SFILES): Update locations for files moved
5690 from common to nat.
5691 (object file files): Reordered.
5692
42995dbd
GB
56932014-06-20 Gary Benson <gbenson@redhat.com>
5694
5695 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5696 (i386_dr_low_set_addr): Likewise.
5697 (i386_dr_low_get_addr): Likewise.
5698 (i386_dr_low_can_set_control): Likewise.
5699 (i386_dr_low_set_control): Likewise.
5700 (i386_dr_low_get_control): Likewise.
5701 (i386_dr_low_get_status): Likewise.
5702 (i386_get_debug_register_length): Likewise.
5703 * linux-x86-low.c (i386_dr_low_set_addr):
5704 Changed signature. Made static.
5705 (i386_dr_low_get_addr): Likewise.
5706 (i386_dr_low_set_control): Likewise.
5707 (i386_dr_low_get_control): Likewise.
5708 (i386_dr_low_get_status): Likewise.
5709 (i386_dr_low): New global variable.
5710 * win32-i386-low.c (i386_dr_low_set_addr):
5711 Changed signature. Made static.
5712 (i386_dr_low_get_addr): Likewise.
5713 (i386_dr_low_set_control): Likewise.
5714 (i386_dr_low_get_control): Likewise.
5715 (i386_dr_low_get_status): Likewise.
5716 (i386_dr_low): New global variable.
5717
e1d2394b
MS
57182014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5719
5720 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5721 * Makefile.in (AR, AR_FLAGS): Define.
5722 * configure: Regenerate.
5723
3a8ee006
GB
57242014-06-19 Gary Benson <gbenson@redhat.com>
5725
5726 * Makefile.in (i386-dregs.o): New rule.
5727 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5728 * i386-low.c (target.h): Remove include.
5729 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5730 (DR_CONTROL_SHIFT): Likewise.
5731 (DR_CONTROL_SIZE): Likewise.
5732 (DR_RW_EXECUTE): Likewise.
5733 (DR_RW_WRITE): Likewise.
5734 (DR_RW_READ): Likewise.
5735 (DR_RW_IORW): Likewise.
5736 (DR_LEN_1): Likewise.
5737 (DR_LEN_2): Likewise.
5738 (DR_LEN_4): Likewise.
5739 (DR_LEN_8): Likewise.
5740 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5741 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5742 (DR_ENABLE_SIZE): Likewise.
5743 (DR_LOCAL_SLOWDOWN): Likewise.
5744 (DR_GLOBAL_SLOWDOWN): Likewise.
5745 (DR_CONTROL_RESERVED): Likewise.
5746 (I386_DR_CONTROL_MASK): Likewise.
5747 (I386_DR_VACANT): Likewise.
5748 (I386_DR_LOCAL_ENABLE): Likewise.
5749 (I386_DR_GLOBAL_ENABLE): Likewise.
5750 (I386_DR_DISABLE): Likewise.
5751 (I386_DR_SET_RW_LEN): Likewise.
5752 (I386_DR_GET_RW_LEN): Likewise.
5753 (I386_DR_WATCH_HIT): Likewise.
5754 (i386_wp_op_t): Likewise.
5755 (i386_show_dr): Likewise.
5756 (i386_length_and_rw_bits): Likewise.
5757 (i386_insert_aligned_watchpoint): Likewise.
5758 (i386_remove_aligned_watchpoint): Likewise.
5759 (i386_handle_nonaligned_watchpoint): Likewise.
5760 i386_update_inferior_debug_regs(): Likewise.
5761 (i386_dr_insert_watchpoint): Likewise.
5762 (i386_dr_remove_watchpoint): Likewise.
5763 (i386_dr_region_ok_for_watchpoint): Likewise.
5764 (i386_dr_stopped_data_address): Likewise.
5765 (i386_dr_stopped_by_watchpoint): Likewise.
5766
8f26655c
GB
57672014-06-19 Gary Benson <gbenson@redhat.com>
5768
5769 * i386-low.c (i386_dr_show): Renamed to
5770 i386_show_dr and made static. All uses updated.
5771 (i386_dr_length_and_rw_bits): Renamed to
5772 i386_length_and_rw_bits and made static.
5773 All uses updated.
5774 (i386_dr_insert_aligned_watchpoint): Renamed to
5775 i386_insert_aligned_watchpoint and made static.
5776 All uses updated.
5777 (i386_dr_remove_aligned_watchpoint): Renamed to
5778 i386_remove_aligned_watchpoint and made static.
5779 All uses updated.
5780 (i386_dr_update_inferior_debug_regs): Renamed to
5781 i386_update_inferior_debug_regs and made static.
5782 All uses updated.
5783
b9228891
GB
57842014-06-18 Gary Benson <gbenson@redhat.com>
5785
5171def3
GB
5786 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5787 (i386_dr_low_can_set_control): Likewise.
5788 (i386_get_debug_register_length): Likewise.
5789 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5790 (i386_dr_low_can_set_control): Likewise.
5791 (i386_get_debug_register_length): Likewise.
5792
57932014-06-17 Gary Benson <gbenson@redhat.com>
5794
b9228891
GB
5795 * i386-low.h (i386-dregs.h): New include.
5796 (DR_FIRSTADDR): Now in i386-dregs.h.
5797 (DR_LASTADDR): Likewise.
5798 (DR_NADDR): Likewise.
5799 (DR_STATUS): Likewise.
5800 (DR_CONTROL): Likewise.
5801 (i386_debug_reg_state): Likewise.
5802 (i386_dr_insert_watchpoint): Likewise.
5803 (i386_dr_remove_watchpoint): Likewise.
5804 (i386_dr_region_ok_for_watchpoint): Likewise.
5805 (i386_dr_stopped_data_address): Likewise.
5806 (i386_dr_stopped_by_watchpoint): Likewise.
5807 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5808
4be83cc2
GB
58092014-06-18 Gary Benson <gbenson@redhat.com>
5810
5811 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5812 i386_dr_insert_watchpoint.
5813 (i386_low_remove_watchpoint): Renamed to
5814 i386_dr_remove_watchpoint.
5815 (i386_low_region_ok_for_watchpoint): Renamed to
5816 i386_dr_region_ok_for_watchpoint.
5817 (i386_low_stopped_data_address): Renamed to
5818 i386_dr_stopped_data_address.
5819 (i386_low_stopped_by_watchpoint): Renamed to
5820 i386_dr_stopped_by_watchpoint.
5821 * i386-low.c (i386_show_dr): Renamed to
5822 i386_dr_show and made nonstatic. All uses updated.
5823 (i386_length_and_rw_bits): Renamed to
5824 i386_dr_length_and_rw_bits and made nonstatic.
5825 All uses updated.
5826 (i386_insert_aligned_watchpoint): Renamed to
5827 i386_dr_insert_aligned_watchpoint and made nonstatic.
5828 All uses updated.
5829 (i386_remove_aligned_watchpoint): Renamed to
5830 i386_dr_remove_aligned_watchpoint and made nonstatic.
5831 All uses updated.
5832 (i386_update_inferior_debug_regs): Renamed to
5833 i386_dr_update_inferior_debug_regs and made nonstatic.
5834 All uses updated.
5835 (i386_low_insert_watchpoint): Renamed to
5836 i386_dr_insert_watchpoint. All uses updated.
5837 (i386_low_remove_watchpoint): Renamed to
5838 i386_dr_remove_watchpoint. All uses updated.
5839 (i386_low_region_ok_for_watchpoint): Renamed to
5840 i386_dr_region_ok_for_watchpoint. All uses updated.
5841 (i386_low_stopped_data_address): Renamed to
5842 i386_dr_stopped_data_address. All uses updated.
5843 (i386_low_stopped_by_watchpoint): Renamed to
5844 i386_dr_stopped_by_watchpoint. All uses updated.
5845
131aa0d4
GB
58462014-06-18 Gary Benson <gbenson@redhat.com>
5847
5848 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5849 (i386_dr_low_can_set_control): Likewise.
5850 (i386_insert_aligned_watchpoint): New check.
5851
d9305f7f
GB
58522014-06-18 Gary Benson <gbenson@redhat.com>
5853
5854 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5855 Renamed to state.
5856
e927c9fc
GB
58572014-06-18 Gary Benson <gbenson@redhat.com>
5858
5859 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5860 instead of fatal and error.
5861 (i386_handle_nonaligned_watchpoint): Likewise.
5862
1b6d4134
GB
58632014-06-18 Gary Benson <gbenson@redhat.com>
5864
5865 * i386-low.c (i386_get_debug_register_length): New macro.
5866 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5867 (i386_show_dr): Use debug_printf instead of fprintf. Use
5868 phex to format values.
5869
6e62758f
GB
58702014-06-18 Gary Benson <gbenson@redhat.com>
5871
5872 * i386-low.h: Comment changes.
5873 * i386-low.c: Likewise.
5874
fc6e2f03
GB
58752014-06-18 Gary Benson <gbenson@redhat.com>
5876
5877 * i386-low.c: Whitespace changes.
5878
f9d1eeed
TT
58792014-06-12 Tom Tromey <tromey@redhat.com>
5880
5881 * utils.c (freeargv): Remove.
5882
0b04e523
TT
58832014-06-12 Tom Tromey <tromey@redhat.com>
5884
5885 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5886 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5887 (parse_debug_format_options): Likewise.
5888 (gdbserver_usage): Likewise.
5889 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5890 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5891 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5892 against libiberty.
5893 ($(LIBGNU)): Depend on libiberty.
5894 (all-lib): Recurse into all subdirs.
5895 (install-only): Invoke "install" target in subdirs.
5896 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5897 targets.
5898 * configure: Rebuild.
5899 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5900 for vasprintf, vsnprintf, or gettimeofday.
5901 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5902 srv_tgtobj.
5903
270c9937
JB
59042014-06-05 Joel Brobecker <brobecker@adacore.com>
5905
5906 * development.sh: Delete.
5907 * Makefile.in (config.status): Adjust dependency on development.sh.
5908 * configure.ac: Adjust development.sh source call.
5909 * configure: Regenerate.
5910
0a261ed8
PA
59112014-06-02 Pedro Alves <palves@redhat.com>
5912
5913 * ax.c (gdb_free_agent_expr): New function.
5914 * ax.h (gdb_free_agent_expr): New declaration.
5915 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5916 list.
5917 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5918 static.
5919 (clear_breakpoint_conditions_and_commands): New function.
5920 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5921 (clear_breakpoint_conditions_and_commands): New declaration.
5922
e9dae05e
RR
59232014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5924
5925 * linux-aarch64-low.c (asm/ptrace.h): Include.
5926
5876f503
JK
59272014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5928
5929 Fix TLS access for -static -pthread.
5930 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5931 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5932 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5933
802e8e6d
PA
59342014-05-20 Pedro Alves <palves@redhat.com>
5935
5936 * linux-aarch64-low.c (aarch64_insert_point)
5937 (aarch64_remove_point): No longer check whether the type is
5938 supported here. Adjust to new interface.
5939 (the_low_target): Install aarch64_supports_z_point_type as
5940 supports_z_point_type method.
5941 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5942 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5943 instead of a Z packet char. Adjust.
5944 (arm_supports_z_point_type): New function.
5945 (arm_insert_point, arm_remove_point): Adjust to new interface.
5946 (the_low_target): Install arm_supports_z_point_type.
5947 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5948 (cris_insert_point, cris_remove_point): Adjust to new interface.
5949 Don't check whether the type is supported here.
5950 (the_low_target): Install cris_supports_z_point_type.
5951 * linux-low.c (linux_supports_z_point_type): New function.
5952 (linux_insert_point, linux_remove_point): Adjust to new interface.
5953 * linux-low.h (struct linux_target_ops) <insert_point,
5954 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5955 raw_breakpoint pointer parameter.
5956 <supports_z_point_type>: New method.
5957 * linux-mips-low.c (mips_supports_z_point_type): New function.
5958 (mips_insert_point, mips_remove_point): Adjust to new interface.
5959 Use mips_supports_z_point_type.
5960 (the_low_target): Install mips_supports_z_point_type.
5961 * linux-ppc-low.c (the_low_target): Install NULL as
5962 supports_z_point_type method.
5963 * linux-s390-low.c (the_low_target): Install NULL as
5964 supports_z_point_type method.
5965 * linux-sparc-low.c (the_low_target): Install NULL as
5966 supports_z_point_type method.
5967 * linux-x86-low.c (x86_supports_z_point_type): New function.
5968 (x86_insert_point): Adjust to new insert_point interface. Use
5969 insert_memory_breakpoint. Adjust to new
5970 i386_low_insert_watchpoint interface.
5971 (x86_remove_point): Adjust to remove_point interface. Use
5972 remove_memory_breakpoint. Adjust to new
5973 i386_low_remove_watchpoint interface.
5974 (the_low_target): Install x86_supports_z_point_type.
5975 * lynx-low.c (lynx_target_ops): Install NULL as
5976 supports_z_point_type callback.
5977 * nto-low.c (nto_supports_z_point_type): New.
5978 (nto_insert_point, nto_remove_point): Adjust to new interface.
5979 (nto_target_ops): Install nto_supports_z_point_type.
5980 * mem-break.c: Adjust intro comment.
5981 (struct raw_breakpoint) <raw_type, size>: New fields.
5982 <inserted>: Update comment.
5983 <shlib_disabled>: Delete field.
5984 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5985 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5986 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5987 (raw_bkpt_type_to_target_hw_bp_type): New function.
5988 (find_enabled_raw_code_breakpoint_at): New function.
5989 (find_raw_breakpoint_at): New type and size parameters. Use them.
5990 (insert_memory_breakpoint): New function, based off
5991 set_raw_breakpoint_at.
5992 (remove_memory_breakpoint): New function.
5993 (set_raw_breakpoint_at): Reimplement.
5994 (set_breakpoint): New, based on set_breakpoint_at.
5995 (set_breakpoint_at): Reimplement.
5996 (delete_raw_breakpoint): Go through the_target->remove_point
5997 instead of assuming memory breakpoints.
5998 (find_gdb_breakpoint_at): Delete.
5999 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6000 (find_gdb_breakpoint): New function.
6001 (set_gdb_breakpoint_at): Delete.
6002 (z_type_supported): New function.
6003 (set_gdb_breakpoint_1): New function, loosely based off
6004 set_gdb_breakpoint_at.
6005 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6006 (delete_gdb_breakpoint_at): Delete.
6007 (delete_gdb_breakpoint_1): New function, loosely based off
6008 delete_gdb_breakpoint_at.
6009 (delete_gdb_breakpoint): New function.
6010 (clear_gdb_breakpoint_conditions): Rename to ...
6011 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6012 breakpoint.
6013 (add_condition_to_breakpoint): Make static.
6014 (add_breakpoint_condition): Take a struct breakpoint pointer
6015 instead of an address. Adjust.
6016 (gdb_condition_true_at_breakpoint): Rename to ...
6017 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6018 z_type parameter.
6019 (gdb_condition_true_at_breakpoint): Reimplement.
6020 (add_breakpoint_commands): Take a struct breakpoint pointer
6021 instead of an address. Adjust.
6022 (gdb_no_commands_at_breakpoint): Rename to ...
6023 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6024 parameter. Return true if no breakpoint was found. Change debug
6025 output.
6026 (gdb_no_commands_at_breakpoint): Reimplement.
6027 (run_breakpoint_commands): Rename to ...
6028 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6029 and change return type to boolean.
6030 (run_breakpoint_commands): New function.
6031 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6032 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6033 breakpoint. Go through the_target->remove_point instead of
6034 assuming memory breakpoint.
6035 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6036 software and hardware breakpoints.
6037 (reinsert_raw_breakpoint): Go through the_target->insert_point
6038 instead of assuming memory breakpoint.
6039 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6040 software and hardware breakpoints.
6041 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6042 Check both software and hardware breakpoints.
6043 (validate_inserted_breakpoint): Assert the breakpoint is a
6044 software breakpoint. Set the inserted flag to -1 instead of
6045 setting shlib_disabled.
6046 (delete_disabled_breakpoints): Adjust.
6047 (validate_breakpoints): Only validate software breakpoints.
6048 Adjust to inserted flag change.
6049 (check_mem_read, check_mem_write): Skip breakpoint types other
6050 than software breakpoints. Adjust to inserted flag change.
6051 * mem-break.h (enum raw_bkpt_type): New enum.
6052 (raw_breakpoint, struct process_info): Forward declare.
6053 (Z_packet_to_target_hw_bp_type): Delete declaration.
6054 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6055 (set_gdb_breakpoint, delete_gdb_breakpoint)
6056 (clear_breakpoint_conditions): New declarations.
6057 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6058 (breakpoint_inserted_here): Update comment.
6059 (add_breakpoint_condition, add_breakpoint_commands): Replace
6060 address parameter with a breakpoint pointer parameter.
6061 (gdb_breakpoint_here): Update comment.
6062 (delete_gdb_breakpoint_at): Delete.
6063 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6064 * server.c (process_point_options): Take a struct breakpoint
6065 pointer instead of an address. Adjust.
6066 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6067 delete_gdb_breakpoint.
6068 * spu-low.c (spu_target_ops): Install NULL as
6069 supports_z_point_type method.
6070 * target.h: Include mem-break.h.
6071 (struct target_ops) <prepare_to_access_memory>: Update comment.
6072 <supports_z_point_type>: New field.
6073 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6074 instead of a char. Also take a raw breakpoint pointer.
6075 * win32-arm-low.c (the_low_target): Install NULL as
6076 supports_z_point_type.
6077 * win32-i386-low.c (i386_supports_z_point_type): New function.
6078 (i386_insert_point, i386_remove_point): Adjust to new interface.
6079 (the_low_target): Install i386_supports_z_point_type.
6080 * win32-low.c (win32_supports_z_point_type): New function.
6081 (win32_insert_point, win32_remove_point): Adjust to new interface.
6082 (win32_target_ops): Install win32_supports_z_point_type.
6083 * win32-low.h (struct win32_target_ops):
6084 <supports_z_point_type>: New method.
6085 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6086 instead of a char. Also take a raw breakpoint pointer.
6087
932539e3
PA
60882014-05-20 Pedro Alves <palves@redhat.com>
6089
6090 * mem-break.h: Include break-common.h.
6091 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6092 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6093 (Z_packet_to_target_hw_bp_type): New declaration.
6094 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6095 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6096 (Z_PACKET_ACCESS_WP): Delete macros.
6097 (Z_packet_to_hw_type): Delete function.
6098 * i386-low.h: Don't include break-common.h here.
6099 (Z_packet_to_hw_type): Delete declaration.
6100 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6101 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6102 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6103 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6104 * linux-aarch64-low.c: Don't include break-common.h here.
6105 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6106 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6107 (Z_packet_to_target_hw_bp_type): Delete function.
6108 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6109 function.
6110 (mips_insert_point, mips_remove_point): Use
6111 Z_packet_to_target_hw_bp_type.
6112
4ff0d3d8
PA
61132014-05-20 Pedro Alves <palves@redhat.com>
6114
6115 * linux-aarch64-low.c: Include break-common.h.
6116 (enum target_point_type): Delete.
6117 (Z_packet_to_point_type): Rename to ...
6118 (Z_packet_to_target_hw_bp_type): ... this, and return a
6119 target_hw_bp_type instead.
6120 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6121 instead of an enum target_point_type.
6122 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6123 breakpoint type.
6124 (aarch64_dr_state_insert_one_point)
6125 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6126 (aarch64_handle_aligned_watchpoint)
6127 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6128 Take an enum target_hw_bp_type instead of an enum
6129 target_point_type.
6130 (aarch64_supports_z_point_type): New function.
6131 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6132 use Z_packet_to_target_hw_bp_type.
6133
786dc519
JB
61342014-05-20 Joel Brobecker <brobecker@adacore.com>
6135
6136 * configure.ac: Only use -Werror by default when DEVELOPMENT
6137 is true.
6138 * configure: Regenerate.
6139
9e0aa64f
JK
61402014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6141
6142 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6143 * linux-x86-low.c (X86_64_USER_REGS): New.
6144 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6145
2b577b92
YQ
61462014-04-28 Yao Qi <yao@codesourcery.com>
6147
6148 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6149 name.
6150
94611da2
PA
61512014-04-25 Pedro Alves <palves@redhat.com>
6152
6153 PR server/16255
6154 * linux-low.c (linux_attach_fail_reason_string): New function.
6155 (linux_attach_lwp): Delete.
6156 (linux_attach_lwp_1): Rename to ...
6157 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6158 argument. Remove "initial" parameter. Return int instead of
6159 void. Don't error or warn here.
6160 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6161 failure to attach to the tgid. Call warning when failing to
6162 attach to an lwp.
6163 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6164 argument. Remove "initial" parameter. Return int instead of
6165 void. Don't error or warn here.
6166 (linux_attach_fail_reason_string): New declaration.
6167 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6168 interface change. Use linux_attach_fail_reason_string.
6169
01f9f808
MS
61702014-04-24 Michael Sturm <michael.sturm@mintel.com>
6171 Walfred Tedeschi <walfred.tedeschi@intel.com>
6172
6173 * Makefile.in: Added rules to handle new files
6174 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6175 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6176 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6177 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6178 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6179 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6180 x32-avx512-linux.o.
6181 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6182 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6183 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6184 i386/x32-avx512.xml.
6185 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6186 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6187 i386/x32-avx512-linux.xml.
6188 * i387-fp.c (num_avx512_k_registers): New constant for number
6189 of K registers.
6190 (num_avx512_zmmh_low_registers): New constant for number of
6191 lower ZMM registers (0-15).
6192 (num_avx512_zmmh_high_registers): New constant for number of
6193 higher ZMM registers (16-31).
6194 (num_avx512_ymmh_registers): New contant for number of higher
6195 YMM registers (ymm16-31 added by avx521 on x86_64).
6196 (num_avx512_xmm_registers): New constant for number of higher
6197 XMM registers (xmm16-31 added by AVX512 on x86_64).
6198 (struct i387_xsave): Add space for AVX512 registers.
6199 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6200 Add code to handle AVX512 registers.
6201 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6202 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6203 prototypei from generated file.
6204 (tdesc_amd64_avx512_linux): Likewise.
6205 (init_registers_x32_avx512_linux): Likewise.
6206 (tdesc_x32_avx512_linux): Likewise.
6207 (init_registers_i386_avx512_linux): Likewise.
6208 (tdesc_i386_avx512_linux): Likewise.
6209 (x86_64_regmap): Add AVX512 registers.
6210 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6211 mask.
6212 (initialize_low_arch): Add code to initialize AVX512 registers.
6213
51aa91f9
PA
62142014-04-23 Pedro Alves <palves@redhat.com>
6215
6216 * mem-break.c (find_gdb_breakpoint_at): Make static.
6217 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6218
a4165e94
PA
62192014-04-23 Pedro Alves <palves@redhat.com>
6220
6221 * i386-low.c: Don't include break-common.h here.
6222 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6223 prototype to take target_hw_bp_type as argument instead of a Z
6224 packet char.
6225 * i386-low.h: Include break-common.h here.
6226 (Z_packet_to_hw_type): Declare.
6227 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6228 prototypes.
6229 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6230 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6231 (x86_remove_point): Convert the packet number to a
6232 target_hw_bp_type before calling i386_low_remove_watchpoint.
6233 * win32-i386-low.c (i386_insert_point): Convert the packet number
6234 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6235 (i386_remove_point): Convert the packet number to a
6236 target_hw_bp_type before calling i386_low_remove_watchpoint.
6237
b8acf843
PA
62382014-04-23 Pedro Alves <palves@redhat.com>
6239
6240 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6241
d708bcd1
PA
62422014-04-10 Pedro Alves <palves@redhat.com>
6243
6244 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6245 Check if the condition or command is NULL before checking if the
6246 breakpoint is known. On success, return true.
6247 * mem-break.h (add_breakpoint_condition): Document return.
6248 (add_breakpoint_commands): Add describing comment.
6249 * server.c (skip_to_semicolon): New function.
6250 (process_point_options): Use it.
6251
2eec7d5b
PA
62522014-04-09 Pedro Alves <palves@redhat.com>
6253
6254 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6255 to lwpid_of.
6256
fa96cb38
PA
62572014-02-27 Pedro Alves <palves@redhat.com>
6258
6259 PR 12702
6260 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6261 macros.
6262 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6263 output.
6264 (last_thread_of_process_p): Take a PID argument instead of a
6265 thread pointer.
6266 (linux_wait_for_lwp): Delete.
6267 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6268 functions.
6269 (linux_low_filter_event): New function, party factored out from
6270 linux_wait_for_event.
6271 (linux_wait_for_event): Rename to ...
6272 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6273 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6274 sigsuspend. Check for zombie leaders.
6275 (linux_wait_for_event): Reimplement as wrapper around
6276 linux_wait_for_event_filtered.
6277 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6278 a normal or signal exit is seen, it's the whole process exiting.
6279 (wait_for_sigstop): No longer a for_each_inferior callback.
6280 Rewrite on top of linux_wait_for_event_filtered.
6281 (stop_all_lwps): Call wait_for_sigstop directly.
6282 * server.c (resume, handle_target_event): Handle
6283 TARGET_WAITKIND_NO_RESUMED.
6284
d763de10
JB
62852014-02-26 Joel Brobecker <brobecker@adacore.com>
6286
6287 * win32-low.c (psapi_get_dll_name,
6288 * win32_CreateToolhelp32Snapshot): Delete.
6289 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6290 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6291 Delete.
6292 (handle_load_dll): Add function description.
6293 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6294
850a0f76
JB
62952014-02-26 Joel Brobecker <brobecker@adacore.com>
6296
6297 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6298 Add comment.
6299 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6300 base address when calling win32_add_one_solib.
6301 (handle_load_dll): Delete local variable load_addr.
6302 Remove 0x1000 offset applied to DLL base address when calling
6303 win32_add_one_solib.
6304 (handle_unload_dll): Add comment.
6305
f25b3fc3
JB
63062014-02-26 Joel Brobecker <brobecker@adacore.com>
6307
6308 * win32-low.c (win32_add_all_dlls): Renames
6309 win32_ensure_ntdll_loaded. Rewrite function documentation.
6310 Adjust implementation to always load all DLLs.
6311 Add 0x1000 offset to DLL base address when calling
6312 win32_add_one_solib.
6313 (child_initialization_done): New static global.
6314 (do_initial_child_stuff): Set child_initialization_done to
6315 zero during child initialization, and 1 after. Replace call
6316 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6317 Add comment.
6318 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6319 (handle_unload_dll): Add function documentation.
6320 (get_child_debug_event): Ignore load and unload DLL events
6321 during child initialization.
6322
d86d4aaf
DE
63232014-02-20 Doug Evans <dje@google.com>
6324
3bc32da3 6325 Remove global all_lwps.
d86d4aaf
DE
6326 * inferiors.h (ptid_of): Move here from linux-low.h.
6327 (pid_of, lwpid_of): Ditto.
6328 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6329 parameter is a struct thread_info * now.
6330 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6331 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6332 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6333 directly.
6334 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6335 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6336 * linux-arm-low.c (update_registers_callback): Update, "entry"
6337 parameter is a struct thread_info * now.
6338 Fetch lwpid from current_inferior directly.
6339 (arm_insert_point): Pass &all_threads to find_inferior instead of
6340 &all_lwps.
6341 (arm_remove_point): Ditto.
6342 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6343 (arm_prepare_to_resume): Fetch pid from thread.
6344 (arm_read_description): Fetch lwpid from current_inferior directly.
6345 * linux-low.c (all_lwps): Delete.
6346 (delete_lwp): Delete call to remove_inferior.
6347 (handle_extended_wait): Fetch lwpid from thread.
6348 (add_lwp): Don't set lwp->entry.id. Remove call to
6349 add_inferior_to_list.
6350 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6351 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6352 (kill_one_lwp_callback): Ditto.
6353 (linux_kill): Don't dereference NULL pointer.
6354 Fetch ptid,lwpid from thread.
6355 (get_detach_signal): Fetch ptid from thread.
6356 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6357 Simplify call to regcache_invalidate_thread.
6358 (delete_lwp_callback): Update, "entry" parameter is a
6359 struct thread_info * now. Fetch pid from thread.
6360 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6361 (status_pending_p_callback): Update, "entry" parameter is a
6362 struct thread_info * now. Fetch ptid from thread.
6363 (find_lwp_pid): Update, "entry" parameter is a
6364 struct thread_info * now.
6365 (linux_wait_for_lwp): Fetch pid from thread.
6366 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6367 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6368 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6369 (dequeue_one_deferred_signal): Ditto.
6370 (cancel_breakpoint): Fetch ptid from current_inferior.
6371 (linux_wait_for_event): Pass &all_threads to find_inferior,
6372 not &all_lwps. Fetch ptid, lwpid from thread.
6373 (count_events_callback): Update, "entry" parameter is a
6374 struct thread_info * now.
6375 (select_singlestep_lwp_callback): Ditto.
6376 (select_event_lwp_callback): Ditto.
6377 (cancel_breakpoints_callback): Ditto.
6378 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6379 not &all_lwps.
6380 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6381 (unsuspend_one_lwp): Update, "entry" parameter is a
6382 struct thread_info * now.
6383 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6384 not &all_lwps.
6385 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6386 Fetch lwpid from thread, not lwp.
6387 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6388 Pass &all_threads to find_inferior, not &all_lwps.
6389 (send_sigstop): Fetch lwpid from thread, not lwp.
6390 (send_sigstop_callback): Update, "entry" parameter is a
6391 struct thread_info * now.
6392 (suspend_and_send_sigstop_callback): Ditto.
6393 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6394 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6395 struct thread_info * now.
6396 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6397 from thread, lwp.
6398 (lwp_running): Update, "entry" parameter is a
6399 struct thread_info * now.
6400 (stop_all_lwps): Fetch ptid from thread.
6401 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6402 (linux_resume_one_lwp): Fetch lwpid from thread.
6403 (linux_set_resume_request): Update, "entry" parameter is a
6404 struct thread_info * now. Fetch pid, lwpid from thread.
6405 (resume_status_pending_p): Update, "entry" parameter is a
6406 struct thread_info * now.
6407 (need_step_over_p): Ditto. Fetch lwpid from thread.
6408 (start_step_over): Fetch lwpid from thread.
6409 (linux_resume_one_thread): Update, "entry" parameter is a
6410 struct thread_info * now. Fetch lwpid from thread.
6411 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6412 (proceed_one_lwp): Update, "entry" parameter is a
6413 struct thread_info * now. Fetch lwpid from thread.
6414 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6415 struct thread_info * now.
6416 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6417 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6418 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6419 directly.
6420 (regsets_store_inferior_registers): Ditto.
6421 (fetch_register, store_register): Ditto.
6422 (linux_read_memory, linux_write_memory): Ditto.
6423 (linux_request_interrupt): Ditto.
6424 (linux_read_auxv): Ditto.
6425 (linux_xfer_siginfo): Ditto.
6426 (linux_qxfer_spu): Ditto.
6427 (linux_qxfer_libraries_svr4): Ditto.
6428 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6429 moved to inferiors.h.
6430 (get_lwp): Delete.
6431 (get_thread_lwp): Update.
6432 (struct lwp_info): Delete member "entry". Simplify comment for
6433 member "thread".
6434 (all_lwps): Delete.
6435 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6436 current_inferior directly.
6437 (update_watch_registers_callback): Update, "entry" parameter is a
6438 struct thread_info * now. Fetch pid from thread.
6439 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6440 (mips_insert_point): Fetch lwpid from current_inferior.
6441 Pass &all_threads to find_inferior, not &all_lwps.
6442 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6443 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6444 directly.
6445 (mips_stopped_data_address): Ditto.
6446 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6447 directly.
6448 * linux-tile-low.c (tile_arch_setup): Ditto.
6449 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6450 (update_debug_registers_callback): Update, "entry" parameter is a
6451 struct thread_info * now. Fetch pid from thread.
6452 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6453 Pass &all_threads to find_inferior, not &all_lwps.
6454 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6455 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6456 Pass &all_threads to find_inferior, not &all_lwps.
6457 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6458 (i386_dr_low_get_status): Ditto.
6459 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6460 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6461 (x86_linux_read_description): Ditto.
6462 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6463
3b8361aa
DE
64642014-02-20 Doug Evans <dje@google.com>
6465
6466 * inferiors.c (get_first_inferior): Fix buglet.
6467
f7667f0d
DE
64682014-02-19 Doug Evans <dje@google.com>
6469
6470 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6471 * inferiors.c (add_thread): Change result type to struct thread_info *.
6472 All callers updated.
6473 (add_lwp): Call add_thread here instead of in callers.
6474 All callers updated.
6475 * linux-low.h (get_lwp_thread): Rewrite.
6476 (struct lwp_info): New member "thread".
6477
b3312d80
DE
64782014-02-19 Doug Evans <dje@google.com>
6479
6480 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6481 All callers updated.
6482
ecc6f45c
DE
64832014-02-19 Doug Evans <dje@google.com>
6484
6485 * inferiors.c (add_thread): Fix whitespace.
6486
649ebbca
DE
64872014-02-19 Doug Evans <dje@google.com>
6488
6489 * dll.c (clear_dlls): Replace accessing list implemention details
6490 with API function.
6491 * gdbthread.h (get_first_thread): Declare.
6492 * inferiors.c (for_each_inferior_with_data): New function.
6493 (get_first_thread): New function.
6494 (find_thread_ptid): Simplify.
6495 (get_first_inferior): New function.
6496 (clear_list): Delete.
6497 (one_inferior_p): New function.
6498 (clear_inferior_list): New function.
6499 (clear_inferiors): Update.
6500 * inferiors.h (for_each_inferior_with_data): Declare.
6501 (clear_inferior_list): Declare.
6502 (one_inferior_p): Declare.
6503 (get_first_inferior): Declare.
6504 * linux-low.c (linux_wait_for_event): Replace accessing list
6505 implemention details with API function.
6506 * server.c (target_running): Ditto.
6507 (accumulate_file_name_length): New function.
6508 (emit_dll_description): New function.
6509 (handle_qxfer_libraries): Replace accessing list implemention
6510 details with API function.
6511 (handle_qxfer_threads_worker): New function.
6512 (handle_qxfer_threads_proper): Replace accessing list implemention
6513 details with API function.
6514 (handle_query): Ditto.
6515 (visit_actioned_threads_callback_ftype): New typedef.
6516 (visit_actioned_threads_data): New struct.
6517 (visit_actioned_threads): Rewrite to be find_inferior callback.
6518 (resume): Call find_inferior.
6519 (handle_status): Replace accessing list implemention
6520 details with API function.
6521 (process_serial_event): Replace accessing list implemention details
6522 with API function.
6523 * target.c (set_desired_inferior): Replace accessing list implemention
6524 details with API function.
6525 * tracepoint.c (same_process_p): New function.
6526 (gdb_agent_about_to_close): Replace accessing list implemention
6527 details with API function.
6528 * win32-low.c (child_delete_thread): Replace accessing list
6529 implemention details with API function.
6530 (match_dll_by_basename): New function.
6531 (dll_is_loaded_by_basename): New function.
6532 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6533 details call to dll_is_loaded_by_basename.
6534
80894984
DE
65352014-02-19 Doug Evans <dje@google.com>
6536
6537 * dll.h (struct dll_info): Add comment.
6538 * gdbthread.h (struct thread_info): Add comment.
6539 (current_ptid): Simplify.
6540 * inferiors.c (add_process): Update.
6541 (remove_process): Update.
6542 * inferiors.h (struct process_info): Rename member "head" to "entry".
6543 * linux-low.c (delete_lwp): Update.
6544 (add_lwp): Update.
6545 (last_thread_of_process_p): Update.
6546 (kill_one_lwp_callback, linux_kill): Update.
6547 (status_pending_p_callback): Update.
6548 (wait_for_sigstop): Update. Simplify read of ptid.
6549 (start_step_over): Update.
6550 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6551 (get_lwp_thread): Update.
6552 (struct lwp_info): Rename member "head" to "entry".
6553 * regcache.h (inferior_list_entry): Delete.
6554 * server.c (kill_inferior_callback): Update.
6555 (detach_or_kill_inferior_callback): Update.
6556 (print_started_pid): Update.
6557 (print_attached_pid): Update.
6558 (process_serial_event): Simplify read of ptid.
6559 * thread-db.c (thread_db_create_event): Update.
6560 (thread_db_get_tls_address): Update.
6561 * win32-low.c (current_inferior_ptid): Simplify.
6562
46917d26
TT
65632014-02-19 Tom Tromey <tromey@redhat.com>
6564
6565 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6566 argument.
6567 (target_supports_btrace): Update.
6568
0759a81e
YQ
65692014-02-14 Yao Qi <yao@codesourcery.com>
6570
6571 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6572 (rsp-low-ipa.o): New target.
6573
a7191e8b
TT
65742014-02-12 Tom Tromey <tromey@redhat.com>
6575
6576 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6577 convert_ascii_to_int.
6578 * regcache.c (registers_to_string): Likewise.
6579 * remote-utils.c (decode_M_packet): Likewise.
6580 * server.c (process_serial_event): Likewise.
6581
ff0e980e
TT
65822014-02-12 Tom Tromey <tromey@redhat.com>
6583
6584 * server.c (handle_query, handle_v_run): Use hex2bin, not
6585 unhexify.
6586 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6587
e9371aff
TT
65882014-02-12 Tom Tromey <tromey@redhat.com>
6589
6590 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6591 convert_int_to_ascii.
6592 * regcache.c (registers_to_string, collect_register_as_string):
6593 Likewise.
6594 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6595 Likewise.
6596 * server.c (process_serial_event): Likewise.
6597 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6598 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6599
971dc0b8
TT
66002014-02-12 Tom Tromey <tromey@redhat.com>
6601
6602 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6603 bin2hex, not hexify.
6604 * tracepoint.c (cmd_qtstatus): Likewise.
6605
0a822afb
TT
66062014-02-12 Tom Tromey <tromey@redhat.com>
6607
6608 * remote-utils.c (monitor_output): Pass explicit length to
6609 hexify.
6610
9c3d6531
TT
66112014-02-12 Tom Tromey <tromey@redhat.com>
6612
6613 * tracepoint.c: Include rsp-low.h.
6614 * server.c: Include rsp-low.h.
6615 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6616 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6617 declare.
6618 * remote-utils.c: Include rsp-low.h.
6619 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6620 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6621 (convert_int_to_ascii, convert_ascii_to_int): Move to
6622 common/rsp-low.c.
6623 * regcache.c: Include rsp-low.h.
6624 * ax.c: Include rsp-low.h.
6625 * Makefile.in (SFILES): Add common/rsp-low.c.
6626 (OBS): Add rsp-low.o.
6627 (rsp-low.o): New target.
6628
01fd3ea5
TT
66292014-02-12 Tom Tromey <tromey@redhat.com>
6630
6631 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6632 Include print-utils.h.
6633 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6634 (plongest, thirty_two, phex_nz): Remove.
6635 * Makefile.in (SFILES): Add common/print-utils.c.
6636 (OBS): Add print-utils.o.
6637 (print-utils-ipa.o): New target.
6638 (print-utils.o): New target.
6639 (IPA_OBJS): Add print-utils-ipa.o.
6640
e99dc820
TT
66412014-02-06 Tom Tromey <tromey@redhat.com>
6642
6643 * Makefile.in (SFILES): Fix indentation.
6644
ee1e2d4f
DE
66452014-02-05 Doug Evans <dje@google.com>
6646
6647 * linux-low.c (linux_wait_for_event): Improve comment.
6648 (linux_wait_1): Keep current_inferior in sync with event_child.
6649
f5a02773
DE
66502014-01-22 Doug Evans <dje@google.com>
6651
6652 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6653
87ce2a04
DE
66542014-01-22 Doug Evans <dje@google.com>
6655
6656 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6657 * configure: Regenerate.
6658 * config.in: Regenerate.
6659 * Makefile.in (SFILES): Add debug.c.
6660 (OBS): Add debug.o.
6661 * debug.c: New file.
6662 * debug.h: New file.
6663 * linux-aarch64-low.c (*): Update all debugging printfs to use
6664 debug_printf instead of fprintf.
6665 * linux-arm-low.c (*): Ditto.
6666 * linux-cris-low.c (*): Ditto.
6667 * linux-crisv32-low.c (*): Ditto.
6668 * linux-m32r-low.c (*): Ditto.
6669 * linux-sparc-low.c (*): Ditto.
6670 * linux-x86.c (*): Ditto.
6671 * linux-low.c (*): Ditto.
6672 (linux_wait_1): Add calls to debug_enter, debug_exit.
6673 (linux_wait): Remove redundant debugging printf.
6674 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6675 (linux_resume, unstop_all_lwps): Ditto.
6676 * mem-break.c (*): Update all debugging printfs to use
6677 debug_printf instead of fprintf.
6678 * remote-utils.c (*): Ditto.
6679 * thread-db.c (*): Ditto.
6680 * server.c #include <ctype.h>, "gdb_vecs.h".
6681 (debug_threads): Moved to debug.c.
6682 (*): Update all debugging printfs to use debug_printf instead of
6683 fprintf.
6684 (start_inferior): Replace call to fflush with call to debug_flush.
6685 (monitor_show_help): Mention set debug-format.
6686 (parse_debug_format_options): New function.
6687 (handle_monitor_command): Handle "monitor set debug-format".
6688 (gdbserver_usage): Mention --debug-format.
6689 (main): Parse --debug-format.
6690 * server.h (debug_threads): Declaration moved to debug.h.
6691 #include "debug.h".
6692 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6693 trace_debug_1 that uses debug_printf.
6694 (tracepoint_look_up_symbols): Update all debugging printfs to use
6695 debug_printf instead of fprintf.
6696
e671835b
BS
66972014-01-20 Baruch Siach <baruch@tkos.co.il>
6698
6699 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6700 sys/ptrace.h.
6701
b5737fa9
PA
67022014-01-17 Pedro Alves <palves@redhat.com>
6703
ea38d2a9 6704 PR build/16445
c7faa97a
PA
6705 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6706 defined after including gdb_proc_service.h.
b5737fa9 6707
40ed484e
DE
67082014-01-16 Doug Evans <dje@google.com>
6709
6710 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6711 (match_dll): Use it.
6712
969c39fb
MM
67132014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6714
6715 * target.h (target_ops) <read_btrace>: Change parameters and
6716 return type to allow error reporting.
6717 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6718 trace reading errors on.
6719 * linux-low.c (linux_low_read_btrace): Pass trace reading
6720 errors on.
6721 (linux_low_disable_btrace): New.
6722
ab7f45ba
DE
67232014-01-15 Doug Evans <dje@google.com>
6724
6725 * inferiors.c (thread_id_to_gdb_id): Delete.
6726 * inferiors.h (thread_id_to_gdb_id): Delete.
6727
66af0f44
EZ
67282014-01-13 Eli Zaretskii <eliz@gnu.org>
6729
6730 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6731 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6732 versions.
6733
9939e131
PA
67342014-01-08 Pedro Alves <palves@redhat.com>
6735
6736 * server.c (handle_status): Don't discard previous queued stop
6737 replies or thread's pending status here.
6738 (main) <disconnection>: Do it here instead.
6739
b7ea362b
PA
67402014-01-08 Pedro Alves <palves@redhat.com>
6741
6742 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6743 * server.c (visit_actioned_threads, handle_pending_status): New
6744 function.
6745 (handle_v_cont): Factor out parts to ...
6746 (resume): ... this new function. If in all-stop, and a thread
6747 being resumed has a pending status, report it without actually
6748 resuming.
6749 (myresume): Adjust to use the new 'resume' function.
6750 (clear_pending_status_callback, set_pending_status_callback)
6751 (find_status_pending_thread_callback): New functions.
6752 (handle_status): Handle the case of multiple threads having
6753 interesting statuses to report. Report threads' real last signal
6754 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6755 with an interesting thread to report the status for, instead of
6756 always reporting the status of the first thread.
6757
28498c42
JB
67582014-01-01 Joel Brobecker <brobecker@adacore.com>
6759
6760 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6761 * gdbreplay.c (gdbreplay_version): Likewise.
6762
f45c82da
YZ
67632013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6764
6765 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6766 iov.iov_len with the real length in use.
6767
379a5e2d
JB
67682013-12-13 Joel Brobecker <brobecker@adacore.com>
6769
6770 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6771 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6772 for all targets that use win32-low.c.
6773 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6774 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6775
4210d83e
PA
67762013-12-13 Pedro Alves <palves@redhat.com>
6777
6778 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6779 if equal to TARGET_WAITKIND_LOADED.
6780 * win32-low.c (cached_status): New static global.
6781 (win32_wait): Add declaration.
6782 (do_initial_child_stuff): Flush all initial pending debug events
6783 up to the initial breakpoint.
6784 (win32_wait): If CACHED_STATUS was set, return that instead
6785 of doing a real wait. Remove the code resuming the execution
6786 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6787 during the initial phase. Also remove the code changing
6788 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6789 TARGET_WAITKIND_STOPPED.
6790
e7f0d979
YQ
67912013-12-11 Yao Qi <yao@codesourcery.com>
6792
6793 * notif.c (handle_notif_ack): Return 0 if no notification
6794 matches.
6795
ebcf782c
DE
67962013-11-20 Doug Evans <dje@google.com>
6797
6798 * linux-low.c (linux_set_resume_request): Fix comment.
6799
20ad9378
DE
68002013-11-20 Doug Evans <dje@google.com>
6801
6802 * linux-low.c (resume_status_pending_p): Tweak comment.
6803
a196ebeb
WT
68042013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6805
6806 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6807 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6808 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6809 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6810 (srv_amd64_regobj): Add amd64-mpx.o.
6811 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6812 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6813 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6814 * i387-fp.c (num_pl_bnd_register) Added constant.
6815 (num_pl_bnd_cfg_registers) Added constant.
6816 (struct i387_xsave) Added reserved area and MPX fields.
6817 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6818 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6819 function.
6820 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6821 (init_registers_amd64_mpx_linux): Declare new function.
6822 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6823 (x86_64_regmap): Add MPX registers.
6824 (x86_linux_read_description): Add MPX case.
6825 (initialize_low_arch): Initialize MPX targets.
6826
0080a2f6
TT
68272013-11-18 Tom Tromey <tromey@redhat.com>
6828
6829 * configure: Rebuild.
6830 * configure.ac: Don't check for stdlib.h.
6831 * gdbreplay.c: Unconditionally include stdlib.h.
6832
2978b111
TT
68332013-11-18 Tom Tromey <tromey@redhat.com>
6834
6835 * config.in: Rebuild.
6836 * configure: Rebuild.
6837 * configure.ac: Don't use AC_HEADER_DIRENT.
6838
a3d08894
TT
68392013-11-18 Tom Tromey <tromey@redhat.com>
6840
6841 * server.h: Don't check HAVE_STRING_H.
6842 * gdbreplay.c: Don't check HAVE_STRING_H.
6843 * configure: Rebuild.
6844
0a5dd17d
TT
68452013-11-18 Tom Tromey <tromey@redhat.com>
6846
6847 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6848 LIBGNU.
6849
1bd2f0ba
TT
68502013-11-08 Tom Tromey <tromey@redhat.com>
6851
6852 * configure, config.in: Rebuild.
6853 * configure.ac: Remove unused configury.
6854
3266f10b
TT
68552013-11-08 Tom Tromey <tromey@redhat.com>
6856
6857 * acinclude.m4: Include common.m4, codeset.m4.
6858 * configure, config.in: Rebuild.
6859 * configure.ac: Use GDB_AC_COMMON.
6860
6682d959
AA
68612013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6862
6863 * linux-s390-low.c (HWCAP_S390_TE): New define.
6864 (s390_arch_setup): Consider the TE field in the HWCAP for
6865 determining 'have_regset_tdb'.
6866
fd0a4d76
SDJ
68672013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6868
6869 PR gdb/16014
6870 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6871 call to sizeof.
6872
1a3d890b
PA
68732013-10-02 Pedro Alves <palves@redhat.com>
6874
6875 * server.c (process_serial_event): Don't output "GDBserver
6876 exiting" if GDB is connected through stdio.
6877 * target.c (mywait): Likewise, be silent if GDB is connected
6878 through stdio.
6879
97ad4581
JB
68802013-10-01 Joel Brobecker <brobecker@adacore.com>
6881
6882 * lynx-low.c (lynx_add_threads_after_attach): New function.
6883 (lynx_attach): Remove call to add_thread. Add call to
6884 lynx_add_threads_after_attach instead.
6885
5b4e221c
MF
68862013-09-28 Mike Frysinger <vapier@gentoo.org>
6887
6888 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6889 * config.in, configure: Regenerated.
6890
ee47b2f8
YQ
68912013-09-18 Yao Qi <yao@codesourcery.com>
6892
6893 PR server/15959
6894 * server.c (start_inferior): Clear 'resume_info'.
6895
d6707650 68962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6897
d6707650
JW
6898 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6899 for each register.
6900
9243dd0e 69012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6902
9243dd0e
JW
6903 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6904 linux-tile-low.o to srv_tgtobj.
6905
c623a6ef
WN
69062013-09-16 Will Newton <will.newton@linaro.org>
6907
6908 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6909 out regs.
6910
fb71d39e
PA
69112013-09-06 Pedro Alves <palves@redhat.com>
6912
6913 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6914 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6915 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6916 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6917 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6918 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6919
8e7e9910
PA
69202013-09-06 Pedro Alves <palves@redhat.com>
6921
6922 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6923 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6924
7c3a12ca
PA
69252013-09-06 Pedro Alves <palves@redhat.com>
6926
6927 * linux-amd64-ipa.c: Include tracepoint.h.
6928 * linux-i386-ipa.c: Include tracepoint.h.
6929
8eb3d7b6
RW
69302013-09-06 Ricard Wanderlof <ricardw@axis.com>
6931
6932 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6933 (ps_get_thread_area): New function.
6934
eddddb9d
RW
69352013-09-06 Ricard Wanderlof <ricardw@axis.com>
6936
6937 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6938 (initialize_low_arch): Call init_registers_crisv32 rather than
6939 init_register_crisv32.
6940
533b0600
PA
69412013-09-05 Pedro Alves <palves@redhat.com>
6942
6943 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6944 to ...
6945 * hostio.h: ... this new file.
6946 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6947 win32-low.c: Include hostio.h.
6948
0ce3d3b5
PA
69492013-09-05 Pedro Alves <palves@redhat.com>
6950
6951 * server.h (gdb_client_data, handler_func, callback_handler_func)
6952 (delete_file_handler, add_file_handler, append_callback_event)
6953 (delete_callback_event, start_event_loop, initialize_event_loop):
6954 Move to event-loop.h and include it.
6955 * event-loop.h: New file.
6956
799cdc37
PA
69572013-09-05 Pedro Alves <palves@redhat.com>
6958
6959 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6960 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6961 (loaded_dll, unloaded_dll): Move to ...
6962 * dll.h: ... this new file.
6963 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6964
6a6bbd9d
PA
69652013-09-05 Pedro Alves <palves@redhat.com>
6966
6967 * server.h (current_process, get_thread_process, all_processes)
6968 (add_inferior_to_list, for_each_inferior, current_inferior)
6969 (remove_inferior, add_process, remove_process, find_process_pid)
6970 (have_started_inferiors_p, have_attached_inferiors_p)
6971 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6972 (clear_inferiors, find_inferior, find_inferior_id)
6973 (inferior_target_data, set_inferior_target_data)
6974 (inferior_regcache_data, set_inferior_regcache_data): Move to
6975 inferiors.h, and include it.
6976 * inferiors.h: New file.
6977
f699aaba
PA
69782013-09-05 Pedro Alves <palves@redhat.com>
6979
6980 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6981 Move ...
72f4393d 6982 * ax.h: ... here.
f699aaba 6983
c144c7a0
PA
69842013-09-05 Pedro Alves <palves@redhat.com>
6985
6986 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6987 tracepoint.h.
6988 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6989 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6990 (handle_tracepoint_general_set, handle_tracepoint_query)
6991 (tracepoint_finished_step, tracepoint_was_hit)
6992 (release_while_stepping_state_list, current_traceframe)
6993 (in_readonly_region, traceframe_read_mem)
6994 (fetch_traceframe_registers, traceframe_read_sdata)
6995 (traceframe_read_info, struct fast_tpoint_collect_status)
6996 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6997 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6998 (supply_fast_tracepoint_registers)
6999 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7000 (ipa_tdesc, claim_trampoline_space)
7001 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7002 (agent_mem_read, agent_get_trace_state_variable_value)
7003 (agent_set_trace_state_variable_value, agent_tsv_read)
7004 (agent_mem_read_string, get_raw_reg_func_addr)
7005 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7006 * tracepoint.h: ... this new file.
7007
ff42e6ab
PA
70082013-09-05 Pedro Alves <palves@redhat.com>
7009
7010 * server.h (perror_with_name, error, fatal, warning, paddress)
7011 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7012 include it.
7013 * utils.h: New file.
7014
541af0f4
PA
70152013-09-05 Pedro Alves <palves@redhat.com>
7016
7017 * server.h (remote_debug, noack_mode, transport_is_reliable)
7018 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7019 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7020 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7021 (write_enn, initialize_async_io, enable_async_io)
7022 (disable_async_io, check_remote_input_interrupt_request)
7023 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7024 (dead_thread_notify, prepare_resume_reply)
7025 (decode_address_to_semicolon, decode_address, decode_m_packet)
7026 (decode_M_packet, decode_X_packet, decode_xfer_write)
7027 (decode_search_memory_packet, unhexify, hexify)
7028 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7029 (look_up_one_symbol, relocate_instruction)
7030 (monitor_output): Move to remote-utils.h, and include it.
7031 * remote-utils.h: New file.
7032
eebdf26b
PA
70332013-09-05 Pedro Alves <palves@redhat.com>
7034
7035 * server.h (_): Delete.
7036
3aafd2ff
PA
70372013-09-02 Pedro Alves <palves@redhat.com>
7038
7039 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7040 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7041 allocated.
7042 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7043
cee83bcb
PM
70442013-09-02 Pierre Muller <muller@sourceware.org>
7045
7046 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7047 or WriteProcessMemory complete successfully and handle
7048 ERROR_PARTIAL_COPY error.
7049
9a13b2fa
PA
70502013-09-02 Pedro Alves <palves@redhat.com>
7051
7052 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7053 error instead of EIO.
7054
602e3198
JK
70552013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7056
7057 PR server/15604
7058 * linux-low.c: Include filestuff.h.
7059 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7060 * lynx-low.c: Include filestuff.h.
7061 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7062 * server.c: Include filestuff.h.
7063 (main): Call notice_open_fds.
7064 * spu-low.c: Include filestuff.h.
7065 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7066
96d7229d
LM
70672013-08-22 Luis Machado <lgustavo@codesourcery.com>
7068
7069 * Makefile.in: Explain why ../target and ../nat are not
7070 listed as include file search paths.
7071 (linux-waitpid.o): New object file rule.
7072 * configure.srv (srv_native_linux_obj): New variable.
7073 Replace all occurrences of linux native object files with
7074 $srv_native_linux_obj.
7075 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7076 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7077 (linux_enable_event_reporting): Remove declaration.
7078 (my_waitpid): Moved to common/linux-waitpid.c.
7079 (linux_wait_for_event): Pass ptid when calling
7080 linux_enable_event_reporting.
7081 (linux_supports_tracefork_flag): Remove.
7082 (linux_enable_event_reporting): Likewise.
7083 (linux_tracefork_grandchild): Remove.
7084 (STACK_SIZE): Moved to common/linux-ptrace.c.
7085 (linux_tracefork_child): Remove.
7086 (linux_test_for_tracefork): Remove.
7087 (linux_look_up_symbols): Call linux_supports_traceclone.
7088 (initialize_low): Remove call to linux_test_for_tracefork.
7089 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7090 common/linux-ptrace.h.
7091 (PTRACE_TYPE_ARG4): Likewise.
7092 Include linux-ptrace.h.
7093
32940073
PA
70942013-08-21 Pedro Alves <palves@redhat.com>
7095
7096 * config.in: Renegerate.
7097
33b60d58 70982013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7099
33b60d58
LM
7100 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7101 (SFILES): Remove $(srcdir)/common/target-common.c and
7102 add $(srcdir)/target/waitstatus.c.
7103 (OBS): Remove target-common.o and add waitstatus.o.
7104 (server_h): Remove $(srcdir)/../common/target-common.h and
7105 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7106 and $(srcdir)/../target/waitstatus.h.
7107 (target-common.o): Remove.
7108 (waitstatus.o): New target object file.
7109 * target.h: Do not include target-common.h and
7110 include target/resume.h, target/wait.h and
7111 target/waitstatus.h.
7112
b8e1b30e
LM
71132013-08-13 Luis Machado <lgustavo@codesourcery.com>
7114
7115 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7116 to PTRACE_TYPE_ARG3.
7117 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7118 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7119 PTRACE_TYPE_ARG4.
7120 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7121 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7122
7a60ad40
YQ
71232013-07-27 Jie Zhang <jie@codesourcery.com>
7124 Daniel Jacobowitz <dan@codesourcery.com>
7125 Yao Qi <yao@codesourcery.com>
7126
7127 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7128 (mips-linux-watch.o): New rule.
7129 (mips_linux_watch_h): New variable.
7130 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7131 srv_tgtobj.
7132 * linux-mips-low.c: Include mips-linux-watch.h.
7133 (struct arch_process_info, struct arch_lwp_info): New.
7134 (update_watch_registers_callback): New function.
7135 (mips_linux_new_process, mips_linux_new_thread) New functions.
7136 (mips_linux_prepare_to_resume, mips_insert_point): New
7137 functions.
7138 (mips_remove_point, mips_stopped_by_watchpoint): New
7139 functions.
7140 (rsp_bp_type_to_target_hw_bp_type): New function.
7141 (mips_stopped_data_address): New function.
7142 (the_low_target): Add watchpoint support functions.
7143
de6f69ad
YQ
71442013-07-27 Yao Qi <yao@codesourcery.com>
7145
7146 * i386-low.c: Include break-common.h.
7147 (enum target_hw_bp_type): Remove.
7148
3360c0bf
LM
71492013-07-24 Luis Machado <lgustavo@codesourcery.com>
7150
7151 * Makefile.in (SFILES): /common/target-common.c.
7152 (OBS): Add target-common.o.
7153 (server_h): Add $(srcdir)/../common/target-common.h.
7154 (target-common.o): New target.
7155 * server.c (queue_stop_reply_callback): Free
7156 status string after use.
7157 * target.c (target_waitstatus_to_string): Remove.
7158 * target.h: Include target-common.h.
7159 (resume_kind): Likewise.
7160 (target_waitkind): Likewise.
7161 (target_waitstatus): Likewise.
7162 (TARGET_WNOHANG): Likewise.
7163
bd885420
YQ
71642013-07-04 Yao Qi <yao@codesourcery.com>
7165
7166 * Makefile.in (host_alias): Use @host_noncanonical@.
7167 (target_alias): Use @target_noncanonical@.
7168 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7169 ACX_NONCANONICAL_HOST.
7170 * configure: Regenerated.
7171
7172 Revert:
7173 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7174
7175 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7176 * configure: Rebuild.
7177 * Makefile.in (version_host, version_target): Get from configure.
7178 (version.c): Use $(version_host) and $(version_target).
7179
17ef446e
PA
71802013-07-03 Pedro Alves <palves@redhat.com>
7181
7182 * Makefile.in (config.status): Depend on development.sh.
7183 * acinclude.m4: Include libmcheck.m4.
7184 * configure: Regenerate.
7185
7a9a7487
MG
71862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7187
7188 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7189 attribute inside the parentheses.
7190 (winapi_DebugSetProcessKillOnExit): Ditto.
7191 (winapi_DebugBreakProcess): Ditto.
7192 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7193
49b64de6
MG
71942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7195
7196 * notif.h (notif_event): Add a dummy member to avoid compiler
7197 errors.
7198
d5749ee7
PA
71992013-07-01 Pedro Alves <palves@redhat.com>
7200
7201 * hostio.c (HOSTIO_PATH_MAX): Define.
7202 (require_filename, handle_open, handle_unlink, handle_readlink):
7203 Use it.
7204
d8d2a3ee
PA
72052013-07-01 Pedro Alves <palves@redhat.com>
7206
7207 * server.h: Include "pathmax.h".
7208 * linux-low.c: Don't include sys/param.h.
7209 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7210 MAXPATHLEN.
7211 * win32-low.c: Don't include sys/param.h.
7212 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7213
bc7dea8d
PA
72142013-07-01 Pedro Alves <palves@redhat.com>
7215
7216 * event-loop.c: Don't check HAVE_UNISTD_H before including
7217 <unistd.h>.
7218 * gdbreplay.c: Likewise.
7219 * remote-utils.c: Likewise.
7220 * server.c: Likewise.
7221 * configure.ac: Don't check for unistd.h.
7222 * configure: Regenerate.
7223
d6c2da54
TT
72242013-06-28 Tom Tromey <tromey@redhat.com>
7225
7226 * Makefile.in (version.c): Use version.in, not
7227 common/version.in.
7228
257b6bec
MG
72292013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7230
7231 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7232 * configure: Rebuild.
7233 * Makefile.in (version_host, version_target): Get from configure.
7234 (version.c): Use $(version_host) and $(version_target).
7235
86ebe149
DK
72362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7237
7238 Fix trace-status to output user name without trailing colon.
7239 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7240
f30aa5af
DK
72412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7242
7243 Fix trace-status to output proper start-time and stop-time.
7244 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7245 output start time and stop time in hex as gdb expects.
7246
28a93511
YQ
72472013-06-26 Pedro Alves <pedro@codesourcery.com>
7248
7249 * tracepoint.c (build_traceframe_info_xml): Output trace state
7250 variables present in the trace buffer.
7251
01208463
TT
72522013-06-24 Tom Tromey <tromey@redhat.com>
7253
7254 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7255 create-version.sh.
7256 (version.o): Remove.
7257 * gdbreplay.c: Include version.h.
7258 (version, host_name): Don't declare.
7259 * server.h: Include version.h.
7260 (version, host_name): Don't declare.
7261
760256f9
PA
72622013-06-12 Pedro Alves <palves@redhat.com>
7263
7264 * linux-x86-low.c (linux_is_elf64): Delete global.
7265 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7266 with local linux_pid_exe_is_elf_64_file use.
7267
030031ee
PA
72682013-06-11 Pedro Alves <palves@redhat.com>
7269
7270 * linux-low.c (regset_disabled, disable_regset): New functions.
7271 (regsets_fetch_inferior_registers)
7272 (regsets_store_inferior_registers): Use them.
7273 (initialize_regsets_info); Don't allocate the disabled_regsets
7274 array here.
7275 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7276 comment.
7277
5da6eb0a
PA
72782013-06-11 Pedro Alves <palves@redhat.com>
7279
7280 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7281 xmalloc.
7282
7e5aaa09
PA
72832013-06-11 Pedro Alves <palves@redhat.com>
7284
7285 * linux-x86-low.c (initialize_low_arch): Call
7286 init_registers_x32_avx_linux.
7287
d878444c
JK
72882013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7289
7290 Fix compatibility with Android Bionic.
7291 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7292 it is not empty.
7293
3aee8918
PA
72942013-06-07 Pedro Alves <palves@redhat.com>
7295
5f2b57b5 7296 PR server/14823
3aee8918
PA
7297 * Makefile.in (OBS): Add tdesc.o.
7298 (IPA_OBJS): Add tdesc-ipa.o.
7299 (tdesc-ipa.o): New rule.
7300 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7301 interface.
7302 * linux-low.c (new_inferior): Delete.
7303 (disabled_regsets, num_regsets): Delete.
7304 (linux_add_process): Adjust to set the new per-process
7305 new_inferior flag.
7306 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7307 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7308 was a stop. When calling arch_setup, switch the current inferior
7309 to the thread that got an event.
7310 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7311 (regsets_fetch_inferior_registers)
7312 (regsets_store_inferior_registers): New regsets_info parameter.
7313 Adjust to use it.
7314 (linux_register_in_regsets): New regs_info parameter. Adjust to
7315 use it.
7316 (register_addr, fetch_register, store_register): New usrregs_info
7317 parameter. Adjust to use it.
7318 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7319 parameter regs_info. Adjust to use it.
7320 (linux_fetch_registers): Get the current inferior's regs_info, and
7321 adjust to use it.
7322 (linux_store_registers): Ditto.
7323 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7324 (initialize_low): Don't initialize the target_regsets here. Call
7325 initialize_low_arch.
7326 * linux-low.h (target_regsets): Delete declaration.
7327 (struct regsets_info): New.
7328 (struct usrregs_info): New.
7329 (struct regs_info): New.
7330 (struct process_info_private) <new_inferior>: New field.
7331 (struct linux_target_ops): Delete the num_regs, regmap, and
7332 regset_bitmap fields. New field regs_info.
7333 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7334 * i387-fp.c (num_xmm_registers): Delete.
7335 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7336 calls to new interface.
7337 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7338 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7339 Infer the number of xmm registers from the regcache's target
7340 description.
7341 * i387-fp.h (num_xmm_registers): Delete.
7342 * inferiors.c (add_thread): Don't install the thread's regcache
7343 here.
7344 * proc-service.c (gregset_info): Fetch the current inferior's
7345 regs_info. Adjust to use it.
7346 * regcache.c: Include tdesc.h.
7347 (register_bytes, reg_defs, num_registers)
7348 (gdbserver_expedite_regs): Delete.
7349 (get_thread_regcache): If the thread doesn't have a regcache yet,
7350 create one, instead of aborting gdbserver.
7351 (regcache_invalidate_one): Rename to ...
7352 (regcache_invalidate_thread): ... this.
7353 (regcache_invalidate_one): New.
7354 (regcache_invalidate): Only invalidate registers of the current
7355 process.
7356 (init_register_cache): Add target_desc parameter, and use it.
7357 (new_register_cache): Ditto. Assert the target description has a
7358 non zero registers_size.
7359 (regcache_cpy): Add assertions. Adjust.
7360 (realloc_register_cache, set_register_cache): Delete.
7361 (registers_to_string, registers_from_string): Adjust.
7362 (find_register_by_name, find_regno, find_register_by_number)
7363 (register_cache_size): Add target_desc parameter, and use it.
7364 (free_register_cache_thread, free_register_cache_thread_one)
7365 (regcache_release, register_cache_size): New.
7366 (register_size): Add target_desc parameter, and use it.
7367 (register_data, supply_register, supply_register_zeroed)
7368 (supply_regblock, supply_register_by_name, collect_register)
7369 (collect_register_as_string, collect_register_by_name): Adjust.
7370 * regcache.h (struct target_desc): Forward declare.
7371 (struct regcache) <tdesc>: New field.
7372 (init_register_cache, new_register_cache): Add target_desc
7373 parameter.
7374 (regcache_invalidate_thread): Declare.
7375 (regcache_invalidate_one): Delete declaration.
7376 (regcache_release): Declare.
7377 (find_register_by_number, register_cache_size, register_size)
7378 (find_regno): Add target_desc parameter.
7379 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7380 declarations.
7381 * remote-utils.c: Include tdesc.h.
7382 (outreg, prepare_resume_reply): Adjust.
7383 * server.c: Include tdesc.h.
7384 (gdbserver_xmltarget): Delete declaration.
7385 (get_features_xml, process_serial_event): Adjust.
7386 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7387 declare.
7388 (struct process_info) <tdesc>: New field.
7389 (ipa_tdesc): Declare.
7390 * tdesc.c: New file.
7391 * tdesc.h: New file.
7392 * tracepoint.c: Include tdesc.h.
7393 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7394 (get_context_regcache): Adjust to pass ipa_tdesc down.
7395 (do_action_at_tracepoint): Adjust to get the register cache size
7396 from the context regcache's description.
7397 (traceframe_walk_blocks): Adjust to get the register cache size
7398 from the current trace frame's description.
7399 (traceframe_get_pc): Adjust to get current trace frame's
7400 description and pass it down.
7401 (gdb_collect): Adjust to get the register cache size from the
7402 IPA's description.
7403 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7404 (gdbserver_xmltarget): Delete.
7405 (initialize_low_tracepoint): Set the ipa's target description.
7406 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7407 (initialize_low_tracepoint): Set the ipa's target description.
7408 * linux-x86-low.c: Include tdesc.h.
7409 [__x86_64__] (is_64bit_tdesc): New.
7410 (ps_get_thread_area, x86_get_thread_area): Use it.
7411 (i386_cannot_store_register): Rename to ...
7412 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7413 (i386_cannot_fetch_register): Rename to ...
7414 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7415 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7416 to new interface.
7417 (target_regsets): Rename to ...
7418 (x86_regsets): ... this.
7419 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7420 interface.
7421 (x86_siginfo_fixup): Use is_64bit_tdesc.
7422 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7423 (tdesc_x32_avx_linux, tdesc_x32_linux)
7424 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7425 Declare.
7426 (x86_linux_update_xmltarget): Delete.
7427 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7428 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7429 (AMD64_LINUX_USER64_CS): New.
7430 (x86_linux_read_description): New, based on
7431 x86_linux_update_xmltarget.
7432 (same_process_callback): New.
7433 (x86_arch_setup_process_callback): New.
7434 (x86_linux_update_xmltarget): New.
7435 (x86_regsets_info): New.
7436 (amd64_linux_regs_info): New.
7437 (i386_linux_usrregs_info): New.
7438 (i386_linux_regs_info): New.
7439 (x86_linux_regs_info): New.
7440 (x86_arch_setup): Reimplement.
7441 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7442 (x86_emit_ops): Ditto.
7443 (the_low_target): Adjust. Install x86_linux_regs_info,
7444 x86_cannot_fetch_register, and x86_cannot_store_register.
7445 (initialize_low_arch): New.
7446 * linux-ia64-low.c (tdesc_ia64): Declare.
7447 (ia64_fetch_register): Adjust.
7448 (ia64_usrregs_info, regs_info): New globals.
7449 (ia64_regs_info): New function.
7450 (the_low_target): Adjust.
7451 (initialize_low_arch): New function.
7452 * linux-sparc-low.c (tdesc_sparc64): Declare.
7453 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7454 Adjust.
7455 (sparc_arch_setup): New function.
7456 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7457 (the_low_target): Adjust.
7458 (initialize_low_arch): New function.
7459 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7460 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7461 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7462 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7463 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7464 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7465 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7466 (tdesc_powerpc_isa205_vsx64l): Declare.
7467 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7468 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7469 (ppc_set_pc, ppc_get_hwcap): Adjust.
7470 (ppc_usrregs_info): Forward declare.
7471 (!__powerpc64__) ppc_regmap_adjusted: New global.
7472 (ppc_arch_setup): Adjust to the current process'es target
7473 description.
7474 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7475 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7476 (ppc_store_evrregset): Adjust.
7477 (target_regsets): Rename to ...
7478 (ppc_regsets): ... this, and make static.
7479 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7480 (ppc_regs_info): New function.
7481 (the_low_target): Adjust.
7482 (initialize_low_arch): New function.
7483 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7484 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7485 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7486 (tdesc_s390x_linux64v2): Declare.
7487 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7488 (s390_fill_gregset, s390_store_last_break): Adjust.
7489 (target_regsets): Rename to ...
7490 (s390_regsets): ... this, and make static.
7491 (s390_get_pc, s390_set_pc): Adjust.
7492 (s390_get_hwcap): New target_desc parameter, and use it.
7493 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7494 (s390_arch_setup): Adjust to set the current process'es target
7495 description. Don't adjust the regmap.
7496 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7497 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7498 (regs_info_3264): New globals.
7499 (s390_regs_info): New function.
7500 (the_low_target): Adjust.
7501 (initialize_low_arch): New function.
7502 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7503 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7504 [__mips64] (init_registers_mips_linux)
7505 (init_registers_mips_dsp_linux): Delete defines.
7506 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7507 (have_dsp): New global.
7508 (mips_read_description): New, based on mips_arch_setup.
7509 (mips_arch_setup): Reimplement.
7510 (get_usrregs_info): New function.
7511 (mips_cannot_fetch_register, mips_cannot_store_register)
7512 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7513 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7514 (target_regsets): Rename to ...
7515 (mips_regsets): ... this, and make static.
7516 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7517 (dsp_regs_info, regs_info): New globals.
7518 (mips_regs_info): New function.
7519 (the_low_target): Adjust.
7520 (initialize_low_arch): New function.
7521 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7522 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7523 Declare.
7524 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7525 (arm_read_description): New, with bits factored from
7526 arm_arch_setup.
7527 (arm_arch_setup): Reimplement.
7528 (target_regsets): Rename to ...
7529 (arm_regsets): ... this, and make static.
7530 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7531 (arm_regs_info): New function.
7532 (the_low_target): Adjust.
7533 (initialize_low_arch): New function.
7534 * linux-m68k-low.c (tdesc_m68k): Declare.
7535 (target_regsets): Rename to ...
7536 (m68k_regsets): ... this, and make static.
7537 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7538 (m68k_regs_info): New function.
7539 (m68k_arch_setup): New function.
7540 (the_low_target): Adjust.
7541 (initialize_low_arch): New function.
7542 * linux-sh-low.c (tdesc_sharch): Declare.
7543 (target_regsets): Rename to ...
7544 (sh_regsets): ... this, and make static.
7545 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7546 (sh_regs_info, sh_arch_setup): New functions.
7547 (the_low_target): Adjust.
7548 (initialize_low_arch): New function.
7549 * linux-bfin-low.c (tdesc_bfin): Declare.
7550 (bfin_arch_setup): New function.
7551 (bfin_usrregs_info, regs_info): New globals.
7552 (bfin_regs_info): New function.
7553 (the_low_target): Adjust.
7554 (initialize_low_arch): New function.
7555 * linux-cris-low.c (tdesc_cris): Declare.
7556 (cris_arch_setup): New function.
7557 (cris_usrregs_info, regs_info): New globals.
7558 (cris_regs_info): New function.
7559 (the_low_target): Adjust.
7560 (initialize_low_arch): New function.
7561 * linux-cris-low.c (tdesc_crisv32): Declare.
7562 (cris_arch_setup): New function.
7563 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7564 (cris_regs_info): New function.
7565 (the_low_target): Adjust.
7566 (initialize_low_arch): New function.
7567 * linux-m32r-low.c (tdesc_m32r): Declare.
7568 (m32r_arch_setup): New function.
7569 (m32r_usrregs_info, regs_info): New globals.
7570 (m32r_regs_info): Adjust.
7571 (initialize_low_arch): New function.
7572 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7573 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7574 (tic6x_usrregs_info): Forward declare.
7575 (tic6x_read_description): New function, based on ...
7576 (tic6x_arch_setup): ... this. Reimplement.
7577 (target_regsets): Rename to ...
7578 (tic6x_regsets): ... this, and make static.
7579 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7580 (tic6x_regs_info): New function.
7581 (the_low_target): Adjust.
7582 (initialize_low_arch): New function.
7583 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7584 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7585 (target_regsets): Rename to ...
7586 (xtensa_regsets): ... this, and make static.
7587 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7588 globals.
7589 (xtensa_arch_setup, xtensa_regs_info): New functions.
7590 (the_low_target): Adjust.
7591 (initialize_low_arch): New function.
7592 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7593 (nios2_arch_setup): Set the current process'es tdesc.
7594 (target_regsets): Rename to ...
7595 (nios2_regsets): ... this.
7596 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7597 (nios2_regs_info): New function.
7598 (the_low_target): Adjust.
7599 (initialize_low_arch): New function.
a261b8f5
PA
7600 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7601 (aarch64_arch_setup): Set the current process'es tdesc.
7602 (target_regsets): Rename to ...
7603 (aarch64_regsets): ... this.
7604 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7605 (aarch64_regs_info): New function.
7606 (the_low_target): Adjust.
7607 (initialize_low_arch): New function.
3aee8918
PA
7608 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7609 globals.
7610 (target_regsets): Rename to ...
7611 (tile_regsets): ... this.
7612 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7613 (tile_regs_info): New function.
7614 (tile_arch_setup): Set the current process'es tdesc.
7615 (the_low_target): Adjust.
7616 (initialize_low_arch): New function.
7617 * spu-low.c (tdesc_spu): Declare.
7618 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7619 * win32-arm-low.c (tdesc_arm): Declare.
7620 (arm_arch_setup): New function.
7621 (the_low_target): Install arm_arch_setup instead of
7622 init_registers_arm.
7623 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7624 (init_windows_x86): Rename to ...
7625 (i386_arch_setup): ... this. Set `win32_tdesc'.
7626 (the_low_target): Adjust.
7627 * win32-low.c (win32_tdesc): New global.
7628 (child_add_thread): Don't create the thread cache here.
7629 (do_initial_child_stuff): Set the new process'es tdesc.
7630 * win32-low.h (struct target_desc): Forward declare.
7631 (win32_tdesc): Declare.
7632 * lynx-i386-low.c (tdesc_i386): Declare global.
7633 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7634 * lynx-low.c (lynx_tdesc): New global.
7635 (lynx_add_process): Set the new process'es tdesc.
7636 * lynx-low.h (struct target_desc): Forward declare.
7637 (lynx_tdesc): Declare global.
7638 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7639 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7640 * nto-low.c (nto_tdesc): New global.
7641 (do_attach): Set the new process'es tdesc.
7642 * nto-low.h (struct target_desc): Forward declare.
7643 (nto_tdesc): Declare.
7644 * nto-x86-low.c (tdesc_i386): Declare.
7645 (nto_x86_arch_setup): Set `nto_tdesc'.
7646
b1fbec62
GB
76472013-06-04 Gary Benson <gbenson@redhat.com>
7648
7649 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7650 to qSupported response when appropriate.
7651 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7652 with nonzero-length annex.
7653 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7654 arguments supplied in annex.
7655
d1ec4ce7
DE
76562013-05-31 Doug Evans <dje@google.com>
7657
ac44adcb 7658 PR server/15594
d1ec4ce7
DE
7659 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7660 64 bits in 64-cross-32 environment.
7661
9b25f2d3
PA
76622013-05-28 Pedro Alves <palves@redhat.com>
7663
7664 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7665 (aarch64-without-fpu.c): Delete rule.
7666 * configure.srv (aarch64*-*-linux*): Remove references to
7667 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7668 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7669 declaration.
7670
6740dc9c
PA
76712013-05-24 Pedro Alves <palves@redhat.com>
7672
7673 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7674 instead of strchr/decode_address. Error if the range isn't split
7675 with a ','. Don't assume there's be a ':' in the action.
7676
c2d6af84
PA
76772013-05-23 Yao Qi <yao@codesourcery.com>
7678 Pedro Alves <palves@redhat.com>
7679
7680 * linux-low.c (lwp_in_step_range): New function.
7681 (linux_wait_1): If the thread was range stepping and stopped
7682 outside the stepping range, report the stop to GDB. Otherwise,
7683 continue stepping. Add range stepping debug output.
7684 (linux_set_resume_request): Copy the step range from the resume
7685 request to the lwp.
7686 (linux_supports_range_stepping): New.
7687 (linux_target_ops) <supports_range_stepping>: Set to
7688 linux_supports_range_stepping.
7689 * linux-low.h (struct linux_target_ops)
7690 <supports_range_stepping>: New field.
7691 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7692 * linux-x86-low.c (x86_supports_range_stepping): New.
7693 (the_low_target) <supports_range_stepping>: Set to
7694 x86_supports_range_stepping.
7695 * server.c (handle_v_cont): Handle 'r' action.
7696 (handle_v_requests): Append ";r" if the target supports range
7697 stepping.
7698 * target.h (struct thread_resume) <step_range_start,
7699 step_range_end>: New fields.
7700 (struct target_ops) <supports_range_stepping>:
7701 New field.
7702 (target_supports_range_stepping): New macro.
7703
58794e1a
JB
77042013-05-17 Joel Brobecker <brobecker@adacore.com>
7705
7706 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7707 confusion in comment.
7708
d631c5a7
JB
77092013-05-17 Joel Brobecker <brobecker@adacore.com>
7710
7711 * lynx-low.c (struct process_info_private): New type.
7712 (lynx_add_process): New function.
7713 (lynx_create_inferior, lynx_attach): Replace calls to
7714 add_process by calls to lynx_add_process.
7715 (lynx_resume): If PTID is null, then try using
7716 current_process()->private->last_wait_event_ptid.
7717 Add comments.
7718 (lynx_clear_inferiors): Delete. The contents of that function
7719 has been inlined in lynx_mourn;
7720 (lynx_wait_1): Save the ptid in the process's private data.
7721 (lynx_mourn): Free the process' private data. Replace call
7722 to lynx_clear_inferiors by call to clear_inferiors.
7723
96f7a20f
YQ
77242013-05-17 Yao Qi <yao@codesourcery.com>
7725
7726 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7727 the right place.
7728
db0dfaa0
LM
77292013-05-16 Luis Machado <lgustavo@codesourcery.com>
7730
7731 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7732 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7733 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7734 PT_TEXT_END_ADDR guards. Update comments.
7735 (linux_target_op) <read_offsets>: Conditionally define to
7736 linux_read_offsets if the target is UCLIBC and if it defines
7737 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7738
68f5f838
SL
77392013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7740 Andrew Jenner <andrew@codesourcery.com>
7741
7742 * Makefile.in (SFILES): Add linux-nios2-low.c.
7743 (clean): Add action to delete nios2-linux.c.
7744 (nios2-linux.c): New rule.
7745 * configure.srv: Add nios2*-*-linux*.
7746 * linux-nios2-low.c: New.
7747
1ebff1fd
HAQ
77482013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7749
7750 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7751
f6150862
HZ
77522013-04-25 Hui Zhu <hui@codesourcery.com>
7753
7754 PR gdb/15186
f6150862
HZ
7755 * ax.c (ax_printf): Add fflush.
7756
614c279d
TT
77572013-04-22 Tom Tromey <tromey@redhat.com>
7758
7759 * Makefile.in (SFILES): Add filestuff.c.
7760 (OBS): Add filestuff.o.
7761 (filestuff.o): New target.
7762 * config.in, configure: Rebuild.
7763 * configure.ac: Check for fdwalk, pipe2.
7764
7d4e5717
PA
77652013-04-17 Pedro Alves <palves@redhat.com>
7766
7767 * configure.ac (USE_THREAD_DB): Delete variable.
7768 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7769 Don't AC_SUBST USE_THREAD_DB.
7770 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7771 * config.in, configure: Regenerate.
7772
d5c93e41
PA
77732013-04-16 Pedro Alves <palves@redhat.com>
7774
7775 * linux-low.h (struct lwp_info) <thread_known>: Move under
7776 the USE_THREAD_DB #ifdef.
7777
04f5fe89
PA
77782013-04-16 Pedro Alves <palves@redhat.com>
7779
7780 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7781 (linux-low.o): Delete rule.
7782 * linux-low.h: Always include "gdb_thread_db.h" instead of
7783 conditionally including thread_db.h.
7784 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7785 HAVE_THREAD_DB_H.
7786
480b27bf
JK
77872013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7788
7789 * Makefile.in (install-only): Fix make install regression.
7790
43662968
JK
77912013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7792
7793 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7794 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7795 installation.
7796 * gdbserver.1: Remove.
7797
3e74e146
PA
77982013-03-22 Pedro Alves <palves@redhat.com>
7799
7800 * linux-low.c (handle_extended_wait): Don't call
7801 linux_enable_event_reporting.
7802
a8347a2a
TT
78032013-03-15 Tony Theodore <tonyt@logyst.com>
7804
7805 PR build/9098:
7806 * Makefile.in (SHELL): Use @SHELL@.
7807
eeb56fa7
SDJ
78082013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7809
7810 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7811 compiler warning.
7812
4fa7e2ff
JB
78132013-03-13 Joel Brobecker <brobecker@adacore.com>
7814
7815 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7816 Remove extraneous NULL element.
7817
8ddb1965
YQ
78182013-03-13 Yao Qi <yao@codesourcery.com>
7819
7820 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7821 'V' block in trace frame.
7822
9accd112
MM
78232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7824
7825 * target.h (struct target_ops): Add btrace ops.
7826 (target_supports_btrace): New macro.
7827 (target_enable_btrace): New macro.
7828 (target_disable_btrace): New macro.
7829 (target_read_btrace): New macro.
7830 * gdbthread.h (struct thread_info): Add btrace field.
7831 * server.c: Include btrace-common.h.
7832 (handle_btrace_general_set): New function.
7833 (handle_btrace_enable): New function.
7834 (handle_btrace_disable): New function.
7835 (handle_general_set): Call handle_btrace_general_set.
7836 (handle_qxfer_btrace): New function.
7837 (struct qxfer qxfer_packets[]): Add btrace entry.
7838 * inferiors.c (remove_thread): Disable btrace.
7839 * linux-low: Include linux-btrace.h.
7840 (linux_low_enable_btrace): New function.
7841 (linux_low_read_btrace): New function.
7842 (linux_target_ops): Add btrace ops.
7843 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7844 Add srv_linux_btrace=yes.
7845 (x86_64-*-linux*): Add linux-btrace.o.
7846 Add srv_linux_btrace=yes.
7847 * configure.ac: Define HAVE_LINUX_BTRACE.
7848 * config.in: Regenerated.
7849 * configure: Regenerated.
7850
5cc22e4c
MM
78512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7852
7853 * server.c (handle_qxfer): Preserve error message if -3 is
7854 returned.
7855 (qxfer): Document the -3 return value.
7856
7c97f91e
MM
78572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7858
7859 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7860 (linux_btrace_h): New variable.
7861 (linux-btrace.o): New rule.
7862
be9a119c 78632013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7864 Hafiz Abid Qadeer <abidh@codesourcery.com>
7865
7866 * tracepoint.c (trace_buffer_size): New global.
7867 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7868 (init_trace_buffer): Change to one-argument function. Allocate
7869 trace buffer memory.
7870 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7871 handle QTBuffer:size packet.
7872 (cmd_bigqtbuffer_size): New function.
7873 (initialize_tracepoint): Call init_trace_buffer with
7874 DEFAULT_TRACE_BUFFER_SIZE.
7875 * server.c (handle_query): Add QTBuffer:size in the
7876 supported packets.
7877
e64f7499
YQ
78782013-03-07 Yao Qi <yao@codesourcery.com>
7879
7880 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7881 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7882 of -1.
7883 (cmd_qtsp): Adjust condition. Do post increment.
7884 Set cur_action and cur_step_action back to 0.
7885
f0ae6fc3
PA
78862013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7887
7888 PR server/15236
7889 * linux-low.c (linux_write_memory): Return early success if LEN is
7890 zero.
7891
b5b0b0af
CV
78922013-03-05 Corinna Vinschen <vinschen@redhat.de>
7893
334ad4a8 7894 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7895
589bc927
TT
78962013-02-28 Tom Tromey <tromey@redhat.com>
7897
7898 * configure.ac: Invoke AC_SYS_LARGEFILE.
7899 * configure, config.in: Rebuild.
7900
dfe07582
CV
79012013-02-28 Corinna Vinschen <vinschen@redhat.com>
7902
7903 * win32-low.c: Throughout, fix format strings and casts of
7904 printf-like functions to avoid type related warnings on all
7905 platforms.
7906 (get_child_debug_event): Print dwDebugEventCode as hex since
7907 that's how it's usually documented.
7908
736cd585
YQ
79092013-02-28 Yao Qi <yao@codesourcery.com>
7910
7911 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7912 pulongest.
7913
e1f58301
JW
79142013-02-27 Jiong Wang <jiwang@tilera.com>
7915
7916 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7917 (reg-tilegx32.c): New rule.
7918 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7919 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7920 different register info initializer according to elf class.
7921 (init_registers_tilgx32): New function. The tilegx32 register info
7922 initializer.
7923 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7924 (tile_store_gregset): Likewise.
7925
d171ca78
YQ
79262013-02-27 Yao Qi <yao@codesourcery.com>
7927
7928 * server.c (process_point_options): Print debug message when
7929 debug_threads is true.
7930
282bbdf3
YQ
79312013-02-26 Yao Qi <yao@codesourcery.com>
7932
7933 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7934
aca22551
PA
79352013-02-19 Pedro Alves <palves@redhat.com>
7936 Kai Tietz <ktietz@redhat.com>
7937
7938 PR gdb/15161
7939
7940 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7941 instead of strtoul to extract address from packet.
7942 (process_serial_event) <'z'>: Likewise.
7943
4f3cee1c
YQ
79442013-02-18 Yao Qi <yao@codesourcery.com>
7945
7946 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7947
8e1d55a3
PA
79482013-02-14 Pedro Alves <palves@redhat.com>
7949
7950 Plug memory leak.
7951
7952 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7953 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7954
458820da
PA
79552013-02-14 Pedro Alves <palves@redhat.com>
7956
7957 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7958
baea0dae
PA
79592013-02-14 Pedro Alves <palves@redhat.com>
7960
7961 * tracepoint.c (save_string): Delete.
7962 (add_tracepoint_action): Use savestring instead of save_string.
7963
0b1afbb3
PA
79642013-02-12 Pedro Alves <palves@redhat.com>
7965
7966 * linux-xtensa-low.c: Ditto.
7967 * xtensa-xtregs.c: Ditto.
7968
8a4ac37e
PA
79692013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7970
7971 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7972 thread_db.
7973
148de6bb
MS
79742013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7975
7976 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7977 aarch64_num_wp_regs and aarch64_num_bp_regs to
7978 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7979
55fac6e0
MS
79802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7981
7982 * linux-aarch64-low.c (ps_get_thread_area): Replace
7983 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7984
176eb98c
MS
79852013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7986 Marcus Shawcroft <marcus.shawcroft@arm.com>
7987 Nigel Stephens <nigel.stephens@arm.com>
7988 Yufeng Zhang <yufeng.zhang@arm.com>
7989
7990 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7991 (aarch64.c, aarch64-without-fpu.c): New targets.
7992 * configure.srv (aarch64*-*-linux*): New.
7993 * linux-aarch64-low.c: New file.
7994
56f7af9c
MS
79952013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7996
43aaf8b6 7997 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7998 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7999 (dequeue_one_deferred_signal, linux_resume_one_thread)
8000 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8001 (linux_tracefork_grandchild, linux_test_for_tracefork)
8002 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8003 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8004 where the argument is 0.
8005
60f662b0
YQ
80062013-01-25 Yao Qi <yao@codesourcery.com>
8007
8008 * event-loop.c: Include "queue.h".
8009 (gdb_event_p): New typedef.
8010 (struct gdb_event) <next_event>: Remove.
8011 (event_queue): Change to QUEUE(gdb_event_p).
8012 (async_queue_event): Remove.
8013 (gdb_event_xfree): New.
8014 (initialize_event_loop): New.
8015 (process_event): Use API from QUEUE.
8016 (wait_for_event): Likewise.
8017 * server.c (main): Call initialize_event_loop.
8018 * server.h (initialize_event_loop): Declare.
8019
5ae4861a
YQ
80202013-01-18 Yao Qi <yao@codesourcery.com>
8021
8022 * ax.h (struct eval_agent_expr_context): New.
8023 (gdb_eval_agent_expr): Update declaration.
8024 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8025 TFRAME. Add new argument CTX.
8026 * server.h (struct eval_agent_expr_context): Declare.
8027 (agent_mem_read, agent_tsv_read): Update declaration.
8028 (agent_mem_read_string): Likewise.
8029 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8030 (add_traceframe_block): Add new argument TPOINT.
8031 Increase TPOINT->traceframe_usage.
8032 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8033 eval_tracepoint_agent_expr.
8034 (condition_true_at_tracepoint): Likewise.
8035 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8036 (agent_mem_read_string, agent_tsv_read): Likewise.
8037
85e00e85
YQ
80382013-01-16 Yao Qi <yao@codesourcery.com>
8039
8040 * linux-low.c (linux_resume_one_lwp): Don't check
8041 'lwp->bp_reinsert != 0'.
8042
4039cf45
JB
80432013-01-07 Joel Brobecker <brobecker@adacore.com>
8044 Pedro Alves <palves@redhat.com>
8045
8046 * lynx-low.c (ptrace_request_to_str): Define a temporary
8047 macro and use it to simplify this function's implementation.
8048
9044dee2
JB
80492013-01-07 Joel Brobecker <brobecker@adacore.com>
8050
8051 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8052 sets errno.
8053
e6352c8f
JB
80542013-01-07 Joel Brobecker <brobecker@adacore.com>
8055
8056 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8057
50681a27
JB
80582013-01-07 Joel Brobecker <brobecker@adacore.com>
8059
8060 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8061
3f6e77ef
JB
80622013-01-07 Joel Brobecker <brobecker@adacore.com>
8063
8064 * lynx-low.c (lynx_resume): Use the resume_info parameter
8065 to determine the ptid for the lynx_ptrace call, unless
8066 it is equal to minus_one_ptid, in which case we use the
8067 ptid of the current_inferior.
8068 (lynx_wait_1): After having received a thread create/exit
8069 event, resume the inferior's execution using the signaling
8070 thread's ptid, rather than the old ptid.
8071
7fda33ae
JB
80722013-01-07 Joel Brobecker <brobecker@adacore.com>
8073
8074 * lynx-low.c (lynx_resume): Delete variable ret.
8075
b9786c74
JB
80762013-01-01 Joel Brobecker <brobecker@adacore.com>
8077
8078 * gdbreplay.c (gdbreplay_version): Update copyright year.
8079 * server.c (gdbserver_version): Likewise.
8080
8b93d60f
JB
80812012-12-17 Joel Brobecker <brobecker@adacore.com>
8082
8083 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8084 new thread.
8085
037335a7
JB
80862012-12-17 Joel Brobecker <brobecker@adacore.com>
8087
8088 * lynx-low.c (ptrace_request_to_str): Add handling for
8089 PTRACE_GETTRACESIG.
8090
52d4cbd8
JB
80912012-12-17 Joel Brobecker <brobecker@adacore.com>
8092
8093 * lynx-low.c (lynx_attach): Delete variable new_process.
8094
ab8f6ca9
JB
80952012-12-17 Joel Brobecker <brobecker@adacore.com>
8096
8097 * lynx-low.c (lynx_create_inferior): Delete variable
8098 new_process.
8099
78cbc024
JB
81002012-12-17 Joel Brobecker <brobecker@adacore.com>
8101
8102 * lynx-low.c (ptrace_request_to_str): Do not handle
8103 PTRACE_GETTHREADLIST if this macro does not exist.
8104
14a00470
YQ
81052012-12-15 Yao Qi <yao@codesourcery.com>
8106
8107 * Makefile.in (OBS): Add notif.o.
8108 * notif.c, notif.h: New.
8109 * server.c: Include "notif.h".
8110 (struct vstop_notif) <next>: Remove.
8111 <base>: New field.
8112 (queue_stop_reply): Update.
8113 (push_event, send_next_stop_reply): Remove.
8114 (discard_queued_stop_replies): Update.
8115 (notif_stop): New variable.
8116 (handle_v_stopped): Remove.
8117 (handle_v_requests): Don't call handle_v_stopped. Call
8118 handle_ack_notif instead.
8119 (queue_stop_reply_callback): Call notif_event_enque instead
8120 of queue_stop_reply.
8121 (handle_status): Don't call send_next_stop_reply, call
8122 notif_write_event instead.
8123 (kill_inferior_callback): Likewise.
8124 (detach_or_kill_inferior_callback): Likewise.
8125 (main): Call initialize_notif.
8126 (process_serial_event): Call QUEUE_is_empty.
8127 (handle_target_event): Call notif_push instead of push event.
8128 * server.h (push_event): Remove declaration.
8129
61c125b9
TT
81302012-12-10 Tom Tromey <tromey@redhat.com>
8131
8132 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8133 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8134 macros.
8135 (.c.o): Rewrite.
8136 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8137 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8138 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8139 (amd64-linux-ipa.o, ax.o): Rewrite.
8140 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8141 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8142 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8143 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8144 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8145 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8146 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8147 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8148 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8149 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8150 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8151 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8152 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8153 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8154 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8155 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8156 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8157 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8158 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8159 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8160 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8161 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8162 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8163 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8164 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8165 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8166 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8167 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8168 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8169 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8170 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8171 (reg-tilegx.o): Remove.
8172 (all_object_files): New macro.
8173 Include .deps files.
8174 * aclocal.m4, configure: Rebuild.
8175 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8176 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8177 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8178
e90e9ad9
TT
81792012-12-05 Tom Tromey <tromey@redhat.com>
8180
8181 PR gdb/14917:
8182 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8183
02d403bf 81842012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8185
8186 * configure.ac: Check for linux/perf_event.h.
8187 * config.in: Regenerated.
8188 * configure: Regenerated.
8189
0270a750
PA
81902012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8191
8192 * hostio.c (handle_readlink): Decrease buffer size
8193 parameter passed to readlink by one byte.
8194
8c29b58e
YQ
81952012-11-26 Yao Qi <yao@codesourcery.com>
8196
8197 * configure.ac (build_warnings): Append '-Wempty-body'.
8198 * configure: Regenerated.
8199 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8200 body.
8201
8bdce1ff
PM
82022012-11-15 Pierre Muller <muller@sourceware.org>
8203
8204 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8205 * config.in: Regenerate.
8206 * configure: Regenerate.
8207 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8208 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8209 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8210 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8211 header.
8212 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8213 instead of <sys/wait.h> header.
8214 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8215
02d403bf 82162012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8217
8218 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8219 (various make rules): Remove -DGDBSERVER
8220
fbd5db48
YQ
82212012-11-09 Yao Qi <yao@codesourcery.com>
8222
8223 * spu-low.c (current_ptid): Move it to ..
8224 * gdbthread.h: ... here. New.
8225 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8226 * server.c (myresume, process_serial_event): Likewise.
8227 * thread-db.c (thread_db_find_new_threads): Likewise.
8228 * tracepoint.c (run_inferior_command): Likewise.
8229
b3dc46ff
AB
82302012-10-01 Andrew Burgess <aburgess@broadcom.com>
8231
8232 * server.c (handle_search_memory_1): Include access length in
8233 warning message.
8234
07c04788
HPN
82352012-09-05 Michael Brandt <michael.brandt@axis.com>
8236
8237 * linux-crisv32-low.c: Fix compile errors.
8238
918d227b
YQ
82392012-09-04 Yao Qi <yao@codesourcery.com>
8240
8241 * tracepoint.c (cmd_qtsv): Adjust debug message.
8242 Don't check CUR_TPOINT.
8243
18c1b81a
YQ
82442012-08-28 Yao Qi <yao@codesourcery.com>
8245
8246 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8247 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8248 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8249 Remove declarations of xmalloc, xreallloc, xstrdup and
8250 freeargv.
8251 * Makefile.in (libiberty_h): New.
8252 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8253 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8254
dc82f37b
YQ
82552012-08-23 Yao Qi <yao@codesourcery.com>
8256
8257 * server.h: Remove declaration of 'xsnprintf'.
8258
406b1477
KS
82592012-08-22 Keith Seitz <keiths@redhat.com>
8260
8261 * server.h: Include build-gnulib-gbserver/config.h.
8262 * gdbreplay.c: Likewise.
8263
e6712ff1
DE
82642012-08-08 Doug Evans <dje@google.com>
8265
8266 * Makefile.in (SFILES): Add gdb_vecs.c.
8267 (OBS): Add gdb_vecs.o.
8268 (gdb_vecs_h, host_defs_h): New variables.
8269 (thread-db.o): Add $(gdb_vecs_h) dependency.
8270 (gdb_vecs.o): New rule.
8271 * thread-db.c: #include "gdb_vecs.h".
8272 (thread_db_load_search): Use a vector to iterate over path elements.
8273 Handle text appearing after "$pdir".
8274
8275 * configure.ac: Add check for strstr.
8276 * config.in: Regenerate.
8277 * configure: Regenerate.
8278
7c3270ae
UW
82792012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8280
8281 * hostio.c (handle_pread): If pread fails, fall back to attempting
8282 lseek/read.
8283 (handle_pwrite): Likewise for pwrite.
8284
b62e2b27
UW
82852012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8286
8287 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8288 between unsupported TYPE and unimplementable ADDR/LEN combination.
8289 (arm_insert_point): Act on new return value.
8290
78a99e91
PA
82912012-07-31 Pedro Alves <palves@redhat.com>
8292
8293 * server.c (process_point_options): Only skip tokens if we find
8294 one that is unrecognized. Don't treat 'X' specially while
8295 skipping unrecognized tokens.
8296
fcf303ab
UW
82972012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8298
8299 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8300 to 4-byte-align HW breakpoint addresses for Thumb.
8301
7255706c
YQ
83022012-07-27 Yao Qi <yao@codesourcery.com>
8303
8304 PR remote/14161.
8305
8306 * server.h: Declare gdb_agent_about_to_close.
8307 * target.c (kill_inferior): Include "agent.h".
8308 New. Send command 'kill'.
8309 * target.h (kill_inferior): Removed macro.
8310 * tracepoint.c (gdb_agent_about_to_close): New.
8311 (gdb_agent_helper_thread): Handle command 'close'.
8312 Wait endlessly until the inferior stops.
8313 Install gdb_agent_remove_socket to atexit hook.
8314 (agent_socket_name): New static variable.
8315 (gdb_agent_socket_init): Replace local variable 'name' with
8316 'agent_socket_name'.
8317 (gdb_agent_remove_socket): New.
8318
5a3f286f
YQ
83192012-07-27 Yao Qi <yao@codesourcery.com>
8320
8321 * server.c (process_point_options): Stop at 'X' when parsing.
8322
961bd387
ME
83232012-07-19 Michael Eager <eager@eagercon.com>
8324
a261b8f5 8325 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8326 to hw_execute.
8327 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8328 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8329 hardware breakpoint.
8330
aa7c7447
JK
83312012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8332
8333 * gdbserver/linux-low.c (initialize_low): Call
8334 linux_ptrace_init_warnings.
8335
7f216e7c
DE
83362012-07-02 Doug Evans <dje@google.com>
8337
8338 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8339 pointer to int.
8340
d3ce09f5
SS
83412012-07-02 Stan Shebs <stan@codesourcery.com>
8342
8343 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8344 (ax.o): Add it to build rule.
8345 (ax-ipa.o): Ditto.
8346 (OBS): Add format.o.
8347 (IPA_OBS): Add format.o.
8348 * server.c (handle_query): Claim support for breakpoint commands.
8349 (process_point_options): Add command case.
8350 (process_serial_event): Leave running if there are printfs in
8351 effect.
8352 * mem-break.h (any_persistent_commands): Declare.
8353 (add_breakpoint_commands): Declare.
8354 (gdb_no_commands_at_breakpoint): Declare.
8355 (run_breakpoint_commands): Declare.
8356 * mem-break.c (struct point_command_list): New struct.
8357 (struct breakpoint): New field command_list.
8358 (any_persistent_commands): New function.
8359 (add_commands_to_breakpoint): New function.
8360 (add_breakpoint_commands): New function.
8361 (gdb_no_commands_at_breakpoint): New function.
8362 (run_breakpoint_commands): New function.
8363 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8364 locally.
8365 * ax.c: Include format.h.
8366 (ax_printf): New function.
8367 (gdb_eval_agent_expr): Add printf opcode.
8368
2f8f6aed
YQ
83692012-06-13 Yao Qi <yao@codesourcery.com>
8370
8371 * server.c (start_inferior): Remove duplicated writes to fields
8372 'last_resume_kind' and 'last_status' of 'current_inferior'.
8373
0c9070b3
YQ
83742012-06-12 Yao Qi <yao@codesourcery.com>
8375 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8378 comment.
8379 * server.c (handle_v_cont): Extend comment.
8380
c52daf70
YQ
83812012-06-11 Yao Qi <yao@codesourcery.com>
8382
8383 * linux-low.c (linux_attach): Add 'static'.
8384
d38bbb0a
YQ
83852012-06-06 Yao Qi <yao@codesourcery.com>
8386
8387 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8388
89dc0afd
JK
83892012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8390
8391 Fix gcc -flto compilation warning.
8392 * server.c (main): Make variable multi_mode and attach volatile.
8393
75f62ce7
TJB
83942012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8395
8396 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8397 if the platform doesn't know about it.
8398
65f479b6
PA
83992012-05-30 Jeff Kenton <jkenton@tilera.com>
8400
8401 * Makefile.in (SFILES): Add linux-tile-low.c.
8402 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8403 * configure.srv: Handle tilegx-*-linux*.
8404 * linux-tile-low.c: New file.
8405
0c5bf5a9
JK
84062012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8407
8408 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8409
a493e3e2
PA
84102012-05-24 Pedro Alves <palves@redhat.com>
8411
8412 PR gdb/7205
8413
43aaf8b6 8414 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8415
2ea28649
PA
84162012-05-24 Pedro Alves <palves@redhat.com>
8417
8418 PR gdb/7205
8419
8420 Replace target_signal with gdb_signal throughout.
8421
8d409d16
MR
84222012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8423
8424 * linux-low.c (linux_store_registers): Avoid the copying sequence
8425 when no data has been retrieved by ptrace.
8426
23512c01
MGD
84272012-05-22 Will Deacon <will.deacon@arm.com>
8428
8429 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8430 Include asm/ptrace.h.
8431 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8432 already defined.
8433
4934b29e
MR
84342012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8435
8436 * linux-low.c (linux_store_registers): Don't re-retrieve data
8437 with ptrace that has already been obtained from /proc. Always
8438 copy any data retrieved with ptrace to the buffer supplied.
8439
bde24c0a
PA
84402012-05-11 Yao Qi <yao@codesourcery.com>
8441 Pedro Alves <palves@redhat.com>
8442
8443 * linux-low.c (enum stopping_threads_kind): New.
8444 (stopping_threads): Change type to `enum stopping_threads_kind'.
8445 (handle_extended_wait): If stopping and suspending threads, leave
8446 the new_lwp suspended too.
8447 (linux_wait_for_event): Adjust.
8448 (stop_all_lwps): Set `stopping_threads' to
8449 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8450 whether we're suspending threads or just stopping them. Assert no
8451 recursion happens.
8452
623b6bdf
YQ
84532012-04-29 Yao Qi <yao@codesourcery.com>
8454
8455 * server.h: Move some code to ...
8456 * gdbthread.h: ... here. New.
8457 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8458 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8459 (nto-low.o, win32-low.o): Likewise.
8460 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8461 * regcache.c, remote-utils.c, server.c: Likewise.
8462 * target.c, tracepoint.c, win32-low.c: Likewise.
8463
f15f9948
TJB
84642012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8465
8466 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8467 (PTRACE_ARG4_TYPE): Likewise.
8468 (PTRACE_XFER_TYPE): Likewise.
8469 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8470 ptrace to PTRACE_ARG3_TYPE.
8471 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8472 (PTRACE_ARG4_TYPE): Likewise.
8473 (PTRACE_XFER_TYPE): Likewise.
8474 (linux_detach_one_lwp): Cast fourth argument of
8475 ptrace to long then PTRACE_ARG4_TYPE.
8476 (regsets_fetch_inferior_registers): Cast third argument of
8477 ptrace to long then PTRACE_ARG3_TYPE.
8478 (regsets_store_inferior_registers): Likewise.
8479
38ea300a
PA
84802012-04-20 Pedro Alves <palves@redhat.com>
8481
8482 * configure: Regenerate.
8483
c971b7fa
PA
84842012-04-19 Pedro Alves <palves@redhat.com>
8485
43aaf8b6 8486 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8487 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8488 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8489 (all, install-only, uninstall, clean-info, all-lib, clean): No
8490 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8491 (maintainer-clean realclean distclean): Use subdir_do.
8492 (subdir_do): New.
8493 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8494 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8495 * acinclude.m4: Include acx_configure_dir.m4.
8496 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8497 calls. Call AC_PROG_RANLIB. Configure gnulib using
8498 ACX_CONFIGURE_DIR.
8499 (GNULIB): New.
8500 (GNULIB_STDINT_H): Adjust.
8501 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8502 * gdbreplay.c: Include build-gnulib/config.h.
8503 * server.h: Likewise.
8504 * aclocal.m4: Regenerate.
8505 * config.in: Regenerate.
8506 * configure: Regenerate.
c971b7fa 8507
809277f8
PA
85082012-04-19 Pedro Alves <palves@redhat.com>
8509
8510 * Makefile.in (LIBGNU, INCGNU): Adjust.
8511 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8512 (all, install-only, uninstall, clean-info, all-lib, clean)
8513 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8514 * configure.ac: Adjust AC_OUTPUT output.
8515 * aclocal.m4: Regenerate.
8516 * configure: Regenerate.
8517
fd9bb8b8
PA
85182012-04-19 Pedro Alves <palves@redhat.com>
8519
8520 * Makefile.in (generated_files): New.
8521 (server_h): Remove the explicit dependency on config.h, and depend
8522 on $generated_files.
8523
1c298c66
PA
85242012-04-19 Pedro Alves <palves@redhat.com>
8525
8526 * Makefile.in (INCGNU): Add -Ignulib.
8527
57c4b50b
PA
85282012-04-19 Pedro Alves <palves@redhat.com>
8529
8530 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8531 (INCGNU): ... this, and spell out -I here.
8532 (GNULIB_LIB): Rename to ...
8533 (LIBGNU): ... this.
8534 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8535
1030e047
PA
85362012-04-19 Pedro Alves <palves@redhat.com>
8537
8538 * config.in: Regenerate.
8539
447d4319
PA
85402012-04-19 Pedro Alves <palves@redhat.com>
8541
8542 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8543 * server.h (memmem): Remove declaration.
8544 * config.in: Regenerate.
8545 * configure: Regenerate.
8546
aad9eab9
YQ
85472012-04-19 Yao Qi <yao@codesourcery.com>
8548
8549 * Makefile.in (SFILES): Add common/vec.c.
8550 (OBS): Add vec.o.
8551 (vec.o): New rule.
8552
3e10640f
YQ
85532012-04-19 Yao Qi <yao@codesourcery.com>
8554
8555 * remote-utils.c (prepare_resume_reply): Replace with macro
8556 target_core_of_thread.
8557 * server.c (handle_qxfer_threads_proper): Likewise.
8558 * target.h (traget_core_of_thread): New macro.
8559
71622373
PA
85602012-04-18 Pedro Alves <palves@redhat.com>
8561
8562 * aclocal.m4: Regenerate.
8563 * configure: Regenerate.
8564
80d26939
YQ
85652012-04-16 Yao Qi <yao@codesourcery.com>
8566
8567 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8568 duplicated on address.
8569
42476b70
YQ
85702012-04-16 Yao Qi <yao@codesourcery.com>
8571
8572 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8573 (struct tracepoint_action_ops) <send>: New field.
8574 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8575 (agent_expr_send, x_tracepoint_action_send): New.
8576 (l_tracepoint_action_send): New.
8577 (cmd_qtdp): Download and install tracepoint
8578 according to `use_agent'.
8579 (run_inferior_command): Add one more parameter `len'.
8580 Update callers.
8581 (tracepoint_send_agent): New.
8582 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8583
7bc83639
YQ
85842012-04-16 Yao Qi <yao@codesourcery.com>
8585
8586 * tracepoint.c (download_tracepoints): Moved to ...
8587 (cmd_qtstart): ... here.
8588
5f18041e
YQ
85892012-04-14 Yao Qi <yao@codesourcery.com>
8590
8591 * tracepoint.c: Include inttypes.h.
8592 (struct collect_memory_action): Use sized types.
8593 (struct tracepoint): Likewise.
8594 (cmd_qtdp, stop_tracing): Update print specifiers.
8595 (cmd_qtp, response_tracepoint): Likewise.
8596 (collect_data_at_tracepoint): Likewise.
8597 (collect_data_at_step): Likewise.
8598
55a8c076
YQ
85992012-04-14 Yao Qi <yao@codesourcery.com>
8600
8601 Import gnulib module inttypes.
8602 * aclocal.m4, config.in, configure: Regenerated.
8603
dc750257
YQ
86042012-04-14 Yao Qi <yao@codesourcery.com>
8605
8606 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8607 Makefile and config.status at last.
8608
0ab5faf9
YQ
86092012-04-13 Yao Qi <yao@codesourcery.com>
8610
8611 * tracepoint.c: Include stdint.h unconditionally.
8612
18f5fd81
TJB
86132012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8614
8615 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8616 on BFD_HAVE_SYS_PROCFS_TYPE.
8617 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8618 * configure: Regenerate.
8619 * config.in: Likewise.
8620
4d47af5c
L
86212012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8622
8623 * Makefile.in (clean): Also remove x32.c x32-linux.c
8624 x32-avx.c x32-avx-linux.c.
8625 (x32.o): New target.
8626 (x32.c): Likewise.
8627 (x32-linux.o): Likewise.
8628 (x32-linux.c): Likewise.
8629 (x32-avx.o): Likewise.
8630 (x32-avx.c): Likewise.
8631 (x32-avx-linux.o): Likewise.
8632 (x32-avx-linux.c): Likewise.
8633
8634 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8635 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8636 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8637 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8638 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8639 i386/x32-avx-linux.xml.
8640
8641 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8642 (init_registers_x32_avx_linux): Likwise.
8643 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8644 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8645
ecedbe58
PA
86462012-04-13 Pedro Alves <palves@redhat.com>
8647
8648 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8649 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8650 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8651 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8652 the sub-make.
8653
c92b5177
L
86542012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8655
8656 * linux-x86-low.c (compat_x32_clock_t): New.
8657 (compat_x32_siginfo_t): Likewise.
8658 (compat_x32_siginfo_from_siginfo): Likewise.
8659 (siginfo_from_compat_x32_siginfo): Likewise.
8660 (linux_is_elf64): Likewise.
8661 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8662 and siginfo_from_compat_x32_siginfo for x32.
8663 (x86_arch_setup): Set linux_is_elf64.
8664
214d508e
L
86652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8666
8667 PR gdb/13969
8668 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8669 e_machine field.
8670 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8671 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8672 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8673 compatible with process.
8674
c9a1864a
YQ
86752012-04-12 Yao Qi <yao@codesourcery.com>
8676
8677 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8678 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8679 (install-only, install-info, clean): Handle sub dir gnulib.
8680 (all-lib, am--refresh): New targets.
8681 (memmem.o): Remove target.
8682 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8683 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8684 (AC_REPLACE_FUNCS): Remove memmem.
8685 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8686 (AC_OUTPUT): Generate Makefile in gnulib/.
8687 * aclocal.m4, config.in, configure: Regenerated.
8688
367ba2c2
MR
86892012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8690
8691 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8692
9d236627
PA
86932012-04-05 Pedro Alves <palves@redhat.com>
8694
8695 -Werror=strict-aliasing
8696
8697 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8698 pointer.
8699
111217b3
PA
87002012-04-04 Pedro Alves <palves@redhat.com>
8701
8702 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8703 (sparc_store_gregset_from_stack, sparc_store_gregset)
8704 (sparc_breakpoint_at): Fix formatting.
8705
8365dcf5
TJB
87062012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8707
8708 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8709 are available.
8710 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8711 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8712 * config.in: Regenerate.
8713 * configure: Likewise.
8714
689cc2ae
PA
87152012-03-29 Pedro Alves <palves@redhat.com>
8716
8717 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8718 Correct ptrace arguments.
8719
c14dfd32
PA
87202012-03-28 Pedro Alves <palves@redhat.com>
8721
8722 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8723 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8724 (IA64_FR1_REGNUM): New defines.
8725 (ia64_fetch_register): New.
8726 (the_low_target): Install it.
8727 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8728 field.
8729 * linux-low.c (linux_fetch_registers): Try the
8730 the_low_target.fetch_register hook first.
8731
8732 * linux-arm-low.c (the_low_target): Adjust.
8733 * linux-bfin-low.c (the_low_target): Adjust.
8734 * linux-cris-low.c (the_low_target): Adjust.
8735 * linux-crisv32-low.c (the_low_target): Adjust.
8736 * linux-m32r-low.c (the_low_target): Adjust.
8737 * linux-m68k-low.c (the_low_target): Adjust.
8738 * linux-mips-low.c (the_low_target): Adjust.
8739 * linux-ppc-low.c (the_low_target): Adjust.
8740 * linux-s390-low.c (the_low_target): Adjust.
8741 * linux-sh-low.c (the_low_target): Adjust.
8742 * linux-sparc-low.c (the_low_target): Adjust.
8743 * linux-tic6x-low.c (the_low_target): Adjust.
8744 * linux-x86-low.c (the_low_target): Adjust.
8745 * linux-xtensa-low.c (the_low_target): Adjust.
8746
63c88e13
PA
87472012-03-26 Pedro Alves <palves@redhat.com>
8748
8749 * server.c (handle_qxfer_libraries): Don't bail early if
8750 the_target->qxfer_libraries_svr4 is not NULL.
8751
fb723180
PA
87522012-03-26 Pedro Alves <palves@redhat.com>
8753
8754 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8755
0afae3cf
PA
87562012-03-23 Pedro Alves <palves@redhat.com>
8757
8758 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8759 "library-list-svr4" element's start tag when the the DSO list is
8760 empty.
8761
485f1ee4
PA
87622012-03-23 Pedro Alves <palves@redhat.com>
8763
8764 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8765 a variable whose type size is the same as the inferior's pointer
8766 size.
8767
a5362b9a
TS
87682012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8769
8770 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8771 struct siginfo.
8772 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8773 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8774 * linux-low.h: Include <signal.h>.
8775 (struct siginfo): Remove forward declaration.
8776 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8777 struct siginfo.
8778
d226c142
MF
87792012-03-21 Mike Frysinger <vapier@gentoo.org>
8780
8781 * .gitignore: Ignore more files.
8782
122f36ef
PA
87832012-03-19 Pedro Alves <palves@redhat.com>
8784 Jan Kratochvil <jan.kratochvil@redhat.com>
8785
8786 * server.c (cont_thread, general_thread): Add describing comments.
8787 (start_inferior): Clear `cont_thread'.
8788 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8789 of a process.
8790
fc3e5175
YQ
87912012-03-15 Yao Qi <yao@codesourcery.com>
8792
8793 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8794 handling to ...
8795 (cmd_qtdp): ... here.
8796
8d0d92cd
YQ
87972012-03-15 Yao Qi <yao@codesourcery.com>
8798
8799 * tracepoint.c (struct tracepoint_action_ops): New.
8800 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8801 (m_tracepoint_action_download): New.
8802 (r_tracepoint_action_download): New.
8803 (x_tracepoint_action_download): New.
8804 (l_tracepoint_action_download): New.
8805 (add_tracepoint_action): Install `action->ops' according type.
8806 (download_tracepoint_1): Move code `download' function pointer
8807 of various tracepoint_action_ops.
8808
87b0bb13
JK
88092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8810
8811 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8812 linux_ptrace_attach_warnings.
8813
5f572dec
JK
88142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8815
8816 * Makefile.in (linux-ptrace.o): New.
8817 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8818 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8819 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8820 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8821 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8822 of these targets.
8823 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8824
f4647387
YQ
88252012-03-08 Yao Qi <yao@codesourcery.com>
8826 Pedro Alves <palves@redhat.com>
8827
8828 Fix PR server/13392.
8829 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8830 offset of JMP insn.
8831 * tracepoint.c (remove_tracepoint): New.
8832 (cmd_qtdp): Call remove_tracepoint when failed to install.
8833
9b224c5e
PA
88342012-03-07 Pedro Alves <palves@redhat.com>
8835
8836 * linux-low.c (get_detach_signal): New.
8837 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8838 Pass on pending signals to PTRACE_DETACH. Check the result of the
8839 ptrace call.
8840 * server.c (program_signals, program_signals_p): New.
8841 (handle_general_set): Handle QProgramSignals.
8842 * server.h (program_signals, program_signals_p): Declare.
8843
e237a7e2
JK
88442012-03-05 Pedro Alves <palves@redhat.com>
8845 Jan Kratochvil <jan.kratochvil@redhat.com>
8846
8847 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8848 New comment why.
8849
5808517f
YQ
88502012-03-03 Yao Qi <yao@codesourcery.com>
8851
8852 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8853 agent_look_up_symbols.
8854
58b4daa5
YQ
88552012-03-03 Yao Qi <yao@codesourcery.com>
8856
8857 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8858 (linux-x86-low.o): Likewise.
8859 * server.h: Remove in_process_agent_loaded.
8860 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8861 common/agent.c.
8862 Update callers.
8863
8ffcbaaf
YQ
88642012-03-03 Yao Qi <yao@codesourcery.com>
8865
8866 * tracepoint.c (gdb_agent_capability): New global.
8867 (in_process_agent_loaded_ust): Renamed to
8868 `in_process_agent_supports_ust'.
8869 Update callers.
8870 (in_process_agent_supports_ust): Call agent_capability_check.
8871 (clear_installed_tracepoints): Assert that agent supports
8872 agent.
8873
d1feda86
YQ
88742012-03-03 Yao Qi <yao@codesourcery.com>
8875
8876 * linux-low.c (linux_supports_agent): New.
8877 (linux_target_ops): Initialize field `supports_agent' with
8878 linux_supports_agent.
8879 * target.h (struct target_ops) <supports_agent>: New.
8880 (target_supports_agent): New macro.
8881 * server.c (handle_general_set): Handle packet 'QAgent'.
8882 (handle_query): Send `QAgent+'.
8883 * Makefile.in (server.o): Depends on agent.h.
8884
2fa291ac
YQ
88852012-03-03 Yao Qi <yao@codesourcery.com>
8886
8887 * Makefile.in (OBS): Add agent.o.
8888 Add new rule for agent.o.
8889 Track dependence of tracepoint.c on agent.h.
8890 * tracepoint.c (run_inferior_command_1):
8891 (run_inferior_command): Call agent_run_command.
8892 (gdb_ust_connect_sync_socket): Deleted. Move it to
8893 common/agent.c.
8894 (resume_thread, stop_thread): Likewise.
8895 (gdb_ust_socket_init): Renamed to ...
8896 (gdb_agent_socket_init): ... New.
8897 (gdb_ust_thread): Renamed to ...
8898 (gdb_agent_helper_thread): ... New.
8899 (gdb_ust_init): Move some code to ...
8900 (gdb_agent_init): ... here. New.
8901 [HAVE_UST]: Call gdb_ust_init.
8902 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8903 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8904 * config.in, configure: Regenerated.
8905
05044653
PA
89062012-03-02 Pedro Alves <palves@redhat.com>
8907
8908 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8909 * linux-low.c (struct simple_pid_list): New.
8910 (stopped_pids): New a struct simple_pid_list pointer.
8911 (add_to_pid_list, pull_pid_from_list): New.
8912 (handle_extended_wait): Don't assume the first signal new children
8913 report is SIGSTOP. Adjust call to pull_pid_from_list.
8914 (linux_wait_for_lwp): Adjust.
8915
8d00225b
YQ
89162012-03-02 Yao Qi <yao@codesourcery.com>
8917
8918 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8919 debug log.
8920
19560ba5
YQ
89212012-03-02 Yao Qi <yao@codesourcery.com>
8922
8923 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8924 `stop_pc' and `tpoint'. Update caller.
8925
1faeff08
MR
89262012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8927
8928 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8929 * linux-low.c (use_linux_regsets): New macro.
8930 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8931 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8932 (linux_register_in_regsets): New function.
8933 (usr_fetch_inferior_registers): Skip registers covered by
8934 regsets.
8935 (usr_store_inferior_registers): Likewise.
8936 (usr_fetch_inferior_registers): New macro.
8937 (usr_store_inferior_registers): Likewise.
8938 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8939 (linux_store_registers): Likewise.
8940 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8941 prototype.
8942 (init_registers_mips64_dsp_linux): Likewise.
8943 (init_registers_mips_linux): New macro.
8944 (init_registers_mips_dsp_linux): Likewise.
8945 (mips_dsp_num_regs): Likewise.
8946 (DSP_BASE, DSP_CONTROL): New fallback macros.
8947 (mips_base_regs): New macro.
8948 (mips_regmap): Use it. Fix the size.
8949 (mips_dsp_regmap): New variable.
8950 (mips_dsp_regset_bitmap): Likewise.
8951 (mips_arch_setup): New function.
8952 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8953 than mips_regmap.
8954 (mips_cannot_store_register): Likewise.
8955 (the_low_target): Update .arch_setup, .num_regs and .regmap
8956 initializers. Add .regset_bitmap initializer.
8957 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8958 initializer.
8959 * linux-bfin-low.c (the_low_target): Likewise.
8960 * linux-cris-low.c (the_low_target): Likewise.
8961 * linux-crisv32-low.c (the_low_target): Likewise.
8962 * linux-ia64-low.c (the_low_target): Likewise.
8963 * linux-m32r-low.c (the_low_target): Likewise.
8964 * linux-m68k-low.c (the_low_target): Likewise.
8965 * linux-ppc-low.c (the_low_target): Likewise.
8966 * linux-s390-low.c (the_low_target): Likewise.
8967 * linux-sh-low.c (the_low_target): Likewise.
8968 * linux-sparc-low.c (the_low_target): Likewise.
8969 * linux-tic6x-low.c (the_low_target): Likewise.
8970 * linux-x86-low.c (the_low_target): Likewise.
8971 * linux-xtensa-low.c (the_low_target): Likewise.
8972 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8973 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8974 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8975 srv_xmlfiles.
8976 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8977 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8978
c03e6ccc
YQ
89792012-02-29 Yao Qi <yao@codesourcery.com>
8980 Pedro Alves <palves@redhat.com>
8981
8982 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8983 `step_over_finished' is true.
8984
644cebc9
PA
89852012-02-27 Pedro Alves <palves@redhat.com>
8986
8987 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8988 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8989
c14d7ab2
PA
89902012-02-27 Pedro Alves <palves@redhat.com>
8991
8992 PR server/9684
8993 * linux-low.c (pid_is_stopped): New.
8994 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8995
412c89dd
LM
89962012-02-25 Luis Machado <lgustavo@codesourcery.com>
8997
8998 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8999 of conditions.
9000
b745defe
MR
90012012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9002
9003 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9004
9f3a5c85
LM
90052012-02-24 Luis Machado <lgustavo@codesourcery>
9006
9007 * server.c (handle_query): Advertise support for target-side
9008 breakpoint condition evaluation.
9009 (process_point_options): New function.
9010 (process_serial_event): When inserting a breakpoint, check for
9011 a target-side condition that should be evaluated.
9012
9013 * mem-break.c: Include regcache.h and ax.h.
9014 (point_cond_list_t): New data structure.
9015 (breakpoint) <cond_list>: New field.
9016 (find_gdb_breakpoint_at): Make non-static.
9017 (delete_gdb_breakpoint_at): Clear any target-side
9018 conditions.
9019 (clear_gdb_breakpoint_conditions): New function.
9020 (add_condition_to_breakpoint): Likewise.
9021 (add_breakpoint_condition): Likewise.
9022 (gdb_condition_true_at_breakpoint): Likewise.
9023 (gdb_breakpoint_here): Return result directly instead
9024 of going through a local variable.
9025
9026 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9027 (clear_gdb_breakpoint_conditions): Likewise.
9028 (add_breakpoint_condition): Likewise.
9029 (gdb_condition_true_at_breakpoint): Likewise.
9030
9031 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9032 (need_step_over_p): Take target-side breakpoint condition into
9033 consideration.
9034
5e1dc496
LM
90352012-02-24 Luis Machado <lgustavo@codesourcery>
9036
9037 * server.h: Include tracepoint.h.
9038 (agent_mem_read, agent_get_trace_state_variable_value,
9039 agent_set_trace_state_variable_value,
9040 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9041 get_set_tsv_func_addr): New prototypes.
9042
9043 * ax.h: New include file.
9044 * ax.c: New source file.
9045
9046 * tracepoint.c: Include ax.h.
9047 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9048 agent_expr, eval_result_type): Move to ax.h.
9049 (parse_agent_expr): Rename to ...
9050 (gdb_parse_agent_expr): ... this, make it non-static and move
9051 to ax.h.
9052 (unparse_agent_expr) Rename to ...
9053 (gdb_unparse_agent_expr): ... this, make it non-static and move
9054 to ax.h.
9055 (eval_agent_expr): Rename to ...
9056 (eval_tracepoint_agent_expr): ... this.
9057 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9058 forward declarations.
9059 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9060 (agent_get_trace_state_variable_value): New function.
9061 (agent_set_trace_state_variable_value): New function.
9062 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9063 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9064 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9065 (condition_true_at_tracepoint): Likewise.
9066 (parse_agent_expr): Rename to ...
9067 (gdb_parse_agent_expr): ... this and move to ax.c.
9068 (unparse_agent_expr): Rename to ...
9069 (gdb_unparse_agent_expr): ... this and move to ax.c.
9070 (gdb_agent_op_name): Move to ax.c.
9071 (eval_agent_expr): Rename to ...
9072 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9073 and move to ax.c.
9074 (eval_tracepoint_agent_expr): New function.
9075 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9076 non-static.
5e1dc496
LM
9077 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9078 ax.c.
9079 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9080 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9081 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9082 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9083 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9084 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9085 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9086 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9087 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9088 (compile_bytecodes): Remove forward declaration.
9089 (is_goto_target): Move to ax.c.
9090 (compile_bytecodes): Move to ax.c and call
9091 agent_get_trace_state_variable_value (...) and
9092 agent_set_trace_state_variable_value (...).
9093
9094 * Makefile.in: Update ax.c and IPA dependencies.
9095
277e4e52
PA
90962012-02-24 Pedro Alves <palves@redhat.com>
9097
9098 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9099 (cmd_bigqtbuffer_circular): ... this. Only handle
9100 'QTBuffer:circular:'.
9101 (handle_tracepoint_general_set): Adjust.
9102
bf4c19f7
YQ
91032012-02-16 Yao Qi <yao@codesourcery.com>
9104
9105 * inferiors.c: Move code to ...
9106 * dll.c: .... here. New.
9107 * server.h: Declare clear_dlls.
9108 * Makefile.in (SFILES): Add dll.c.
9109 (OBS): Add dll.o
9110 (dll.o): New rule.
9111
d73f2619
YQ
91122012-02-11 Yao Qi <yao@codesourcery.com>
9113
9114 * server.c: (handle_monitor_command): Add a new parameter
9115 `own_buf'.
9116 (handle_query): Update caller.
9117
f8255c2a
JB
91182012-02-09 Joel Brobecker <brobecker@adacore.com>
9119
9120 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9121 * configure, config.in: Regenerate.
9122 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9123 is not defined.
9124
da84f473
PA
91252012-02-02 Pedro Alves <palves@redhat.com>
9126
9127 Try SIGKILL first, then PTRACE_KILL.
9128 * linux-low.c (linux_kill_one_lwp): New.
9129 (linux_kill_one_lwp): Rename to ...
9130 (kill_one_lwp_callback): ... this. Use the new
9131 linux_kill_one_lwp.
9132
e886a173
PA
91332012-02-02 Pedro Alves <palves@redhat.com>
9134
9135 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9136 inferior.
9137
be07f1a2
PA
91382012-01-27 Pedro Alves <palves@redhat.com>
9139
9140 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9141 (elf_64_file_p): Make static.
9142 (linux_pid_exe_is_elf_64_file): New.
9143 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9144 Delete declarations.
9145 (linux_pid_exe_is_elf_64_file): Declare.
9146 * linux-x86-low.c (x86_arch_setup): Use
9147 linux_pid_exe_is_elf_64_file.
9148
d8301ad1
JK
91492012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9150
9151 * linux-low.c (linux_wait_for_event_1): Rename to ...
9152 (linux_wait_for_event): ... here and merge it with former
9153 linux_wait_for_event - new variable wait_ptid, use it.
9154 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9155
01b17894
PA
91562012-01-23 Pedro Alves <palves@redhat.com>
9157
9158 * server.c (main): Avoid yet another case of infinite loop while
9159 detaching/killing after a longjmp.
9160
e825046f
JK
91612012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9162
9163 Code cleanup.
9164 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9165
b9e7b9c3
UW
91662012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9167
9168 * hostio.c (handle_readlink): New function.
9169 (handle_vFile): Call it to handle "vFile:readlink" packets.
9170
901f9912
UW
91712012-01-20 Pedro Alves <palves@redhat.com>
9172 Ulrich Weigand <ulrich.weigand@linaro.org>
9173
9174 * server.c (handle_v_requests): Only support vAttach and vRun to
9175 start multiple processes when in extended protocol mode.
9176
fc1ab1a0
PA
91772012-01-17 Pedro Alves <palves@redhat.com>
9178
9179 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9180 memalign plus mprotect to allocate the scratch buffer.
9181
7d5d4e98
PA
91822012-01-13 Pedro Alves <palves@redhat.com>
9183
9184 * server.c (attach_inferior): Clear `cont_thread'.
9185
f128d5e9
PA
91862012-01-13 Pedro Alves <palves@redhat.com>
9187
9188 * server.c (main): Avoid infinite loop while detaching/killing
9189 after a longjmp.
9190
06db92f0
DE
91912012-01-09 Doug Evans <dje@google.com>
9192
9193 * server.c (start_inferior): Set last_ptid in --wrapper case.
9194
32d92999
YQ
91952012-01-06 Yao Qi <yao@codesourcery.com>
9196
9197 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9198 defined.
9199 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9200
5e0a92a9
YQ
92012012-01-04 Yao Qi <yao@codesourcery.com>
9202
9203 * tracepoint.c (cmd_qtdp): Print debug message
9204 for static tracepoint.
9205
ae639e8c
YQ
92062012-01-04 Yao Qi <yao@codesourcery.com>
9207
9208 * tracepoint.c (trace_vdebug): Differentiate debug message
9209 between gdbserver and IPA.
9210
f72429c5
YQ
92112012-01-03 Yao Qi <yao@codesourcery.com>
9212
9213 * tracepoint.c (tracepoint_was_hit): Don't collect for
9214 static tracepoint.
9215
12c3e59c
JB
92162012-01-02 Joel Brobecker <brobecker@adacore.com>
9217
9218 * terminal.h: Reformat copyright header.
9219
67827812
JB
92202012-01-02 Joel Brobecker <brobecker@adacore.com>
9221
9222 * server.c (gdbserver_version): Update copyright year.
9223 * gdbreplay.c (gdbreplay_version): Likewise.
9224
3e52c33d
JK
92252011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9228
9229 Revert:
9230 2011-12-18 Hui Zhu <teawater@gmail.com>
9231 * linux-low.c (linux_create_inferior): Save return value to ret.
9232
66f1260e
HZ
92332011-12-18 Hui Zhu <teawater@gmail.com>
9234
9235 * linux-low.c (linux_create_inferior): Save return value to ret.
9236
e77616d7
DE
92372011-12-16 Doug Evans <dje@google.com>
9238
e7b06c57
DE
9239 * linux-low.c (linux_create_inferior): If stdio connection,
9240 redirect stdin from /dev/null, stdout to stderr.
9241 * remote-utils.c (remote_is_stdio): New static global.
9242 (remote_connection_is_stdio): New function.
9243 (remote_prepare): Handle stdio connection.
9244 (remote_open): Ditto.
9245 (remote_close): Don't close stdin for stdio connections.
9246 (read_prim,write_prim): New functions. Replace all calls to
9247 read/write to these.
9248 * server.c (main): Watch for "-" argument. Move call to
9249 remote_prepare before start_inferior.
9250 * server.h (STDIO_CONNECTION_NAME): New macro.
9251 (remote_connection_is_stdio): Declare.
9252
e77616d7
DE
9253 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9254 in debugging output.
9255
82067193
YQ
92562011-12-15 Yao Qi <yao@codesourcery.com>
9257
9258 * tracepoint.c: Include sys/syscall.h.
9259 (gdb_ust_thread): Remove preprocessor conditional.
9260
82bfbe7e
PA
92612011-12-14 Pedro Alves <pedro@codesourcery.com>
9262
9263 * linux-low.c (linux_detach_one_lwp): Call
9264 the_low_target.prepare_to_resume before detaching.
9265
712c6575
YQ
92662011-12-14 Yao Qi <yao@codesourcery.com>
9267
9268 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9269 of write.
9270
d54d1edf
YQ
92712011-12-14 Yao Qi <yao@codesourcery.com>
9272
9273 * i386-low.c (i386_low_stopped_data_address): Initialize local
9274 variable `control'.
9275
6210a125
PA
92762011-12-13 Pedro Alves <pedro@codesourcery.com>
9277
9278 PR remote/13492
9279
9280 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9281 DR_CONTROL unless necessary. Extend comments.
9282 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9283 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9284
2ece8244
YQ
92852011-12-13 Yao Qi <yao@codesourcery.com>
9286
9287 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9288 macros.
9289 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9290
784867a5
JK
92912011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9292
9293 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9294 Print new debug message for such case.
9295
6bf36717
JK
92962011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9297
9298 Fix overlapping memcpy.
9299 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9300 the read_inferior_memory transfer.
9301 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9302 write_inferior_memory transfer.
9303 (set_fast_tracepoint_jump): New variable buf. Use it for the
9304 read_inferior_memory and write_inferior_memory transfers.
9305 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9306 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9307 Use it for the write_inferior_memory transfer.
9308 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9309 buffers.
9310
50275556
MR
93112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9312
9313 * linux-low.c (fetch_register, store_register): Make code
9314 consistent, fix formatting.
9315
7325beb4
MR
93162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9317
9318 * linux-low.c (usr_store_inferior_registers): Factor out code
9319 to handle individual registers into...
9320 (store_register): ... this new function.
9321
c642a434
UW
93222011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9323
9324 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9325 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9326 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9327 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9328 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9329 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9330 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9331 (srv_xmlfiles): Add new XML files.
9332
9333 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9334 and <sys/uio.h>.
9335 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9336 (init_registers_s390_linux32v1): Add prototype.
9337 (init_registers_s390_linux32v2): Likewise.
9338 (init_registers_s390_linux64v1): Likewise.
9339 (init_registers_s390_linux64v2): Likewise.
9340 (init_registers_s390x_linux64v1): Likewise.
9341 (init_registers_s390x_linux64v2): Likewise.
9342 (s390_num_regs): Increment to 52.
9343 (s390_regmap): Add orig_r2 register.
9344 (s390_num_regs_3264): Increment to 68.
9345 (s390_regmap_3264): Add orig_r2 register.
9346 (s390_collect_ptrace_register): Handle orig_r2 register.
9347 (s390_supply_ptrace_register): Likewise.
9348 (s390_fill_last_break): New function.
9349 (s390_store_last_break): Likewise.
9350 (s390_fill_system_call): New function.
9351 (s390_store_system_call): Likewise.
9352 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9353 register sets.
9354 (s390_check_regset): New function.
9355 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9356 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9357 Update target_regsets for available register sets.
9358
2268b414
JK
93592011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9360 Jan Kratochvil <jan.kratochvil@redhat.com>
9361
9362 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9363 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9364 New.
9365 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9366 * linux-low.h (struct process_info_private): New member r_debug.
9367 * server.c (handle_qxfer_libraries): Call
9368 the_target->qxfer_libraries_svr4.
9369 (handle_qxfer_libraries_svr4): New function.
9370 (qxfer_packets): New entry "libraries-svr4".
9371 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9372 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9373 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9374 PACKET_qXfer_libraries_svr4.
9375
d6db1fab
UW
93762011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9377
9378 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9379 PSW address/mask between 8-byte and 16-byte formats.
9380 (s390_supply_ptrace_register): Likewise.
9381 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9382 basic addressing mode bit.
9383
242f5f1c
SS
93842011-11-24 Stan Shebs <stan@codesourcery.com>
9385
9386 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9387
f196051f
SS
93882011-11-17 Stan Shebs <stan@codesourcery.com>
9389
9390 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9391 (tracing_start_time): New global.
9392 (tracing_stop_time): New global.
9393 (tracing_user_name): New global.
9394 (tracing_notes): New global.
9395 (tracing_stop_note): New global.
9396 (cmd_qtstart): Set traceframe_usage, start_time.
9397 (stop_tracing): Set stop_time.
9398 (cmd_qtstatus): Report additional status.
9399 (cmd_qtp): New function.
9400 (handle_tracepoint_query): Call it.
9401 (cmd_qtnotes): New function.
9402 (handle_tracepoint_general_set): Call it.
9403 (get_timestamp): Rename from tsv_get_timestamp.
9404
405f8e94
SS
94052011-11-14 Stan Shebs <stan@codesourcery.com>
9406 Kwok Cheung Yeung <kcy@codesourcery.com>
9407
9408 * linux-x86-low.c (small_jump_insn): New.
9409 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9410 trampoline and error message, build a trampoline and issue a small
9411 jump instruction to it.
9412 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9413 trampoline and error message.
9414 (x86_get_min_fast_tracepoint_insn_len): New.
9415 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9416 * linux-low.h (struct linux_target_ops): Add arguments to
9417 install_fast_tracepoint_jump_pad operation, add new operation.
9418 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9419 arguments.
9420 (linux_get_min_fast_tracepoint_insn_len): New function.
9421 (linux_target_op): Add new operation.
9422 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9423 (gdb_trampoline_buffer_end): Ditto.
9424 (gdb_trampoline_buffer_error): Ditto.
9425 (struct ipa_sym_addresses): Add fields for new IPA variables.
9426 (symbol_list): Add entries for new IPA variables.
9427 (struct tracepoint): Add fields to hold the address range of the
9428 trampoline used by the tracepoint.
9429 (trampoline_buffer_head): New static variable.
9430 (trampoline_buffer_tail): Ditto.
9431 (claim_trampoline_space): New function.
9432 (have_fast_tracepoint_trampoline_buffer): New function.
9433 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9434 structure.
9435 (install_fast_tracepoint): Ditto, also add error buffer argument.
9436 (cmd_qtminftpilen): New function.
9437 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9438 (fast_tracepoint_from_trampoline_address): New function.
9439 (fast_tracepoint_collecting): Handle trampoline as part of jump
9440 pad space.
9441 (set_trampoline_buffer_space): New function.
9442 (initialize_tracepoint): Initialize new IPA variables.
9443 * target.h (struct target_ops): Add arguments to
9444 install_fast_tracepoint_jump_pad operation, add new
9445 get_min_fast_tracepoint_insn_len operation.
9446 (target_get_min_fast_tracepoint_insn_len): New.
9447 (install_fast_tracepoint_jump_pad): Add arguments.
9448 * server.h (IPA_BUFSIZ): Define.
9449 * linux-i386-ipa.c: Include extra header files.
9450 (initialize_fast_tracepoint_trampoline_buffer): New function.
9451 (initialize_low_tracepoint): Call it.
9452 * server.h (set_trampoline_buffer_space): Declare.
9453 (claim_trampoline_space): Ditto.
9454 (have_fast_tracepoint_trampoline_buffer): Ditto.
9455
1e4d1764
YQ
94562011-11-14 Yao Qi <yao@codesourcery.com>
9457
9458 * server.c (handle_query): Handle InstallInTrace for qSupported.
9459 * tracepoint.c (add_tracepoint): Sort list.
9460 (install_tracepoint, download_tracepoint): New.
9461 (cmd_qtdp): Call them to install and download tracepoints.
9462 (sort_tracepoints): Removed.
9463 (cmd_qtstart): Update.
9464
5c73ff4e
YQ
94652011-11-14 Yao Qi <yao@codesourcery.com>
9466
9467 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9468 * mem-break.h: Declare.
9469 * tracepoint.c (cmd_qtstart): Move some code to ...
9470 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9471 New.
9472 (download_tracepoints): Move some code to ...
9473 (download_tracepoint_1): ... here. New.
9474
86a30030
YQ
94752011-11-08 Yao Qi <yao@codesourcery.com>
9476
9477 * remote-utils.c (relocate_instruction): A comment fix.
9478
8d26e50c
JB
94792011-11-07 Joel Brobecker <brobecker@adacore.com>
9480
9481 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9482 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9483 dr_status_mirror and dr_control_mirror from debug_reg_state.
9484 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9485 (i386_initial_stuff): Remove use of deleted globals.
9486 (i386_get_thread_context, i386_set_thread_context,
9487 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9488 from debug_reg_state.
9489
a59306a3
YQ
94902011-11-05 Yao Qi <yao@codesourcery.com>
9491
9492 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9493 address as TPOINT's.
9494
3065dfb6
SS
94952011-11-02 Stan Shebs <stan@codesourcery.com>
9496
9497 * tracepoint.c (agent_mem_read_string): New function.
9498 (eval_agent_expr): Call it for tracenz.
9499 * server.c (handle_query): Report support for tracenz.
9500
fd0d8c7c
YQ
95012011-11-02 Yao Qi <yao@codesourcery.com>
9502
9503 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9504
609086b1
YQ
95052011-11-02 Yao Qi <yao@codesourcery.com>
9506
9507 * target.h: Fix a typo in comment.
9508
b9fd1791
PA
95092011-10-31 Pedro Alves <pedro@codesourcery.com>
9510
9511 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9512 clobber the breakpoints' shadows with fast tracepoint jumps.
9513 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9514 * target.c (write_inferior_memory): Also pass MYADDR down to
9515 check_mem_write.
9516
03583c20
UW
95172011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9518
9519 * configure.ac: Check support for personality routine.
9520 * configure: Regenerate.
9521 * config.in: Likewise.
9522 * linux-low.c: Include <sys/personality.h>.
9523 Define ADDR_NO_RANDOMIZE if necessary.
9524 (linux_create_inferior): Disable address space randomization when
9525 forking inferior, if requested.
9526 (linux_supports_disable_randomization): New function.
9527 (linux_target_ops): Install it.
9528 * server.h (disable_randomization): Declare.
9529 * server.c (disable_randomization): New global variable.
9530 (handle_general_set): Handle QDisableRandomization.
9531 (handle_query): Likewise for qSupported.
9532 (main): Support --disable-randomization and --no-disable-randomization
9533 command line arguments.
9534 * target.h (struct target_ops): Add supports_disable_randomization.
9535 (target_supports_disable_randomization): New macro.
9536
723b724b
MF
95372011-09-29 Mike Frysinger <vapier@gentoo.org>
9538
9539 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9540 ifdef check.
9541 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9542 [!PT_GETDSBT] (target_loadmap): New definition.
9543 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9544 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9545 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9546 and PT_GETDSBT to LINUX_LOADMAP.
9547 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9548 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9549
55329a5c 95502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9551
9552 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9553 (arm_linux_hwbp_cap): New static variable.
9554 (arm_linux_get_hwbp_cap): Replace by ...
9555 (arm_linux_init_hwbp_cap): ... this new function.
9556 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9557 (arm_linux_get_hw_watchpoint_count): Likewise.
9558 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9559 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9560 (arm_prepare_to_resume): Use perror_with_name instead of error.
9561
55329a5c 95622011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9563
9564 * linux-arm-low.c: Include <signal.h>.
9565 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9566 (struct arm_linux_hwbp_cap): New data type.
9567 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9568 (struct arm_linux_hw_breakpoint): New data type.
9569 (MAX_BPTS, MAX_WPTS): Define.
9570 (struct arch_process_info, struct arch_lwp_info): New data types.
9571 (arm_linux_get_hwbp_cap): New function.
9572 (arm_linux_get_hw_breakpoint_count): Likewise.
9573 (arm_linux_get_hw_watchpoint_count): Likewise.
9574 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9575 (arm_hwbp_control_initialize): Likewise.
9576 (arm_hwbp_control_is_enabled): Likewise.
9577 (arm_hwbp_control_is_initialized): Likewise.
9578 (arm_hwbp_control_disable): Likewise.
9579 (arm_linux_hw_breakpoint_equal): Likewise.
9580 (arm_linux_hw_point_initialize): Likewise.
9581 (struct update_registers_data): New data structure.
9582 (update_registers_callback: New function.
9583 (arm_insert_point): Likewise.
9584 (arm_remove_point): Likewise.
9585 (arm_stopped_by_watchpoint): Likewise.
9586 (arm_stopped_data_address): Likewise.
9587 (arm_new_process): Likewise.
9588 (arm_new_thread): Likewise.
9589 (arm_prepare_to_resume): Likewise.
9590 (the_low_target): Register arm_insert_point, arm_remove_point,
9591 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9592 arm_new_thread, and arm_prepare_to_resume.
9593
6b9801d4
SS
95942011-09-15 Stan Shebs <stan@codesourcery.com>
9595
9596 * server.h (struct emit_ops): Add compare-goto fields.
9597 * tracepoint.c (gdb_agent_op_sizes): New table.
9598 (emit_eq_goto): New function.
9599 (emit_ne_goto): New function.
9600 (emit_lt_goto): New function.
9601 (emit_le_goto): New function.
9602 (emit_gt_goto): New function.
9603 (emit_ge_goto): New function.
9604 (is_goto_target): New function.
9605 (compile_bytecodes): Recognize special cases of compare-goto
9606 combinations and call specialized emitters for them.
9607 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9608 (amd64_emit_ne_goto): New function.
9609 (amd64_emit_lt_goto): New function.
9610 (amd64_emit_le_goto): New function.
9611 (amd64_emit_gt_goto): New function.
9612 (amd64_emit_ge_goto): New function.
9613 (amd64_emit_ops): Add the new functions.
9614 (i386_emit_eq_goto): New function.
9615 (i386_emit_ne_goto): New function.
9616 (i386_emit_lt_goto): New function.
9617 (i386_emit_le_goto): New function.
9618 (i386_emit_gt_goto): New function.
9619 (i386_emit_ge_goto): New function.
9620 (i386_emit_ops): Add the new functions.
9621
bf15cbda
SS
96222011-09-08 Stan Shebs <stan@codesourcery.com>
9623
9624 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9625 (i386_emit_epilogue): Restore %ebx.
9626
943ca1dd
JZ
96272011-08-31 Jie Zhang <jzhang918@gmail.com>
9628
9629 * server.c (step_thread): Remove definition.
9630 (process_serial_event): Don't handle Hs.
9631 * server.h (step_thread): Remove declaration.
9632 * target.c (set_desired_inferior): Remove use of step_thread.
9633
e3deef73
LM
96342011-08-24 Luis Machado <lgustavo@codesourcery.com>
9635
9636 * linux-low.c: Include linux-procfs.h.
9637 (linux_attach_lwp_1): Update comments.
9638 (linux_attach): Scan for existing threads when attaching to a
9639 process that is the tgid.
9640 * Makefile.in: Update dependencies.
9641
13da1c97
LM
96422011-08-24 Luis Machado <lgustavo@codesourcery.com>
9643
9644 * configure.srv: Add linux-procfs.o dependencies.
9645
881127c9
YQ
96462011-08-14 Yao Qi <yao@codesourcery.com>
9647
9648 * target.h (struct target_ops): Fix indent.
9649 * win32-low.c (win32_target_ops): Fix comment.
9650
58dbd541
YQ
96512011-08-14 Andrew Jenner <andrew@codesourcery.com>
9652 Yao Qi <yao@codesourcery.com>
9653
9654 * Makefile.in (clean): Remove tic6x-*.c files.
9655 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9656 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9657 (tic6x-c64xp-linux.c): Likewise.
9658 * configure.srv: Add support for tic6x-*-uclinux.
9659 * linux-tic6x-low.c: New.
9660 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9661
78d85199
YQ
96622011-08-14 Andrew Stubbs <ams@codesourcery.com>
9663 Yao Qi <yao@codesourcery.com>
9664
9665 * target.h (struct target_ops): Add read_loadmap.
9666 * linux-low.c (struct target_loadseg): New type.
9667 (struct target_loadmap): New type.
9668 (linux_read_loadmap): New function.
9669 (linux_target_ops): Add linux_read_loadmap.
9670 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9671 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9672 to NULL.
78d85199 9673
a959a88d
EZ
96742011-08-05 Eli Zaretskii <eliz@gnu.org>
9675
9676 * win32-low.c: Include <stdint.h>.
9677
1ced966e
PA
96782011-07-22 Pedro Alves <pedro@codesourcery.com>
9679
9680 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9681 to the inferior here.
9682 (i386_remove_aligned_watchpoint): Ditto.
9683 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9684 fit part of the watchpoint in the debug registers.
9685 (i386_update_inferior_debug_regs): New.
9686 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9687 registers, and only update the inferior on success.
9688 (i386_low_remove_watchpoint): Ditto.
9689
d26e3629
KY
96902011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9691
9692 * linux-low.c (compare_ints, unique, list_threads, show_process,
9693 linux_core_of_thread): Delete.
9694 (linux_target_ops): Change linux_core_of_thread to
9695 linux_common_core_of_thread.
9696 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9697 * utils.c (malloc_failure): Change type of argument.
9698 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9699 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9700 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9701 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9702 (IPA_OBJS): Add common-utils-ipa.o.
9703 (ptid_h, linux_osdata_h): New macros.
9704 (server_h): Add common/common-utils.h, common/xml-utils.h,
9705 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9706 common/ptid.h.
9707 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9708 ptid.o, buffer.o): New rules.
9709 (linux-low.o): Add common/linux-osdata.h as a dependency.
9710 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9711 * configure.ac: Add AC_HEADER_DIRENT check.
9712 * config.in: Regenerate.
9713 * configure: Regenerate.
9714 * remote-utils.c (xml_escape_text): Delete.
9715 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9716 buffer_xml_printf): Move to common/buffer.c.
9717 * server.c (main): Remove call to initialize_inferiors.
9718 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9719 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9720 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9721 internal_error, gdb_assert, gdb_assert_fail): Delete.
9722 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9723 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9724 common/buffer.h.
9725 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9726 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9727 initialize_inferiors): Delete.
9728
2275a1a7
PA
97292011-07-20 Pedro Alves <pedro@codesourcery.com>
9730
9731 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9732 symbol error.
9733
0a5b1e09
PA
97342011-05-31 Pedro Alves <pedro@codesourcery.com>
9735
9736 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9737 assertion.
9738 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9739
6938fd34
YQ
97402011-05-26 Yao Qi <yao@codesourcery.com>
9741
9742 * Makefile.in (thread-db.o): Track dependence to
9743 common/gdb_thread_db.h.
9744 * thread-db.c: include gdb_thread_db.h from right place.
9745
b481f9e0
TT
97462011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9747
9748 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9749 __FILE__ and __LINE__ to internal_error.
9750
98a5dd13
DE
97512011-05-13 Doug Evans <dje@google.com>
9752
9753 * thread-db.c (try_thread_db_load_from_sdir): New function.
9754 (try_thread_db_load_from_dir): New function.
9755 (thread_db_load_search): Handle $sdir, ignore $pdir.
9756 Remove trying of system directories if search of
9757 libthread-db-search-path fails, that is now done via $sdir.
9758
d248b706
KY
97592011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9760
9761 * server.c (handle_query): Add EnableDisableTracepoints to the list
9762 of supported features.
43aaf8b6 9763 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9764 tracepoints.
43aaf8b6
PA
9765 (cmd_qtenable_disable): New.
9766 (cmd_qtstart): Install tracepoints even if disabled.
9767 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9768 receiving a QTEnable or QTDisable packet.
9769 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9770 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9771 tracepoints.
9772 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9773
84e578fb
DE
97742011-05-10 Doug Evans <dje@google.com>
9775
9776 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9777
71f55dd8
DE
97782011-05-04 Doug Evans <dje@google.com>
9779
9780 * linux-low.c (linux_join): Skip process lookup.
9781 * spu-low.c (spu_join): Ditto.
9782 * server.c (join_inferiors_callback): Delete.
9783 (process_serial_event): For 'D' packet (detach) call join_inferior
9784 directly.
9785
4d393d60
JM
97862011-05-04 Joseph Myers <joseph@codesourcery.com>
9787
9788 * README: Don't mention xscale*-*-linux*.
9789 * configure.srv (xscale*-*-linux*): Don't handle target.
9790
b00ad6ff
NF
97912011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9792
9793 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9794 casting pointers.
9795 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9796 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9797 (i386_emit_void_call_2): Likewise.
9798
af96c192
YQ
97992011-04-26 Yao Qi <yao@codesourcery.com>
9800
43aaf8b6
PA
9801 * linux-low.c: Move common macros to linux-ptrace.h.
9802 Include linux-ptrace.h.
af96c192
YQ
9803 * Makefile.in (linux_ptrace_h): New.
9804 (linux-low.o): Depends on linux-ptrace.h.
9805
03f2bd59
JK
98062011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9807
9808 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9809 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9810 (remote_prepare): New function with most of the TCP code from ...
9811 (remote_open): ... here. Detect PORT here unconditionally. Move also
9812 setting transport_is_reliable.
9813 * server.c (run_once): New variable.
9814 (gdbserver_usage): Document it.
9815 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9816 the first run if RUN_ONCE.
9817 * server.h (run_once, remote_prepare): New declarations.
9818
7a9dd1b2
TT
98192011-04-19 Tom Tromey <tromey@redhat.com>
9820
9821 * win32-low.c (handle_load_dll): Remove duplicate "the".
9822
81239425
PM
98232011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9824
9825 Remove support for old Cygwin 1.5 versions.
9826 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9827 function to avoid warning.
9828 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9829 warning.
9830
9e0627f1
PM
98312011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9832
9833 * gdbserver/server.h (Macro _): Define it if not available.
9834
588eebee
MS
98352011-03-14 Michael Snyder <msnyder@vmware.com>
9836
348af9f7 9837 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9838
43f70d4c
JB
98392011-03-10 Joel Brobecker <brobecker@adacore.com>
9840
9841 * Makefile.in (maintainer-clean realclean distclean): Remove
9842 "make ... subdir_do" command.
9843
348af9f7
MS
98442011-03-10 Michael Snyder <msnyder@vmware.com>
9845
9846 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9847
9848 * server.c (handle_v_run): Free alloced buffer on early return.
9849
e637a4f5
YQ
98502011-03-09 Yao Qi <yao@codesourcery.com>
9851
9852 Revert:
9853 2011-03-04 Yao Qi <yao@codesourcery.com>
9854
9855 * Makefile.in: Remove GNU make feature --directory.
9856
9857 2011-03-05 Yao Qi <yao@codesourcery.com>
9858
9859 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9860 (subdir_do): New make target. Copied from gdb/Makefile.
9861 (maintainer-clean, realclean, distclean, clean): Call corresponding
9862 make targets in common/Makefile.
9863
9864 2011-02-11 Yao Qi <yao@codesourcery.com>
9865
9866 * configure.ac: Call AC_PROG_RANLIB.
9867 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9868 * configure: Regenerate.
9869
e6edda56
JK
98702011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9871
9872 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9873
e5141119
JB
98742011-03-06 Yao Qi <yao@codesourcery.com>
9875
9876 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9877
64794aa4
JB
98782011-03-05 Yao Qi <yao@codesourcery.com>
9879
9880 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9881 (subdir_do): New make target. Copied from gdb/Makefile.
9882 (maintainer-clean, realclean, distclean, clean): Call corresponding
9883 make targets in common/Makefile.
9884
7a762829
YQ
98852011-03-04 Yao Qi <yao@codesourcery.com>
9886
9887 * Makefile.in: Remove GNU make feature --directory.
9888
348af9f7
MS
98892011-03-04 Michael Snyder <msnyder@vmware.com>
9890
9891 * server.c (queue_stop_reply): Call xmalloc not malloc.
9892
98932011-03-02 Michael Snyder <msnyder@vmware.com>
9894
9895 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9896
9f72fee2
MS
98972011-02-28 Michael Snyder <msnyder@vmware.com>
9898
588eebee
MS
9899 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9900 (cmd_qtframe): Ditto.
9901 (cmd_qtbuffer): Ditto.
9902 (cmd_bigqtbuffer): Ditto.
9903
9f72fee2
MS
9904 * utils.c (decimal2str): Initialize 'width' to nine, then
9905 don't mess with it.
9906
8040bd49
UW
99072011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9908
9909 * hostio.c (require_data): Free *data, not data.
9910
7e52cbd0
JK
99112011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9912
9913 * hostio.c (require_data): Use free, not xfree.
9914
9130f83e
MS
99152011-02-27 Michael Snyder <msnyder@vmware.com>
9916
4b812f4e
MS
9917 * server.c (handle_query): Discard unused value.
9918
9130f83e
MS
9919 * hostio.c (require_data): Free malloc memory before returning
9920 error.
9921
69d37113
MS
99222011-02-26 Michael Snyder <msnyder@vmware.com>
9923
9924 * linux-low.c (list_threads): Call closedir for dirent.
9925
35f5825a
MS
99262011-02-27 Michael Snyder <msnyder@vmware.com>
9927
2a589cef
MS
9928 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9929 a case statement falls through.
9930
0adea5f7
MS
9931 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9932
35f5825a
MS
9933 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9934 in comparison.
9935
238f1c74
MS
99362011-02-26 Michael Snyder <msnyder@vmware.com>
9937
9938 * utils.c (decimal2str): Eliminate dead code and dead param.
9939 (pulongest): Drop dead param from call to decimal2str.
9940 (plongest): Ditto.
9941
633ff500
JB
99422011-02-24 Joel Brobecker <brobecker@adacore.com>
9943
9944 Revert the following patch (not approved yet):
9945 2011-02-21 Hui Zhu <teawater@gmail.com>
9946 * tracepoint.c (tp_printf): New function.
9947 (eval_agent_expr): Handle gdb_agent_op_printf.
9948
f9c6ff72
HZ
99492011-02-21 Hui Zhu <teawater@gmail.com>
9950
9951 * tracepoint.c (tp_printf): New function.
9952 (eval_agent_expr): Handle gdb_agent_op_printf.
9953
94d5e490
TT
99542011-02-18 Tom Tromey <tromey@redhat.com>
9955
9956 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9957 (tracepoint.o): Likewise.
9958 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9959 (gdb_agent_op_names): Likewise.
9960
c7f96d2b
TT
99612011-02-18 Tom Tromey <tromey@redhat.com>
9962
9963 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9964 gdb_agent_op_rot>: New constants.
9965 (gdb_agent_op_names): Add pick and roll.
9966 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9967 cases.
9968
0feedb2c
JK
99692011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9970
9971 * aclocal.m4: Regenerated with aclocal-1.11.1.
9972
b3b9301e
PA
99732011-02-14 Pedro Alves <pedro@codesourcery.com>
9974
9975 * server.c (handle_qxfer_traceframe_info): New.
9976 (qxfer_packets): Register "traceframe-info".
9977 (handle_query): Report support for qXfer:traceframe-info:read+.
9978 * tracepoint.c (match_blocktype): New.
9979 (traceframe_find_block_type): Rename to ...
9980 (traceframe_walk_blocks): ... this. Add callback filter argument,
9981 and use it.
9982 (traceframe_find_block_type): New, reimplemented on top of
9983 traceframe_walk_blocks.
9984 (build_traceframe_info_xml): New.
9985 (traceframe_read_info): New.
9986 * server.h (traceframe_read_info): Declare.
9987
4f3e6fb7
YQ
99882011-02-11 Yao Qi <yao@codesourcery.com>
9989
9990 * configure.ac: Call AC_PROG_RANLIB.
9991 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9992 * configure: Regenerate.
9993
764880b7
PA
99942011-02-07 Pedro Alves <pedro@codesourcery.com>
9995
9996 * server.c (gdb_read_memory): Change return semantics to allow
9997 partial transfers.
9998 (handle_search_memory_1): Adjust.
9999 (process_serial_event) <'m' packet>: Handle partial transfers.
10000 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10001
1c79eb8a
PA
100022011-01-28 Pedro Alves <pedro@codesourcery.com>
10003
10004 * regcache.c (init_register_cache): Initialize
10005 regcache->register_status.
10006 (free_register_cache): Release regcache->register_status.
10007 (regcache_cpy): Copy register_status.
10008 (registers_to_string): Print 'x's for unavailable registers.
10009 (supply_register): Mark the register's status valid or
10010 unavailable, depending on whether a buffer was passed in or not.
10011 (supply_register_zeroed): New.
10012 (supply_regblock): Mark the registers' status valid or
10013 unavailable, depending on whether a buffer was passed in or not.
10014 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10015 (struct regcache): New `register_status' field.
10016 (supply_register_zeroed): Declare.
10017 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10018 supply_register_zeroed, rather than passing a NULL buffer to
10019 supply_register.
10020 * tracepoint.c (fetch_traceframe_registers): Update comment.
10021
85724a0e
PA
100222011-01-28 Pedro Alves <pedro@codesourcery.com>
10023
10024 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10025 buffer explicit.
10026
d08aafef
PA
100272011-01-25 Pedro Alves <pedro@codesourcery.com>
10028
10029 * server.h (decode_xfer_write): Change prototype.
10030 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10031 and don't extract the annex here.
10032 * server.c (decode_xfer_read): Remove `annex' parameter,
10033 and don't extract the annex here.
10034 (decode_xfer): New.
10035 (struct qxfer): New.
10036 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10037 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10038 (handle_qxfer_statictrace): New functions, abstracted out from
10039 handle_query, and made to use the struct qxfer interface.
10040 (handle_threads_qxfer_proper): Rename to ...
10041 (handle_qxfer_threads_proper): ... this.
10042 (handle_threads_qxfer): Rename to ...
10043 (handle_qxfer_threads): ... this. Adjust.
10044 (qxfer_packets): New array.
10045 (handle_qxfer): New function.
10046 (handle_query): Use handle_qxfer.
10047
493e2a69
MS
100482011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10049
10050 * gdbreplay.c: Shorten lines of >= 80 columns.
10051 * linux-low.c: Ditto.
10052 * linux-ppc-low.c: Ditto.
10053 * linux-s390-low.c: Ditto.
10054 * linux-sparc-low.c: Ditto.
10055 * linux-x86-low.c: Ditto.
10056 * linux-xtensa-low.c: Ditto.
10057 * mem-break.c: Ditto.
10058 * nto-low.c: Ditto.
10059 * regcache.h: Ditto.
10060 * remote-utils.c: Ditto.
10061 * server.c: Ditto.
10062 * server.h: Ditto.
10063 * thread-db.c: Ditto.
10064 * tracepoint.c: Ditto.
10065 * utils.c: Ditto.
10066 * win32-low.h: Ditto.
10067
44944448
JB
100682011-01-05 Joel Brobecker <brobecker@adacore.com>
10069
10070 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10071 update.
10072
71ce852c
JB
100732011-01-01 Joel Brobecker <brobecker@adacore.com>
10074
10075 * server.c (gdbserver_version): Update copyright year in version
10076 output.
10077 * gdbreplay.c (gdbreplay_version): Ditto.
10078
eb826dc6
MF
100792010-12-29 Jie Zhang <jie.zhang@analog.com>
10080
10081 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10082 * linux-bfin-low.c: New file.
10083 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10084 PT_DATA_ADDR for BFIN targets.
10085 * Makefile.in (SFILES): Add linux-bfin-low.c.
10086 (clean): Remove reg-bfin.c.
10087 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10088 * README: Mention supported Blackfin targets.
10089
39ab222a
MF
100902010-12-23 Mike Frysinger <vapier@gentoo.org>
10091
10092 * .gitignore: New file.
10093
a1f2ce7d
MF
100942010-11-16 Mike Frysinger <vapier@gentoo.org>
10095
10096 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10097
f474844c
JZ
100982010-10-22 Jie Zhang <jie@codesourcery.com>
10099
10100 * Makefile.in: Add FLAGS_TO_PASS variable.
10101 (install): Remove dependency of install-only and recursively
10102 invoke make for install-only.
10103
f1048712
DE
101042010-10-04 Doug Evans <dje@google.com>
10105
10106 * Makefile.in (uninstall): Use $(DESTDIR).
10107
b53a1623
PA
101082010-09-24 Pedro Alves <pedro@codesourcery.com>
10109
e6ee044d
PA
10110 PR gdb/11842
10111
b53a1623
PA
10112 * linux-x86-low.c (compat_siginfo_from_siginfo)
10113 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10114 si_code is < 0. Check for si_code == SI_TIMER before checking for
10115 si_code < 0.
10116
fa1bd1e4
JB
101172010-09-13 Joel Brobecker <brobecker@adacore.com>
10118
10119 * lynx-i386-low.c: New file.
10120 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10121
47fac8f8
JB
101222010-09-13 Joel Brobecker <brobecker@adacore.com>
10123
10124 * lynx-low.c (ptrace_request_to_str): Remove handling for
10125 request values that have been removed in LynxOS 5.x.
10126
1adfc54d
JB
101272010-09-13 Joel Brobecker <brobecker@adacore.com>
10128
10129 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10130 <ptrace.h>
10131
c2a66c29
NS
101322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10133
10134 * configure.ac: Add --enable-inprocess-agent option.
10135 * configure: Rebuilt.
10136
32fcada3
YQ
101372010-09-06 Yao Qi <yao@codesourcery.com>
10138
10139 * linux-low.c (linux_kill): Remove unused variable.
10140 (linux_stabilize_threads): Likewise.
10141 * server.c (start_inferior): Likewise.
10142 (queue_stop_reply_callback): Likewise.
10143 * tracepoint.c (do_action_at_tracepoint): Likewise.
10144
0cccb683
YQ
101452010-09-06 Yao Qi <yao@codesourcery.com>
10146
10147 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10148 on return.
10149
423ec54c
JK
101502010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10151
10152 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10153
12ac6819
PA
101542010-09-06 Pedro Alves <pedro@codesourcery.com>
10155
10156 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10157 "$(IPA_DEPFILES)".
10158
8ed54b31
JB
101592010-09-01 Joel Brobecker <brobecker@adacore.com>
10160
10161 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10162 gdbserver/lynx-ppc-low.c: New files.
10163 * Makefile.in (lynx_low_h): New variable.
10164 (lynx-low.o, lynx-ppc-low.o): New rules.
10165 * configure.ac: On LynxOS, link with -lnetinet.
10166 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10167 * configure: regenerate.
10168
bb0116a4
JB
101692010-09-01 Joel Brobecker <brobecker@adacore.com>
10170
10171 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10172 * configure.ac: Add check for vasprintf and vsnprintf.
10173 * configure, config.in: Regenerate.
10174 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10175
a778ab81 101762010-09-01 Joel Brobecker <brobecker@adacore.com>
10177
10178 * gdbreplay.c: Move include of alloca.h up, next to include of
10179 malloc.h.
10180 * server.h: Add include of malloc.h.
10181 * mem-break.c: Remove include of malloc.h.
10182 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10183
8b034a19 101842010-09-01 Joel Brobecker <brobecker@adacore.com>
10185
10186 * Makefile.in (memmem.o): Build with -Wno-error.
10187
101882010-09-01 Joel Brobecker <brobecker@adacore.com>
10189
10190 * utils.c (xsnprintf): Make non-static.
10191 * server.h: Add xsnprintf declaration.
10192 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10193 replace calls to snprintf by calls to xsnprintf throughout.
10194
101952010-09-01 Joel Brobecker <brobecker@adacore.com>
10196
10197 * configure.ac: Add configure check for alloca.
10198 * configure, config.in: Regenerate.
10199 * server.h: Include alloca.h if it exists.
10200 * gdbreplay.c: Include alloca.h if it exists.
10201
1a981360
PA
102022010-08-28 Pedro Alves <pedro@codesourcery.com>
10203
10204 * linux-low.c (__SIGRTMIN): Define if not already defined.
10205 (linux_create_inferior): Check for __ANDROID__ rather than
10206 __SIGRTMIN.
10207 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10208 are already deferred.
10209 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10210 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10211 stopped and already has a pending signal to report.
10212 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10213 a pending signal to report or is moving out of a jump pad.
10214 (linux_init_signals): Check for __ANDROID__ rather than
10215 __SIGRTMIN.
10216
b4d51a55
PA
102172010-08-28 Pedro Alves <pedro@codesourcery.com>
10218
10219 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10220 debug_threads check. Avoid a linear search when not doing debug
10221 output.
10222
ec48365d
PA
102232010-08-27 Pedro Alves <pedro@codesourcery.com>
10224
10225 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10226 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10227 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10228 (process_event): Change local fd's type to gdb_fildes_t.
10229 (create_file_handler): Adjust prototype.
10230 (delete_file_handler): Adjust prototype.
10231 (handle_file_event): Adjust prototype. Use pfildes.
10232 (create_file_event): Adjsut prototype.
10233 * remote-utils.c (remote_desc, listen_desc): Change type to
10234 gdb_fildes_t.
10235 * server.h: New gdb_fildes_t typedef.
10236 [USE_WIN32API]: Include winsock2.h.
10237 (delete_file_handler, add_file_handler): Adjust prototypes.
10238 (pfildes): Declare.
10239 * utils.c (pfildes): New.
10240
854d88f0
PA
102412010-08-27 Pedro Alves <pedro@codesourcery.com>
10242
10243 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10244 * configure: Regenerate.
10245
0146f85b
PA
102462010-08-27 Pedro Alves <pedro@codesourcery.com>
10247
10248 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10249 (linux_done_accessing_memory): ... this.
10250 (linux_target_ops): Adjust.
10251 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10252 * nto-low.c (nto_target_ops): Adjust comment.
10253 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10254 * spu-low.c (spu_target_ops): Adjust comment.
10255 * target.h (target_ops): Rename unprepare_to_access_memory field
10256 to done_accessing_memory.
10257 (unprepare_to_access_memory): Rename to ...
10258 (done_accessing_memory): ... this.
10259
90d74c30
PA
102602010-08-26 Pedro Alves <pedro@codesourcery.com>
10261
10262 * linux-low.c (linux_prepare_to_access_memory): New.
10263 (linux_unprepare_to_access_memory): New.
10264 (linux_target_ops): Install them.
10265 * server.c (read_memory): Rename to ...
10266 (gdb_read_memory): ... this. Use
10267 prepare_to_access_memory/prepare_to_access_memory.
10268 (write_memory): Rename to ...
10269 (gdb_write_memory): ... this. Use
10270 prepare_to_access_memory/prepare_to_access_memory.
10271 (handle_search_memory_1): Adjust.
10272 (process_serial_event): Adjust.
10273 * target.h (struct target_ops): New fields
10274 prepare_to_access_memory and unprepare_to_access_memory.
10275 (prepare_to_access_memory, unprepare_to_access_memory): New.
10276 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10277 prepare_to_access_memory/prepare_to_access_memory.
10278 * nto-low.c (nto_target_ops): Adjust.
10279 * spu-low.c (spu_target_ops): Adjust.
10280 * win32-low.c (win32_target_ops): Adjust.
10281
fd467969
PA
102822010-08-26 Pedro Alves <pedro@codesourcery.com>
10283
10284 * Makefile.in (WARN_CFLAGS): Get it from configure.
10285 (WERROR_CFLAGS): New.
10286 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10287 * configure.ac: Introduce --enable-werror, which adds -Werror to
10288 the compiler command line. Enabled by default. Disable with
10289 --disable-werror. Add -Wdeclaration-after-statement
10290 Wpointer-arith and -Wformat-nonliteral to warning flags.
10291 * configure: Regenerate.
10292
331e2f5f
PA
102932010-08-26 Pedro Alves <pedro@codesourcery.com>
10294
10295 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10296
e581f2b4
PA
102972010-08-26 Pedro Alves <pedro@codesourcery.com>
10298
10299 * gdbreplay.c (remote_error): New.
10300 (gdbchar): New.
10301 (expect): Use gdbchar. Check for error reading from GDB.
10302 Clarify sync error output.
10303 (play): Check for errors writing to GDB.
10304 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10305 * remote-utils.c (getpkt): Check for errors writing to the remote
10306 descriptor.
10307
3c11dd79
PA
103082010-08-25 Pedro Alves <pedro@codesourcery.com>
10309
10310 * linux-low.c (linux_wait_1): Move non-debugging code out of
10311 `debug_threads' control.
10312
d20a8ad9
PA
103132010-08-25 Pedro Alves <pedro@codesourcery.com>
10314
10315 * linux-low.c (linux_wait_1): Don't set last_status here.
10316 * server.c (push_event, queue_stop_reply_callback): Assert we're
10317 not pushing a TARGET_WAITKIND_IGNORE event.
10318 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10319 (myresume, handle_target_event): Set the thread's last_resume_kind
10320 and last_status from the target returned status.
10321
964e4306
PA
103222010-08-25 Pedro Alves <pedro@codesourcery.com>
10323
10324 PR threads/10729
10325
10326 * linux-x86-low.c (update_debug_registers_callback): New.
10327 (i386_dr_low_set_addr): Use it.
10328 (i386_dr_low_get_addr): New.
10329 (i386_dr_low_set_control): Use update_debug_registers_callback.
10330 (i386_dr_low_get_control): New.
10331 (i386_dr_low_get_status): Adjust.
10332 * linux-low.c (linux_stop_lwp): New.
10333 * linux-low.h (linux_stop_lwp): Declare.
10334
10335 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10336 argument instead of a i386_debug_reg_state.
10337 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10338 a i386_debug_reg_state.
10339 (i386_insert_aligned_watchpoint): Adjust.
10340 (i386_remove_aligned_watchpoint): Adjust.
10341 (i386_low_stopped_data_address): Read the debug registers from the
10342 inferior instead of from the mirrors.
10343 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10344 (i386_dr_low_get_addr): Declare.
10345 (i386_dr_low_get_control): Declare.
10346 (i386_dr_low_get_status): Change prototype.
10347
10348 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10349 (i386_dr_low_get_addr): New.
10350 (i386_dr_low_get_control): New.
10351 (i386_dr_low_get_status): Adjust prototype. Return
10352 dr_status_mirror.
10353 (i386_initial_stuff): Clear dr_status_mirror and
10354 dr_control_mirror.
10355 (i386_get_thread_context): Adjust.
10356 (i386_set_thread_context): Adjust.
10357 (i386_thread_added): Adjust.
10358
5f21a75b
PA
103592010-08-24 Pedro Alves <pedro@codesourcery.com>
10360
10361 * linux-low.h (linux_thread_area): Delete declaration.
10362
3e4c1235
TS
103632010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10364
10365 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10366 after its termination.
10367
1971b033
PA
103682010-08-09 Pedro Alves <pedro@codesourcery.com>
10369
10370 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10371 (gdb_wants_all_stopped): Delete.
10372 (linux_wait_1): Don't call them.
10373 * server.c (handle_v_cont): Tag all threads as want-stopped.
10374 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10375 stopped as "client-wants-stopped".
10376
310444ac
PA
103772010-07-31 Pedro Alves <pedro@codesourcery.com>
10378
10379 * Makefile.in (signals_h): New.
10380 (server_h): Depend on it.
10381 (server.o): Don't depend on $(signals_def).
10382 (signals.o): Depend on $(signals_def).
10383
a19cae16
JK
103842010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10385
10386 * Makefile.in (signals_def): New.
10387 (server_h): Append include/gdb/signals.h and signals_def.
10388 (server.o): Append signals_def.
10389
30d50328
JK
103902010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10391
10392 * server.c (handle_target_event): Use target_signal_to_host for
10393 resume_info.sig initialization.
10394 * target.h (struct thread_resume) <sig>: New comment.
10395
5c3216e2
OS
103962010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10397
c6f46ca0
OS
10398 * server.c (handle_query): strcpy() the returned string from paddress()
10399 instead of sprintf().
5c3216e2
OS
10400 * utils.c (paddress): Return phex_nz().
10401
6bd31874
JB
104022010-07-07 Joel Brobecker <brobecker@adacore.com>
10403
10404 * server.c (handle_v_cont): Call mourn_inferior if process
10405 just exited.
10406 (myresume): Likewise.
10407
0fb4aa4b
PA
104082010-07-01 Pedro Alves <pedro@codesourcery.com>
10409
10410 Static tracepoints, and integration with UST.
10411
10412 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10413 * mem-break.c (uninsert_all_breakpoints)
10414 (reinsert_all_breakpoints): New.
10415 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10416 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10417 (gdb_agent_ust_loaded, helper_thread_id)
10418 (gdb_agent_helper_thread_id): New macros.
10419 (struct ipa_sym_addresses): Add addr_ust_loaded,
10420 addr_helper_thread_id, addr_cmd_buf.
10421 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10422 (in_process_agent_loaded_ust): New.
10423 (write_e_ust_not_loaded): New.
10424 (maybe_write_ipa_ust_not_loaded): New.
10425 (struct collect_static_trace_data_action): New.
10426 (enum tracepoint_type) <static_tracepoint>: New.
10427 (struct tracepoint) <handle>: Mention static tracepoints.
10428 (struct static_tracepoint_ctx): New.
10429 (CMD_BUF_SIZE): New.
10430 (add_tracepoint_action): Handle static tracepoint actions.
10431 (unprobe_marker_at): New.
10432 (clear_installed_tracepoints): Handle static tracepoints.
10433 (cmd_qtdp): Handle static tracepoints.
10434 (probe_marker_at): New.
10435 (cmd_qtstart): Handle static tracepoints.
10436 (response_tracepoint): Handle static tracepoints.
10437 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10438 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10439 (get_context_regcache): Handle static tracepoints.
10440 (do_action_at_tracepoint): Handle static tracepoint actions.
10441 (traceframe_find_block_type): Handle static trace data blocks.
10442 (traceframe_read_sdata): New.
10443 (download_tracepoints): Download static tracepoint actions.
10444 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10445 (GDB_PROBE_NAME): New.
10446 (ust_ops): New.
10447 (GET_UST_SYM): New.
10448 (USTF): New.
10449 (dlsym_ust): New.
10450 (ust_marker_to_static_tracepoint): New.
10451 (gdb_probe): New.
10452 (collect_ust_data_at_tracepoint): New.
10453 (gdb_ust_probe): New.
10454 (UNIX_PATH_MAX, SOCK_DIR): New.
10455 (gdb_ust_connect_sync_socket): New.
10456 (resume_thread, stop_thread): New.
10457 (run_inferior_command): New.
10458 (init_named_socket): New.
10459 (gdb_ust_socket_init): New.
10460 (cstr_to_hexstr): New.
10461 (next_st): New.
10462 (first_marker, next_marker): New.
10463 (response_ust_marker): New.
10464 (cmd_qtfstm, cmd_qtsstm): New.
10465 (unprobe_marker_at, probe_marker_at): New.
10466 (cmd_qtstmat, gdb_ust_thread): New.
10467 (gdb_ust_init): New.
10468 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10469 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10470 (ST_REGENTRY): New.
10471 (x86_64_st_collect_regmap): New.
10472 (X86_64_NUM_ST_COLLECT_GREGS): New.
10473 (AMD64_RIP_REGNUM): New.
10474 (supply_static_tracepoint_registers): New.
10475 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10476 (ST_REGENTRY): New.
10477 (i386_st_collect_regmap): New.
10478 (i386_NUM_ST_COLLECT_GREGS): New.
10479 (supply_static_tracepoint_registers): New.
10480 * server.c (handle_query): Handle qXfer:statictrace:read.
10481 <qSupported>: Report support for StaticTracepoints, and
10482 qXfer:statictrace:read features.
10483 * server.h (traceframe_read_sdata)
10484 (supply_static_tracepoint_registers): Declare.
10485 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10486 (unpack_varlen_hex): Include in IPA build.
10487 * Makefile.in (ustlibs, ustinc): New.
10488 (IPA_OBJS): Add remote-utils-ipa.o.
10489 ($(IPA_LIB)): Link -ldl and -lpthread.
10490 (UST_CFLAGS): New.
10491 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10492 * config.in, configure: Regenerate.
10493
9e4344e5
PA
104942010-06-20 Ian Lance Taylor <iant@google.com>
10495 Pedro Alves <pedro@codesourcery.com>
10496
10497 * linux-x86-low.c (always_true): Delete.
10498 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10499 trying to fool the compiler with always_true.
10500
c6beb2cb
PA
105012010-06-20 Pedro Alves <pedro@codesourcery.com>
10502
10503 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10504 conditions in gdbserver.
10505
d2ed6730
UW
105062010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10507
10508 * spu-low.c (spu_read_memory): Wrap around local store limit.
10509 (spu_write_memory): Likewise.
10510
4e29fb54
PA
105112010-06-15 Pedro Alves <pedro@codesourcery.com>
10512
10513 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10514 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10515 LONGEST uses.
10516 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10517 uses.
10518 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10519 uses with LONGEST uses.
10520
6a271cae
PA
105212010-06-14 Stan Shebs <stan@codesourcery.com>
10522 Pedro Alves <pedro@codesourcery.com>
10523
10524 Bytecode compiler.
10525
10526 * linux-x86-low.c: Include limits.h.
10527 (add_insns): New.
10528 (always_true): New.
10529 (EMIT_ASM): New.
10530 (EMIT_ASM32): New.
10531 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10532 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10533 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10534 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10535 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10536 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10537 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10538 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10539 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10540 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10541 (amd64_emit_void_call_2): New.
10542 (amd64_emit_ops): New.
10543 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10544 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10545 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10546 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10547 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10548 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10549 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10550 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10551 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10552 (i386_emit_stack_adjust, i386_emit_int_call_1)
10553 (i386_emit_void_call_2): New.
10554 (i386_emit_ops): New.
10555 (x86_emit_ops): New.
10556 (the_low_target): Install x86_emit_ops.
10557 * server.h (struct emit_ops): New.
10558 (get_raw_reg_func_addr): Declare.
10559 (current_insn_ptr, emit_error): Declare.
10560 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10561 (set_trace_state_variable_value): New defines.
10562 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10563 addr_get_trace_state_variable_value and
10564 addr_set_trace_state_variable_value.
10565 (symbol_list): New fields for get_raw_reg,
10566 get_trace_state_variable_value and set_trace_state_variable_value.
10567 (condfn): New typedef.
10568 (struct tracepoint): New field `compiled_cond'.
10569 (do_action_at_tracepoint): Clear compiled_cond.
10570 (get_trace_state_variable_value, set_trace_state_variable_value):
10571 Export in the IPA.
10572 (condition_true_at_tracepoint): If there's a compiled condition,
10573 run that.
10574 (current_insn_ptr, emit_error): New globals.
10575 (struct bytecode_address): New.
10576 (get_raw_reg_func_addr): New.
10577 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10578 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10579 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10580 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10581 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10582 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10583 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10584 (compile_tracepoint_condition, compile_bytecodes): New.
10585 * target.h (emit_ops): Forward declare.
10586 (struct target_ops): New field emit_ops.
10587 (target_emit_ops): New.
10588 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10589 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10590 * linux-low.c (linux_emit_ops): New.
10591 (linux_target_ops): Install it.
10592 * linux-low.h (struct linux_target_ops): New field emit_ops.
10593
92b72907
UW
105942010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10595
10596 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10597 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10598
fa593d66
PA
105992010-06-01 Pedro Alves <pedro@codesourcery.com>
10600 Stan Shebs <stan@codesourcery.com>
10601
10602 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10603 (all): Depend on $(extra_libraries).
10604 (install-only): Install the IPA.
10605 (IPA_OBJS, IPA_LIB): New.
10606 (clean): Remove the IPA lib.
10607 (IPAGENT_CFLAGS): New.
10608 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10609 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10610 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10611 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10612 * configure.ac: Check for atomic builtins support in the compiler.
10613 (IPA_DEPFILES, extra_libraries): Define.
10614 * configure.srv (ipa_obj): Add description.
10615 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10616 (i[34567]86-*-linux*): Set ipa_obj.
10617 (x86_64-*-linux*): Set ipa_obj.
10618 * linux-low.c (stabilizing_threads): New.
10619 (supports_fast_tracepoints): New.
10620 (linux_detach): Stabilize threads before detaching.
10621 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10622 the lwp is either not stabilizing, or is moving out of a jump pad.
10623 (linux_fast_tracepoint_collecting): New.
10624 (maybe_move_out_of_jump_pad): New.
10625 (enqueue_one_deferred_signal): New.
10626 (dequeue_one_deferred_signal): New.
10627 (linux_wait_for_event_1): If moving out of a jump pad, defer
10628 pending signals to later.
10629 (linux_stabilize_threads): New.
10630 (linux_wait_1): Check if threads need moving out of jump pads, and
10631 do it if so.
10632 (stuck_in_jump_pad_callback): New.
10633 (move_out_of_jump_pad_callback): New.
10634 (lwp_running): New.
10635 (linux_resume_one_lwp): Handle moving out of jump pads.
10636 (linux_set_resume_request): Dequeue deferred signals.
10637 (need_step_over_p): Also step over fast tracepoint jumps.
10638 (start_step_over): Also uninsert fast tracepoint jumps.
10639 (finish_step_over): Also reinsert fast tracepoint jumps.
10640 (linux_install_fast_tracepoint_jump): New.
10641 (linux_target_ops): Install linux_stabilize_threads and
10642 linux_install_fast_tracepoint_jump_pad.
10643 * linux-low.h (linux_target_ops) <get_thread_area,
10644 install_fast_tracepoint_jump_pad>: New fields.
10645 (struct lwp_info) <collecting_fast_tracepoint,
10646 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10647 (linux_get_thread_area): Declare.
10648 * linux-x86-low.c (jump_insn): New.
10649 (x86_get_thread_area): New.
10650 (append_insns): New.
10651 (push_opcode): New.
10652 (amd64_install_fast_tracepoint_jump_pad): New.
10653 (i386_install_fast_tracepoint_jump_pad): New.
10654 (x86_install_fast_tracepoint_jump_pad): New.
10655 (the_low_target): Install x86_get_thread_area and
10656 x86_install_fast_tracepoint_jump_pad.
10657 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10658 (struct fast_tracepoint_jump): New.
10659 (fast_tracepoint_jump_insn): New.
10660 (fast_tracepoint_jump_shadow): New.
10661 (find_fast_tracepoint_jump_at): New.
10662 (fast_tracepoint_jump_here): New.
10663 (delete_fast_tracepoint_jump): New.
10664 (set_fast_tracepoint_jump): New.
10665 (uninsert_fast_tracepoint_jumps_at): New.
10666 (reinsert_fast_tracepoint_jumps_at): New.
10667 (set_breakpoint_at): Use write_inferior_memory.
10668 (uninsert_raw_breakpoint): Use write_inferior_memory.
10669 (check_mem_read): Mask out fast tracepoint jumps.
10670 (check_mem_write): Mask out fast tracepoint jumps.
10671 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10672 (set_fast_tracepoint_jump): Declare.
10673 (delete_fast_tracepoint_jump)
10674 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10675 (reinsert_fast_tracepoint_jumps_at): Declare.
10676 * regcache.c: Don't compile many functions when building the
10677 in-process agent library.
10678 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10679 the register buffer in the heap.
10680 (free_register_cache): If the register buffer isn't owned by the
10681 regcache, don't free it.
10682 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10683 pre-existing register caches.
10684 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10685 type.
10686 (convert_ascii_to_int): : Constify `from' parameter type.
10687 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10688 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10689 the needed buffer in-place.
10690 (relocate_instruction): New.
10691 * server.c (handle_query) <qSymbols>: If the target supports
10692 tracepoints, give it a chance of looking up symbols. Report
10693 support for fast tracepoints.
10694 (handle_status): Stabilize threads.
10695 (process_serial_event): Adjust.
10696 * server.h (struct fast_tracepoint_jump): Forward declare.
10697 (struct process_info) <fast_tracepoint_jumps>: New field.
10698 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10699 (decode_X_packet, decode_M_packet): Adjust.
10700 (relocate_instruction): Declare.
10701 (in_process_agent_loaded): Declare.
10702 (tracepoint_look_up_symbols): Declare.
10703 (struct fast_tpoint_collect_status): Declare.
10704 (fast_tracepoint_collecting): Declare.
10705 (force_unlock_trace_buffer): Declare.
10706 (handle_tracepoint_bkpts): Declare.
10707 (initialize_low_tracepoint)
10708 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10709 * target.h (struct target_ops) <stabilize_threads,
10710 install_fast_tracepoint_jump_pad>: New fields.
10711 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10712 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10713 [HAVE_STDINT_H]: Include stdint.h.
10714 (trace_debug_1): Rename to ...
10715 (trace_vdebug): ... this.
10716 (trace_debug): Rename to ...
10717 (trace_debug_1): ... this. Add `level' parameter.
10718 (trace_debug): New.
10719 (ATTR_USED, ATTR_NOINLINE): New.
10720 (IP_AGENT_EXPORT): New.
10721 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10722 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10723 (about_to_request_buffer_space, trace_buffer_is_full)
10724 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10725 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10726 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10727 (traceframe_write_count, traceframes_created)
10728 (trace_state_variables)
10729 New renaming defines.
10730 (struct ipa_sym_addresses): New.
10731 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10732 (symbol_list): New.
10733 (ipa_sym_addrs): New.
10734 (all_tracepoint_symbols_looked_up): New.
10735 (in_process_agent_loaded): New.
10736 (write_e_ipa_not_loaded): New.
10737 (maybe_write_ipa_not_loaded): New.
10738 (tracepoint_look_up_symbols): New.
10739 (debug_threads) [IN_PROCESS_AGENT]: New.
10740 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10741 (UNKNOWN_SIDE_EFFECTS): New.
10742 (stop_tracing): New.
10743 (flush_trace_buffer): New.
10744 (stop_tracing_bkpt): New.
10745 (flush_trace_buffer_bkpt): New.
10746 (read_inferior_integer): New.
10747 (read_inferior_uinteger): New.
10748 (read_inferior_data_pointer): New.
10749 (write_inferior_data_pointer): New.
10750 (write_inferior_integer): New.
10751 (write_inferior_uinteger): New.
10752 (struct collect_static_trace_data_action): Delete.
10753 (enum tracepoint_type): New.
10754 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10755 <actions_str, step_actions, step_actions_str>: Only include in
10756 GDBserver.
fa593d66
PA
10757 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10758 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10759 (tracepoints): Use IP_AGENT_EXPORT.
10760 (last_tracepoint): Don't include in the IPA.
10761 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10762 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10763 (alloced_trace_state_variables): New.
10764 (trace_state_variables): Use IP_AGENT_EXPORT.
10765 (traceframe_t): Delete unused variable.
10766 (circular_trace_buffer): Don't include in the IPA.
10767 (trace_buffer_start): Delete.
10768 (struct trace_buffer_control): New.
10769 (trace_buffer_free): Delete.
10770 (struct ipa_trace_buffer_control): New.
10771 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10772 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10773 New.
10774 (trace_buffer_ctrl): New.
10775 (TRACE_BUFFER_CTRL_CURR): New.
10776 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10777 Reimplement as macros.
10778 (trace_buffer_wrap): Delete.
10779 (traceframe_write_count, traceframe_read_count)
10780 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10781 (struct tracepoint_hit_ctx) <type>: New field.
10782 (struct fast_tracepoint_ctx): New.
10783 (memory_barrier): New.
10784 (cmpxchg): New.
10785 (record_tracepoint_error): Update atomically in the IPA.
10786 (clear_inferior_trace_buffer): New.
10787 (about_to_request_buffer_space): New.
10788 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10789 updating the same buffer.
10790 (add_tracepoint): Default the tracepoint's type to trap
10791 tracepoint, and orig_size to -1.
10792 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10793 internal variables.
10794 (create_trace_state_variable): New parameter `gdb'. Handle it.
10795 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10796 (cmd_qtdp): Handle fast tracepoints.
10797 (cmd_qtdv): Adjust.
10798 (max_jump_pad_size): New.
10799 (gdb_jump_pad_head): New.
10800 (get_jump_space_head): New.
10801 (claim_jump_space): New.
10802 (sort_tracepoints): New.
10803 (MAX_JUMP_SIZE): New.
10804 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10805 IPA.
10806 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10807 support. Upload fast traceframes, and delete internal IPA
10808 breakpoints.
10809 (stop_tracing_handler): New.
10810 (flush_trace_buffer_handler): New.
10811 (cmd_qtstop): Upload fast tracepoints.
10812 (response_tracepoint): Handle fast tracepoints.
10813 (tracepoint_finished_step): Upload fast traceframes. Set the
10814 tracepoint hit context's tracepoint type.
10815 (handle_tracepoint_bkpts): New.
10816 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10817 type. Add comment about fast tracepoints.
10818 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10819 non-existing action_str field.
10820 (get_context_regcache): Handle fast tracepoints.
10821 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10822 to the regcache.
10823 (fast_tracepoint_from_jump_pad_address): New.
10824 (fast_tracepoint_from_ipa_tpoint_address): New.
10825 (collecting_t): New.
10826 (force_unlock_trace_buffer): New.
10827 (fast_tracepoint_collecting): New.
10828 (collecting): New.
10829 (gdb_collect): New.
10830 (write_inferior_data_ptr): New.
10831 (target_tp_heap): New.
10832 (target_malloc): New.
10833 (download_agent_expr): New.
10834 (UALIGN): New.
10835 (download_tracepoints): New.
10836 (download_trace_state_variables): New.
10837 (upload_fast_traceframes): New.
10838 (IPA_FIRST_TRACEFRAME): New.
10839 (IPA_NEXT_TRACEFRAME_1): New.
10840 (IPA_NEXT_TRACEFRAME): New.
10841 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10842 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10843 (gdb_jump_pad_buffer_end): New.
10844 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10845 (initialize_tracepoint): Adjust.
10846 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10847 buffer. Initialize the low module.
10848 * utils.c (PREFIX, TOOLNAME): New.
10849 (malloc_failure): Use PREFIX.
10850 (error): In the IPA, an error causes an exit.
10851 (fatal, warning): Use PREFIX.
10852 (internal_error): Use TOOLNAME.
10853 (NUMCELLS): Increase to 10.
10854 * configure, config.in: Regenerate.
10855
d149dd1d
PA
108562010-06-01 Pedro Alves <pedro@codesourcery.com>
10857
10858 * server.c (handle_query) <qSupported>: Do two passes over the
10859 qSupported string to avoid nesting strtok.
10860
f6528abd
JK
108612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10862
10863 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10864 (CDEPS): New.
10865 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10866 -Wl,--dynamic-list.
10867 * configure: Regenerate.
10868 * proc-service.list: New.
10869
ca2a87a0
JK
108702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10871
10872 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10873 New comment.
10874
363a6e9f
OS
108752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10876
10877 * gdbreplay.c (remote_open): Check error return from socket() call by
10878 its equality to -1 not by it being negative.
10879 * remote-utils.c (remote_open): Likewise.
10880
d23b6cb1
PA
108812010-05-23 Pedro Alves <pedro@codesourcery.com>
10882
10883 * config.h: Regenerate.
10884
28d3cf85
MK
108852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10886
10887 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10888 doesn't provide PTRACE_GET_THREAD_AREA.
10889
fea36a59
MK
108902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10891
10892 * linux-m68k-low.c: Include <asm/ptrace.h>
10893 (ps_get_thread_area): Implement.
10894
24b066ba
DE
108952010-05-03 Doug Evans <dje@google.com>
10896
10897 * event-loop.c (struct callback_event): New struct.
10898 (callback_list): New global.
10899 (append_callback_event, delete_callback_event): New functions.
10900 (process_callback): New function.
10901 (start_event_loop): Call it.
10902 * remote-utils.c (NOT_SCHEDULED): Define.
10903 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10904 moved out of readchar.
10905 (readchar): Rewrite. Call reschedule before returning.
10906 (reset_readchar): New function.
10907 (remote_close): Call it.
10908 (process_remaining, reschedule): New functions.
10909 * server.h (callback_handler_func): New typedef.
10910 (append_callback_event, delete_callback_event): Declare.
10911
9836d6ea
PA
109122010-05-03 Pedro Alves <pedro@codesourcery.com>
10913
10914 * proc-service.c (ps_pglobal_lookup): Use
10915 thread_db_look_up_one_symbol.
10916 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10917 parameter. Use it instead of all_symbols_looked_up.
10918 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10919 field.
10920 (all_symbols_looked_up): Don't declare.
10921 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10922 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10923 field.
10924 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10925 Set all_symbols_looked_up here.
10926 (thread_db_look_up_one_symbol): New.
10927 (thread_db_get_tls_address): Adjust.
10928 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10929 thread_db object on the heap, and tentatively set it in the
10930 process structure.
10931 (thread_db_init): Don't set all_symbols_looked_up here.
10932 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10933
7984d532
PA
109342010-05-03 Pedro Alves <pedro@codesourcery.com>
10935
10936 * linux-low.c (linux_kill, linux_detach): Adjust.
10937 (status_pending_p_callback): Remove redundant statement. Check
10938 for !TARGET_WAITIKIND_IGNORE, instead of
10939 TARGET_WAITKIND_STOPPED.
10940 (handle_tracepoints): Make sure LWP is locked. Adjust.
10941 (linux_wait_for_event_1): Adjust.
10942 (linux_cancel_breakpoints): New.
10943 (unsuspend_one_lwp): New.
10944 (unsuspend_all_lwps): New.
10945 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10946 (send_sigstop_callback): Change return type to int, add new
10947 `except' parameter and handle it.
10948 (suspend_and_send_sigstop_callback): New.
10949 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10950 pass them down. If SUSPEND, also increment the lwp's suspend
10951 count.
10952 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10953 (need_step_over_p): Don't consider suspended LWPs.
10954 (start_step_over): Adjust.
10955 (proceed_one_lwp): Change return type to int, add new `except'
10956 parameter and handle it.
10957 (unsuspend_and_proceed_one_lwp): New.
10958 (proceed_all_lwps): Use find_inferior instead of
10959 for_each_inferior.
10960 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10961 also decrement the suspend count of LWPs. Pass `except' down,
10962 instead of hacking its suspend count.
10963 (linux_pause_all): Add `freeze' parameter. Adjust.
10964 (linux_unpause_all): New.
10965 (linux_target_ops): Install linux_unpause_all.
10966 * server.c (handle_status): Adjust.
10967 * target.h (struct target_ops): New fields `unpause_all' and
10968 `cancel_breakpoints'. Add new parameter to `pause_all'.
10969 (pause_all): Add new `freeze' parameter.
10970 (unpause_all): New.
10971 (cancel_breakpoints): New.
10972 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10973 cancel breakpoints.
10974 (cmd_qtstart): Pause threads.
10975 (stop_tracing): Pause threads, and cancel breakpoints.
10976 * win32-low.c (win32_target_ops): Adjust.
10977
e471f25b
PA
109782010-05-03 Pedro Alves <pedro@codesourcery.com>
10979
10980 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10981 the inferior right away from here...
10982 (linux_wait_1): ... to here, and adjust to check the thread's
10983 last_resume_kind instead of the lwp's step or stop_expected flags.
10984
1915ef4f
PA
109852010-05-02 Pedro Alves <pedro@codesourcery.com>
10986
10987 * README: Use consistent `GDB' and `GDBserver' spellings.
10988
f9e39928
PA
109892010-05-02 Pedro Alves <pedro@codesourcery.com>
10990
10991 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10992 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10993 (linux_detach_one_lwp): Assume the lwp is stopped.
10994 (any_thread_of): Delete.
10995 (linux_detach): Stop all lwps here. Don't blindly delete all
10996 breakpoints.
10997 (delete_lwp_callback): New.
10998 (linux_mourn): Delete all lwps of the process that is gone.
10999 (linux_wait_1): Don't delete the last lwp of the process here.
11000 * mem-break.h (mark_breakpoints_out): Declare.
11001 * mem-break.c (mark_breakpoints_out): New.
11002 (free_all_breakpoints): Use it.
11003 * server.c (handle_target_event): If the process is gone, mark
11004 breakpoints out.
11005 * thread-db.c (struct thread_db) <create_bp>: New field.
11006 (thread_db_enable_reporting): Fix prototype. Store a thread event
11007 breakpoint reference in the thread_db struct.
11008 (thread_db_load_search): Clear the thread_db object.
11009 (try_thread_db_load_1): Ditto.
11010 (switch_to_process): New.
11011 (disable_thread_event_reporting): Use it.
11012 (remove_thread_event_breakpoints): New.
11013 (thread_db_detach, thread_db_mourn): Use it.
11014
1e7fc18c
PA
110152010-05-01 Pedro Alves <pedro@codesourcery.com>
11016
11017 * linux-low.c (linux_enable_event_reporting): New.
11018 (linux_wait_for_event_1, handle_extended_wait): Use it.
11019
02fc4de7
PA
110202010-04-30 Pedro Alves <pedro@codesourcery.com>
11021
11022 * linux-low.c (linux_kill_one_lwp, linux_kill)
11023 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11024 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11025 SIGSTOP even if the LWP is stopped.
11026 (send_sigstop_callback): New.
11027 (stop_all_lwps): Use send_sigstop_callback instead.
11028 (linux_resume_one_thread): Adjust.
11029 (proceed_one_lwp): Still proceed an LWP that the client has
11030 requested to stop, if we haven't reported it as stopped yet. Make
11031 sure that LWPs the client want stopped, have a pending SIGSTOP.
11032
bc3b5632
DE
110332010-04-26 Doug Evans <dje@google.com>
11034
ae1ada35
DE
11035 * server.c (handle_general_set): Make static.
11036
bc3b5632
DE
11037 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11038 Print received char after testing for error/eof instead of before.
11039 (input_interrupt): Tweak comment.
11040
65730243
DE
110412010-04-23 Doug Evans <dje@google.com>
11042
11043 * server.c (start_inferior): Print inferior argv if --debug.
11044
a8ae7dc0
AR
110452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11046
11047 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11048 * nto-x86-low.c: Include server.h
11049
1c07cc19
PM
110502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11051
11052 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11053 be consistent with other sources of this directory.
11054 (init_registers_amd64): Correct name of source file of this function
11055 in the comment.
11056
e0a61e09
PM
110572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11058
11059 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11060 64-bit executables.
11061
54709339
PM
110622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11063
11064 * win32-i386-low.c: Add 64-bit support.
11065 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11066 (init_registers_amd64): Declare.
11067 (mappings): Add 64-bit version of array.
11068 (init_windows_x86): New function.
11069 (the_low_target): Change init_arch field to init_windows_x86.
11070
e8f0053d
PM
110712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11072
11073 * win32-low.c: Adapt to support also 64-bit architecture.
11074 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11075 (get_image_name): Use SIZE_T type for local variable `done'.
11076 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11077 (toolhelp_get_dll_name): Idem.
11078 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11079 Use uintptr_t typecast to avoid warning.
11080 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11081 (handle_exception): Use phex_nz to avoid warning.
11082 (win32_wait): Remove unused local variable `process'.
11083
c481e77e
PM
110842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11085
11086 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11087 `amd64-avx.o'.
11088
12ea4b69
PM
110892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11090
11091 * configure.ac: Use `ws2_32' library for srv_mingw.
11092 * configure: Regenerate.
11093 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11094 * remote-utils.c: Likewise.
11095
f6d1620c
L
110962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11097
11098 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11099 if __x86_64__ is defined.
11100
8e642873
PM
111012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11102
11103 * configure: Regenerate.
11104
711e434b
PM
111052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11106
11107 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11108 * target.h (target_ops): New get_tib_address field.
11109 * win32-low.h (win32_thread_info): Add thread_local_base field.
11110 * win32-low.c (child_add_thread): Add tlb argument.
11111 Set thread_local_base field to TLB.
11112 (get_child_debug_event): Adapt to child_add_thread change.
11113 (win32_get_tib_address): New function.
11114 (win32_target_ops): Set get_tib_address field to
11115 win32_get_tib_address.
11116 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11117
505106cd
PA
111182010-04-12 Pedro Alves <pedro@codesourcery.com>
11119
505106cd
PA
11120 * linux-low.c (linux_mourn): Also remove the process.
11121 * server.c (handle_target_event): Don't remove the process here.
11122 * nto-low.c (nto_mourn): New.
11123 (nto_target_ops): Install it.
11124 * spu-low.c (spu_mourn): New.
11125 (spu_target_ops): Install it.
11126 * win32-low.c (win32_mourn): New.
11127 (win32_target_ops): Install it.
11128
e8470a06
PA
111292010-04-12 Pedro Alves <pedro@codesourcery.com>
11130
11131 * server.h (buffer_xml_printf): Remove redundant `;'.
11132
45ba0d02
PA
111332010-04-12 Pedro Alves <pedro@codesourcery.com>
11134
11135 * regcache.c (set_register_cache): Invalidate regcaches before
11136 changing the register cache layout.
11137 (regcache_invalidate_one): Allow a NULL regcache.
11138 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11139 regcaches before changing the register cache layout or the target
11140 regsets.
11141
59e04013
L
111422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11143
11144 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11145 variable warning on Linux/x86-64.
11146
8336d594
PA
111472010-04-11 Pedro Alves <pedro@codesourcery.com>
11148
11149 GDBserver disconnected tracing support.
11150
11151 * linux-low.c (linux_remove_process): Delete.
11152 (add_lwp): Don't set last_resume_kind here.
11153 (linux_kill): Use `mourn'.
11154 (linux_detach): Use `thread_db_detach', and `mourn'.
11155 (linux_mourn): New.
11156 (linux_attach_lwp_1): Adjust comment.
11157 (linux_attach): last_resume_kind moved the thread_info; adjust.
11158 (status_pending_p_callback): Adjust.
11159 (linux_wait_for_event_1): Adjust.
11160 (count_events_callback, select_singlestep_lwp_callback)
11161 (select_event_lwp_callback, cancel_breakpoints_callback)
11162 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11163 (proceed_one_lwp): Adjust.
11164 (linux_async): Add debug output.
11165 (linux_thread_stopped): New.
11166 (linux_pause_all): New.
11167 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11168 linux_pause_all.
11169 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11170 (thread_db_free): Delete declaration.
11171 (thread_db_detach, thread_db_mourn): Declare.
11172 * thread-db.c (thread_db_init): Use thread_db_mourn.
11173 (thread_db_free): Delete, split in two.
11174 (disable_thread_event_reporting): New.
11175 (thread_db_detach): New.
11176 (thread_db_mourn): New.
11177
11178 * server.h (struct thread_info) <last_resume_kind>: New field.
11179 <attached>: Add comment.
11180 <gdb_detached>: New field.
11181 (handler_func): Change return type to int.
11182 (handle_serial_event, handle_target_event): Ditto.
11183 (gdb_connected): Declare.
11184 (tracing): Delete.
11185 (disconnected_tracing): Declare.
11186 (stop_tracing): Declare.
11187
11188 * server.c (handle_query) <qSupported>: Report support for
11189 disconnected tracing.
11190 (queue_stop_reply_callback): Account for running threads.
11191 (gdb_wants_thread_stopped): New.
11192 (gdb_wants_all_threads_stopped): New.
11193 (gdb_reattached_process): New.
11194 (handle_status): Clear the `gdb_detached' flag of all processes.
11195 In all-stop, stop all threads.
11196 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11197 (process_serial_event): If the remote connection breaks, or if an
11198 exit was forced with "monitor exit", force an event loop exit.
11199 Handle disconnected tracing on detach.
11200 (handle_serial_event): Adjust.
11201 (handle_target_event): If GDB isn't connected, forward events back
11202 to the inferior, unless the last process exited, in which case,
11203 exit gdbserver. Adjust interface.
11204
11205 * remote-utils.c (remote_open): Don't block in accept. Instead
11206 register an event loop source on the listen socket file
11207 descriptor. Refactor bits into ...
11208 (listen_desc): ... this new global.
11209 (gdb_connected): ... this new function.
11210 (enable_async_notification): ... this new function.
11211 (handle_accept_event): ... this new function.
11212 (remote_close): Clear remote_desc.
11213
11214 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11215
11216 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11217 New fields.
11218 (mourn_inferior): Define.
11219 (target_process_qsupported): Avoid the dangling else problem.
11220 (thread_stopped): Define.
11221 (pause_all): Define.
11222 (target_waitstatus_to_string): Declare.
11223 * target.c (target_waitstatus_to_string): New.
11224
11225 * tracepoint.c (tracing): Make extern.
11226 (disconnected_tracing): New.
11227 (stop_tracing): Make extern. Handle tracing stops due to GDB
11228 disconnecting.
11229 (cmd_qtdisconnected): New.
11230 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11231 (handle_tracepoint_general_set): Handle QTDisconnected.
11232
11233 * event-loop.c (event_handler_func): Change return type to int.
11234 (process_event): Bail out if the event handler wants the event
11235 loop to stop.
11236 (handle_file_event): Ditto.
11237 (start_event_loop): Bail out if the event handler wants the event
11238 loop to stop.
11239
11240 * nto-low.c (nto_target_ops): Adjust.
11241 * spu-low.c (spu_wait): Don't remove the process here.
11242 (spu_target_ops): Adjust.
11243 * win32-low.c (win32_wait): Don't remove the process here.
11244 (win32_target_ops): Adjust.
11245
5d267c4c
PA
112462010-04-11 Pedro Alves <pedro@codesourcery.com>
11247
11248 * regcache.c (realloc_register_cache): Invalidate inferior's
11249 regcache before recreating it.
11250
623ccd72
PA
112512010-04-09 Pedro Alves <pedro@codesourcery.com>
11252
11253 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11254
219f2f23
PA
112552010-04-09 Stan Shebs <stan@codesourcery.com>
11256 Pedro Alves <pedro@codesourcery.com>
11257
11258 * server.h (LONGEST): New.
11259 (struct thread_info) <while_stepping>: New field.
11260 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11261 Declare.
11262 (initialize_tracepoint, handle_tracepoint_general_set)
11263 (handle_tracepoint_query, tracepoint_finished_step)
11264 (tracepoint_was_hit, release_while_stepping_state_list):
11265 (current_traceframe): Declare.
11266 * server.c (handle_general_set): Handle tracepoint packets.
11267 (read_memory): New.
11268 (write_memory): New.
11269 (handle_search_memory_1): Use read_memory.
11270 (handle_query): Report support for conditional tracepoints, trace
11271 state variables, and tracepoint sources. Handle tracepoint
11272 queries.
11273 (main): Initialize the tracepoints module.
11274 (process_serial_event): Handle traceframe reads/writes.
11275
11276 * linux-low.c (handle_tracepoints): New.
11277 (linux_wait_1): Call it.
11278 (linux_resume_one_lwp): Handle while-stepping.
11279 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11280 (linux_target_ops): Install them.
11281 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11282 New field.
11283 * linux-x86-low.c (x86_supports_tracepoints): New.
11284 (the_low_target). Install it.
11285
11286 * mem-break.h (delete_breakpoint): Declare.
11287 * mem-break.c (delete_breakpoint): Make external.
11288
11289 * target.h (struct target_ops): Add `supports_tracepoints',
11290 `read_pc', and `write_pc' fields.
11291 (target_supports_tracepoints): Define.
11292 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11293 (phex_nz): New.
11294
11295 * regcache.h (struct regcache) <registers_owned>: New field.
11296 (init_register_cache, regcache_cpy): Declare.
11297 (regcache_read_pc, regcache_write_pc): Declare.
11298 (register_cache_size): Declare.
11299 (supply_regblock): Declare.
11300 * regcache.c (init_register_cache): New.
11301 (new_register_cache): Use it.
11302 (regcache_cpy): New.
11303 (register_cache_size): New.
11304 (supply_regblock): New.
11305 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11306
219f2f23
PA
11307 * tracepoint.c: New.
11308
11309 * Makefile.in (OBS): Add tracepoint.o.
11310 (tracepoint.o): New rule.
11311
3a13a53b
L
113122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11313
11314 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11315 (i386-mmx.o): New.
11316 (i386-mmx.c): Likewise.
11317 (i386-mmx-linux.o): Likewise.
11318 (i386-mmx-linux.c): Likewise.
11319
11320 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11321 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11322 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11323 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11324
11325 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11326 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11327 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11328
1570b33e
L
113292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11330
11331 * Makefile.in (clean): Updated.
11332 (i386-avx.o): New.
11333 (i386-avx.c): Likewise.
11334 (i386-avx-linux.o): Likewise.
11335 (i386-avx-linux.c): Likewise.
11336 (amd64-avx.o): Likewise.
11337 (amd64-avx.c): Likewise.
11338 (amd64-avx-linux.o): Likewise.
11339 (amd64-avx-linux.c): Likewise.
11340
11341 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11342 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11343 (srv_amd64_regobj): Add amd64-avx.o.
11344 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11345 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11346 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11347 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11348 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11349 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11350 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11351
11352 * i387-fp.c: Include "i386-xstate.h".
11353 (i387_xsave): New.
11354 (i387_cache_to_xsave): Likewise.
11355 (i387_xsave_to_cache): Likewise.
11356 (x86_xcr0): Likewise.
11357
11358 * i387-fp.h (i387_cache_to_xsave): Likewise.
11359 (i387_xsave_to_cache): Likewise.
11360 (x86_xcr0): Likewise.
11361
11362 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11363 * linux-crisv32-low.c (target_regsets): Likewise.
11364 * linux-m68k-low.c (target_regsets): Likewise.
11365 * linux-mips-low.c (target_regsets): Likewise.
11366 * linux-ppc-low.c (target_regsets): Likewise.
11367 * linux-s390-low.c (target_regsets): Likewise.
11368 * linux-sh-low.c (target_regsets): Likewise.
11369 * linux-sparc-low.c (target_regsets): Likewise.
11370 * linux-xtensa-low.c (target_regsets): Likewise.
11371
11372 * linux-low.c: Include <sys/uio.h>.
11373 (regsets_fetch_inferior_registers): Support nt_type.
11374 (regsets_store_inferior_registers): Likewise.
11375 (linux_process_qsupported): New.
11376 (linux_target_ops): Add linux_process_qsupported.
11377
11378 * linux-low.h (regset_info): Add nt_type.
11379 (linux_target_ops): Add process_qsupported.
11380
11381 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11382 and <sys/uio.h>.
11383 (init_registers_i386_avx_linux): New.
11384 (init_registers_amd64_avx_linux): Likewise.
11385 (xmltarget_i386_linux_no_xml): Likewise.
11386 (xmltarget_amd64_linux_no_xml): Likewise.
11387 (PTRACE_GETREGSET): Likewise.
11388 (PTRACE_SETREGSET): Likewise.
11389 (x86_fill_xstateregset): Likewise.
11390 (x86_store_xstateregset): Likewise.
11391 (use_xml): Likewise.
11392 (x86_linux_update_xmltarget): Likewise.
11393 (x86_linux_process_qsupported): Likewise.
11394 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11395 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11396 init_registers_i386_linux here. Call
11397 x86_linux_update_xmltarget.
11398 (the_low_target): Add x86_linux_process_qsupported.
11399
11400 * server.c (handle_query): Call target_process_qsupported.
11401
11402 * target.h (target_ops): Add process_qsupported.
11403 (target_process_qsupported): New.
11404
fc7238bb
PA
114052010-04-03 Pedro Alves <pedro@codesourcery.com>
11406
11407 * inferiors.c (add_thread): Set last_status kind to
11408 TARGET_WAITKIND_IGNORE.
11409 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11410 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11411 (linux_wait_1): Move `thread' local definition to block that uses
11412 it. Don't NULL initialize `event_child'.
11413 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11414 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11415 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11416
bdabb078
PA
114172010-04-01 Pedro Alves <pedro@codesourcery.com>
11418
11419 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11420 an extended waitstatus, or by a watchpoint.
11421 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11422 thread was stepping or has been stopped by a watchpoint.
11423
d3bbe7a0
PA
114242010-04-01 Pedro Alves <pedro@codesourcery.com>
11425
11426 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11427 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11428 of another, then delete the previous, and validate all
11429 breakpoints.
11430 (validate_inserted_breakpoint): New.
11431 (delete_disabled_breakpoints): New.
11432 (validate_breakpoints): New.
11433 (check_mem_read): Validate breakpoints before trusting their
11434 shadow. Delete disabled breakpoints.
11435 (check_mem_write): Validate breakpoints before trusting they
11436 should be inserted. Delete disabled breakpoints.
11437 * mem-break.h (validate_breakpoints):
11438 * server.c (handle_query): Validate breakpoints when we see a
11439 qSymbol query.
11440
8b07ae33
PA
114412010-04-01 Pedro Alves <pedro@codesourcery.com>
11442
11443 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11444 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11445 if we could tell there's a GDB breakpoint at stop_pc.
11446 (need_step_over_p): Don't do a step over if we find a GDB
11447 breakpoint at the resume PC.
11448
11449 * mem-break.c (struct raw_breakpoint): New.
11450 (enum bkpt_type): New type `gdb_breakpoint'.
11451 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11452 fields. New field `raw'.
11453 (find_raw_breakpoint_at): New.
11454 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11455 breakpoint instead.
11456 (set_breakpoint_at): Adjust.
11457 (delete_raw_breakpoint): New.
11458 (release_breakpoint): New.
11459 (delete_breakpoint): Rename to...
11460 (delete_breakpoint_1): ... this. Add proc parameter. Use
11461 release_breakpoint. Return ENOENT.
11462 (delete_breakpoint): Reimplement.
11463 (find_breakpoint_at): Delete.
11464 (find_gdb_breakpoint_at): New.
11465 (delete_breakpoint_at): Delete.
11466 (set_gdb_breakpoint_at): New.
11467 (delete_gdb_breakpoint_at): New.
11468 (gdb_breakpoint_here): New.
11469 (set_reinsert_breakpoint): Use release_breakpoint.
11470 (uninsert_breakpoint): Rename to ...
11471 (uninsert_raw_breakpoint): ... this.
11472 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11473 (reinsert_raw_breakpoint): Change parameter type to
11474 raw_breakpoint.
11475 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11476 instead.
11477 (check_breakpoints): Adjust. Use release_breakpoint.
11478 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11479 (breakpoint_inserted_here): Ditto.
11480 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11481 Don't trust the breakpoint's shadow if it is not inserted.
11482 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11483 (delete_all_breakpoints): Adjust.
11484 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11485 use delete_breakpoint_1.
11486
11487 * mem-break.h (breakpoints_supported): Delete declaration.
11488 (set_gdb_breakpoint_at): Declare.
11489 (gdb_breakpoint_here): Declare.
11490 (delete_breakpoint_at): Delete.
11491 (delete_gdb_breakpoint_at): Declare.
11492
11493 * server.h (struct raw_breakpoint): Forward declare.
11494 (struct process_info): New field `raw_breakpoints'.
11495
11496 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11497 breakpoints.
11498
6bf5e0ba
PA
114992010-03-24 Pedro Alves <pedro@codesourcery.com>
11500
11501 * linux-low.c (status_pending_p_callback): Fix comment.
11502 (linux_wait_for_event_1): Move most of the internal breakpoint
11503 handling from here...
11504 (linux_wait_1): ... to here.
11505 (count_events_callback): New.
11506 (select_singlestep_lwp_callback): New.
11507 (select_event_lwp_callback): New.
11508 (cancel_breakpoints_callback): New.
11509 (select_event_lwp): New.
11510 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11511 priority to all LWPs that have had events that should be reported
11512 to the client. Cancel breakpoints when about to reporting the
11513 event to the client, not while stopping lwps. No longer cancel
11514 finished single-steps here.
11515 (cancel_finished_single_step): Delete.
11516 (cancel_finished_single_steps): Delete.
11517
414a389f
PA
115182010-03-24 Pedro Alves <pedro@codesourcery.com>
11519
11520 * mem-break.c (enum bkpt_type): New.
11521 (struct breakpoint): New field `type'.
11522 (set_breakpoint_at): Change return type to struct breakpoint
11523 pointer. Set type to `other_breakpoint' by default.
11524 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11525 in the breakpoint list.
11526 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11527 (reinsert_breakpoint): Rename to ...
11528 (reinsert_raw_breakpoint): ... this.
11529 (reinsert_breakpoints_at): Adjust.
11530 * mem-break.h (struct breakpoint): Declare.
11531 (set_breakpoint_at): Change return type to struct breakpoint
11532 pointer.
11533
2280c721
PA
115342010-03-24 Pedro Alves <pedro@codesourcery.com>
11535
11536 * server.c (handle_query): Assign, not compare.
11537
d50171e4
PA
115382010-03-24 Pedro Alves <pedro@codesourcery.com>
11539
11540 Teach linux gdbserver to step-over-breakpoints.
11541
11542 * linux-low.c (can_hardware_single_step): New.
11543 (supports_breakpoints): New.
11544 (handle_extended_wait): If stopping threads, read the stop pc of
11545 the new cloned LWP.
11546 (get_pc): New.
11547 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11548 low target doesn't support retrieving the PC.
11549 (add_lwp): Set last_resume_kind to resume_continue.
11550 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11551 (linux_attach): Don't clear stop_expected. Set the lwp's
11552 last_resume_kind to resume_stop.
11553 (linux_detach_one_lwp): Don't check for removed breakpoints.
11554 (check_removed_breakpoint): Delete.
11555 (status_pending_p): Rename to ...
11556 (status_pending_p_callback): ... this. Don't check for removed
11557 breakpoints. Don't consider threads that are stopped from GDB's
11558 perspective.
11559 (linux_wait_for_lwp): Always read the stop_pc here.
11560 (cancel_breakpoint): New.
11561 (step_over_bkpt): New global.
11562 (linux_wait_for_event_1): Implement stepping over breakpoints.
11563 (gdb_wants_lwp_stopped): New.
11564 (gdb_wants_all_stopped): New.
11565 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11566 single-step traps here. Store the thread's last reported target
11567 wait status.
11568 (send_sigstop): Don't clear stop_expected. Always set it,
11569 instead.
11570 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11571 (cancel_finished_single_step): New.
11572 (cancel_finished_single_steps): New.
11573 (wait_for_sigstop): Don't cancel finished single-step traps here.
11574 (linux_resume_one_lwp): Don't check for removed breakpoints.
11575 Don't set `step' on non-hardware step archs.
11576 (linux_set_resume_request): Ignore resume_stop requests if already
11577 stopping or stopped. Set the lwp's last_resume_kind.
11578 (resume_status_pending_p): Don't check for removed breakpoints.
11579 (need_step_over_p): New.
11580 (start_step_over): New.
11581 (finish_step_over): New.
11582 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11583 requests. Clear the thread's last reported target waitstatus.
11584 Don't use the `suspended' flag. Don't consider pending breakpoints.
11585 (linux_resume): Start a step-over if necessary.
11586 (proceed_one_lwp): New.
11587 (proceed_all_lwps): New.
11588 (unstop_all_lwps): New.
11589 * linux-low.h (struct lwp_info): Rewrite comment for the
11590 `suspended' flag. Add the `stop_pc' field. Delete the
11591 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11592 Add `'last_resume_kind' and `need_step_over' fields.
11593 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11594 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11595 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11596 (set_raw_breakpoint_at): New.
11597 (set_breakpoint_at): Rewrite to use it.
11598 (reinsert_breakpoint_handler): Delete.
11599 (set_reinsert_breakpoint): New.
11600 (reinsert_breakpoint_by_bp): Delete.
11601 (delete_reinsert_breakpoints): New.
11602 (uninsert_breakpoint): Rewrite.
11603 (uninsert_breakpoints_at): New.
11604 (reinsert_breakpoint): Rewrite.
11605 (reinsert_breakpoints_at): New.
11606 (check_breakpoints): Rewrite.
11607 (breakpoint_here): New.
11608 (breakpoint_inserted_here): New.
11609 (check_mem_read): Adjust.
11610 * mem-break.h (breakpoints_supported, breakpoint_here)
11611 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11612 (reinsert_breakpoint_by_bp): Delete declaration.
11613 (delete_reinsert_breakpoints): Declare.
11614 (reinsert_breakpoint): Delete declaration.
11615 (reinsert_breakpoints_at): Declare.
11616 (uninsert_breakpoint): Delete declaration.
11617 (uninsert_breakpoints_at): Declare.
11618 (check_breakpoints): Adjust prototype.
11619 * server.h: Adjust include order.
11620 (struct thread_info): Declare here. Add a `last_status' field.
11621
30ba68cb
MS
116222010-03-23 Michael Snyder <msnyder@vmware.com>
11623
11624 * server.c (crc32): New function.
11625 (handle_query): Add handling for 'qCRC:' request.
11626
b9a881c2
PA
116272010-03-23 Pedro Alves <pedro@codesourcery.com>
11628
11629 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11630 lwp had been stopped by a watchpoint.
11631
e92d13d5
PA
116322010-03-16 Pedro Alves <pedro@codesourcery.com>
11633
11634 * server.h (internal_error): Declare.
11635 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11636 * utils.c (internal_error): New function.
11637
64daa791
AS
116382010-03-15 Andreas Schwab <schwab@redhat.com>
11639
11640 * configure.srv: Fix typo setting srv_regobj.
11641
f52cd8cd
PA
116422010-03-15 Pedro Alves <pedro@codesourcery.com>
11643
11644 * linux-low.c (fetch_register): Avoid passing a non string literal
11645 format to `error'.
11646 (usr_store_inferior_registers): Ditto.
11647
93ae6fdc
PA
116482010-03-14 Pedro Alves <pedro@codesourcery.com>
11649
11650 * linux-low.c (linux_write_memory): Bail out early if peeking
11651 memory failed.
11652
c3adc08c
PA
116532010-03-14 Pedro Alves <pedro@codesourcery.com>
11654
11655 * linux-low.h (struct lwp_info): New fields
11656 `stopped_by_watchpoint' and `stopped_data_address'.
11657 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11658 here, and cache them in the lwp object.
11659 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11660 directly.
11661 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11662 field.
11663 (linux_stopped_by_watchpoint): Rewrite.
11664 (linux_stopped_data_address): Rewrite.
11665
bce522a2
PA
116662010-03-06 Simo Melenius <simo.melenius@iki.fi>
11667
11668 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11669 switching the current inferior, not before.
11670
90884b2b
L
116712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11672
11673 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11674 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11675 i386-linux.c and amd64-linux.c.
11676 (reg-i386.o): Removed.
11677 (reg-i386.c): Likewise.
11678 (reg-i386-linux.o): Likewise.
11679 (reg-i386-linux.c): Likewise.
11680 (reg-x86-64.o): Likewise.
11681 (reg-x86-64.c): Likewise.
11682 (reg-x86-64-linux.o): Likewise.
11683 (reg-x86-64-linux.c): Likewise.
11684 (i386.o): New.
11685 (i386.c): Likewise.
11686 (i386-linux.o): Likewise.
11687 (i386-linux.c): Likewise.
11688 (amd64.o): Likewise.
11689 (amd64.c): Likewise.
11690 (amd64-linux.o): Likewise.
11691 (amd64-linux.c): Likewise.
11692
11693 * configure.srv (srv_i386_regobj): New.
11694 (srv_i386_linux_regobj): Likewise.
11695 (srv_amd64_regobj): Likewise.
11696 (srv_amd64_linux_regobj): Likewise.
11697 (srv_i386_32bit_xmlfiles): Likewise.
11698 (srv_i386_64bit_xmlfiles): Likewise.
11699 (srv_i386_xmlfiles): Likewise.
11700 (srv_amd64_xmlfiles): Likewise.
11701 (srv_i386_linux_xmlfiles): Likewise.
11702 (srv_amd64_linux_xmlfiles): Likewise.
11703 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11704 srv_xmlfiles to $srv_i386_xmlfiles.
11705 (i[34567]86-*-mingw32ce*): Likewise.
11706 (i[34567]86-*-mingw*): Likewise.
11707 (i[34567]86-*-nto*): Likewise.
11708 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11709 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11710 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11711 (x86_64-*-linux*): Likewise.
11712
11713 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11714 (init_registers_amd64_linux): New.
11715 (x86_arch_setup): Replace init_registers_x86_64_linux with
11716 init_registers_amd64_linux.
11717
193f13e6
MK
117182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11719
11720 * configure.ac: Check for libdl. If it is not available link against
11721 static libthread_db.
11722 * configure: Regenerate.
11723
85d721b8
PA
117242010-02-22 Pedro Alves <pedro@codesourcery.com>
11725
11726 PR9605
11727
11728 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11729 handing a read watchpoint.
11730 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11731
6076632b
DE
117322010-02-12 Doug Evans <dje@google.com>
11733
11734 * linux-low.c (linux_supports_tracefork_flag): Document.
11735 (linux_look_up_symbols): Add comment.
11736
3327ccf7
L
117372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11738
11739 * regcache.c (supply_register): Clear regcache if buf is NULL.
11740
0718675c 117412010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11742 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11743
11744 * inferiors.c (find_inferior): Add function documentation.
11745 (unloaded_dll): Handle the case where the unloaded dll has not
11746 been previously registered in the dll list.
11747
177321bd
DJ
117482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11751 (thumb2_breakpoint): New.
11752 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11753
2b009048
DJ
117542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11755
11756 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11757 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11758 breakpoints.
11759
3be029c7
PA
117602010-01-21 Pedro Alves <pedro@codesourcery.com>
11761
11762 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11763
18f5de3b
JK
117642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11765
11766 * linux-s390-low.c (s390_collect_ptrace_register)
11767 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11768
3743bb4f
DE
117692010-01-21 Doug Evans <dje@google.com>
11770
14ce3065
DE
11771 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11772 (PTRACE_ARG4_TYPE): New macro.
11773 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11774 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11775 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11776 (usr_store_inferior_registers): Ditto.
11777 (linux_read_memory, linux_write_memory): Ditto.
11778 (linux_test_for_tracefork): Ditto.
11779
3743bb4f
DE
11780 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11781 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11782
8b315be5
PA
117832010-01-21 Pedro Alves <pedro@codesourcery.com>
11784
11785 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11786 target.
11787
85492558
PA
117882010-01-21 Pedro Alves <pedro@codesourcery.com>
11789
11790 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11791 prototype to take a regcache. Adjust.
11792
442ea881
PA
117932010-01-20 Pedro Alves <pedro@codesourcery.com>
11794
11795 * regcache.h (struct thread_info): Forward declare.
11796 (struct regcache): New.
11797 (new_register_cache): Adjust prototype.
11798 (get_thread_regcache): Declare.
11799 (free_register_cache): Adjust prototype.
11800 (registers_to_string, registers_from_string): Ditto.
11801 (supply_register, supply_register_by_name, collect_register)
11802 (collect_register_as_string, collect_register_by_name): Ditto.
11803 * regcache.c (struct inferior_regcache_data): Delete.
11804 (get_regcache): Rename to ...
11805 (get_thread_regcache): ... this. Adjust. Switch inferior before
11806 fetching registers.
11807 (regcache_invalidate_one): Adjust.
11808 (regcache_invalidate): Fix prototype.
11809 (new_register_cache): Return the new register cache.
11810 (free_register_cache): Change prototype.
11811 (realloc_register_cache): Adjust.
11812 (registers_to_string): Change prototype to take a regcache. Adjust.
11813 (registers_from_string): Ditto.
11814 (register_data): Ditto.
11815 (supply_register): Ditto.
11816 (supply_register_by_name): Ditto.
11817 (collect_register): Ditto.
11818 (collect_register_as_string): Ditto.
11819 (collect_register_by_name): Ditto.
11820 * server.c (process_serial_event): Adjust.
11821 * linux-low.h (regset_fill_func, regset_store_func): Change
11822 prototype.
11823 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11824 Change prototype.
11825 * linux-low.c (get_stop_pc): Adjust.
11826 (check_removed_breakpoint): Adjust.
11827 (linux_wait_for_event): Adjust.
11828 (linux_resume_one_lwp): Adjust.
11829 (fetch_register): Add regcache parameter. Adjust.
11830 (usr_store_inferior_registers): Ditto.
11831 (regsets_fetch_inferior_registers): Ditto.
11832 (regsets_store_inferior_registers): Ditto.
11833 (linux_fetch_registers, linux_store_registers): Ditto.
11834 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11835 regcache. Adjust.
43aaf8b6
PA
11836 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11837 Ditto.
442ea881
PA
11838 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11839 prototype to take a regcache.
11840 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11841 * remote-utils.c (convert_ascii_to_int, outreg)
11842 (prepare_resume_reply): Change prototype to take a regcache.
11843 Adjust.
11844 * target.h (struct target_ops) <fetch_registers, store_registers>:
11845 Change prototype to take a regcache.
11846 (fetch_inferior_registers, store_inferior_registers): Change
11847 prototype to take a regcache. Adjust.
11848 * proc-service.c (ps_lgetregs): Adjust.
11849 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11850 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11851 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11852 take a regcache. Adjust.
11853 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11854 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11855 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11856 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11857 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11858 (cris_cannot_fetch_register):
11859 (cris_breakpoint_at): Change prototype to take a regcache.
11860 Adjust.
11861 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11862 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11863 to take a regcache. Adjust.
11864 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11865 Adjust.
11866 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11867 take a regcache. Adjust.
11868 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11869 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11870 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11871 * linux-mips-low.c (mips_get_pc):
11872 (mips_set_pc): Change prototype to take a regcache. Adjust.
11873 (mips_reinsert_addr): Adjust.
11874 (mips_collect_register): Change prototype to take a regcache.
11875 Adjust.
11876 (mips_supply_register):
11877 (mips_collect_register_32bit, mips_supply_register_32bit)
11878 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11879 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11880 * linux-ppc-low.c (ppc_supply_ptrace_register)
11881 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11882 (parse_spufs_run): Adjust.
11883 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11884 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11885 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11886 take a regcache. Adjust.
11887 * linux-s390-low.c (s390_collect_ptrace_register)
11888 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11889 (s390_set_pc): Change prototype to take a regcache. Adjust.
11890 (s390_arch_setup): Adjust.
11891 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11892 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11893 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11894 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11895 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11896 regcache. Adjust.
11897 (sparc_breakpoint_at): Adjust.
11898 * linux-xtensa-low.c (xtensa_fill_gregset):
11899 (xtensa_store_gregset):
11900 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11901 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11902 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11903 prototype to take a regcache. Adjust.
11904 * win32-arm-low.c (arm_fetch_inferior_register)
11905 (arm_store_inferior_register): Change prototype to take a
11906 regcache. Adjust.
11907 * win32-i386-low.c (i386_fetch_inferior_register)
11908 (i386_store_inferior_register): Change prototype to take a
11909 regcache. Adjust.
11910 * win32-low.c (child_fetch_inferior_registers)
11911 (child_store_inferior_registers): Change prototype to take a
11912 regcache. Adjust.
11913 (win32_wait): Adjust.
11914 (win32_fetch_inferior_registers): Change prototype to take a
11915 regcache. Adjust.
11916 (win32_store_inferior_registers): Adjust.
11917 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11918 store_inferior_register>: Change prototype to take a regcache.
11919
60c3d7b0
DE
119202010-01-20 Doug Evans <dje@google.com>
11921
11922 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11923 #ifdef.
11924 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11925 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11926
dc146f7c
VP
119272010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11928
11929 * linux-low.c (linux_core_of_thread): New.
11930 (compare_ints, show_process, list_threads): New.
11931 (linux_qxfer_osdata): Report threads and cores.
11932 (linux_target_op): Register linux_core_of_thread.
11933 * remote-utils.c (prepare_resume_reply): Report the core.
11934 (buffer_xml_printf): Support %d specifier.
11935 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11936 New.
11937 (handle_query): Handle qXfer:threads. Announce availability
11938 thereof.
11939 * target.h (struct target_ops): New field core_of_thread.
11940
7803799a
UW
119412010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11942
11943 * Makefile.in (clean): Remove new generated files.
11944 (reg-s390.o, reg-s390.c): Remove rules.
11945 (reg-s390x.o, reg-s390x.c): Likewise.
11946 (s390-linux32.o, s390-linux32.c): Add rules.
11947 (s390-linux64.o, s390-linux64.c): Likewise.
11948 (s390x-linux64.o, s390x-linux64.c): Likewise.
11949 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11950 * linux-s390-low.c: Include <elf.h>.
11951 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11952 (init_registers_s390): Remove prototype.
11953 (init_registers_s390x): Likewise.
11954 (init_registers_s390_linux32): Add prototype.
11955 (init_registers_s390_linux64): Likewise.
11956 (init_registers_s390x_linux64): Likewise.
11957 (s390_num_regs_3264): New define.
11958 (s390_regmap_3264): New global variable.
11959 (s390_cannot_fetch_register): Remove obsolete check.
11960 (s390_cannot_store_register): Likewise.
11961 (s390_collect_ptrace_register): Handle upper/lower register halves.
11962 (s390_supply_ptrace_register): Likewise.
11963 (s390_fill_gregset): Update to register number changes.
11964 (s390_get_hwcap): New routine.
11965 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11966 Install appropriate regmap and register set.
11967
6e7ffa39
JB
119682010-01-01 Joel Brobecker <brobecker@adacore.com>
11969
11970 * server.c (gdbserver_version): Update copyright year to 2010.
11971 * gdbreplay.c (gdbreplay_version): Likewise.
11972
957f3f49
DE
119732009-12-28 Doug Evans <dje@google.com>
11974
11975 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11976 elf/external.h. Include <elf.h> instead but only if necessary.
11977
ca5c370d
PA
119782009-12-28 Pedro Alves <pedro@codesourcery.com>
11979
11980 * linux-low.c (linux_remove_process): Remove `detaching'
11981 parameter. Don't release/detach from thread_db here.
11982 (linux_kill): Release/detach from thread_db here, ...
11983 (linux_detach): ... and here, before actually detaching.
11984 (linux_wait_1): ... and here, when a process exits.
11985 * thread-db.c (any_thread_of): New.
11986 (thread_db_free): Switch the current inferior to a thread of the
11987 passed in process.
11988
4ee62156
DE
119892009-12-21 Doug Evans <dje@google.com>
11990
d90e6a88
DE
11991 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11992
c5f62d5f
DE
11993 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11994 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11995 warning ifndef __NR_tkill. Move setting of errno there too.
11996 Delete unnecessary resetting of errno after syscall.
11997 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11998
10e86dd7
DE
11999 * configure.ac: Check for dladdr.
12000 * config.in: Regenerate.
12001 * configure: Regenerate.
12002 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12003 (try_thread_db_load): Update.
12004
4ee62156
DE
12005 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12006
00f515da
DE
120072009-12-18 Doug Evans <dje@google.com>
12008
e9464885
DE
12009 * event-loop.c: Include unistd.h if it exists.
12010
07d4f67e
DE
12011 * linux-low.c (my_waitpid): Move definition away from being in
12012 between linux_tracefork_child/linux_test_for_tracefork.
12013
00f515da
DE
12014 * gdb_proc_service.h (psaddr_t): Fix type.
12015 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12016 signature to match glibc.
12017
1de1badb
DE
120182009-12-16 Doug Evans <dje@google.com>
12019
12020 * linux-low.c (linux_read_memory): Fix argument to read.
12021
aeeb81d1
PA
120222009-11-26 Pedro Alves <pedro@codesourcery.com>
12023
12024 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12025 events, don't leave current_inferior pointing at null.
12026
10357975
PA
120272009-11-26 Pedro Alves <pedro@codesourcery.com>
12028
12029 * win32-low.c (LOG): Delete.
12030 (OUTMSG): Output to stderr.
12031 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12032 on compile time LOG macro.
12033 (win32_wait): Fix debug output.
12034
cf6e3471
PA
120352009-11-26 Pedro Alves <pedro@codesourcery.com>
12036
12037 * win32-low.c (win32_add_one_solib): If the dll name is
12038 "ntdll.dll", prepend the system directory to the dll path.
12039
0c85e18e
MK
120402009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12041
12042 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12043
9ac544ce 120442009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12045 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12046
12047 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12048 * configure.ac: Check for __mcoldfire__ and set
12049 gdb_cv_m68k_is_coldfire.
12050 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12051 reg-cf.o and reg-m68k.o.
12052 * configure: Regenerated.
12053
fd7dd3e6
PA
120542009-11-16 Pedro Alves <pedro@codesourcery.com>
12055
12056 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12057 Pass it to thread_db_free.
12058 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12059 proper `detaching' argument to linux_remove_process.
12060 * linux-low.h (thread_db_free): Add `detaching' parameter.
12061 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12062 to thread_db_free.
12063 (thread_db_free): Add `detaching' parameter. Only
12064 call td_ta_clear_event if detaching from process.
12065
75aa492e
MK
120662009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12067
12068 * thread-db.c (thread_db_free): Fix typo.
12069
21e1bee4
PP
120702009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12071
12072 PR gdb/10838
12073 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12074
8838b45e
NS
120752009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12076
12077 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12078 with an i686 compiler.
12079 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12080 needed.
12081 * configure: Rebuilt.
12082
8a35fb51
SL
120832009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12084
12085 PR gdb/10783
12086
12087 * server.c (handle_search_memory_1): Correct read_addr initialization
12088 in loop for searching subsequent chunks.
12089
96f15937
PP
120902009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12091
12092 * configure.ac: New --with-libthread-db option.
12093 * thread-db.c: Allow direct dependence on libthread_db.
12094 (thread_db_free): Adjust.
12095 * config.in: Regenerate.
12096 * configure: Likewise.
889bf7c5 12097
5f7d1694
PP
120982009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12099
12100 PR gdb/10757
12101 * thread-db.c (attach_thread): New function.
12102 (maybe_attach_thread): Return success/failure.
12103 (find_new_threads_callback): Adjust.
889bf7c5
PA
12104 (thread_db_find_new_threads): Loop until no new threads.
12105
88e3b899
PA
121062009-10-13 Pedro Alves <pedro@codesourcery.com>
12107
12108 * proc-service.c (ps_lgetregs): Formatting.
12109
cdbfd419
PP
121102009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12111
12112 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12113 * configure.ac: Adjust.
12114 * linux-low.h (struct process_info_private): Move members to struct
12115 thread_db.
12116 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12117 * linux-low.c (linux_remove_process): Adjust.
12118 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12119 * server.c (handle_query): Move code ...
12120 (handle_monitor_command): ... here. New function.
12121 * target.h (struct target_ops): New member.
12122 * thread-db.c (struct thread_db): New.
12123 (libthread_db_search_path): New variable.
12124 (thread_db_create_event, thread_db_enable_reporting)
12125 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12126 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12127 (try_thread_db_load_1, dladdr_to_soname): New functions.
12128 (try_thread_db_load, thread_db_load_search): New functions.
12129 (thread_db_init): Search for libthread_db.
12130 (thread_db_free): New function.
12131 (thread_db_handle_monitor_command): Likewise.
12132 * config.in: Regenerate.
12133 * configure: Regenerate.
889bf7c5 12134
4168d2d6
UW
121352009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12136
12137 * spu-low.c (spu_kill): Wait for inferior to terminate.
12138 Call clear_inferiors.
12139 (spu_detach): Call clear_inferiors.
12140
81ecdfbb
RW
121412009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12142
12143 * aclocal.m4: Regenerate.
12144 * config.in: Likewise.
12145 * configure: Likewise.
12146
0b9ff2c0
UW
121472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12148
12149 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12150 (parse_spufs_run): New function.
12151 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12152 (ppc_breakpoint_at): Handle SPU breakpoints.
12153
efcbbd14
UW
121542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12155
12156 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12157 (SPUFS_MAGIC): Define.
12158 (spu_enumerate_spu_ids): New function.
12159 (linux_qxfer_spu): New function.
12160 (linux_target_ops): Install linux_qxfer_spu.
12161
f4d9bade
UW
121622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12163
12164 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12165 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12166 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12167 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12168 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12169 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12170 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12171 (init_registers_powerpc_cell32l): Add prototype.
12172 (init_registers_powerpc_cell64l): Likewise.
12173 (ppc_arch_setup): Detect Cell/B.E. architecture.
12174
96e946ca
RW
121752009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12176
12177 * Makefile.in (datarootdir): New variable.
12178
58d6951d
DJ
121792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12180
12181 * linux-low.c (linux_write_memory): Update debugging output.
12182 * Makefile.in (clean): Add new descriptions.
12183 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12184 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12185 * configure.srv: Add new files for arm*-*-linux*.
12186 * linux-arm-low.c: Add new declarations.
12187 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12188 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12189 (HWCAP_VFPv3D16): New.
12190 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12191 instead of __IWMMXT__.
12192 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12193 (arm_arch_setup): New.
12194 (target_regsets): Remove #ifdef. Add VFP regset.
12195 (the_low_target): Use arm_arch_setup.
12196
12b42a12
DJ
121972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12198
12199 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12200 the main thread again.
12201
ac8c974e
AR
122022009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12203
12204 Adding Neutrino gdbserver.
12205 * configure: Regenerated.
12206 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12207 * configure.srv (i[34567]86-*-nto*): New target.
12208 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12209 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12210 (nto_comctrl) [__QNX__]: New function.
12211 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12212
4424e0c3 122132009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12214
12215 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12216 srv_tgtobj.
12217
912cf4ba
PA
122182009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12219 Pedro Alves <pedro@codesourcery.com>
12220
12221 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12222 don't support CONTEXT_EXTENDED_REGISTERS.
12223 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12224 (the_low_target): Install them.
12225 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12226 failing with ERROR_PIPE_NOT_CONNECTED.
12227
aa5ca48f
DE
122282009-06-30 Doug Evans <dje@google.com>
12229 Pierre Muller <muller@ics.u-strasbg.fr>
12230
12231 Add h/w watchpoint support to x86-linux, win32-i386.
12232 * Makefile.in (SFILES): Add i386-low.c
12233 (i386_low_h): Define.
12234 (i386-low.o): Add dependencies.
12235 (linux-x86-low.o): Add i386-low.h dependency.
12236 (win32-i386-low.o): Ditto.
12237 * i386-low.c: New file.
12238 * i386-low.h: New file.
12239 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12240 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12241 * linux-low.c (linux_add_process): Initialize arch_private.
12242 (linux_remove_process): Free arch_private.
12243 (add_lwp): Initialize arch_private.
12244 (delete_lwp): Free arch_private.
12245 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12246 provided.
12247 * linux-low.h (process_info_private): New member arch_private.
12248 (lwp_info): New member arch_private.
12249 (linux_target_ops): New members new_process, new_thread,
12250 prepare_to_resume.
12251 (ptid_of): New macro.
12252 * linux-x86-low.c: Include stddef.h, i386-low.h.
12253 (arch_process_info): New struct.
12254 (arch_lwp_info): New struct.
12255 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12256 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12257 (i386_dr_low_get_status): New function.
12258 (x86_insert_point, x86_remove_point): New functions.
12259 (x86_stopped_by_watchpoint): New function.
12260 (x86_stopped_data_address): New function.
12261 (x86_linux_new_process, x86_linux_new_thread): New functions.
12262 (x86_linux_prepare_to_resume): New function.
12263 (the_low_target): Add entries for insert_point, remove_point,
12264 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12265 prepare_to_resume.
12266 * server.c (debug_hw_points): New global.
12267 (monitor_show_help): Document set debug-hw-points.
12268 (handle_query): Process "set debug-hw-points".
12269 * server.h (debug_hw_points): Declare.
12270 (paddress): Declare.
12271 * utils.c (NUMCELLS, CELLSIZE): New macros.
12272 (get_sell, xsnprintf, paddress): New functions.
12273 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12274 remove_point, stopped_by_watchpoint, stopped_data_address.
12275 * win32-i386-low.c: Include i386-low.h.
12276 (debug_reg_state): Replaces dr.
12277 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12278 (i386_dr_low_get_status): New function.
12279 (i386_insert_point, i386_remove_point): New functions.
12280 (i386_stopped_by_watchpoint): New function.
12281 (i386_stopped_data_address): New function.
12282 (i386_initial_stuff): Update.
12283 (get_thread_context,set_thread_context,i386_thread_added): Update.
12284 (the_low_target): Add entries for insert_point,
12285 remove_point, stopped_by_watchpoint, stopped_data_address.
12286 * win32-low.c (win32_insert_watchpoint): New function.
12287 (win32_remove_watchpoint): New function.
12288 (win32_stopped_by_watchpoint): New function.
12289 (win32_stopped_data_address): New function.
12290 (win32_target_ops): Add entries for insert_watchpoint,
12291 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12292 * win32-low.h (win32_target_ops): New members insert_point,
12293 remove_point, stopped_by_watchpoint, stopped_data_address.
12294
d993e290
PA
122952009-06-25 Pedro Alves <pedro@codesourcery.com>
12296
12297 * server.c (process_serial_event): Re-return unsupported, not
12298 error, if the type isn't recognized. Re-allow supporting only
12299 insert or remove packets. Also call require_running for
12300 breakpoints. Add missing break statement to default case. Tidy.
12301 * target.h (struct target_ops): Rename insert_watchpoint to
12302 insert_point, and remove_watchpoint to remove_point.
12303
12304 * linux-low.h (struct linux_target_ops): Likewise.
12305 * linux-low.c (linux_insert_watchpoint): Rename to ...
12306 (linux_insert_point): ... this. Adjust.
12307 (linux_remove_watchpoint): Rename to ...
12308 (linux_remove_point): ... this. Adjust.
12309 (linux_target_ops): Adjust.
12310 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12311 (cris_insert_point): ... this.
12312 (cris_remove_watchpoint): Rename to ...
12313 (cris_remove_point): ... this.
12314 (the_low_target): Adjust.
12315
0f54c268
PM
123162009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12317
12318 * server.c (handle_v_kill): Pass signal_pid to
12319 kill_inferior if multi_process is zero.
12320
c6314022
AR
123212009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12322
12323 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12324 * target.h (target_ops): Comment for *_watchpoint to make it clear
12325 the functions can get types '0' and '1'.
12326
4463ce24
AR
123272009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12328
12329 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12330 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12331 * regcache.c (get_regcache): Likewise.
12332 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12333 * win32-low.c (child_fetch_inferior_registers): Remove check for
12334 regno 0.
12335
cf8fd78b
PA
123362009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12337 Pedro Alves <pedro@codesourcery.com>
12338
12339 * target.h (struct target_ops) <supports_multi_process>: New
12340 callback.
12341 (target_supports_multi_process): New.
12342 * server.c (handle_query): Even if GDB reports support, only
12343 enable multi-process if the target also supports it. Report
12344 multi-process support only if the target backend supports it.
12345 * linux-low.c (linux_supports_multi_process): New function.
12346 (linux_target_ops): Install it as target_supports_multi_process
12347 callback.
12348
47c0c975
DE
123492009-05-24 Doug Evans <dje@google.com>
12350
e09875d4
DE
12351 Global renaming of find_thread_pid to find_thread_ptid.
12352 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12353 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12354 All callers updated.
12355
e27d73f6
DE
12356 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12357 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12358 directly.
12359
47c0c975
DE
12360 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12361 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12362 (linux_resume_one_lwp): Ditto.
12363
2acc282a
DE
123642009-05-23 Doug Evans <dje@google.com>
12365
12366 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12367 from struct inferior_list_entry * to struct lwp_info *.
12368 All callers updated.
12369
9f1036c1
DE
123702009-05-13 Doug Evans <dje@google.com>
12371
12372 * linux-x86-low.c: Don't include assert.h.
12373 (x86_siginfo_fixup): Use fatal, not assert.
12374 (x86_arch_setup): Fix comment.
12375
d0722149
DE
123762009-05-12 Doug Evans <dje@google.com>
12377
12378 Biarch support for i386/amd64 gdbserver.
12379 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12380 Add linux-x86-low.c.
12381 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12382 (linux-x86-low.o): Add.
12383 * linux-x86-64-low.c: Delete.
12384 * linux-i386-low.c: Delete.
12385 * linux-x86-low.c: New file.
12386 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12387 linux-x86-low.o.
12388 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12389 linux-x86-low.o.
12390 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12391 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12392 (linux_child_pid_to_exec_file): New function.
12393 (elf_64_header_p, elf_64_file_p): New functions.
12394 (siginfo_fixup): New function.
12395 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12396 give target a chance to convert layout.
12397 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12398 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12399
fdeb2a12
DE
124002009-05-07 Doug Evans <dje@google.com>
12401
12402 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12403 (regsets_store_inferior_registers): Ditto.
12404
a6dbe5df
PA
124052009-05-06 Pedro Alves <pedro@codesourcery.com>
12406
12407 PR server/10048
12408
12409 * linux-low.c (must_set_ptrace_flags): Delete.
12410 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12411 of the global.
12412 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12413 `lwp->must_set_ptrace_flags' instead.
ba42693b 12414 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12415 (linux_wait_1): ... not here.
12416
5091eb23
DE
124172009-04-30 Doug Evans <dje@google.com>
12418
9f767825
DE
12419 * inferiors.c (started_inferior_callback): New function.
12420 (attached_inferior_callback): New function.
12421 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12422 * server.c (print_started_pid, print_attached_pid): New functions.
12423 (detach_or_kill_for_exit): New function.
12424 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12425 * server.h (have_started_inferiors_p): Declare.
12426 (have_attached_inferiors_p): Declare.
12427
5091eb23
DE
12428 * inferiors.c (remove_process): Fix memory leak, free process.
12429 * linux-low.c (linux_remove_process): New function.
12430 (linux_kill): Call it instead of remove_process.
12431 (linux_detach, linux_wait_1): Ditto.
12432
155c8968
PA
124332009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12434
12435 * configure.srv: Add x86 Windows CE target.
12436
7fe519cb
UW
124372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12438
12439 * inferiors.c (get_thread_process): Make global.
12440 * server.h (get_thread_process): Add prototype.
12441 * thread-db.c (find_one_thread): Use get_thread_process
12442 instead of current_process.
12443 (thread_db_get_tls_address): Do not crash if called when
12444 thread layer is not yet initialized.
12445
5472f405
UW
124462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12447
12448 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12449 * spu-low.c (current_tid): Rename to ...
12450 (current_ptid): ... this.
12451 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12452 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12453 ptid_get_lwp (current_ptid) instead of current_tid.
12454 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12455 instead of current_tid. Use find_process_pid to verify pid
12456 argument is valid. Pass proper argument to remove_process.
12457 (spu_thread_alive): Compare current_ptid instead of current_tid.
12458 (spu_resume): Likewise.
12459
55ac2b99
PA
124602009-04-02 Pedro Alves <pedro@codesourcery.com>
12461
12462 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12463 variable.
12464
95954743
PA
124652009-04-01 Pedro Alves <pedro@codesourcery.com>
12466
12467 Implement the multiprocess extensions, and add linux multiprocess
12468 support.
12469
12470 * server.h (ULONGEST): Declare.
12471 (struct ptid, ptid_t): New.
12472 (minus_one_ptid, null_ptid): Declare.
12473 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12474 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12475 (struct inferior_list_entry): Change `id' type from unsigned from
12476 to ptid_t.
12477 (struct sym_cache, struct breakpoint, struct
12478 process_info_private): Forward declare.
12479 (struct process_info): Declare.
12480 (current_process): Declare.
12481 (all_processes): Declare.
12482 (initialize_inferiors): Declare.
12483 (add_thread): Adjust to use ptid_t.
12484 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12485 (add_process, remove_process, find_thread_pid): Declare.
12486 (find_inferior_id): Adjust to use ptid_t.
12487 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12488 (multi_process): Declare.
12489 (push_event): Adjust to use ptid_t.
12490 (read_ptid, write_ptid): Declare.
12491 (prepare_resume_reply): Adjust to use ptid_t.
12492 (clear_symbol_cache): Declare.
12493 * inferiors.c (all_processes): New.
12494 (null_ptid, minus_one_ptid): New.
12495 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12496 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12497 (add_thread): Change unsigned long to ptid. Remove gdb_id
12498 parameter. Adjust.
12499 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12500 (gdb_id_to_thread): Rename to ...
12501 (find_thread_pid): ... this. Change unsigned long to ptid.
12502 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12503 (loaded_dll, pull_pid_from_list): Adjust.
12504 (add_process, remove_process, find_process_pid)
12505 (get_thread_process, current_process, initialize_inferiors): New.
12506 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12507 (struct target_waitstatus) <related_pid>: Ditto.
12508 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12509 return type to int.
12510 (struct target_ops) <join>: Add `pid' argument.
12511 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12512 (struct target_ops) <wait>: Add `ptid' field. Change return type
12513 to ptid.
12514 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12515 (mywait): Add `ptid' argument. Change return type to ptid_t.
12516 (target_pid_to_str): Declare.
12517 * target.c (set_desired_inferior): Adjust to use ptids.
12518 (mywait): Add new `ptid' argument. Adjust.
12519 (target_pid_to_str): New.
12520 * mem-break.h (free_all_breakpoints): Declare.
12521 * mem-break.c (breakpoints): Delelete.
12522 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12523 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12524 to use per-process breakpoint list.
12525 (free_all_breakpoints): New.
12526 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12527 (symbol_cache, all_symbols_looked_up): Delete.
12528 (hexchars): New.
12529 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12530 read_ptid): New.
12531 (prepare_resume_reply): Change ptid argument's type from unsigned
12532 long to ptid_t. Adjust. Implement W;process and X;process.
12533 (free_sym_cache, clear_symbol_cache): New.
12534 (look_up_one_symbol): Adjust to per-process symbol cache. *
12535 * server.c (cont_thread, general_thread, step_thread): Change type
12536 to ptid_t.
12537 (attached): Delete.
12538 (multi_process): New.
12539 (last_ptid): Change type to ptid_t.
12540 (struct vstop_notif) <ptid>: Change type to ptid_t.
12541 (queue_stop_reply, push_event): Change `ptid' argument's type to
12542 ptid_t.
12543 (discard_queued_stop_replies): Add `pid' argument.
12544 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12545 changes. Don't reference the `attached' global.
12546 (attach_inferior): Adjust to mywait interface changes.
12547 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12548 features. Handle and report "multiprocess+". Handle
12549 "qAttached:PID".
12550 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12551 changes.
12552 (handle_v_kill): New.
12553 (handle_v_stopped): Adjust to use target_pid_to_str.
12554 (handle_v_requests): Allow multiple attaches and runs when
12555 multiprocess extensions are in effect. Handle "vKill".
12556 (myresume): Adjust to use ptids.
12557 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12558 (handle_status): Adjust to discard_queued_stop_replies interface
12559 change.
12560 (first_thread_of, kill_inferior_callback)
12561 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12562 (main): Call initialize_inferiors. Adjust to use ptids, killing
12563 and detaching from all inferiors. Handle multiprocess packet
12564 variants.
12565 * linux-low.h: Include gdb_proc_service.h.
12566 (struct process_info_private): New.
12567 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12568 <lwpid_of>: Use ptid_get_lwp.
12569 (get_lwp_thread): Adjust.
12570 (struct lwp_info): Add `dead' member.
12571 (find_lwp_pid): Declare.
12572 * linux-low.c (thread_db_active): Delete.
12573 (new_inferior): Adjust comment.
12574 (inferior_pid): Delete.
12575 (linux_add_process): New.
12576 (handle_extended_wait): Adjust.
12577 (add_lwp): Change unsigned long to ptid.
12578 (linux_create_inferior): Add process to processes table. Adjust
12579 to use ptids. Don't set new_inferior here.
12580 (linux_attach_lwp): Rename to ...
12581 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12582 it. Adjust to use ptids.
12583 (linux_attach_lwp): New.
12584 (linux_attach): Add process to processes table. Don't set
12585 new_inferior here.
12586 (struct counter): New.
12587 (second_thread_of_pid_p, last_thread_of_process_p): New.
12588 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12589 multiple processes.
12590 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12591 processes. Remove process from process table.
12592 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12593 to multiple processes.
12594 (any_thread_of): New.
12595 (linux_detach): Add `pid' argument, and handle it. Remove process
12596 from processes table.
12597 (linux_join): Add `pid' argument. Handle it.
12598 (linux_thread_alive): Change unsighed long argument to ptid_t.
12599 Consider dead lwps as not being alive.
12600 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12601 threads we're not interested in.
12602 (same_lwp, find_lwp_pid): New.
12603 (linux_wait_for_lwp): Change `pid' argument's type from int to
12604 ptid_t. Adjust.
12605 (linux_wait_for_event): Rename to ...
12606 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12607 from int to ptid_t. Adjust.
12608 (linux_wait_for_event): New.
12609 (linux_wait_1): Add `ptid' argument. Change return type to
12610 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12611 that exit from the process table.
12612 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12613 Adjust.
12614 (mark_lwp_dead): New.
12615 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12616 stopping all threads, mark its main lwp as dead.
12617 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12618 ptids.
12619 (fetch_register, usr_store_inferior_registers)
12620 (regsets_fetch_inferior_registers)
12621 (regsets_store_inferior_registers, linux_read_memory)
12622 (linux_write_memory): Inline `inferior_pid'.
12623 (linux_look_up_symbols): Adjust to use per-process
12624 `thread_db_active'.
12625 (linux_request_interrupt): Adjust to use ptids.
12626 (linux_read_auxv): Inline `inferior_pid'.
12627 (initialize_low): Don't reference thread_db_active.
12628 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12629 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12630 (ps_getpid): Return the pid of the current inferior.
12631 * thread-db.c (proc_handle, thread_agent): Delete.
12632 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12633 per-process data.
12634 (find_one_thread): Change argument type to ptid_t. Adjust to
12635 per-process data.
12636 (maybe_attach_thread): Adjust to per-process data and ptids.
12637 (thread_db_find_new_threads): Ditto.
12638 (thread_db_init): Ditto.
12639 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12640 processes table. Adjust to use ptids.
12641 (spu_kill, spu_detach): Adjust interface. Remove process from
12642 processes table.
12643 (spu_join, spu_thread_alive): Adjust interface.
12644 (spu_wait): Adjust interface. Remove process from processes
12645 table. Adjust to use ptids.
12646 * win32-low.c (current_inferior_tid): Delete.
12647 (current_inferior_ptid): New.
12648 (debug_event_ptid): New.
12649 (thread_rec): Take a ptid. Adjust.
12650 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12651 (child_delete_thread): Ditto.
12652 (do_initial_child_stuff): Add `attached' argument. Add process to
12653 processes table.
12654 (child_fetch_inferior_registers, child_store_inferior_registers):
12655 Adjust.
12656 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12657 (win32_attach): Pass 1 to do_initial_child_stuff.
12658 (win32_kill): Adjust interface. Remove process from processes
12659 table.
12660 (win32_detach): Ditto.
12661 (win32_join): Adjust interface.
12662 (win32_thread_alive): Take a ptid.
12663 (win32_resume): Adjust to use ptids.
12664 (get_child_debug_event): Ditto.
12665 (win32_wait): Adjust interface. Remove exiting process from
12666 processes table.
12667
bd99dc85
PA
126682009-04-01 Pedro Alves <pedro@codesourcery.com>
12669
12670 Non-stop mode support.
12671
12672 * server.h (non_stop): Declare.
12673 (gdb_client_data, handler_func): Declare.
12674 (delete_file_handler, add_file_handler, start_event_loop):
12675 Declare.
12676 (handle_serial_event, handle_target_event, push_event)
12677 (putpkt_notif): Declare.
12678 * target.h (enum resume_kind): New.
12679 (struct thread_resume): Replace `step' field by `kind' field.
12680 (TARGET_WNOHANG): Define.
12681 (struct target_ops) <wait>: Add `options' argument.
12682 <supports_non_stop, async, start_non_stop>: New fields.
12683 (target_supports_non_stop, target_async): New.
12684 (start_non_stop): Declare.
12685 (mywait): Add `options' argument.
12686 * target.c (mywait): Add `options' argument. Print child exit
12687 notifications here.
12688 (start_non_stop): New.
12689 * server.c (non_stop, own_buf, mem_buf): New globals.
12690 (struct vstop_notif): New.
12691 (notif_queue): New global.
12692 (queue_stop_reply, push_event, discard_queued_stop_replies)
12693 (send_next_stop_reply): New.
12694 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12695 interface changes.
12696 (attach_inferior): In non-stop mode, don't wait for the target
12697 here.
12698 (handle_general_set): Handle QNonStop.
12699 (handle_query): When handling qC, return the current general
12700 thread, instead of the first thread of the list.
12701 (handle_query): If the backend supports non-stop mode, include
12702 QNonStop+ in the qSupported query response.
12703 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12704 and non-stop mode.
12705 (handle_v_attach, handle_v_run): Handle non-stop mode.
12706 (handle_v_stopped): New.
12707 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12708 (myresume): Adjust to use resume_kind. Handle non-stop.
12709 (queue_stop_reply_callback): New.
12710 (handle_status): Handle non-stop mode.
12711 (main): Clear non_stop flag on reconnection. Use the event-loop.
12712 Refactor serial protocol handling from here ...
12713 (process_serial_event): ... to this new function. When GDB
12714 selects any thread, select one here. In non-stop mode, wait until
12715 GDB acks all pending events before exiting.
12716 (handle_serial_event, handle_target_event): New.
12717 * remote-utils.c (remote_open): Install remote_desc in the event
12718 loop.
12719 (remote_close): Remove remote_desc from the event loop.
12720 (putpkt_binary): Rename to...
12721 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12722 (putpkt_binary): New as wrapper around putpkt_binary_1.
12723 (putpkt_notif): New.
12724 (prepare_resume_reply): In non-stop mode, don't change the
12725 general_thread.
12726 * event-loop.c: New.
12727 * Makefile.in (OBJ): Add event-loop.o.
12728 (event-loop.o): New rule.
12729
12730 * linux-low.h (pid_of): Moved here.
12731 (lwpid_of): New.
12732 (get_lwp_thread): Use lwpid_of.
12733 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12734 * linux-low.c (pid_of): Delete.
12735 (inferior_pid): Use lwpid_of.
12736 (linux_event_pipe): New.
12737 (target_is_async_p): New.
12738 (delete_lwp): New.
12739 (handle_extended_wait): Use lwpid_of.
12740 (add_lwp): Don't set lwpid field.
12741 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12742 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12743 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12744 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12745 first. Adjust to linux_wait_for_event interface changes. Use
12746 lwpid_of.
12747 (linux_detach): Don't delete the main lwp here.
12748 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12749 (status_pending_p): Don't consider explicitly suspended lwps.
12750 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12751 pointer. Add OPTIONS argument. Change return type to int. Use
12752 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12753 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12754 pointer. Add status pointer argument. Return a pid instead of a
12755 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12756 changes. In non-stop mode, don't switch to a random thread.
12757 (linux_wait): Rename to...
12758 (linux_wait_1): ... this. Add target_options argument, and handle
12759 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12760 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12761 clean exit and signal exit code. Don't stop all threads in
12762 non-stop mode. In all-stop mode, only stop all threads when
12763 reporting a stop to GDB. Handle explicit thread stop requests.
12764 (async_file_flush, async_file_mark): New.
12765 (linux_wait): New.
12766 (send_sigstop): Use lwpid_of.
12767 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12768 interface changes. In non-stop mode, don't switch to a random
12769 thread.
12770 (linux_resume_one_lwp): Use lwpid_of.
12771 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12772 (linux_resume_one_thread): ... this. Handle resume_stop. In
12773 non-stop mode, don't look for pending flag in all threads.
12774 (resume_status_pending_p): Don't consider explicitly suspended
12775 threads.
12776 (my_waitpid): Reimplement. Emulate __WALL.
12777 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12778 Use lwpid_of.
12779 (sigchld_handler, linux_supports_non_stop, linux_async)
12780 (linux_start_non_stop): New.
12781 (linux_target_ops): Register linux_supports_non_stop, linux_async
12782 and linux_start_non_stop.
12783 (initialize_low): Install SIGCHLD handler.
12784 * thread-db.c (thread_db_create_event, find_one_thread)
12785 (thread_db_get_tls_address): Use lwpid_of.
12786 * win32-low.c (win32_detach): Adjust to use resume_kind.
12787 (win32_wait): Add `options' argument.
12788 * spu-low.c (spu_resume): Adjust to use resume_kind.
12789 (spu_wait): Add `options' argument.
12790
5b1c542e
PA
127912009-04-01 Pedro Alves <pedro@codesourcery.com>
12792
12793 Decouple target code from remote protocol.
12794
12795 * target.h (enum target_waitkind): New.
12796 (struct target_waitstatus): New.
12797 (struct target_ops) <wait>: Return an unsigned long. Take a
12798 target_waitstatus pointer instead of a char pointer.
12799 (mywait): Likewise.
12800 * target.c (mywait): Change prototype to return an unsigned long.
12801 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12802 * server.h (thread_from_wait, old_thread_from_wait): Delete
12803 declarations.
12804 (prepare_resume_reply): Change prototype to take a
12805 target_waitstatus.
12806 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12807 (last_status, last_ptid): New.
12808 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12809 pid instead of a signal.
12810 (attach_inferior): Remove "status" and "signal" parameters.
12811 Adjust.
12812 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12813 not as an address.
12814 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12815 (handle_v_requests, myresume): Remove "status" and "signal"
12816 parameters. Adjust.
12817 (handle_status): New.
12818 (main): Delete local `status'. Adjust.
12819 * remote-utils.c: Include target.h.
12820 (prepare_resume_reply): Change prototype to take a
12821 target_waitstatus. Adjust.
12822
12823 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12824 interface.
12825 * spu-low.c (spu_wait): Adjust.
12826 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12827 Delete.
12828 (win32_wait): Adjust.
12829
2bd7c093
PA
128302009-04-01 Pedro Alves <pedro@codesourcery.com>
12831
12832 * target.h (struct thread_resume): Delete leave_stopped member.
12833 (struct target_ops): Add a `n' argument to the `resume' callback.
12834 * server.c (start_inferior): Adjust.
12835 (handle_v_cont, myresume): Adjust.
12836 * linux-low.c (check_removed_breakpoint): Adjust to resume
12837 interface change, and to removed leave_stopped field.
12838 (resume_ptr): Delete.
12839 (struct thread_resume_array): New.
12840 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12841 resume interface change.
12842 (linux_continue_one_thread, linux_queue_one_thread)
12843 (resume_status_pending_p): Check if the resume field is NULL
12844 instead of checking the leave_stopped member.
12845 (linux_resume): Adjust to the target resume interface change.
12846 * spu-low.c (spu_resume): Adjust to the target resume interface
12847 change.
12848 * win32-low.c (win32_detach, win32_resume): Ditto.
12849
c35fafde
PA
128502009-04-01 Pedro Alves <pedro@codesourcery.com>
12851
12852 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12853 flag.
12854 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12855 pending.
12856 (linux_continue_one_thread): Only preserve the stepping flag if
12857 there's a pending breakpoint.
12858
0a59d50b
PA
128592009-03-31 Pedro Alves <pedro@codesourcery.com>
12860
12861 * server.c (main): After the inferior having exited, call
12862 remote_close before exiting gdbserver.
12863
f04c6d38
TJB
128642009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12865
12866 Fix size of FPSCR in Power 7 processors.
12867 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12868 (PPC_FEATURE_HAS_DFP): New #define.
12869 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12870 size of the FPSCR.
12871
78e5cee6
PA
128722009-03-23 Pedro Alves <pedro@codesourcery.com>
12873
12874 * server.c (handle_query) Whitespace and formatting.
12875
1b3f6016
PA
128762009-03-22 Pedro Alves <pedro@codesourcery.com>
12877
12878 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12879 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12880 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12881 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12882 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12883 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12884 Makefile.in, configure.ac: Fix whitespace throughout.
12885 * configure: Regenerate.
12886
a07b2135
PA
128872009-03-22 Pedro Alves <pedro@codesourcery.com>
12888
12889 * inferiors.c (find_inferior): Make it safe for the callback
12890 function to delete the currently iterated inferior.
12891
67cc2626
PA
128922009-03-22 Pedro Alves <pedro@codesourcery.com>
12893
12894 * Makefile.in (linuw_low_h): Move higher.
12895 (thread-db.o): Depend on $(linux_low_h).
12896
54a0b537
PA
128972009-03-17 Pedro Alves <pedro@codesourcery.com>
12898
12899 Rename "process" to "lwp" throughout.
12900
12901 * linux-low.c (all_processes): Rename to...
12902 (all_lwps): ... this.
12903 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12904 (add_process): Rename to ...
12905 (add_lwp): ... this. Adjust.
12906 (linux_create_inferior): Adjust.
12907 (linux_attach_lwp): Adjust.
12908 (linux_attach): Adjust.
12909 (linux_kill_one_process): Rename to ...
12910 (linux_kill_one_lwp): ... this. Adjust.
12911 (linux_kill): Adjust.
12912 (linux_detach_one_process): Rename to ...
12913 (linux_detach_one_lwp): ... this. Adjust.
12914 (linux_detach): Adjust.
12915 (check_removed_breakpoint): Adjust.
12916 (status_pending_p): Adjust.
12917 (linux_wait_for_process): Rename to ...
12918 (linux_wait_for_lwp): ... this. Adjust.
12919 (linux_wait_for_event): Adjust.
12920 (send_sigstop): Adjust.
12921 (wait_for_sigstop): Adjust.
12922 (stop_all_processes): Rename to ...
12923 (stop_all_lwps): ... this.
12924 (linux_resume_one_process): Rename to ...
12925 (linux_resume_one_lwp): ... this. Adjust.
12926 (linux_set_resume_request, linux_continue_one_thread)
12927 (linux_queue_one_thread, resume_status_pending_p)
12928 (usr_store_inferior_registers, regsets_store_inferior_registers)
12929 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12930 Adjust.
12931 * linux-low.h (get_process): Rename to ...
12932 (get_lwp): ... this. Adjust.
12933 (get_thread_process): Rename to ...
12934 (get_thread_lwp): ... this. Adjust.
12935 (get_process_thread): Rename to ...
12936 (get_lwp_thread): ... this. Adjust.
12937 (struct process_info): Rename to ...
12938 (struct lwp_info): ... this.
12939 (all_processes): Rename to ...
12940 (all_lwps): ... this.
12941 * proc-service.c (ps_lgetregs): Adjust.
12942 * thread-db.c (thread_db_create_event, find_one_thread)
12943 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12944
0b16c5cf
PA
129452009-03-14 Pedro Alves <pedro@codesourcery.com>
12946
12947 * server.c (handle_query): Handle "qAttached".
12948
32de4b9d
NS
129492009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12950
12951 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12952 GPLv3, update license URL.
12953
2aecd87f
DE
129542009-03-01 Doug Evans <dje@google.com>
12955
93efd302 12956 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12957 (server_h): Add gdb_signals.h.
12958 (signals.o): Update.
12959 * server.h (target_signal_from_host,target_signal_to_host_p)
12960 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12961
86b1f9c5
PM
129622009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12963
12964 * remote-utils.c (getpkt): Also generate remote-debug
12965 information if noack_mode is set.
12966
4aa995e1
PA
129672009-02-06 Pedro Alves <pedro@codesourcery.com>
12968
12969 * server.c (handle_query): Report qXfer:siginfo:read and
12970 qXfer:siginfo:write as supported and handle them.
12971 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12972 * linux-low.c (linux_xfer_siginfo): New.
12973 (linux_target_ops): Set it.
12974
62709adf
PA
129752009-01-26 Pedro Alves <pedro@codesourcery.com>
12976
12977 * server.c (gdbserver_usage): Mention --remote-debug.
12978 (main): Accept '--remote-debug' switch.
12979
aef93bd7
DE
129802009-01-18 Doug Evans <dje@google.com>
12981
12982 * regcache.c (new_register_cache): No need to check result of xcalloc.
12983 * server.c (handle_search_memory): Back out calls to xmalloc,
12984 result is checked and error is returned to user upon failure.
12985 (handle_query): Ditto. Add more checks for result of malloc.
12986 (handle_v_cont): Check result of malloc, report error back to
12987 user upon failure.
12988 (handle_v_run): Ditto. Call freeargv.
12989 * server.h (freeargv): Declare.
12990 * utils.c (freeargv): New fn.
12991
54363045
DE
129922009-01-15 Doug Evans <dje@google.com>
12993
f626972c
DE
12994 * gdbreplay.c (perror_with_name): Make arg const char *.
12995 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12996 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12997 * utils.c (perror_with_name): Make arg const char *.
54363045 12998
18aae699
PA
129992009-01-14 Pedro Alves <pedro@codesourcery.com>
13000
13001 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13002 when handling a EXIT_PROCESS_DEBUG_EVENT.
13003
ff703abe
JB
130042009-01-06 Joel Brobecker <brobecker@adacore.com>
13005
13006 * gdbreplay.c (gdbreplay_version): Update copyright year.
13007 * server.c (gdbserver_version): Likewise.
13008
f21cc1a2 130092009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13010
13011 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13012 (handle_extended_wait): Improve comment.
0e21c1ec 13013
bca929d3
DE
130142008-12-13 Doug Evans <dje@google.com>
13015
13016 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13017 * server.h (ATTR_MALLOC): New macro.
13018 (xmalloc,xcalloc,xstrdup): Declare.
13019 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13020 * inferiors.c: Ditto.
13021 * linux-low.c: Ditto.
13022 * mem-break.c: Ditto.
13023 * regcache.c: Ditto.
13024 * remote-utils.c: Ditto.
13025 * server.c: Ditto.
13026 * target.c: Ditto.
13027 * win32-low.c: Ditto.
13028
97438e3f
DE
130292008-12-12 Doug Evans <dje@google.com>
13030
896c7fbb
DE
13031 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13032 in debugging printf.
13033
97438e3f
DE
13034 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13035
e3b886f8
DE
130362008-12-09 Doug Evans <dje@google.com>
13037
13038 * linux-low.h (struct process_info): Delete member tid, unused.
13039 * thread-db.c (find_one_thread): Update.
13040 (maybe_attach_thread): Update.
13041
07e059b5
VP
130422008-12-02 Pedro Alves <pedro@codesourcery.com>
13043
889bf7c5
PA
13044 * target.h (struct target_ops): Add qxfer_osdata member.
13045 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13046 and dirent.h.
13047 (linux_qxfer_osdata): New functions.
13048 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13049 callback.
13050 * server.c (handle_query): Handle "qXfer:osdata:read:".
13051 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13052 (buffer_xml_printf): New functions.
13053 * server.h (struct buffer): New.
13054 (buffer_grow_str, buffer_grow_str0): New macros.
13055 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13056 (buffer_xml_printf): Declare.
07e059b5 13057
4cab47ab
DE
130582008-11-24 Doug Evans <dje@google.com>
13059
13060 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13061
f142445f
DJ
130622008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13063
13064 * server.c (handle_v_run): Always use the supplied argument list.
13065
d0107bb6 130662008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13067
d0107bb6
BW
13068 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13069 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13070
2c4ad781
TJB
130712008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13072
13073 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13074 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13075 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13076 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13077 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13078 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13079 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13080 XML target descriptions.
13081 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13082 when inferior is running on an ISA 2.05 or later processor. Add
13083 special case to return offset for full 64-bit slot of FPSCR when
13084 in 32-bits.
13085
dfb64f85
DJ
130862008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13087
13088 * Makefile.in (SFILES, clean): Added sparc64 files.
13089 (reg-sparc64.o, reg-sparc64.c): New.
13090 * configure.srv (sparc*-*-linux*): New configuration.
13091 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13092 syscall arguments for SPARC.
13093 (regsets_store_inferior_registers): Likewise.
13094 * linux-sparc-low.c: New file.
13095
66b6e1dd
DE
130962008-10-21 Doug Evans <dje@google.com>
13097
13098 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13099 (READLINE_DIR,READLINE_DEP): Delete.
13100 (INTERNAL_CFLAGS): Update.
13101 (LINTFLAGS): Update.
13102
9b710a42
PA
131032008-10-10 Pedro Alves <pedro@codesourcery.com>
13104
13105 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13106 whole argv from the last run, not just argv[0].
13107
5822d809
PA
131082008-09-08 Pedro Alves <pedro@codesourcery.com>
13109
13110 * regcache.c (new_register_cache): Return NULL if the register
13111 cache size isn't known yet.
13112 (free_register_cache): Avoid dereferencing a NULL regcache.
13113
74aac56f
DJ
131142008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * configure.srv: Merge MIPS and MIPS64.
13117
400b20f5
MR
131182008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13119
13120 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13121
677c5bb1
LM
131222008-08-18 Luis Machado <luisgpm@br.ibm.com>
13123
13124 * Makefile.in: Add required vsx dependencies.
13125
13126 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13127 Declare init_registers_powerpc_vsx32l.
13128 Declare init_registers_powerpc_vsx64l.
13129 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13130 (ppc_arch_setup): Check for VSX in hwcap.
13131 (ppc_fill_vsxregset): New function.
13132 (ppc_store_vsxregset): New function.
13133 Add new VSX entry in regset_info target_regsets.
13134
13135 * configure.srv: Add new VSX dependencies.
13136
a6f3e723
SL
131372008-08-12 Pedro Alves <pedro@codesourcery.com>
13138
13139 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13140 (remote_open): Set or clear transport_is_reliable.
13141 (putpkt_binary): Don't expect acks in noack mode.
13142 (getpkt): Don't send ack/nac in noack mode.
13143 * server.c (handle_general_set): Handle QStartNoAckMode.
13144 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13145 qSupported.
13146 (main): Reset noack_mode on every connection.
13147 * server.h (noack_mode): Declare.
13148
a417dc56
RW
131492008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13150
13151 * Makefile.in (GDBREPLAY_OBS): New variable.
13152 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13153
3221518c
UW
131542008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13155 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13158 (usr_store_inferior_registers): Likewise.
13159 (regsets_store_inferior_registers): Likewise.
13160
ec56be1b
PA
131612008-07-31 Rolf Jansen <rj@surtec.com>
13162 Pedro Alves <pedro@codesourcery.com>
13163
13164 * configure.ac: Check for memmem declaration.
13165 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13166 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13167 (disable_packet_qfThreadInfo): Unconditionally compile.
13168 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13169 * configure, config.in: Regenerate.
13170
2fe5e3ff
DE
131712008-07-28 Doug Kwan <dougkwan@google.com>
13172
13173 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13174 (linux_write_memory): Remove declaration of errno.
13175
836acd6d
UW
131762008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13177
13178 * linux-low.c (handle_extended_wait): Do not use "status"
13179 variable uninitialized.
13180
aeba519e
PA
131812008-07-07 Pedro Alves <pedro@codesourcery.com>
13182
13183 * server.c (handle_v_attach): Inhibit reporting dll changes.
13184
db42f210
PA
131852008-06-27 Pedro Alves <pedro@codesourcery.com>
13186
13187 * remote-utils.c (prepare_resume_reply): If requested, don't
13188 output "thread:TID" in the T stop reply.
13189
13190 * server.c (disable_packet_vCont, disable_packet_Tthread)
13191 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13192 (handle_query): If requested, disable support for qC, qfThreadInfo
13193 and qsThreadInfo.
13194 (handle_v_requests): If requested, disable support for vCont.
13195 (gdbserver_show_disableable): New.
13196 (main): Handle --disable-packet and --disable-packet=LIST.
13197
13198 * server.h (disable_packet_vCont, disable_packet_Tthread)
13199 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13200
8e4c5421
CD
132012008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13202
13203 * server.c (gdbserver_usage): Mention --version.
13204
6e23a804
DJ
132052008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13206
13207 * Makefile.in (gdbreplay.o): New rule.
13208
90aa6a40
JM
132092008-06-06 Joseph Myers <joseph@codesourcery.com>
13210
13211 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13212 message, not gdbserver.
13213
c16158bc 132142008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13215 Nathan Sidwell <nathan@codesourcery.com>
13216 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13217
13218 * acinclude.m4: Include ../../config/acx.m4.
13219 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13220 * configure, config.in: Regenerate.
13221 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13222 * server.c (gdbserver_version): Print PKGVERSION.
13223 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13224 (main): Adjust gdbserver_usage calls.
13225 * gdbreplay.c (version, host_name): Add declarations.
13226 (gdbreplay_version, gdbreplay_usage): New.
13227 (main): Accept --version and --help options.
13228
aeb75bf5
DJ
132292008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13232 (arm_breakpoint_at): Handle Thumb.
13233 (the_low_target): Add comment.
13234
76b233dd
UW
132352008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13236
13237 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13238
08388c79
DE
132392008-05-09 Doug Evans <dje@google.com>
13240
a3c83fae
DE
13241 * server.h (decode_search_memory_packet): Declare.
13242 * remote-utils.c (decode_search_memory_packet): New fn.
13243 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13244 (handle_search_memory): New fn.
13245 (handle_query): Process qSearch:memory packets.
13246
bb9c3d36
UW
132472008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13248
13249 * regcache.c (registers_length): Remove.
13250 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13251 full register packet.
13252 * regcache.h (registers_length): Remove prototype.
13253 * server.h (PBUFSIZ): Define to 16384.
13254
7284e1be
UW
132552008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13256
13257 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13258 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13259 powerpc-64l.o, and powerpc-altivec64l.o.
13260 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13261 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13262 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13263 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13264 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13265 to srv_xmlfiles.
13266
13267 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13268 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13269 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13270 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13271 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13272 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13273 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13274 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13275 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13276 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13277 (clean): Update.
13278
13279 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13280 (init_registers_powerpc_32l): ... this new prototype.
13281 (init_registers_powerpc_32): Remove, replace by ...
13282 (init_registers_powerpc_altivec32l): ... this new prototype.
13283 (init_registers_powerpc_e500): Remove, replace by ...
13284 (init_registers_powerpc_e500l): ... this new prototype.
13285 (init_registers_ppc64): Remove, replace by ...
13286 (init_registers_powerpc_64l): ... this new prototype.
13287 (init_registers_powerpc_64): Remove, replace by ...
13288 (init_registers_powerpc_altivec64l): ... this new prototype.
13289 (ppc_num_regs): Set to 73.
13290 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13291 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13292 (ppc_cannot_store_register): Handle orig_r3 and trap.
13293 (ppc_arch_setup): Update init_registers_... calls.
13294 (ppc_fill_gregset): Handle orig_r3 and trap.
13295
13296 * inferiors.c (clear_inferiors): Reset current_inferior.
13297
fdc59709
PB
132982008-04-23 Paolo Bonzini <bonzini@gnu.org>
13299
889bf7c5
PA
13300 * acinclude.m4: Add override.m4.
13301 * configure: Regenerate.
fdc59709 13302
c9b2f845
UW
133032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13304
13305 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13306 initial call to init_register_ppc64.
13307
550512b8
UW
133082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13309
43aaf8b6
PA
13310 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13311 single powerpc*-*-linux* case.
550512b8
UW
13312 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13313
b6430ec3
UW
133142008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13315
13316 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13317 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13318 from reg_xmlfiles.
13319 * linux-ppc-low.c: Include <elf.h>.
13320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13321 (ppc_hwcap): New global variable.
13322 (ppc_regmap): Remove __SPE__ #ifdef sections.
13323 (ppc_regmap_e500): New global variable.
13324 (ppc_cannot_store_register): Update __SPE__ special case.
13325 (ppc_get_hwcap): New function.
13326 (ppc_arch_setup): Use it to determine whether inferior supports
13327 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13328 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13329 Do not access registers if target does not support AltiVec.
13330 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13331 Do not access registers if target does not support SPE.
13332 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13333
52fa2412
UW
133342008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13335
13336 * linux-low.c (disabled_regsets, num_regsets): New.
13337 (use_regsets_p): Delete.
13338 (linux_wait_for_process): Clear disabled_regsets.
13339 (regsets_fetch_inferior_registers): Check and set it.
13340 (regsets_store_inferior_registers): Likewise.
13341 (linux_fetch_registers, linux_store_registers): Do not use
13342 use_regsets_p.
13343 (initialize_low): Allocate disabled_regsets.
13344
e28b3332
DJ
133452008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13346
13347 * Makefile.in (LIBOBJS): New.
13348 (OBS): Use LIBOBJS.
13349 (memmem.o): New rule.
13350 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13351 * configure: Regenerated.
13352
4536995d
UW
133532008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13354
13355 * server.c (handle_query): Never return "unsupported" for
13356 qXfer:features:read queries.
13357
221c031f
UW
133582008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13359
13360 * server.c (get_features_xml): Fix inverted condition.
13361 (handle_query): Always support qXfer:feature:read.
13362
ccd213ac
DJ
133632008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13364
13365 * server.c (wrapper_argv): New.
13366 (start_inferior): Handle wrapper_argv. If set, expect an extra
13367 trap.
13368 (gdbserver_usage): Document --wrapper.
13369 (main): Parse --wrapper.
13370
6fe305f7
UW
133712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13372
13373 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13374 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13375 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13376 (ppc_set_pc): Likewise.
13377 (ppc_arch_setup): New function.
13378 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13379 of collect_register.
889bf7c5 13380 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13381
5b0a002e
UW
133822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13383
13384 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13385 instead of linux-ppc64-low.o.
13386 * linux-ppc64-low.c: Remove file.
13387 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13388 (linux-ppc64-low.o): Remove rule.
13389
13390 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13391 (init_registers_powerpc_64): Likewise.
13392 (ppc_regmap): Conditionally define depending on __powerpc64__.
13393 (ppc_cannot_store_register): Do not special-case "fpscr" when
13394 compiled on __powerpc64__.
13395 (ppc_collect_ptrace_register): New function.
13396 (ppc_supply_ptrace_register): New function.
13397 (ppc_breakpoint): Change type to "unsigned int".
13398 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13399 (the_low_target): Conditionally provide initializers for the
889bf7c5 13400 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13401 collect_ptrace_register and supply_ptrace_register members.
13402
9b4b61c8
UW
134032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13404
13405 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13406 * server.c (gdbserver_xmltarget): Define.
13407 (get_features_xml): Use it to replace "target.xml" and arch_string.
13408
13409 * configure.srv: Remove srv_xmltarget. Add XML files that were
13410 mentioned there to srv_xmlfiles instead. Remove conditional tests
13411 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13412 srv_xmlfiles and srv_regobj to include all possible choices.
13413 * configure.ac (srv_xmltarget): Remove.
13414 (srv_xmlfiles): Do not add "target.xml".
13415 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13416 checks for supplementary target information.
13417 * configure: Regenerate.
13418 * Makefile.in (XML_TARGET): Remove.
13419 (target.xml): Remove rule.
13420 (clean): Do not clean up target.xml.
13421 (.PRECIOUS): Do not mention target.xml.
13422
13423 * target.h (struct target_ops): Remove arch_string member.
13424 * linux-low.c (linux_arch_string): Remove.
13425 (linux_target_ops): Remove arch_string initializer.
13426 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13427 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13428 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13429 * spu-low.c (spu_arch_string): Remove.
13430 (spu_target_ops): Remove arch_string initializer.
13431 * win32-low.c (win32_arch_string): Remove.
13432 (win32_target_ops): Remove arch_string initializer.
13433 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13434 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13435 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13436
ee1a7ae4
UW
134372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13438
13439 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13440 by collect_ptrace_register and supply_ptrace_register hooks.
13441 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13442 instead of checking for the_low_target.left_pad_xfer.
13443 (usr_store_inferior_registers): Use collect_ptrace_register callback
13444 instead of checking for the_low_target.left_pad_xfer.
13445
13446 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13447 (s390_supply_ptrace_register): Likewise.
13448 (s390_fill_gregset): Call s390_collect_ptrace_register.
13449 (the_low_target): Update.
13450
13451 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13452 (ppc_supply_ptrace_register): Likewise.
13453 (the_low_target): Update.
13454
13455 * linux-i386-low.c (the_low_target): Update.
13456 * linux-x86-64-low.c (the_low_target): Update.
13457
d61ddec4
UW
134582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13459
13460 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13461 reg-s390.o and reg-s390x.o.
13462
13463 * linux-low.c (new_inferior): New global variable.
13464 (linux_create_inferior, linux_attach): Set it.
13465 (linux_wait_for_process): Call the_low_target.arch_setup after the
13466 target has stopped for the first time.
13467 (initialize_low): Do not call the_low_target.arch_setup.
13468
13469 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13470 (s390_set_pc): Likewise.
13471 (s390_arch_setup): New function.
13472 (the_low_target): Use s390_arch_setup as arch_setup routine.
13473
13474 * regcache.c (realloc_register_cache): New function.
13475 (set_register_cache): Call it for each existing regcache.
13476
d05b4ac3
UW
134772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13478
13479 * server.h (init_registers): Remove prototype.
13480
13481 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13482 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13483 instead of init_registers ().
13484 * linux-arm-low.c (init_registers_arm): Add prototype.
13485 (init_registers_arm_with_iwmmxt): Likewise.
13486 (the_low_target): Add initializer for arch_setup field.
13487 * linux-cris-low.c (init_registers_cris): Add prototype.
13488 (the_low_target): Add initializer for arch_setup field.
13489 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13490 (the_low_target): Add initializer for arch_setup field.
13491 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13492 (the_low_target): Add initializer for arch_setup field.
13493 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13494 (the_low_target): Add initializer for arch_setup field.
13495 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13496 (the_low_target): Add initializer for arch_setup field.
13497 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13498 (the_low_target): Add initializer for arch_setup field.
13499 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13500 (init_registers_mips64_linux): Likewise.
13501 (the_low_target): Add initializer for arch_setup field.
13502 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13503 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13504 (the_low_target): Add initializer for arch_setup field.
13505 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13506 (init_registers_powerpc_64): Likewise.
13507 (the_low_target): Add initializer for arch_setup field.
13508 * linux-s390-low.c (init_registers_s390): Add prototype.
13509 (init_registers_s390x): Likewise.
13510 (the_low_target): Add initializer for arch_setup field.
13511 * linux-sh-low.c (init_registers_sh): Add prototype.
13512 (the_low_target): Add initializer for arch_setup field.
13513 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13514 (the_low_target): Add initializer for arch_setup field.
13515 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13516 (the_low_target): Add initializer for arch_setup field.
13517
13518 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13519 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13520 instead of init_registers ().
13521 * win32-arm-low.c (init_registers_arm): Add prototype.
13522 (the_low_target): Add initializer for arch_setup field.
13523 * win32-i386-low.c (init_registers_i386): Add prototype.
13524 (the_low_target): Add initializer for arch_setup field.
13525
13526 * spu-low.c (init_registers_spu): Add prototype.
13527 (initialize_low): Call initialie_registers_spu () instead of
13528 initialize_registers ().
13529
fd96d250
PA
135302008-02-19 Pedro Alves <pedro@codesourcery.com>
13531
13532 * server.c (handle_v_requests): When handling the vRun and vAttach
13533 packets, if already debugging a process, don't kill it. Return an
13534 error instead.
13535
d41b6bb4
DJ
135362008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * server.c (handle_query): Correct length check.
13539
5ac588cf
PA
135402008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13541
13542 * win32-low.c (do_initial_child_stuff): Add process handle
13543 parameter. Set current_process_handle and current_process_id from the
13544 parameters. Clear globals.
13545 (win32_create_inferior): Don't set current_process_handle and
13546 current_process_id here. Instead pass them on the call to
13547 do_initial_child_stuff.
13548 (win32_attach): Likewise.
13549 (win32_clear_inferiors): New.
13550 (win32_kill): Don't close the current process handle or the
13551 current thread handle here. Instead call win32_clear_inferiors.
13552 (win32_detach): Don't open a new handle to the process. Call
13553 win32_clear_inferiors.
13554 (win32_join): Don't rely on current_process_handle; open a new
13555 handle using the process id.
13556 (win32_wait): Call win32_clear_inferiors when the inferior process
13557 has exited.
13558
ecd7ecbc
DJ
135592008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13560
13561 * server.c (monitor_show_help): Add "exit".
13562
1525d545
MG
135632008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13564
ecd7ecbc 13565 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13566 (clean): Add reg-xtensa.c.
13567 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13568 * configure.srv (xtensa*-*-linux*) New target.
13569 * linux-xtensa-low.c: New.
13570 * xtensa-xtregs.c: New.
1525d545 13571
59a016f0
PA
135722008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13573
13574 * hostio.c: Don't include errno.h.
13575 (errno_to_fileio_errno): Move to hostio-errno.
13576 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13577 error number outputting to the target->hostio_last_error callback.
13578 (hostio_packet_error): Use FILEIO_EINVAL directly.
13579 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13580 calls to hostio_error.
13581 * hostio-errno.c: New.
13582 * server.h (hostio_last_error_from_errno): Declare.
13583 * target.h (target_ops): Add hostio_last_error member.
13584 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13585 as hostio_last_error handler.
889bf7c5 13586 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13587 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13588 (wince_hostio_last_error): New functions.
13589 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13590 as hostio_last_error handler.
13591 (win32_target_ops) [!_WIN32_WCE]: Register
13592 hostio_last_error_from_errno as hostio_last_error handler.
13593 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13594 (hostio-errno.o): New rule.
13595 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13596 * configure.srv (srv_hostio_err_objs): New variable. Default to
13597 hostio-errno.o.
13598 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13599 * configure: Regenerate.
13600
2d717e4f
DJ
136012008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13602
13603 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13604 (linux_kill, linux_detach): Clean up the process list.
13605 * remote-utils.c (remote_open): Improve port number parsing.
13606 (putpkt_binary, input_interrupt): Only send interrupts if the target
13607 is running.
13608 * server.c (extended_protocol): Make static.
13609 (attached): Define earlier.
13610 (exit_requested, response_needed, program_argv): New variables.
13611 (target_running): New.
13612 (start_inferior): Clear attached here.
13613 (attach_inferior): Set attached here.
13614 (require_running): Define.
13615 (handle_query): Use require_running and target_running. Implement
13616 "monitor exit".
13617 (handle_v_attach, handle_v_run): New.
13618 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13619 (gdbserver_usage): Update.
13620 (main): Redo argument parsing. Handle --debug and --multi. Handle
13621 --attach along with other options or after the port. Save
13622 program_argv. Support no initial program. Resynchronize
13623 communication with GDB after an error. Handle "monitor exit".
13624 Use require_running and target_running. Always allow the extended
13625 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13626 restart in extended mode.
13627 * README: Refer to the GDB manual. Update --attach usage.
13628
7407e2de
AS
136292007-12-20 Andreas Schwab <schwab@suse.de>
13630
13631 * linux-low.c (STACK_SIZE): Define.
13632 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13633 (linux_test_for_tracefork): Likewise.
13634
b65d95c5
DJ
136352007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13636
13637 * linux-low.c (linux_wait_for_event): Update messages. Do not
13638 reinsert auto-delete breakpoints.
13639 * mem-break.c (struct breakpoint): Change return type of handler to
13640 int.
13641 (set_breakpoint_at): Update handler type.
13642 (reinsert_breakpoint_handler): Return 1 instead of calling
13643 delete_breakpoint.
13644 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13645 setting a new one.
13646 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13647 * mem-break.h (set_breakpoint_at): Update handler type.
13648 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13649 * win32-low.c (auto_delete_breakpoint): New.
13650 (get_child_debug_event): Use it.
13651
4e799345
DJ
136522007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13653
13654 * configure.ac: Check for pread and pwrite.
13655 * hostio.c (handle_pread): Fall back to lseek and read.
13656 (handle_pwrite): Fall back to lseek and write.
13657 * config.in, configure: Regenerated.
13658
27524b67
DJ
136592007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13660
13661 * server.c (myresume): Add own_buf argument.
13662 (main): Update calls.
13663
a20d5e98
DJ
136642007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13667 * remote-utils.c (remote_open): Do not call disable_async_io.
13668 (block_async_io): Delete.
13669 (unblock_async_io): Make static.
13670 (initialize_async_io): New.
13671 * server.c (handle_v_cont): Handle async I/O here.
13672 (myresume): Likewise. Move other common resume tasks here...
13673 (main): ... from here. Call initialize_async_io. Disable async
13674 I/O before the main loop.
13675 * server.h (initialize_async_io): Declare.
13676 (block_async_io, unblock_async_io): Delete prototypes.
13677 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13678
b79d787e
DJ
136792007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13680
13681 * remote-utils.c (readchar): Allow binary data in received messages.
13682
d97903b2
PA
136832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13684
13685 * win32-low.c (attaching): New global.
13686 (win32_create_inferior): Clear the `attaching' global.
13687 (win32_attach): Set the `attaching' global.
13688 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13689 attaching. Only set a breakpoint at the entry point if not
13690 attaching.
13691
311de423
PA
136922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13693
13694 * server.c (main): Don't report dll events on the initial
13695 connection on attaches.
13696
6c2d16d2
PA
136972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13698
13699 * server.c (main): Relax numerical bases supported for the pid of
13700 the --attach command line argument.
13701
5ca906e6
PA
137022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13703
13704 * win32-low.c (win32_attach): Call OpenProcess before
13705 DebugActiveProcess, not after. Add last error output to error
13706 call.
13707
9c6c8194
PA
137082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13709
13710 * win32-low.c (win32_get_thread_context)
13711 (win32_set_thread_context): New functions.
13712 (thread_rec): Use win32_get_thread_context.
13713 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13714 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13715 field.
13716
4d5d1aaa
PA
137172007-12-03 Leo Zayas
13718 Pedro Alves <pedro_alves@portugalmail.pt>
13719
13720 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13721 global variables.
13722 (child_add_thread): Minor cleanup.
13723 (child_continue): Resume artificially suspended threads before
13724 calling ContinueDebugEvent.
13725 (suspend_one_thread): New.
13726 (fake_breakpoint_event): New.
13727 (get_child_debug_event): Change return type to int. Check here if
13728 gdb sent an interrupt request. If a soft interrupt was requested,
13729 fake a breakpoint event. Return 0 if there is no event to handle,
13730 and 1 otherwise.
13731 (win32_wait): Don't check here if gdb sent an interrupt request.
13732 Ensure there is a valid event to handle.
13733 (win32_request_interrupt): Add soft interruption method as last
13734 resort.
13735
c436e841
PA
137362007-12-03 Leo Zayas
13737 Pedro Alves <pedro_alves@portugalmail.pt>
13738
13739 * win32-low.h (win32_thread_info): Add descriptions to the
13740 structure members. Replace `suspend_count' counter by a
13741 `suspended' flag.
13742 * win32-low.c (thread_rec): Update condition of when to get the
13743 context from the inferior. Rely on ContextFlags being set if it
13744 has already been retrieved. Only suspend the inferior thread if
13745 we haven't already. Warn if that fails.
13746 (continue_one_thread): s/suspend_count/suspended/. Only call
13747 ResumeThread once. Warn if that fails.
13748
e7b5fa67
PA
137492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13750
13751 * win32-low.c (win32_wait): Don't read from the inferior when it
13752 has already exited.
13753
a385171d
PA
137542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13755
13756 * Makefile.in (win32_low_h): New variable.
13757 (win32-low.o): Add dependency on $(win32_low_h).
13758 (win32-arm-low.o, win32-i386-low.o): New rules.
13759
f80c84b3
DJ
137602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13761
13762 * hostio.c: Correct copyright year.
13763
a6b151f1
DJ
137642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13765
13766 * Makefile.in (OBS): Add hostio.o.
13767 (hostio.o): New rule.
13768 * server.h (handle_vFile): Declare.
13769 * hostio.c: New file.
13770 * server.c (handle_v_requests): Take packet_len and new_packet_len
13771 for binary packets. Call handle_vFile.
13772 (main): Update call to handle_v_requests.
13773
f9387fc3
DJ
137742007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * linux-low.c: Include <sched.h>.
13777
51c2684e
DJ
137782007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13779
13780 * linux-low.c (linux_tracefork_grandchild): New.
13781 (linux_tracefork_child): Use clone.
13782 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13783
75f83163
JB
137842007-10-31 Joel Brobecker <brobecker@adacore.com>
13785
13786 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13787
da5898ce
DJ
137882007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13789
13790 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13791
24a09b5f
DJ
137922007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * inferiors.c (change_inferior_id): Delete.
13795 (add_pid_to_list, pull_pid_from_list): New.
13796 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13797 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13798 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13799 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13800 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13801 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13802 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13803 (using_threads): Always set to 1.
13804 (handle_extended_wait): New.
13805 (add_process): Do not set TID.
13806 (linux_create_inferior): Set must_set_ptrace_flags.
13807 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13808 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13809 (linux_thread_alive): Rename TID argument to LWPID.
13810 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13811 (linux_wait_for_event): Do not use TID or check using_threads. Update
13812 call to dead_thread_notify. Call handle_extended_wait.
13813 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13814 (send_sigstop): Delete sigstop_sent.
13815 (wait_for_sigstop): Avoid TID.
13816 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13817 (linux_test_for_tracefork): New.
13818 (linux_lookup_signals): Use thread_db_active and
13819 linux_supports_tracefork_flag.
13820 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13821 * linux-low.h (get_process_thread): Avoid TID.
13822 (struct process_ifo): Move thread_known and tid to the end. Remove
13823 sigstop_sent.
13824 (linux_attach_lwp, thread_db_init): Update prototypes.
13825 * server.h (change_inferior_id): Delete prototype.
13826 (add_pid_to_list, pull_pid_from_list): New prototypes.
13827 * thread-db.c (thread_db_use_events): New.
13828 (find_first_thread): Rename to...
13829 (find_one_thread): ...this. Update callers and messages. Do not
13830 call fatal. Check thread_db_use_events. Do not call
13831 change_inferior_id or new_thread_notify.
13832 (maybe_attach_thread): Update. Do not call new_thread_notify.
13833 (thread_db_init): Set thread_db_use_events. Check use_events.
13834 * utils.c (fatal, warning): Correct message prefix.
13835
30ed0a8f
DJ
138362007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * Makefile.in (clean): Remove new files.
13839 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13840 (powerpc-64.o, powerpc-64.c): New rules.
13841 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13842 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13843 with SPE.
13844 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13845 SPE targets.
13846 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13847 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13848 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13849 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13850 (target_regsets): Add AltiVec and SPE register sets.
13851 * configure.ac: Check for AltiVec and SPE.
13852 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13853 (ppc_fill_vrregset, ppc_store_vrregset): New.
13854 (target_regsets): Add AltiVec register set.
13855 * configure: Regenerated.
13856
fd462a61
DJ
138572007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * linux-low.c (O_LARGEFILE): Define.
13860 (linux_read_memory): Use /proc/PID/mem.
13861 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13862 * configure, config.in: Regenerated.
13863
69f223ed
DJ
138642007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * linux-low.c (linux_wait_for_event): Do not pass signals while
13867 single-stepping.
13868
aec18585
PA
138692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13870
13871 * win32-low.c (create_process): New.
13872 (win32_create_inferior): Use create_process instead of
13873 CreateProcess. If create_process failed retry appending an ".exe"
13874 suffix. Store the GetLastError result immediatelly after
13875 create_process calls and use it on the call to error.
13876
34d86ddd
PA
138772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13878
13879 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13880
5a0e3bd0
JB
138812007-08-23 Joel Brobecker <brobecker@adacore.com>
13882
13883 * configure.ac: Switch license to GPLv3.
13884
f88c79e6
MS
138852007-08-01 Michael Snyder <msnyder@access-company.com>
13886
13887 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13888
6b3d9b83
PA
138892007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13890
13891 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13892 typedef.
13893 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13894 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13895 CloseToolhelp32Snapshot.
13896 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13897 CloseToolhelp32Snapshot.
13898
c588c53c
MS
138992007-07-27 Michael Snyder <michael.snyder@access-company.com>
13900
13901 * server.c (main): Check for inferior exit before main loop.
13902
aa0403d9
PA
139032007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13904
13905 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13906 instead of on tmp_desc.
13907
255e7678
DJ
139082007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13909 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13912 (add_thread): Minor cleanups.
13913 (clear_inferiors): Move lower in the file. Clear the DLL
13914 list.
13915 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13916 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13917 (xml_escape_text): New.
13918 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13919 for qSupported.
13920 (handle_v_cont): Report errors.
13921 (gdbserver_version): Update.
13922 (main): Correct size of own_buf. Do not report initial DLL events.
13923 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13924 (unloaded_dll, xml_escape_text): New.
13925 * win32-low.c (enum target_waitkind): Update comments.
13926 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13927 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13928 (win32_EnumProcessModules, win32_GetModuleInformation)
13929 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13930 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13931 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13932 (win32_Module32First, win32_Module32Next, load_toolhelp)
13933 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13934 (get_child_debug_event): Handle DLL events.
13935 (win32_wait): Likewise.
13936
0d37add9
DJ
139372007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13940 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13941
45e2715e
PA
139422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * win32-low.c (handle_output_debug_string): Ignore event if not
13945 waiting.
13946
c5674cf1
PA
139472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13948
13949 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13950
2bbe3cc1
DJ
139512007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13954
ae13219e
DJ
139552007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * inferiors.c (change_inferior_id): Add comment.
13958 * linux-low.c (check_removed_breakpoint): Add an early
13959 prototype. Improve debug output.
13960 (linux_attach): Doc update.
13961 (linux_detach_one_process, linux_detach): Clean up before releasing
13962 each process.
13963 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13964 * linux-low.h (struct process_info): Doc improvement.
13965 * mem-break.c (delete_all_breakpoints): New.
13966 * mem-break.h (delete_all_breakpoints): New prototype.
13967 * thread-db.c (find_first_thread): New.
13968 (thread_db_create_event): Call it instead of
13969 thread_db_find_new_threads. Clean up unused variables.
13970 (maybe_attach_thread): Remove first thread handling.
13971 (thread_db_find_new_threads): Use find_first_thread.
13972 (thread_db_get_tls_address): Likewise.
13973
4105de34
DJ
139742007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * thread-db.c (thread_db_find_new_threads): Add prototype.
13977 (thread_db_create_event): Check for the main thread before adding
13978 a new thread.
13979 (maybe_attach_thread): Only enable event reporting if TID == 0.
13980 (thread_db_get_tls_address): Check for new threads.
13981
2b876972
DJ
139822007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * linux-low.c (linux_create_inferior): Try execv before execvp.
13985 * spu-low.c (spu_create_inferior): Likewise.
13986
7a245884
DJ
139872007-06-13 Mike Frysinger <vapier@gentoo.org>
13988
13989 * linux-low.c (linux_create_inferior): Change execv to execvp.
13990 * spu-low.c (spu_create_inferior): Likewies.
13991
117ce543
DJ
139922007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13993
13994 * Makefile.in (clean): Clean new files instead of deleted ones.
13995 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13996 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13997 rules.
13998 * configure.srv: Specify XML files and new regformats for MIPS and
13999 MIPS64 GNU/Linux.
14000 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14001 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14002 an entry for the restart register.
14003 (mips_cannot_fetch_register, mips_cannot_store_register)
14004 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14005 register names to match the XML descriptions.
14006 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14007 restart register instead of $0.
14008
0e7f50da
UW
140092007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14010 Markus Deuling <deuling@de.ibm.com>
14011
14012 * remote-utils.c (decode_xfer_write): New function.
14013 * server.h (decode_xfer_write): Add prototype.
14014 * server.c (handle_query): Add PACKET_LEN argument. Support
14015 qXfer:spu:read and qXfer:spu:write packets.
14016 (main): Pass packet_len to handle_query.
14017 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14018 * target.h (target_ops): Add qxfer_spu.
14019
374c1d38
UW
140202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14021
14022 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14023 accessing non-seekable spufs files.
14024
bb63802a
UW
140252007-05-16 Markus Deuling <deuling@de.ibm.com>
14026
889bf7c5 14027 * server.c (handle_query): Add reply for qC packet.
bb63802a 14028
7390519e
PA
140292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14030 Leo Zayas <lerele@champenstudios@com>
14031
14032 * server.h (check_remote_input_interrupt_request): New function.
14033 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14034 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14035 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14036 (check_remote_input_interrupt_request): New function.
14037 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14038 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14039 winapi_GenerateConsoleCtrlEvent): New typedefs.
14040 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14041 to 250 ms.
14042 (win32_wait): Check for remote interrupt request
14043 with check_remote_input_interrupt_request.
14044 (win32_request_interrupt): New function.
14045 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14046
34b34921
PA
140472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14048
14049 * win32-low.c (debug_registers_changed,
14050 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14051 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14052 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14053 (thread_rec): Get context using the low target.
14054 (child_add_thread): Call thread_added on the low target,
14055 which does the same thing.
14056 (regptr): Delete.
14057 (do_initial_child_stuff): Remove debug registers references.
14058 Set context using the low target. Resume threads after
14059 setting the contexts.
14060 (child_continue): Remove dead variable. Remove debug
14061 registers references.
14062 (child_fetch_inferior_registers): Go through the low target.
14063 (do_child_store_inferior_registers): Remove.
14064 (child_store_inferior_registers): Go through the low target.
14065 (win32_resume): Remove debug registers references.
14066 Set context using the low target.
14067 (handle_exception): Change return type to void. Don't record
14068 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14069 first chance exception.
889bf7c5 14070 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14071 goto loop. Always return after waiting for debug event.
14072 (win32_wait): Convert to switch statement. Handle spurious
14073 events.
14074
14075 * win32-i386-low.c (debug_registers_changed,
14076 debug_registers_used): New.
14077 (initial_stuff): Rename to ...
14078 (i386_initial_stuff): ... this. Clear debug registers
14079 state variables.
14080 (store_debug_registers): Delete.
14081 (i386_get_thread_context): New.
14082 (load_debug_registers): Delete.
14083 (i386_set_thread_context): New.
14084 (i386_thread_added): New.
14085 (single_step): Rename to ...
14086 (i386_single_step): ... this.
14087 (do_fetch_inferior_registers): Rename to ...
14088 (i386_fetch_inferior_register): ... this.
14089 (i386_store_inferior_register): New.
14090 (the_low_target): Adapt to new interface.
14091
14092 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14093 (arm_get_thread_context): New.
14094 (arm_set_thread_context): New.
14095 (regptr): New.
14096 (do_fetch_inferior_registers): Rename to ...
14097 (arm_fetch_inferior_register): ... this.
14098 (arm_store_inferior_register): New.
14099 (arm_wince_breakpoint): Reimplement as unsigned long.
14100 (arm_wince_breakpoint_len): Define.
14101 (the_low_target): Adapt to new interface.
14102
14103 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14104 load_debug_registers. Add get_thread_context, set_thread_context,
14105 thread_added and store_inferior_register. Rename
14106 fetch_inferior_registers to fetch_inferior_register.
14107 (regptr): Remove declaration.
14108
dd6953e1
PA
141092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * linux-low.c (linux_detach): Change return type to int. Return 0.
14112 * spu-low.c (spu_detach): Likewise.
14113
444d6139
PA
141142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * target.h (target_ops): Change return type of detach to int.
14117 Add join.
14118 (join_inferior): New.
14119 * server.c (main): Don't skip detach support on mingw32.
14120 If the inferior doesn't support detaching return error.
14121 Call join_inferior instead of using waitpid.
14122 * linux-low.c (linux_join): New.
14123 (linux_target_op): Add linux_join.
14124 * spu-low.c (spu_join): New.
14125 (spu_target_ops): Add spu_join.
14126 * win32-low.c (win32_detach): Adapt to new interface.
14127 Reopen current_process_handle before detaching. Issue a child
14128 resume before detaching.
14129 (win32_join): New.
14130 (win32_target_op): Add win32_join.
14131
1d5315fe
PA
141322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * win32-low.c (win32-attach): Fix return value.
14135 * target.h (target_ops): Describe ATTACH return values.
14136
bf914831
PA
141372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14138
14139 * win32-low.c (GETPROCADDRESS): Define.
14140 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14141 (winapi_DebugSetProcessKillOnExit): Likewise.
14142 (win32_create_inferior): Force usage of ansi CreateProcessA.
14143 (win32_attach): Use GETPROCADDRESS.
14144 (win32_detach): Likewise.
14145
f72f3e60
PA
141462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14147
14148 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14149
ed50f18f
PA
141502007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14151
14152 * win32-low.c: Commit leftover changes from 2007-03-29.
14153
0c2ead7e
DJ
141542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14157 fields short instead of int. Add explicit padding.
14158 (i387_cache_to_fsave): Remove unnecessary casts.
14159 (i387_fsave_to_cache): Doc fix.
14160 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14161
73725ff3
DJ
141622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14163
14164 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14165 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14166
d99f33d8
PA
141672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14168
14169 * configure.srv (arm*-*-mingw32ce*): Move near the other
14170 arm targets.
14171
68070c10
PA
141722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14173
2482afc6 14174 * configure.ac: Add errno checking.
68070c10
PA
14175 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14176 sys/file.h and malloc.h.
14177 (AC_CHECK_DECLS): Add perror.
14178 (srv_mingwce): Handle.
2482afc6 14179 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14180 win32-i386-low.o to srv_tgtobj.
14181 (i[34567]86-*-mingw*): Likewise.
14182 (arm*-*-mingw32ce*): Add case.
14183 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14184 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14185 [__MINGW32CE__] (strerror): New function.
14186 [__MINGW32CE__] (errno): Define to GetLastError.
14187 [__MINGW32CE__] (COUNTOF): New macro.
14188 (remote_open): Remove extra close call.
14189 * mem-break.c (delete_breakpoint_at): New function.
14190 * mem-break.h (delete_breakpoint_at): Declare.
14191 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14192 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14193 [USE_WIN32API] (read, write): Add char* casts.
14194 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14195 * server.h: Include wincecompat.h on Windows CE.
14196 [HAVE_ERRNO_H]: Check.
14197 (perror): Declare if not declared.
14198 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14199 (perror_with_name): Remove errno declaration.
14200 * wincecompat.h: New.
14201 * wincecompat.c: New.
14202 * win32-low.h: New.
14203 * win32-arm-low.c: New.
14204 * win32-i386-low.c: New.
14205 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14206 (OUTMSG2): Make it safe.
14207 (_T): New macro.
14208 (COUNTOF): New macro.
14209 (NUM_REGS): Get it from the low target.
14210 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14211 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14212 (thread_rec): Let low target handle debug registers.
14213 (child_add_thread): Likewise.
14214 (child_init_thread_list): Likewise.
14215 (continue_one_thread): Likewise.
14216 (regptr): New.
14217 (do_child_fetch_inferior_registers): Move to ...
14218 * win32-i386-low.c: ... here, and rename to ...
14219 (do_fetch_inferior_registers): ... this.
889bf7c5 14220 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14221 Go through the low target.
14222 (do_child_store_inferior_registers): Use regptr.
14223 (strwinerror): New function.
14224 (win32_create_inferior): Handle Windows CE.
14225 Use strwinerror instead of strerror on Windows error
14226 codes. Add program to the error output.
14227 Don't close the main thread handle on Windows CE.
14228 (win32_attach): Use coredll.dll on Windows CE.
14229 (win32_kill): Close current process and current
14230 thread handles.
14231 (win32_detach): Use coredll.dll on Windows CE.
14232 (win32_resume): Let low target handle debug registers, and
14233 step request.
14234 (handle_exception): Add/Remove initial breakpoint. Avoid
14235 non-existant WSTOPSIG on Windows CE.
14236 (win32_read_inferior_memory): Cast to remove warning.
14237 (win32_arch_string): Go through the low target.
14238 (initialize_low): Call set_breakpoint_data with the low
14239 target's breakpoint.
14240 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14241 FOP_REGNUM, mappings): Move to ...
14242 * win32-i386-low.c: ... here.
14243 * win32-low.c (win32_thread_info): Move to ...
14244 * win32-low.h: ... here.
14245 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14246 win32-arm-low.c and wincecompat.c.
14247 (all:): Add $EXEEXT.
14248 (install-only:): Likewise.
14249 (gdbserver:): Likewise.
14250 (gdbreplay:): Likewise.
14251 * config.in: Regenerate.
14252 * configure: Regenerate.
14253
41093d81
PA
142542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14255
14256 * win32-low.c: Rename typedef thread_info to
14257 win32_thread_info throughout.
14258
544afa54
PA
142592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14260
14261 * win32-i386-low.c: Rename to ...
14262 * win32-low.c: ... this.
14263 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14264 * Makefile.in: Likewise.
14265
bce7165d
PA
142662007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14267
14268 * remote-utils.c (monitor_output): Constify msg parameter.
14269 * server.h (monitor_output): Likewise.
14270 * win32-i386-low.c (handle_output_debug_string): New.
14271 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14272 handle_output_debug_string.
14273 (get_child_debug_event): Likewise.
14274
506c7aa0
DJ
142752007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14276
14277 * server.c (main): Correct strtoul check.
14278
42c81e2a
DJ
142792007-03-27 Jon Ringle <jon@ringle.org>
14280
14281 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14282
9453113a
DJ
142832007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14284
14285 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14286
64a69107
DJ
142872007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * terminal.h: Check HAVE_SGTTY_H.
14290
142912007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14292
14293 * remote-utils.c (remote_open): Print out the assigned port number.
14294
c74d0ad8
DJ
142952007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * remote-utils.c (monitor_output): New function.
14298 * server.c (debug_threads): Define here.
14299 (monitor_show_help): New function.
14300 (handle_query): Handle qRcmd.
14301 (main): Do not handle 'd' packet.
14302 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14303 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14304 of debug_threads.
14305
de7c3b4a
PA
143062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14307
14308 * Makefile.in (EXEEXT): New.
14309 (clean): Use $(EXEEXT).
14310
ef57601b
PA
143112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14312
14313 * target.h (target_ops): Rename send_signal to request_interrupt,
14314 and remove enum target_signal parameter.
14315 * linux-low.c (linux_request_interrupt): Rename from
14316 linux_send_signal, and always send SIGINT.
14317 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14318 and always send SIGINT.
14319 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14320 of send_signal.
14321 (input_interrupt): Likewise.
14322
820f2bda
PA
143232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14324
14325 * server.c (get_features_xml): Check if target implemented
14326 arch_string.
14327 * win32-i386-low.c (win32_arch_string): New.
14328 (win32_target_ops): Add win32_arch_string as arch_string member.
14329
ab39bf24
UW
143302007-02-22 Markus Deuling <deuling@de.ibm.com>
14331
14332 * spu-low.c (spu_arch_string): New.
14333 (spu_target_ops): Add spu_arch_string.
14334
61ff6e04
DJ
143352007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14338 * configure.ac: Do not check for terminal.h.
14339 * configure, config.in: Regenerated.
14340
fb1e4ffc
DJ
143412007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * Makefile.in (OBS): Add $(XML_BUILTIN).
14344 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14345 (clean): Update.
14346 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14347 (arm-with-iwmmxt.c): New.
14348 * config.in, configure: Regenerate.
14349 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14350 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14351 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14352 (arm*-*-linux*): Add iWMMXt and regset support.
14353 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14354 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14355 (arm_store_wmmxregset, target_regsets): New.
14356 * server.c (get_features_xml): Take annex argument. Check builtin
14357 XML documents.
14358 (handle_query): Handle multiple annexes.
14359
0f48aa01
DJ
143602007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * remote-utils.c [USE_WIN32API] (read, write): Define.
14363 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14364 write.
14365
23181151
DJ
143662007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * linux-i386-low.c (the_low_target): Set arch_string.
14369 * linux-x86-64-low.c (the_low_target): Likewise.
14370 * linux-low.c (linux_arch_string): New.
14371 (linux_target_ops): Add it.
14372 * linux-low.h (struct linux_target_ops): Add arch_string.
14373 * server.c (write_qxfer_response): Use const void * for DATA.
14374 (get_features_xml): New.
14375 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14376 * target.h (struct target_ops): Add arch_string method.
14377
9d606399
DJ
143782007-01-03 Denis Pilat <denis.pilat@st.com>
14379 Daniel Jacobowitz <dan@codesourcery.com>
14380
14381 * linux-low.c (linux_kill): Handle being called with no threads.
14382 * win32-i386-low.c (win32_kill): Likewise.
14383 (get_child_debug_event): Clear current_process_handle.
14384
143852006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14386 Daniel Jacobowitz <dan@codesourcery.com>
14387
14388 * remote-utils.c (remote_open): Check the type of specified
14389 serial port devices before opening them.
14390 * server.c (main): Kill the inferior if an error occurs during
14391 the first remote_open.
14392
a5e13d24
DJ
143932006-12-05 Markus Deuling <deuling@de.ibm.com>
14394
14395 * README: Update supported targets.
14396
186947f7
DJ
143972006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * Makefile.in (clean): Remove reg-mips64.c.
14400 (reg-mips64.c, reg-mips64.o): New rules.
14401 * configure.srv: Handle mips64. Include regset support for mips.
14402 * linux-mips-low.c (union mips_register): New.
14403 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14404 (mips_breakpoint, mips_breakpoint_at): Use int.
14405 (mips_collect_register, mips_supply_register)
14406 (mips_collect_register_32bit, mips_supply_register_32bit)
14407 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14408 (mips_store_fpregset, target_regsets): New.
14409 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14410
a13e2c95
UW
144112006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14412
14413 * configure.srv: Add target "spu*-*-*".
14414 * Makefile.in (clean): Remove reg-spu.c.
14415 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14416 * spu-low.c: New file.
14417
cb7283db
DJ
144182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14419
14420 * configure.ac: Correct td_thr_tls_get_addr test.
14421 * configure: Regenerated.
14422
89be2091
DJ
144232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * linux-low.c (linux_wait_for_event): Reformat. Use the
14426 pass_signals array.
14427 * remote-utils.c (decode_address_to_semicolon): New.
14428 * server.c (pass_signals, handle_general_set): New.
14429 (handle_query): Mention QPassSignals for qSupported.
14430 (main): Call handle_general_set.
14431 * server.h (pass_signals, decode_address_to_semicolon): New.
14432
000ef4f0
DJ
144332006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14434
14435 * server.c (handle_query): Correct error handling for read_auxv.
14436
b7149293
UW
144372005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14438
14439 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14440 and srv_linux_thread_db to yes.
14441 * linux-s390-low.c (s390_fill_gregset): New function.
14442 (target_regsets): Define data structure.
14443
dae5f5cf
DJ
144442006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14445
14446 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14447 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14448 * config.in, configure: Regenerated.
14449 * inferiors.c (gdb_id_to_thread): New function.
14450 (gdb_id_to_thread_id): Use it.
14451 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14452 * linux-low.h (struct process_info): Add th member.
14453 (thread_db_get_tls_address): New prototype.
14454 * remote-utils.c (decode_address): Make non-static.
14455 * server.c (handle_query): Handle qGetTLSAddr.
14456 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14457 * target.h (struct target_ops): Add get_tls_address.
14458 * thread-db.c (maybe_attach_thread): Save the thread handle.
14459 (thread_db_get_tls_address): New.
14460
32ca6d61
DJ
144612006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14464 (linux_resume_one_process): Take a siginfo_t *. Update all
14465 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14466 (struct pending_signals): Add a siginfo_t.
14467 (linux_wait_for_process): Always set last_status.
14468 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14469 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14470 * linux-low.h (struct process_info): Add last_status.
14471
5ffff7c1
DJ
144722006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * remote-utils.c (try_rle): New function.
14475 (putpkt_binary): Use it.
14476
8695c747
DJ
144772006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14478
14479 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14480 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14481 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14482 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14483 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14484 point registers.
14485
290fadea
RS
144862006-08-08 Richard Sandiford <richard@codesourcery.com>
14487
14488 * server.c (terminal_fd): New variable.
14489 (old_foreground_pgrp): Likewise.
14490 (restore_old_foreground_pgrp): New function.
14491 (start_inferior): Record the terminal file descriptor in terminal_fd
14492 and its original foreground group in old_foreground_pgrp. Register
14493 restore_old_foreground_pgrp with atexit().
14494
9f2e1e63
DJ
144952006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * server.c (handle_query): Correct qPart to qXfer.
14498
b80864fb
DJ
144992006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * configure.ac: Check for more headers which are missing on
14502 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14503 * configure.srv: Add Cygwin and mingw32.
14504 * remote-utils.c: Don't include headers unconditionally which
14505 are missing on mingw32. Include <winsock.h> for mingw32.
14506 (remote_open): Adjust for mingw32 support. Flush
14507 standard error after writing to it.
14508 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14509 (unblock_async_io, enable_async_io, disable_async_io)
14510 (readchar, getpkt): Update for Winsock support.
14511 (prepare_resume_reply): Expect a protocol signal number.
14512 * server.c: Disable <sys/wait.h> on mingw32.
14513 (start_inferior): Adjust for mingw32 support. Flush
14514 standard error after writing to it.
14515 (attach_inferior): Likewise. Use protocol signal
14516 numbers.
14517 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14518 and names.
14519 * win32-i386-low.c: New file.
14520 * Makefile.in (XM_CLIBS): Set.
14521 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14522 (win32-i386-low.o): New dependency rule.
14523 * linux-low.c (linux_wait): Use target signal numbers.
14524 * target.h (struct target_ops): Doc fix.
14525 * server.h (target_signal_to_name): New prototype.
14526 * gdbreplay.c: Don't include headers unconditionally which
14527 are missing on mingw32. Include <winsock.h> for mingw32.
14528 (remote_close, remote_open): Adjust for Winsock support.
14529 * configure, config.in: Regenerated.
14530
0876f84a
DJ
145312006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14532
14533 * server.c (decode_xfer_read, write_qxfer_response): New.
14534 (handle_query): Take a packet length argument. Handle
14535 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14536 the qSupported response.
14537 (main): Update call to handle_query.
14538
01f9e8fa
DJ
145392006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14540
14541 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14542 (putpkt_binary): Renamed from putpkt and adjusted for binary
14543 data.
14544 (putpkt): New wrapper for putpkt_binary.
14545 (readchar): Don't mask off the high bit.
14546 (decode_X_packet): New function.
14547 * server.c (main): Call putpkt_binary if a handler sets the packet
14548 length. Save the length of the incoming packet. Handle 'X'.
14549 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14550
be2a5f71
DJ
145512006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * server.c (handle_query): Handle qSupported.
14554
ea025f5f
DJ
145552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14556
14557 * remote-utils.c (all_symbols_looked_up): New variable.
14558 (look_up_one_symbol): Check it.
14559 * server.h (look_up_one_symbol): New declaration.
14560 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14561
9308fc88
DJ
145622006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14563
14564 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14565 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14566 (PTRACE_GET_THREAD_AREA): Define.
14567 (ps_get_thread_area): New function.
14568
52fb6437
NS
145692006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14570
14571 * configure.srv (m68k*-*-uclinux*): New target.
14572 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14573 (linux_resume_one_process): Remove extraneous cast.
14574 (linux_read_offsets): New.
14575 (linux_target_op): Add linux_read_offsets on mmuless systems.
14576 * server.c (handle_query): Add qOffsets logic.
14577 * target.h (struct target_ops): Add read_offsets.
14578
21b0f40c
DJ
145792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14580
14581 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14582 (PTRACE_GET_THREAD_AREA): Define.
14583 (ps_get_thread_area): New function.
14584 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14585 (linux-x86-64-low.o): Update.
14586
0050a760
DJ
145872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * configure.ac: Remove checks for prfpregset_t.
14590 * gdb_proc_service.h: New file.
14591 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14592 new "gdb_proc_service.h".
14593 * proc-service.c: Likewise.
14594 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14595 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14596 * Makefile.in (gdb_proc_service_h): Updated.
14597 * configure, config.in: Regenerated.
14598
b92a518e
DJ
145992006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14600
14601 * remote-utils.c (prepare_resume_reply): Move declaration
14602 of gdb_id_from_wait to the top of the block.
14603
545587ee
DJ
146042006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * linux-low.c (regsets_store_inferior_registers): Read the regset
14607 from the target before filling it.
14608
9db87ebd
DJ
146092006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * server.c (attach_inferior): Return SIGTRAP for a successful
14612 attach.
14613
dd24457d
DJ
146142006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14615
14616 * Makefile.in (OBS): Add version.o.
14617 (STAGESTUFF): Delete.
14618 (version.o): Add dependencies.
14619 (version.c): Replace rule.
14620 (clean): Remove version.c.
14621 * server.c (gdbserver_version): New.
14622 (gdbserver_usage): Use printf.
14623 (main): Handle --version and --help.
14624 * server.h (version, host_name): Add declarations.
14625
6f0f660e
EZ
146262005-12-23 Eli Zaretskii <eliz@gnu.org>
14627
889bf7c5
PA
14628 * linux-arm-low.c:
14629 * linux-arm-low.c:
14630 * inferiors.c:
14631 * i387-fp.h:
14632 * i387-fp.c:
14633 * gdbreplay.c:
14634 * regcache.c:
14635 * proc-service.c:
14636 * mem-break.h:
14637 * mem-break.c:
14638 * linux-x86-64-low.c:
14639 * linux-sh-low.c:
14640 * linux-s390-low.c:
14641 * linux-ppc64-low.c:
14642 * linux-ppc-low.c:
14643 * linux-mips-low.c:
14644 * linux-m68k-low.c:
14645 * linux-m32r-low.c:
14646 * linux-low.h:
14647 * linux-low.c:
14648 * linux-ia64-low.c:
14649 * linux-i386-low.c:
14650 * linux-crisv32-low.c:
14651 * thread-db.c:
14652 * terminal.h:
14653 * target.h:
14654 * target.c:
14655 * server.h:
14656 * server.c:
14657 * remote-utils.c:
14658 * regcache.h:
14659 * utils.c:
14660 * Makefile.in:
14661 * configure.ac:
6f0f660e
EZ
14662 * gdbserver.1: Add (C) after Copyright. Update the FSF
14663 address.
14664
9d1fb177
DJ
146652005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14668 (arm_breakpoint_at): Recognize both breakpoints.
14669 (the_low_target): Use the correct breakpoint instruction.
14670
011a70c2
DJ
146712005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14672
14673 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14674 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14675 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14676 (the_low_target): Update.
14677
7fb85e41
AS
146782005-10-25 Andreas Schwab <schwab@suse.de>
14679
14680 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14681
14682 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14683 (ia64_num_regs): Reduce to 462.
14684
3db0444b
DJ
146852005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * acinclude.m4: Correct quoting.
14688 * aclocal.m4: Regenerated.
14689
14690 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14691 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14692 (thread_db_init): Call thread_db_err_str.
14693 * configure.ac: Check for TD_VERSION.
14694 * config.in, configure: Regenerated.
14695
bee0189a
DJ
146962005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14697
14698 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14699
e9d25b98
DJ
147002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14703 is not available. Define HAVE_PTRACE_GETREGS if it is.
14704 * config.in, configure: Regenerated.
14705 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14706 * linux-i386-low.c, linux-m68k-low.c: Update to use
14707 HAVE_PTRACE_GETREGS.
14708 * linux-low.c (regsets_fetch_inferior_registers)
14709 (regsets_store_inferior_registers): Only return 0 if we processed
14710 GENERAL_REGS.
14711 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14712 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14713
a06660f7
DJ
147142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * inferiors.c (struct thread_info): Add gdb_id.
14717 (add_thread): Add gdb_id argument.
14718 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14719 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14720 calls to add_thread.
14721 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14722 * server.c (handle_query): Use thread_to_gdb_id.
14723 (handle_v_cont, main): Use gdb_id_to_thread_id.
14724 * server.h (add_thread): Update prototype.
14725 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14726 prototypes.
14727
5a1f5858
DJ
147282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14731 left-padded registers.
14732 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14733 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14734
e122f1f5
SE
147352005-07-01 Steve Ellcey <sje@cup.hp.com>
14736
14737 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14738 * configure: Regenerate.
14739 * config.in: Regenerate.
14740 * server.h (NEED_DECLARATION_STRERROR):
14741 Replace with !HAVE_DECL_STRERROR.
14742
d592fa2f
DJ
147432005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14744
14745 * linux-low.c (linux_wait, linux_send_signal): Don't test
14746 an unsigned long variable for > 0 if it could be MAX_ULONG.
14747 * server.c (myresume): Likewise.
14748 * target.c (set_desired_inferior): Likewise.
14749
ccbd4912
MK
147502005-06-13 Mark Kettenis <kettenis@gnu.org>
14751
14752 * configure.ac: Simplify and improve check for socklen_t.
14753 * configure, config.in: Regenerate.
14754
f450004a
DJ
147552005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * acconfig.h: Remove.
14758 * configure.ac: Add a test for socklen_t. Use three-argument
14759 AC_DEFINE throughout.
14760 * config.in: Regenerated using autoheader 2.59.
14761 * configure: Regenerated.
14762
14763 * gdbreplay.c (socklen_t): Provide a default.
14764 (remote_open): Use socklen_t.
14765 * remote-utils.c (socklen_t): Provide a default.
14766 (remote_open): Use socklen_t.
14767 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14768 unsigned char.
14769
14770 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14771 char for buffers.
14772 * linux-low.c (linux_read_memory, linux_write_memory)
14773 (linux_read_auxv): Likewise.
14774 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14775 (check_mem_write): Likewise.
14776 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14777 Likewise.
14778 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14779 (registers_from_string, register_data): Likewise.
14780 * server.c (handle_query, main): Likewise.
14781 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14782 (decode_M_packet): Likewise.
14783 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14784 * target.h (struct target_ops): Update read_memory, write_memory,
14785 and read_auxv.
14786 (read_inferior_memory, write_inferior_memory): Update.
14787 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14788 to unsigned char *.
14789 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14790 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14791 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14792 linux-s390-low.c, linux-sh-low.c: Update for changes in
14793 read_inferior_memory and the_low_target->breakpoint.
14794
eee84df1
DJ
147952005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14798 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14799 * configure.srv: Add powerpc64-*-linux*.
14800 * linux-ppc64-low.c: New file.
14801
45b134e5
OF
148022005-05-23 Orjan Friberg <orjanf@axis.com>
14803
14804 * linux-cris-low.c: New file with support for CRIS.
14805 * linux-crisv32-low.c: Ditto for CRISv32.
14806 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14807 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14808 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14809 reg-crisv32.o, and reg-crisv32.c to make rules.
14810 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14811 recognized targets.
14812
48d93c75
UW
148132005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14814
14815 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14816 of sizeof (PTRACE_XFER_TYPE).
14817 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14818
e013ee27
OF
148192005-05-12 Orjan Friberg <orjanf@axis.com>
14820
889bf7c5 14821 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14822 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14823 pointers for hardware watchpoint support.
14824 * linux-low.h (struct linux_target_ops): Ditto.
14825 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14826 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14827 to linux_target_ops.
14828 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14829 reply packet.
14830 * server.c (main): Recognize 'Z' and 'z' packets.
14831
b0ded00b
UW
148322005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14833
14834 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14835 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14836 (the_low_target): Add new members.
14837
8643e2ad
DJ
148382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14839
14840 * proc-service.c (ps_lgetregs): Search all_processes instead of
14841 all_threads.
14842
fc620387
DJ
148432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14844
14845 * server.c (start_inferior): Change return type to int.
14846 (attach_inferior): Change sigptr to int *.
14847 (handle_v_cont, handle_v_requests): Change signal to int *.
14848 (main): Change signal to int.
14849
148502005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14851
14852 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14853 * configure.srv: Add m32r*-*-linux*.
14854 * linux-m32r-low.c: New file.
14855
e0e76420
DJ
148562005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14859
a1928bad
DJ
148602005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14861
14862 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14863 Take unsigned long arguments for PIDs.
14864 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14865 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14866 (wait_for_sigstop, linux_resume_one_process)
14867 (regsets_fetch_inferior_registers, linux_send_signal)
14868 (linux_read_auxv): Likewise. Update the types of variables holding
14869 PIDs. Update format string specifiers.
14870 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14871 * remote-utils.c (prepare_resume_reply): Likewise.
14872 * server.c (cont_thread, general_thread, step_thread)
14873 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14874 unsigned long.
14875 (handle_query): Update format specifiers.
14876 (handle_v_cont, main): Use strtoul for thread IDs.
14877 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14878 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14879 (general_thread, step_thread, thread_from_wait)
14880 (old_thread_from_wait): Update.
14881 * target.h (struct thread_resume): Use unsigned long for THREAD.
14882 (struct target_ops): Use unsigned long for arguments to attach and
14883 thread_alive.
14884
dcdb98d2
DJ
148852005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * acinclude.m4: Include bfd/bfd.m4 directly.
14888 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14889 <agriffis@toolchain.org>.
14890 * aclocal.m4, configure: Regenerated.
14891
bec39cab
AC
148922005-01-07 Andrew Cagney <cagney@gnu.org>
14893
14894 * configure.ac: Rename configure.in, require autoconf 2.59.
14895 * configure: Re-generate.
14896
434c4c77
DJ
148972004-12-08 Daniel Jacobowitz <dan@debian.org>
14898
14899 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14900 LIBS when finished.
14901 * aclocal.m4: Regenerated.
14902 * configure: Regenerated.
14903
db1d3e1b
AS
149042004-11-21 Andreas Schwab <schwab@suse.de>
14905
14906 * linux-m68k-low.c (m68k_num_gregs): Define.
14907 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14908 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14909 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14910 (m68k_breakpoint_at): New. Add to the_low_target.
14911
14912 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14913 srv_linux_thread_db to yes.
14914
43360365
JB
149152004-10-20 Joel Brobecker <brobecker@gnat.com>
14916
14917 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14918 (ARCH_SET_FS): Likewise.
14919 (ARCH_GET_FS): Likewise.
14920 (ARCH_GET_GS): Likewise.
14921
fd500816
DJ
149222004-10-16 Daniel Jacobowitz <dan@debian.org>
14923
14924 * linux-i386-low.c (ps_get_thread_area): New.
14925 * linux-x86-64-low.c (ps_get_thread_area): New.
14926 * linux-low.c: Include <sys/syscall.h>.
14927 (linux_kill_one_process): Don't kill the first thread here.
14928 (linux_kill): Kill the first thread here.
14929 (kill_lwp): New function.
14930 (send_sigstop, linux_send_signal): Use it.
14931 * proc-service.c: Clean up #ifdefs.
14932 (fpregset_info): Delete.
14933 (ps_lgetregs): Update and enable implementation.
14934 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14935 implementations.
14936 * remote-utils.c (struct sym_cache, symbol_cache): New.
14937 (input_interrupt): Print a clearer message.
14938 (async_io_enabled): New variable.
14939 (enable_async_io, disable_async_io): Use it. Update comments.
14940 (look_up_one_symbol): Use the symbol cache.
14941 * thread-db.c (thread_db_look_up_symbols): New function.
14942 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14943
f6de3c42
DJ
149442004-10-16 Daniel Jacobowitz <dan@debian.org>
14945
14946 * configure.in: Test for -rdynamic.
14947 * configure: Regenerated.
14948 * Makefile (INTERNAL_LDFLAGS): New.
14949 (gdbserver, gdbreplay): Use it.
14950
2c0fc042
AC
149512004-09-02 Andrew Cagney <cagney@gnu.org>
14952
14953 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14954
075b3282
DJ
149552004-03-23 Daniel Jacobowitz <drow@mvista.com>
14956
14957 * linux-low.c (linux_wait): Clear all_processes list also.
14958
fa6a77dc
DJ
149592004-03-12 Daniel Jacobowitz <drow@mvista.com>
14960
14961 * linux-low.c: Include <errno.h>. Remove extern declaration of
14962 errno.
14963
6d782a97
DJ
149642004-03-12 Daniel Jacobowitz <drow@mvista.com>
14965
14966 * gdbreplay.c, server.h, utils.c: Update copyright years.
14967
3a7fb99b
DJ
149682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14969
14970 * server.c (main): Print child status or termination signal from
14971 variable 'signal', not 'sig'.
14972
c3e735a6
DJ
149732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14974
14975 * linux-low.c (linux_read_memory): Change return type to
14976 int. Check for and return error from ptrace().
14977 * target.c (read_inferior_memory): Change return type to int. Pass
14978 back return status from the_target->read_memory().
14979 * target.h (struct target_ops): Adapt *read_memory() prototype.
14980 Update comment.
14981 (read_inferior_memory): Adapt prototype.
14982 * server.c (main): Return an error packet if
14983 read_inferior_memory() returns an error.
14984
a59d1c82
DJ
149852004-03-04 Daniel Jacobowitz <drow@mvista.com>
14986
14987 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14988 Unify with other clean targets.
14989
dc3f8883
DJ
149902004-02-29 Daniel Jacobowitz <drow@mvista.com>
14991
14992 * server.c (handle_v_cont): Call set_desired_inferior.
14993
89a208da
DJ
149942004-02-29 Daniel Jacobowitz <drow@mvista.com>
14995
14996 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14997
62ea82f5
DJ
149982004-02-29 Daniel Jacobowitz <drow@mvista.com>
14999
15000 * linux-low.c (linux_wait): Unblock async I/O.
15001 (linux_resume): Block and enable async I/O.
15002 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15003 * server.h (block_async_io, unblock_async_io): Add prototypes.
15004
6910d122
DJ
150052004-02-29 Daniel Jacobowitz <drow@mvista.com>
15006
15007 * remote-utils.c (remote_open): Print a status notice after
15008 opening a TCP port.
15009 * server.c (attach_inferior): Print a status notice after
15010 attaching.
15011
150122004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15013
15014 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15015
c89dc5d4
DJ
150162004-02-26 Daniel Jacobowitz <drow@mvista.com>
15017
15018 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15019 error packet.
15020 * server.c, target.h: Update copyright years.
15021
4b8dad4a
RM
150222004-02-25 Roland McGrath <roland@redhat.com>
15023
15024 * target.h (struct target_ops): New member `read_auxv'.
15025 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15026 * linux-low.c (linux_read_auxv): New function.
15027 (linux_target_ops): Initialize `read_auxv' member to that.
15028
d7446758
JB
150292004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15030
15031 Committed by Jim Blandy <jimb@redhat.com>.
15032
15033 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15034 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15035 instead of GPR_SIZE to distiguish s390 and s390x targets.
15036
5544ad89
DJ
150372004-01-31 Daniel Jacobowitz <drow@mvista.com>
15038
15039 * linux-low.c: Update copyright year.
15040 (check_removed_breakpoint): Clear pending_is_breakpoint.
15041 (linux_set_resume_request, linux_queue_one_thread)
15042 (resume_status_pending_p): New functions.
15043 (linux_continue_one_thread): Use process->resume.
15044 (linux_resume): Only resume threads if there are no pending events.
15045 * linux-low.h (struct process_info): Add resume request
15046 pointer.
15047
2a68b70e
DJ
150482004-01-30 Daniel Jacobowitz <drow@mvista.com>
15049
15050 * regcache.c (new_register_cache): Clear the allocated register
15051 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15052
64386c31
DJ
150532003-10-13 Daniel Jacobowitz <drow@mvista.com>
15054
15055 * linux-low.c (linux_resume): Take a struct thread_resume *
15056 argument.
15057 (linux_wait): Update call.
15058 (resume_ptr): New static variable.
15059 (linux_continue_one_thread): Renamed from
15060 linux_continue_one_process. Use resume_ptr.
15061 (linux_resume): Use linux_continue_one_thread.
15062 * server.c (handle_v_cont, handle_v_requests): New functions.
15063 (myresume): New function.
15064 (main): Handle 'v' case.
15065 * target.h (struct thread_resume): New type.
15066 (struct target_ops): Change argument of "resume" to struct
15067 thread_resume *.
15068 (myresume): Delete macro.
15069
c938e9b0
L
150702003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15071
15072 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15073 (uninstall): Support DESTDIR.
15074
7f313d07
BC
15075Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15076
15077 * configure.srv: Add xscale*linux copy of arm*linux entry.
15078
3b2fc2ea
DJ
150792003-07-24 Daniel Jacobowitz <drow@mvista.com>
15080
15081 * linux-arm-low.c (arm_reinsert_addr): New function.
15082 (the_low_target): Add arm_reinsert_addr.
15083
1c0a559e
MK
150842003-07-08 Mark Kettenis <kettenis@gnu.org>
15085
15086 * mem-break.c: Remove whitespace at end of file.
15087
43d5792c
DJ
150882003-06-28 Daniel Jacobowitz <drow@mvista.com>
15089
15090 * configure.in: Check whether we need to prototype strerror.
15091 * server.h: Optionally prototype strerror.
15092 * gdbreplay.c (perror_with_name): Use strerror.
15093 * linux-low.c (linux_attach_lwp): Use strerror.
15094 * utils.c (perror_with_name): Use strerror.
15095 * config.in, configure: Regenerated.
15096
c8a86edf
DJ
150972003-06-28 Daniel Jacobowitz <drow@mvista.com>
15098
15099 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15100 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15101
73d37363
DJ
151022003-06-20 Daniel Jacobowitz <drow@mvista.com>
15103
15104 * Makefile.in (SFILES): Update.
15105 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15106 low-sun3.c: Remove files.
15107
6ad8ae5c
DJ
151082003-06-17 Daniel Jacobowitz <drow@mvista.com>
15109
15110 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15111 (linux_detach_one_process, linux_detach): New functions.
15112 (linux_target_ops): Add linux_detach.
15113 * server.c (main): Handle 'D' packet.
15114 * target.h (struct target_ops): Add "detach" member.
15115 (detach_inferior): Define.
15116
1581182a
MK
151172003-06-13 Mark Kettenis <kettenis@gnu.org>
15118
15119 From Kelley Cook <kelleycook@wideopenwest.com>:
15120 * configure.srv: Accept i[34567]86 variants.
15121
e5379b03
DJ
151222003-06-05 Daniel Jacobowitz <drow@mvista.com>
15123
15124 * linux-low.c (linux_wait_for_event): Correct comment typos.
15125 (linux_resume_one_process): Call check_removed_breakpoint.
15126 (linux_send_signal): New function.
15127 (linux_target_ops): Add linux_send_signal.
15128 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15129 of kill.
15130 * target.h (struct target_ops): Add send_signal.
15131
2ff29de4
JB
151322003-05-29 Jim Blandy <jimb@redhat.com>
15133
15134 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15135 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15136 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15137 away part of the register's value.
15138
254787d4
DJ
151392003-03-26 Daniel Jacobowitz <drow@mvista.com>
15140
15141 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15142 (linux_wait_for_event, linux_init_signals): Likewise.
15143
94e10508
DJ
151442003-03-17 Daniel Jacobowitz <drow@mvista.com>
15145
15146 * configure.in: Check for stdlib.h.
15147 * configure: Regenerated.
15148 * config.in: Regenerated.
15149
4c0711e0
DJ
151502003-01-04 Andreas Schwab <schwab@suse.de>
15151
15152 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15153
ef66e766
AC
151542003-01-02 Andrew Cagney <ac131313@redhat.com>
15155
15156 * Makefile.in: Remove obsolete code.
15157
a1358604
DJ
151582002-11-20 Daniel Jacobowitz <drow@mvista.com>
15159
15160 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15161 defined(PT_FPR0_HI).
15162
23ce3b1c
DJ
151632002-11-17 Stuart Hughes <seh@zee2.com>
15164
15165 * linux-arm-low.c (arm_num_regs): Increase.
15166 (arm_regmap): Include status register.
15167
151682002-11-17 Daniel Jacobowitz <drow@mvista.com>
15169
15170 * linux-low.c (register_addr): Remove incorrect -1 check.
15171
a9fa9f7d
DJ
151722002-08-29 Daniel Jacobowitz <drow@mvista.com>
15173
15174 * linux-low.c (linux_create_inferior): Call setpgid. Return
15175 the new PID.
15176 (unstopped_p, linux_signal_pid): Remove.
15177 (linux_target_ops): Remove linux_signal_pid.
15178 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15179 global instead of target method.
15180 * target.h (struct target_ops): Remove signal_pid. Update comment
15181 for create_inferior.
15182 * server.c (signal_pid): New variable.
15183 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15184 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15185 (attach_inferior): Set signal_pid.
15186
17574093
DJ
151872002-08-23 Daniel Jacobowitz <drow@mvista.com>
15188
15189 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15190
151912002-08-20 Jim Blandy <jimb@redhat.com>
15192
15193 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15194 default for this.
15195
151962002-08-01 Andrew Cagney <cagney@redhat.com>
15197
15198 * Makefile.in: Make chill references obsolete.
15199
152002002-07-24 Kevin Buettner <kevinb@redhat.com>
15201
15202 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15203 * configure: Regenerate.
15204 * config.in: Regenerate.
15205
152062002-07-09 David O'Brien <obrien@FreeBSD.org>
15207
15208 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15209 (perror_with_name, remote_close, remote_open, expect, play): Static.
15210
152112002-07-04 Michal Ludvig <mludvig@suse.cz>
15212
4b8dad4a 15213 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15214 byte offsets instead of an array of indexes.
15215 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15216
152172002-06-13 Daniel Jacobowitz <drow@mvista.com>
15218
15219 * regcache.c: Add comment.
15220
152212002-06-11 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * thread-db.c: New file.
15224 * proc-service.c: New file.
15225 * acinclude.m4: New file.
15226 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15227 proc-service.o, and thread-db.o.
15228 (linux-low.o): Add USE_THREAD_DB.
15229 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15230 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15231 * aclocal.m4: Regenerated.
15232 * config.in: Regenerated.
15233 * configure: Regenerated.
15234 * configure.in: Check for proc_service.h, sys/procfs.h,
15235 thread_db.h, and linux/elf.h headrs.
15236 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15237 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15238 Check for -lthread_db and thread support.
15239 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15240 PowerPC, and SuperH.
15241 * i387-fp.c: Constify arguments.
15242 * i387-fp.h: Likewise.
15243 * inferiors.c: (struct thread_info): Renamed from
15244 `struct inferior_info'. Remove PID member. Use generic inferior
15245 list header. All uses updated.
15246 (inferiors, signal_pid): Removed.
15247 (all_threads): New variable.
15248 (get_thread): Define.
15249 (add_inferior_to_list): New function.
15250 (for_each_inferior): New function.
15251 (change_inferior_id): New function.
15252 (add_inferior): Removed.
15253 (remove_inferior): New function.
15254 (add_thread): New function.
15255 (free_one_thread): New function.
15256 (remove_thread): New function.
15257 (clear_inferiors): Use for_each_inferior and free_one_thread.
15258 (find_inferior): New function.
15259 (find_inferior_id): New function.
15260 (inferior_target_data): Update argument type.
15261 (set_inferior_target_data): Likewise.
15262 (inferior_regcache_data): Likewise.
15263 (set_inferior_regcache_data): Likewise.
15264 * linux-low.c (linux_bp_reinsert): Remove.
15265 (all_processes, stopping_threads, using_thrads)
15266 (struct pending_signals, debug_threads, pid_of): New.
15267 (inferior_pid): Replace with macro.
15268 (struct inferior_linux_data): Remove.
15269 (get_stop_pc, add_process): New functions.
15270 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15271 Use add_process and add_thread.
15272 (linux_attach_lwp): New function, based on old linux_attach. Use
15273 add_process and add_thread. Set stop_expected for new threads.
15274 (linux_attach): New function.
15275 (linux_kill_one_process): New function.
15276 (linux_kill): Kill all LWPs.
15277 (linux_thread_alive): Use find_inferior_id.
15278 (check_removed_breakpoints, status_pending_p): New functions.
15279 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15280 Update. Use WNOHANG. Wait for cloned processes also. Update process
15281 struct for the found process.
15282 (linux_wait_for_event): New function.
15283 (linux_wait): Use it. Support LWPs.
15284 (send_sigstop, wait_for_sigstop, stop_all_processes)
15285 (linux_resume_one_process, linux_continue_one_process): New functions.
15286 (linux_resume): Support LWPs.
15287 (REGISTER_RAW_SIZE): Remove.
15288 (fetch_register): Use register_size instead. Call supply_register.
15289 (usr_store_inferior_registers): Likewise. Call collect_register.
15290 Fix recursive case.
15291 (regsets_fetch_inferior_registers): Improve error message.
15292 (regsets_store_inferior_registers): Add debugging.
15293 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15294 (unstopped_p, linux_signal_pid): New functions.
15295 (linux_target_ops): Add linux_signal_pid.
15296 (linux_init_signals): New function.
15297 (initialize_low): Call it. Initialize using_threads.
15298 * regcache.c (inferior_regcache_data): Add valid
15299 flag.
15300 (get_regcache): Fetch registers lazily. Add fetch argument
15301 and update all callers.
15302 (regcache_invalidate_one, regcache_invalidate): New
15303 functions.
15304 (new_register_cache): Renamed from create_register_cache.
15305 Return the new regcache.
15306 (free_register_cache): Change argument to a void *.
15307 (registers_to_string, registers_from_string): Call get_regcache
15308 with fetch flag set.
15309 (register_data): Make static. Pass fetch flag to get_regcache.
15310 (supply_register): Call get_regcache with fetch flag clear.
15311 (collect_register): Call get_regcache with fetch flag set.
15312 (collect_register_as_string): New function.
15313 * regcache.h: Update.
15314 * remote-utils.c (putpkt): Flush after debug output and use
15315 stderr.
15316 Handle input interrupts while waiting for an ACK.
15317 (input_interrupt): Use signal_pid method.
15318 (getpkt): Flush after debug output and use stderr.
15319 (outreg): Use collect_register_as_string.
15320 (new_thread_notify, dead_thread_notify): New functions.
15321 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15322 and general_thread.
15323 (look_up_one_symbol): Flush after debug output.
15324 * server.c (step_thread, server_waiting): New variables.
15325 (start_inferior): Don't use signal_pid. Update call to mywait.
15326 (attach_inferior): Update call to mywait.
15327 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15328 (main): Don't fetch/store registers explicitly. Use
15329 set_desired_inferior. Support proposed ``Hs'' packet. Update
15330 calls to mywait.
15331 * server.h: Update.
15332 (struct inferior_list, struct_inferior_list_entry): New.
15333 * target.c (set_desired_inferior): New.
15334 (write_inferior_memory): Constify.
15335 (mywait): New function.
15336 * target.h: Update.
15337 (struct target_ops): New signal_pid method.
15338 (mywait): Removed macro, added prototype.
15339
15340 * linux-low.h (regset_func): Removed.
15341 (regset_fill_func, regset_store_func): New.
15342 (enum regset_type): New.
15343 (struct regset_info): Add type field. Use new operation types.
15344 (struct linux_target_ops): stop_pc renamed to get_pc.
15345 Add decr_pc_after_break and breakpoint_at.
15346 (get_process, get_thread_proess, get_process_thread)
15347 (strut process_info, all_processes, linux_attach_lwp)
15348 (thread_db_init): New.
15349
15350 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15351 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15352 (the_low_target): Add new members.
15353 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15354 (i386_store_fpxregset): Constify.
15355 (target_regsets): Add new kind identifier.
15356 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15357 (i386_set_pc): Add debugging.
15358 (i386_breakpoint_at): New function.
15359 (the_low_target): Add new members.
15360 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15361 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15362 (mips_breakpoint_at): New.
15363 (the_low_target): Add new members.
15364 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15365 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15366 (the_low_target): Add new members.
15367 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15368 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15369 (the_low_target): Add new members.
15370 * linux-x86-64-low.c (target_regsets): Add new kind
15371 identifier.
15372
153732002-05-15 Daniel Jacobowitz <drow@mvista.com>
15374
15375 From Martin Pool <mbp@samba.org>:
15376 * server.c (gdbserver_usage): New function.
15377 (main): Call it.
15378
153792002-05-14 Daniel Jacobowitz <drow@mvista.com>
15380
15381 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15382 stop_at -> stop_pc.
15383
153842002-05-04 Andrew Cagney <ac131313@redhat.com>
15385
15386 * Makefile.in: Remove obsolete code.
15387
153882002-04-24 Michal Ludvig <mludvig@suse.cz>
15389
15390 * linux-low.c (regsets_fetch_inferior_registers),
15391 (regsets_store_inferior_registers): Removed cast to int from
15392 ptrace() calls.
15393 * regcache.h: Added declaration of struct inferior_info.
15394
153952002-04-20 Daniel Jacobowitz <drow@mvista.com>
15396
15397 * inferiors.c (struct inferior_info): Add regcache_data.
15398 (add_inferior): Call create_register_cache.
15399 (clear_inferiors): Call free_register_cache.
15400 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15401 * regcache.c (struct inferior_regcache_data): New.
15402 (registers): Remove.
15403 (get_regcache): New function.
15404 (create_register_cache, free_register_cache): New functions.
15405 (set_register_cache): Don't initialize the register cache here.
15406 (registers_to_string, registers_from_string, register_data): Call
15407 get_regcache.
15408 * regcache.h: Add prototypes.
15409 * server.h: Likewise.
15410
154112002-04-20 Daniel Jacobowitz <drow@mvista.com>
15412
15413 * mem-break.c: New file.
15414 * mem-break.h: New file.
15415 * Makefile.in: Add mem-break.o rule; update server.h
15416 dependencies.
15417 * inferiors.c (struct inferior_info): Add target_data
15418 member.
15419 (clear_inferiors): Free target_data member if set.
15420 (inferior_target_data, set_inferior_target_data): New functions.
15421 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15422 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15423 * linux-low.c (linux_bp_reinsert): New variable.
15424 (struct inferior_linux_data): New.
15425 (linux_create_inferior): Use set_inferior_target_data.
15426 (linux_attach): Likewise. Call add_inferior.
15427 (linux_wait_for_one_inferior): New function.
15428 (linux_wait): Call it.
15429 (linux_write_memory): Add const.
15430 (initialize_low): Call set_breakpoint_data.
15431 * linux-low.h (struct linux_target_ops): Add breakpoint
15432 handling members.
15433 * server.c (attach_inferior): Remove extra add_inferior
15434 call.
15435 * server.h: Include mem-break.h. Update inferior.c
15436 prototypes.
15437 * target.c (read_inferior_memory)
15438 (write_inferior_memory): New functions.
15439 * target.h (read_inferior_memory)
15440 (write_inferior_memory): Change macros to prototypes.
15441 (struct target_ops): Update comments. Add const to write_memory
15442 definition.
15443
154442002-04-11 Daniel Jacobowitz <drow@mvista.com>
15445
15446 * linux-low.c (usr_store_inferior_registers): Support
15447 registers which are allowed to fail to store.
15448 * linux-low.h (linux_target_ops): Likewise.
15449 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15450 (ppc_cannot_store_register): FPSCR may not be storable.
15451
154522002-04-09 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * server.h: Include <string.h> if HAVE_STRING_H.
15455 * ChangeLog: Correct paths in last ChangeLog entry.
15456
154572002-04-09 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * linux-low.h: Remove obsolete prototypes.
15460 (struct linux_target_ops): New.
15461 (extern the_low_target): New.
15462 * linux-low.c (num_regs, regmap): Remove declarations.
15463 (register_addr): Use the_low_target explicitly.
15464 (fetch_register): Likewise.
15465 (usr_fetch_inferior_registers): Likewise.
15466 (usr_store_inferior_registers): Likewise.
15467 * linux-arm-low.c (num_regs): Remove.
15468 (arm_num_regs): Define.
15469 (arm_regmap): Renamed from regmap, made static.
15470 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15471 made static.
15472 (arm_cannot_store_register): Renamed from cannot_store_register,
15473 made static.
15474 (the_low_target): New.
15475 * linux-i386-low.c (num_regs): Remove.
15476 (i386_num_regs): Define.
15477 (i386_regmap): Renamed from regmap, made static.
15478 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15479 made static.
15480 (i386_cannot_store_register): Renamed from cannot_store_register,
15481 made static.
15482 (the_low_target): New.
15483 * linux-ia64-low.c (num_regs): Remove.
15484 (ia64_num_regs): Define.
15485 (ia64_regmap): Renamed from regmap, made static.
15486 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15487 made static.
15488 (ia64_cannot_store_register): Renamed from cannot_store_register,
15489 made static.
15490 (the_low_target): New.
15491 * linux-m68k-low.c (num_regs): Remove.
15492 (m68k_num_regs): Define.
15493 (m68k_regmap): Renamed from regmap, made static.
15494 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15495 made static.
15496 (m68k_cannot_store_register): Renamed from cannot_store_register,
15497 made static.
15498 (the_low_target): New.
15499 * linux-mips-low.c (num_regs): Remove.
15500 (mips_num_regs): Define.
15501 (mips_regmap): Renamed from regmap, made static.
15502 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15503 made static.
15504 (mips_cannot_store_register): Renamed from cannot_store_register,
15505 made static.
15506 (the_low_target): New.
15507 * linux-ppc-low.c (num_regs): Remove.
15508 (ppc_num_regs): Define.
15509 (ppc_regmap): Renamed from regmap, made static.
15510 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15511 made static.
15512 (ppc_cannot_store_register): Renamed from cannot_store_register,
15513 made static.
15514 (the_low_target): New.
15515 * linux-s390-low.c (num_regs): Remove.
15516 (s390_num_regs): Define.
15517 (s390_regmap): Renamed from regmap, made static.
15518 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15519 made static.
15520 (s390_cannot_store_register): Renamed from cannot_store_register,
15521 made static.
15522 (the_low_target): New.
15523 * linux-sh-low.c (num_regs): Remove.
15524 (sh_num_regs): Define.
15525 (sh_regmap): Renamed from regmap, made static.
15526 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15527 made static.
15528 (sh_cannot_store_register): Renamed from cannot_store_register,
15529 made static.
15530 (the_low_target): New.
15531 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15532 (the_low_target): New.
15533
155342002-04-09 Daniel Jacobowitz <drow@mvista.com>
15535
15536 * Makefile.in: Add stamp-h target.
15537 * configure.in: Create stamp-h.
15538 * configure: Regenerated.
15539
155402002-04-09 Daniel Jacobowitz <drow@mvista.com>
15541
15542 * inferiors.c: New file.
15543 * target.c: New file.
15544 * target.h: New file.
15545 * Makefile.in: Add target.o and inferiors.o. Update
15546 dependencies.
15547 * linux-low.c (inferior_pid): New static variable,
15548 moved from server.c.
15549 (linux_create_inferior): Renamed from create_inferior.
15550 Call add_inferior. Return 0 on success instead of a PID.
15551 (linux_attach): Renamed from myattach.
15552 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15553 (linux_thread_alive): Renamed from mythread_alive.
15554 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15555 child dies.
15556 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15557 (regsets_store_inferior_registers): Correct error message.
15558 Add missing ``return 0''.
15559 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15560 (linux_store_registers): Renamed from store_inferior_registers.
15561 (linux_read_memory): Renamed from read_inferior_memory.
15562 (linux_write_memory): Renamed from write_inferior_memory.
15563 (linux_target_ops): New structure.
15564 (initialize_low): Call set_target_ops ().
15565 * remote-utils.c (unhexify): New function.
15566 (hexify): New function.
15567 (input_interrupt): Send signals to ``signal_pid''.
15568 * server.c (inferior_pid): Remove.
15569 (start_inferior): Update create_inferior call.
15570 (attach_inferior): Call add_inferior.
15571 (handle_query): New function.
15572 (main): Call handle_query for `q' packets.
15573 * server.h: Include "target.h". Remove obsolete prototypes.
15574 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15575
155762002-04-09 Daniel Jacobowitz <drow@mvista.com>
15577
15578 * Makefile.in: Add WARN_CFLAGS. Update configury
15579 dependencies.
15580 * configure.in: Check for <string.h>
15581 * configure: Regenerate.
15582 * config.in: Regenerate.
15583 * gdbreplay.c: Include needed system headers.
15584 (remote_open): Remove strchr prototype.
15585 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15586 * regcache.c (supply_register): Change buf argument to const void *.
15587 (supply_register_by_name): Likewise.
15588 (collect_register): Change buf argument to void *.
15589 (collect_register_by_name): Likewise.
15590 * regcache.h: Add missing prototypes.
15591 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15592 * server.c (handle_query): New function.
15593 (attached): New static variable, moved out of main.
15594 (main): Quiet longjmp clobber warnings.
15595 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15596 * utils.c (error): Remove NORETURN.
15597 (fatal): Likewise.