S390: Add guarded-storage register support to gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2
3 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
5 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7 s390x-gs-linux64-ipa.o to ipa_obj.
8 * linux-s390-low.c (HWCAP_S390_GS): New define.
9 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
10 New functions.
11 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
12 (s390_arch_setup): Check for guarded-storage support and choose
13 appropriate tdesc.
14 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
15 init_registers_s390x_gs_linux64.
16 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
17 enum value.
18 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
19 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
20
21 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
22
23 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
24
25 2017-09-21 Kevin Buettner <kevinb@redhat.com>
26
27 * linux-low.h (struct lwp_info): Add new field, thread_handle.
28 (thread_db_thread_handle): Declare.
29 * linux-low.c (linux_target_ops): Initialize thread_handle.
30 * server.c (handle_qxfer_threads_worker): Add support for
31 "handle" attribute.
32 * target.h (struct target_ops): Add new function pointer,
33 thread_handle.
34 (target_thread_handle): Define.
35 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
36 field in lwp.
37 (thread_db_thread_handle): New function.
38
39 2017-09-21 Kevin Buettner <kevinb@redhat.com>
40
41 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
42 * linux-low.h (thread_db_notice_clone): Declare.
43 * thread-db.c (thread_db_notice_clone): New function.
44
45 2017-09-21 Pedro Alves <palves@redhat.com>
46
47 * server.c (gdb_read_memory, handle_status, process_serial_event)
48 (handle_serial_event, handle_target_event): Adjust to
49 set_desired_thread prototype change.
50 * target.c (set_desired_thread): Remove 'use_general' parameter
51 and adjust.
52 * target.h (set_desired_thread): Remove 'use_general' parameter.
53
54 2017-09-20 Tom Tromey <tom@tromey.com>
55
56 * target.c (target_terminal::terminal_state): Define.
57 (target_terminal::init): Rename from target_terminal_init.
58 (target_terminal::inferior): Rename from
59 target_terminal_inferior.
60 (target_terminal::ours): Rename from target_terminal_ours.
61 (target_terminal::ours_for_output, target_terminal::info): New.
62
63 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
64
65 * server.c (accumulate_file_name_length): Remove.
66 (emit_dll_description): Adjust to std::string change.
67 (handle_qxfer_libraries): Use std::string to hold document.
68
69 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
70
71 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
72 return type of xml_escape_text.
73 * server.c (emit_dll_description): Likewise.
74
75 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
76
77 * server.c (captured_main): Accept argument for --selftest.
78 Update run_tests call.
79 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
80 when registering selftests.
81
82 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
83
84 * regcache.c (get_thread_regcache): Update code to use "std::vector"
85 instead of "VEC" for "target_desc.reg_defs".
86 (regcache_cpy): Likewise.
87 (registers_to_string): Likewise.
88 (registers_from_string): Likewise.
89 (find_regno): Likewise.
90 (supply_regblock): Likewise.
91 (regcache_raw_read_unsigned): Likewise.
92 * tdesc.c (init_target_desc): Likewise.
93 (tdesc_create_reg): Likewise.
94 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
95 (struct target_desc) <reg_defs>: Convert to "std::vector".
96 (target_desc): Do not initialize "reg_defs".
97 (~target_desc): Update code to use "std::vector" instead of "VEC"
98 for "target_desc.reg_defs".
99 (operator==): Likewise.
100
101 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
102
103 * inferiors.h (thread_to_gdb_id): Remove.
104 * inferiors.c (thread_to_gdb_id): Remove.
105 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
106 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
107 lynx_store_registers, lynx_read_memory, lynx_write_memory):
108 Likewise.
109 * nto-low.c (nto_fetch_registers, nto_store_registers,
110 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
111
112 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
113
114 * inferiors.h (gdb_id_to_thread_id): Remove.
115 * inferiors.c (gdb_id_to_thread_id): Remove.
116 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
117 removal. Move pid declaration closer to where it's used.
118
119 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
120
121 * server.c (handle_detach): New function.
122 (process_serial_event): Move code out, call handle_detach.
123
124 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
125
126 * server.c (require_running): Rename to ...
127 (require_running_or_return): ... this ...
128 (require_running_or_break): ... and this.
129 (handle_query, process_serial_event): Adjust.
130
131 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
132
133 * linux-low.c (linux_set_resume_request): Remove unused
134 variables.
135
136 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
137
138 * server.c (first_thread_of): Remove.
139 (process_serial_event): Replace usage of first_thread_of with
140 find_any_thread_of_pid.
141 * tracepoint.c (same_process_p): Remove.
142 (gdb_agent_about_to_close): Replace usage of same_process_p with
143 find_any_thread_of_pid.
144 * linux-x86-low.c (same_process_callback): Remove.
145 (x86_arch_setup_process_callback): Replace usage of
146 same_process_callback with find_any_thread_of_pid.
147 * thread-db.c (any_thread_of): Remove.
148 (switch_to_process): Replace usage of any_thread_of with
149 find_any_thread_of_pid.
150 * inferiors.c (thread_pid_matches_callback): Remove.
151 (find_thread_process): Adjust to use find_any_thread_of_pid.
152
153 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
154
155 * regcache.c (get_thread_regcache): Guard calls to "memset"
156 with "!VEC_empty".
157
158 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
159
160 * linux-low.c (handle_extended_wait): Use
161 "allocate_target_description" instead of "XNEW".
162 * linux-x86-low.c (initialize_low_arch): Likewise.
163
164 2017-09-05 Yao Qi <yao.qi@linaro.org>
165
166 * configure.srv (srv_i386_regobj): Remove.
167 (srv_amd64_regobj): Remove.
168 (srv_regobj): Set it to "" for x86 non-linux targets.
169 * linux-x86-tdesc.c (i386_linux_read_description):
170 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
171 (init_registers_i386): Remove the declaration.
172 (tdesc_i386): Remove the declaration.
173 (lynx_i386_arch_setup): Call i386_create_target_description.
174 * nto-x86-low.c: Likewise.
175 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
176 [!__x86_64__]: include arch/i386.h.
177 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
178
179 2017-09-05 Yao Qi <yao.qi@linaro.org>
180
181 * configure.srv (srv_amd64_linux_xmlfiles): Remove
182 i386/amd64-XXX-linux from it.
183
184 2017-09-05 Yao Qi <yao.qi@linaro.org>
185
186 * configure.srv: Empty srv_amd64_linux_regobj if $development is
187 false.
188 (ipa_amd64_linux_regobj): Remove.
189 (ipa_x32_linux_regobj): Remove.
190
191 2017-09-05 Yao Qi <yao.qi@linaro.org>
192
193 * Makefile.in (arch-amd64.o): New rule.
194 * configure.srv: Append arch-amd64.o.
195 * linux-amd64-ipa.c: Include common/x86-xstate.h.
196 (get_ipa_tdesc): Call amd64_linux_read_description.
197 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
198 and init_registers_amd64_XXX.
199 * linux-x86-low.c (x86_linux_read_description): Call
200 amd64_linux_read_description.
201 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
202 (initialize_low_arch): Don't call init_registers_x32_XXX and
203 init_registers_amd64_XXX.
204 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
205 and tdesc_amd64_XXX.
206 [__x86_64__] (amd64_tdesc_test): New function.
207 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
208 and init_registers_amd64_XXX.
209 * linux-x86-tdesc.c: Include arch/amd64.h.
210 (xcr0_to_tdesc_idx): New function.
211 (i386_linux_read_description): New function.
212 (amd64_get_ipa_tdesc_idx): New function.
213 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
214 (amd64_get_ipa_tdesc): Declare.
215
216 2017-09-05 Yao Qi <yao.qi@linaro.org>
217
218 * configure.srv (srv_i386_linux_xmlfiles): Remove
219 i386/i386-XXX-linux.xml from it.
220
221 2017-09-05 Yao Qi <yao.qi@linaro.org>
222
223 * configure.srv: Set srv_i386_linux_regobj empty if $development
224 is false.
225 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
226 initialize_low_tdesc.
227 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
228 with #if initialize_low_tdesc.
229 * linux-x86-tdesc-selftest.c: New file.
230 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
231
232 2017-09-05 Yao Qi <yao.qi@linaro.org>
233
234 * Makefile.in (arch-i386.o): New rule.
235 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
236 (x86_64-*-linux*): Likewise.
237 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
238 include arch/i386.h.
239 (i386_linux_read_description): Remove code and call
240 i386_create_target_description.
241 * tdesc.c (allocate_target_description): New function.
242 * tdesc.h (set_tdesc_architecture): Remove declaration.
243 (set_tdesc_osabi): Likewise.
244
245 2017-09-05 Yao Qi <yao.qi@linaro.org>
246
247 * linux-x86-tdesc.c: Don't include <inttypes.h>.
248 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
249 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
250 .xmltarget.
251 * server.c (get_features_xml): Call tdesc_get_features_xml.
252 * tdesc.c (set_tdesc_architecture): New function.
253 (set_tdesc_osabi): New function.
254 (tdesc_get_features_xml): New function.
255 (tdesc_create_feature): Add an argument.
256 * tdesc.h (struct target_desc) <features>: New field.
257 <arch, osabi>: New field.
258 (~target_desc): xfree features, arch, and osabi.
259 (target_desc::oerator==): Don't compare .xmltarget.
260 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
261 (set_tdesc_osabi): Likewise.
262 (tdesc_get_features_xml): Likewise.
263
264 2017-09-05 Yao Qi <yao.qi@linaro.org>
265
266 * linux-x86-tdesc.c: Include selftest.h.
267 (i386_tdesc_test): New function.
268 (initialize_low_tdesc): Call selftests::register_test.
269 * tdesc.h: Include regdef.h.
270 (target_desc): Override operator == and !=.
271
272 2017-09-05 Yao Qi <yao.qi@linaro.org>
273
274 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
275 (ipa_obj): Likewise.
276 * linux-i386-ipa.c: Include common/x86-xstate.h
277 (get_ipa_tdesc): Call i386_linux_read_description.
278 (initialize_low_tracepoint): Don't call init_registers_XXX
279 functions, call initialize_low_tdesc instead.
280 * linux-x86-low.c (x86_linux_read_description): Call
281 i386_linux_read_description.
282 (initialize_low_arch): Don't call init_registers_i386_XXX
283 functions, call initialize_low_tdesc.
284 * linux-x86-tdesc.c: New file.
285 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
286 (i386_get_ipa_tdesc_idx): Declare.
287 (i386_get_ipa_tdesc): Declare.
288 (initialize_low_tdesc): Declare.
289
290 2017-09-05 Yao Qi <yao.qi@linaro.org>
291
292 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
293 instead of 0.
294
295 2017-09-05 Yao Qi <yao.qi@linaro.org>
296
297 * Makefile.in (IPA_OBJS): Add vec-ipa.o
298 * regcache.c (get_thread_regcache): Use VEC_length.
299 (init_register_cache): Likewise.
300 (regcache_cpy): Likewise.
301 (registers_to_string): Iterate reg_defs via VEC_iterate.
302 (find_regno): Likewise.
303 (find_register_by_number): Use VEC_index.
304 (register_size): Call find_register_by_number.
305 (register_data): Call find_register_by_number.
306 (supply_regblock): Use VEC_length.
307 (regcache_raw_read_unsigned): Likewise.
308 * tdesc.c (init_target_desc): Iterate reg_defs via
309 VEC_iterate.
310 (default_description): Update initializer.
311 (copy_target_description): Don't update field num_registers.
312 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
313 <num_registers>: Remove.
314
315 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
316
317 * Makefile.in (.SECONDARY): Define target.
318
319 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
320
321 * linux-low.c (linux_wait_1): Adjust.
322 * server.c (queue_stop_reply_callback): Adjust.
323
324 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
325
326 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
327 QEnvironmentUnset and QEnvironmentReset packets.
328 (handle_query): Inform remote that QEnvironmentHexEncoded,
329 QEnvironmentUnset and QEnvironmentReset are supported.
330
331 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
332
333 * inferiors.h (inferior_target_data): Rename to ...
334 (thread_target_data): ... this.
335 (inferior_regcache_data): Rename to ...
336 (thread_regcache_data): ... this.
337 (set_inferior_regcache_data): Rename to ...
338 (set_thread_regcache_data): ... this.
339 * inferiors.c (inferior_target_data): Rename to ...
340 (thread_target_data): ... this.
341 (inferior_regcache_data): Rename to ...
342 (thread_regcache_data): ... this.
343 (set_inferior_regcache_data): Rename to ...
344 (set_thread_regcache_data): ... this.
345 (free_one_thread): Update.
346 * linux-low.h (get_thread_lwp): Update.
347 * regcache.c (get_thread_regcache): Update.
348 (regcache_invalidate_thread): Update.
349 (free_register_cache_thread): Update.
350 * win32-i386-low.c (update_debug_registers_callback): Update.
351 (win32_get_current_dr): Update.
352 * win32-low.c (thread_rec): Update.
353 (delete_thread_info): Update.
354 (continue_one_thread): Update.
355 (suspend_one_thread): Update.
356
357 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
358
359 * inferiors.c (set_inferior_target_data): Remove.
360 * inferiors.h (set_inferior_target_data): Remove.
361
362 2017-08-18 Yao Qi <yao.qi@linaro.org>
363
364 * Makefile.in (OBS): Add selftest.o.
365 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
366 * configure, config.in: Re-generated.
367 * server.c: Include common/sefltest.h.
368 (captured_main): Handle option --selftest.
369
370 2017-08-09 Yao Qi <yao.qi@linaro.org>
371
372 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
373 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
374 i386-avx-mpx.o and i386-mmx.o.
375 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
376 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
377 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
378 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
379 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
380 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
381 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
382 i386/amd64-avx-mpx.xml.
383
384 2017-08-09 Yao Qi <yao.qi@linaro.org>
385
386 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
387 and x32-avx-avx512.o.
388 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
389 i386/x32-avx-avx512.xml.
390
391 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
392
393 * tracepoint.h (enum class fast_tpoint_collect_result): New
394 enumeration.
395 (fast_tracepoint_collecting): Change return type to
396 fast_tpoint_collect_result.
397 * tracepoint.c (fast_tracepoint_collecting): Likewise.
398 * linux-low.h: Include tracepoint.h.
399 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
400 fast_tpoint_collect_result.
401 * linux-low.c (handle_tracepoints): Adjust.
402 (linux_fast_tracepoint_collecting): Change return type to
403 fast_tpoint_collect_result.
404 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
405 linux_wait_1, stuck_in_jump_pad_callback,
406 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
407 proceed_one_lwp): Adjust to type change.
408
409 2017-07-10 Yao Qi <yao.qi@linaro.org>
410
411 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
412
413 2017-06-29 Yao Qi <yao.qi@linaro.org>
414
415 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
416 Remove.
417 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
418
419 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
420
421 * Makefile.in (IPA_OBJS): Sort and format one item per line.
422
423 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
424
425 * linux-low.c (linux_create_inferior): Adjust code to access the
426 environment information via 'gdb_environ' class.
427 * lynx-low.c (lynx_create_inferior): Likewise.
428 * server.c (our_environ): Make it an instance of 'gdb_environ'.
429 (get_environ): Return a pointer to 'our_environ'.
430 (captured_main): Initialize 'our_environ'.
431 * server.h (get_environ): Adjust prototype.
432 * spu-low.c (spu_create_inferior): Adjust code to access the
433 environment information via 'gdb_environ' class.
434
435 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
436
437 * linux-low.c (linux_read_memory, linux_write_memory): Remove
438 usage of "register" keyword.
439
440 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
441
442 * configure: Re-generate.
443
444 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
445
446 * configure: Re-generate.
447
448 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
449
450 * Makefile.in (COMPILE.pre): Add "-x c++".
451
452 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
453
454 * fork-child.c: Conditionally include <signal.h>.
455
456 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
457
458 * server.c (handle_general_set): Handle new packet
459 "QStartupWithShell".
460 (handle_query): Add "QStartupWithShell" to the list of supported
461 packets.
462 (gdbserver_usage): Add help text explaining the
463 new "--startup-with-shell" and "--no-startup-with-shell" CLI
464 options.
465 (captured_main): Recognize and act upon the presence of the new
466 CLI options.
467
468 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
469 Pedro Alves <palves@redhat.com>
470
471 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
472 * configure: Regenerate.
473 * configure.srv (srv_linux_obj): Add "fork-child.o" and
474 "fork-inferior.o".
475 (i[34567]86-*-lynxos*): Likewise.
476 (spu*-*-*): Likewise.
477 * fork-child.c: New file.
478 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
479 and "environ.h".
480 (linux_ptrace_fun): New function.
481 (linux_create_inferior): Adjust function prototype to reflect
482 change on "target.h". Adjust function code to use
483 "fork_inferior".
484 (linux_request_interrupt): Delete "signal_pid".
485 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
486 (lynx_ptrace_fun): New function.
487 (lynx_create_inferior): Adjust function prototype to reflect
488 change on "target.h". Adjust function code to use
489 "fork_inferior".
490 * nto-low.c (nto_create_inferior): Adjust function prototype and
491 code to reflect change on "target.h". Update comments.
492 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
493 "common-terminal.h" and "environ.h".
494 (terminal_fd): Moved to fork-child.c.
495 (old_foreground_pgrp): Likewise.
496 (restore_old_foreground_pgrp): Likewise.
497 (last_status): Make it global.
498 (last_ptid): Likewise.
499 (our_environ): New variable.
500 (startup_with_shell): Likewise.
501 (program_name): Likewise.
502 (program_argv): Rename to...
503 (program_args): ...this.
504 (wrapper_argv): New variable.
505 (start_inferior): Delete function.
506 (get_exec_wrapper): New function.
507 (get_exec_file): Likewise.
508 (get_environ): Likewise.
509 (prefork_hook): Likewise.
510 (post_fork_inferior): Likewise.
511 (postfork_hook): Likewise.
512 (postfork_child_hook): Likewise.
513 (handle_v_run): Update code to deal with arguments coming from the
514 remote host. Update calls from "start_inferior" to
515 "create_inferior".
516 (captured_main): Likewise. Initialize environment variable. Call
517 "have_job_control".
518 * server.h (post_fork_inferior): New prototype.
519 (get_environ): Likewise.
520 (last_status): Declare.
521 (last_ptid): Likewise.
522 (signal_pid): Likewise.
523 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
524 (spu_ptrace_fun): New function.
525 (spu_create_inferior): Adjust function prototype to reflect change
526 on "target.h". Adjust function code to use "fork_inferior".
527 * target.c (target_terminal_init): New function.
528 (target_terminal_inferior): Likewise.
529 (target_terminal_ours): Likewise.
530 * target.h: Include <vector>.
531 (struct target_ops) <create_inferior>: Update prototype.
532 (create_inferior): Update macro.
533 * utils.c (gdb_flush_out_err): New function.
534 * win32-low.c (win32_create_inferior): Adjust function prototype
535 and code to reflect change on "target.h".
536
537 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
538
539 * inferiors.c (switch_to_thread): New function.
540
541 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
542
543 * Makefile.in (SFILE): Add "common/job-control.c".
544 (OBS): Add "job-control.o".
545
546 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
547
548 * Makefile: Remove "@host_makefile_frag@".
549
550 2017-05-05 Pedro Alves <palves@redhat.com>
551
552 * configure: Regenerate.
553
554 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
555
556 * configure: Regenerate.
557
558 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
561 software_single_step change of return type to
562 std::vector<CORE_ADDR>.
563 * linux-low.c (install_software_single_step_breakpoints):
564 Likewise.
565 * linux-low.h (install_software_single_step_breakpoints):
566 Likewise.
567
568 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
569
570 * remote-utils.c: Include "gdb_termios.h" instead of
571 "terminal.h".
572 * terminal.h: Delete file.
573
574 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
575
576 * server.c: Include <vector>.
577 <program_argv, wrapper_argv>: Convert to std::vector.
578 (start_inferior): Rewrite function to use C++.
579 (handle_v_run): Likewise. Update code that calculates the argv
580 based on the vRun packet; use C++.
581 (captured_main): Likewise.
582
583 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
584
585 * server.c (handle_v_cont): Initialize thread_resume::thread
586 with null_ptid.
587
588 2017-04-05 Pedro Alves <palves@redhat.com>
589
590 * configure: Regenerate.
591
592 2017-04-05 Pedro Alves <palves@redhat.com>
593
594 * gdbreplay.c (sync_error): Constify.
595 * linux-x86-low.c (push_opcode): Constify.
596
597 2017-04-05 Pedro Alves <palves@redhat.com>
598
599 * win32-low.c (get_child_debug_event)
600 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
601 Report TARGET_WAITKIND_SPURIOUS instead.
602
603 2017-04-05 Pedro Alves <palves@redhat.com>
604
605 * remote-utils.c (remote_prepare, remote_open): Constify.
606 * remote-utils.h (remote_prepare, remote_open): Constify.
607 * server.c (captured_main): Constify 'port' handling.
608
609 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
610
611 * Makefile.in (clean): Clear .deps.
612
613 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
614
615 * .gitignore: Remove generated files, replace with wildcard.
616 * (clean): Replace removal of generated files with wildcard.
617 (version.c): Replace with...
618 (version-generated.c): ...this.
619 (xml-builtin.c): Replace with...
620 (xml-builtin-generated.c): ...this.
621 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
622 (%.c: *regformats*): Replace with...
623 (%-generated.c: *regformats*): ...this.
624
625 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
626
627 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
628 (xtensa_fill_gregset): Call collect_register_by_name for
629 threadptr register.
630 (xtensa_store_gregset): Call supply_register_by_name for
631 threadptr register.
632
633 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
634
635 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
636 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
637 (xtensa_store_gregset): Call supply_register for all registers in
638 a0_regnum..a0_regnum + C0_NREGS range.
639
640 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
641
642 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
643 (ax-ipa.o: ax.c): Remove.
644 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
645 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
646 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
647 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
648 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
649
650 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
651
652 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
653 (print-utils-ipa.o: ../common/print-utils.c): Remove.
654 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
655 (errors-ipa.o: ../common/errors.c): Remove.
656 (format-ipa.o: ../common/format.c): Remove.
657 (common-utils-ipa.o: ../common/common-utils.c): Remove.
658
659 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
660
661 * Makefile.in (%-ipa.o: %.c): New rule.
662 (tracepoint-ipa.o: tracepoint.c): Remove.
663 (utils-ipa.o: utils.c): Remove.
664 (remote-utils-ipa.o: remote-utils.c): Remove.
665 (regcache-ipa.o: regcache.c): Remove.
666 (i386-linux-ipa.o: i386-linux.c): Remove.
667 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
668 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
669 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
670 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
671 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
672 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
673 (amd64-linux-ipa.o: amd64-linux.c): Remove.
674 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
675 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
676 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
677 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
678 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
679 (aarch64-ipa.o: aarch64.c): Remove.
680 (s390-linux32-ipa.o: s390-linux32.c): Remove.
681 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
682 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
683 (s390-linux64-ipa.o: s390-linux64.c): Remove.
684 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
685 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
686 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
687 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
688 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
689 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
690 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
691 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
692 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
693 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
694 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
695 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
696 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
697 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
698 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
699 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
700 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
701 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
702 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
703 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
704 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
705 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
706 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
707 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
708 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
709 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
710 (tdesc-ipa.o: tdesc.c): Remove.
711 (x32-linux-ipa.o: x32-linux.c): Remove.
712 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
713 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
714
715 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * Makefile.in (%.o: ../arch/%.c): New rule.
718 (arm.o: ../arch/arm.c): Remove.
719 (arm-linux.o: ../arch/arm-linux.c): Remove.
720 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
721 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
722
723 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
724
725 * Makefile.in (%.o: ../nat/%.c): New rule.
726 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
727 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
728 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
729 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
730 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
731 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
732 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
733 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
734 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
735 (linux-personality.o: ../nat/linux-personality.c): Remove.
736 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
737 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
738 (x86-linux.o: ../nat/x86-linux.c): Remove.
739 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
740 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
741
742 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * Makefile.in (%.o: ../common/%.c): New rule.
745 (signals.o: ../common/signals.c): Remove.
746 (print-utils.o: ../common/print-utils.c): Remove.
747 (rsp-low.o: ../common/rsp-low.c): Remove.
748 (common-utils.o: ../common/common-utils.c): Remove.
749 (posix-strerror.o: ../common/posix-strerror.c): Remove.
750 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
751 (vec.o: ../common/vec.c): Remove.
752 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
753 (xml-utils.o: ../common/xml-utils.c): Remove.
754 (ptid.o: ../common/ptid.c): Remove.
755 (buffer.o: ../common/buffer.c): Remove.
756 (format.o: ../common/format.c): Remove.
757 (filestuff.o: ../common/filestuff.c): Remove.
758 (agent.o: ../common/agent.c): Remove.
759 (errors.o: ../common/errors.c): Remove.
760 (environ.o: ../common/environ.c): Remove.
761 (common-debug.o: ../common/common-debug.c): Remove.
762 (cleanups.o: ../common/cleanups.c): Remove.
763 (common-exceptions.o: ../common/common-exceptions.c): Remove.
764 (fileio.o: ../common/fileio.c): Remove.
765 (common-regcache.o: ../common/common-regcache.c): Remove.
766 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
767 (new-op.o: ../common/new-op.c): Remove.
768 (btrace-common.o: ../common/btrace-common.c): Remove.
769
770 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * Makefile.in (%.o: ../target/%.c): New rule.
773 (waitstatus.o: ../target/waitstatus.c): Remove.
774
775 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
776
777 * Makefile.in
778 (%.c: ../regformats/%.dat,
779 (%.c: ../regformats/arm/%.dat,
780 (%.c: ../regformats/i386/%.dat,
781 (%.c: ../regformats/rs6000/%.dat): New rules.
782 (aarch64.c): Remove.
783 (reg-arm.c): Remove.
784 (arm-with-iwmmxt.c): Remove.
785 (arm-with-vfpv2.c): Remove.
786 (arm-with-vfpv3.c): Remove.
787 (arm-with-neon.c): Remove.
788 (reg-bfin.c): Remove.
789 (reg-cris.c): Remove.
790 (reg-crisv32.c): Remove.
791 (i386.c): Remove.
792 (i386-linux.c): Remove.
793 (i386-avx.c): Remove.
794 (i386-avx-linux.c): Remove.
795 (i386-avx-avx512.c): Remove.
796 (i386-avx-avx512-linux.c): Remove.
797 (i386-mpx.c): Remove.
798 (i386-mpx-linux.c): Remove.
799 (i386-avx-mpx-avx512-pku.c): Remove.
800 (i386-avx-mpx-avx512-pku-linux.c): Remove.
801 (i386-avx-mpx.c): Remove.
802 (i386-avx-mpx-linux.c): Remove.
803 (i386-mmx.c): Remove.
804 (i386-mmx-linux.c): Remove.
805 (reg-ia64.c): Remove.
806 (reg-m32r.c): Remove.
807 (reg-m68k.c): Remove.
808 (reg-cf.c): Remove.
809 (mips-linux.c): Remove.
810 (mips-dsp-linux.c): Remove.
811 (mips64-linux.c): Remove.
812 (mips64-dsp-linux.c): Remove.
813 (nios2-linux.c): Remove.
814 (powerpc-32.c): Remove.
815 (powerpc-32l.c): Remove.
816 (powerpc-altivec32l.c): Remove.
817 (powerpc-cell32l.c): Remove.
818 (powerpc-vsx32l.c): Remove.
819 (powerpc-isa205-32l.c): Remove.
820 (powerpc-isa205-altivec32l.c): Remove.
821 (powerpc-isa205-vsx32l.c): Remove.
822 (powerpc-e500l.c): Remove.
823 (powerpc-64l.c): Remove.
824 (powerpc-altivec64l.c): Remove.
825 (powerpc-cell64l.c): Remove.
826 (powerpc-vsx64l.c): Remove.
827 (powerpc-isa205-64l.c): Remove.
828 (powerpc-isa205-altivec64l.c): Remove.
829 (powerpc-isa205-vsx64l.c): Remove.
830 (s390-linux32.c): Remove.
831 (s390-linux32v1.c): Remove.
832 (s390-linux32v2.c): Remove.
833 (s390-linux64.c): Remove.
834 (s390-linux64v1.c): Remove.
835 (s390-linux64v2.c): Remove.
836 (s390-te-linux64.c): Remove.
837 (s390-vx-linux64.c): Remove.
838 (s390-tevx-linux64.c): Remove.
839 (s390x-linux64.c): Remove.
840 (s390x-linux64v1.c): Remove.
841 (s390x-linux64v2.c): Remove.
842 (s390x-te-linux64.c): Remove.
843 (s390x-vx-linux64.c): Remove.
844 (s390x-tevx-linux64.c): Remove.
845 (tic6x-c64xp-linux.c): Remove.
846 (tic6x-c64x-linux.c): Remove.
847 (tic6x-c62x-linux.c): Remove.
848 (reg-sh.c): Remove.
849 (reg-sparc64.c): Remove.
850 (reg-spu.c): Remove.
851 (amd64.c): Remove.
852 (amd64-linux.c): Remove.
853 (amd64-avx.c): Remove.
854 (amd64-avx-linux.c): Remove.
855 (amd64-avx-avx512.c): Remove.
856 (amd64-avx-avx512-linux.c): Remove.
857 (amd64-mpx.c): Remove.
858 (amd64-mpx-linux.c): Remove.
859 (amd64-avx-mpx-avx512-pku.c): Remove.
860 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
861 (amd64-avx-mpx.c): Remove.
862 (amd64-avx-mpx-linux.c): Remove.
863 (x32.c): Remove.
864 (x32-linux.c): Remove.
865 (x32-avx.c): Remove.
866 (x32-avx-linux.c): Remove.
867 (x32-avx-avx512.c): Remove.
868 (x32-avx-avx512-linux.c): Remove.
869 (reg-xtensa.c): Remove.
870 (reg-tilegx.c): Remove.
871 (reg-tilegx32.c): Remove.
872
873 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
874
875 * Makefile.in (SFILES): Add "common/environ.c".
876 (OBJS): Add "common/environ.h".
877
878 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
879
880 * configure.ac: Check if the fs_base and gs_base members of
881 `struct user_regs_struct' exist.
882 * config.in: Regenerated.
883 * configure: Likewise.
884
885 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
886
887 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
888 target_read_memory.
889 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
890 (get_next_pcs_syscall_next_pc): Likewise.
891
892 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
893
894 * win32-i386-low.c: Fix incorrect reference to a couple source files.
895 * nto-x86-low.c: Likewise.
896
897 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
898
899 * Makefile.in: Include disable-implicit-rules.mk.
900
901 2016-11-23 Pedro Alves <palves@redhat.com>
902
903 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
904 (debug_vprintf): Use std::chrono::steady_clock instead of
905 gettimeofday. Use '.' instead of ':'.
906 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
907 (get_timestamp): Use std::chrono::steady_clock instead of
908 gettimeofday.
909
910 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
911
912 * Makefile.in: Fix whitespace formatting.
913
914 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
915
916 * Makefile.in (SFILES, OBS): Flatten list and order
917 alphabetically.
918
919 2016-11-23 Pedro Alves <palves@redhat.com>
920
921 * event-loop.c (handle_file_event): Use warning.
922 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
923 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
924 Use warning.
925
926 2016-11-23 Pedro Alves <palves@redhat.com>
927
928 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
929 output.
930 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
931 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
932 debug_printf and debug_flush for debug output.
933 * server.c (handle_general_set): Likewise.
934 * thread-db.c (try_thread_db_load): Use debug_printf for debug
935 output.
936
937 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
938
939 * Makefile.in (.c.o): Replace rule with ...
940 (%.o: %.c): ... this one.
941
942 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
945 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
946 make.
947 * configure.ac: Remove checks for the make program.
948 * configure: Re-generate.
949
950 2016-10-28 Pedro Alves <palves@redhat.com>
951
952 * Makefile.in (CXX_DIALECT): Get from configure.
953 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
954 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
955 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
956 * config.in: Regenerate.
957 * configure: Regenerate.
958
959 2016-10-27 Yao Qi <yao.qi@linaro.org>
960
961 * linux-low.c (linux_supports_range_stepping): Return true if
962 can_software_single_step return true.
963
964 2016-10-27 Yao Qi <yao.qi@linaro.org>
965
966 * inferiors.c (find_inferior_in_random): New function.
967 * inferiors.h (find_inferior_in_random): Declare.
968 * linux-low.c (linux_wait_for_event_filtered): Call
969 find_inferior_in_random instead of find_inferior.
970
971 2016-10-27 Yao Qi <yao.qi@linaro.org>
972
973 * linux-low.c (linux_wait_1): If single-step breakpoints are
974 inserted, remove them.
975
976 2016-10-26 Pedro Alves <palves@redhat.com>
977
978 * linux-low.c (handle_extended_wait): Link parent/child fork
979 threads.
980 (linux_wait_1): Unlink them.
981 (linux_set_resume_request): Ignore resume requests for
982 already-resumed and unhandled fork child threads.
983 * linux-low.h (struct lwp_info) <fork_relative>: New field.
984 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
985 New functions.
986 (handle_v_requests) <vCont>: Don't call require_running.
987 * server.h (in_queued_stop_replies): New declaration.
988
989 2016-10-24 Yao Qi <yao.qi@linaro.org>
990
991 PR server/20733
992 * linux-aarch64-low.c (append_insns): Cast the return value to
993 'uint32_t *'.
994
995 2016-10-10 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
998
999 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1000
1001 * target.c (target_supports_multi_process): New function, moved
1002 from...
1003 * target.h (target_supports_multi_process): ... here. Remove
1004 macro.
1005
1006 2016-10-05 Tom Tromey <tom@tromey.com>
1007
1008 PR remote/20655:
1009 * tracepoint.c (handle_tracepoint_bkpts): Check
1010 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1011
1012 2016-10-05 Yao Qi <yao.qi@linaro.org>
1013
1014 * configure.srv: Update the path of arm-*.xml files.
1015
1016 2016-10-05 Terry Guo <terry.guo@arm.com>
1017 Yao Qi <yao.qi@linaro.org>
1018
1019 * Makefile.in: Adjust the path of rules.
1020 * configure.srv: Update the path of xml files.
1021 * regformats/arm-with-iwmmxt.dat: Regenerated.
1022 * regformats/arm-with-neon.dat: Likewise.
1023 * regformats/arm-with-vfpv2.dat: Likewise.
1024 * regformats/arm-with-vfpv3.dat Likewise.
1025
1026 2016-09-30 Yao Qi <yao.qi@linaro.org>
1027
1028 PR gdbserver/20627
1029 * target.c (target_stop_and_wait): Don't call
1030 target_continue_no_signal, use resume_stop instead.
1031
1032 2016-09-26 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-low.c (linux_wait_1): Call debug_exit.
1035
1036 2016-09-23 Pedro Alves <palves@redhat.com>
1037
1038 * Makefile.in (SFILES): Add common/new-op.c.
1039 (OBS): Add common/new-op.o.
1040 (new-op.o): New rule.
1041
1042 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * .gitinore: Ignore more files.
1045
1046 2016-09-21 Yao Qi <yao.qi@linaro.org>
1047
1048 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1049 23.
1050
1051 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1052
1053 * server.c (start_inferior): Call target_mourn_inferior instead of
1054 mourn_inferior; pass ptid_t argument to it.
1055 (resume): Likewise.
1056 (handle_target_event): Likewise.
1057 * target.c (target_mourn_inferior): New function.
1058 * target.h (mourn_inferior): Delete macro.
1059
1060 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1061
1062 * linux-low.c (lwp_is_stepping): New function.
1063
1064 2016-09-06 Carl Love <cel@us.ibm.com>
1065
1066 * server.c (start_inferior): Fixed comment, requested comment change
1067 didn't get updated correctly. Removed reference to ptrace () call as
1068 it is only true on Linux systems.
1069
1070 2016-09-06 Carl Love <cel@us.ibm.com>
1071
1072 * server.c (start_inferior): Do not call
1073 function target_post_create_inferior () if the
1074 inferior process has already exited.
1075
1076 2016-09-05 Pedro Alves <palves@redhat.com>
1077
1078 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1079 (COMPILE.pre, CC_LD): Use CXX directly.
1080 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1081 * acinclude.m4: Don't include build-with-cxx.m4.
1082 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1083 * configure: Regenerate.
1084
1085 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1086
1087 PR gdb/19495
1088 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1089 call writing data to own_buf.
1090
1091 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1092
1093 * target.c (mywait): Call target_wait instead of
1094 the_target->wait.
1095 (target_wait): New function.
1096
1097 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1098
1099 * server.c (start_inferior): New variable 'ptid'. Replace calls
1100 to the_target->resume by target_continue{,_no_signal}, depending
1101 on the case.
1102 * target.c (target_stop_and_wait): Call target_continue_no_signal
1103 instead of the_target->resume.
1104 (target_continue): New function.
1105
1106 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1107
1108 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1109
1110 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1111
1112 PR server/20491
1113 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1114 ps_prochandle.
1115 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1116 * linux-arm-low.c (ps_get_thread_area): Likewise.
1117 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1118 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1119 * linux-mips-low.c (ps_get_thread_area): Likewise.
1120 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1121 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1122 * linux-x86-low.c (ps_get_thread_area): Likewise.
1123 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1124
1125 2016-08-19 Pedro Alves <palves@redhat.com>
1126
1127 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1128
1129 2016-08-19 Pedro Alves <palves@redhat.com>
1130
1131 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1132 comment. Use memcpy instead of casting through unsigned long.
1133
1134 2016-08-19 Pedro Alves <palves@redhat.com>
1135
1136 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1137 allocating around 0x80000000.
1138
1139 2016-08-19 Pedro Alves <palves@redhat.com>
1140
1141 PR gdb/20415
1142 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1143 (x32-avx512-linux-ipa.o): New rules.
1144 * configure.ac (x86_64-*-linux*): New x32 check.
1145 * configure.srv (ipa_x32_linux_regobj): New.
1146 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1147 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1148 descriptions.
1149 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1150 descriptions.
1151 * configure: Regenerate.
1152
1153 2016-08-09 Pedro Alves <palves@redhat.com>
1154
1155 PR gdb/18653
1156 * Makefile.in (OBS): Add signals-state-save-restore.o.
1157 (signals-state-save-restore.o): New rule.
1158 * config.in: Regenerate.
1159 * configure: Regenerate.
1160 * linux-low.c: Include "signals-state-save-restore.h".
1161 (linux_create_inferior): Call
1162 restore_original_signals_state.
1163 * server.c: Include "dispositions-save-restore.h".
1164 (captured_main): Call save_original_signals_state.
1165
1166 2016-08-05 Pedro Alves <palves@redhat.com>
1167
1168 * configure: Regenerate.
1169
1170 2016-08-04 Yao Qi <yao.qi@linaro.org>
1171
1172 * linux-low.c (regsets_fetch_inferior_registers): Check
1173 errno is ESRCH or not.
1174
1175 2016-08-02 Yao Qi <yao.qi@linaro.org>
1176
1177 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1178 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1179 (thread_db_load_search): Update.
1180 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1181 td_ta_set_event and td_ta_event_getmsg.
1182
1183 2016-07-26 Pedro Alves <palves@redhat.com>
1184
1185 PR server/20414
1186 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1187 of unsigned long for 64-bit registers and use uint32_t instead of
1188 unsigned int for 32-bit registers.
1189
1190 2016-07-26 Pedro Alves <palves@redhat.com>
1191
1192 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1193 to 'ptrace'.
1194
1195 2016-07-21 Tom Tromey <tom@tromey.com>
1196
1197 * configure: Rebuild.
1198
1199 2016-07-21 Yao Qi <yao.qi@linaro.org>
1200
1201 * mem-break.c (find_gdb_breakpoint): Cast bp to
1202 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1203
1204 2016-07-21 Yao Qi <yao.qi@linaro.org>
1205
1206 * server.c (handle_v_requests): Support s and S actions
1207 if target_supports_software_single_step return true.
1208
1209 2016-07-21 Yao Qi <yao.qi@linaro.org>
1210
1211 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1212 is resume_step, call maybe_hw_step.
1213 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1214 and unstop them.
1215 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1216 breakpoints or not.
1217 (proceed_one_lwp): If resume request is resume_step, install
1218 reinsert breakpoints and call maybe_hw_step.
1219
1220 2016-07-21 Yao Qi <yao.qi@linaro.org>
1221
1222 * linux-low.c (proceed_one_lwp): Declare.
1223 (linux_resume_one_thread): Remove local variable 'step'.
1224 Lift code enqueue signal. Call proceed_one_lwp instead of
1225 linux_resume_one_lwp.
1226
1227 2016-07-21 Yao Qi <yao.qi@linaro.org>
1228
1229 * linux-low.c (linux_resume_one_thread): Call
1230 enqueue_pending_signal.
1231
1232 2016-07-21 Yao Qi <yao.qi@linaro.org>
1233
1234 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1235 * inferiors.c (do_restore_current_thread_cleanup): New function.
1236 (make_cleanup_restore_current_thread): Likewise.
1237 * linux-low.c (install_software_single_step_breakpoints): Call
1238 make_cleanup_restore_current_thread. Switch current_thread to
1239 thread.
1240
1241 2016-07-21 Yao Qi <yao.qi@linaro.org>
1242
1243 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1244 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1245 (clone_one_breakpoint): Likewise.
1246 (delete_reinsert_breakpoints): Change parameter to thread.
1247 Callers updated.
1248 (has_reinsert_breakpoints): Likewise.
1249 (uninsert_reinsert_breakpoints): Likewise.
1250 (reinsert_reinsert_breakpoints): Likewise.
1251 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1252 (delete_reinsert_breakpoints): Likewise.
1253 (reinsert_reinsert_breakpoints): Likewise.
1254 (uninsert_reinsert_breakpoints): Likewise.
1255 (has_reinsert_breakpoints): Likewise.
1256
1257 2016-07-21 Yao Qi <yao.qi@linaro.org>
1258
1259 * inferiors.c (get_thread_process): Make parameter const.
1260 * inferiors.h (get_thread_process): Update declaration.
1261 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1262 Add new parameters child_thread and parent_thread. Callers
1263 updated.
1264 * mem-break.h (clone_all_breakpoints): Update declaration.
1265
1266 2016-07-21 Yao Qi <yao.qi@linaro.org>
1267
1268 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1269 <command_list, handler>: Remove.
1270 (struct gdb_breakpoint): New.
1271 (struct other_breakpoint): New.
1272 (struct reinsert_breakpoint): New.
1273 (is_gdb_breakpoint): New function.
1274 (any_persistent_commands): Update command_list if
1275 is_gdb_breakpoint returns true.
1276 (set_breakpoint): Create breakpoints according to their types.
1277 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1278 (set_gdb_breakpoint_1): Likewise.
1279 (set_gdb_breakpoint): Likewise.
1280 (clear_breakpoint_conditions): Change parameter type to
1281 'struct gdb_breakpoint *'.
1282 (clear_breakpoint_commands): Likewise.
1283 (clear_breakpoint_conditions_and_commands): Likewise.
1284 (add_condition_to_breakpoint): Likewise.
1285 (add_breakpoint_condition): Likewise.
1286 (add_commands_to_breakpoint): Likewise.
1287 (check_breakpoints): Check other_breakpoint.
1288 (clone_one_breakpoint): Clone breakpopint according to its type.
1289 * mem-break.h (struct gdb_breakpoint): Declare.
1290 (set_gdb_breakpoint): Update declaration.
1291 (clear_breakpoint_conditions_and_commands): Likewise.
1292 (add_breakpoint_condition): Likewise.
1293 (add_breakpoint_commands): Likewise.
1294 * server.c (process_point_options): Change parameter type to
1295 'struct gdb_breakpoint *'.
1296
1297 2016-07-21 Yao Qi <yao.qi@linaro.org>
1298
1299 * mem-break.c (set_breakpoint_at): Rename it to ...
1300 (set_breakpoint_type_at): ... it.
1301 (set_breakpoint_at): Call set_breakpoint_type_at.
1302 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1303 * mem-break.h (set_breakpoint_at): Update comments.
1304
1305 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1306
1307 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1308 to buf parameter.
1309 (nios2_store_gregset): Likewise.
1310
1311 2016-07-01 Pedro Alves <palves@redhat.com>
1312 Antoine Tremblay <antoine.tremblay@ericsson.com>
1313
1314 * linux-low.c: Change interface to take the target lwp_info
1315 pointer directly and return void. Handle detaching from a zombie
1316 thread.
1317 (linux_detach_lwp_callback): New function.
1318 (linux_detach): Detach from the leader thread after detaching from
1319 the clone threads.
1320
1321 2016-06-28 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1324 for variable new_offset.
1325 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1326 (aarch64_ftrace_insn_reloc_cb): Likewise.
1327 (aarch64_ftrace_insn_reloc_tb): Likewise.
1328 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1329 PRIx64 instead of PRIx32.
1330
1331 2016-06-28 Yao Qi <yao.qi@linaro.org>
1332
1333 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1334 (the_low_target): Install arm_get_syscall_trapinfo.
1335
1336 2016-06-28 Yao Qi <yao.qi@linaro.org>
1337
1338 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1339 function.
1340 (the_low_target): Install aarch64_get_syscall_trapinfo.
1341
1342 2016-06-28 Yao Qi <yao.qi@linaro.org>
1343
1344 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1345 Callers updated.
1346 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1347 Remove parameter sysno.
1348 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1349 sysret.
1350
1351 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1352
1353 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1354 (s390_emit_ne_goto): Likewise.
1355 (s390_emit_lt_goto): Likewise.
1356 (s390_emit_le_goto): Likewise.
1357 (s390_emit_gt_goto): Likewise.
1358 (s390_emit_ge_goto): Likewise.
1359 (s390x_emit_eq_goto): Likewise.
1360 (s390x_emit_ne_goto): Likewise.
1361 (s390x_emit_lt_goto): Likewise.
1362 (s390x_emit_le_goto): Likewise.
1363 (s390x_emit_gt_goto): Likewise.
1364 (s390x_emit_ge_goto): Likewise.
1365 (s390_emit_ops_impl): Mark variable static.
1366 (s390x_emit_ops): Likewise.
1367
1368 2016-06-17 Yao Qi <yao.qi@linaro.org>
1369
1370 * linux-low.c (handle_extended_wait): Call
1371 uninsert_reinsert_breakpoints for the parent process. Remove
1372 reinsert breakpoints from the child process. Reinsert them to
1373 the parent process when vfork is done.
1374 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1375 (reinsert_reinsert_breakpoints): New function.
1376 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1377 (reinsert_reinsert_breakpoints): Declare.
1378
1379 2016-06-17 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-low.c (handle_extended_wait): If the parent is doing
1382 step-over, remove the reinsert breakpoints from the forked child.
1383
1384 2016-06-17 Yao Qi <yao.qi@linaro.org>
1385
1386 * linux-low.c (unsuspend_all_lwps): Declare.
1387 (linux_low_filter_event): If thread exited, call finish_step_over.
1388 If step-over is finished, unsuspend other threads.
1389
1390 2016-06-17 Yao Qi <yao.qi@linaro.org>
1391
1392 * linux-low.c (linux_resume_one_lwp_throw): Assert
1393 has_reinsert_breakpoints returns false.
1394 * mem-break.c (delete_disabled_breakpoints): Assert
1395 bp type isn't reinsert_breakpoint.
1396
1397 2016-06-17 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-low.c (maybe_hw_step): New function.
1400 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1401 (finish_step_over): Switch current_thread to lwp temporarily,
1402 and assert has_reinsert_breakpoints returns true.
1403 (proceed_one_lwp): Call maybe_hw_step.
1404 * mem-break.c (has_reinsert_breakpoints): New function.
1405 * mem-break.h (has_reinsert_breakpoints): Declare.
1406
1407 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1408
1409 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1410
1411 2016-05-17 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1414 instead of find_inferior.
1415
1416 2016-05-05 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1419 Initialize res to zero.
1420
1421 2016-05-05 Yao Qi <yao.qi@linaro.org>
1422
1423 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1424 to uint32_t.
1425
1426 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1427
1428 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1429 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1430 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1431
1432 2016-04-28 Par Olsson <par.olsson@windriver.com>
1433 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * tracepoint.c (write_inferior_int8): New function.
1436 (cmd_qtenable_disable): Write enable flag using
1437 write_inferior_int8.
1438
1439 2016-04-25 Yao Qi <yao.qi@linaro.org>
1440
1441 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1442 (need_step_over_p): Return zero if the LWP has pending signals
1443 can be delivered on software single step target.
1444
1445 2016-04-25 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1448 return instead of error.
1449
1450 2016-04-22 Yao Qi <yao.qi@linaro.org>
1451
1452 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1453 to 23.
1454
1455 2016-04-22 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1458 signal when stepping over breakpoint with software single
1459 step.
1460
1461 2016-04-21 Pedro Alves <palves@redhat.com>
1462
1463 * linux-s390-low.c (s390_collect_ptrace_register)
1464 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1465 add casts.
1466 (s390_check_regset): Use void * instead of gdb_byte *.
1467
1468 2016-04-20 Pedro Alves <palves@redhat.com>
1469
1470 * configure: Renegerate.
1471
1472 2016-04-20 Yao Qi <yao.qi@linaro.org>
1473
1474 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1475 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1476 number 16.
1477 (arm_store_gregset): Likewise.
1478
1479 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1480
1481 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1482 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1483 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1484 (amd64-avx-mpx-linux.c): New rules.
1485 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1486 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1487 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1488 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1489 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1490 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1491 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1492 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1493 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1494 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1495 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1496 * linux-x86-low.c (x86_linux_read_description): Add case for
1497 X86_XSTATE_AVX_MPX_MASK.
1498 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1499 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1500 init_registers_i386_avx_mpx_linux.
1501 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1502 (initialize_low_tracepoint): Call
1503 init_registers_i386_avx_mpx_linux.
1504 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1505 (initialize_low_tracepoint): Call
1506 init_registers_amd64_avx_mpx_linux.
1507 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1508 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1509 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1510 declarations.
1511
1512 2016-04-18 Pedro Alves <palves@redhat.com>
1513
1514 * configure: Regenerate.
1515
1516 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1517
1518 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1519 (aarch64_emit_sub): Likewise.
1520
1521 2016-04-12 Pedro Alves <palves@redhat.com>
1522
1523 * utils.c (prepare_to_throw_exception): Delete.
1524
1525 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1528
1529 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1530
1531 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1532
1533 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1534
1535 * linux-aarch64-ipa.c: Add <elf.h> include.
1536 * linux-ppc-ipa.c: Add <elf.h> include.
1537 * linux-s390-ipa.c: Add <elf.h> include.
1538
1539 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1540
1541 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1542 (get_raw_reg_ptr): Likewise.
1543 (get_trace_state_variable_value_ptr): Likewise.
1544 (set_trace_state_variable_value_ptr): Likewise.
1545 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1546 char *.
1547
1548 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1549 Marcin Kościelnicki <koriakin@0x04.net>
1550
1551 PR/17221
1552 * linux-ppc-low.c (emit_insns): New function.
1553 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1554 (ppc_emit_prologue): New function.
1555 (ppc_emit_epilogue): New function.
1556 (ppc_emit_add): New function.
1557 (ppc_emit_sub): New function.
1558 (ppc_emit_mul): New function.
1559 (ppc_emit_lsh): New function.
1560 (ppc_emit_rsh_signed): New function.
1561 (ppc_emit_rsh_unsigned): New function.
1562 (ppc_emit_ext): New function.
1563 (ppc_emit_zero_ext): New function.
1564 (ppc_emit_log_not): New function.
1565 (ppc_emit_bit_and): New function.
1566 (ppc_emit_bit_or): New function.
1567 (ppc_emit_bit_xor): New function.
1568 (ppc_emit_bit_not): New function.
1569 (ppc_emit_equal): New function.
1570 (ppc_emit_less_signed): New function.
1571 (ppc_emit_less_unsigned): New function.
1572 (ppc_emit_ref): New function.
1573 (ppc_emit_const): New function.
1574 (ppc_emit_reg): New function.
1575 (ppc_emit_pop): New function.
1576 (ppc_emit_stack_flush): New function.
1577 (ppc_emit_swap): New function.
1578 (ppc_emit_stack_adjust): New function.
1579 (ppc_emit_call): New function.
1580 (ppc_emit_int_call_1): New function.
1581 (ppc_emit_void_call_2): New function.
1582 (ppc_emit_if_goto): New function.
1583 (ppc_emit_goto): New function.
1584 (ppc_emit_eq_goto): New function.
1585 (ppc_emit_ne_goto): New function.
1586 (ppc_emit_lt_goto): New function.
1587 (ppc_emit_le_goto): New function.
1588 (ppc_emit_gt_goto): New function.
1589 (ppc_emit_ge_goto): New function.
1590 (ppc_write_goto_address): New function.
1591 (ppc_emit_ops_impl): New static variable.
1592 (ppc64v1_emit_prologue): New function.
1593 (ppc64v2_emit_prologue): New function.
1594 (ppc64_emit_epilogue): New function.
1595 (ppc64_emit_add): New function.
1596 (ppc64_emit_sub): New function.
1597 (ppc64_emit_mul): New function.
1598 (ppc64_emit_lsh): New function.
1599 (ppc64_emit_rsh_signed): New function.
1600 (ppc64_emit_rsh_unsigned): New function.
1601 (ppc64_emit_ext): New function.
1602 (ppc64_emit_zero_ext): New function.
1603 (ppc64_emit_log_not): New function.
1604 (ppc64_emit_bit_and): New function.
1605 (ppc64_emit_bit_or): New function.
1606 (ppc64_emit_bit_xor): New function.
1607 (ppc64_emit_bit_not): New function.
1608 (ppc64_emit_equal): New function.
1609 (ppc64_emit_less_signed): New function.
1610 (ppc64_emit_less_unsigned): New function.
1611 (ppc64_emit_ref): New function.
1612 (ppc64_emit_const): New function.
1613 (ppc64v1_emit_reg): New function.
1614 (ppc64v2_emit_reg): New function.
1615 (ppc64_emit_pop): New function.
1616 (ppc64_emit_stack_flush): New function.
1617 (ppc64_emit_swap): New function.
1618 (ppc64v1_emit_call): New function.
1619 (ppc64v2_emit_call): New function.
1620 (ppc64v1_emit_int_call_1): New function.
1621 (ppc64v2_emit_int_call_1): New function.
1622 (ppc64v1_emit_void_call_2): New function.
1623 (ppc64v2_emit_void_call_2): New function.
1624 (ppc64_emit_if_goto): New function.
1625 (ppc64_emit_eq_goto): New function.
1626 (ppc64_emit_ne_goto): New function.
1627 (ppc64_emit_lt_goto): New function.
1628 (ppc64_emit_le_goto): New function.
1629 (ppc64_emit_gt_goto): New function.
1630 (ppc64_emit_ge_goto): New function.
1631 (ppc64v1_emit_ops_impl): New static variable.
1632 (ppc64v2_emit_ops_impl): New static variable.
1633 (ppc_emit_ops): New function.
1634 (linux_low_target): Wire in ppc_emit_ops.
1635
1636 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1637 Marcin Kościelnicki <koriakin@0x04.net>
1638
1639 PR/17221
1640 * Makefile.in: Add powerpc-*-ipa.o
1641 * configure.srv: Add ipa_obj for powerpc*-linux.
1642 * linux-ppc-ipa.c: New file.
1643 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1644 includes.
1645 (PPC_FIELD): New macro.
1646 (PPC_SEXT): New macro.
1647 (PPC_OP6): New macro.
1648 (PPC_BO): New macro.
1649 (PPC_LI): New macro.
1650 (PPC_BD): New macro.
1651 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1652 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1653 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1654 (ppc_get_thread_area): New function.
1655 (is_elfv2_inferior): New function.
1656 (gen_ds_form): New function.
1657 (GEN_STD): New macro.
1658 (GEN_STDU): New macro.
1659 (GEN_LD): New macro.
1660 (GEN_LDU): New macro.
1661 (gen_d_form): New function.
1662 (GEN_ADDI): New macro.
1663 (GEN_ADDIS): New macro.
1664 (GEN_LI): New macro.
1665 (GEN_LIS): New macro.
1666 (GEN_ORI): New macro.
1667 (GEN_ORIS): New macro.
1668 (GEN_LWZ): New macro.
1669 (GEN_STW): New macro.
1670 (GEN_STWU): New macro.
1671 (gen_xfx_form): New function.
1672 (GEN_MFSPR): New macro.
1673 (GEN_MTSPR): New macro.
1674 (GEN_MFCR): New macro.
1675 (GEN_MTCR): New macro.
1676 (GEN_SYNC): New macro.
1677 (GEN_LWSYNC): New macro.
1678 (gen_x_form): New function.
1679 (GEN_OR): New macro.
1680 (GEN_MR): New macro.
1681 (GEN_LWARX): New macro.
1682 (GEN_STWCX): New macro.
1683 (GEN_CMPW): New macro.
1684 (gen_md_form): New function.
1685 (GEN_RLDICL): New macro.
1686 (GEN_RLDICR): New macro.
1687 (gen_i_form): New function.
1688 (GEN_B): New macro.
1689 (GEN_BL): New macro.
1690 (gen_b_form): New function.
1691 (GEN_BNE): New macro.
1692 (GEN_LOAD): New macro.
1693 (GEN_STORE): New macro.
1694 (gen_limm): New function.
1695 (gen_atomic_xchg): New function.
1696 (gen_call): New function.
1697 (ppc_relocate_instruction): New function.
1698 (ppc_install_fast_tracepoint_jump_pad): New function.
1699 (ppc_get_min_fast_tracepoint_insn_len): New function.
1700 (ppc_get_ipa_tdesc_idx): New function.
1701 (the_low_target): Wire in the new functions.
1702 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1703 tdescs.
1704 * linux-ppc-tdesc.h: New file.
1705
1706 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1707
1708 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1709 (alloc_jump_pad_buffer): New function.
1710 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1711 (alloc_jump_pad_buffer): New function.
1712 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1713 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1714 (alloc_jump_pad_buffer): New function.
1715 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1716 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1717 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1718 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1719
1720 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1721
1722 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1723 * linux-amd64-ipa.c: Likewise.
1724 * linux-i386-ipa.c: Likewise.
1725 * linux-s390-ipa.c: Likewise.
1726 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1727 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1728 set_trace_state_variable_value_ptr.
1729 (struct ipa_sym_addresses): Likewise.
1730 (symbol_list): Likewise.
1731 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1732 accessing gdb_collect directly.
1733 (gdb_collect_ptr_type): New typedef.
1734 (get_raw_reg_ptr_type): New typedef.
1735 (get_trace_state_variable_value_ptr_type): New typedef.
1736 (set_trace_state_variable_value_ptr_type): New typedef.
1737 (gdb_collect_ptr): New global.
1738 (get_raw_reg_ptr): New global.
1739 (get_trace_state_variable_value_ptr): New global.
1740 (set_trace_state_variable_value_ptr): New global.
1741 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1742 accessing get_raw_reg directly.
1743 (get_get_tsv_func_addr): Likewise for
1744 get_trace_state_variable_value_ptr.
1745 (get_set_tsv_func_addr): Likewise for
1746 set_trace_state_variable_value_ptr.
1747 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1748
1749 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1752
1753 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1754
1755 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1756 packets.
1757 (relocate_instruction): Remove own_buf.
1758 * server.c (own_buf): Make global.
1759 (handle_v_requests): Make global.
1760 * server.h (own_buf): New declaration.
1761 (handle_v_requests): New prototype.
1762
1763 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1764
1765 PR 18377
1766 * linux-s390-low.c (add_insns): New function.
1767 (s390_emit_prologue): New function.
1768 (s390_emit_epilogue): New function.
1769 (s390_emit_add): New function.
1770 (s390_emit_sub): New function.
1771 (s390_emit_mul): New function.
1772 (s390_emit_lsh): New function.
1773 (s390_emit_rsh_signed): New function.
1774 (s390_emit_rsh_unsigned): New function.
1775 (s390_emit_ext): New function.
1776 (s390_emit_log_not): New function.
1777 (s390_emit_bit_and): New function.
1778 (s390_emit_bit_or): New function.
1779 (s390_emit_bit_xor): New function.
1780 (s390_emit_bit_not): New function.
1781 (s390_emit_equal): New function.
1782 (s390_emit_less_signed): New function.
1783 (s390_emit_less_unsigned): New function.
1784 (s390_emit_ref): New function.
1785 (s390_emit_if_goto): New function.
1786 (s390_emit_goto): New function.
1787 (s390_write_goto_address): New function.
1788 (s390_emit_litpool): New function.
1789 (s390_emit_const): New function.
1790 (s390_emit_call): New function.
1791 (s390_emit_reg): New function.
1792 (s390_emit_pop): New function.
1793 (s390_emit_stack_flush): New function.
1794 (s390_emit_zero_ext): New function.
1795 (s390_emit_swap): New function.
1796 (s390_emit_stack_adjust): New function.
1797 (s390_emit_set_r2): New function.
1798 (s390_emit_int_call_1): New function.
1799 (s390_emit_void_call_2): New function.
1800 (s390_emit_eq_goto): New function.
1801 (s390_emit_ne_goto): New function.
1802 (s390_emit_lt_goto): New function.
1803 (s390_emit_le_goto): New function.
1804 (s390_emit_gt_goto): New function.
1805 (s390_emit_ge_goto): New function.
1806 (s390x_emit_prologue): New function.
1807 (s390x_emit_epilogue): New function.
1808 (s390x_emit_add): New function.
1809 (s390x_emit_sub): New function.
1810 (s390x_emit_mul): New function.
1811 (s390x_emit_lsh): New function.
1812 (s390x_emit_rsh_signed): New function.
1813 (s390x_emit_rsh_unsigned): New function.
1814 (s390x_emit_ext): New function.
1815 (s390x_emit_log_not): New function.
1816 (s390x_emit_bit_and): New function.
1817 (s390x_emit_bit_or): New function.
1818 (s390x_emit_bit_xor): New function.
1819 (s390x_emit_bit_not): New function.
1820 (s390x_emit_equal): New function.
1821 (s390x_emit_less_signed): New function.
1822 (s390x_emit_less_unsigned): New function.
1823 (s390x_emit_ref): New function.
1824 (s390x_emit_if_goto): New function.
1825 (s390x_emit_const): New function.
1826 (s390x_emit_call): New function.
1827 (s390x_emit_reg): New function.
1828 (s390x_emit_pop): New function.
1829 (s390x_emit_stack_flush): New function.
1830 (s390x_emit_zero_ext): New function.
1831 (s390x_emit_swap): New function.
1832 (s390x_emit_stack_adjust): New function.
1833 (s390x_emit_int_call_1): New function.
1834 (s390x_emit_void_call_2): New function.
1835 (s390x_emit_eq_goto): New function.
1836 (s390x_emit_ne_goto): New function.
1837 (s390x_emit_lt_goto): New function.
1838 (s390x_emit_le_goto): New function.
1839 (s390x_emit_gt_goto): New function.
1840 (s390x_emit_ge_goto): New function.
1841 (s390_emit_ops): New function.
1842 (struct linux_target_ops): Fill in emit_ops hook.
1843
1844 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1845
1846 PR 18377
1847 * Makefile.in: Add s390 IPA files.
1848 * configure.srv: Build IPA for s390.
1849 * linux-s390-ipa.c: New file.
1850 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1851 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1852 (tdesc_s390_linux32): Likewise.
1853 (init_registers_s390_linux32v1): Likewise.
1854 (tdesc_s390_linux32v1): Likewise.
1855 (init_registers_s390_linux32v2): Likewise.
1856 (tdesc_s390_linux32v2): Likewise.
1857 (init_registers_s390_linux64): Likewise.
1858 (tdesc_s390_linux64): Likewise.
1859 (init_registers_s390_linux64v1): Likewise.
1860 (tdesc_s390_linux64v1): Likewise.
1861 (init_registers_s390_linux64v2): Likewise.
1862 (tdesc_s390_linux64v2): Likewise.
1863 (init_registers_s390_te_linux64): Likewise.
1864 (tdesc_s390_te_linux64): Likewise.
1865 (init_registers_s390_vx_linux64): Likewise.
1866 (tdesc_s390_vx_linux64): Likewise.
1867 (init_registers_s390_tevx_linux64): Likewise.
1868 (tdesc_s390_tevx_linux64): Likewise.
1869 (init_registers_s390x_linux64): Likewise.
1870 (tdesc_s390x_linux64): Likewise.
1871 (init_registers_s390x_linux64v1): Likewise.
1872 (tdesc_s390x_linux64v1): Likewise.
1873 (init_registers_s390x_linux64v2): Likewise.
1874 (tdesc_s390x_linux64v2): Likewise.
1875 (init_registers_s390x_te_linux64): Likewise.
1876 (tdesc_s390x_te_linux64): Likewise.
1877 (init_registers_s390x_vx_linux64): Likewise.
1878 (tdesc_s390x_vx_linux64): Likewise.
1879 (init_registers_s390x_tevx_linux64): Likewise.
1880 (tdesc_s390x_tevx_linux64): Likewise.
1881 (have_hwcap_s390_vx): New static variable.
1882 (s390_arch_setup): Fill have_hwcap_s390_vx.
1883 (s390_get_thread_area): New function.
1884 (s390_ft_entry_gpr_esa): New const.
1885 (s390_ft_entry_gpr_zarch): New const.
1886 (s390_ft_entry_misc): New const.
1887 (s390_ft_entry_fr): New const.
1888 (s390_ft_entry_vr): New const.
1889 (s390_ft_main_31): New const.
1890 (s390_ft_main_64): New const.
1891 (s390_ft_exit_fr): New const.
1892 (s390_ft_exit_vr): New const.
1893 (s390_ft_exit_misc): New const.
1894 (s390_ft_exit_gpr_esa): New const.
1895 (s390_ft_exit_gpr_zarch): New const.
1896 (append_insns): New function.
1897 (s390_relocate_instruction): New function.
1898 (s390_install_fast_tracepoint_jump_pad): New function.
1899 (s390_get_min_fast_tracepoint_insn_len): New function.
1900 (s390_get_ipa_tdesc_idx): New function.
1901 (struct linux_target_ops): Wire in the above functions.
1902 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1903 * linux-s390-tdesc.h: New file.
1904
1905 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1906
1907 * linux-s390-low.c (s390_supports_tracepoints): New function.
1908 (struct linux_target_ops): Fill supports_tracepoints hook.
1909
1910 2016-03-18 Yao Qi <yao.qi@linaro.org>
1911
1912 * linux-low.c (lwp_signal_can_be_delivered): New function.
1913 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1914
1915 2016-03-18 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1918 0 if signal is enqueued. Remove 'signal' from one debugging
1919 message. Move one debugging message to some lines below.
1920 Remove code setting 'signal' to 0.
1921
1922 2016-03-18 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-low.c (linux_low_filter_event): Remove redundant
1925 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1926
1927 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1928
1929 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1930 (struct linux_target_ops): Wire in the above.
1931
1932 2016-03-03 Yao Qi <yao.qi@linaro.org>
1933
1934 * linux-low.c: Update comments to start_step_over.
1935
1936 2016-03-03 Yao Qi <yao.qi@linaro.org>
1937
1938 PR server/19736
1939 * linux-low.c (handle_extended_wait): Set child suspended
1940 if event_lwp->bp_reinsert isn't zero.
1941
1942 2016-03-02 Yao Qi <yao.qi@linaro.org>
1943
1944 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1945 enqueue_pending_signal.
1946
1947 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1948
1949 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1950 is actually loaded.
1951
1952 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1953
1954 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1955 (s390_regmap_3264) [!__s390x__]: New global.
1956 (s390_collect_ptrace_register): Skip map entries containing -1.
1957 (s390_supply_ptrace_register): Ditto.
1958 (s390_fill_gprs_high): New function.
1959 (s390_store_gprs_high): New function.
1960 (s390_regsets): Add NT_S390_HIGH_GPRS.
1961 (s390_get_hwcap): Enable on 31-bit.
1962 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1963 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1964 Detect NT_S390_HIGH_GPRS.
1965 (s390_usrregs_info_3264): Enable on 31-bit.
1966 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1967 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1968
1969 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1970
1971 PR gdb/13808
1972 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1973 * configure.srv: Ditto.
1974 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1975 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1976 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1977 (init_registers_amd64_linux): Remove prototype.
1978 (tdesc_amd64_linux): Remove declaration.
1979 (get_ipa_tdesc): New function.
1980 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1981 initialize remaining tdescs.
1982 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1983 (init_registers_i386_linux): Remove prototype.
1984 (tdesc_i386_linux): Remove declaration.
1985 (get_ipa_tdesc): New function.
1986 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1987 initialize remaining tdescs.
1988 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1989 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1990 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1991 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1992 (x86_get_ipa_tdesc_idx): New function.
1993 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1994 * linux-x86-tdesc.h: New file.
1995 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1996 (target_get_ipa_tdesc_idx): New macro.
1997 * tracepoint.c (ipa_tdesc_idx): New macro.
1998 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1999 (symbol_list): Add ipa_tdesc_idx.
2000 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2001 (ipa_tdesc): Remove.
2002 (ipa_tdesc_idx): New variable.
2003 (get_context_regcache): Use get_ipa_tdesc.
2004 (gdb_collect): Ditto.
2005 (gdb_probe): Ditto.
2006 * tracepoint.h (get_ipa_tdesc): New prototype.
2007 (ipa_tdesc): Remove.
2008
2009 2016-02-24 Pedro Alves <palves@redhat.com>
2010
2011 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2012 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2013 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2014 Factor out common code between the USE_SIGTRAP_SIGINFO and
2015 !USE_SIGTRAP_SIGINFO blocks.
2016 (linux_low_filter_event): Call save_stop_reason instead of
2017 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2018 Update comments.
2019 (linux_wait_1): Update comments.
2020
2021 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2022
2023 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2024 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2025 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2026 ppc_insert_point, ppc_remove_point.
2027
2028 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2029
2030 * linux-s390-low.c (s390_supports_z_point_type): New function.
2031 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2032
2033 2016-02-16 Yao Qi <yao.qi@linaro.org>
2034
2035 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2036 PC. Get pc from regcache_read_pc.
2037
2038 2016-02-12 Yao Qi <yao.qi@linaro.org>
2039
2040 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2041 or linux_get_pc_32bit.
2042 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2043
2044 2016-02-12 Yao Qi <yao.qi@linaro.org>
2045
2046 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2047 arm_linux_get_next_pcs_fixup.
2048
2049 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2050
2051 * tracepoint.c (x_tracepoint_action_download): Change
2052 write_inferior_data_ptr to write_inferior_data_pointer.
2053 (cmd_qtstart): Likewise.
2054 (write_inferior_data_ptr): Remove.
2055 (download_agent_expr): Change write_inferior_data_ptr to
2056 write_inferior_data_pointer.
2057 (download_tracepoint_1): Likewise.
2058 (download_tracepoint): Likewise.
2059 (download_trace_state_variables): Likewise.
2060
2061 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2062 Marcin Kościelnicki <koriakin@0x04.net>
2063
2064 * tracepoint.c (struct tracepoint_action_ops): Remove.
2065 (struct tracepoint_action): Remove ops.
2066 (m_tracepoint_action_download, r_tracepoint_action_download)
2067 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2068 size and offset accordingly.
2069 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2070 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2071 (tracepoint_action_send, tracepoint_action_download): New functions.
2072 Helpers for trace action handlers.
2073 (add_tracepoint_action): Remove setup actions ops.
2074 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2075
2076 2016-02-10 Yao Qi <yao.qi@linaro.org>
2077
2078 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2079
2080 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2083 to AC_OUTPUT.
2084 * configure: Regenerate.
2085
2086 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2089 void * to gdb_byte *.
2090 * linux-low.c (siginfo_fixup): Likewise.
2091 (linux_xfer_siginfo): Likewise.
2092 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2093 Likewise.
2094 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2095
2096 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2097
2098 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2099 to srv_tgtobj.
2100 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2101 to srv_tgtobj.
2102 * linux-x86-low.c [__x86_64__]: Include
2103 "nat/amd64-linux-siginfo.h".
2104 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2105 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2106 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2107 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2108 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2109 (cpt_si_fd, si_timerid, si_overrun): Move from
2110 nat/amd64-linux-siginfo.c.
2111 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2112
2113 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2114
2115 * server.c (skip_to_semicolon): Remove.
2116 (process_point_options): Use strchrnul instead of
2117 skip_to_semicolon.
2118
2119 2016-01-26 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2122 * linux-low.c (install_software_single_step_breakpoints): Don't
2123 call regcache_read_pc.
2124 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2125 argument pc.
2126
2127 2016-01-26 Yao Qi <yao.qi@linaro.org>
2128
2129 * linux-low.c (install_software_single_step_breakpoints): Call
2130 regcache_read_pc instead of get_pc.
2131
2132 2016-01-26 Yao Qi <yao.qi@linaro.org>
2133
2134 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2135 (unblock_async_io): Rename to ...
2136 (block_unblock_async_io): ... it. New function.
2137 (enable_async_io): Don't install SIGIO handler. Unblock it
2138 instead.
2139 (disable_async_io): Don't ignore SIGIO. Block it instead.
2140 (initialize_async_io): Install SIGIO handler. Don't call
2141 unblock_async_io.
2142
2143 2016-01-26 Yao Qi <yao.qi@linaro.org>
2144
2145 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2146 first character is '\003', call *the_target->request_interrupt.
2147
2148 2016-01-25 Yao Qi <yao.qi@linaro.org>
2149
2150 * remote-utils.c (new_thread_notify): Remove.
2151 (dead_thread_notify): Likewise.
2152 * remote-utils.h (new_thread_notify): Remove declaration.
2153 (dead_thread_notify): Likewise.
2154
2155 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2156
2157 * gdb.trace/pending.exp: Fix expected message on continue.
2158
2159 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2160
2161 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2162 it works properly on big-endian machines where sizeof (CORE_ADDR)
2163 != sizeof (void *).
2164
2165 2016-01-21 Pedro Alves <palves@redhat.com>
2166
2167 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2168 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2169 * configure: Regenerate.
2170
2171 2016-01-21 Yao Qi <yao.qi@linaro.org>
2172
2173 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2174 is_thumb and set it according to CPSR saved on the stack.
2175 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2176 arm_sigreturn_next_pc.
2177
2178 2016-01-18 Yao Qi <yao.qi@linaro.org>
2179
2180 * linux-low.c (linux_set_pc_64bit): New function.
2181 (linux_get_pc_64bit): New function.
2182 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2183 Declare.
2184 * linux-sparc-low.c (debug_threads): Remove declaration.
2185 (sparc_get_pc): Remove.
2186 (the_low_target): Use linux_get_pc_64bit instead of
2187 sparc_get_pc.
2188 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2189 (the_low_target): Use linux_get_pc_64bit and
2190 linux_set_pc_64bit.
2191
2192 2016-01-18 Yao Qi <yao.qi@linaro.org>
2193
2194 * linux-arm-low.c (debug_threads): Remove declaration.
2195 (arm_get_pc, arm_set_pc): Remove.
2196 (the_low_target): Use linux_get_pc_32bit and
2197 linux_set_pc_32bit.
2198 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2199 (the_low_target): Use linux_get_pc_32bit and
2200 linux_set_pc_32bit.
2201 * linux-cris-low.c (debug_threads): Remove declaration.
2202 (cris_get_pc, cris_set_pc,): Remove.
2203 (the_low_target): Use linux_get_pc_32bit and
2204 linux_set_pc_32bit.
2205 * linux-crisv32-low.c (debug_threads): Remove declaration.
2206 (cris_get_pc, cris_set_pc): Remove.
2207 (the_low_target): Use linux_get_pc_32bit and
2208 linux_set_pc_32bit.
2209 * linux-low.c: Include inttypes.h.
2210 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2211 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2212 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2213 (the_low_target): Use linux_get_pc_32bit and
2214 linux_set_pc_32bit.
2215 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2216 (the_low_target): Use linux_get_pc_32bit and
2217 linux_set_pc_32bit.
2218 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2219 (the_low_target): Use linux_get_pc_32bit and
2220 linux_set_pc_32bit.
2221 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2222 (the_low_target): Use linux_get_pc_32bit and
2223 linux_set_pc_32bit.
2224 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2225 (the_low_target): Use linux_get_pc_32bit and
2226 linux_set_pc_32bit.
2227
2228 2016-01-18 Gary Benson <gbenson@redhat.com>
2229
2230 * configure.ac (AC_FUNC_FORK): New check.
2231 * config.in: Regenerate.
2232 * configure: Likewise.
2233
2234 2016-01-14 Yao Qi <yao.qi@linaro.org>
2235
2236 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2237 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2238 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2239 arm_get_next_pcs_ctor.
2240
2241 2016-01-12 Josh Stone <jistone@redhat.com>
2242 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2243
2244 * inferiors.h: Include "gdb_vecs.h".
2245 (struct process_info): Add syscalls_to_catch.
2246 * inferiors.c (remove_process): Free syscalls_to_catch.
2247 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2248 syscall_return stops.
2249 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2250 * server.c (handle_general_set): Handle QCatchSyscalls.
2251 (handle_query): Report support for QCatchSyscalls.
2252 * target.h (struct target_ops): Add supports_catch_syscall.
2253 (target_supports_catch_syscall): New macro.
2254 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2255 (struct lwp_info): Add syscall_state.
2256 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2257 Maintain syscall_state and syscalls_to_catch across exec.
2258 (get_syscall_trapinfo): New function, proxy to the_low_target.
2259 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2260 (linux_low_filter_event): Toggle syscall_state entry/return for
2261 syscall traps, and set it ignored for all others.
2262 (gdb_catching_syscalls_p): New function.
2263 (gdb_catch_this_syscall_p): New function.
2264 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2265 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2266 (linux_supports_catch_syscall): New function.
2267 (linux_target_ops): Install it.
2268 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2269 (the_low_target): Install it.
2270
2271 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2272
2273 * acinclude.m4: Include new ../warning.m4 file.
2274 * configure: Regenerated.
2275 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2276
2277 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2278
2279 * ax.c (is_goto_target): Mark static.
2280 * linux-low.c (register_addr): Likewise.
2281 (linux_fetch_registers, linux_store_registers): Likewise.
2282 * mem-break.c (any_persistent_commands): Fix old prototype.
2283 (add_commands_to_breakpoint): Mark static.
2284 * regcache.c (find_register_by_name): Delete unused func.
2285 * remote-utils.c (hex_or_minus_one): Mark static.
2286 * server.c (monitor_show_help): Mark static.
2287 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2288 handle_v_requests): Likewise.
2289
2290 2016-01-12 Pedro Alves <palves@redhat.com>
2291
2292 Remove use of the registered trademark symbol throughout.
2293
2294 2016-01-08 Yao Qi <yao.qi@linaro.org>
2295
2296 * remote-utils.c (getpkt): If c is '\003', call target hook
2297 request_interrupt.
2298
2299 2016-01-06 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2302 linux-aarch32-low.c.
2303 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2304 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2305 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2306 (thumb2_breakpoint): Declare.
2307 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2308 linux-aarch32-low.h.
2309 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2310 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2311 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2312
2313 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2314
2315 * gdbreplay.c (gdbreplay_version): Change copyright year in
2316 version message.
2317 * server.c (gdbserver_version): Likewise.
2318
2319 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2320
2321 * server.c (crc32_table): Delete.
2322 (crc32): Use libiberty's xcrc32 function.
2323
2324 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2325
2326 * lynx-low.c (lynx_delete_thread_callback): New function.
2327 (lynx_mourn): Properly delete our process and all of its
2328 threads. Remove call to clear_inferiors.
2329
2330 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2331
2332 * target.c (thread_search_callback): Add check that
2333 the thread_stopped target callback is not NULL before
2334 calling it.
2335
2336 2015-12-21 Yao Qi <yao.qi@linaro.org>
2337
2338 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2339 arm breakpoint.
2340
2341 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2342
2343 * server.c (handle_query): Call target_supports_software_single_step.
2344
2345 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2346
2347 * linux-low.c (single_step): New function.
2348 (linux_resume_one_lwp_throw): Call single_step.
2349 (start_step_over): Likewise.
2350
2351 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352
2353 * Makefile.in (SFILES): Append arch/arm-linux.c,
2354 arch/arm-get-next-pcs.c.
2355 (arm-linux.o): New rule.
2356 (arm-get-next-pcs.o): New rule.
2357 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2358 arm-linux.o.
2359 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2360 to linux-aarch32-low.c.
2361 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2362 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2363 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2364 (thumb2_breakpoint_len): Likewise.
2365 (arm_is_thumb_mode): Make non-static.
2366 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2367 from linux-aarch32-low.c.
2368 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2369 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2370 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2371 (thumb2_breakpoint_len): Likewise.
2372 (arm_is_thumb_mode): New declaration.
2373 * linux-arm-low.c: Include arch/arm-linux.h
2374 aarch/arm-get-next-pcs.h, sys/syscall.h.
2375 (get_next_pcs_ops): New struct.
2376 (get_next_pcs_addr_bits_remove): New function.
2377 (get_next_pcs_is_thumb): New function.
2378 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2379 (arm_sigreturn_next_pc): Likewise.
2380 (get_next_pcs_syscall_next_pc): Likewise.
2381 (arm_gdbserver_get_next_pcs): Likewise.
2382 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2383 Initialize.
2384 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2385 * server.h: Include gdb_vecs.h.
2386
2387 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2388
2389 * Makefile.in (SFILES): Append common/common-regcache.c.
2390 (OBS): Append common-regcache.o.
2391 (common-regcache.o): New rule.
2392 * regcache.c (init_register_cache): Initialize cache to
2393 REG_UNAVAILABLE.
2394 (regcache_raw_read_unsigned): New function.
2395 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2396 register_status enum.
2397
2398 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2399
2400 * linux-aarch64-low.c (the_low_targets): Rename
2401 breakpoint_reinsert_addr to get_next_pcs.
2402 * linux-arm-low.c (the_low_targets): Likewise.
2403 * linux-bfin-low.c (the_low_targets): Likewise.
2404 * linux-cris-low.c (the_low_targets): Likewise.
2405 * linux-crisv32-low.c (the_low_targets): Likewise.
2406 * linux-low.c (can_software_single_step): Likewise.
2407 (install_software_single_step_breakpoints): New function.
2408 (start_step_over): Use install_software_single_step_breakpoints.
2409 * linux-low.h: New CORE_ADDR vector.
2410 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2411 get_next_pcs.
2412 * linux-mips-low.c (the_low_targets): Likewise.
2413 * linux-nios2-low.c (the_low_targets): Likewise.
2414 * linux-sparc-low.c (the_low_targets): Likewise.
2415
2416 2015-12-17 Pedro Alves <palves@redhat.com>
2417
2418 * linux-low.c (linux_kill_one_lwp): Remove references to
2419 LinuxThreads.
2420 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2421 to 'kill'.
2422 (linux_init_signals): Delete.
2423 (initialize_low): Adjust.
2424 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2425
2426 2015-12-16 Pedro Alves <palves@redhat.com>
2427
2428 * configure.ac (compiler warning flags): When testing a
2429 -Wno-foo option, check whether -Wfoo works instead.
2430 * configure: Regenerate.
2431
2432 2015-12-11 Don Breazeal <donb@codesourcery.com>
2433
2434 * server.c (process_serial_event): Don't exit from gdbserver
2435 in remote mode if there are still active inferiors.
2436
2437 2015-12-11 Yao Qi <yao.qi@linaro.org>
2438
2439 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2440 arm_breakpoint_at if the process is 32-bit.
2441
2442 2015-12-11 Yao Qi <yao.qi@linaro.org>
2443
2444 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2445 arm breakpoint.
2446
2447 2015-12-07 Yao Qi <yao.qi@linaro.org>
2448
2449 * configure.srv: Append arm.o to srv_tgtobj for
2450 aarch64*-*-linux* target.
2451 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2452 from linux-arm-low.c.
2453 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2454 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2455 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2456 (thumb2_breakpoint_len): Likewise.
2457 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2458 (arm_breakpoint_kinds): Likewise.
2459 (arm_breakpoint_kind_from_pc): Likewise.
2460 (arm_sw_breakpoint_from_kind): Likewise.
2461 (arm_breakpoint_kind_from_current_state): Likewise.
2462 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2463 (arm_sw_breakpoint_from_kind): Declare.
2464 (arm_breakpoint_kind_from_current_state): Declare.
2465 (arm_breakpoint_at): Declare.
2466 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2467 arm_sw_breakpoint_from_kind if process is 32-bit.
2468 (aarch64_breakpoint_kind_from_pc): New function.
2469 (aarch64_breakpoint_kind_from_current_state): New function.
2470 (the_low_target): Initialize fields breakpoint_kind_from_pc
2471 and breakpoint_kind_from_current_state.
2472 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2473 linux-aarch32-low.c.
2474 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2475 (arm_breakpoint, arm_breakpoint_len): Likewise.
2476 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2477 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2478 (arm_is_thumb_mode): Likewise.
2479 (arm_breakpoint_at): Likewise.
2480 (arm_breakpoint_kind_from_pc): Likewise.
2481 (arm_sw_breakpoint_from_kind): Likewise.
2482 (arm_breakpoint_kind_from_current_state): Likewise.
2483
2484 Revert:
2485 2015-08-04 Yao Qi <yao.qi@linaro.org>
2486
2487 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2488 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2489 * server.c (extended_protocol): Remove "static".
2490 * server.h (extended_protocol): Declare it.
2491
2492 2015-12-04 Josh Stone <jistone@redhat.com>
2493
2494 * target.h (struct target_ops) <arch_setup>: Rename to ...
2495 (struct target_ops) <post_create_inferior>: ... this.
2496 (target_arch_setup): Rename to ...
2497 (target_post_create_inferior): ... this, calling post_create_inferior.
2498 * server.c (start_inferior): Update target_arch_setup calls to
2499 target_post_create_inferior.
2500 * linux-low.c (linux_low_ptrace_options): Forward declare.
2501 (linux_arch_setup): Update its comment for general use.
2502 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2503 (struct linux_target_ops): Use linux_post_create_inferior.
2504 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2505 to post_create_inferior.
2506 * nto-low.c (struct nto_target_ops): Likewise.
2507 * spu-low.c (struct spu_target_ops): Likewise.
2508 * win32-low.c (struct win32_target_ops): Likewise.
2509
2510 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2511
2512 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2513
2514 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2515
2516 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2517 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2518 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2519 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2520 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2521 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2522 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2523 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2524 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2525 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2526 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2527 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2528
2529 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2530
2531 * linux-low.c (linux_look_up_symbols): Don't call
2532 linux_supports_traceclone.
2533 * linux-low.h (thread_db_init): Remove use_events argument.
2534 * thread-db.c (thread_db_use_event): Remove global variable.
2535 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2536 (struct thread_db) <td_create_bp>: Remove field.
2537 (thread_db_create_event): Remove function.
2538 (thread_db_enable_reporting): Likewise.
2539 (find_one_thread): Don't check for thread_db_use_events.
2540 (attach_thread): Likewise.
2541 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2542 (try_thread_db_load_1): Don't check for thread_db_use_events.
2543 (thread_db_init): Remove use_events argument and thread events
2544 handling.
2545 (remove_thread_event_breakpoints): Remove function.
2546 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2547
2548 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2549
2550 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2551 New function.
2552 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2553 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2554 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2555 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2556 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2557 Initialize.
2558 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2559 New function.
2560 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2561 * linux-low.c (can_hardware_single_step): Use
2562 supports_hardware_single_step.
2563 (can_software_single_step): New function.
2564 (start_step_over): Call can_software_single_step.
2565 (linux_supports_hardware_single_step): New function.
2566 (struct target_ops) <supports_software_single_step>: Initialize.
2567 * linux-low.h (struct linux_target_ops)
2568 <supports_hardware_single_step>: Initialize.
2569 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2570 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2571 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2572 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2573 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2574 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2575 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2577 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2578 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2579 Initialize.
2580 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2581 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2582 Initialize.
2583 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2584 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2585 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2586 New function.
2587 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2588 * target.h (struct target_ops): <supports_software_single_step>:
2589 New field.
2590 (target_supports_software_single_step): New macro.
2591
2592 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2593
2594 * linux-low.c (linux_wait_1): Fix pc advance condition.
2595 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2596 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2597
2598 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2599
2600 * linux-arm-low.c (arm_is_thumb_mode): New function.
2601 (arm_breakpoint_at): Use arm_is_thumb_mode.
2602 (arm_breakpoint_kind_from_current_state): New function.
2603 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2604 Initialize.
2605 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2606 (linux_breakpoint_kind_from_current_state): New function.
2607 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2608 * linux-low.h (struct linux_target_ops)
2609 <breakpoint_kind_from_current_state>: New field.
2610 * target.h (struct target_ops): Likewise.
2611 (target_breakpoint_kind_from_current_state): New macro.
2612
2613 2015-11-30 Pedro Alves <palves@redhat.com>
2614
2615 * linux-low.c (linux_resume): Wake up the event loop before
2616 returning.
2617
2618 2015-11-30 Pedro Alves <palves@redhat.com>
2619
2620 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2621 check.
2622 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2623 to -1.
2624 * target.c (struct thread_search): New structure.
2625 (thread_search_callback): New function.
2626 (prev_general_thread): New global.
2627 (prepare_to_access_memory, done_accessing_memory): New functions.
2628 * target.h (prepare_to_access_memory, done_accessing_memory):
2629 Replace macros with function declarations.
2630
2631 2015-11-30 Pedro Alves <palves@redhat.com>
2632
2633 PR 14618
2634 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2635 report TARGET_WAITKIND_NO_RESUMED.
2636 * remote-utils.c (prepare_resume_reply): Handle
2637 TARGET_WAITKIND_NO_RESUMED.
2638 * server.c (report_no_resumed): New global.
2639 (handle_query) <qSupported>: Handle "no-resumed+". Report
2640 "no-resumed+" support.
2641 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2642 return error if the client doesn't support no-resumed events.
2643 (push_stop_notification): New function.
2644 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2645 events if the client supports them.
2646
2647 2015-11-30 Pedro Alves <palves@redhat.com>
2648
2649 * linux-low.c (thread_still_has_status_pending_p): Don't check
2650 vCont;t here.
2651 (lwp_resumed): New function.
2652 (status_pending_p_callback): Return early if the LWP is not
2653 supposed to be resumed.
2654
2655 2015-11-30 Pedro Alves <palves@redhat.com>
2656
2657 * linux-low.c (handle_extended_wait): Assert that the LWP's
2658 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2659 thread create events, leave the new child's status pending.
2660 (linux_low_filter_event): If GDB wants to hear about thread exit
2661 events, leave the LWP marked dead and don't delete it.
2662 (linux_wait_for_event_filtered): Don't check for thread exit.
2663 (filter_exit_event): New function.
2664 (linux_wait_1): Use it, when returning an exit event.
2665 (linux_resume_one_lwp_throw): Assert that the LWP's
2666 waitstatus is TARGET_WAITKIND_IGNORE.
2667 * remote-utils.c (prepare_resume_reply): Handle
2668 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2669 * server.c (report_thread_events): New global.
2670 (handle_general_set): Handle QThreadEvents.
2671 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2672 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2673 TARGET_WAITKIND_THREAD_EXITED.
2674 * server.h (report_thread_events): Declare.
2675
2676 2015-11-30 Pedro Alves <palves@redhat.com>
2677
2678 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2679 the thread's last_resume_kind was resume_stop.
2680
2681 2015-11-30 Pedro Alves <palves@redhat.com>
2682
2683 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2684 before returning.
2685
2686 2015-11-30 Pedro Alves <palves@redhat.com>
2687
2688 * server.c (handle_v_requests): Handle vCtrlC.
2689
2690 2015-11-30 Pedro Alves <palves@redhat.com>
2691
2692 * gdbthread.h (find_any_thread_of_pid): Declare.
2693 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2694 functions.
2695 * server.c (handle_query): If current_thread is NULL, look for
2696 another thread of the selected process.
2697
2698 2015-11-26 Daniel Colascione <dancol@dancol.org>
2699 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2702 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2703 name in reply.
2704 * target.h (struct target_ops) <thread_name>: New field.
2705 (target_thread_name): New macro.
2706
2707 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2708
2709 * regcache.h (regcache_invalidate_pid): Add declaration.
2710 * regcache.c (regcache_invalidate_pid): New function, extracted
2711 from regcache_invalidate.
2712 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2713 Add trivial documentation comment.
2714 * lynx-low.c: Use regcache_invalidate_pid instead of
2715 regcache_invalidate.
2716
2717 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2718
2719 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2720 and Elf64_auxv_t if the target is Android.
2721
2722 2015-11-22 Doug Evans <xdje42@gmail.com>
2723
2724 * target.h: #include <sys/types.h>.
2725
2726 2015-11-19 Pedro Alves <palves@redhat.com>
2727
2728 * linux-low.c (linux_process_qsupported): Change prototype.
2729 Adjust.
2730 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2731 Change prototype.
2732 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2733 and adjust to loop over all features.
2734 * server.c (handle_query) <qSupported>: Adjust to call
2735 target_process_qsupported once, passing it a vector of unprocessed
2736 features.
2737 * target.h (struct target_ops) <process_qsupported>: Change
2738 prototype.
2739 (target_process_qsupported): Adjust.
2740
2741 2015-11-19 Pedro Alves <palves@redhat.com>
2742
2743 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2744 mode.
2745 * configure: Regenerate.
2746
2747 2015-11-19 Pedro Alves <palves@redhat.com>
2748
2749 * configure: Regenerate.
2750
2751 2015-11-19 Yao Qi <yao.qi@linaro.org>
2752
2753 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2754 type to uint32_t.
2755
2756 2015-11-19 Yao Qi <yao.qi@linaro.org>
2757
2758 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2759 (struct aarch64_operand): Move enum out.
2760
2761 2015-11-19 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2764 struct user_fpsimd_state *.
2765 (aarch64_store_fpregset): Likewise.
2766
2767 2015-11-19 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2770 struct user_pt_regs *.
2771 (aarch64_store_gregset): Likewise.
2772
2773 2015-11-18 Pedro Alves <palves@redhat.com>
2774
2775 * Makefile.in (all_object_files): Add $IPA_OBJS.
2776
2777 2015-11-17 Pedro Alves <palves@redhat.com>
2778
2779 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2780 GDB_SIGNAL_0 and gdb_signal_to_string.
2781
2782 2015-11-17 Pedro Alves <palves@redhat.com>
2783
2784 * win32-low.c (handle_output_debug_string): Remove parameter.
2785 (win32_kill): Remove our_status local and adjust call to
2786 handle_output_debug_string.
2787 (get_child_debug_event): Adjust call to
2788 handle_output_debug_string.
2789
2790 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2791
2792 * linux-mips-low.c (mips_fill_gregset): Add cast.
2793 (mips_store_gregset): Likewise.
2794 (mips_fill_fpregset): Likewise.
2795 (mips_store_fpregset): Likewise.
2796
2797 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2798
2799 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2800 priv.
2801
2802 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2803
2804 * linux-mips-low.c (mips_linux_new_thread): Change type of
2805 watch_type to enum target_hw_bp_type.
2806
2807 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2808
2809 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2810 Change return type to arm_hwbp_type.
2811
2812 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2813
2814 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2815 (arm_store_gregset): Likewise.
2816 * linux-arm-low.c (arm_get_hwcap): Likewise.
2817 (arm_read_description): Likewise.
2818
2819 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2820
2821 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2822
2823 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2824
2825 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2826 (ppc_fill_vsxregset): Likewise.
2827 (ppc_store_vsxregset): Likewise.
2828 (ppc_fill_vrregset): Likewise.
2829 (ppc_store_vrregset): Likewise.
2830 (ppc_fill_evrregset): Likewise.
2831 (ppc_store_evrregset): Likewise.
2832
2833 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2834
2835 * linux-ppc-low.c (ppc_usrregs_info): Remove
2836 forward-declaration.
2837 (ppc_arch_setup): Move lower in file.
2838
2839 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2840
2841 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2842 (ps_pdwrite): Likewise.
2843
2844 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2845
2846 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2847 to after assert checks.
2848
2849 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2850
2851 * proc-service.c (ps_pdread): Add/adjust casts.
2852 (ps_pdwrite): Add/adjust casts.
2853
2854 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2855
2856 * server.c (handle_search_memory_1): Cast return value of
2857 memmem.
2858
2859 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2860
2861 * server.c (write_qxfer_response): Change type of data to
2862 gdb_byte *.
2863
2864 2015-10-29 Pedro Alves <palves@redhat.com>
2865
2866 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2867
2868 2015-10-29 Pedro Alves <palves@redhat.com>
2869
2870 * tracepoint.c (clear_installed_tracepoints): Add casts.
2871
2872 2015-10-29 Pedro Alves <palves@redhat.com>
2873
2874 * server.c (handle_v_cont, process_serial_event): Add enum
2875 gdb_signal casts to signal parsing code.
2876
2877 2015-10-29 Pedro Alves <palves@redhat.com>
2878
2879 * linux-low.h (NULL_REGSET): Define.
2880 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2881 * linux-arm-low.c (arm_regsets): Likewise.
2882 * linux-crisv32-low.c (cris_regsets): Likewise.
2883 * linux-m68k-low.c (m68k_regsets): Likewise.
2884 * linux-mips-low.c (mips_regsets): Likewise.
2885 * linux-nios2-low.c (nios2_regsets): Likewise.
2886 * linux-ppc-low.c (ppc_regsets): Likewise.
2887 * linux-s390-low.c (s390_regsets): Likewise.
2888 * linux-sh-low.c (sh_regsets): Likewise.
2889 * linux-sparc-low.c (sparc_regsets): Likewise.
2890 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2891 * linux-tile-low.c (tile_regsets): Likewise.
2892 * linux-x86-low.c (x86_regsets): Likewise.
2893 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2894
2895 2015-10-29 Pedro Alves <palves@redhat.com>
2896
2897 * linux-low.h (NULL_REGSET): Define.
2898 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2899 * linux-arm-low.c (arm_regsets): Likewise.
2900 * linux-crisv32-low.c (cris_regsets): Likewise.
2901 * linux-m68k-low.c (m68k_regsets): Likewise.
2902 * linux-mips-low.c (mips_regsets): Likewise.
2903 * linux-nios2-low.c (nios2_regsets): Likewise.
2904 * linux-ppc-low.c (ppc_regsets): Likewise.
2905 * linux-s390-low.c (s390_regsets): Likewise.
2906 * linux-sh-low.c (sh_regsets): Likewise.
2907 * linux-sparc-low.c (sparc_regsets): Likewise.
2908 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2909 * linux-tile-low.c (tile_regsets): Likewise.
2910 * linux-x86-low.c (x86_regsets): Likewise.
2911 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2912
2913 2015-10-26 Doug Evans <dje@google.com>
2914
2915 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2916
2917 2015-10-26 Doug Evans <dje@google.com>
2918
2919 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2920
2921 2015-10-26 Doug Evans <dje@google.com>
2922
2923 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2924 for debug_printf.
2925 (attach_thread, find_new_threads_callback): Ditto.
2926
2927 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2928
2929 * mem-break.h (set_breakpoint_data): Remove.
2930
2931 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2932
2933 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2934 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2935 (initialize_low): Remove set_breakpoint_data call.
2936 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2937 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2938 (initialize_low): Remove set_breakpoint_data call.
2939 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2940 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2941 (initialize_low): Remove set_breakpoint_data call.
2942
2943 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2944
2945 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2946 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2947 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2948 * target.h (target_breakpoint_kind_from_pc): New macro.
2949
2950 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2951
2952 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2953 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2954 the default breakpoint kind.
2955
2956 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2957
2958 * linux-arm-low.c (arm_supports_z_point_type): Add software
2959 breakpoint support.
2960
2961 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2962
2963 * linux-arm-low.c: Refactor breakpoint definitions.
2964 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2965 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2966
2967 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2968
2969 * Makefile.in: Add arm.c/o.
2970 * configure.srv: Likewise.
2971 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2972 (arm_breakpoint_kind_from_pc): New function.
2973 (arm_sw_breakpoint_from_kind): Return proper kind.
2974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2975
2976 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2977
2978 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2979 removal.
2980 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2981 (struct raw_breakpoint) <size>: Remove.
2982 (struct raw_breakpoint) <kind>: Add.
2983 (bp_size): New function.
2984 (bp_opcode): Likewise.
2985 (find_raw_breakpoint_at): Adjust for kind.
2986 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2987 (remove_memory_breakpoint): Adjust for kind call bp_size.
2988 (set_raw_breakpoint_at): Adjust for kind.
2989 (set_breakpoint): Likewise.
2990 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2991 (delete_raw_breakpoint): Adjust for kind.
2992 (delete_breakpoint): Likewise.
2993 (find_gdb_breakpoint): Likewise.
2994 (set_gdb_breakpoint_1): Likewise.
2995 (set_gdb_breakpoint): Likewise.
2996 (delete_gdb_breakpoint_1): Likewise.
2997 (delete_gdb_breakpoint): Likewise.
2998 (uninsert_raw_breakpoint): Likewise.
2999 (reinsert_raw_breakpoint): Likewise.
3000 (set_breakpoint_data): Remove.
3001 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3002 (check_mem_read): Adjust for kind call bp_size.
3003 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3004 (clone_one_breakpoint): Adjust for kind.
3005 * mem-break.h (set_gdb_breakpoint): Likewise.
3006 (delete_gdb_breakpoint): Likewise.
3007 * server.c (process_serial_event): Likewise.
3008
3009 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3010
3011 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3012 (struct linux_target_ops) <breakpoint>: Remove.
3013 (struct linux_target_ops) <breakpoint_len>: Remove.
3014 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3015 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3016 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3017 (arm_sw_breakpoint_from_kind): New function.
3018 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3019 (struct linux_target_ops) <breakpoint>: Remove.
3020 (struct linux_target_ops) <breakpoint_len>: Remove.
3021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3023 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3024 (struct linux_target_ops) <breakpoint>: Remove.
3025 (struct linux_target_ops) <breakpoint_len>: Remove.
3026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3028 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3029 (struct linux_target_ops) <breakpoint>: Remove.
3030 (struct linux_target_ops) <breakpoint_len>: Remove.
3031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3033 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3034 and sw_breakpoint_from_kind to increment the pc.
3035 (linux_breakpoint_kind_from_pc): New function.
3036 (linux_sw_breakpoint_from_kind): New function.
3037 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3038 (initialize_low): Call breakpoint_kind_from_pc and
3039 sw_breakpoint_from_kind to replace breakpoint_data/len.
3040 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3041 New field.
3042 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3043 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3044 (struct linux_target_ops) <breakpoint>: Remove.
3045 (struct linux_target_ops) <breakpoint_len>: Remove.
3046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3048 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3049 (struct linux_target_ops) <breakpoint>: Remove.
3050 (struct linux_target_ops) <breakpoint_len>: Remove.
3051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3053 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3054 (struct linux_target_ops) <breakpoint>: Remove.
3055 (struct linux_target_ops) <breakpoint_len>: Remove.
3056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3058 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3059 (struct linux_target_ops) <breakpoint>: Remove.
3060 (struct linux_target_ops) <breakpoint_len>: Remove.
3061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3063 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3064 (struct linux_target_ops) <breakpoint>: Remove.
3065 (struct linux_target_ops) <breakpoint_len>: Remove.
3066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3068 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3069 (struct linux_target_ops) <breakpoint>: Remove.
3070 (struct linux_target_ops) <breakpoint_len>: Remove.
3071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3073 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3074 (struct linux_target_ops) <breakpoint>: Remove.
3075 (struct linux_target_ops) <breakpoint_len>: Remove.
3076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3078 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3079 (struct linux_target_ops) <breakpoint>: Remove.
3080 (struct linux_target_ops) <breakpoint_len>: Remove.
3081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3083 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3084 (struct linux_target_ops) <breakpoint>: Remove.
3085 (struct linux_target_ops) <breakpoint_len>: Remove.
3086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3088 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3089 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3090 (struct linux_target_ops) <breakpoint>: Remove.
3091 (struct linux_target_ops) <breakpoint_len>: Remove.
3092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3094 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3095 (struct linux_target_ops) <breakpoint>: Remove.
3096 (struct linux_target_ops) <breakpoint_len>: Remove.
3097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3099
3100 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3101
3102 * linux-cris-low.c (cris_get_pc): Remove void arg.
3103
3104 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3105
3106 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3107 variable name.
3108
3109 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3110
3111 * inferiors.c (thread_pid_matches_callback): New function.
3112 (find_thread_process): New function.
3113 (remove_thread): Reset current_thread.
3114 (remove_process): Assert threads have been removed first.
3115
3116 2015-10-15 Yao Qi <yao.qi@linaro.org>
3117
3118 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3119 if it is 3.
3120 (aarch64_remove_point): Likewise.
3121 * regcache.c (regcache_register_size): New function.
3122
3123 2015-10-12 Yao Qi <yao.qi@linaro.org>
3124
3125 * linux-aarch64-low.c: Update all callers as emit_load_store
3126 is renamed to aarch64_emit_load_store.
3127
3128 2015-10-12 Yao Qi <yao.qi@linaro.org>
3129
3130 * linux-aarch64-low.c: Update all callers of function renaming
3131 from emit_insn to aarch64_emit_insn.
3132
3133 2015-10-12 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3136 arch/aarch64-insn.h.
3137 (struct aarch64_memory_operand): Likewise.
3138 (ENCODE): Likewise.
3139 (emit_insn): Move to arch/aarch64-insn.c.
3140 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3141 (emit_load_store): Move to arch/aarch64-insn.c.
3142 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3143 (can_encode_int32): Remove.
3144
3145 2015-10-12 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3148 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3149 (aarch64_relocate_instruction): Likewise.
3150 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3151 (struct aarch64_insn_visitor): Likewise.
3152
3153 2015-10-12 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3156 (struct aarch64_insn_visitor): New.
3157 (struct aarch64_insn_relocation_data): New.
3158 (aarch64_ftrace_insn_reloc_b): New function.
3159 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3160 (aarch64_ftrace_insn_reloc_cb): Likewise.
3161 (aarch64_ftrace_insn_reloc_tb): Likewise.
3162 (aarch64_ftrace_insn_reloc_adr): Likewise.
3163 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3164 (aarch64_ftrace_insn_reloc_others): Likewise.
3165 (visitor): New.
3166 (aarch64_relocate_instruction): Use visitor.
3167
3168 2015-10-12 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3171 int. Add argument buf.
3172 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3173 aarch64_relocate_instruction.
3174
3175 2015-10-12 Yao Qi <yao.qi@linaro.org>
3176
3177 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3178 argument insn. Remove local variable insn. Don't call
3179 target_read_uint32.
3180 (aarch64_install_fast_tracepoint_jump_pad): Call
3181 target_read_uint32.
3182
3183 2015-09-30 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3186 (emit_load_store_pair): Likewise.
3187
3188 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3189
3190 * dll.c (match_dll): Add cast(s).
3191 (unloaded_dll): Likewise.
3192 * linux-low.c (second_thread_of_pid_p): Likewise.
3193 (delete_lwp_callback): Likewise.
3194 (count_events_callback): Likewise.
3195 (select_event_lwp_callback): Likewise.
3196 (linux_set_resume_request): Likewise.
3197 * server.c (accumulate_file_name_length): Likewise.
3198 (emit_dll_description): Likewise.
3199 (handle_qxfer_threads_worker): Likewise.
3200 (visit_actioned_threads): Likewise.
3201 * thread-db.c (any_thread_of): Likewise.
3202 * tracepoint.c (same_process_p): Likewise.
3203 (match_blocktype): Likewise.
3204 (build_traceframe_info_xml): Likewise.
3205
3206 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3207
3208 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3209 assignment.
3210 (gdb_unparse_agent_expr): Likewise.
3211 * hostio.c (require_data): Likewise.
3212 (handle_pread): Likewise.
3213 * linux-low.c (disable_regset): Likewise.
3214 (fetch_register): Likewise.
3215 (store_register): Likewise.
3216 (get_dynamic): Likewise.
3217 (linux_qxfer_libraries_svr4): Likewise.
3218 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3219 (set_fast_tracepoint_jump): Likewise.
3220 (uninsert_fast_tracepoint_jumps_at): Likewise.
3221 (reinsert_fast_tracepoint_jumps_at): Likewise.
3222 (validate_inserted_breakpoint): Likewise.
3223 (clone_agent_expr): Likewise.
3224 * regcache.c (init_register_cache): Likewise.
3225 * remote-utils.c (putpkt_binary_1): Likewise.
3226 (decode_M_packet): Likewise.
3227 (decode_X_packet): Likewise.
3228 (look_up_one_symbol): Likewise.
3229 (relocate_instruction): Likewise.
3230 (monitor_output): Likewise.
3231 * server.c (handle_search_memory): Likewise.
3232 (handle_qxfer_exec_file): Likewise.
3233 (handle_qxfer_libraries): Likewise.
3234 (handle_qxfer): Likewise.
3235 (handle_query): Likewise.
3236 (handle_v_cont): Likewise.
3237 (handle_v_run): Likewise.
3238 (captured_main): Likewise.
3239 * target.c (write_inferior_memory): Likewise.
3240 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3241 * tracepoint.c (init_trace_buffer): Likewise.
3242 (add_tracepoint_action): Likewise.
3243 (add_traceframe): Likewise.
3244 (add_traceframe_block): Likewise.
3245 (cmd_qtdpsrc): Likewise.
3246 (cmd_qtdv): Likewise.
3247 (cmd_qtstatus): Likewise.
3248 (response_source): Likewise.
3249 (response_tsv): Likewise.
3250 (cmd_qtnotes): Likewise.
3251 (gdb_collect): Likewise.
3252 (initialize_tracepoint): Likewise.
3253
3254 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3255
3256 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3257 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3258 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3259 <NOP>: New.
3260 (enum aarch64_condition_codes): New enum.
3261 (w0): New static global.
3262 (fp): Likewise.
3263 (lr): Likewise.
3264 (struct aarch64_memory_operand) <type>: New
3265 MEMORY_OPERAND_POSTINDEX type.
3266 (postindex_memory_operand): New helper function.
3267 (emit_ret): New function.
3268 (emit_load_store_pair): New function, factored out of emit_stp
3269 with support for MEMORY_OPERAND_POSTINDEX.
3270 (emit_stp): Rewrite using emit_load_store_pair.
3271 (emit_ldp): New function.
3272 (emit_load_store): Likewise.
3273 (emit_ldr): Mention post-index instruction in comment.
3274 (emit_ldrh): New function.
3275 (emit_ldrb): New function.
3276 (emit_ldrsw): Mention post-index instruction in comment.
3277 (emit_str): Likewise.
3278 (emit_subs): New function.
3279 (emit_cmp): Likewise.
3280 (emit_and): Likewise.
3281 (emit_orr): Likewise.
3282 (emit_orn): Likewise.
3283 (emit_eor): Likewise.
3284 (emit_mvn): Likewise.
3285 (emit_lslv): Likewise.
3286 (emit_lsrv): Likewise.
3287 (emit_asrv): Likewise.
3288 (emit_mul): Likewise.
3289 (emit_sbfm): Likewise.
3290 (emit_sbfx): Likewise.
3291 (emit_ubfm): Likewise.
3292 (emit_ubfx): Likewise.
3293 (emit_csinc): Likewise.
3294 (emit_cset): Likewise.
3295 (emit_nop): Likewise.
3296 (emit_ops_insns): New helper function.
3297 (emit_pop): Likewise.
3298 (emit_push): Likewise.
3299 (aarch64_emit_prologue): New function.
3300 (aarch64_emit_epilogue): Likewise.
3301 (aarch64_emit_add): Likewise.
3302 (aarch64_emit_sub): Likewise.
3303 (aarch64_emit_mul): Likewise.
3304 (aarch64_emit_lsh): Likewise.
3305 (aarch64_emit_rsh_signed): Likewise.
3306 (aarch64_emit_rsh_unsigned): Likewise.
3307 (aarch64_emit_ext): Likewise.
3308 (aarch64_emit_log_not): Likewise.
3309 (aarch64_emit_bit_and): Likewise.
3310 (aarch64_emit_bit_or): Likewise.
3311 (aarch64_emit_bit_xor): Likewise.
3312 (aarch64_emit_bit_not): Likewise.
3313 (aarch64_emit_equal): Likewise.
3314 (aarch64_emit_less_signed): Likewise.
3315 (aarch64_emit_less_unsigned): Likewise.
3316 (aarch64_emit_ref): Likewise.
3317 (aarch64_emit_if_goto): Likewise.
3318 (aarch64_emit_goto): Likewise.
3319 (aarch64_write_goto_address): Likewise.
3320 (aarch64_emit_const): Likewise.
3321 (aarch64_emit_call): Likewise.
3322 (aarch64_emit_reg): Likewise.
3323 (aarch64_emit_pop): Likewise.
3324 (aarch64_emit_stack_flush): Likewise.
3325 (aarch64_emit_zero_ext): Likewise.
3326 (aarch64_emit_swap): Likewise.
3327 (aarch64_emit_stack_adjust): Likewise.
3328 (aarch64_emit_int_call_1): Likewise.
3329 (aarch64_emit_void_call_2): Likewise.
3330 (aarch64_emit_eq_goto): Likewise.
3331 (aarch64_emit_ne_goto): Likewise.
3332 (aarch64_emit_lt_goto): Likewise.
3333 (aarch64_emit_le_goto): Likewise.
3334 (aarch64_emit_gt_goto): Likewise.
3335 (aarch64_emit_ge_got): Likewise.
3336 (aarch64_emit_ops_impl): New static global variable.
3337 (aarch64_emit_ops): New target function, return
3338 &aarch64_emit_ops_impl.
3339 (struct linux_target_ops): Install it.
3340
3341 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3342
3343 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3344 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3345 aarch64-ipa.o.
3346 * linux-aarch64-ipa.c: New file.
3347 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3348 and endian.h.
3349 (aarch64_get_thread_area): New target method.
3350 (extract_signed_bitfield): New helper function.
3351 (aarch64_decode_ldr_literal): New function.
3352 (enum aarch64_opcodes): New enum.
3353 (struct aarch64_register): New struct.
3354 (struct aarch64_operand): New struct.
3355 (x0): New static global.
3356 (x1): Likewise.
3357 (x2): Likewise.
3358 (x3): Likewise.
3359 (x4): Likewise.
3360 (w2): Likewise.
3361 (ip0): Likewise.
3362 (sp): Likewise.
3363 (xzr): Likewise.
3364 (aarch64_register): New helper function.
3365 (register_operand): Likewise.
3366 (immediate_operand): Likewise.
3367 (struct aarch64_memory_operand): New struct.
3368 (offset_memory_operand): New helper function.
3369 (preindex_memory_operand): Likewise.
3370 (enum aarch64_system_control_registers): New enum.
3371 (ENCODE): New macro.
3372 (emit_insn): New helper function.
3373 (emit_b): New function.
3374 (emit_bcond): Likewise.
3375 (emit_cb): Likewise.
3376 (emit_tb): Likewise.
3377 (emit_blr): Likewise.
3378 (emit_stp): Likewise.
3379 (emit_ldp_q_offset): Likewise.
3380 (emit_stp_q_offset): Likewise.
3381 (emit_load_store): Likewise.
3382 (emit_ldr): Likewise.
3383 (emit_ldrsw): Likewise.
3384 (emit_str): Likewise.
3385 (emit_ldaxr): Likewise.
3386 (emit_stxr): Likewise.
3387 (emit_stlr): Likewise.
3388 (emit_data_processing_reg): Likewise.
3389 (emit_data_processing): Likewise.
3390 (emit_add): Likewise.
3391 (emit_sub): Likewise.
3392 (emit_mov): Likewise.
3393 (emit_movk): Likewise.
3394 (emit_mov_addr): Likewise.
3395 (emit_mrs): Likewise.
3396 (emit_msr): Likewise.
3397 (emit_sevl): Likewise.
3398 (emit_wfe): Likewise.
3399 (append_insns): Likewise.
3400 (can_encode_int32_in): New helper function.
3401 (aarch64_relocate_instruction): New function.
3402 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3403 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3404 (struct linux_target_ops): Install aarch64_get_thread_area,
3405 aarch64_install_fast_tracepoint_jump_pad and
3406 aarch64_get_min_fast_tracepoint_insn_len.
3407
3408 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3409
3410 * Makefile.in (aarch64-insn.o): New rule.
3411 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3412
3413 2015-09-21 Yao Qi <yao.qi@linaro.org>
3414
3415 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3416
3417 2015-09-21 Yao Qi <yao.qi@linaro.org>
3418
3419 * tracepoint.c (max_jump_pad_size): Remove.
3420
3421 2015-09-18 Yao Qi <yao.qi@linaro.org>
3422
3423 * linux-aarch64-low.c: Don't include sys/uio.h.
3424 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3425
3426 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3427
3428 * tracepoint.c (eval_result_type): Change prototype.
3429 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3430
3431 2015-09-15 Pedro Alves <palves@redhat.com>
3432
3433 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3434 Check whether to report exec events instead of checking whether
3435 multiprocess is enabled.
3436
3437 2015-09-15 Pedro Alves <palves@redhat.com>
3438
3439 PR remote/18965
3440 * remote-utils.c (prepare_resume_reply): Merge
3441 TARGET_WAITKIND_VFORK_DONE switch case with the
3442 TARGET_WAITKIND_FORKED case.
3443
3444 2015-09-15 Yao Qi <yao.qi@linaro.org>
3445
3446 * server.c (handle_query): Check string comparison using
3447 "else if" instead of "if".
3448
3449 2015-09-15 Yao Qi <yao.qi@linaro.org>
3450
3451 * server.c (vCont_supported): New global variable.
3452 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3453 matches. Append ";vContSupported+" to own_buf.
3454 (handle_v_requests): Append ";s;S" to own_buf if target supports
3455 hardware single step or vCont_supported is false.
3456 (capture_main): Set vCont_supported to zero.
3457
3458 2015-09-15 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3461 it to ...
3462 (linux_supports_hardware_single_step): ... New function.
3463 (linux_target_ops): Update.
3464 * lynx-low.c (lynx_target_ops): Set field
3465 supports_hardware_single_step to target_can_do_hardware_single_step.
3466 * nto-low.c (nto_target_ops): Likewise.
3467 * spu-low.c (spu_target_ops): Likewise.
3468 * win32-low.c (win32_target_ops): Likewise.
3469 * target.c (target_can_do_hardware_single_step): New function.
3470 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3471 Remove. <supports_hardware_single_step>: New field.
3472 (target_supports_conditional_breakpoints): Remove.
3473 (target_supports_hardware_single_step): New macro.
3474 (target_can_do_hardware_single_step): Declare.
3475 * server.c (handle_query): Use target_supports_hardware_single_step
3476 instead of target_supports_conditional_breakpoints.
3477
3478 2015-09-15 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3481 function.
3482 (struct linux_target_ops the_low_target): Install
3483 aarch64_linux_siginfo_fixup.
3484
3485 2015-09-11 Don Breazeal <donb@codesourcery.com>
3486 Luis Machado <lgustavo@codesourcery.com>
3487
3488 * linux-low.c (linux_mourn): Static declaration.
3489 (linux_arch_setup): Move in front of
3490 handle_extended_wait.
3491 (linux_arch_setup_thread): New function.
3492 (handle_extended_wait): Handle exec events. Call
3493 linux_arch_setup_thread. Make event_lwp argument a
3494 pointer-to-a-pointer.
3495 (check_zombie_leaders): Do not check stopped threads.
3496 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3497 (linux_low_filter_event): Add lwp and thread for exec'ing
3498 non-leader thread if leader thread has been deleted.
3499 Refactor code into linux_arch_setup_thread and call it.
3500 Pass child lwp pointer by reference to handle_extended_wait.
3501 (linux_wait_for_event_filtered): Update comment.
3502 (linux_wait_1): Prevent clobbering exec event status.
3503 (linux_supports_exec_events): New function.
3504 (linux_target_ops) <supports_exec_events>: Initialize new member.
3505 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3506 new member.
3507 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3508 * server.c (report_exec_events): New global variable.
3509 (handle_query): Handle qSupported query for exec-events feature.
3510 (captured_main): Initialize report_exec_events.
3511 * server.h (report_exec_events): Declare new global variable.
3512 * target.h (struct target_ops) <supports_exec_events>: New
3513 member.
3514 (target_supports_exec_events): New macro.
3515 * win32-low.c (win32_target_ops) <supports_exec_events>:
3516 Initialize new member.
3517
3518 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3519
3520 * linux-low.c (linux_low_enable_btrace): Remove.
3521 (linux_target_ops): Replace linux_low_enable_btrace with
3522 linux_enable_btrace.
3523
3524 2015-09-03 Yao Qi <yao.qi@linaro.org>
3525
3526 * linux-aarch64-low.c (aarch64_insert_point): Call
3527 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3528 returns true.
3529
3530 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3531
3532 * linux-low.c (check_stopped_by_breakpoint): Use
3533 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3534
3535 2015-08-27 Pedro Alves <palves@redhat.com>
3536
3537 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3538
3539 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3540
3541 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3542 the XNEW-family equivalent.
3543 (compile_bytecodes): Likewise.
3544 * dll.c (loaded_dll): Likewise.
3545 * event-loop.c (append_callback_event): Likewise.
3546 (create_file_handler): Likewise.
3547 (create_file_event): Likewise.
3548 * hostio.c (handle_open): Likewise.
3549 * inferiors.c (add_thread): Likewise.
3550 (add_process): Likewise.
3551 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3552 * linux-arm-low.c (arm_new_process): Likewise.
3553 (arm_new_thread): Likewise.
3554 * linux-low.c (add_to_pid_list): Likewise.
3555 (linux_add_process): Likewise.
3556 (handle_extended_wait): Likewise.
3557 (add_lwp): Likewise.
3558 (enqueue_one_deferred_signal): Likewise.
3559 (enqueue_pending_signal): Likewise.
3560 (linux_resume_one_lwp_throw): Likewise.
3561 (linux_resume_one_thread): Likewise.
3562 (linux_read_memory): Likewise.
3563 (linux_write_memory): Likewise.
3564 * linux-mips-low.c (mips_linux_new_process): Likewise.
3565 (mips_linux_new_thread): Likewise.
3566 (mips_add_watchpoint): Likewise.
3567 * linux-x86-low.c (initialize_low_arch): Likewise.
3568 * lynx-low.c (lynx_add_process): Likewise.
3569 * mem-break.c (set_raw_breakpoint_at): Likewise.
3570 (set_breakpoint): Likewise.
3571 (add_condition_to_breakpoint): Likewise.
3572 (add_commands_to_breakpoint): Likewise.
3573 (clone_agent_expr): Likewise.
3574 (clone_one_breakpoint): Likewise.
3575 * regcache.c (new_register_cache): Likewise.
3576 * remote-utils.c (look_up_one_symbol): Likewise.
3577 * server.c (queue_stop_reply): Likewise.
3578 (start_inferior): Likewise.
3579 (queue_stop_reply_callback): Likewise.
3580 (handle_target_event): Likewise.
3581 * spu-low.c (fetch_ppc_memory): Likewise.
3582 (store_ppc_memory): Likewise.
3583 * target.c (set_target_ops): Likewise.
3584 * thread-db.c (thread_db_load_search): Likewise.
3585 (try_thread_db_load_1): Likewise.
3586 * tracepoint.c (add_tracepoint): Likewise.
3587 (add_tracepoint_action): Likewise.
3588 (create_trace_state_variable): Likewise.
3589 (cmd_qtdpsrc): Likewise.
3590 (cmd_qtro): Likewise.
3591 (add_while_stepping_state): Likewise.
3592 * win32-low.c (child_add_thread): Likewise.
3593 (get_image_name): Likewise.
3594
3595 2015-08-25 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3598
3599 2015-08-25 Yao Qi <yao.qi@linaro.org>
3600
3601 * Makefile.in (aarch64-linux.o): New rule.
3602 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3603 srv_tgtobj.
3604 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3605 (aarch64_init_debug_reg_state): Make it extern.
3606 (aarch64_linux_prepare_to_resume): Remove.
3607
3608 2015-08-25 Yao Qi <yao.qi@linaro.org>
3609
3610 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3611 lwp_arch_private_info and ptid_of_lwp.
3612
3613 2015-08-25 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3616 Find proc_info by find_process_pid. All callers updated.
3617
3618 2015-08-25 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3621 Remove.
3622 (debug_reg_change_callback): Remove.
3623 (aarch64_notify_debug_reg_change): Remove.
3624
3625 2015-08-25 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3628 Call current_lwp_ptid.
3629
3630 2015-08-25 Yao Qi <yao.qi@linaro.org>
3631
3632 * linux-aarch64-low.c (debug_reg_change_callback): Use
3633 debug_printf.
3634
3635 2015-08-25 Yao Qi <yao.qi@linaro.org>
3636
3637 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3638
3639 2015-08-25 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3642
3643 2015-08-25 Yao Qi <yao.qi@linaro.org>
3644
3645 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3646 the code.
3647
3648 2015-08-25 Yao Qi <yao.qi@linaro.org>
3649
3650 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3651 Remove.
3652 (debug_reg_change_callback): Remove argument entry and add argument
3653 lwp. Remove local variable thread. Don't print thread id in the
3654 debugging output. Don't check whether pid of thread equals to pid.
3655 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3656 iterate_over_lwps instead find_inferior.
3657
3658 2015-08-24 Pedro Alves <palves@redhat.com>
3659
3660 * inferiors.c (get_first_process): New function.
3661 * inferiors.h (get_first_process): New declaration.
3662 * remote-utils.c (read_ptid): Default to the first process in the
3663 list, instead of to the current thread's process.
3664
3665 2015-08-24 Pedro Alves <palves@redhat.com>
3666
3667 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3668 * event-loop.c: Likewise.
3669 * remote-utils.c: Likewise.
3670 * tracepoint.c: Likewise.
3671
3672 2015-08-24 Pedro Alves <palves@redhat.com>
3673
3674 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3675 ptid_get_lwp.
3676
3677 2015-08-21 Pedro Alves <palves@redhat.com>
3678
3679 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3680 instead of literal 1.
3681
3682 2015-08-21 Pedro Alves <palves@redhat.com>
3683
3684 * tdesc.c (default_description): Explicitly zero-initialize.
3685
3686 2015-08-21 Pedro Alves <palves@redhat.com>
3687
3688 PR gdb/18749
3689 * inferiors.c (remove_thread): Discard any pending stop reply for
3690 this thread.
3691 * server.c (remove_all_on_match_pid): Rename to ...
3692 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3693 instead of a pid.
3694 (discard_queued_stop_replies): Change parameter to a ptid. Now
3695 extern.
3696 (handle_v_kill, kill_inferior_callback, captured_main)
3697 (process_serial_event): Adjust.
3698 * server.h (discard_queued_stop_replies): Declare.
3699
3700 2015-08-21 Pedro Alves <palves@redhat.com>
3701
3702 * linux-low.c (wait_for_sigstop): Always switch to no thread
3703 selected if the previously current thread dies.
3704 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3705 process instead of the current thread's.
3706 * remote-utils.c (input_interrupt): Don't check if there's no
3707 current thread.
3708 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3709 current thread to the general thread fails, error out.
3710 (handle_qxfer_auxv, handle_qxfer_libraries)
3711 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3712 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3713 (handle_query): Check if there's a thread selected instead of
3714 checking whether there's any thread in the thread list.
3715 (handle_qxfer_threads, handle_qxfer_btrace)
3716 (handle_qxfer_btrace_conf): Don't error out early if there's no
3717 thread in the thread list.
3718 (handle_v_cont, myresume): Don't set the current thread to the
3719 continue thread.
3720 (process_serial_event) <Hg handling>: Also set thread_id if the
3721 previous general thread is still alive.
3722 (process_serial_event) <g/G handling>: If setting the current
3723 thread to the general thread fails, error out.
3724 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3725 thread's lwp instead of the current thread's.
3726 * target.c (set_desired_thread): If the desired thread was not
3727 found, leave the current thread pointing to NULL. Return an int
3728 (boolean) indicating success.
3729 * target.h (set_desired_thread): Change return type to int.
3730
3731 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3732
3733 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3734 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3735 #includes.
3736 (ps_get_thread_area): New function.
3737
3738 2015-08-19 Gary Benson <gbenson@redhat.com>
3739
3740 * hostio.c (handle_pread): Do not attempt to read more data
3741 than hostio_reply_with_data can fit in a packet.
3742
3743 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3744
3745 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3746
3747 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3748
3749 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3750
3751 2015-08-06 Pedro Alves <palves@redhat.com>
3752
3753 * tracepoint.c (expr_eval_result): Now an int.
3754
3755 2015-08-06 Pedro Alves <palves@redhat.com>
3756
3757 * gdbthread.h (struct regcache): Forward declare.
3758 (struct thread_info) <regcache_data>: Now a struct regcache
3759 pointer.
3760 * inferiors.c (inferior_regcache_data)
3761 (set_inferior_regcache_data): Now work with struct regcache
3762 pointers.
3763 * inferiors.h (struct regcache): Forward declare.
3764 (inferior_regcache_data, set_inferior_regcache_data): Now work
3765 with struct regcache pointers.
3766 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3767 (free_register_cache_thread): Remove struct regcache pointer
3768 casts.
3769
3770 2015-08-06 Pedro Alves <palves@redhat.com>
3771
3772 * server.c (captured_main): On error, print the exception message
3773 to stderr, and if run_once is set, throw a quit.
3774
3775 2015-08-06 Pedro Alves <palves@redhat.com>
3776
3777 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3778 the current thread.
3779
3780 2015-08-06 Pedro Alves <palves@redhat.com>
3781
3782 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3783 reading beyond the passed in buffer length.
3784
3785 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3786
3787 * tracepoint.c (symbol_list) <required>: Remove.
3788
3789 2015-08-06 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3792 count if stopping and suspending threads.
3793 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3794 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3795 (linux_detach): Complete an ongoing step-over.
3796 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3797 throughout.
3798 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3799 (linux_wait_1): If passing a signal to the inferior after
3800 finishing a step-over, unsuspend and re-resume all lwps. If we
3801 see a single-step event but the thread should be continuing, don't
3802 pass the trap to gdb.
3803 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3804 internal_error instead of gdb_assert.
3805 (enqueue_pending_signal): New function.
3806 (check_ptrace_stopped_lwp_gone): Add debug output.
3807 (start_step_over): Use internal_error instead of gdb_assert.
3808 (complete_ongoing_step_over): New function.
3809 (linux_resume_one_thread): Don't resume a suspended thread.
3810 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3811 it stepping.
3812
3813 2015-08-06 Pedro Alves <palves@redhat.com>
3814
3815 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3816 (linux_thread_alive): Use lwp_is_marked_dead.
3817 (extended_event_reported): Delete.
3818 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3819 instead of extended_event_reported.
3820 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3821 as well.
3822 (lwp_is_marked_dead): New function.
3823 (lwp_running): Use lwp_is_marked_dead.
3824 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3825 comment.
3826
3827 2015-08-06 Pedro Alves <palves@redhat.com>
3828
3829 * linux-low.c (linux_wait_1): Move fork event output out of the
3830 !report_to_gdb check. Pass event_child->waitstatus to
3831 target_waitstatus_to_string instead of ourstatus.
3832
3833 2015-08-04 Yao Qi <yao.qi@linaro.org>
3834
3835 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3836 if current_thread is 32 bit.
3837
3838 2015-08-04 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3841 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3842 * server.c (extended_protocol): Remove "static".
3843 * server.h (extended_protocol): Declare it.
3844
3845 2015-08-04 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3848 both aarch64 and aarch32.
3849 (aarch64_set_pc): Likewise.
3850
3851 2015-08-04 Yao Qi <yao.qi@linaro.org>
3852
3853 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3854 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3855 arm-with-neon.xml to srv_xmlfiles.
3856 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3857 (is_64bit_tdesc): New function.
3858 (aarch64_linux_read_description): New function.
3859 (aarch64_arch_setup): Call aarch64_linux_read_description.
3860 (regs_info): Rename to regs_info_aarch64.
3861 (aarch64_regs_info): Return right regs_info.
3862 (initialize_low_arch): Call initialize_low_arch_aarch32.
3863
3864 2015-08-04 Yao Qi <yao.qi@linaro.org>
3865
3866 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3867 * linux-aarch32-low.c: New file.
3868 * linux-aarch32-low.h: New file.
3869 * linux-arm-low.c (arm_fill_gregset): Move it to
3870 linux-aarch32-low.c.
3871 (arm_store_gregset): Likewise.
3872 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3873 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3874 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3875 (regs_info): Rename to regs_info_arm.
3876 (arm_regs_info): Return regs_info_aarch32 if
3877 have_ptrace_getregset is 1 and target description is
3878 arm_with_neon or arm_with_vfpv3.
3879 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3880 Call initialize_low_arch_aarch32 instead.
3881
3882 2015-08-04 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3885 * linux-low.c: ... here.
3886 * linux-low.h (have_ptrace_getregset): Declare it.
3887
3888 2015-08-04 Pedro Alves <palves@redhat.com>
3889
3890 * thread-db.c (struct thread_db): Use new typedefs.
3891 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3892 CHK calls.
3893 (disable_thread_event_reporting): Cast result of dlsym to
3894 destination function pointer type.
3895 (thread_db_mourn): Use td_ta_delete_ftype.
3896
3897 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3898
3899 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3900 arch variant.
3901 (CDX_BREAKPOINT): Define for R2.
3902 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3903 (the_low_target): Add comments.
3904
3905 2015-07-30 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-arm-low.c (arm_hwcap): Remove it.
3908 (arm_read_description): New local variable arm_hwcap. Don't
3909 set arm_hwcap to zero.
3910
3911 2015-07-30 Yao Qi <yao.qi@linaro.org>
3912
3913 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3914 Use regcache->tdesc instead.
3915 (arm_store_wmmxregset): Likewise.
3916 (arm_fill_vfpregset): Likewise.
3917 (arm_store_vfpregset): Likewise.
3918
3919 2015-07-30 Yao Qi <yao.qi@linaro.org>
3920
3921 * linux-arm-low.c: Include arch/arm.h.
3922 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3923 (arm_store_gregset): Likewise.
3924
3925 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3926
3927 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3928 ptrace's 4th parameter.
3929
3930 2015-07-27 Yao Qi <yao.qi@linaro.org>
3931
3932 * configure.srv (case aarch64*-*-linux*): Don't set
3933 srv_linux_usrregs.
3934
3935 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3936
3937 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3938 sys/ptrace.h.
3939 * linux-arm-low.c: Likewise.
3940 * linux-cris-low.c: Likewise.
3941 * linux-crisv32-low.c: Likewise.
3942 * linux-low.c: Likewise.
3943 * linux-m68k-low.c: Likewise.
3944 * linux-mips-low.c: Likewise.
3945 * linux-nios2-low.c: Likewise.
3946 * linux-s390-low.c: Likewise.
3947 * linux-sparc-low.c: Likewise.
3948 * linux-tic6x-low.c: Likewise.
3949 * linux-tile-low.c: Likewise.
3950 * linux-x86-low.c: Likewise.
3951
3952 2015-07-24 Pedro Alves <palves@redhat.com>
3953
3954 * config.in: Regenerate.
3955 * configure: Regenerate.
3956
3957 2015-07-24 Pedro Alves <palves@redhat.com>
3958
3959 * acinclude.m4: Include ../ptrace.m4.
3960 * configure.ac: Call GDB_AC_PTRACE.
3961 * config.in, configure: Regenerate.
3962
3963 2015-07-24 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-low.c (linux_create_inferior): Remove setting to
3966 proc->priv->new_inferior.
3967 (linux_attach): Likewise.
3968 (linux_low_filter_event): Likewise.
3969 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3970
3971 2015-07-24 Yao Qi <yao.qi@linaro.org>
3972
3973 * linux-low.c (linux_arch_setup): New function.
3974 (linux_low_filter_event): If proc->tdesc is NULL and
3975 proc->attached is true, call the_low_target.arch_setup.
3976 Otherwise, keep status pending, and return.
3977 (linux_resume_one_lwp_throw): Don't call get_pc if
3978 thread->while_stepping isn't NULL. Don't call
3979 get_thread_regcache if proc->tdesc is NULL.
3980 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3981 (linux_target_ops): Install arch_setup.
3982 * server.c (start_inferior): Call the_target->arch_setup.
3983 * target.h (struct target_ops) <arch_setup>: New field.
3984 (target_arch_setup): New marco.
3985 * lynx-low.c (lynx_target_ops): Update.
3986 * nto-low.c (nto_target_ops): Update.
3987 * spu-low.c (spu_target_ops): Update.
3988 * win32-low.c (win32_target_ops): Update.
3989
3990 2015-07-24 Yao Qi <yao.qi@linaro.org>
3991
3992 * linux-low.c (linux_add_process): Don't set
3993 proc->priv->new_inferior.
3994 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3995 (linux_attach): Likewise.
3996
3997 2015-07-24 Yao Qi <yao.qi@linaro.org>
3998
3999 * server.c (start_inferior): Code refactor.
4000
4001 2015-07-24 Yao Qi <yao.qi@linaro.org>
4002
4003 * server.c (process_serial_event): Set general_thread.
4004
4005 2015-07-21 Yao Qi <yao.qi@linaro.org>
4006
4007 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4008 aarch64_linux_get_debug_reg_capacity.
4009
4010 2015-07-17 Yao Qi <yao.qi@linaro.org>
4011
4012 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4013 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4014 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4015 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4016 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4017 (AARCH64_HWP_ALIGNMENT): Likewise.
4018 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4019 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4020 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4021 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4022 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4023 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4024 (struct aarch64_debug_reg_state): Likewise.
4025 (struct arch_lwp_info): Likewise.
4026 (aarch64_align_watchpoint): Likewise.
4027 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4028 (aarch64_watchpoint_length): Likewise.
4029 (aarch64_point_encode_ctrl_reg): Likewise
4030 (aarch64_point_is_aligned): Likewise.
4031 (aarch64_align_watchpoint): Likewise.
4032 (aarch64_linux_set_debug_regs):
4033 (aarch64_dr_state_insert_one_point): Likewise.
4034 (aarch64_dr_state_remove_one_point): Likewise.
4035 (aarch64_handle_breakpoint): Likewise.
4036 (aarch64_handle_aligned_watchpoint): Likewise.
4037 (aarch64_handle_unaligned_watchpoint): Likewise.
4038 (aarch64_handle_watchpoint): Likewise.
4039
4040 2015-07-17 Yao Qi <yao.qi@linaro.org>
4041
4042 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4043 and don't aarch64_get_debug_reg_state. All callers update.
4044 (aarch64_handle_aligned_watchpoint): Likewise.
4045 (aarch64_handle_unaligned_watchpoint): Likewise.
4046 (aarch64_handle_watchpoint): Likewise.
4047 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4048 (aarch64_remove_point): Likewise.
4049
4050 2015-07-17 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4053 debug_printf.
4054 (aarch64_handle_unaligned_watchpoint): Likewise.
4055
4056 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4057
4058 Revert the previous 3 commits:
4059 Move gdb_regex* to common/
4060 Move linux_find_memory_regions_full & co.
4061 gdbserver build-id attribute generator
4062
4063 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4064 Jan Kratochvil <jan.kratochvil@redhat.com>
4065
4066 gdbserver build-id attribute generator.
4067 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4068 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4069 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4070 (find_phdr): New.
4071 (get_dynamic): Use find_pdhr to traverse program headers.
4072 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4073 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4074 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4075 (get_hex_build_id): New.
4076 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4077 to reply XML document.
4078
4079 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4080 Jan Kratochvil <jan.kratochvil@redhat.com>
4081
4082 * target.c: Include target/target-utils.h and fcntl.h.
4083 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4084 (target_fileio_read_stralloc): New functions.
4085
4086 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4087
4088 * Makefile.in (OBS): Add gdb_regex.o.
4089 (gdb_regex.o): New.
4090 * config.in: Rebuilt.
4091 * configure: Rebuilt.
4092
4093 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4094 Jan Kratochvil <jan.kratochvil@redhat.com>
4095
4096 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4097 * Makefile.in (OBS): Add target-utils.o.
4098 (linux-maps.o, target-utils.o): New.
4099 * configure.srv (srv_linux_obj): Add linux-maps.o.
4100
4101 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4102
4103 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4104 function, return 1.
4105 (the_low_target): Install it.
4106
4107 2015-07-14 Pedro Alves <palves@redhat.com>
4108
4109 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4110 Instead, ignore ECHILD, and throw an error for other errnos.
4111
4112 2015-07-10 Pedro Alves <palves@redhat.com>
4113
4114 * event-loop.c (struct callback_event) <data>: Change type to
4115 gdb_client_data instance instead of gdb_client_data pointer.
4116 (append_callback_event): Adjust.
4117
4118 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4119
4120 * linux-aarch64-low.c: Add comments for each linux_target_ops
4121 method. Remove comments already covered in target_ops and
4122 linux_target_ops definitions.
4123 (the_low_target): Add comments for each unimplemented method.
4124
4125 2015-07-09 Yao Qi <yao.qi@linaro.org>
4126
4127 * linux-aarch64-low.c (aarch64_regmap): Remove.
4128 (aarch64_usrregs_info): Remove.
4129 (regs_info): Set field usrregs to NULL.
4130
4131 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4132
4133 * linux-low.c: Include "rsp-low.h"
4134 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4135 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4136 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4137 (handle_btrace_enable_pt): New.
4138 (handle_btrace_general_set): Support "pt".
4139 (handle_btrace_conf_general_set): Support "pt:size".
4140
4141 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4142
4143 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4144 Z_PACKET_SW_BP.
4145
4146 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4147
4148 * linux-aarch64-low.c: Remove comment about endianness.
4149 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4150 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4151 memcmp.
4152
4153 2015-06-24 Gary Benson <gbenson@redhat.com>
4154
4155 * linux-i386-ipa.c (stdint.h): Do not include.
4156 * lynx-i386-low.c (stdint.h): Likewise.
4157 * lynx-ppc-low.c (stdint.h): Likewise.
4158 * mem-break.c (stdint.h): Likewise.
4159 * thread-db.c (stdint.h): Likewise.
4160 * tracepoint.c (stdint.h): Likewise.
4161 * win32-low.c (stdint.h): Likewise.
4162
4163 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4164
4165 * server.c (write_qxfer_response): Update call to
4166 remote_escape_output.
4167
4168 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4169 Jan Kratochvil <jan.kratochvil@redhat.com>
4170
4171 Merge multiple hex conversions.
4172 * gdbreplay.c (tohex): Rename to 'fromhex'.
4173 (logchar): Use fromhex.
4174
4175 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4176
4177 * server.c (handle_qxfer_libraries): Set `version' attribute for
4178 <library-list>.
4179
4180 2015-06-10 Gary Benson <gbenson@redhat.com>
4181
4182 * target.h (struct target_ops) <multifs_open>: New field.
4183 <multifs_unlink>: Likewise.
4184 <multifs_readlink>: Likewise.
4185 * linux-low.c (nat/linux-namespaces.h): New include.
4186 (linux_target_ops): Initialize the_target->multifs_open,
4187 the_target->multifs_unlink and the_target->multifs_readlink.
4188 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4189 * hostio.c (hostio_fs_pid): New static variable.
4190 (hostio_handle_new_gdb_connection): New function.
4191 (handle_setfs): Likewise.
4192 (handle_open): Use the_target->multifs_open as appropriate.
4193 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4194 (handle_readlink): Use the_target->multifs_readlink as
4195 appropriate.
4196 (handle_vFile): Handle vFile:setfs packets.
4197 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4198 after target_handle_new_gdb_connection.
4199
4200 2015-06-10 Gary Benson <gbenson@redhat.com>
4201
4202 * configure.ac (AC_CHECK_FUNCS): Add setns.
4203 * config.in: Regenerate.
4204 * configure: Likewise.
4205 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4206 (linux-namespaces.o): New rule.
4207 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4208
4209 2015-06-09 Gary Benson <gbenson@redhat.com>
4210
4211 * hostio.c (handle_open): Process mode argument with
4212 fileio_to_host_mode.
4213
4214 2015-06-01 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4217 * linux-x86-low.c: Likewise.
4218
4219 2015-05-28 Don Breazeal <donb@codesourcery.com>
4220
4221 * linux-low.c (handle_extended_wait): Initialize
4222 thread_info.last_resume_kind for new fork children.
4223
4224 2015-05-15 Pedro Alves <palves@redhat.com>
4225
4226 * target.h (target_handle_new_gdb_connection): Rewrite using if
4227 wrapped in do/while.
4228
4229 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4230
4231 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4232 * configure, config.in: Regenerate.
4233 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4234 Declare typedef.
4235
4236 2015-05-12 Don Breazeal <donb@codesourcery.com>
4237
4238 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4239 PTRACE_EVENT_VFORK_DONE.
4240 (linux_low_ptrace_options, extended_event_reported): Add vfork
4241 events.
4242 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4243 and "vforkdone" for RSP 'T' Stop Reply Packet.
4244 * server.h (report_vfork_events): Declare
4245 global variable.
4246
4247 2015-05-12 Don Breazeal <donb@codesourcery.com>
4248
4249 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4250 (the_low_target) <new_fork>: Initialize new member.
4251 * linux-arm-low.c (arm_new_fork): New function.
4252 (the_low_target) <new_fork>: Initialize new member.
4253 * linux-low.c (handle_extended_wait): Call new target function
4254 new_fork.
4255 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4256 * linux-mips-low.c (mips_add_watchpoint): New function
4257 extracted from mips_insert_point.
4258 (the_low_target) <new_fork>: Initialize new member.
4259 (mips_linux_new_fork): New function.
4260 (mips_insert_point): Call mips_add_watchpoint.
4261 * linux-x86-low.c (x86_linux_new_fork): New function.
4262 (the_low_target) <new_fork>: Initialize new member.
4263
4264 2015-05-12 Don Breazeal <donb@codesourcery.com>
4265
4266 * linux-low.c (handle_extended_wait): Implement return value,
4267 rename argument 'event_child' to 'event_lwp', handle
4268 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4269 (linux_low_ptrace_options): New function.
4270 (linux_low_filter_event): Call linux_low_ptrace_options,
4271 use different argument fo linux_enable_event_reporting,
4272 use return value from handle_extended_wait.
4273 (extended_event_reported): New function.
4274 (linux_wait_1): Call extended_event_reported and set
4275 status to report fork events.
4276 (linux_write_memory): Add pid to debug message.
4277 (reset_lwp_ptrace_options_callback): New function.
4278 (linux_handle_new_gdb_connection): New function.
4279 (linux_target_ops): Initialize new structure member.
4280 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4281 * lynx-low.c: Initialize new structure member.
4282 * remote-utils.c (prepare_resume_reply): Implement stop reason
4283 "fork" for "T" stop message.
4284 * server.c (handle_query): Call handle_new_gdb_connection.
4285 * server.h (report_fork_events): Declare global flag.
4286 * target.h (struct target_ops) <handle_new_gdb_connection>:
4287 New member.
4288 (target_handle_new_gdb_connection): New macro.
4289 * win32-low.c: Initialize new structure member.
4290
4291 2015-05-12 Don Breazeal <donb@codesourcery.com>
4292
4293 * mem-break.c (APPEND_TO_LIST): Define macro.
4294 (clone_agent_expr): New function.
4295 (clone_one_breakpoint): New function.
4296 (clone_all_breakpoints): New function.
4297 * mem-break.h: Declare new functions.
4298
4299 2015-05-12 Don Breazeal <donb@codesourcery.com>
4300
4301 * linux-low.c (linux_supports_fork_events): New function.
4302 (linux_supports_vfork_events): New function.
4303 (linux_target_ops): Initialize new structure members.
4304 (initialize_low): Call linux_check_ptrace_features.
4305 * lynx-low.c (lynx_target_ops): Initialize new structure
4306 members.
4307 * server.c (report_fork_events, report_vfork_events):
4308 New global flags.
4309 (handle_query): Add new features to qSupported packet and
4310 response.
4311 (captured_main): Initialize new global variables.
4312 * target.h (struct target_ops) <supports_fork_events>:
4313 New member.
4314 <supports_vfork_events>: New member.
4315 (target_supports_fork_events): New macro.
4316 (target_supports_vfork_events): New macro.
4317 * win32-low.c (win32_target_ops): Initialize new structure
4318 members.
4319
4320 2015-05-12 Gary Benson <gbenson@redhat.com>
4321
4322 * server.c (handle_qxfer_exec_file): Use current process
4323 if annex is empty.
4324
4325 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4326
4327 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4328 Remove HAVE_PTRACE_GETREGS conditionals.
4329 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4330 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4331
4332 2015-05-08 Yao Qi <yao.qi@linaro.org>
4333
4334 * linux-low.c (linux_supports_conditional_breakpoints): New
4335 function.
4336 (linux_target_ops): Install new target method.
4337 * lynx-low.c (lynx_target_ops): Install NULL hook for
4338 supports_conditional_breakpoints.
4339 * nto-low.c (nto_target_ops): Likewise.
4340 * spu-low.c (spu_target_ops): Likewise.
4341 * win32-low.c (win32_target_ops): Likewise.
4342 * server.c (handle_query): Check
4343 target_supports_conditional_breakpoints.
4344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4345 New field.
4346 (target_supports_conditional_breakpoints): New macro.
4347
4348 2015-05-06 Pedro Alves <palves@redhat.com>
4349
4350 PR server/18081
4351 * server.c (start_inferior): If the process exits, mourn it.
4352
4353 2015-04-21 Gary Benson <gbenson@redhat.com>
4354
4355 * hostio.c (fileio_open_flags_to_host): Factored out to
4356 fileio_to_host_openflags in common/fileio.c. Single use
4357 updated.
4358
4359 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4360
4361 * linux-xtensa-low.c (xtensa_fill_gregset)
4362 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4363 XCHAL_HAVE_LOOP.
4364
4365 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4366
4367 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4368 (regs_info): Replace usrregs pointer with NULL.
4369
4370 2015-04-17 Gary Benson <gbenson@redhat.com>
4371
4372 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4373 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4374 * server.c (handle_qxfer_exec_file): New function.
4375 (qxfer_packets): Add exec-file entry.
4376 (handle_query): Report qXfer:exec-file:read as supported packet.
4377
4378 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4379
4380 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4381
4382 2015-04-09 Gary Benson <gbenson@redhat.com>
4383
4384 * hostio-errno.c (errno_to_fileio_error): Remove function.
4385 Update caller to use remote_fileio_to_fio_error.
4386
4387 2015-04-09 Yao Qi <yao.qi@linaro.org>
4388
4389 * linux-low.c (linux_insert_point): Call
4390 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4391 (linux_remove_point): Call remove_memory_breakpoint if type is
4392 raw_bkpt_type_sw.
4393 * linux-x86-low.c (x86_insert_point): Don't call
4394 insert_memory_breakpoint.
4395 (x86_remove_point): Don't call remove_memory_breakpoint.
4396
4397 2015-04-01 Pedro Alves <palves@redhat.com>
4398 Cleber Rosa <crosa@redhat.com>
4399
4400 * server.c (gdbserver_usage): Reorganize and extend the usage
4401 message.
4402
4403 2015-03-24 Pedro Alves <palves@redhat.com>
4404
4405 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4406 output. Also dump TRAP_TRACE.
4407 (linux_low_filter_event): In debug output, distinguish a
4408 resume_stop SIGSTOP from a delayed SIGSTOP.
4409
4410 2015-03-24 Gary Benson <gbenson@redhat.com>
4411
4412 * linux-x86-low.c (x86_linux_new_thread): Moved to
4413 nat/x86-linux.c.
4414 (x86_linux_prepare_to_resume): Likewise.
4415
4416 2015-03-24 Gary Benson <gbenson@redhat.com>
4417
4418 * Makefile.in (x86-linux-dregs.o): New rule.
4419 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4420 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4421 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4422 (x86_linux_dr_get): Likewise.
4423 (x86_linux_dr_set): Likewise.
4424 (update_debug_registers_callback): Likewise.
4425 (x86_linux_dr_set_addr): Likewise.
4426 (x86_linux_dr_get_addr): Likewise.
4427 (x86_linux_dr_set_control): Likewise.
4428 (x86_linux_dr_get_control): Likewise.
4429 (x86_linux_dr_get_status): Likewise.
4430 (x86_linux_update_debug_registers): Likewise.
4431
4432 2015-03-24 Gary Benson <gbenson@redhat.com>
4433
4434 * linux-x86-low.c (x86_linux_update_debug_registers):
4435 New function, factored out from...
4436 (x86_linux_prepare_to_resume): ...this.
4437
4438 2015-03-24 Gary Benson <gbenson@redhat.com>
4439
4440 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4441 (x86_linux_dr_set): Likewise.
4442 (update_debug_registers_callback): Likewise.
4443 (x86_linux_dr_set_addr): Likewise.
4444 (x86_linux_dr_get_addr): Likewise.
4445 (x86_linux_dr_set_control): Likewise.
4446 (x86_linux_dr_get_control): Likewise.
4447 (x86_linux_dr_get_status): Likewise.
4448 (x86_linux_prepare_to_resume): Likewise.
4449
4450 2015-03-24 Gary Benson <gbenson@redhat.com>
4451
4452 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4453 Use perror_with_name. Pass string through gettext.
4454 (x86_linux_dr_set): Likewise.
4455
4456 2015-03-24 Gary Benson <gbenson@redhat.com>
4457
4458 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4459 (x86_linux_dr_set_addr): ...this.
4460 (x86_dr_low_get_addr): Rename to...
4461 (x86_linux_dr_get_addr): ...this.
4462 (x86_dr_low_set_control): Rename to...
4463 (x86_linux_dr_set_control): ...this.
4464 (x86_dr_low_get_control): Rename to...
4465 (x86_linux_dr_get_control): ...this.
4466 (x86_dr_low_get_status): Rename to...
4467 (x86_linux_dr_get_status): ...this.
4468 (x86_dr_low): Update with new function names.
4469
4470 2015-03-24 Gary Benson <gbenson@redhat.com>
4471
4472 * Makefile.in (x86-linux.o): New rule.
4473 * configure.srv: Add x86-linux.o to relevant targets.
4474 * linux-low.c (lwp_set_arch_private_info): New function.
4475 (lwp_arch_private_info): Likewise.
4476 * linux-x86-low.c: Include nat/x86-linux.h.
4477 (arch_lwp_info): Removed structure.
4478 (update_debug_registers_callback):
4479 Use lwp_set_debug_registers_changed.
4480 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4481 and lwp_set_debug_registers_changed.
4482 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4483
4484 2015-03-24 Gary Benson <gbenson@redhat.com>
4485
4486 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4487 * linux-arm-low.c (arm_new_thread): Likewise.
4488 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4489 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4490 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4491 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4492
4493 2015-03-24 Gary Benson <gbenson@redhat.com>
4494
4495 * linux-low.c (ptid_of_lwp): New function.
4496 (lwp_is_stopped): Likewise.
4497 (lwp_stop_reason): Likewise.
4498 * linux-x86-low.c (update_debug_registers_callback):
4499 Use lwp_is_stopped.
4500 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4501 lwp_stop_reason.
4502
4503 2015-03-24 Gary Benson <gbenson@redhat.com>
4504
4505 * linux-low.h (linux_stop_lwp): Remove declaration.
4506
4507 2015-03-24 Gary Benson <gbenson@redhat.com>
4508
4509 * linux-low.h: Include nat/linux-nat.h.
4510 * linux-low.c (iterate_over_lwps_args): New structure.
4511 (iterate_over_lwps_filter): New function.
4512 (iterate_over_lwps): Likewise.
4513 * linux-x86-low.c (update_debug_registers_callback):
4514 Update signature to what iterate_over_lwps expects.
4515 Remove PID check that iterate_over_lwps now performs.
4516 (x86_dr_low_set_addr): Use iterate_over_lwps.
4517 (x86_dr_low_set_control): Likewise.
4518
4519 2015-03-24 Gary Benson <gbenson@redhat.com>
4520
4521 * linux-x86-low.c (x86_debug_reg_state): New function.
4522 (x86_linux_prepare_to_resume): Use the above.
4523
4524 2015-03-24 Gary Benson <gbenson@redhat.com>
4525
4526 * linux-low.c (current_lwp_ptid): New function.
4527 * linux-x86-low.c: Include nat/linux-nat.h.
4528 (x86_dr_low_get_addr): Use current_lwp_ptid.
4529 (x86_dr_low_get_control): Likewise.
4530 (x86_dr_low_get_status): Likewise.
4531
4532 2015-03-20 Pedro Alves <palves@redhat.com>
4533
4534 * tracepoint.c (cmd_qtstatus): Make "str" const.
4535
4536 2015-03-20 Pedro Alves <palves@redhat.com>
4537
4538 * server.c (handle_general_set): Make "req_str" const.
4539
4540 2015-03-19 Pedro Alves <palves@redhat.com>
4541
4542 * linux-low.c (linux_resume_one_lwp): Rename to ...
4543 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4544 instead call perror_with_name.
4545 (check_ptrace_stopped_lwp_gone): New function.
4546 (linux_resume_one_lwp): Reimplement as wrapper around
4547 linux_resume_one_lwp_throw that swallows errors if the LWP is
4548 gone.
4549
4550 2015-03-19 Pedro Alves <palves@redhat.com>
4551
4552 * linux-low.c (count_events_callback, select_event_lwp_callback):
4553 No longer check whether the thread has resume_stop as last resume
4554 kind.
4555
4556 2015-03-19 Pedro Alves <palves@redhat.com>
4557
4558 * linux-low.c (count_events_callback, select_event_lwp_callback):
4559 Use the lwp's status_pending_p field, not the thread's.
4560
4561 2015-03-19 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.c (select_event_lwp_callback): Update comments to
4564 no longer mention SIGTRAP.
4565
4566 2015-03-18 Gary Benson <gbenson@redhat.com>
4567
4568 * server.c (handle_query): Do not report vFile:fstat as supported.
4569
4570 2015-03-11 Gary Benson <gbenson@redhat.com>
4571
4572 * hostio.c (sys/types.h): New include.
4573 (sys/stat.h): Likewise.
4574 (common-remote-fileio.h): Likewise.
4575 (handle_fstat): New function.
4576 (handle_vFile): Handle vFile:fstat packets.
4577
4578 2015-03-11 Gary Benson <gbenson@redhat.com>
4579
4580 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4581 struct stat.st_blocks and struct stat.st_blksize.
4582 * configure: Regenerate.
4583 * config.in: Likewise.
4584 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4585 (OBS): Add common-remote-fileio.o.
4586 (common-remote-fileio.o): New rule.
4587
4588 2015-03-09 Pedro Alves <palves@redhat.com>
4589
4590 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4591 'struct sockaddr' pointer in 'accept' call.
4592
4593 2015-03-09 Pedro Alves <palves@redhat.com>
4594
4595 Revert:
4596 2015-03-07 Pedro Alves <palves@redhat.com>
4597 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4598 or <winsock2.h> here. Instead include "gdb_socket.h".
4599 (remote_open): Use union gdb_sockaddr_u.
4600 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4601 or <winsock2.h> here. Instead include "gdb_socket.h".
4602 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4603 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4604 or <sys/un.h>.
4605 (init_named_socket, gdb_agent_helper_thread): Use union
4606 gdb_sockaddr_u.
4607
4608 2015-03-07 Pedro Alves <palves@redhat.com>
4609
4610 * configure.ac (build_warnings): Move
4611 -Wdeclaration-after-statement to the C-specific set.
4612 * configure: Regenerate.
4613
4614 2015-03-07 Pedro Alves <palves@redhat.com>
4615
4616 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4617 or <winsock2.h> here. Instead include "gdb_socket.h".
4618 (remote_open): Use union gdb_sockaddr_u.
4619 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4620 or <winsock2.h> here. Instead include "gdb_socket.h".
4621 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4622 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4623 or <sys/un.h>.
4624 (init_named_socket, gdb_agent_helper_thread): Use union
4625 gdb_sockaddr_u.
4626
4627 2015-03-07 Pedro Alves <palves@redhat.com>
4628
4629 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4630 instead.
4631
4632 2015-03-06 Yao Qi <yao.qi@linaro.org>
4633
4634 * linux-aarch64-low.c (aarch64_insert_point): Use
4635 show_debug_regs as a boolean.
4636 (aarch64_remove_point): Likewise.
4637
4638 2015-03-05 Pedro Alves <palves@redhat.com>
4639
4640 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4641 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4642 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4643 * nto-low.c (nto_target_ops): Likewise.
4644 * spu-low.c (spu_target_ops): Likewise.
4645 * win32-low.c (win32_target_ops): Likewise.
4646
4647 2015-03-04 Pedro Alves <palves@redhat.com>
4648
4649 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4650 Decide whether a breakpoint triggered based on the SIGTRAP's
4651 siginfo.si_code.
4652 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4653 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4654 (linux_low_filter_event): Check for breakpoints before checking
4655 watchpoints.
4656 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4657 siginfo.si_code.
4658 (linux_stopped_by_sw_breakpoint)
4659 (linux_supports_stopped_by_sw_breakpoint)
4660 (linux_stopped_by_hw_breakpoint)
4661 (linux_supports_stopped_by_hw_breakpoint): New functions.
4662 (linux_target_ops): Install new target methods.
4663
4664 2015-03-04 Pedro Alves <palves@redhat.com>
4665
4666 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4667 * server.c (swbreak_feature, hwbreak_feature): New globals.
4668 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4669 (captured_main): Clear swbreak_feature and hwbreak_feature.
4670 * server.h (swbreak_feature, hwbreak_feature): Declare.
4671 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4672 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4673 supports_stopped_by_hw_breakpoint>: New fields.
4674 (target_supports_stopped_by_sw_breakpoint)
4675 (target_stopped_by_sw_breakpoint)
4676 (target_supports_stopped_by_hw_breakpoint)
4677 (target_stopped_by_hw_breakpoint): Declare.
4678
4679 2015-03-04 Pedro Alves <palves@redhat.com>
4680
4681 enum lwp_stop_reason -> enum target_stop_reason
4682 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4683 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4684 (linux_wait_1, stuck_in_jump_pad_callback)
4685 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4686 (linux_stopped_by_watchpoint):
4687 * linux-low.h (enum lwp_stop_reason): Delete.
4688 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4689 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4690
4691 2015-03-04 Yao Qi <yao.qi@linaro.org>
4692
4693 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4694
4695 2015-03-03 Gary Benson <gbenson@redhat.com>
4696
4697 * hostio.c (handle_vFile): Fix prefix lengths.
4698
4699 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4700
4701 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4702 ptr_bits.
4703
4704 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4705
4706 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4707 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4708 (clean): Add "rm -f" for above C files.
4709 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4710 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4711 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4712 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4713 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4714 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4715 (init_registers_s390x_vx_linux64)
4716 (init_registers_s390x_tevx_linux64)
4717 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4718 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4719 declarations.
4720 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4721 (s390_store_vxrs_high): New functions.
4722 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4723 NT_S390_VXRS_HIGH.
4724 (s390_arch_setup): Add logic for selecting one of the new target
4725 descriptions. Activate the new vector regsets if applicable.
4726 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4727 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4728 and init_registers_s390x_tevx_linux64.
4729
4730 2015-03-01 Pedro Alves <palves@redhat.com>
4731
4732 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4733 parameter.
4734
4735 2015-02-27 Pedro Alves <palves@redhat.com>
4736
4737 * linux-x86-low.c (u_debugreg_offset): New function.
4738 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4739
4740 2015-02-27 Pedro Alves <palves@redhat.com>
4741
4742 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4743 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4744 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4745 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4746 (ps_lsetfpregs, ps_getpid)
4747 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4748 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4749 (ps_lsetxregs, ps_plog): Declare.
4750
4751 2015-02-27 Pedro Alves <palves@redhat.com>
4752
4753 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4754 IP_AGENT_EXPORT_FUNC.
4755 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4756 IP_AGENT_EXPORT_FUNC.
4757 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4758 (IP_AGENT_EXPORT): Delete.
4759 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4760 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4761 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4762 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4763 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4764 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4765 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4766 (traceframe_read_count, traceframe_write_count)
4767 (traceframes_created, trace_state_variables, get_raw_reg)
4768 (get_trace_state_variable_value, set_trace_state_variable_value)
4769 (ust_loaded, helper_thread_id, cmd_buf): Use
4770 IPA_SYM_EXPORTED_NAME.
4771 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4772 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4773 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4774 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4775 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4776 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4777 EXTERN_C_PUSH/EXTERN_C_POP.
4778 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4779 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4780 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4781 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4782 (traceframe_write_count, traceframe_read_count)
4783 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4784 (about_to_request_buffer_space, get_trace_state_variable_value)
4785 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4786 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4787 EXTERN_C_PUSH/EXTERN_C_POP.
4788 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4789 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4790 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4791 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4792 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4793 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4794 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4795 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4796 Define.
4797 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4798 (IP_AGENT_EXPORT_VAR_DECL): Define.
4799 (tracing): Declare.
4800 (gdb_agent_get_raw_reg): Declare.
4801
4802 2015-02-27 Tom Tromey <tromey@redhat.com>
4803 Pedro Alves <palves@redhat.com>
4804
4805 Rename symbols whose names are reserved C++ keywords throughout.
4806
4807 2015-02-27 Pedro Alves <palves@redhat.com>
4808
4809 * Makefile.in (COMPILER): New, get it from autoconf.
4810 (CXX): Get from autoconf instead.
4811 (COMPILE.pre): Use COMPILER.
4812 (CC-LD): Rename to ...
4813 (CC_LD): ... this. Use COMPILER.
4814 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4815 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4816 * acinclude.m4: Include build-with-cxx.m4.
4817 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4818 Disable -Werror by default if building in C++ mode.
4819 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4820 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4821 the C++ compiler. Save/restore CXXFLAGS too.
4822 * configure: Regenerate.
4823
4824 2015-02-27 Pedro Alves <palves@redhat.com>
4825
4826 * acinclude.m4: Include libiberty.m4.
4827 * configure.ac: Call libiberty_INIT.
4828 * config.in, configure: Regenerate.
4829
4830 2015-02-26 Pedro Alves <palves@redhat.com>
4831
4832 * linux-low.c (linux_wait_1): When incrementing the PC past a
4833 program breakpoint always use the_low_target.breakpoint_len as
4834 increment, rather than the maximum between that and
4835 the_low_target.decr_pc_after_break.
4836
4837 2015-02-23 Pedro Alves <palves@redhat.com>
4838
4839 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4840 thread was doing a step-over; always adjust the PC if
4841 we stepped over a permanent breakpoint.
4842 (linux_wait_1): If we stepped over breakpoint that was on top of a
4843 permanent breakpoint, manually advance the PC past it.
4844
4845 2015-02-23 Pedro Alves <palves@redhat.com>
4846
4847 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4848 modes.
4849 (x86_fill_gregset, x86_store_gregset): Use it when handling
4850 $orig_eax.
4851
4852 2015-02-20 Pedro Alves <palves@redhat.com>
4853
4854 * thread-db.c: Include "nat/linux-procfs.h".
4855 (thread_db_init): Skip listing new threads if the kernel supports
4856 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4857
4858 2015-02-20 Pedro Alves <palves@redhat.com>
4859
4860 * linux-low.c (status_pending_p_callback): Use ptid_match.
4861
4862 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4863
4864 PR breakpoints/16812
4865 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4866 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4867 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4868
4869 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4870
4871 PR breakpoints/15956
4872 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4873
4874 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4875
4876 * linux-low.c (linux_low_btrace_conf): Print size.
4877 * server.c (handle_btrace_conf_general_set): New.
4878 (hanle_general_set): Call handle_btrace_conf_general_set.
4879 (handle_query): Report Qbtrace-conf:bts:size as supported.
4880
4881 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4882
4883 * linux-low.c (linux_low_enable_btrace): Update parameters.
4884 (linux_low_btrace_conf): New.
4885 (linux_target_ops)<to_btrace_conf>: Initialize.
4886 * server.c (current_btrace_conf): New.
4887 (handle_btrace_enable): Rename to ...
4888 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4889 to target_enable_btrace. Update comment. Update users.
4890 (handle_qxfer_btrace_conf): New.
4891 (qxfer_packets): Add btrace-conf entry.
4892 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4893 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4894 (target_ops)<read_btrace_conf>: New.
4895 (target_enable_btrace): Update parameters.
4896 (target_read_btrace_conf): New.
4897
4898 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4899
4900 * server.c (handle_btrace_general_set): Remove call to
4901 target_supports_btrace.
4902 (supported_btrace_packets): New.
4903 (handle_query): Call supported_btrace_packets.
4904 * target.h: include btrace-common.h.
4905 (btrace_target_info): Removed.
4906 (supports_btrace, target_supports_btrace): Update parameters.
4907
4908 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4909
4910 * Makefile.in (SFILES): Add common/btrace-common.c.
4911 (OBS): Add common/btrace-common.o.
4912 (btrace-common.o): Add build rules.
4913 * linux-low: Include btrace-common.h.
4914 (linux_low_read_btrace): Use struct btrace_data. Call
4915 btrace_data_init and btrace_data_fini.
4916
4917 2015-02-06 Pedro Alves <palves@redhat.com>
4918
4919 * thread-db.c (find_new_threads_callback): Add debug output.
4920
4921 2015-02-04 Pedro Alves <palves@redhat.com>
4922
4923 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4924 (resume_stopped_resumed_lwps): New function.
4925 (linux_wait_for_event_filtered): Use it.
4926
4927 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4928
4929 * Makefile.in (SFILES): Add linux-personality.c.
4930 (linux-personality.o): New rule.
4931 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4932 list of objects to be built.
4933 * linux-low.c: Include nat/linux-personality.h.
4934 (linux_create_inferior): Remove code to disable address space
4935 randomization (moved to ../nat/linux-personality.c). Create
4936 cleanup to disable address space randomization.
4937
4938 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4939
4940 * Makefile.in (posix-strerror.o): New rule.
4941 (mingw-strerror.o): Likewise.
4942 * configure: Regenerated.
4943 * configure.ac: Source file ../common/common.host. Initialize new
4944 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4945
4946 2015-01-14 Yao Qi <yao@codesourcery.com>
4947
4948 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4949 (ppc-linux.o): New rule.
4950 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4951 * configure.ac: AC_CHECK_FUNCS(getauxval).
4952 * config.in: Re-generated.
4953 * configure: Re-generated.
4954 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4955 ppc64_64bit_inferior_p
4956
4957 2015-01-14 Yao Qi <yao@codesourcery.com>
4958
4959 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4960 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4961 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4962 (PT_ORIG_R3, PT_TRAP): Likewise.
4963 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4964 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4965 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4966
4967 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4968
4969 * i387-fp.c (i387_cache_to_xsave): In look over
4970 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4971 zmmh_low_space field by use of zmmh_high_space.
4972
4973 2015-01-09 Pedro Alves <palves@redhat.com>
4974
4975 * linux-low.c (step_over_bkpt): Move higher up in the file.
4976 (handle_extended_wait): Don't store the stop_pc here.
4977 (get_stop_pc): Adjust comments and rename to ...
4978 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4979 stopped for a software breakpoint or hardware breakpoint.
4980 (thread_still_has_status_pending_p): New function.
4981 (status_pending_p_callback): Use
4982 thread_still_has_status_pending_p. If the event is no longer
4983 interesting, resume the LWP.
4984 (handle_tracepoints): Add assert.
4985 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4986 (wstatus_maybe_breakpoint): New function.
4987 (cancel_breakpoint): Delete function.
4988 (check_stopped_by_watchpoint): New function, factored out from
4989 linux_low_filter_event.
4990 (lp_status_maybe_breakpoint): Delete function.
4991 (linux_low_filter_event): Remove filter_ptid argument.
4992 Leave thread group exits pending here. Store the LWP's stop PC.
4993 Always leave events pending.
4994 (linux_wait_for_event_filtered): Pull all events out of the
4995 kernel, and leave them all pending.
4996 (count_events_callback, select_event_lwp_callback): Consider all
4997 events.
4998 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4999 (select_event_lwp): Only give preference to the stepping LWP in
5000 all-stop mode. Adjust comments.
5001 (ignore_event): New function.
5002 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5003 references to cancel_breakpoints. Adjust to renames. Also give
5004 equal priority to all LWPs that have had events in non-stop mode.
5005 If reporting a software breakpoint event, unadjust the LWP's PC.
5006 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5007 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5008 Adjust.
5009 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5010 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5011 (linux_stopped_by_watchpoint): Adjust.
5012 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5013 * linux-low.h (enum lwp_stop_reason): New.
5014 (struct lwp_info) <stop_pc>: Adjust comment.
5015 <stopped_by_watchpoint>: Delete field.
5016 <stop_reason>: New field.
5017 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5018 * mem-break.c (software_breakpoint_inserted_here)
5019 (hardware_breakpoint_inserted_here): New function.
5020 * mem-break.h (software_breakpoint_inserted_here)
5021 (hardware_breakpoint_inserted_here): Declare.
5022 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5023 (cancel_breakpoints): Delete.
5024 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5025 (upload_fast_traceframes): Remove references to
5026 cancel_breakpoints.
5027
5028 2015-01-09 Pedro Alves <palves@redhat.com>
5029
5030 * thread-db.c (find_new_threads_callback): Ignore thread if the
5031 kernel thread ID is -1.
5032
5033 2015-01-09 Pedro Alves <palves@redhat.com>
5034
5035 * linux-low.c (linux_attach_fail_reason_string): Move to
5036 nat/linux-ptrace.c, and rename.
5037 (linux_attach_lwp): Update comment.
5038 (attach_proc_task_lwp_callback): New function.
5039 (linux_attach): Adjust to rename and use
5040 linux_proc_attach_tgid_threads.
5041 (linux_attach_fail_reason_string): Delete declaration.
5042
5043 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5044
5045 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5046 * server.c (gdbserver_version): Likewise.
5047
5048 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5049
5050 * remote-utils.c: Include ctype.h.
5051 (input_interrupt): Explicitly handle the case when the char
5052 received is the NUL byte. Improve the printing of non-ASCII
5053 characters.
5054
5055 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5056
5057 * linux-low.c (linux_low_filter_event): Update call to
5058 linux_enable_event_reporting following the addition of
5059 a new parameter to that function.
5060
5061 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5062
5063 PR server/17457
5064 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5065 (AARCH64_FPCR_REGNO): Likewise.
5066 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5067 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5068 (aarch64_store_fpregset): Likewise.
5069
5070 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5071
5072 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5073 Remove FIXME comment about assumption about N.
5074
5075 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5076
5077 * configure.ac: If large-file support is disabled in GDBserver,
5078 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5079 * configure: Regenerate.
5080
5081 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5082
5083 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5084 warning upon ENODATA from ptrace.
5085 * linux-s390-low.c (s390_store_tdb): New.
5086 (s390_regsets): Add regset for NT_S390_TDB.
5087
5088 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5089
5090 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5091 without a fill_function.
5092 * linux-s390-low.c (s390_fill_last_break): Remove.
5093 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5094 (s390_arch_setup): Use regset's size instead of fill_function for
5095 loop end condition.
5096
5097 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5098
5099 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5100 the regset's store function when ptrace returned an error.
5101 * regcache.c (get_thread_regcache): Invalidate register cache
5102 before fetching inferior's registers.
5103
5104 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5105
5106 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5107 while-loop as for-loop.
5108 (regsets_store_inferior_registers): Likewise.
5109
5110 2014-11-28 Yao Qi <yao@codesourcery.com>
5111
5112 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5113 * config.in, configure: Re-generate.
5114 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5115 is defined.
5116
5117 2014-11-21 Yao Qi <yao@codesourcery.com>
5118
5119 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5120 (AC_CHECK_HEADERS): Remove malloc.h.
5121 * configure: Re-generated.
5122 * config.in: Re-generated.
5123 * server.h: Don't include alloca.h and malloc.h.
5124 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5125 Don't include malloc.h.
5126
5127 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5128
5129 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5130 corresponding ERRNO check in same block.
5131
5132 2014-11-12 Pedro Alves <palves@redhat.com>
5133
5134 * server.c (cont_thread): Update comment.
5135 (start_inferior, attach_inferior): No longer clear cont_thread.
5136 (handle_v_cont): No longer set cont_thread.
5137 (captured_main): Clear cont_thread each time a GDB connects.
5138
5139 2014-11-12 Pedro Alves <palves@redhat.com>
5140
5141 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5142 thread, and don't resume all threads if the Hc thread has exited.
5143
5144 2014-11-12 Pedro Alves <palves@redhat.com>
5145
5146 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5147 the process group instead of to a specific LWP.
5148
5149 2014-10-15 Pedro Alves <palves@redhat.com>
5150
5151 PR server/17487
5152 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5153 parameter.
5154 (arm_set_thread_context): Delete.
5155 (the_low_target): Adjust.
5156 * win32-i386-low.c (debug_registers_changed)
5157 (debug_registers_used): Delete.
5158 (update_debug_registers_callback): New function.
5159 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5160 needing to update their debug registers.
5161 (win32_get_current_dr): New function.
5162 (x86_dr_low_get_addr, x86_dr_low_get_control)
5163 (x86_dr_low_get_status): Fetch the debug register from the thread
5164 record's context.
5165 (i386_initial_stuff): Adjust.
5166 (i386_get_thread_context): Remove current_event parameter. Don't
5167 clear debug_registers_changed nor copy DR values to
5168 debug_reg_state.
5169 (i386_set_thread_context): Delete.
5170 (i386_prepare_to_resume): New function.
5171 (i386_thread_added): Mark the thread as needing to update irs
5172 debug registers.
5173 (the_low_target): Remove i386_set_thread_context and install
5174 i386_prepare_to_resume.
5175 * win32-low.c (win32_get_thread_context): Adjust.
5176 (win32_set_thread_context): Use SetThreadContext
5177 directly.
5178 (win32_prepare_to_resume): New function.
5179 (win32_require_context): New function, factored out from ...
5180 (thread_rec): ... this.
5181 (continue_one_thread): Call win32_prepare_to_resume on each thread
5182 we're about to continue.
5183 (win32_resume): Call win32_prepare_to_resume on the event thread.
5184 * win32-low.h (struct win32_thread_info)
5185 <debug_registers_changed>: New field.
5186 (struct win32_target_ops): Change prototype of set_thread_context,
5187 delete set_thread_context and add prepare_to_resume.
5188 (win32_require_context): New declaration.
5189
5190 2014-10-08 Gary Benson <gbenson@redhat.com>
5191
5192 * server.h: Do not include common-exceptions.h.
5193
5194 2014-10-08 Gary Benson <gbenson@redhat.com>
5195
5196 * server.h: Do not include cleanups.h.
5197
5198 2014-09-30 James Hogan <james.hogan@imgtec.com>
5199
5200 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5201 mips64-dsp-linux.c.
5202
5203 2014-09-23 Yao Qi <yao@codesourcery.com>
5204
5205 * linux-low.c (lp_status_maybe_breakpoint): New function.
5206 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5207 (count_events_callback): Likewise.
5208 (select_event_lwp_callback): Likewise.
5209 (cancel_breakpoints_callback): Likewise.
5210
5211 2014-09-19 Don Breazeal <donb@codesourcery.com>
5212
5213 * linux-low.c (handle_extended_wait): Call
5214 linux_ptrace_get_extended_event.
5215 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5216 linux_is_extended_waitstatus.
5217
5218 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5219
5220 * Makefile.in (CPPFLAGS): Define.
5221 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5222 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5223
5224 2014-09-16 Gary Benson <gbenson@redhat.com>
5225
5226 * inferiors.h (current_inferior): Renamed as...
5227 (current_thread): New variable. All uses updated.
5228 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5229 (maybe_move_out_of_jump_pad): Likewise.
5230 (cancel_breakpoint): Likewise.
5231 (linux_low_filter_event): Likewise.
5232 (wait_for_sigstop): Likewise.
5233 (linux_resume_one_lwp): Likewise.
5234 (need_step_over_p): Likewise.
5235 (start_step_over): Likewise.
5236 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5237 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5238 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5239 and save_inferior as saved_thread.
5240 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5241 saved_thread.
5242 (regcache_invalidate_thread): Likewise.
5243 * remote-utils.c (prepare_resume_reply): Likewise.
5244 * thread-db.c (thread_db_get_tls_address): Likewise.
5245 (disable_thread_event_reporting): Likewise.
5246 (remove_thread_event_breakpoints): Likewise.
5247 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5248 as saved_thread.
5249 * target.h (set_desired_inferior): Renamed as...
5250 (set_desired_thread): New declaration. All uses updated.
5251 * server.c (myresume): Updated comment to reference thread instead
5252 of inferior.
5253 (handle_serial_event): Likewise.
5254 (handle_target_event): Likewise.
5255
5256 2014-09-12 Tom Tromey <tromey@redhat.com>
5257 Gary Benson <gbenson@redhat.com>
5258
5259 * regcache.h: Include common-regcache.h.
5260 (regcache_read_pc): Don't declare.
5261 * regcache.c (get_thread_regcache_for_ptid): New function.
5262
5263 2014-09-11 Tom Tromey <tromey@redhat.com>
5264 Gary Benson <gbenson@redhat.com>
5265
5266 * symbol.c: New file.
5267 * Makefile.in (SFILES): Add symbol.c.
5268 (OBS): Add symbol.o.
5269
5270 2014-09-11 Gary Benson <gbenson@redhat.com>
5271
5272 * target.c (target_stop_ptid, target_continue_ptid): New
5273 functions.
5274
5275 2014-09-11 Tom Tromey <tromey@redhat.com>
5276 Gary Benson <gbenson@redhat.com>
5277
5278 * target.h: Include target/target.h.
5279 * target.c (target_read_memory, target_read_uint32)
5280 (target_write_memory): New functions.
5281
5282 2014-09-11 Gary Benson <gbenson@redhat.com>
5283
5284 * server.h (debug_hw_points): Don't declare.
5285 * server.c (debug_hw_points): Don't define. Replace all uses
5286 with show_debug_regs.
5287 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5288 all uses with show_debug_regs.
5289
5290 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5291
5292 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5293 endianness into account.
5294 (ppc_supply_ptrace_register): Likewise.
5295
5296 2014-09-03 James Hogan <james.hogan@imgtec.com>
5297
5298 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5299 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5300
5301 2014-09-03 Gary Benson <gbenson@redhat.com>
5302
5303 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5304 ALL_DEBUG_ADDRESS_REGISTERS.
5305
5306 2014-09-02 Gary Benson <gbenson@redhat.com>
5307
5308 * i386-low.h: Renamed as...
5309 * x86-low.h: New file. All type, function and variable name
5310 prefixes changed from "i386_" to "x86_". All references updated.
5311 * i386-low.c: Renamed as...
5312 * x86-low.c: New file. All type, function and variable name
5313 prefixes changed from "i386_" to "x86_". All references updated.
5314
5315 2014-09-02 Gary Benson <gbenson@redhat.com>
5316
5317 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5318 (x86_linux_new_thread): Likewise.
5319
5320 2014-08-29 Gary Benson <gbenson@redhat.com>
5321
5322 * server.h (setjmp.h): Do not include.
5323 (toplevel): Do not declare.
5324 (common-exceptions.h): Include.
5325 (cleanups.h): Likewise.
5326 * server.c (toplevel): Do not define.
5327 (exit_code): New static global.
5328 (detach_or_kill_for_exit_cleanup): New function.
5329 (main): New function. Original main renamed to...
5330 (captured_main): New function.
5331 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5332
5333 2014-08-29 Gary Benson <gbenson@redhat.com>
5334
5335 * Makefile.in (SFILES): Add common/common-exceptions.c.
5336 (OBS): Add common-exceptions.o.
5337 (common-exceptions.o): New rule.
5338 * utils.c (prepare_to_throw_exception): New function.
5339
5340 2014-08-29 Gary Benson <gbenson@redhat.com>
5341
5342 * config.in: Regenerate.
5343 * configure: Likewise.
5344
5345 2014-08-29 Gary Benson <gbenson@redhat.com>
5346
5347 * Makefile.in (SFILES): Add common/cleanups.c.
5348 (OBS): cleanups.o.
5349 (cleanups.o): New rule.
5350
5351 2014-08-29 Gary Benson <gbenson@redhat.com>
5352
5353 * utils.c (internal_vwarning): New function.
5354
5355 2014-08-28 Gary Benson <gbenson@redhat.com>
5356
5357 * utils.h (fatal): Remove declaration.
5358 * utils.c (fatal): Remove function.
5359
5360 2014-08-28 Gary Benson <gbenson@redhat.com>
5361
5362 * tracepoint.c (gdb_agent_init): Replace fatal with
5363 perror_with_name.
5364 (initialize_tracepoint): Likewise.
5365
5366 2014-08-28 Gary Benson <gbenson@redhat.com>
5367
5368 * remote-utils.c (remote_prepare): Replace fatal with error.
5369
5370 2014-08-28 Gary Benson <gbenson@redhat.com>
5371
5372 * linux-low.c (linux_async): Replace fatal with warning.
5373 Tidy up and return.
5374 (linux_start_non_stop): Return -1 if linux_async failed.
5375
5376 2014-08-28 Gary Benson <gbenson@redhat.com>
5377
5378 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5379 gdb_assert.
5380 (i386_dr_low_get_addr): Remove vague comment.
5381 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5382 gdb_assert.
5383
5384 2014-08-28 Gary Benson <gbenson@redhat.com>
5385
5386 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5387 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5388 internal_error.
5389 (linux_resume_one_lwp): Likewise.
5390 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5391 gdb_assert.
5392 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5393 with internal_error.
5394 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5395 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5396 (find_register_by_name): Replace fatal with internal_error.
5397 (find_regno): Likewise.
5398 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5399 * thread-db.c (thread_db_create_event): Likewise.
5400 (thread_db_load_search): Likewise.
5401 (try_thread_db_load_1): Likewise.
5402 * tracepoint.c (get_jump_space_head): Replace fatal with
5403 internal_error.
5404 (claim_trampoline_space): Likewise.
5405 (have_fast_tracepoint_trampoline_buffer): Likewise.
5406 (cmd_qtstart): Likewise.
5407 (stop_tracing): Likewise.
5408 (fast_tracepoint_collecting): Likewise.
5409 (target_malloc): Likewise.
5410 (download_tracepoint): Likewise.
5411 (download_trace_state_variables): Replace check with gdb_assert.
5412 (upload_fast_traceframes): Replace fatal with internal_error.
5413
5414 2014-08-19 Tom Tromey <tromey@redhat.com>
5415 Gary Benson <gbenson@redhat.com>
5416
5417 * Makefile.in (SFILES): Add common/common-debug.c.
5418 (OBS): Add common-debug.o.
5419 (common-debug.o): New rule.
5420 * debug.h (debug_printf): Don't declare.
5421 * debug.c (debug_printf): Renamed and rewritten as...
5422 (debug_vprintf): New function.
5423
5424 2014-08-19 Gary Benson <gbenson@redhat.com>
5425
5426 * utils.h: Do not include print-utils.h.
5427
5428 2014-08-19 Tom Tromey <tromey@redhat.com>
5429 Gary Benson <gbenson@redhat.com>
5430
5431 * server.h: Add static assertion.
5432 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5433
5434 2014-08-19 Tom Tromey <tromey@redhat.com>
5435 Gary Benson <gbenson@redhat.com>
5436
5437 * Makefile.in (SFILES): Add common/errors.c.
5438 (OBS): Add errors.o.
5439 (IPA_OBS): Add errors-ipa.o.
5440 (errors.o): New rule.
5441 (errors-ipa.o): Likewise.
5442 * utils.h (perror_with_name, error, warning): Don't declare.
5443 * utils.c (warning): Renamed and rewritten as...
5444 (vwarning): New function.
5445 (error): Renamed and rewritten as...
5446 (verror): New function.
5447 (internal_error): Renamed and rewritten as...
5448 (internal_verror): New function.
5449
5450 2014-08-07 Gary Benson <gbenson@redhat.com>
5451
5452 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5453 * configure: Regenerate.
5454 * config.in: Likewise.
5455 * server.h: Do not include errno.h.
5456 * event-loop.c: Likewise.
5457 * hostio-errno.c: Likewise.
5458 * linux-low.c: Likewise.
5459 * remote-utils.c: Likewise.
5460 * spu-low.c: Likewise.
5461 * utils.c: Likewise.
5462 * gdbreplay.c: Unconditionally include errno.h.
5463
5464 2014-08-07 Gary Benson <gbenson@redhat.com>
5465
5466 * server.h: Do not include string.h.
5467 * event-loop.c: Likewise.
5468 * linux-low.c: Likewise.
5469 * regcache.c: Likewise.
5470 * remote-utils.c: Likewise.
5471 * spu-low.c: Likewise.
5472 * utils.c: Likewise.
5473
5474 2014-08-07 Gary Benson <gbenson@redhat.com>
5475
5476 * server.h: Do not include gdb_assert.h.
5477
5478 2014-08-07 Gary Benson <gbenson@redhat.com>
5479
5480 * server.h: Do not include common-utils.h.
5481
5482 2014-08-07 Gary Benson <gbenson@redhat.com>
5483
5484 * server.h: Do not include ptid.h.
5485 * notif.h: Likewise.
5486
5487 2014-08-07 Gary Benson <gbenson@redhat.com>
5488
5489 * server.h: Do not include gdb_locale.h.
5490
5491 2014-08-07 Gary Benson <gbenson@redhat.com>
5492
5493 * server.h: Do not include gdb/signals.h.
5494 * win32-low.c: Likewise.
5495
5496 2014-08-07 Gary Benson <gbenson@redhat.com>
5497
5498 * server.h: Do not include pathmax.h.
5499
5500 2014-08-07 Gary Benson <gbenson@redhat.com>
5501
5502 * server.h: Do not include libiberty.h.
5503 * linux-bfin-low.c: Likewise.
5504
5505 2014-08-07 Gary Benson <gbenson@redhat.com>
5506
5507 * server.h: Do not include ansidecl.h.
5508
5509 2014-08-07 Gary Benson <gbenson@redhat.com>
5510
5511 * linux-x86-low.c: Do not include stddef.h.
5512 * lynx-ppc-low.c: Likewise.
5513 * tracepoint.c: Likewise.
5514
5515 2014-08-07 Gary Benson <gbenson@redhat.com>
5516
5517 * server.h: Do not include stdarg.h.
5518 * nto-low.c: Likewise.
5519
5520 2014-08-07 Gary Benson <gbenson@redhat.com>
5521
5522 * server.h: Do not include stdlib.h.
5523 * inferiors.c: Likewise.
5524 * linux-low.c: Likewise.
5525 * regcache.c: Likewise.
5526 * spu-low.c: Likewise.
5527 * tracepoint.c: Likewise.
5528 * utils.c: Likewise.
5529
5530 2014-08-07 Gary Benson <gbenson@redhat.com>
5531
5532 * server.h: Do not include stdio.h.
5533 * linux-low.c: Likewise.
5534 * remote-utils.c: Likewise.
5535 * spu-low.c: Likewise.
5536 * utils.c: Likewise.
5537 * wincecompat.c: Likewise.
5538
5539 2014-08-06 Gary Benson <gbenson@redhat.com>
5540
5541 * regcache.c (init_register_cache): Move conditionals inside if.
5542
5543 2014-08-06 Gary Benson <gbenson@redhat.com>
5544
5545 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5546
5547 2014-07-31 Gary Benson <gbenson@redhat.com>
5548
5549 * ax.h: Do not include server.h.
5550 * gdbthread.h: Likewise.
5551 * lynx-low.h: Likewise.
5552 * notif.h: Likewise.
5553
5554 2014-07-30 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Include common-defs.h.
5557 Do not include config.h or build-gnulib-gdbserver/config.h.
5558
5559 2014-07-30 Gary Benson <gbenson@redhat.com>
5560
5561 * hostio-errno.c: Move server.h to top of includes list.
5562 * inferiors.c: Likewise.
5563 * linux-x86-low.c: Likewise.
5564 * notif.c: Include server.h.
5565
5566 2014-07-24 Tom Tromey <tromey@redhat.com>
5567 Gary Benson <gbenson@redhat.com>
5568
5569 * server.h (CORE_ADDR): Now unsigned.
5570
5571 2014-07-16 Pedro Alves <palves@redhat.com>
5572
5573 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5574
5575 2014-07-15 Pedro Alves <palves@redhat.com>
5576
5577 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5578 copy.
5579
5580 2014-07-11 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (kill_wait_lwp): New function, based on
5583 kill_one_lwp_callback, but use my_waitpid directly.
5584 (kill_one_lwp_callback, linux_kill): Use it.
5585
5586 2014-06-23 Pedro Alves <palves@redhat.com>
5587
5588 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5589 before setting DR0..DR3.
5590
5591 2014-06-20 Gary Benson <gbenson@redhat.com>
5592
5593 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5594 * configure: Regenerated.
5595 * config.in: Likewise.
5596
5597 2014-06-20 Gary Benson <gbenson@redhat.com>
5598
5599 * Makefile.in (SFILES): Update locations for files moved
5600 from common to nat.
5601 (object file files): Reordered.
5602
5603 2014-06-20 Gary Benson <gbenson@redhat.com>
5604
5605 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5606 (i386_dr_low_set_addr): Likewise.
5607 (i386_dr_low_get_addr): Likewise.
5608 (i386_dr_low_can_set_control): Likewise.
5609 (i386_dr_low_set_control): Likewise.
5610 (i386_dr_low_get_control): Likewise.
5611 (i386_dr_low_get_status): Likewise.
5612 (i386_get_debug_register_length): Likewise.
5613 * linux-x86-low.c (i386_dr_low_set_addr):
5614 Changed signature. Made static.
5615 (i386_dr_low_get_addr): Likewise.
5616 (i386_dr_low_set_control): Likewise.
5617 (i386_dr_low_get_control): Likewise.
5618 (i386_dr_low_get_status): Likewise.
5619 (i386_dr_low): New global variable.
5620 * win32-i386-low.c (i386_dr_low_set_addr):
5621 Changed signature. Made static.
5622 (i386_dr_low_get_addr): Likewise.
5623 (i386_dr_low_set_control): Likewise.
5624 (i386_dr_low_get_control): Likewise.
5625 (i386_dr_low_get_status): Likewise.
5626 (i386_dr_low): New global variable.
5627
5628 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5629
5630 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5631 * Makefile.in (AR, AR_FLAGS): Define.
5632 * configure: Regenerate.
5633
5634 2014-06-19 Gary Benson <gbenson@redhat.com>
5635
5636 * Makefile.in (i386-dregs.o): New rule.
5637 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5638 * i386-low.c (target.h): Remove include.
5639 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5640 (DR_CONTROL_SHIFT): Likewise.
5641 (DR_CONTROL_SIZE): Likewise.
5642 (DR_RW_EXECUTE): Likewise.
5643 (DR_RW_WRITE): Likewise.
5644 (DR_RW_READ): Likewise.
5645 (DR_RW_IORW): Likewise.
5646 (DR_LEN_1): Likewise.
5647 (DR_LEN_2): Likewise.
5648 (DR_LEN_4): Likewise.
5649 (DR_LEN_8): Likewise.
5650 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5651 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5652 (DR_ENABLE_SIZE): Likewise.
5653 (DR_LOCAL_SLOWDOWN): Likewise.
5654 (DR_GLOBAL_SLOWDOWN): Likewise.
5655 (DR_CONTROL_RESERVED): Likewise.
5656 (I386_DR_CONTROL_MASK): Likewise.
5657 (I386_DR_VACANT): Likewise.
5658 (I386_DR_LOCAL_ENABLE): Likewise.
5659 (I386_DR_GLOBAL_ENABLE): Likewise.
5660 (I386_DR_DISABLE): Likewise.
5661 (I386_DR_SET_RW_LEN): Likewise.
5662 (I386_DR_GET_RW_LEN): Likewise.
5663 (I386_DR_WATCH_HIT): Likewise.
5664 (i386_wp_op_t): Likewise.
5665 (i386_show_dr): Likewise.
5666 (i386_length_and_rw_bits): Likewise.
5667 (i386_insert_aligned_watchpoint): Likewise.
5668 (i386_remove_aligned_watchpoint): Likewise.
5669 (i386_handle_nonaligned_watchpoint): Likewise.
5670 i386_update_inferior_debug_regs(): Likewise.
5671 (i386_dr_insert_watchpoint): Likewise.
5672 (i386_dr_remove_watchpoint): Likewise.
5673 (i386_dr_region_ok_for_watchpoint): Likewise.
5674 (i386_dr_stopped_data_address): Likewise.
5675 (i386_dr_stopped_by_watchpoint): Likewise.
5676
5677 2014-06-19 Gary Benson <gbenson@redhat.com>
5678
5679 * i386-low.c (i386_dr_show): Renamed to
5680 i386_show_dr and made static. All uses updated.
5681 (i386_dr_length_and_rw_bits): Renamed to
5682 i386_length_and_rw_bits and made static.
5683 All uses updated.
5684 (i386_dr_insert_aligned_watchpoint): Renamed to
5685 i386_insert_aligned_watchpoint and made static.
5686 All uses updated.
5687 (i386_dr_remove_aligned_watchpoint): Renamed to
5688 i386_remove_aligned_watchpoint and made static.
5689 All uses updated.
5690 (i386_dr_update_inferior_debug_regs): Renamed to
5691 i386_update_inferior_debug_regs and made static.
5692 All uses updated.
5693
5694 2014-06-18 Gary Benson <gbenson@redhat.com>
5695
5696 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5697 (i386_dr_low_can_set_control): Likewise.
5698 (i386_get_debug_register_length): Likewise.
5699 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5700 (i386_dr_low_can_set_control): Likewise.
5701 (i386_get_debug_register_length): Likewise.
5702
5703 2014-06-17 Gary Benson <gbenson@redhat.com>
5704
5705 * i386-low.h (i386-dregs.h): New include.
5706 (DR_FIRSTADDR): Now in i386-dregs.h.
5707 (DR_LASTADDR): Likewise.
5708 (DR_NADDR): Likewise.
5709 (DR_STATUS): Likewise.
5710 (DR_CONTROL): Likewise.
5711 (i386_debug_reg_state): Likewise.
5712 (i386_dr_insert_watchpoint): Likewise.
5713 (i386_dr_remove_watchpoint): Likewise.
5714 (i386_dr_region_ok_for_watchpoint): Likewise.
5715 (i386_dr_stopped_data_address): Likewise.
5716 (i386_dr_stopped_by_watchpoint): Likewise.
5717 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5718
5719 2014-06-18 Gary Benson <gbenson@redhat.com>
5720
5721 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5722 i386_dr_insert_watchpoint.
5723 (i386_low_remove_watchpoint): Renamed to
5724 i386_dr_remove_watchpoint.
5725 (i386_low_region_ok_for_watchpoint): Renamed to
5726 i386_dr_region_ok_for_watchpoint.
5727 (i386_low_stopped_data_address): Renamed to
5728 i386_dr_stopped_data_address.
5729 (i386_low_stopped_by_watchpoint): Renamed to
5730 i386_dr_stopped_by_watchpoint.
5731 * i386-low.c (i386_show_dr): Renamed to
5732 i386_dr_show and made nonstatic. All uses updated.
5733 (i386_length_and_rw_bits): Renamed to
5734 i386_dr_length_and_rw_bits and made nonstatic.
5735 All uses updated.
5736 (i386_insert_aligned_watchpoint): Renamed to
5737 i386_dr_insert_aligned_watchpoint and made nonstatic.
5738 All uses updated.
5739 (i386_remove_aligned_watchpoint): Renamed to
5740 i386_dr_remove_aligned_watchpoint and made nonstatic.
5741 All uses updated.
5742 (i386_update_inferior_debug_regs): Renamed to
5743 i386_dr_update_inferior_debug_regs and made nonstatic.
5744 All uses updated.
5745 (i386_low_insert_watchpoint): Renamed to
5746 i386_dr_insert_watchpoint. All uses updated.
5747 (i386_low_remove_watchpoint): Renamed to
5748 i386_dr_remove_watchpoint. All uses updated.
5749 (i386_low_region_ok_for_watchpoint): Renamed to
5750 i386_dr_region_ok_for_watchpoint. All uses updated.
5751 (i386_low_stopped_data_address): Renamed to
5752 i386_dr_stopped_data_address. All uses updated.
5753 (i386_low_stopped_by_watchpoint): Renamed to
5754 i386_dr_stopped_by_watchpoint. All uses updated.
5755
5756 2014-06-18 Gary Benson <gbenson@redhat.com>
5757
5758 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5759 (i386_dr_low_can_set_control): Likewise.
5760 (i386_insert_aligned_watchpoint): New check.
5761
5762 2014-06-18 Gary Benson <gbenson@redhat.com>
5763
5764 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5765 Renamed to state.
5766
5767 2014-06-18 Gary Benson <gbenson@redhat.com>
5768
5769 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5770 instead of fatal and error.
5771 (i386_handle_nonaligned_watchpoint): Likewise.
5772
5773 2014-06-18 Gary Benson <gbenson@redhat.com>
5774
5775 * i386-low.c (i386_get_debug_register_length): New macro.
5776 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5777 (i386_show_dr): Use debug_printf instead of fprintf. Use
5778 phex to format values.
5779
5780 2014-06-18 Gary Benson <gbenson@redhat.com>
5781
5782 * i386-low.h: Comment changes.
5783 * i386-low.c: Likewise.
5784
5785 2014-06-18 Gary Benson <gbenson@redhat.com>
5786
5787 * i386-low.c: Whitespace changes.
5788
5789 2014-06-12 Tom Tromey <tromey@redhat.com>
5790
5791 * utils.c (freeargv): Remove.
5792
5793 2014-06-12 Tom Tromey <tromey@redhat.com>
5794
5795 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5796 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5797 (parse_debug_format_options): Likewise.
5798 (gdbserver_usage): Likewise.
5799 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5800 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5801 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5802 against libiberty.
5803 ($(LIBGNU)): Depend on libiberty.
5804 (all-lib): Recurse into all subdirs.
5805 (install-only): Invoke "install" target in subdirs.
5806 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5807 targets.
5808 * configure: Rebuild.
5809 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5810 for vasprintf, vsnprintf, or gettimeofday.
5811 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5812 srv_tgtobj.
5813
5814 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5815
5816 * development.sh: Delete.
5817 * Makefile.in (config.status): Adjust dependency on development.sh.
5818 * configure.ac: Adjust development.sh source call.
5819 * configure: Regenerate.
5820
5821 2014-06-02 Pedro Alves <palves@redhat.com>
5822
5823 * ax.c (gdb_free_agent_expr): New function.
5824 * ax.h (gdb_free_agent_expr): New declaration.
5825 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5826 list.
5827 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5828 static.
5829 (clear_breakpoint_conditions_and_commands): New function.
5830 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5831 (clear_breakpoint_conditions_and_commands): New declaration.
5832
5833 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5834
5835 * linux-aarch64-low.c (asm/ptrace.h): Include.
5836
5837 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5838
5839 Fix TLS access for -static -pthread.
5840 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5841 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5842 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5843
5844 2014-05-20 Pedro Alves <palves@redhat.com>
5845
5846 * linux-aarch64-low.c (aarch64_insert_point)
5847 (aarch64_remove_point): No longer check whether the type is
5848 supported here. Adjust to new interface.
5849 (the_low_target): Install aarch64_supports_z_point_type as
5850 supports_z_point_type method.
5851 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5852 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5853 instead of a Z packet char. Adjust.
5854 (arm_supports_z_point_type): New function.
5855 (arm_insert_point, arm_remove_point): Adjust to new interface.
5856 (the_low_target): Install arm_supports_z_point_type.
5857 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5858 (cris_insert_point, cris_remove_point): Adjust to new interface.
5859 Don't check whether the type is supported here.
5860 (the_low_target): Install cris_supports_z_point_type.
5861 * linux-low.c (linux_supports_z_point_type): New function.
5862 (linux_insert_point, linux_remove_point): Adjust to new interface.
5863 * linux-low.h (struct linux_target_ops) <insert_point,
5864 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5865 raw_breakpoint pointer parameter.
5866 <supports_z_point_type>: New method.
5867 * linux-mips-low.c (mips_supports_z_point_type): New function.
5868 (mips_insert_point, mips_remove_point): Adjust to new interface.
5869 Use mips_supports_z_point_type.
5870 (the_low_target): Install mips_supports_z_point_type.
5871 * linux-ppc-low.c (the_low_target): Install NULL as
5872 supports_z_point_type method.
5873 * linux-s390-low.c (the_low_target): Install NULL as
5874 supports_z_point_type method.
5875 * linux-sparc-low.c (the_low_target): Install NULL as
5876 supports_z_point_type method.
5877 * linux-x86-low.c (x86_supports_z_point_type): New function.
5878 (x86_insert_point): Adjust to new insert_point interface. Use
5879 insert_memory_breakpoint. Adjust to new
5880 i386_low_insert_watchpoint interface.
5881 (x86_remove_point): Adjust to remove_point interface. Use
5882 remove_memory_breakpoint. Adjust to new
5883 i386_low_remove_watchpoint interface.
5884 (the_low_target): Install x86_supports_z_point_type.
5885 * lynx-low.c (lynx_target_ops): Install NULL as
5886 supports_z_point_type callback.
5887 * nto-low.c (nto_supports_z_point_type): New.
5888 (nto_insert_point, nto_remove_point): Adjust to new interface.
5889 (nto_target_ops): Install nto_supports_z_point_type.
5890 * mem-break.c: Adjust intro comment.
5891 (struct raw_breakpoint) <raw_type, size>: New fields.
5892 <inserted>: Update comment.
5893 <shlib_disabled>: Delete field.
5894 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5895 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5896 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5897 (raw_bkpt_type_to_target_hw_bp_type): New function.
5898 (find_enabled_raw_code_breakpoint_at): New function.
5899 (find_raw_breakpoint_at): New type and size parameters. Use them.
5900 (insert_memory_breakpoint): New function, based off
5901 set_raw_breakpoint_at.
5902 (remove_memory_breakpoint): New function.
5903 (set_raw_breakpoint_at): Reimplement.
5904 (set_breakpoint): New, based on set_breakpoint_at.
5905 (set_breakpoint_at): Reimplement.
5906 (delete_raw_breakpoint): Go through the_target->remove_point
5907 instead of assuming memory breakpoints.
5908 (find_gdb_breakpoint_at): Delete.
5909 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5910 (find_gdb_breakpoint): New function.
5911 (set_gdb_breakpoint_at): Delete.
5912 (z_type_supported): New function.
5913 (set_gdb_breakpoint_1): New function, loosely based off
5914 set_gdb_breakpoint_at.
5915 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5916 (delete_gdb_breakpoint_at): Delete.
5917 (delete_gdb_breakpoint_1): New function, loosely based off
5918 delete_gdb_breakpoint_at.
5919 (delete_gdb_breakpoint): New function.
5920 (clear_gdb_breakpoint_conditions): Rename to ...
5921 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5922 breakpoint.
5923 (add_condition_to_breakpoint): Make static.
5924 (add_breakpoint_condition): Take a struct breakpoint pointer
5925 instead of an address. Adjust.
5926 (gdb_condition_true_at_breakpoint): Rename to ...
5927 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5928 z_type parameter.
5929 (gdb_condition_true_at_breakpoint): Reimplement.
5930 (add_breakpoint_commands): Take a struct breakpoint pointer
5931 instead of an address. Adjust.
5932 (gdb_no_commands_at_breakpoint): Rename to ...
5933 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5934 parameter. Return true if no breakpoint was found. Change debug
5935 output.
5936 (gdb_no_commands_at_breakpoint): Reimplement.
5937 (run_breakpoint_commands): Rename to ...
5938 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5939 and change return type to boolean.
5940 (run_breakpoint_commands): New function.
5941 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5942 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5943 breakpoint. Go through the_target->remove_point instead of
5944 assuming memory breakpoint.
5945 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5946 software and hardware breakpoints.
5947 (reinsert_raw_breakpoint): Go through the_target->insert_point
5948 instead of assuming memory breakpoint.
5949 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5950 software and hardware breakpoints.
5951 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5952 Check both software and hardware breakpoints.
5953 (validate_inserted_breakpoint): Assert the breakpoint is a
5954 software breakpoint. Set the inserted flag to -1 instead of
5955 setting shlib_disabled.
5956 (delete_disabled_breakpoints): Adjust.
5957 (validate_breakpoints): Only validate software breakpoints.
5958 Adjust to inserted flag change.
5959 (check_mem_read, check_mem_write): Skip breakpoint types other
5960 than software breakpoints. Adjust to inserted flag change.
5961 * mem-break.h (enum raw_bkpt_type): New enum.
5962 (raw_breakpoint, struct process_info): Forward declare.
5963 (Z_packet_to_target_hw_bp_type): Delete declaration.
5964 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5965 (set_gdb_breakpoint, delete_gdb_breakpoint)
5966 (clear_breakpoint_conditions): New declarations.
5967 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5968 (breakpoint_inserted_here): Update comment.
5969 (add_breakpoint_condition, add_breakpoint_commands): Replace
5970 address parameter with a breakpoint pointer parameter.
5971 (gdb_breakpoint_here): Update comment.
5972 (delete_gdb_breakpoint_at): Delete.
5973 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5974 * server.c (process_point_options): Take a struct breakpoint
5975 pointer instead of an address. Adjust.
5976 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5977 delete_gdb_breakpoint.
5978 * spu-low.c (spu_target_ops): Install NULL as
5979 supports_z_point_type method.
5980 * target.h: Include mem-break.h.
5981 (struct target_ops) <prepare_to_access_memory>: Update comment.
5982 <supports_z_point_type>: New field.
5983 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5984 instead of a char. Also take a raw breakpoint pointer.
5985 * win32-arm-low.c (the_low_target): Install NULL as
5986 supports_z_point_type.
5987 * win32-i386-low.c (i386_supports_z_point_type): New function.
5988 (i386_insert_point, i386_remove_point): Adjust to new interface.
5989 (the_low_target): Install i386_supports_z_point_type.
5990 * win32-low.c (win32_supports_z_point_type): New function.
5991 (win32_insert_point, win32_remove_point): Adjust to new interface.
5992 (win32_target_ops): Install win32_supports_z_point_type.
5993 * win32-low.h (struct win32_target_ops):
5994 <supports_z_point_type>: New method.
5995 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5996 instead of a char. Also take a raw breakpoint pointer.
5997
5998 2014-05-20 Pedro Alves <palves@redhat.com>
5999
6000 * mem-break.h: Include break-common.h.
6001 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6002 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6003 (Z_packet_to_target_hw_bp_type): New declaration.
6004 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6005 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6006 (Z_PACKET_ACCESS_WP): Delete macros.
6007 (Z_packet_to_hw_type): Delete function.
6008 * i386-low.h: Don't include break-common.h here.
6009 (Z_packet_to_hw_type): Delete declaration.
6010 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6011 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6012 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6013 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6014 * linux-aarch64-low.c: Don't include break-common.h here.
6015 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6016 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6017 (Z_packet_to_target_hw_bp_type): Delete function.
6018 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6019 function.
6020 (mips_insert_point, mips_remove_point): Use
6021 Z_packet_to_target_hw_bp_type.
6022
6023 2014-05-20 Pedro Alves <palves@redhat.com>
6024
6025 * linux-aarch64-low.c: Include break-common.h.
6026 (enum target_point_type): Delete.
6027 (Z_packet_to_point_type): Rename to ...
6028 (Z_packet_to_target_hw_bp_type): ... this, and return a
6029 target_hw_bp_type instead.
6030 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6031 instead of an enum target_point_type.
6032 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6033 breakpoint type.
6034 (aarch64_dr_state_insert_one_point)
6035 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6036 (aarch64_handle_aligned_watchpoint)
6037 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6038 Take an enum target_hw_bp_type instead of an enum
6039 target_point_type.
6040 (aarch64_supports_z_point_type): New function.
6041 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6042 use Z_packet_to_target_hw_bp_type.
6043
6044 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6045
6046 * configure.ac: Only use -Werror by default when DEVELOPMENT
6047 is true.
6048 * configure: Regenerate.
6049
6050 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6051
6052 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6053 * linux-x86-low.c (X86_64_USER_REGS): New.
6054 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6055
6056 2014-04-28 Yao Qi <yao@codesourcery.com>
6057
6058 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6059 name.
6060
6061 2014-04-25 Pedro Alves <palves@redhat.com>
6062
6063 PR server/16255
6064 * linux-low.c (linux_attach_fail_reason_string): New function.
6065 (linux_attach_lwp): Delete.
6066 (linux_attach_lwp_1): Rename to ...
6067 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6068 argument. Remove "initial" parameter. Return int instead of
6069 void. Don't error or warn here.
6070 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6071 failure to attach to the tgid. Call warning when failing to
6072 attach to an lwp.
6073 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6074 argument. Remove "initial" parameter. Return int instead of
6075 void. Don't error or warn here.
6076 (linux_attach_fail_reason_string): New declaration.
6077 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6078 interface change. Use linux_attach_fail_reason_string.
6079
6080 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6081 Walfred Tedeschi <walfred.tedeschi@intel.com>
6082
6083 * Makefile.in: Added rules to handle new files
6084 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6085 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6086 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6087 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6088 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6089 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6090 x32-avx512-linux.o.
6091 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6092 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6093 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6094 i386/x32-avx512.xml.
6095 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6096 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6097 i386/x32-avx512-linux.xml.
6098 * i387-fp.c (num_avx512_k_registers): New constant for number
6099 of K registers.
6100 (num_avx512_zmmh_low_registers): New constant for number of
6101 lower ZMM registers (0-15).
6102 (num_avx512_zmmh_high_registers): New constant for number of
6103 higher ZMM registers (16-31).
6104 (num_avx512_ymmh_registers): New contant for number of higher
6105 YMM registers (ymm16-31 added by avx521 on x86_64).
6106 (num_avx512_xmm_registers): New constant for number of higher
6107 XMM registers (xmm16-31 added by AVX512 on x86_64).
6108 (struct i387_xsave): Add space for AVX512 registers.
6109 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6110 Add code to handle AVX512 registers.
6111 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6112 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6113 prototypei from generated file.
6114 (tdesc_amd64_avx512_linux): Likewise.
6115 (init_registers_x32_avx512_linux): Likewise.
6116 (tdesc_x32_avx512_linux): Likewise.
6117 (init_registers_i386_avx512_linux): Likewise.
6118 (tdesc_i386_avx512_linux): Likewise.
6119 (x86_64_regmap): Add AVX512 registers.
6120 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6121 mask.
6122 (initialize_low_arch): Add code to initialize AVX512 registers.
6123
6124 2014-04-23 Pedro Alves <palves@redhat.com>
6125
6126 * mem-break.c (find_gdb_breakpoint_at): Make static.
6127 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6128
6129 2014-04-23 Pedro Alves <palves@redhat.com>
6130
6131 * i386-low.c: Don't include break-common.h here.
6132 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6133 prototype to take target_hw_bp_type as argument instead of a Z
6134 packet char.
6135 * i386-low.h: Include break-common.h here.
6136 (Z_packet_to_hw_type): Declare.
6137 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6138 prototypes.
6139 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6140 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6141 (x86_remove_point): Convert the packet number to a
6142 target_hw_bp_type before calling i386_low_remove_watchpoint.
6143 * win32-i386-low.c (i386_insert_point): Convert the packet number
6144 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6145 (i386_remove_point): Convert the packet number to a
6146 target_hw_bp_type before calling i386_low_remove_watchpoint.
6147
6148 2014-04-23 Pedro Alves <palves@redhat.com>
6149
6150 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6151
6152 2014-04-10 Pedro Alves <palves@redhat.com>
6153
6154 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6155 Check if the condition or command is NULL before checking if the
6156 breakpoint is known. On success, return true.
6157 * mem-break.h (add_breakpoint_condition): Document return.
6158 (add_breakpoint_commands): Add describing comment.
6159 * server.c (skip_to_semicolon): New function.
6160 (process_point_options): Use it.
6161
6162 2014-04-09 Pedro Alves <palves@redhat.com>
6163
6164 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6165 to lwpid_of.
6166
6167 2014-02-27 Pedro Alves <palves@redhat.com>
6168
6169 PR 12702
6170 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6171 macros.
6172 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6173 output.
6174 (last_thread_of_process_p): Take a PID argument instead of a
6175 thread pointer.
6176 (linux_wait_for_lwp): Delete.
6177 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6178 functions.
6179 (linux_low_filter_event): New function, party factored out from
6180 linux_wait_for_event.
6181 (linux_wait_for_event): Rename to ...
6182 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6183 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6184 sigsuspend. Check for zombie leaders.
6185 (linux_wait_for_event): Reimplement as wrapper around
6186 linux_wait_for_event_filtered.
6187 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6188 a normal or signal exit is seen, it's the whole process exiting.
6189 (wait_for_sigstop): No longer a for_each_inferior callback.
6190 Rewrite on top of linux_wait_for_event_filtered.
6191 (stop_all_lwps): Call wait_for_sigstop directly.
6192 * server.c (resume, handle_target_event): Handle
6193 TARGET_WAITKIND_NO_RESUMED.
6194
6195 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6196
6197 * win32-low.c (psapi_get_dll_name,
6198 * win32_CreateToolhelp32Snapshot): Delete.
6199 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6200 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6201 Delete.
6202 (handle_load_dll): Add function description.
6203 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6204
6205 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6206
6207 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6208 Add comment.
6209 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6210 base address when calling win32_add_one_solib.
6211 (handle_load_dll): Delete local variable load_addr.
6212 Remove 0x1000 offset applied to DLL base address when calling
6213 win32_add_one_solib.
6214 (handle_unload_dll): Add comment.
6215
6216 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6217
6218 * win32-low.c (win32_add_all_dlls): Renames
6219 win32_ensure_ntdll_loaded. Rewrite function documentation.
6220 Adjust implementation to always load all DLLs.
6221 Add 0x1000 offset to DLL base address when calling
6222 win32_add_one_solib.
6223 (child_initialization_done): New static global.
6224 (do_initial_child_stuff): Set child_initialization_done to
6225 zero during child initialization, and 1 after. Replace call
6226 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6227 Add comment.
6228 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6229 (handle_unload_dll): Add function documentation.
6230 (get_child_debug_event): Ignore load and unload DLL events
6231 during child initialization.
6232
6233 2014-02-20 Doug Evans <dje@google.com>
6234
6235 Remove global all_lwps.
6236 * inferiors.h (ptid_of): Move here from linux-low.h.
6237 (pid_of, lwpid_of): Ditto.
6238 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6239 parameter is a struct thread_info * now.
6240 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6241 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6242 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6243 directly.
6244 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6245 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6246 * linux-arm-low.c (update_registers_callback): Update, "entry"
6247 parameter is a struct thread_info * now.
6248 Fetch lwpid from current_inferior directly.
6249 (arm_insert_point): Pass &all_threads to find_inferior instead of
6250 &all_lwps.
6251 (arm_remove_point): Ditto.
6252 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6253 (arm_prepare_to_resume): Fetch pid from thread.
6254 (arm_read_description): Fetch lwpid from current_inferior directly.
6255 * linux-low.c (all_lwps): Delete.
6256 (delete_lwp): Delete call to remove_inferior.
6257 (handle_extended_wait): Fetch lwpid from thread.
6258 (add_lwp): Don't set lwp->entry.id. Remove call to
6259 add_inferior_to_list.
6260 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6261 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6262 (kill_one_lwp_callback): Ditto.
6263 (linux_kill): Don't dereference NULL pointer.
6264 Fetch ptid,lwpid from thread.
6265 (get_detach_signal): Fetch ptid from thread.
6266 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6267 Simplify call to regcache_invalidate_thread.
6268 (delete_lwp_callback): Update, "entry" parameter is a
6269 struct thread_info * now. Fetch pid from thread.
6270 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6271 (status_pending_p_callback): Update, "entry" parameter is a
6272 struct thread_info * now. Fetch ptid from thread.
6273 (find_lwp_pid): Update, "entry" parameter is a
6274 struct thread_info * now.
6275 (linux_wait_for_lwp): Fetch pid from thread.
6276 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6277 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6278 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6279 (dequeue_one_deferred_signal): Ditto.
6280 (cancel_breakpoint): Fetch ptid from current_inferior.
6281 (linux_wait_for_event): Pass &all_threads to find_inferior,
6282 not &all_lwps. Fetch ptid, lwpid from thread.
6283 (count_events_callback): Update, "entry" parameter is a
6284 struct thread_info * now.
6285 (select_singlestep_lwp_callback): Ditto.
6286 (select_event_lwp_callback): Ditto.
6287 (cancel_breakpoints_callback): Ditto.
6288 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6289 not &all_lwps.
6290 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6291 (unsuspend_one_lwp): Update, "entry" parameter is a
6292 struct thread_info * now.
6293 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6294 not &all_lwps.
6295 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6296 Fetch lwpid from thread, not lwp.
6297 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6298 Pass &all_threads to find_inferior, not &all_lwps.
6299 (send_sigstop): Fetch lwpid from thread, not lwp.
6300 (send_sigstop_callback): Update, "entry" parameter is a
6301 struct thread_info * now.
6302 (suspend_and_send_sigstop_callback): Ditto.
6303 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6304 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6305 struct thread_info * now.
6306 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6307 from thread, lwp.
6308 (lwp_running): Update, "entry" parameter is a
6309 struct thread_info * now.
6310 (stop_all_lwps): Fetch ptid from thread.
6311 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6312 (linux_resume_one_lwp): Fetch lwpid from thread.
6313 (linux_set_resume_request): Update, "entry" parameter is a
6314 struct thread_info * now. Fetch pid, lwpid from thread.
6315 (resume_status_pending_p): Update, "entry" parameter is a
6316 struct thread_info * now.
6317 (need_step_over_p): Ditto. Fetch lwpid from thread.
6318 (start_step_over): Fetch lwpid from thread.
6319 (linux_resume_one_thread): Update, "entry" parameter is a
6320 struct thread_info * now. Fetch lwpid from thread.
6321 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6322 (proceed_one_lwp): Update, "entry" parameter is a
6323 struct thread_info * now. Fetch lwpid from thread.
6324 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6325 struct thread_info * now.
6326 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6327 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6328 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6329 directly.
6330 (regsets_store_inferior_registers): Ditto.
6331 (fetch_register, store_register): Ditto.
6332 (linux_read_memory, linux_write_memory): Ditto.
6333 (linux_request_interrupt): Ditto.
6334 (linux_read_auxv): Ditto.
6335 (linux_xfer_siginfo): Ditto.
6336 (linux_qxfer_spu): Ditto.
6337 (linux_qxfer_libraries_svr4): Ditto.
6338 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6339 moved to inferiors.h.
6340 (get_lwp): Delete.
6341 (get_thread_lwp): Update.
6342 (struct lwp_info): Delete member "entry". Simplify comment for
6343 member "thread".
6344 (all_lwps): Delete.
6345 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6346 current_inferior directly.
6347 (update_watch_registers_callback): Update, "entry" parameter is a
6348 struct thread_info * now. Fetch pid from thread.
6349 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6350 (mips_insert_point): Fetch lwpid from current_inferior.
6351 Pass &all_threads to find_inferior, not &all_lwps.
6352 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6353 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6354 directly.
6355 (mips_stopped_data_address): Ditto.
6356 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6357 directly.
6358 * linux-tile-low.c (tile_arch_setup): Ditto.
6359 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6360 (update_debug_registers_callback): Update, "entry" parameter is a
6361 struct thread_info * now. Fetch pid from thread.
6362 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6363 Pass &all_threads to find_inferior, not &all_lwps.
6364 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6365 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6366 Pass &all_threads to find_inferior, not &all_lwps.
6367 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6368 (i386_dr_low_get_status): Ditto.
6369 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6370 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6371 (x86_linux_read_description): Ditto.
6372 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6373
6374 2014-02-20 Doug Evans <dje@google.com>
6375
6376 * inferiors.c (get_first_inferior): Fix buglet.
6377
6378 2014-02-19 Doug Evans <dje@google.com>
6379
6380 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6381 * inferiors.c (add_thread): Change result type to struct thread_info *.
6382 All callers updated.
6383 (add_lwp): Call add_thread here instead of in callers.
6384 All callers updated.
6385 * linux-low.h (get_lwp_thread): Rewrite.
6386 (struct lwp_info): New member "thread".
6387
6388 2014-02-19 Doug Evans <dje@google.com>
6389
6390 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6391 All callers updated.
6392
6393 2014-02-19 Doug Evans <dje@google.com>
6394
6395 * inferiors.c (add_thread): Fix whitespace.
6396
6397 2014-02-19 Doug Evans <dje@google.com>
6398
6399 * dll.c (clear_dlls): Replace accessing list implemention details
6400 with API function.
6401 * gdbthread.h (get_first_thread): Declare.
6402 * inferiors.c (for_each_inferior_with_data): New function.
6403 (get_first_thread): New function.
6404 (find_thread_ptid): Simplify.
6405 (get_first_inferior): New function.
6406 (clear_list): Delete.
6407 (one_inferior_p): New function.
6408 (clear_inferior_list): New function.
6409 (clear_inferiors): Update.
6410 * inferiors.h (for_each_inferior_with_data): Declare.
6411 (clear_inferior_list): Declare.
6412 (one_inferior_p): Declare.
6413 (get_first_inferior): Declare.
6414 * linux-low.c (linux_wait_for_event): Replace accessing list
6415 implemention details with API function.
6416 * server.c (target_running): Ditto.
6417 (accumulate_file_name_length): New function.
6418 (emit_dll_description): New function.
6419 (handle_qxfer_libraries): Replace accessing list implemention
6420 details with API function.
6421 (handle_qxfer_threads_worker): New function.
6422 (handle_qxfer_threads_proper): Replace accessing list implemention
6423 details with API function.
6424 (handle_query): Ditto.
6425 (visit_actioned_threads_callback_ftype): New typedef.
6426 (visit_actioned_threads_data): New struct.
6427 (visit_actioned_threads): Rewrite to be find_inferior callback.
6428 (resume): Call find_inferior.
6429 (handle_status): Replace accessing list implemention
6430 details with API function.
6431 (process_serial_event): Replace accessing list implemention details
6432 with API function.
6433 * target.c (set_desired_inferior): Replace accessing list implemention
6434 details with API function.
6435 * tracepoint.c (same_process_p): New function.
6436 (gdb_agent_about_to_close): Replace accessing list implemention
6437 details with API function.
6438 * win32-low.c (child_delete_thread): Replace accessing list
6439 implemention details with API function.
6440 (match_dll_by_basename): New function.
6441 (dll_is_loaded_by_basename): New function.
6442 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6443 details call to dll_is_loaded_by_basename.
6444
6445 2014-02-19 Doug Evans <dje@google.com>
6446
6447 * dll.h (struct dll_info): Add comment.
6448 * gdbthread.h (struct thread_info): Add comment.
6449 (current_ptid): Simplify.
6450 * inferiors.c (add_process): Update.
6451 (remove_process): Update.
6452 * inferiors.h (struct process_info): Rename member "head" to "entry".
6453 * linux-low.c (delete_lwp): Update.
6454 (add_lwp): Update.
6455 (last_thread_of_process_p): Update.
6456 (kill_one_lwp_callback, linux_kill): Update.
6457 (status_pending_p_callback): Update.
6458 (wait_for_sigstop): Update. Simplify read of ptid.
6459 (start_step_over): Update.
6460 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6461 (get_lwp_thread): Update.
6462 (struct lwp_info): Rename member "head" to "entry".
6463 * regcache.h (inferior_list_entry): Delete.
6464 * server.c (kill_inferior_callback): Update.
6465 (detach_or_kill_inferior_callback): Update.
6466 (print_started_pid): Update.
6467 (print_attached_pid): Update.
6468 (process_serial_event): Simplify read of ptid.
6469 * thread-db.c (thread_db_create_event): Update.
6470 (thread_db_get_tls_address): Update.
6471 * win32-low.c (current_inferior_ptid): Simplify.
6472
6473 2014-02-19 Tom Tromey <tromey@redhat.com>
6474
6475 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6476 argument.
6477 (target_supports_btrace): Update.
6478
6479 2014-02-14 Yao Qi <yao@codesourcery.com>
6480
6481 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6482 (rsp-low-ipa.o): New target.
6483
6484 2014-02-12 Tom Tromey <tromey@redhat.com>
6485
6486 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6487 convert_ascii_to_int.
6488 * regcache.c (registers_to_string): Likewise.
6489 * remote-utils.c (decode_M_packet): Likewise.
6490 * server.c (process_serial_event): Likewise.
6491
6492 2014-02-12 Tom Tromey <tromey@redhat.com>
6493
6494 * server.c (handle_query, handle_v_run): Use hex2bin, not
6495 unhexify.
6496 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6497
6498 2014-02-12 Tom Tromey <tromey@redhat.com>
6499
6500 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6501 convert_int_to_ascii.
6502 * regcache.c (registers_to_string, collect_register_as_string):
6503 Likewise.
6504 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6505 Likewise.
6506 * server.c (process_serial_event): Likewise.
6507 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6508 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6509
6510 2014-02-12 Tom Tromey <tromey@redhat.com>
6511
6512 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6513 bin2hex, not hexify.
6514 * tracepoint.c (cmd_qtstatus): Likewise.
6515
6516 2014-02-12 Tom Tromey <tromey@redhat.com>
6517
6518 * remote-utils.c (monitor_output): Pass explicit length to
6519 hexify.
6520
6521 2014-02-12 Tom Tromey <tromey@redhat.com>
6522
6523 * tracepoint.c: Include rsp-low.h.
6524 * server.c: Include rsp-low.h.
6525 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6526 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6527 declare.
6528 * remote-utils.c: Include rsp-low.h.
6529 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6530 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6531 (convert_int_to_ascii, convert_ascii_to_int): Move to
6532 common/rsp-low.c.
6533 * regcache.c: Include rsp-low.h.
6534 * ax.c: Include rsp-low.h.
6535 * Makefile.in (SFILES): Add common/rsp-low.c.
6536 (OBS): Add rsp-low.o.
6537 (rsp-low.o): New target.
6538
6539 2014-02-12 Tom Tromey <tromey@redhat.com>
6540
6541 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6542 Include print-utils.h.
6543 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6544 (plongest, thirty_two, phex_nz): Remove.
6545 * Makefile.in (SFILES): Add common/print-utils.c.
6546 (OBS): Add print-utils.o.
6547 (print-utils-ipa.o): New target.
6548 (print-utils.o): New target.
6549 (IPA_OBJS): Add print-utils-ipa.o.
6550
6551 2014-02-06 Tom Tromey <tromey@redhat.com>
6552
6553 * Makefile.in (SFILES): Fix indentation.
6554
6555 2014-02-05 Doug Evans <dje@google.com>
6556
6557 * linux-low.c (linux_wait_for_event): Improve comment.
6558 (linux_wait_1): Keep current_inferior in sync with event_child.
6559
6560 2014-01-22 Doug Evans <dje@google.com>
6561
6562 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6563
6564 2014-01-22 Doug Evans <dje@google.com>
6565
6566 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6567 * configure: Regenerate.
6568 * config.in: Regenerate.
6569 * Makefile.in (SFILES): Add debug.c.
6570 (OBS): Add debug.o.
6571 * debug.c: New file.
6572 * debug.h: New file.
6573 * linux-aarch64-low.c (*): Update all debugging printfs to use
6574 debug_printf instead of fprintf.
6575 * linux-arm-low.c (*): Ditto.
6576 * linux-cris-low.c (*): Ditto.
6577 * linux-crisv32-low.c (*): Ditto.
6578 * linux-m32r-low.c (*): Ditto.
6579 * linux-sparc-low.c (*): Ditto.
6580 * linux-x86.c (*): Ditto.
6581 * linux-low.c (*): Ditto.
6582 (linux_wait_1): Add calls to debug_enter, debug_exit.
6583 (linux_wait): Remove redundant debugging printf.
6584 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6585 (linux_resume, unstop_all_lwps): Ditto.
6586 * mem-break.c (*): Update all debugging printfs to use
6587 debug_printf instead of fprintf.
6588 * remote-utils.c (*): Ditto.
6589 * thread-db.c (*): Ditto.
6590 * server.c #include <ctype.h>, "gdb_vecs.h".
6591 (debug_threads): Moved to debug.c.
6592 (*): Update all debugging printfs to use debug_printf instead of
6593 fprintf.
6594 (start_inferior): Replace call to fflush with call to debug_flush.
6595 (monitor_show_help): Mention set debug-format.
6596 (parse_debug_format_options): New function.
6597 (handle_monitor_command): Handle "monitor set debug-format".
6598 (gdbserver_usage): Mention --debug-format.
6599 (main): Parse --debug-format.
6600 * server.h (debug_threads): Declaration moved to debug.h.
6601 #include "debug.h".
6602 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6603 trace_debug_1 that uses debug_printf.
6604 (tracepoint_look_up_symbols): Update all debugging printfs to use
6605 debug_printf instead of fprintf.
6606
6607 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6608
6609 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6610 sys/ptrace.h.
6611
6612 2014-01-17 Pedro Alves <palves@redhat.com>
6613
6614 PR build/16445
6615 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6616 defined after including gdb_proc_service.h.
6617
6618 2014-01-16 Doug Evans <dje@google.com>
6619
6620 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6621 (match_dll): Use it.
6622
6623 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6624
6625 * target.h (target_ops) <read_btrace>: Change parameters and
6626 return type to allow error reporting.
6627 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6628 trace reading errors on.
6629 * linux-low.c (linux_low_read_btrace): Pass trace reading
6630 errors on.
6631 (linux_low_disable_btrace): New.
6632
6633 2014-01-15 Doug Evans <dje@google.com>
6634
6635 * inferiors.c (thread_id_to_gdb_id): Delete.
6636 * inferiors.h (thread_id_to_gdb_id): Delete.
6637
6638 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6639
6640 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6641 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6642 versions.
6643
6644 2014-01-08 Pedro Alves <palves@redhat.com>
6645
6646 * server.c (handle_status): Don't discard previous queued stop
6647 replies or thread's pending status here.
6648 (main) <disconnection>: Do it here instead.
6649
6650 2014-01-08 Pedro Alves <palves@redhat.com>
6651
6652 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6653 * server.c (visit_actioned_threads, handle_pending_status): New
6654 function.
6655 (handle_v_cont): Factor out parts to ...
6656 (resume): ... this new function. If in all-stop, and a thread
6657 being resumed has a pending status, report it without actually
6658 resuming.
6659 (myresume): Adjust to use the new 'resume' function.
6660 (clear_pending_status_callback, set_pending_status_callback)
6661 (find_status_pending_thread_callback): New functions.
6662 (handle_status): Handle the case of multiple threads having
6663 interesting statuses to report. Report threads' real last signal
6664 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6665 with an interesting thread to report the status for, instead of
6666 always reporting the status of the first thread.
6667
6668 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6669
6670 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6671 * gdbreplay.c (gdbreplay_version): Likewise.
6672
6673 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6674
6675 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6676 iov.iov_len with the real length in use.
6677
6678 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6679
6680 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6681 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6682 for all targets that use win32-low.c.
6683 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6684 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6685
6686 2013-12-13 Pedro Alves <palves@redhat.com>
6687
6688 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6689 if equal to TARGET_WAITKIND_LOADED.
6690 * win32-low.c (cached_status): New static global.
6691 (win32_wait): Add declaration.
6692 (do_initial_child_stuff): Flush all initial pending debug events
6693 up to the initial breakpoint.
6694 (win32_wait): If CACHED_STATUS was set, return that instead
6695 of doing a real wait. Remove the code resuming the execution
6696 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6697 during the initial phase. Also remove the code changing
6698 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6699 TARGET_WAITKIND_STOPPED.
6700
6701 2013-12-11 Yao Qi <yao@codesourcery.com>
6702
6703 * notif.c (handle_notif_ack): Return 0 if no notification
6704 matches.
6705
6706 2013-11-20 Doug Evans <dje@google.com>
6707
6708 * linux-low.c (linux_set_resume_request): Fix comment.
6709
6710 2013-11-20 Doug Evans <dje@google.com>
6711
6712 * linux-low.c (resume_status_pending_p): Tweak comment.
6713
6714 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6715
6716 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6717 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6718 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6719 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6720 (srv_amd64_regobj): Add amd64-mpx.o.
6721 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6722 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6723 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6724 * i387-fp.c (num_pl_bnd_register) Added constant.
6725 (num_pl_bnd_cfg_registers) Added constant.
6726 (struct i387_xsave) Added reserved area and MPX fields.
6727 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6728 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6729 function.
6730 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6731 (init_registers_amd64_mpx_linux): Declare new function.
6732 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6733 (x86_64_regmap): Add MPX registers.
6734 (x86_linux_read_description): Add MPX case.
6735 (initialize_low_arch): Initialize MPX targets.
6736
6737 2013-11-18 Tom Tromey <tromey@redhat.com>
6738
6739 * configure: Rebuild.
6740 * configure.ac: Don't check for stdlib.h.
6741 * gdbreplay.c: Unconditionally include stdlib.h.
6742
6743 2013-11-18 Tom Tromey <tromey@redhat.com>
6744
6745 * config.in: Rebuild.
6746 * configure: Rebuild.
6747 * configure.ac: Don't use AC_HEADER_DIRENT.
6748
6749 2013-11-18 Tom Tromey <tromey@redhat.com>
6750
6751 * server.h: Don't check HAVE_STRING_H.
6752 * gdbreplay.c: Don't check HAVE_STRING_H.
6753 * configure: Rebuild.
6754
6755 2013-11-18 Tom Tromey <tromey@redhat.com>
6756
6757 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6758 LIBGNU.
6759
6760 2013-11-08 Tom Tromey <tromey@redhat.com>
6761
6762 * configure, config.in: Rebuild.
6763 * configure.ac: Remove unused configury.
6764
6765 2013-11-08 Tom Tromey <tromey@redhat.com>
6766
6767 * acinclude.m4: Include common.m4, codeset.m4.
6768 * configure, config.in: Rebuild.
6769 * configure.ac: Use GDB_AC_COMMON.
6770
6771 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6772
6773 * linux-s390-low.c (HWCAP_S390_TE): New define.
6774 (s390_arch_setup): Consider the TE field in the HWCAP for
6775 determining 'have_regset_tdb'.
6776
6777 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6778
6779 PR gdb/16014
6780 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6781 call to sizeof.
6782
6783 2013-10-02 Pedro Alves <palves@redhat.com>
6784
6785 * server.c (process_serial_event): Don't output "GDBserver
6786 exiting" if GDB is connected through stdio.
6787 * target.c (mywait): Likewise, be silent if GDB is connected
6788 through stdio.
6789
6790 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6791
6792 * lynx-low.c (lynx_add_threads_after_attach): New function.
6793 (lynx_attach): Remove call to add_thread. Add call to
6794 lynx_add_threads_after_attach instead.
6795
6796 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6797
6798 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6799 * config.in, configure: Regenerated.
6800
6801 2013-09-18 Yao Qi <yao@codesourcery.com>
6802
6803 PR server/15959
6804 * server.c (start_inferior): Clear 'resume_info'.
6805
6806 2013-09-16 Jiong Wang <jiwang@tilera.com>
6807
6808 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6809 for each register.
6810
6811 2013-09-16 Jiong Wang <jiwang@tilera.com>
6812
6813 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6814 linux-tile-low.o to srv_tgtobj.
6815
6816 2013-09-16 Will Newton <will.newton@linaro.org>
6817
6818 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6819 out regs.
6820
6821 2013-09-06 Pedro Alves <palves@redhat.com>
6822
6823 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6824 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6825 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6826 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6827 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6828 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6829
6830 2013-09-06 Pedro Alves <palves@redhat.com>
6831
6832 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6833 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6834
6835 2013-09-06 Pedro Alves <palves@redhat.com>
6836
6837 * linux-amd64-ipa.c: Include tracepoint.h.
6838 * linux-i386-ipa.c: Include tracepoint.h.
6839
6840 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6841
6842 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6843 (ps_get_thread_area): New function.
6844
6845 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6846
6847 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6848 (initialize_low_arch): Call init_registers_crisv32 rather than
6849 init_register_crisv32.
6850
6851 2013-09-05 Pedro Alves <palves@redhat.com>
6852
6853 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6854 to ...
6855 * hostio.h: ... this new file.
6856 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6857 win32-low.c: Include hostio.h.
6858
6859 2013-09-05 Pedro Alves <palves@redhat.com>
6860
6861 * server.h (gdb_client_data, handler_func, callback_handler_func)
6862 (delete_file_handler, add_file_handler, append_callback_event)
6863 (delete_callback_event, start_event_loop, initialize_event_loop):
6864 Move to event-loop.h and include it.
6865 * event-loop.h: New file.
6866
6867 2013-09-05 Pedro Alves <palves@redhat.com>
6868
6869 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6870 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6871 (loaded_dll, unloaded_dll): Move to ...
6872 * dll.h: ... this new file.
6873 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6874
6875 2013-09-05 Pedro Alves <palves@redhat.com>
6876
6877 * server.h (current_process, get_thread_process, all_processes)
6878 (add_inferior_to_list, for_each_inferior, current_inferior)
6879 (remove_inferior, add_process, remove_process, find_process_pid)
6880 (have_started_inferiors_p, have_attached_inferiors_p)
6881 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6882 (clear_inferiors, find_inferior, find_inferior_id)
6883 (inferior_target_data, set_inferior_target_data)
6884 (inferior_regcache_data, set_inferior_regcache_data): Move to
6885 inferiors.h, and include it.
6886 * inferiors.h: New file.
6887
6888 2013-09-05 Pedro Alves <palves@redhat.com>
6889
6890 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6891 Move ...
6892 * ax.h: ... here.
6893
6894 2013-09-05 Pedro Alves <palves@redhat.com>
6895
6896 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6897 tracepoint.h.
6898 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6899 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6900 (handle_tracepoint_general_set, handle_tracepoint_query)
6901 (tracepoint_finished_step, tracepoint_was_hit)
6902 (release_while_stepping_state_list, current_traceframe)
6903 (in_readonly_region, traceframe_read_mem)
6904 (fetch_traceframe_registers, traceframe_read_sdata)
6905 (traceframe_read_info, struct fast_tpoint_collect_status)
6906 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6907 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6908 (supply_fast_tracepoint_registers)
6909 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6910 (ipa_tdesc, claim_trampoline_space)
6911 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6912 (agent_mem_read, agent_get_trace_state_variable_value)
6913 (agent_set_trace_state_variable_value, agent_tsv_read)
6914 (agent_mem_read_string, get_raw_reg_func_addr)
6915 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6916 * tracepoint.h: ... this new file.
6917
6918 2013-09-05 Pedro Alves <palves@redhat.com>
6919
6920 * server.h (perror_with_name, error, fatal, warning, paddress)
6921 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6922 include it.
6923 * utils.h: New file.
6924
6925 2013-09-05 Pedro Alves <palves@redhat.com>
6926
6927 * server.h (remote_debug, noack_mode, transport_is_reliable)
6928 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6929 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6930 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6931 (write_enn, initialize_async_io, enable_async_io)
6932 (disable_async_io, check_remote_input_interrupt_request)
6933 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6934 (dead_thread_notify, prepare_resume_reply)
6935 (decode_address_to_semicolon, decode_address, decode_m_packet)
6936 (decode_M_packet, decode_X_packet, decode_xfer_write)
6937 (decode_search_memory_packet, unhexify, hexify)
6938 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6939 (look_up_one_symbol, relocate_instruction)
6940 (monitor_output): Move to remote-utils.h, and include it.
6941 * remote-utils.h: New file.
6942
6943 2013-09-05 Pedro Alves <palves@redhat.com>
6944
6945 * server.h (_): Delete.
6946
6947 2013-09-02 Pedro Alves <palves@redhat.com>
6948
6949 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6950 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6951 allocated.
6952 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6953
6954 2013-09-02 Pierre Muller <muller@sourceware.org>
6955
6956 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6957 or WriteProcessMemory complete successfully and handle
6958 ERROR_PARTIAL_COPY error.
6959
6960 2013-09-02 Pedro Alves <palves@redhat.com>
6961
6962 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6963 error instead of EIO.
6964
6965 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6966
6967 PR server/15604
6968 * linux-low.c: Include filestuff.h.
6969 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6970 * lynx-low.c: Include filestuff.h.
6971 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6972 * server.c: Include filestuff.h.
6973 (main): Call notice_open_fds.
6974 * spu-low.c: Include filestuff.h.
6975 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6976
6977 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6978
6979 * Makefile.in: Explain why ../target and ../nat are not
6980 listed as include file search paths.
6981 (linux-waitpid.o): New object file rule.
6982 * configure.srv (srv_native_linux_obj): New variable.
6983 Replace all occurrences of linux native object files with
6984 $srv_native_linux_obj.
6985 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6986 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6987 (linux_enable_event_reporting): Remove declaration.
6988 (my_waitpid): Moved to common/linux-waitpid.c.
6989 (linux_wait_for_event): Pass ptid when calling
6990 linux_enable_event_reporting.
6991 (linux_supports_tracefork_flag): Remove.
6992 (linux_enable_event_reporting): Likewise.
6993 (linux_tracefork_grandchild): Remove.
6994 (STACK_SIZE): Moved to common/linux-ptrace.c.
6995 (linux_tracefork_child): Remove.
6996 (linux_test_for_tracefork): Remove.
6997 (linux_look_up_symbols): Call linux_supports_traceclone.
6998 (initialize_low): Remove call to linux_test_for_tracefork.
6999 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7000 common/linux-ptrace.h.
7001 (PTRACE_TYPE_ARG4): Likewise.
7002 Include linux-ptrace.h.
7003
7004 2013-08-21 Pedro Alves <palves@redhat.com>
7005
7006 * config.in: Renegerate.
7007
7008 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7009
7010 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7011 (SFILES): Remove $(srcdir)/common/target-common.c and
7012 add $(srcdir)/target/waitstatus.c.
7013 (OBS): Remove target-common.o and add waitstatus.o.
7014 (server_h): Remove $(srcdir)/../common/target-common.h and
7015 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7016 and $(srcdir)/../target/waitstatus.h.
7017 (target-common.o): Remove.
7018 (waitstatus.o): New target object file.
7019 * target.h: Do not include target-common.h and
7020 include target/resume.h, target/wait.h and
7021 target/waitstatus.h.
7022
7023 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7024
7025 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7026 to PTRACE_TYPE_ARG3.
7027 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7028 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7029 PTRACE_TYPE_ARG4.
7030 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7031 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7032
7033 2013-07-27 Jie Zhang <jie@codesourcery.com>
7034 Daniel Jacobowitz <dan@codesourcery.com>
7035 Yao Qi <yao@codesourcery.com>
7036
7037 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7038 (mips-linux-watch.o): New rule.
7039 (mips_linux_watch_h): New variable.
7040 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7041 srv_tgtobj.
7042 * linux-mips-low.c: Include mips-linux-watch.h.
7043 (struct arch_process_info, struct arch_lwp_info): New.
7044 (update_watch_registers_callback): New function.
7045 (mips_linux_new_process, mips_linux_new_thread) New functions.
7046 (mips_linux_prepare_to_resume, mips_insert_point): New
7047 functions.
7048 (mips_remove_point, mips_stopped_by_watchpoint): New
7049 functions.
7050 (rsp_bp_type_to_target_hw_bp_type): New function.
7051 (mips_stopped_data_address): New function.
7052 (the_low_target): Add watchpoint support functions.
7053
7054 2013-07-27 Yao Qi <yao@codesourcery.com>
7055
7056 * i386-low.c: Include break-common.h.
7057 (enum target_hw_bp_type): Remove.
7058
7059 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7060
7061 * Makefile.in (SFILES): /common/target-common.c.
7062 (OBS): Add target-common.o.
7063 (server_h): Add $(srcdir)/../common/target-common.h.
7064 (target-common.o): New target.
7065 * server.c (queue_stop_reply_callback): Free
7066 status string after use.
7067 * target.c (target_waitstatus_to_string): Remove.
7068 * target.h: Include target-common.h.
7069 (resume_kind): Likewise.
7070 (target_waitkind): Likewise.
7071 (target_waitstatus): Likewise.
7072 (TARGET_WNOHANG): Likewise.
7073
7074 2013-07-04 Yao Qi <yao@codesourcery.com>
7075
7076 * Makefile.in (host_alias): Use @host_noncanonical@.
7077 (target_alias): Use @target_noncanonical@.
7078 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7079 ACX_NONCANONICAL_HOST.
7080 * configure: Regenerated.
7081
7082 Revert:
7083 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7084
7085 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7086 * configure: Rebuild.
7087 * Makefile.in (version_host, version_target): Get from configure.
7088 (version.c): Use $(version_host) and $(version_target).
7089
7090 2013-07-03 Pedro Alves <palves@redhat.com>
7091
7092 * Makefile.in (config.status): Depend on development.sh.
7093 * acinclude.m4: Include libmcheck.m4.
7094 * configure: Regenerate.
7095
7096 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7097
7098 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7099 attribute inside the parentheses.
7100 (winapi_DebugSetProcessKillOnExit): Ditto.
7101 (winapi_DebugBreakProcess): Ditto.
7102 (winapi_GenerateConsoleCtrlEvent): Ditto.
7103
7104 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7105
7106 * notif.h (notif_event): Add a dummy member to avoid compiler
7107 errors.
7108
7109 2013-07-01 Pedro Alves <palves@redhat.com>
7110
7111 * hostio.c (HOSTIO_PATH_MAX): Define.
7112 (require_filename, handle_open, handle_unlink, handle_readlink):
7113 Use it.
7114
7115 2013-07-01 Pedro Alves <palves@redhat.com>
7116
7117 * server.h: Include "pathmax.h".
7118 * linux-low.c: Don't include sys/param.h.
7119 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7120 MAXPATHLEN.
7121 * win32-low.c: Don't include sys/param.h.
7122 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7123
7124 2013-07-01 Pedro Alves <palves@redhat.com>
7125
7126 * event-loop.c: Don't check HAVE_UNISTD_H before including
7127 <unistd.h>.
7128 * gdbreplay.c: Likewise.
7129 * remote-utils.c: Likewise.
7130 * server.c: Likewise.
7131 * configure.ac: Don't check for unistd.h.
7132 * configure: Regenerate.
7133
7134 2013-06-28 Tom Tromey <tromey@redhat.com>
7135
7136 * Makefile.in (version.c): Use version.in, not
7137 common/version.in.
7138
7139 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7140
7141 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7142 * configure: Rebuild.
7143 * Makefile.in (version_host, version_target): Get from configure.
7144 (version.c): Use $(version_host) and $(version_target).
7145
7146 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7147
7148 Fix trace-status to output user name without trailing colon.
7149 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7150
7151 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7152
7153 Fix trace-status to output proper start-time and stop-time.
7154 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7155 output start time and stop time in hex as gdb expects.
7156
7157 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7158
7159 * tracepoint.c (build_traceframe_info_xml): Output trace state
7160 variables present in the trace buffer.
7161
7162 2013-06-24 Tom Tromey <tromey@redhat.com>
7163
7164 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7165 create-version.sh.
7166 (version.o): Remove.
7167 * gdbreplay.c: Include version.h.
7168 (version, host_name): Don't declare.
7169 * server.h: Include version.h.
7170 (version, host_name): Don't declare.
7171
7172 2013-06-12 Pedro Alves <palves@redhat.com>
7173
7174 * linux-x86-low.c (linux_is_elf64): Delete global.
7175 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7176 with local linux_pid_exe_is_elf_64_file use.
7177
7178 2013-06-11 Pedro Alves <palves@redhat.com>
7179
7180 * linux-low.c (regset_disabled, disable_regset): New functions.
7181 (regsets_fetch_inferior_registers)
7182 (regsets_store_inferior_registers): Use them.
7183 (initialize_regsets_info); Don't allocate the disabled_regsets
7184 array here.
7185 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7186 comment.
7187
7188 2013-06-11 Pedro Alves <palves@redhat.com>
7189
7190 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7191 xmalloc.
7192
7193 2013-06-11 Pedro Alves <palves@redhat.com>
7194
7195 * linux-x86-low.c (initialize_low_arch): Call
7196 init_registers_x32_avx_linux.
7197
7198 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7199
7200 Fix compatibility with Android Bionic.
7201 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7202 it is not empty.
7203
7204 2013-06-07 Pedro Alves <palves@redhat.com>
7205
7206 PR server/14823
7207 * Makefile.in (OBS): Add tdesc.o.
7208 (IPA_OBJS): Add tdesc-ipa.o.
7209 (tdesc-ipa.o): New rule.
7210 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7211 interface.
7212 * linux-low.c (new_inferior): Delete.
7213 (disabled_regsets, num_regsets): Delete.
7214 (linux_add_process): Adjust to set the new per-process
7215 new_inferior flag.
7216 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7217 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7218 was a stop. When calling arch_setup, switch the current inferior
7219 to the thread that got an event.
7220 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7221 (regsets_fetch_inferior_registers)
7222 (regsets_store_inferior_registers): New regsets_info parameter.
7223 Adjust to use it.
7224 (linux_register_in_regsets): New regs_info parameter. Adjust to
7225 use it.
7226 (register_addr, fetch_register, store_register): New usrregs_info
7227 parameter. Adjust to use it.
7228 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7229 parameter regs_info. Adjust to use it.
7230 (linux_fetch_registers): Get the current inferior's regs_info, and
7231 adjust to use it.
7232 (linux_store_registers): Ditto.
7233 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7234 (initialize_low): Don't initialize the target_regsets here. Call
7235 initialize_low_arch.
7236 * linux-low.h (target_regsets): Delete declaration.
7237 (struct regsets_info): New.
7238 (struct usrregs_info): New.
7239 (struct regs_info): New.
7240 (struct process_info_private) <new_inferior>: New field.
7241 (struct linux_target_ops): Delete the num_regs, regmap, and
7242 regset_bitmap fields. New field regs_info.
7243 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7244 * i387-fp.c (num_xmm_registers): Delete.
7245 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7246 calls to new interface.
7247 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7248 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7249 Infer the number of xmm registers from the regcache's target
7250 description.
7251 * i387-fp.h (num_xmm_registers): Delete.
7252 * inferiors.c (add_thread): Don't install the thread's regcache
7253 here.
7254 * proc-service.c (gregset_info): Fetch the current inferior's
7255 regs_info. Adjust to use it.
7256 * regcache.c: Include tdesc.h.
7257 (register_bytes, reg_defs, num_registers)
7258 (gdbserver_expedite_regs): Delete.
7259 (get_thread_regcache): If the thread doesn't have a regcache yet,
7260 create one, instead of aborting gdbserver.
7261 (regcache_invalidate_one): Rename to ...
7262 (regcache_invalidate_thread): ... this.
7263 (regcache_invalidate_one): New.
7264 (regcache_invalidate): Only invalidate registers of the current
7265 process.
7266 (init_register_cache): Add target_desc parameter, and use it.
7267 (new_register_cache): Ditto. Assert the target description has a
7268 non zero registers_size.
7269 (regcache_cpy): Add assertions. Adjust.
7270 (realloc_register_cache, set_register_cache): Delete.
7271 (registers_to_string, registers_from_string): Adjust.
7272 (find_register_by_name, find_regno, find_register_by_number)
7273 (register_cache_size): Add target_desc parameter, and use it.
7274 (free_register_cache_thread, free_register_cache_thread_one)
7275 (regcache_release, register_cache_size): New.
7276 (register_size): Add target_desc parameter, and use it.
7277 (register_data, supply_register, supply_register_zeroed)
7278 (supply_regblock, supply_register_by_name, collect_register)
7279 (collect_register_as_string, collect_register_by_name): Adjust.
7280 * regcache.h (struct target_desc): Forward declare.
7281 (struct regcache) <tdesc>: New field.
7282 (init_register_cache, new_register_cache): Add target_desc
7283 parameter.
7284 (regcache_invalidate_thread): Declare.
7285 (regcache_invalidate_one): Delete declaration.
7286 (regcache_release): Declare.
7287 (find_register_by_number, register_cache_size, register_size)
7288 (find_regno): Add target_desc parameter.
7289 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7290 declarations.
7291 * remote-utils.c: Include tdesc.h.
7292 (outreg, prepare_resume_reply): Adjust.
7293 * server.c: Include tdesc.h.
7294 (gdbserver_xmltarget): Delete declaration.
7295 (get_features_xml, process_serial_event): Adjust.
7296 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7297 declare.
7298 (struct process_info) <tdesc>: New field.
7299 (ipa_tdesc): Declare.
7300 * tdesc.c: New file.
7301 * tdesc.h: New file.
7302 * tracepoint.c: Include tdesc.h.
7303 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7304 (get_context_regcache): Adjust to pass ipa_tdesc down.
7305 (do_action_at_tracepoint): Adjust to get the register cache size
7306 from the context regcache's description.
7307 (traceframe_walk_blocks): Adjust to get the register cache size
7308 from the current trace frame's description.
7309 (traceframe_get_pc): Adjust to get current trace frame's
7310 description and pass it down.
7311 (gdb_collect): Adjust to get the register cache size from the
7312 IPA's description.
7313 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7314 (gdbserver_xmltarget): Delete.
7315 (initialize_low_tracepoint): Set the ipa's target description.
7316 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7317 (initialize_low_tracepoint): Set the ipa's target description.
7318 * linux-x86-low.c: Include tdesc.h.
7319 [__x86_64__] (is_64bit_tdesc): New.
7320 (ps_get_thread_area, x86_get_thread_area): Use it.
7321 (i386_cannot_store_register): Rename to ...
7322 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7323 (i386_cannot_fetch_register): Rename to ...
7324 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7325 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7326 to new interface.
7327 (target_regsets): Rename to ...
7328 (x86_regsets): ... this.
7329 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7330 interface.
7331 (x86_siginfo_fixup): Use is_64bit_tdesc.
7332 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7333 (tdesc_x32_avx_linux, tdesc_x32_linux)
7334 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7335 Declare.
7336 (x86_linux_update_xmltarget): Delete.
7337 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7338 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7339 (AMD64_LINUX_USER64_CS): New.
7340 (x86_linux_read_description): New, based on
7341 x86_linux_update_xmltarget.
7342 (same_process_callback): New.
7343 (x86_arch_setup_process_callback): New.
7344 (x86_linux_update_xmltarget): New.
7345 (x86_regsets_info): New.
7346 (amd64_linux_regs_info): New.
7347 (i386_linux_usrregs_info): New.
7348 (i386_linux_regs_info): New.
7349 (x86_linux_regs_info): New.
7350 (x86_arch_setup): Reimplement.
7351 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7352 (x86_emit_ops): Ditto.
7353 (the_low_target): Adjust. Install x86_linux_regs_info,
7354 x86_cannot_fetch_register, and x86_cannot_store_register.
7355 (initialize_low_arch): New.
7356 * linux-ia64-low.c (tdesc_ia64): Declare.
7357 (ia64_fetch_register): Adjust.
7358 (ia64_usrregs_info, regs_info): New globals.
7359 (ia64_regs_info): New function.
7360 (the_low_target): Adjust.
7361 (initialize_low_arch): New function.
7362 * linux-sparc-low.c (tdesc_sparc64): Declare.
7363 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7364 Adjust.
7365 (sparc_arch_setup): New function.
7366 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7367 (the_low_target): Adjust.
7368 (initialize_low_arch): New function.
7369 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7370 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7371 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7372 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7373 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7374 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7375 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7376 (tdesc_powerpc_isa205_vsx64l): Declare.
7377 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7378 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7379 (ppc_set_pc, ppc_get_hwcap): Adjust.
7380 (ppc_usrregs_info): Forward declare.
7381 (!__powerpc64__) ppc_regmap_adjusted: New global.
7382 (ppc_arch_setup): Adjust to the current process'es target
7383 description.
7384 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7385 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7386 (ppc_store_evrregset): Adjust.
7387 (target_regsets): Rename to ...
7388 (ppc_regsets): ... this, and make static.
7389 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7390 (ppc_regs_info): New function.
7391 (the_low_target): Adjust.
7392 (initialize_low_arch): New function.
7393 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7394 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7395 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7396 (tdesc_s390x_linux64v2): Declare.
7397 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7398 (s390_fill_gregset, s390_store_last_break): Adjust.
7399 (target_regsets): Rename to ...
7400 (s390_regsets): ... this, and make static.
7401 (s390_get_pc, s390_set_pc): Adjust.
7402 (s390_get_hwcap): New target_desc parameter, and use it.
7403 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7404 (s390_arch_setup): Adjust to set the current process'es target
7405 description. Don't adjust the regmap.
7406 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7407 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7408 (regs_info_3264): New globals.
7409 (s390_regs_info): New function.
7410 (the_low_target): Adjust.
7411 (initialize_low_arch): New function.
7412 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7413 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7414 [__mips64] (init_registers_mips_linux)
7415 (init_registers_mips_dsp_linux): Delete defines.
7416 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7417 (have_dsp): New global.
7418 (mips_read_description): New, based on mips_arch_setup.
7419 (mips_arch_setup): Reimplement.
7420 (get_usrregs_info): New function.
7421 (mips_cannot_fetch_register, mips_cannot_store_register)
7422 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7423 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7424 (target_regsets): Rename to ...
7425 (mips_regsets): ... this, and make static.
7426 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7427 (dsp_regs_info, regs_info): New globals.
7428 (mips_regs_info): New function.
7429 (the_low_target): Adjust.
7430 (initialize_low_arch): New function.
7431 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7432 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7433 Declare.
7434 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7435 (arm_read_description): New, with bits factored from
7436 arm_arch_setup.
7437 (arm_arch_setup): Reimplement.
7438 (target_regsets): Rename to ...
7439 (arm_regsets): ... this, and make static.
7440 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7441 (arm_regs_info): New function.
7442 (the_low_target): Adjust.
7443 (initialize_low_arch): New function.
7444 * linux-m68k-low.c (tdesc_m68k): Declare.
7445 (target_regsets): Rename to ...
7446 (m68k_regsets): ... this, and make static.
7447 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7448 (m68k_regs_info): New function.
7449 (m68k_arch_setup): New function.
7450 (the_low_target): Adjust.
7451 (initialize_low_arch): New function.
7452 * linux-sh-low.c (tdesc_sharch): Declare.
7453 (target_regsets): Rename to ...
7454 (sh_regsets): ... this, and make static.
7455 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7456 (sh_regs_info, sh_arch_setup): New functions.
7457 (the_low_target): Adjust.
7458 (initialize_low_arch): New function.
7459 * linux-bfin-low.c (tdesc_bfin): Declare.
7460 (bfin_arch_setup): New function.
7461 (bfin_usrregs_info, regs_info): New globals.
7462 (bfin_regs_info): New function.
7463 (the_low_target): Adjust.
7464 (initialize_low_arch): New function.
7465 * linux-cris-low.c (tdesc_cris): Declare.
7466 (cris_arch_setup): New function.
7467 (cris_usrregs_info, regs_info): New globals.
7468 (cris_regs_info): New function.
7469 (the_low_target): Adjust.
7470 (initialize_low_arch): New function.
7471 * linux-cris-low.c (tdesc_crisv32): Declare.
7472 (cris_arch_setup): New function.
7473 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7474 (cris_regs_info): New function.
7475 (the_low_target): Adjust.
7476 (initialize_low_arch): New function.
7477 * linux-m32r-low.c (tdesc_m32r): Declare.
7478 (m32r_arch_setup): New function.
7479 (m32r_usrregs_info, regs_info): New globals.
7480 (m32r_regs_info): Adjust.
7481 (initialize_low_arch): New function.
7482 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7483 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7484 (tic6x_usrregs_info): Forward declare.
7485 (tic6x_read_description): New function, based on ...
7486 (tic6x_arch_setup): ... this. Reimplement.
7487 (target_regsets): Rename to ...
7488 (tic6x_regsets): ... this, and make static.
7489 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7490 (tic6x_regs_info): New function.
7491 (the_low_target): Adjust.
7492 (initialize_low_arch): New function.
7493 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7494 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7495 (target_regsets): Rename to ...
7496 (xtensa_regsets): ... this, and make static.
7497 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7498 globals.
7499 (xtensa_arch_setup, xtensa_regs_info): New functions.
7500 (the_low_target): Adjust.
7501 (initialize_low_arch): New function.
7502 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7503 (nios2_arch_setup): Set the current process'es tdesc.
7504 (target_regsets): Rename to ...
7505 (nios2_regsets): ... this.
7506 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7507 (nios2_regs_info): New function.
7508 (the_low_target): Adjust.
7509 (initialize_low_arch): New function.
7510 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7511 (aarch64_arch_setup): Set the current process'es tdesc.
7512 (target_regsets): Rename to ...
7513 (aarch64_regsets): ... this.
7514 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7515 (aarch64_regs_info): New function.
7516 (the_low_target): Adjust.
7517 (initialize_low_arch): New function.
7518 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7519 globals.
7520 (target_regsets): Rename to ...
7521 (tile_regsets): ... this.
7522 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7523 (tile_regs_info): New function.
7524 (tile_arch_setup): Set the current process'es tdesc.
7525 (the_low_target): Adjust.
7526 (initialize_low_arch): New function.
7527 * spu-low.c (tdesc_spu): Declare.
7528 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7529 * win32-arm-low.c (tdesc_arm): Declare.
7530 (arm_arch_setup): New function.
7531 (the_low_target): Install arm_arch_setup instead of
7532 init_registers_arm.
7533 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7534 (init_windows_x86): Rename to ...
7535 (i386_arch_setup): ... this. Set `win32_tdesc'.
7536 (the_low_target): Adjust.
7537 * win32-low.c (win32_tdesc): New global.
7538 (child_add_thread): Don't create the thread cache here.
7539 (do_initial_child_stuff): Set the new process'es tdesc.
7540 * win32-low.h (struct target_desc): Forward declare.
7541 (win32_tdesc): Declare.
7542 * lynx-i386-low.c (tdesc_i386): Declare global.
7543 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7544 * lynx-low.c (lynx_tdesc): New global.
7545 (lynx_add_process): Set the new process'es tdesc.
7546 * lynx-low.h (struct target_desc): Forward declare.
7547 (lynx_tdesc): Declare global.
7548 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7549 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7550 * nto-low.c (nto_tdesc): New global.
7551 (do_attach): Set the new process'es tdesc.
7552 * nto-low.h (struct target_desc): Forward declare.
7553 (nto_tdesc): Declare.
7554 * nto-x86-low.c (tdesc_i386): Declare.
7555 (nto_x86_arch_setup): Set `nto_tdesc'.
7556
7557 2013-06-04 Gary Benson <gbenson@redhat.com>
7558
7559 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7560 to qSupported response when appropriate.
7561 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7562 with nonzero-length annex.
7563 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7564 arguments supplied in annex.
7565
7566 2013-05-31 Doug Evans <dje@google.com>
7567
7568 PR server/15594
7569 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7570 64 bits in 64-cross-32 environment.
7571
7572 2013-05-28 Pedro Alves <palves@redhat.com>
7573
7574 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7575 (aarch64-without-fpu.c): Delete rule.
7576 * configure.srv (aarch64*-*-linux*): Remove references to
7577 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7578 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7579 declaration.
7580
7581 2013-05-24 Pedro Alves <palves@redhat.com>
7582
7583 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7584 instead of strchr/decode_address. Error if the range isn't split
7585 with a ','. Don't assume there's be a ':' in the action.
7586
7587 2013-05-23 Yao Qi <yao@codesourcery.com>
7588 Pedro Alves <palves@redhat.com>
7589
7590 * linux-low.c (lwp_in_step_range): New function.
7591 (linux_wait_1): If the thread was range stepping and stopped
7592 outside the stepping range, report the stop to GDB. Otherwise,
7593 continue stepping. Add range stepping debug output.
7594 (linux_set_resume_request): Copy the step range from the resume
7595 request to the lwp.
7596 (linux_supports_range_stepping): New.
7597 (linux_target_ops) <supports_range_stepping>: Set to
7598 linux_supports_range_stepping.
7599 * linux-low.h (struct linux_target_ops)
7600 <supports_range_stepping>: New field.
7601 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7602 * linux-x86-low.c (x86_supports_range_stepping): New.
7603 (the_low_target) <supports_range_stepping>: Set to
7604 x86_supports_range_stepping.
7605 * server.c (handle_v_cont): Handle 'r' action.
7606 (handle_v_requests): Append ";r" if the target supports range
7607 stepping.
7608 * target.h (struct thread_resume) <step_range_start,
7609 step_range_end>: New fields.
7610 (struct target_ops) <supports_range_stepping>:
7611 New field.
7612 (target_supports_range_stepping): New macro.
7613
7614 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7615
7616 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7617 confusion in comment.
7618
7619 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7620
7621 * lynx-low.c (struct process_info_private): New type.
7622 (lynx_add_process): New function.
7623 (lynx_create_inferior, lynx_attach): Replace calls to
7624 add_process by calls to lynx_add_process.
7625 (lynx_resume): If PTID is null, then try using
7626 current_process()->private->last_wait_event_ptid.
7627 Add comments.
7628 (lynx_clear_inferiors): Delete. The contents of that function
7629 has been inlined in lynx_mourn;
7630 (lynx_wait_1): Save the ptid in the process's private data.
7631 (lynx_mourn): Free the process' private data. Replace call
7632 to lynx_clear_inferiors by call to clear_inferiors.
7633
7634 2013-05-17 Yao Qi <yao@codesourcery.com>
7635
7636 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7637 the right place.
7638
7639 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7640
7641 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7642 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7643 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7644 PT_TEXT_END_ADDR guards. Update comments.
7645 (linux_target_op) <read_offsets>: Conditionally define to
7646 linux_read_offsets if the target is UCLIBC and if it defines
7647 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7648
7649 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7650 Andrew Jenner <andrew@codesourcery.com>
7651
7652 * Makefile.in (SFILES): Add linux-nios2-low.c.
7653 (clean): Add action to delete nios2-linux.c.
7654 (nios2-linux.c): New rule.
7655 * configure.srv: Add nios2*-*-linux*.
7656 * linux-nios2-low.c: New.
7657
7658 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7659
7660 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7661
7662 2013-04-25 Hui Zhu <hui@codesourcery.com>
7663
7664 PR gdb/15186
7665 * ax.c (ax_printf): Add fflush.
7666
7667 2013-04-22 Tom Tromey <tromey@redhat.com>
7668
7669 * Makefile.in (SFILES): Add filestuff.c.
7670 (OBS): Add filestuff.o.
7671 (filestuff.o): New target.
7672 * config.in, configure: Rebuild.
7673 * configure.ac: Check for fdwalk, pipe2.
7674
7675 2013-04-17 Pedro Alves <palves@redhat.com>
7676
7677 * configure.ac (USE_THREAD_DB): Delete variable.
7678 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7679 Don't AC_SUBST USE_THREAD_DB.
7680 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7681 * config.in, configure: Regenerate.
7682
7683 2013-04-16 Pedro Alves <palves@redhat.com>
7684
7685 * linux-low.h (struct lwp_info) <thread_known>: Move under
7686 the USE_THREAD_DB #ifdef.
7687
7688 2013-04-16 Pedro Alves <palves@redhat.com>
7689
7690 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7691 (linux-low.o): Delete rule.
7692 * linux-low.h: Always include "gdb_thread_db.h" instead of
7693 conditionally including thread_db.h.
7694 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7695 HAVE_THREAD_DB_H.
7696
7697 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7698
7699 * Makefile.in (install-only): Fix make install regression.
7700
7701 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7702
7703 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7704 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7705 installation.
7706 * gdbserver.1: Remove.
7707
7708 2013-03-22 Pedro Alves <palves@redhat.com>
7709
7710 * linux-low.c (handle_extended_wait): Don't call
7711 linux_enable_event_reporting.
7712
7713 2013-03-15 Tony Theodore <tonyt@logyst.com>
7714
7715 PR build/9098:
7716 * Makefile.in (SHELL): Use @SHELL@.
7717
7718 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7719
7720 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7721 compiler warning.
7722
7723 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7724
7725 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7726 Remove extraneous NULL element.
7727
7728 2013-03-13 Yao Qi <yao@codesourcery.com>
7729
7730 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7731 'V' block in trace frame.
7732
7733 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7734
7735 * target.h (struct target_ops): Add btrace ops.
7736 (target_supports_btrace): New macro.
7737 (target_enable_btrace): New macro.
7738 (target_disable_btrace): New macro.
7739 (target_read_btrace): New macro.
7740 * gdbthread.h (struct thread_info): Add btrace field.
7741 * server.c: Include btrace-common.h.
7742 (handle_btrace_general_set): New function.
7743 (handle_btrace_enable): New function.
7744 (handle_btrace_disable): New function.
7745 (handle_general_set): Call handle_btrace_general_set.
7746 (handle_qxfer_btrace): New function.
7747 (struct qxfer qxfer_packets[]): Add btrace entry.
7748 * inferiors.c (remove_thread): Disable btrace.
7749 * linux-low: Include linux-btrace.h.
7750 (linux_low_enable_btrace): New function.
7751 (linux_low_read_btrace): New function.
7752 (linux_target_ops): Add btrace ops.
7753 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7754 Add srv_linux_btrace=yes.
7755 (x86_64-*-linux*): Add linux-btrace.o.
7756 Add srv_linux_btrace=yes.
7757 * configure.ac: Define HAVE_LINUX_BTRACE.
7758 * config.in: Regenerated.
7759 * configure: Regenerated.
7760
7761 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7762
7763 * server.c (handle_qxfer): Preserve error message if -3 is
7764 returned.
7765 (qxfer): Document the -3 return value.
7766
7767 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7768
7769 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7770 (linux_btrace_h): New variable.
7771 (linux-btrace.o): New rule.
7772
7773 2013-03-08 Stan Shebs <stan@codesourcery.com>
7774 Hafiz Abid Qadeer <abidh@codesourcery.com>
7775
7776 * tracepoint.c (trace_buffer_size): New global.
7777 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7778 (init_trace_buffer): Change to one-argument function. Allocate
7779 trace buffer memory.
7780 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7781 handle QTBuffer:size packet.
7782 (cmd_bigqtbuffer_size): New function.
7783 (initialize_tracepoint): Call init_trace_buffer with
7784 DEFAULT_TRACE_BUFFER_SIZE.
7785 * server.c (handle_query): Add QTBuffer:size in the
7786 supported packets.
7787
7788 2013-03-07 Yao Qi <yao@codesourcery.com>
7789
7790 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7791 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7792 of -1.
7793 (cmd_qtsp): Adjust condition. Do post increment.
7794 Set cur_action and cur_step_action back to 0.
7795
7796 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7797
7798 PR server/15236
7799 * linux-low.c (linux_write_memory): Return early success if LEN is
7800 zero.
7801
7802 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7803
7804 * configure.srv: Add x86_64-*-cygwin* as target.
7805
7806 2013-02-28 Tom Tromey <tromey@redhat.com>
7807
7808 * configure.ac: Invoke AC_SYS_LARGEFILE.
7809 * configure, config.in: Rebuild.
7810
7811 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7812
7813 * win32-low.c: Throughout, fix format strings and casts of
7814 printf-like functions to avoid type related warnings on all
7815 platforms.
7816 (get_child_debug_event): Print dwDebugEventCode as hex since
7817 that's how it's usually documented.
7818
7819 2013-02-28 Yao Qi <yao@codesourcery.com>
7820
7821 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7822 pulongest.
7823
7824 2013-02-27 Jiong Wang <jiwang@tilera.com>
7825
7826 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7827 (reg-tilegx32.c): New rule.
7828 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7829 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7830 different register info initializer according to elf class.
7831 (init_registers_tilgx32): New function. The tilegx32 register info
7832 initializer.
7833 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7834 (tile_store_gregset): Likewise.
7835
7836 2013-02-27 Yao Qi <yao@codesourcery.com>
7837
7838 * server.c (process_point_options): Print debug message when
7839 debug_threads is true.
7840
7841 2013-02-26 Yao Qi <yao@codesourcery.com>
7842
7843 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7844
7845 2013-02-19 Pedro Alves <palves@redhat.com>
7846 Kai Tietz <ktietz@redhat.com>
7847
7848 PR gdb/15161
7849
7850 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7851 instead of strtoul to extract address from packet.
7852 (process_serial_event) <'z'>: Likewise.
7853
7854 2013-02-18 Yao Qi <yao@codesourcery.com>
7855
7856 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7857
7858 2013-02-14 Pedro Alves <palves@redhat.com>
7859
7860 Plug memory leak.
7861
7862 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7863 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7864
7865 2013-02-14 Pedro Alves <palves@redhat.com>
7866
7867 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7868
7869 2013-02-14 Pedro Alves <palves@redhat.com>
7870
7871 * tracepoint.c (save_string): Delete.
7872 (add_tracepoint_action): Use savestring instead of save_string.
7873
7874 2013-02-12 Pedro Alves <palves@redhat.com>
7875
7876 * linux-xtensa-low.c: Ditto.
7877 * xtensa-xtregs.c: Ditto.
7878
7879 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7880
7881 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7882 thread_db.
7883
7884 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7885
7886 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7887 aarch64_num_wp_regs and aarch64_num_bp_regs to
7888 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7889
7890 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7891
7892 * linux-aarch64-low.c (ps_get_thread_area): Replace
7893 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7894
7895 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7896 Marcus Shawcroft <marcus.shawcroft@arm.com>
7897 Nigel Stephens <nigel.stephens@arm.com>
7898 Yufeng Zhang <yufeng.zhang@arm.com>
7899
7900 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7901 (aarch64.c, aarch64-without-fpu.c): New targets.
7902 * configure.srv (aarch64*-*-linux*): New.
7903 * linux-aarch64-low.c: New file.
7904
7905 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7906
7907 * linux-low.c (handle_extended_wait, linux_create_inferior)
7908 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7909 (dequeue_one_deferred_signal, linux_resume_one_thread)
7910 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7911 (linux_tracefork_grandchild, linux_test_for_tracefork)
7912 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7913 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7914 where the argument is 0.
7915
7916 2013-01-25 Yao Qi <yao@codesourcery.com>
7917
7918 * event-loop.c: Include "queue.h".
7919 (gdb_event_p): New typedef.
7920 (struct gdb_event) <next_event>: Remove.
7921 (event_queue): Change to QUEUE(gdb_event_p).
7922 (async_queue_event): Remove.
7923 (gdb_event_xfree): New.
7924 (initialize_event_loop): New.
7925 (process_event): Use API from QUEUE.
7926 (wait_for_event): Likewise.
7927 * server.c (main): Call initialize_event_loop.
7928 * server.h (initialize_event_loop): Declare.
7929
7930 2013-01-18 Yao Qi <yao@codesourcery.com>
7931
7932 * ax.h (struct eval_agent_expr_context): New.
7933 (gdb_eval_agent_expr): Update declaration.
7934 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7935 TFRAME. Add new argument CTX.
7936 * server.h (struct eval_agent_expr_context): Declare.
7937 (agent_mem_read, agent_tsv_read): Update declaration.
7938 (agent_mem_read_string): Likewise.
7939 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7940 (add_traceframe_block): Add new argument TPOINT.
7941 Increase TPOINT->traceframe_usage.
7942 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7943 eval_tracepoint_agent_expr.
7944 (condition_true_at_tracepoint): Likewise.
7945 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7946 (agent_mem_read_string, agent_tsv_read): Likewise.
7947
7948 2013-01-16 Yao Qi <yao@codesourcery.com>
7949
7950 * linux-low.c (linux_resume_one_lwp): Don't check
7951 'lwp->bp_reinsert != 0'.
7952
7953 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7954 Pedro Alves <palves@redhat.com>
7955
7956 * lynx-low.c (ptrace_request_to_str): Define a temporary
7957 macro and use it to simplify this function's implementation.
7958
7959 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7960
7961 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7962 sets errno.
7963
7964 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7965
7966 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7967
7968 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7969
7970 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7971
7972 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7973
7974 * lynx-low.c (lynx_resume): Use the resume_info parameter
7975 to determine the ptid for the lynx_ptrace call, unless
7976 it is equal to minus_one_ptid, in which case we use the
7977 ptid of the current_inferior.
7978 (lynx_wait_1): After having received a thread create/exit
7979 event, resume the inferior's execution using the signaling
7980 thread's ptid, rather than the old ptid.
7981
7982 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7983
7984 * lynx-low.c (lynx_resume): Delete variable ret.
7985
7986 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7987
7988 * gdbreplay.c (gdbreplay_version): Update copyright year.
7989 * server.c (gdbserver_version): Likewise.
7990
7991 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7992
7993 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7994 new thread.
7995
7996 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7997
7998 * lynx-low.c (ptrace_request_to_str): Add handling for
7999 PTRACE_GETTRACESIG.
8000
8001 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8002
8003 * lynx-low.c (lynx_attach): Delete variable new_process.
8004
8005 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8006
8007 * lynx-low.c (lynx_create_inferior): Delete variable
8008 new_process.
8009
8010 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8011
8012 * lynx-low.c (ptrace_request_to_str): Do not handle
8013 PTRACE_GETTHREADLIST if this macro does not exist.
8014
8015 2012-12-15 Yao Qi <yao@codesourcery.com>
8016
8017 * Makefile.in (OBS): Add notif.o.
8018 * notif.c, notif.h: New.
8019 * server.c: Include "notif.h".
8020 (struct vstop_notif) <next>: Remove.
8021 <base>: New field.
8022 (queue_stop_reply): Update.
8023 (push_event, send_next_stop_reply): Remove.
8024 (discard_queued_stop_replies): Update.
8025 (notif_stop): New variable.
8026 (handle_v_stopped): Remove.
8027 (handle_v_requests): Don't call handle_v_stopped. Call
8028 handle_ack_notif instead.
8029 (queue_stop_reply_callback): Call notif_event_enque instead
8030 of queue_stop_reply.
8031 (handle_status): Don't call send_next_stop_reply, call
8032 notif_write_event instead.
8033 (kill_inferior_callback): Likewise.
8034 (detach_or_kill_inferior_callback): Likewise.
8035 (main): Call initialize_notif.
8036 (process_serial_event): Call QUEUE_is_empty.
8037 (handle_target_event): Call notif_push instead of push event.
8038 * server.h (push_event): Remove declaration.
8039
8040 2012-12-10 Tom Tromey <tromey@redhat.com>
8041
8042 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8043 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8044 macros.
8045 (.c.o): Rewrite.
8046 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8047 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8048 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8049 (amd64-linux-ipa.o, ax.o): Rewrite.
8050 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8051 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8052 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8053 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8054 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8055 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8056 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8057 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8058 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8059 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8060 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8061 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8062 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8063 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8064 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8065 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8066 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8067 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8068 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8069 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8070 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8071 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8072 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8073 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8074 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8075 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8076 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8077 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8078 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8079 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8080 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8081 (reg-tilegx.o): Remove.
8082 (all_object_files): New macro.
8083 Include .deps files.
8084 * aclocal.m4, configure: Rebuild.
8085 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8086 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8087 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8088
8089 2012-12-05 Tom Tromey <tromey@redhat.com>
8090
8091 PR gdb/14917:
8092 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8093
8094 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8095
8096 * configure.ac: Check for linux/perf_event.h.
8097 * config.in: Regenerated.
8098 * configure: Regenerated.
8099
8100 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8101
8102 * hostio.c (handle_readlink): Decrease buffer size
8103 parameter passed to readlink by one byte.
8104
8105 2012-11-26 Yao Qi <yao@codesourcery.com>
8106
8107 * configure.ac (build_warnings): Append '-Wempty-body'.
8108 * configure: Regenerated.
8109 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8110 body.
8111
8112 2012-11-15 Pierre Muller <muller@sourceware.org>
8113
8114 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8115 * config.in: Regenerate.
8116 * configure: Regenerate.
8117 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8118 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8119 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8120 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8121 header.
8122 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8123 instead of <sys/wait.h> header.
8124 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8125
8126 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8127
8128 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8129 (various make rules): Remove -DGDBSERVER
8130
8131 2012-11-09 Yao Qi <yao@codesourcery.com>
8132
8133 * spu-low.c (current_ptid): Move it to ..
8134 * gdbthread.h: ... here. New.
8135 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8136 * server.c (myresume, process_serial_event): Likewise.
8137 * thread-db.c (thread_db_find_new_threads): Likewise.
8138 * tracepoint.c (run_inferior_command): Likewise.
8139
8140 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8141
8142 * server.c (handle_search_memory_1): Include access length in
8143 warning message.
8144
8145 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8146
8147 * linux-crisv32-low.c: Fix compile errors.
8148
8149 2012-09-04 Yao Qi <yao@codesourcery.com>
8150
8151 * tracepoint.c (cmd_qtsv): Adjust debug message.
8152 Don't check CUR_TPOINT.
8153
8154 2012-08-28 Yao Qi <yao@codesourcery.com>
8155
8156 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8157 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8158 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8159 Remove declarations of xmalloc, xreallloc, xstrdup and
8160 freeargv.
8161 * Makefile.in (libiberty_h): New.
8162 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8163 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8164
8165 2012-08-23 Yao Qi <yao@codesourcery.com>
8166
8167 * server.h: Remove declaration of 'xsnprintf'.
8168
8169 2012-08-22 Keith Seitz <keiths@redhat.com>
8170
8171 * server.h: Include build-gnulib-gbserver/config.h.
8172 * gdbreplay.c: Likewise.
8173
8174 2012-08-08 Doug Evans <dje@google.com>
8175
8176 * Makefile.in (SFILES): Add gdb_vecs.c.
8177 (OBS): Add gdb_vecs.o.
8178 (gdb_vecs_h, host_defs_h): New variables.
8179 (thread-db.o): Add $(gdb_vecs_h) dependency.
8180 (gdb_vecs.o): New rule.
8181 * thread-db.c: #include "gdb_vecs.h".
8182 (thread_db_load_search): Use a vector to iterate over path elements.
8183 Handle text appearing after "$pdir".
8184
8185 * configure.ac: Add check for strstr.
8186 * config.in: Regenerate.
8187 * configure: Regenerate.
8188
8189 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8190
8191 * hostio.c (handle_pread): If pread fails, fall back to attempting
8192 lseek/read.
8193 (handle_pwrite): Likewise for pwrite.
8194
8195 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8196
8197 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8198 between unsupported TYPE and unimplementable ADDR/LEN combination.
8199 (arm_insert_point): Act on new return value.
8200
8201 2012-07-31 Pedro Alves <palves@redhat.com>
8202
8203 * server.c (process_point_options): Only skip tokens if we find
8204 one that is unrecognized. Don't treat 'X' specially while
8205 skipping unrecognized tokens.
8206
8207 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8208
8209 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8210 to 4-byte-align HW breakpoint addresses for Thumb.
8211
8212 2012-07-27 Yao Qi <yao@codesourcery.com>
8213
8214 PR remote/14161.
8215
8216 * server.h: Declare gdb_agent_about_to_close.
8217 * target.c (kill_inferior): Include "agent.h".
8218 New. Send command 'kill'.
8219 * target.h (kill_inferior): Removed macro.
8220 * tracepoint.c (gdb_agent_about_to_close): New.
8221 (gdb_agent_helper_thread): Handle command 'close'.
8222 Wait endlessly until the inferior stops.
8223 Install gdb_agent_remove_socket to atexit hook.
8224 (agent_socket_name): New static variable.
8225 (gdb_agent_socket_init): Replace local variable 'name' with
8226 'agent_socket_name'.
8227 (gdb_agent_remove_socket): New.
8228
8229 2012-07-27 Yao Qi <yao@codesourcery.com>
8230
8231 * server.c (process_point_options): Stop at 'X' when parsing.
8232
8233 2012-07-19 Michael Eager <eager@eagercon.com>
8234
8235 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8236 to hw_execute.
8237 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8238 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8239 hardware breakpoint.
8240
8241 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8242
8243 * gdbserver/linux-low.c (initialize_low): Call
8244 linux_ptrace_init_warnings.
8245
8246 2012-07-02 Doug Evans <dje@google.com>
8247
8248 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8249 pointer to int.
8250
8251 2012-07-02 Stan Shebs <stan@codesourcery.com>
8252
8253 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8254 (ax.o): Add it to build rule.
8255 (ax-ipa.o): Ditto.
8256 (OBS): Add format.o.
8257 (IPA_OBS): Add format.o.
8258 * server.c (handle_query): Claim support for breakpoint commands.
8259 (process_point_options): Add command case.
8260 (process_serial_event): Leave running if there are printfs in
8261 effect.
8262 * mem-break.h (any_persistent_commands): Declare.
8263 (add_breakpoint_commands): Declare.
8264 (gdb_no_commands_at_breakpoint): Declare.
8265 (run_breakpoint_commands): Declare.
8266 * mem-break.c (struct point_command_list): New struct.
8267 (struct breakpoint): New field command_list.
8268 (any_persistent_commands): New function.
8269 (add_commands_to_breakpoint): New function.
8270 (add_breakpoint_commands): New function.
8271 (gdb_no_commands_at_breakpoint): New function.
8272 (run_breakpoint_commands): New function.
8273 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8274 locally.
8275 * ax.c: Include format.h.
8276 (ax_printf): New function.
8277 (gdb_eval_agent_expr): Add printf opcode.
8278
8279 2012-06-13 Yao Qi <yao@codesourcery.com>
8280
8281 * server.c (start_inferior): Remove duplicated writes to fields
8282 'last_resume_kind' and 'last_status' of 'current_inferior'.
8283
8284 2012-06-12 Yao Qi <yao@codesourcery.com>
8285 Pedro Alves <palves@redhat.com>
8286
8287 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8288 comment.
8289 * server.c (handle_v_cont): Extend comment.
8290
8291 2012-06-11 Yao Qi <yao@codesourcery.com>
8292
8293 * linux-low.c (linux_attach): Add 'static'.
8294
8295 2012-06-06 Yao Qi <yao@codesourcery.com>
8296
8297 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8298
8299 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8300
8301 Fix gcc -flto compilation warning.
8302 * server.c (main): Make variable multi_mode and attach volatile.
8303
8304 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8305
8306 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8307 if the platform doesn't know about it.
8308
8309 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8310
8311 * Makefile.in (SFILES): Add linux-tile-low.c.
8312 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8313 * configure.srv: Handle tilegx-*-linux*.
8314 * linux-tile-low.c: New file.
8315
8316 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8317
8318 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8319
8320 2012-05-24 Pedro Alves <palves@redhat.com>
8321
8322 PR gdb/7205
8323
8324 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8325
8326 2012-05-24 Pedro Alves <palves@redhat.com>
8327
8328 PR gdb/7205
8329
8330 Replace target_signal with gdb_signal throughout.
8331
8332 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8333
8334 * linux-low.c (linux_store_registers): Avoid the copying sequence
8335 when no data has been retrieved by ptrace.
8336
8337 2012-05-22 Will Deacon <will.deacon@arm.com>
8338
8339 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8340 Include asm/ptrace.h.
8341 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8342 already defined.
8343
8344 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8345
8346 * linux-low.c (linux_store_registers): Don't re-retrieve data
8347 with ptrace that has already been obtained from /proc. Always
8348 copy any data retrieved with ptrace to the buffer supplied.
8349
8350 2012-05-11 Yao Qi <yao@codesourcery.com>
8351 Pedro Alves <palves@redhat.com>
8352
8353 * linux-low.c (enum stopping_threads_kind): New.
8354 (stopping_threads): Change type to `enum stopping_threads_kind'.
8355 (handle_extended_wait): If stopping and suspending threads, leave
8356 the new_lwp suspended too.
8357 (linux_wait_for_event): Adjust.
8358 (stop_all_lwps): Set `stopping_threads' to
8359 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8360 whether we're suspending threads or just stopping them. Assert no
8361 recursion happens.
8362
8363 2012-04-29 Yao Qi <yao@codesourcery.com>
8364
8365 * server.h: Move some code to ...
8366 * gdbthread.h: ... here. New.
8367 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8368 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8369 (nto-low.o, win32-low.o): Likewise.
8370 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8371 * regcache.c, remote-utils.c, server.c: Likewise.
8372 * target.c, tracepoint.c, win32-low.c: Likewise.
8373
8374 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8375
8376 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8377 (PTRACE_ARG4_TYPE): Likewise.
8378 (PTRACE_XFER_TYPE): Likewise.
8379 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8380 ptrace to PTRACE_ARG3_TYPE.
8381 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8382 (PTRACE_ARG4_TYPE): Likewise.
8383 (PTRACE_XFER_TYPE): Likewise.
8384 (linux_detach_one_lwp): Cast fourth argument of
8385 ptrace to long then PTRACE_ARG4_TYPE.
8386 (regsets_fetch_inferior_registers): Cast third argument of
8387 ptrace to long then PTRACE_ARG3_TYPE.
8388 (regsets_store_inferior_registers): Likewise.
8389
8390 2012-04-20 Pedro Alves <palves@redhat.com>
8391
8392 * configure: Regenerate.
8393
8394 2012-04-19 Pedro Alves <palves@redhat.com>
8395
8396 * Makefile.in (GNULIB_BUILDDIR): New.
8397 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8398 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8399 (all, install-only, uninstall, clean-info, all-lib, clean): No
8400 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8401 (maintainer-clean realclean distclean): Use subdir_do.
8402 (subdir_do): New.
8403 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8404 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8405 * acinclude.m4: Include acx_configure_dir.m4.
8406 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8407 calls. Call AC_PROG_RANLIB. Configure gnulib using
8408 ACX_CONFIGURE_DIR.
8409 (GNULIB): New.
8410 (GNULIB_STDINT_H): Adjust.
8411 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8412 * gdbreplay.c: Include build-gnulib/config.h.
8413 * server.h: Likewise.
8414 * aclocal.m4: Regenerate.
8415 * config.in: Regenerate.
8416 * configure: Regenerate.
8417
8418 2012-04-19 Pedro Alves <palves@redhat.com>
8419
8420 * Makefile.in (LIBGNU, INCGNU): Adjust.
8421 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8422 (all, install-only, uninstall, clean-info, all-lib, clean)
8423 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8424 * configure.ac: Adjust AC_OUTPUT output.
8425 * aclocal.m4: Regenerate.
8426 * configure: Regenerate.
8427
8428 2012-04-19 Pedro Alves <palves@redhat.com>
8429
8430 * Makefile.in (generated_files): New.
8431 (server_h): Remove the explicit dependency on config.h, and depend
8432 on $generated_files.
8433
8434 2012-04-19 Pedro Alves <palves@redhat.com>
8435
8436 * Makefile.in (INCGNU): Add -Ignulib.
8437
8438 2012-04-19 Pedro Alves <palves@redhat.com>
8439
8440 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8441 (INCGNU): ... this, and spell out -I here.
8442 (GNULIB_LIB): Rename to ...
8443 (LIBGNU): ... this.
8444 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8445
8446 2012-04-19 Pedro Alves <palves@redhat.com>
8447
8448 * config.in: Regenerate.
8449
8450 2012-04-19 Pedro Alves <palves@redhat.com>
8451
8452 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8453 * server.h (memmem): Remove declaration.
8454 * config.in: Regenerate.
8455 * configure: Regenerate.
8456
8457 2012-04-19 Yao Qi <yao@codesourcery.com>
8458
8459 * Makefile.in (SFILES): Add common/vec.c.
8460 (OBS): Add vec.o.
8461 (vec.o): New rule.
8462
8463 2012-04-19 Yao Qi <yao@codesourcery.com>
8464
8465 * remote-utils.c (prepare_resume_reply): Replace with macro
8466 target_core_of_thread.
8467 * server.c (handle_qxfer_threads_proper): Likewise.
8468 * target.h (traget_core_of_thread): New macro.
8469
8470 2012-04-18 Pedro Alves <palves@redhat.com>
8471
8472 * aclocal.m4: Regenerate.
8473 * configure: Regenerate.
8474
8475 2012-04-16 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8478 duplicated on address.
8479
8480 2012-04-16 Yao Qi <yao@codesourcery.com>
8481
8482 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8483 (struct tracepoint_action_ops) <send>: New field.
8484 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8485 (agent_expr_send, x_tracepoint_action_send): New.
8486 (l_tracepoint_action_send): New.
8487 (cmd_qtdp): Download and install tracepoint
8488 according to `use_agent'.
8489 (run_inferior_command): Add one more parameter `len'.
8490 Update callers.
8491 (tracepoint_send_agent): New.
8492 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8493
8494 2012-04-16 Yao Qi <yao@codesourcery.com>
8495
8496 * tracepoint.c (download_tracepoints): Moved to ...
8497 (cmd_qtstart): ... here.
8498
8499 2012-04-14 Yao Qi <yao@codesourcery.com>
8500
8501 * tracepoint.c: Include inttypes.h.
8502 (struct collect_memory_action): Use sized types.
8503 (struct tracepoint): Likewise.
8504 (cmd_qtdp, stop_tracing): Update print specifiers.
8505 (cmd_qtp, response_tracepoint): Likewise.
8506 (collect_data_at_tracepoint): Likewise.
8507 (collect_data_at_step): Likewise.
8508
8509 2012-04-14 Yao Qi <yao@codesourcery.com>
8510
8511 Import gnulib module inttypes.
8512 * aclocal.m4, config.in, configure: Regenerated.
8513
8514 2012-04-14 Yao Qi <yao@codesourcery.com>
8515
8516 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8517 Makefile and config.status at last.
8518
8519 2012-04-13 Yao Qi <yao@codesourcery.com>
8520
8521 * tracepoint.c: Include stdint.h unconditionally.
8522
8523 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8524
8525 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8526 on BFD_HAVE_SYS_PROCFS_TYPE.
8527 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8528 * configure: Regenerate.
8529 * config.in: Likewise.
8530
8531 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8532
8533 * Makefile.in (clean): Also remove x32.c x32-linux.c
8534 x32-avx.c x32-avx-linux.c.
8535 (x32.o): New target.
8536 (x32.c): Likewise.
8537 (x32-linux.o): Likewise.
8538 (x32-linux.c): Likewise.
8539 (x32-avx.o): Likewise.
8540 (x32-avx.c): Likewise.
8541 (x32-avx-linux.o): Likewise.
8542 (x32-avx-linux.c): Likewise.
8543
8544 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8545 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8546 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8547 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8548 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8549 i386/x32-avx-linux.xml.
8550
8551 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8552 (init_registers_x32_avx_linux): Likwise.
8553 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8554 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8555
8556 2012-04-13 Pedro Alves <palves@redhat.com>
8557
8558 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8559 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8560 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8561 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8562 the sub-make.
8563
8564 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8565
8566 * linux-x86-low.c (compat_x32_clock_t): New.
8567 (compat_x32_siginfo_t): Likewise.
8568 (compat_x32_siginfo_from_siginfo): Likewise.
8569 (siginfo_from_compat_x32_siginfo): Likewise.
8570 (linux_is_elf64): Likewise.
8571 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8572 and siginfo_from_compat_x32_siginfo for x32.
8573 (x86_arch_setup): Set linux_is_elf64.
8574
8575 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8576
8577 PR gdb/13969
8578 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8579 e_machine field.
8580 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8581 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8582 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8583 compatible with process.
8584
8585 2012-04-12 Yao Qi <yao@codesourcery.com>
8586
8587 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8588 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8589 (install-only, install-info, clean): Handle sub dir gnulib.
8590 (all-lib, am--refresh): New targets.
8591 (memmem.o): Remove target.
8592 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8593 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8594 (AC_REPLACE_FUNCS): Remove memmem.
8595 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8596 (AC_OUTPUT): Generate Makefile in gnulib/.
8597 * aclocal.m4, config.in, configure: Regenerated.
8598
8599 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8600
8601 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8602
8603 2012-04-05 Pedro Alves <palves@redhat.com>
8604
8605 -Werror=strict-aliasing
8606
8607 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8608 pointer.
8609
8610 2012-04-04 Pedro Alves <palves@redhat.com>
8611
8612 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8613 (sparc_store_gregset_from_stack, sparc_store_gregset)
8614 (sparc_breakpoint_at): Fix formatting.
8615
8616 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8617
8618 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8619 are available.
8620 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8621 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8622 * config.in: Regenerate.
8623 * configure: Likewise.
8624
8625 2012-03-29 Pedro Alves <palves@redhat.com>
8626
8627 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8628 Correct ptrace arguments.
8629
8630 2012-03-28 Pedro Alves <palves@redhat.com>
8631
8632 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8633 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8634 (IA64_FR1_REGNUM): New defines.
8635 (ia64_fetch_register): New.
8636 (the_low_target): Install it.
8637 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8638 field.
8639 * linux-low.c (linux_fetch_registers): Try the
8640 the_low_target.fetch_register hook first.
8641
8642 * linux-arm-low.c (the_low_target): Adjust.
8643 * linux-bfin-low.c (the_low_target): Adjust.
8644 * linux-cris-low.c (the_low_target): Adjust.
8645 * linux-crisv32-low.c (the_low_target): Adjust.
8646 * linux-m32r-low.c (the_low_target): Adjust.
8647 * linux-m68k-low.c (the_low_target): Adjust.
8648 * linux-mips-low.c (the_low_target): Adjust.
8649 * linux-ppc-low.c (the_low_target): Adjust.
8650 * linux-s390-low.c (the_low_target): Adjust.
8651 * linux-sh-low.c (the_low_target): Adjust.
8652 * linux-sparc-low.c (the_low_target): Adjust.
8653 * linux-tic6x-low.c (the_low_target): Adjust.
8654 * linux-x86-low.c (the_low_target): Adjust.
8655 * linux-xtensa-low.c (the_low_target): Adjust.
8656
8657 2012-03-26 Pedro Alves <palves@redhat.com>
8658
8659 * server.c (handle_qxfer_libraries): Don't bail early if
8660 the_target->qxfer_libraries_svr4 is not NULL.
8661
8662 2012-03-26 Pedro Alves <palves@redhat.com>
8663
8664 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8665
8666 2012-03-23 Pedro Alves <palves@redhat.com>
8667
8668 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8669 "library-list-svr4" element's start tag when the the DSO list is
8670 empty.
8671
8672 2012-03-23 Pedro Alves <palves@redhat.com>
8673
8674 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8675 a variable whose type size is the same as the inferior's pointer
8676 size.
8677
8678 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8679
8680 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8681 struct siginfo.
8682 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8683 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8684 * linux-low.h: Include <signal.h>.
8685 (struct siginfo): Remove forward declaration.
8686 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8687 struct siginfo.
8688
8689 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8690
8691 * .gitignore: Ignore more files.
8692
8693 2012-03-19 Pedro Alves <palves@redhat.com>
8694 Jan Kratochvil <jan.kratochvil@redhat.com>
8695
8696 * server.c (cont_thread, general_thread): Add describing comments.
8697 (start_inferior): Clear `cont_thread'.
8698 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8699 of a process.
8700
8701 2012-03-15 Yao Qi <yao@codesourcery.com>
8702
8703 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8704 handling to ...
8705 (cmd_qtdp): ... here.
8706
8707 2012-03-15 Yao Qi <yao@codesourcery.com>
8708
8709 * tracepoint.c (struct tracepoint_action_ops): New.
8710 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8711 (m_tracepoint_action_download): New.
8712 (r_tracepoint_action_download): New.
8713 (x_tracepoint_action_download): New.
8714 (l_tracepoint_action_download): New.
8715 (add_tracepoint_action): Install `action->ops' according type.
8716 (download_tracepoint_1): Move code `download' function pointer
8717 of various tracepoint_action_ops.
8718
8719 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8720
8721 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8722 linux_ptrace_attach_warnings.
8723
8724 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8725
8726 * Makefile.in (linux-ptrace.o): New.
8727 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8728 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8729 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8730 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8731 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8732 of these targets.
8733 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8734
8735 2012-03-08 Yao Qi <yao@codesourcery.com>
8736 Pedro Alves <palves@redhat.com>
8737
8738 Fix PR server/13392.
8739 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8740 offset of JMP insn.
8741 * tracepoint.c (remove_tracepoint): New.
8742 (cmd_qtdp): Call remove_tracepoint when failed to install.
8743
8744 2012-03-07 Pedro Alves <palves@redhat.com>
8745
8746 * linux-low.c (get_detach_signal): New.
8747 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8748 Pass on pending signals to PTRACE_DETACH. Check the result of the
8749 ptrace call.
8750 * server.c (program_signals, program_signals_p): New.
8751 (handle_general_set): Handle QProgramSignals.
8752 * server.h (program_signals, program_signals_p): Declare.
8753
8754 2012-03-05 Pedro Alves <palves@redhat.com>
8755 Jan Kratochvil <jan.kratochvil@redhat.com>
8756
8757 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8758 New comment why.
8759
8760 2012-03-03 Yao Qi <yao@codesourcery.com>
8761
8762 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8763 agent_look_up_symbols.
8764
8765 2012-03-03 Yao Qi <yao@codesourcery.com>
8766
8767 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8768 (linux-x86-low.o): Likewise.
8769 * server.h: Remove in_process_agent_loaded.
8770 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8771 common/agent.c.
8772 Update callers.
8773
8774 2012-03-03 Yao Qi <yao@codesourcery.com>
8775
8776 * tracepoint.c (gdb_agent_capability): New global.
8777 (in_process_agent_loaded_ust): Renamed to
8778 `in_process_agent_supports_ust'.
8779 Update callers.
8780 (in_process_agent_supports_ust): Call agent_capability_check.
8781 (clear_installed_tracepoints): Assert that agent supports
8782 agent.
8783
8784 2012-03-03 Yao Qi <yao@codesourcery.com>
8785
8786 * linux-low.c (linux_supports_agent): New.
8787 (linux_target_ops): Initialize field `supports_agent' with
8788 linux_supports_agent.
8789 * target.h (struct target_ops) <supports_agent>: New.
8790 (target_supports_agent): New macro.
8791 * server.c (handle_general_set): Handle packet 'QAgent'.
8792 (handle_query): Send `QAgent+'.
8793 * Makefile.in (server.o): Depends on agent.h.
8794
8795 2012-03-03 Yao Qi <yao@codesourcery.com>
8796
8797 * Makefile.in (OBS): Add agent.o.
8798 Add new rule for agent.o.
8799 Track dependence of tracepoint.c on agent.h.
8800 * tracepoint.c (run_inferior_command_1):
8801 (run_inferior_command): Call agent_run_command.
8802 (gdb_ust_connect_sync_socket): Deleted. Move it to
8803 common/agent.c.
8804 (resume_thread, stop_thread): Likewise.
8805 (gdb_ust_socket_init): Renamed to ...
8806 (gdb_agent_socket_init): ... New.
8807 (gdb_ust_thread): Renamed to ...
8808 (gdb_agent_helper_thread): ... New.
8809 (gdb_ust_init): Move some code to ...
8810 (gdb_agent_init): ... here. New.
8811 [HAVE_UST]: Call gdb_ust_init.
8812 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8813 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8814 * config.in, configure: Regenerated.
8815
8816 2012-03-02 Pedro Alves <palves@redhat.com>
8817
8818 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8819 * linux-low.c (struct simple_pid_list): New.
8820 (stopped_pids): New a struct simple_pid_list pointer.
8821 (add_to_pid_list, pull_pid_from_list): New.
8822 (handle_extended_wait): Don't assume the first signal new children
8823 report is SIGSTOP. Adjust call to pull_pid_from_list.
8824 (linux_wait_for_lwp): Adjust.
8825
8826 2012-03-02 Yao Qi <yao@codesourcery.com>
8827
8828 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8829 debug log.
8830
8831 2012-03-02 Yao Qi <yao@codesourcery.com>
8832
8833 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8834 `stop_pc' and `tpoint'. Update caller.
8835
8836 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8837
8838 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8839 * linux-low.c (use_linux_regsets): New macro.
8840 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8841 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8842 (linux_register_in_regsets): New function.
8843 (usr_fetch_inferior_registers): Skip registers covered by
8844 regsets.
8845 (usr_store_inferior_registers): Likewise.
8846 (usr_fetch_inferior_registers): New macro.
8847 (usr_store_inferior_registers): Likewise.
8848 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8849 (linux_store_registers): Likewise.
8850 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8851 prototype.
8852 (init_registers_mips64_dsp_linux): Likewise.
8853 (init_registers_mips_linux): New macro.
8854 (init_registers_mips_dsp_linux): Likewise.
8855 (mips_dsp_num_regs): Likewise.
8856 (DSP_BASE, DSP_CONTROL): New fallback macros.
8857 (mips_base_regs): New macro.
8858 (mips_regmap): Use it. Fix the size.
8859 (mips_dsp_regmap): New variable.
8860 (mips_dsp_regset_bitmap): Likewise.
8861 (mips_arch_setup): New function.
8862 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8863 than mips_regmap.
8864 (mips_cannot_store_register): Likewise.
8865 (the_low_target): Update .arch_setup, .num_regs and .regmap
8866 initializers. Add .regset_bitmap initializer.
8867 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8868 initializer.
8869 * linux-bfin-low.c (the_low_target): Likewise.
8870 * linux-cris-low.c (the_low_target): Likewise.
8871 * linux-crisv32-low.c (the_low_target): Likewise.
8872 * linux-ia64-low.c (the_low_target): Likewise.
8873 * linux-m32r-low.c (the_low_target): Likewise.
8874 * linux-m68k-low.c (the_low_target): Likewise.
8875 * linux-ppc-low.c (the_low_target): Likewise.
8876 * linux-s390-low.c (the_low_target): Likewise.
8877 * linux-sh-low.c (the_low_target): Likewise.
8878 * linux-sparc-low.c (the_low_target): Likewise.
8879 * linux-tic6x-low.c (the_low_target): Likewise.
8880 * linux-x86-low.c (the_low_target): Likewise.
8881 * linux-xtensa-low.c (the_low_target): Likewise.
8882 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8883 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8884 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8885 srv_xmlfiles.
8886 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8887 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8888
8889 2012-02-29 Yao Qi <yao@codesourcery.com>
8890 Pedro Alves <palves@redhat.com>
8891
8892 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8893 `step_over_finished' is true.
8894
8895 2012-02-27 Pedro Alves <palves@redhat.com>
8896
8897 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8898 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8899
8900 2012-02-27 Pedro Alves <palves@redhat.com>
8901
8902 PR server/9684
8903 * linux-low.c (pid_is_stopped): New.
8904 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8905
8906 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8907
8908 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8909 of conditions.
8910
8911 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8912
8913 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8914
8915 2012-02-24 Luis Machado <lgustavo@codesourcery>
8916
8917 * server.c (handle_query): Advertise support for target-side
8918 breakpoint condition evaluation.
8919 (process_point_options): New function.
8920 (process_serial_event): When inserting a breakpoint, check for
8921 a target-side condition that should be evaluated.
8922
8923 * mem-break.c: Include regcache.h and ax.h.
8924 (point_cond_list_t): New data structure.
8925 (breakpoint) <cond_list>: New field.
8926 (find_gdb_breakpoint_at): Make non-static.
8927 (delete_gdb_breakpoint_at): Clear any target-side
8928 conditions.
8929 (clear_gdb_breakpoint_conditions): New function.
8930 (add_condition_to_breakpoint): Likewise.
8931 (add_breakpoint_condition): Likewise.
8932 (gdb_condition_true_at_breakpoint): Likewise.
8933 (gdb_breakpoint_here): Return result directly instead
8934 of going through a local variable.
8935
8936 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8937 (clear_gdb_breakpoint_conditions): Likewise.
8938 (add_breakpoint_condition): Likewise.
8939 (gdb_condition_true_at_breakpoint): Likewise.
8940
8941 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8942 (need_step_over_p): Take target-side breakpoint condition into
8943 consideration.
8944
8945 2012-02-24 Luis Machado <lgustavo@codesourcery>
8946
8947 * server.h: Include tracepoint.h.
8948 (agent_mem_read, agent_get_trace_state_variable_value,
8949 agent_set_trace_state_variable_value,
8950 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8951 get_set_tsv_func_addr): New prototypes.
8952
8953 * ax.h: New include file.
8954 * ax.c: New source file.
8955
8956 * tracepoint.c: Include ax.h.
8957 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8958 agent_expr, eval_result_type): Move to ax.h.
8959 (parse_agent_expr): Rename to ...
8960 (gdb_parse_agent_expr): ... this, make it non-static and move
8961 to ax.h.
8962 (unparse_agent_expr) Rename to ...
8963 (gdb_unparse_agent_expr): ... this, make it non-static and move
8964 to ax.h.
8965 (eval_agent_expr): Rename to ...
8966 (eval_tracepoint_agent_expr): ... this.
8967 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8968 forward declarations.
8969 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8970 (agent_get_trace_state_variable_value): New function.
8971 (agent_set_trace_state_variable_value): New function.
8972 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8973 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8974 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8975 (condition_true_at_tracepoint): Likewise.
8976 (parse_agent_expr): Rename to ...
8977 (gdb_parse_agent_expr): ... this and move to ax.c.
8978 (unparse_agent_expr): Rename to ...
8979 (gdb_unparse_agent_expr): ... this and move to ax.c.
8980 (gdb_agent_op_name): Move to ax.c.
8981 (eval_agent_expr): Rename to ...
8982 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8983 and move to ax.c.
8984 (eval_tracepoint_agent_expr): New function.
8985 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8986 non-static.
8987 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8988 ax.c.
8989 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8990 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8991 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8992 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8993 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8994 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8995 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8996 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8997 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8998 (compile_bytecodes): Remove forward declaration.
8999 (is_goto_target): Move to ax.c.
9000 (compile_bytecodes): Move to ax.c and call
9001 agent_get_trace_state_variable_value (...) and
9002 agent_set_trace_state_variable_value (...).
9003
9004 * Makefile.in: Update ax.c and IPA dependencies.
9005
9006 2012-02-24 Pedro Alves <palves@redhat.com>
9007
9008 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9009 (cmd_bigqtbuffer_circular): ... this. Only handle
9010 'QTBuffer:circular:'.
9011 (handle_tracepoint_general_set): Adjust.
9012
9013 2012-02-16 Yao Qi <yao@codesourcery.com>
9014
9015 * inferiors.c: Move code to ...
9016 * dll.c: .... here. New.
9017 * server.h: Declare clear_dlls.
9018 * Makefile.in (SFILES): Add dll.c.
9019 (OBS): Add dll.o
9020 (dll.o): New rule.
9021
9022 2012-02-11 Yao Qi <yao@codesourcery.com>
9023
9024 * server.c: (handle_monitor_command): Add a new parameter
9025 `own_buf'.
9026 (handle_query): Update caller.
9027
9028 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9029
9030 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9031 * configure, config.in: Regenerate.
9032 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9033 is not defined.
9034
9035 2012-02-02 Pedro Alves <palves@redhat.com>
9036
9037 Try SIGKILL first, then PTRACE_KILL.
9038 * linux-low.c (linux_kill_one_lwp): New.
9039 (linux_kill_one_lwp): Rename to ...
9040 (kill_one_lwp_callback): ... this. Use the new
9041 linux_kill_one_lwp.
9042
9043 2012-02-02 Pedro Alves <palves@redhat.com>
9044
9045 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9046 inferior.
9047
9048 2012-01-27 Pedro Alves <palves@redhat.com>
9049
9050 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9051 (elf_64_file_p): Make static.
9052 (linux_pid_exe_is_elf_64_file): New.
9053 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9054 Delete declarations.
9055 (linux_pid_exe_is_elf_64_file): Declare.
9056 * linux-x86-low.c (x86_arch_setup): Use
9057 linux_pid_exe_is_elf_64_file.
9058
9059 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9060
9061 * linux-low.c (linux_wait_for_event_1): Rename to ...
9062 (linux_wait_for_event): ... here and merge it with former
9063 linux_wait_for_event - new variable wait_ptid, use it.
9064 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9065
9066 2012-01-23 Pedro Alves <palves@redhat.com>
9067
9068 * server.c (main): Avoid yet another case of infinite loop while
9069 detaching/killing after a longjmp.
9070
9071 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9072
9073 Code cleanup.
9074 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9075
9076 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9077
9078 * hostio.c (handle_readlink): New function.
9079 (handle_vFile): Call it to handle "vFile:readlink" packets.
9080
9081 2012-01-20 Pedro Alves <palves@redhat.com>
9082 Ulrich Weigand <ulrich.weigand@linaro.org>
9083
9084 * server.c (handle_v_requests): Only support vAttach and vRun to
9085 start multiple processes when in extended protocol mode.
9086
9087 2012-01-17 Pedro Alves <palves@redhat.com>
9088
9089 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9090 memalign plus mprotect to allocate the scratch buffer.
9091
9092 2012-01-13 Pedro Alves <palves@redhat.com>
9093
9094 * server.c (attach_inferior): Clear `cont_thread'.
9095
9096 2012-01-13 Pedro Alves <palves@redhat.com>
9097
9098 * server.c (main): Avoid infinite loop while detaching/killing
9099 after a longjmp.
9100
9101 2012-01-09 Doug Evans <dje@google.com>
9102
9103 * server.c (start_inferior): Set last_ptid in --wrapper case.
9104
9105 2012-01-06 Yao Qi <yao@codesourcery.com>
9106
9107 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9108 defined.
9109 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9110
9111 2012-01-04 Yao Qi <yao@codesourcery.com>
9112
9113 * tracepoint.c (cmd_qtdp): Print debug message
9114 for static tracepoint.
9115
9116 2012-01-04 Yao Qi <yao@codesourcery.com>
9117
9118 * tracepoint.c (trace_vdebug): Differentiate debug message
9119 between gdbserver and IPA.
9120
9121 2012-01-03 Yao Qi <yao@codesourcery.com>
9122
9123 * tracepoint.c (tracepoint_was_hit): Don't collect for
9124 static tracepoint.
9125
9126 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9127
9128 * terminal.h: Reformat copyright header.
9129
9130 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9131
9132 * server.c (gdbserver_version): Update copyright year.
9133 * gdbreplay.c (gdbreplay_version): Likewise.
9134
9135 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9136
9137 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9138
9139 Revert:
9140 2011-12-18 Hui Zhu <teawater@gmail.com>
9141 * linux-low.c (linux_create_inferior): Save return value to ret.
9142
9143 2011-12-18 Hui Zhu <teawater@gmail.com>
9144
9145 * linux-low.c (linux_create_inferior): Save return value to ret.
9146
9147 2011-12-16 Doug Evans <dje@google.com>
9148
9149 * linux-low.c (linux_create_inferior): If stdio connection,
9150 redirect stdin from /dev/null, stdout to stderr.
9151 * remote-utils.c (remote_is_stdio): New static global.
9152 (remote_connection_is_stdio): New function.
9153 (remote_prepare): Handle stdio connection.
9154 (remote_open): Ditto.
9155 (remote_close): Don't close stdin for stdio connections.
9156 (read_prim,write_prim): New functions. Replace all calls to
9157 read/write to these.
9158 * server.c (main): Watch for "-" argument. Move call to
9159 remote_prepare before start_inferior.
9160 * server.h (STDIO_CONNECTION_NAME): New macro.
9161 (remote_connection_is_stdio): Declare.
9162
9163 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9164 in debugging output.
9165
9166 2011-12-15 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c: Include sys/syscall.h.
9169 (gdb_ust_thread): Remove preprocessor conditional.
9170
9171 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9172
9173 * linux-low.c (linux_detach_one_lwp): Call
9174 the_low_target.prepare_to_resume before detaching.
9175
9176 2011-12-14 Yao Qi <yao@codesourcery.com>
9177
9178 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9179 of write.
9180
9181 2011-12-14 Yao Qi <yao@codesourcery.com>
9182
9183 * i386-low.c (i386_low_stopped_data_address): Initialize local
9184 variable `control'.
9185
9186 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9187
9188 PR remote/13492
9189
9190 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9191 DR_CONTROL unless necessary. Extend comments.
9192 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9193 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9194
9195 2011-12-13 Yao Qi <yao@codesourcery.com>
9196
9197 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9198 macros.
9199 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9200
9201 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9202
9203 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9204 Print new debug message for such case.
9205
9206 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9207
9208 Fix overlapping memcpy.
9209 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9210 the read_inferior_memory transfer.
9211 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9212 write_inferior_memory transfer.
9213 (set_fast_tracepoint_jump): New variable buf. Use it for the
9214 read_inferior_memory and write_inferior_memory transfers.
9215 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9216 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9217 Use it for the write_inferior_memory transfer.
9218 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9219 buffers.
9220
9221 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9222
9223 * linux-low.c (fetch_register, store_register): Make code
9224 consistent, fix formatting.
9225
9226 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9227
9228 * linux-low.c (usr_store_inferior_registers): Factor out code
9229 to handle individual registers into...
9230 (store_register): ... this new function.
9231
9232 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9233
9234 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9235 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9236 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9237 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9238 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9239 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9240 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9241 (srv_xmlfiles): Add new XML files.
9242
9243 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9244 and <sys/uio.h>.
9245 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9246 (init_registers_s390_linux32v1): Add prototype.
9247 (init_registers_s390_linux32v2): Likewise.
9248 (init_registers_s390_linux64v1): Likewise.
9249 (init_registers_s390_linux64v2): Likewise.
9250 (init_registers_s390x_linux64v1): Likewise.
9251 (init_registers_s390x_linux64v2): Likewise.
9252 (s390_num_regs): Increment to 52.
9253 (s390_regmap): Add orig_r2 register.
9254 (s390_num_regs_3264): Increment to 68.
9255 (s390_regmap_3264): Add orig_r2 register.
9256 (s390_collect_ptrace_register): Handle orig_r2 register.
9257 (s390_supply_ptrace_register): Likewise.
9258 (s390_fill_last_break): New function.
9259 (s390_store_last_break): Likewise.
9260 (s390_fill_system_call): New function.
9261 (s390_store_system_call): Likewise.
9262 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9263 register sets.
9264 (s390_check_regset): New function.
9265 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9266 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9267 Update target_regsets for available register sets.
9268
9269 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9270 Jan Kratochvil <jan.kratochvil@redhat.com>
9271
9272 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9273 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9274 New.
9275 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9276 * linux-low.h (struct process_info_private): New member r_debug.
9277 * server.c (handle_qxfer_libraries): Call
9278 the_target->qxfer_libraries_svr4.
9279 (handle_qxfer_libraries_svr4): New function.
9280 (qxfer_packets): New entry "libraries-svr4".
9281 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9282 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9283 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9284 PACKET_qXfer_libraries_svr4.
9285
9286 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9287
9288 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9289 PSW address/mask between 8-byte and 16-byte formats.
9290 (s390_supply_ptrace_register): Likewise.
9291 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9292 basic addressing mode bit.
9293
9294 2011-11-24 Stan Shebs <stan@codesourcery.com>
9295
9296 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9297
9298 2011-11-17 Stan Shebs <stan@codesourcery.com>
9299
9300 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9301 (tracing_start_time): New global.
9302 (tracing_stop_time): New global.
9303 (tracing_user_name): New global.
9304 (tracing_notes): New global.
9305 (tracing_stop_note): New global.
9306 (cmd_qtstart): Set traceframe_usage, start_time.
9307 (stop_tracing): Set stop_time.
9308 (cmd_qtstatus): Report additional status.
9309 (cmd_qtp): New function.
9310 (handle_tracepoint_query): Call it.
9311 (cmd_qtnotes): New function.
9312 (handle_tracepoint_general_set): Call it.
9313 (get_timestamp): Rename from tsv_get_timestamp.
9314
9315 2011-11-14 Stan Shebs <stan@codesourcery.com>
9316 Kwok Cheung Yeung <kcy@codesourcery.com>
9317
9318 * linux-x86-low.c (small_jump_insn): New.
9319 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9320 trampoline and error message, build a trampoline and issue a small
9321 jump instruction to it.
9322 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9323 trampoline and error message.
9324 (x86_get_min_fast_tracepoint_insn_len): New.
9325 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9326 * linux-low.h (struct linux_target_ops): Add arguments to
9327 install_fast_tracepoint_jump_pad operation, add new operation.
9328 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9329 arguments.
9330 (linux_get_min_fast_tracepoint_insn_len): New function.
9331 (linux_target_op): Add new operation.
9332 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9333 (gdb_trampoline_buffer_end): Ditto.
9334 (gdb_trampoline_buffer_error): Ditto.
9335 (struct ipa_sym_addresses): Add fields for new IPA variables.
9336 (symbol_list): Add entries for new IPA variables.
9337 (struct tracepoint): Add fields to hold the address range of the
9338 trampoline used by the tracepoint.
9339 (trampoline_buffer_head): New static variable.
9340 (trampoline_buffer_tail): Ditto.
9341 (claim_trampoline_space): New function.
9342 (have_fast_tracepoint_trampoline_buffer): New function.
9343 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9344 structure.
9345 (install_fast_tracepoint): Ditto, also add error buffer argument.
9346 (cmd_qtminftpilen): New function.
9347 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9348 (fast_tracepoint_from_trampoline_address): New function.
9349 (fast_tracepoint_collecting): Handle trampoline as part of jump
9350 pad space.
9351 (set_trampoline_buffer_space): New function.
9352 (initialize_tracepoint): Initialize new IPA variables.
9353 * target.h (struct target_ops): Add arguments to
9354 install_fast_tracepoint_jump_pad operation, add new
9355 get_min_fast_tracepoint_insn_len operation.
9356 (target_get_min_fast_tracepoint_insn_len): New.
9357 (install_fast_tracepoint_jump_pad): Add arguments.
9358 * server.h (IPA_BUFSIZ): Define.
9359 * linux-i386-ipa.c: Include extra header files.
9360 (initialize_fast_tracepoint_trampoline_buffer): New function.
9361 (initialize_low_tracepoint): Call it.
9362 * server.h (set_trampoline_buffer_space): Declare.
9363 (claim_trampoline_space): Ditto.
9364 (have_fast_tracepoint_trampoline_buffer): Ditto.
9365
9366 2011-11-14 Yao Qi <yao@codesourcery.com>
9367
9368 * server.c (handle_query): Handle InstallInTrace for qSupported.
9369 * tracepoint.c (add_tracepoint): Sort list.
9370 (install_tracepoint, download_tracepoint): New.
9371 (cmd_qtdp): Call them to install and download tracepoints.
9372 (sort_tracepoints): Removed.
9373 (cmd_qtstart): Update.
9374
9375 2011-11-14 Yao Qi <yao@codesourcery.com>
9376
9377 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9378 * mem-break.h: Declare.
9379 * tracepoint.c (cmd_qtstart): Move some code to ...
9380 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9381 New.
9382 (download_tracepoints): Move some code to ...
9383 (download_tracepoint_1): ... here. New.
9384
9385 2011-11-08 Yao Qi <yao@codesourcery.com>
9386
9387 * remote-utils.c (relocate_instruction): A comment fix.
9388
9389 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9390
9391 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9392 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9393 dr_status_mirror and dr_control_mirror from debug_reg_state.
9394 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9395 (i386_initial_stuff): Remove use of deleted globals.
9396 (i386_get_thread_context, i386_set_thread_context,
9397 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9398 from debug_reg_state.
9399
9400 2011-11-05 Yao Qi <yao@codesourcery.com>
9401
9402 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9403 address as TPOINT's.
9404
9405 2011-11-02 Stan Shebs <stan@codesourcery.com>
9406
9407 * tracepoint.c (agent_mem_read_string): New function.
9408 (eval_agent_expr): Call it for tracenz.
9409 * server.c (handle_query): Report support for tracenz.
9410
9411 2011-11-02 Yao Qi <yao@codesourcery.com>
9412
9413 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9414
9415 2011-11-02 Yao Qi <yao@codesourcery.com>
9416
9417 * target.h: Fix a typo in comment.
9418
9419 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9420
9421 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9422 clobber the breakpoints' shadows with fast tracepoint jumps.
9423 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9424 * target.c (write_inferior_memory): Also pass MYADDR down to
9425 check_mem_write.
9426
9427 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9428
9429 * configure.ac: Check support for personality routine.
9430 * configure: Regenerate.
9431 * config.in: Likewise.
9432 * linux-low.c: Include <sys/personality.h>.
9433 Define ADDR_NO_RANDOMIZE if necessary.
9434 (linux_create_inferior): Disable address space randomization when
9435 forking inferior, if requested.
9436 (linux_supports_disable_randomization): New function.
9437 (linux_target_ops): Install it.
9438 * server.h (disable_randomization): Declare.
9439 * server.c (disable_randomization): New global variable.
9440 (handle_general_set): Handle QDisableRandomization.
9441 (handle_query): Likewise for qSupported.
9442 (main): Support --disable-randomization and --no-disable-randomization
9443 command line arguments.
9444 * target.h (struct target_ops): Add supports_disable_randomization.
9445 (target_supports_disable_randomization): New macro.
9446
9447 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9448
9449 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9450 ifdef check.
9451 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9452 [!PT_GETDSBT] (target_loadmap): New definition.
9453 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9454 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9455 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9456 and PT_GETDSBT to LINUX_LOADMAP.
9457 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9458 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9459
9460 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9461
9462 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9463 (arm_linux_hwbp_cap): New static variable.
9464 (arm_linux_get_hwbp_cap): Replace by ...
9465 (arm_linux_init_hwbp_cap): ... this new function.
9466 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9467 (arm_linux_get_hw_watchpoint_count): Likewise.
9468 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9469 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9470 (arm_prepare_to_resume): Use perror_with_name instead of error.
9471
9472 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9473
9474 * linux-arm-low.c: Include <signal.h>.
9475 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9476 (struct arm_linux_hwbp_cap): New data type.
9477 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9478 (struct arm_linux_hw_breakpoint): New data type.
9479 (MAX_BPTS, MAX_WPTS): Define.
9480 (struct arch_process_info, struct arch_lwp_info): New data types.
9481 (arm_linux_get_hwbp_cap): New function.
9482 (arm_linux_get_hw_breakpoint_count): Likewise.
9483 (arm_linux_get_hw_watchpoint_count): Likewise.
9484 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9485 (arm_hwbp_control_initialize): Likewise.
9486 (arm_hwbp_control_is_enabled): Likewise.
9487 (arm_hwbp_control_is_initialized): Likewise.
9488 (arm_hwbp_control_disable): Likewise.
9489 (arm_linux_hw_breakpoint_equal): Likewise.
9490 (arm_linux_hw_point_initialize): Likewise.
9491 (struct update_registers_data): New data structure.
9492 (update_registers_callback: New function.
9493 (arm_insert_point): Likewise.
9494 (arm_remove_point): Likewise.
9495 (arm_stopped_by_watchpoint): Likewise.
9496 (arm_stopped_data_address): Likewise.
9497 (arm_new_process): Likewise.
9498 (arm_new_thread): Likewise.
9499 (arm_prepare_to_resume): Likewise.
9500 (the_low_target): Register arm_insert_point, arm_remove_point,
9501 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9502 arm_new_thread, and arm_prepare_to_resume.
9503
9504 2011-09-15 Stan Shebs <stan@codesourcery.com>
9505
9506 * server.h (struct emit_ops): Add compare-goto fields.
9507 * tracepoint.c (gdb_agent_op_sizes): New table.
9508 (emit_eq_goto): New function.
9509 (emit_ne_goto): New function.
9510 (emit_lt_goto): New function.
9511 (emit_le_goto): New function.
9512 (emit_gt_goto): New function.
9513 (emit_ge_goto): New function.
9514 (is_goto_target): New function.
9515 (compile_bytecodes): Recognize special cases of compare-goto
9516 combinations and call specialized emitters for them.
9517 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9518 (amd64_emit_ne_goto): New function.
9519 (amd64_emit_lt_goto): New function.
9520 (amd64_emit_le_goto): New function.
9521 (amd64_emit_gt_goto): New function.
9522 (amd64_emit_ge_goto): New function.
9523 (amd64_emit_ops): Add the new functions.
9524 (i386_emit_eq_goto): New function.
9525 (i386_emit_ne_goto): New function.
9526 (i386_emit_lt_goto): New function.
9527 (i386_emit_le_goto): New function.
9528 (i386_emit_gt_goto): New function.
9529 (i386_emit_ge_goto): New function.
9530 (i386_emit_ops): Add the new functions.
9531
9532 2011-09-08 Stan Shebs <stan@codesourcery.com>
9533
9534 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9535 (i386_emit_epilogue): Restore %ebx.
9536
9537 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9538
9539 * server.c (step_thread): Remove definition.
9540 (process_serial_event): Don't handle Hs.
9541 * server.h (step_thread): Remove declaration.
9542 * target.c (set_desired_inferior): Remove use of step_thread.
9543
9544 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9545
9546 * linux-low.c: Include linux-procfs.h.
9547 (linux_attach_lwp_1): Update comments.
9548 (linux_attach): Scan for existing threads when attaching to a
9549 process that is the tgid.
9550 * Makefile.in: Update dependencies.
9551
9552 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9553
9554 * configure.srv: Add linux-procfs.o dependencies.
9555
9556 2011-08-14 Yao Qi <yao@codesourcery.com>
9557
9558 * target.h (struct target_ops): Fix indent.
9559 * win32-low.c (win32_target_ops): Fix comment.
9560
9561 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9562 Yao Qi <yao@codesourcery.com>
9563
9564 * Makefile.in (clean): Remove tic6x-*.c files.
9565 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9566 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9567 (tic6x-c64xp-linux.c): Likewise.
9568 * configure.srv: Add support for tic6x-*-uclinux.
9569 * linux-tic6x-low.c: New.
9570 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9571
9572 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9573 Yao Qi <yao@codesourcery.com>
9574
9575 * target.h (struct target_ops): Add read_loadmap.
9576 * linux-low.c (struct target_loadseg): New type.
9577 (struct target_loadmap): New type.
9578 (linux_read_loadmap): New function.
9579 (linux_target_ops): Add linux_read_loadmap.
9580 * server.c (handle_query): Support qXfer:fdpic:read packet.
9581 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9582 to NULL.
9583
9584 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9585
9586 * win32-low.c: Include <stdint.h>.
9587
9588 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9589
9590 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9591 to the inferior here.
9592 (i386_remove_aligned_watchpoint): Ditto.
9593 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9594 fit part of the watchpoint in the debug registers.
9595 (i386_update_inferior_debug_regs): New.
9596 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9597 registers, and only update the inferior on success.
9598 (i386_low_remove_watchpoint): Ditto.
9599
9600 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9601
9602 * linux-low.c (compare_ints, unique, list_threads, show_process,
9603 linux_core_of_thread): Delete.
9604 (linux_target_ops): Change linux_core_of_thread to
9605 linux_common_core_of_thread.
9606 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9607 * utils.c (malloc_failure): Change type of argument.
9608 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9609 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9610 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9611 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9612 (IPA_OBJS): Add common-utils-ipa.o.
9613 (ptid_h, linux_osdata_h): New macros.
9614 (server_h): Add common/common-utils.h, common/xml-utils.h,
9615 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9616 common/ptid.h.
9617 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9618 ptid.o, buffer.o): New rules.
9619 (linux-low.o): Add common/linux-osdata.h as a dependency.
9620 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9621 * configure.ac: Add AC_HEADER_DIRENT check.
9622 * config.in: Regenerate.
9623 * configure: Regenerate.
9624 * remote-utils.c (xml_escape_text): Delete.
9625 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9626 buffer_xml_printf): Move to common/buffer.c.
9627 * server.c (main): Remove call to initialize_inferiors.
9628 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9629 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9630 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9631 internal_error, gdb_assert, gdb_assert_fail): Delete.
9632 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9633 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9634 common/buffer.h.
9635 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9636 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9637 initialize_inferiors): Delete.
9638
9639 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9640
9641 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9642 symbol error.
9643
9644 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9645
9646 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9647 assertion.
9648 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9649
9650 2011-05-26 Yao Qi <yao@codesourcery.com>
9651
9652 * Makefile.in (thread-db.o): Track dependence to
9653 common/gdb_thread_db.h.
9654 * thread-db.c: include gdb_thread_db.h from right place.
9655
9656 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9657
9658 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9659 __FILE__ and __LINE__ to internal_error.
9660
9661 2011-05-13 Doug Evans <dje@google.com>
9662
9663 * thread-db.c (try_thread_db_load_from_sdir): New function.
9664 (try_thread_db_load_from_dir): New function.
9665 (thread_db_load_search): Handle $sdir, ignore $pdir.
9666 Remove trying of system directories if search of
9667 libthread-db-search-path fails, that is now done via $sdir.
9668
9669 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9670
9671 * server.c (handle_query): Add EnableDisableTracepoints to the list
9672 of supported features.
9673 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9674 tracepoints.
9675 (cmd_qtenable_disable): New.
9676 (cmd_qtstart): Install tracepoints even if disabled.
9677 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9678 receiving a QTEnable or QTDisable packet.
9679 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9680 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9681 tracepoints.
9682 (gdb_probe): Skip data collection if static tracepoint is disabled.
9683
9684 2011-05-10 Doug Evans <dje@google.com>
9685
9686 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9687
9688 2011-05-04 Doug Evans <dje@google.com>
9689
9690 * linux-low.c (linux_join): Skip process lookup.
9691 * spu-low.c (spu_join): Ditto.
9692 * server.c (join_inferiors_callback): Delete.
9693 (process_serial_event): For 'D' packet (detach) call join_inferior
9694 directly.
9695
9696 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9697
9698 * README: Don't mention xscale*-*-linux*.
9699 * configure.srv (xscale*-*-linux*): Don't handle target.
9700
9701 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9702
9703 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9704 casting pointers.
9705 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9706 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9707 (i386_emit_void_call_2): Likewise.
9708
9709 2011-04-26 Yao Qi <yao@codesourcery.com>
9710
9711 * linux-low.c: Move common macros to linux-ptrace.h.
9712 Include linux-ptrace.h.
9713 * Makefile.in (linux_ptrace_h): New.
9714 (linux-low.o): Depends on linux-ptrace.h.
9715
9716 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9717
9718 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9719 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9720 (remote_prepare): New function with most of the TCP code from ...
9721 (remote_open): ... here. Detect PORT here unconditionally. Move also
9722 setting transport_is_reliable.
9723 * server.c (run_once): New variable.
9724 (gdbserver_usage): Document it.
9725 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9726 the first run if RUN_ONCE.
9727 * server.h (run_once, remote_prepare): New declarations.
9728
9729 2011-04-19 Tom Tromey <tromey@redhat.com>
9730
9731 * win32-low.c (handle_load_dll): Remove duplicate "the".
9732
9733 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9734
9735 Remove support for old Cygwin 1.5 versions.
9736 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9737 function to avoid warning.
9738 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9739 warning.
9740
9741 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9742
9743 * gdbserver/server.h (Macro _): Define it if not available.
9744
9745 2011-03-14 Michael Snyder <msnyder@vmware.com>
9746
9747 * hostio.c (handle_close): Remove unnecessary null test.
9748
9749 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9750
9751 * Makefile.in (maintainer-clean realclean distclean): Remove
9752 "make ... subdir_do" command.
9753
9754 2011-03-10 Michael Snyder <msnyder@vmware.com>
9755
9756 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9757
9758 * server.c (handle_v_run): Free alloced buffer on early return.
9759
9760 2011-03-09 Yao Qi <yao@codesourcery.com>
9761
9762 Revert:
9763 2011-03-04 Yao Qi <yao@codesourcery.com>
9764
9765 * Makefile.in: Remove GNU make feature --directory.
9766
9767 2011-03-05 Yao Qi <yao@codesourcery.com>
9768
9769 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9770 (subdir_do): New make target. Copied from gdb/Makefile.
9771 (maintainer-clean, realclean, distclean, clean): Call corresponding
9772 make targets in common/Makefile.
9773
9774 2011-02-11 Yao Qi <yao@codesourcery.com>
9775
9776 * configure.ac: Call AC_PROG_RANLIB.
9777 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9778 * configure: Regenerate.
9779
9780 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9781
9782 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9783
9784 2011-03-06 Yao Qi <yao@codesourcery.com>
9785
9786 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9787
9788 2011-03-05 Yao Qi <yao@codesourcery.com>
9789
9790 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9791 (subdir_do): New make target. Copied from gdb/Makefile.
9792 (maintainer-clean, realclean, distclean, clean): Call corresponding
9793 make targets in common/Makefile.
9794
9795 2011-03-04 Yao Qi <yao@codesourcery.com>
9796
9797 * Makefile.in: Remove GNU make feature --directory.
9798
9799 2011-03-04 Michael Snyder <msnyder@vmware.com>
9800
9801 * server.c (queue_stop_reply): Call xmalloc not malloc.
9802
9803 2011-03-02 Michael Snyder <msnyder@vmware.com>
9804
9805 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9806
9807 2011-02-28 Michael Snyder <msnyder@vmware.com>
9808
9809 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9810 (cmd_qtframe): Ditto.
9811 (cmd_qtbuffer): Ditto.
9812 (cmd_bigqtbuffer): Ditto.
9813
9814 * utils.c (decimal2str): Initialize 'width' to nine, then
9815 don't mess with it.
9816
9817 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9818
9819 * hostio.c (require_data): Free *data, not data.
9820
9821 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9822
9823 * hostio.c (require_data): Use free, not xfree.
9824
9825 2011-02-27 Michael Snyder <msnyder@vmware.com>
9826
9827 * server.c (handle_query): Discard unused value.
9828
9829 * hostio.c (require_data): Free malloc memory before returning
9830 error.
9831
9832 2011-02-26 Michael Snyder <msnyder@vmware.com>
9833
9834 * linux-low.c (list_threads): Call closedir for dirent.
9835
9836 2011-02-27 Michael Snyder <msnyder@vmware.com>
9837
9838 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9839 a case statement falls through.
9840
9841 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9842
9843 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9844 in comparison.
9845
9846 2011-02-26 Michael Snyder <msnyder@vmware.com>
9847
9848 * utils.c (decimal2str): Eliminate dead code and dead param.
9849 (pulongest): Drop dead param from call to decimal2str.
9850 (plongest): Ditto.
9851
9852 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9853
9854 Revert the following patch (not approved yet):
9855 2011-02-21 Hui Zhu <teawater@gmail.com>
9856 * tracepoint.c (tp_printf): New function.
9857 (eval_agent_expr): Handle gdb_agent_op_printf.
9858
9859 2011-02-21 Hui Zhu <teawater@gmail.com>
9860
9861 * tracepoint.c (tp_printf): New function.
9862 (eval_agent_expr): Handle gdb_agent_op_printf.
9863
9864 2011-02-18 Tom Tromey <tromey@redhat.com>
9865
9866 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9867 (tracepoint.o): Likewise.
9868 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9869 (gdb_agent_op_names): Likewise.
9870
9871 2011-02-18 Tom Tromey <tromey@redhat.com>
9872
9873 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9874 gdb_agent_op_rot>: New constants.
9875 (gdb_agent_op_names): Add pick and roll.
9876 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9877 cases.
9878
9879 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9880
9881 * aclocal.m4: Regenerated with aclocal-1.11.1.
9882
9883 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9884
9885 * server.c (handle_qxfer_traceframe_info): New.
9886 (qxfer_packets): Register "traceframe-info".
9887 (handle_query): Report support for qXfer:traceframe-info:read+.
9888 * tracepoint.c (match_blocktype): New.
9889 (traceframe_find_block_type): Rename to ...
9890 (traceframe_walk_blocks): ... this. Add callback filter argument,
9891 and use it.
9892 (traceframe_find_block_type): New, reimplemented on top of
9893 traceframe_walk_blocks.
9894 (build_traceframe_info_xml): New.
9895 (traceframe_read_info): New.
9896 * server.h (traceframe_read_info): Declare.
9897
9898 2011-02-11 Yao Qi <yao@codesourcery.com>
9899
9900 * configure.ac: Call AC_PROG_RANLIB.
9901 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9902 * configure: Regenerate.
9903
9904 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9905
9906 * server.c (gdb_read_memory): Change return semantics to allow
9907 partial transfers.
9908 (handle_search_memory_1): Adjust.
9909 (process_serial_event) <'m' packet>: Handle partial transfers.
9910 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9911
9912 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9913
9914 * regcache.c (init_register_cache): Initialize
9915 regcache->register_status.
9916 (free_register_cache): Release regcache->register_status.
9917 (regcache_cpy): Copy register_status.
9918 (registers_to_string): Print 'x's for unavailable registers.
9919 (supply_register): Mark the register's status valid or
9920 unavailable, depending on whether a buffer was passed in or not.
9921 (supply_register_zeroed): New.
9922 (supply_regblock): Mark the registers' status valid or
9923 unavailable, depending on whether a buffer was passed in or not.
9924 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9925 (struct regcache): New `register_status' field.
9926 (supply_register_zeroed): Declare.
9927 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9928 supply_register_zeroed, rather than passing a NULL buffer to
9929 supply_register.
9930 * tracepoint.c (fetch_traceframe_registers): Update comment.
9931
9932 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9933
9934 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9935 buffer explicit.
9936
9937 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9938
9939 * server.h (decode_xfer_write): Change prototype.
9940 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9941 and don't extract the annex here.
9942 * server.c (decode_xfer_read): Remove `annex' parameter,
9943 and don't extract the annex here.
9944 (decode_xfer): New.
9945 (struct qxfer): New.
9946 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9947 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9948 (handle_qxfer_statictrace): New functions, abstracted out from
9949 handle_query, and made to use the struct qxfer interface.
9950 (handle_threads_qxfer_proper): Rename to ...
9951 (handle_qxfer_threads_proper): ... this.
9952 (handle_threads_qxfer): Rename to ...
9953 (handle_qxfer_threads): ... this. Adjust.
9954 (qxfer_packets): New array.
9955 (handle_qxfer): New function.
9956 (handle_query): Use handle_qxfer.
9957
9958 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9959
9960 * gdbreplay.c: Shorten lines of >= 80 columns.
9961 * linux-low.c: Ditto.
9962 * linux-ppc-low.c: Ditto.
9963 * linux-s390-low.c: Ditto.
9964 * linux-sparc-low.c: Ditto.
9965 * linux-x86-low.c: Ditto.
9966 * linux-xtensa-low.c: Ditto.
9967 * mem-break.c: Ditto.
9968 * nto-low.c: Ditto.
9969 * regcache.h: Ditto.
9970 * remote-utils.c: Ditto.
9971 * server.c: Ditto.
9972 * server.h: Ditto.
9973 * thread-db.c: Ditto.
9974 * tracepoint.c: Ditto.
9975 * utils.c: Ditto.
9976 * win32-low.h: Ditto.
9977
9978 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9979
9980 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9981 update.
9982
9983 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9984
9985 * server.c (gdbserver_version): Update copyright year in version
9986 output.
9987 * gdbreplay.c (gdbreplay_version): Ditto.
9988
9989 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9990
9991 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9992 * linux-bfin-low.c: New file.
9993 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9994 PT_DATA_ADDR for BFIN targets.
9995 * Makefile.in (SFILES): Add linux-bfin-low.c.
9996 (clean): Remove reg-bfin.c.
9997 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9998 * README: Mention supported Blackfin targets.
9999
10000 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10001
10002 * .gitignore: New file.
10003
10004 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10005
10006 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10007
10008 2010-10-22 Jie Zhang <jie@codesourcery.com>
10009
10010 * Makefile.in: Add FLAGS_TO_PASS variable.
10011 (install): Remove dependency of install-only and recursively
10012 invoke make for install-only.
10013
10014 2010-10-04 Doug Evans <dje@google.com>
10015
10016 * Makefile.in (uninstall): Use $(DESTDIR).
10017
10018 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10019
10020 PR gdb/11842
10021
10022 * linux-x86-low.c (compat_siginfo_from_siginfo)
10023 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10024 si_code is < 0. Check for si_code == SI_TIMER before checking for
10025 si_code < 0.
10026
10027 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10028
10029 * lynx-i386-low.c: New file.
10030 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10031
10032 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10033
10034 * lynx-low.c (ptrace_request_to_str): Remove handling for
10035 request values that have been removed in LynxOS 5.x.
10036
10037 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10038
10039 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10040 <ptrace.h>
10041
10042 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10043
10044 * configure.ac: Add --enable-inprocess-agent option.
10045 * configure: Rebuilt.
10046
10047 2010-09-06 Yao Qi <yao@codesourcery.com>
10048
10049 * linux-low.c (linux_kill): Remove unused variable.
10050 (linux_stabilize_threads): Likewise.
10051 * server.c (start_inferior): Likewise.
10052 (queue_stop_reply_callback): Likewise.
10053 * tracepoint.c (do_action_at_tracepoint): Likewise.
10054
10055 2010-09-06 Yao Qi <yao@codesourcery.com>
10056
10057 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10058 on return.
10059
10060 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10061
10062 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10063
10064 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10065
10066 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10067 "$(IPA_DEPFILES)".
10068
10069 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10070
10071 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10072 gdbserver/lynx-ppc-low.c: New files.
10073 * Makefile.in (lynx_low_h): New variable.
10074 (lynx-low.o, lynx-ppc-low.o): New rules.
10075 * configure.ac: On LynxOS, link with -lnetinet.
10076 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10077 * configure: regenerate.
10078
10079 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10080
10081 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10082 * configure.ac: Add check for vasprintf and vsnprintf.
10083 * configure, config.in: Regenerate.
10084 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10085
10086 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10087
10088 * gdbreplay.c: Move include of alloca.h up, next to include of
10089 malloc.h.
10090 * server.h: Add include of malloc.h.
10091 * mem-break.c: Remove include of malloc.h.
10092 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10093
10094 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10095
10096 * Makefile.in (memmem.o): Build with -Wno-error.
10097
10098 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10099
10100 * utils.c (xsnprintf): Make non-static.
10101 * server.h: Add xsnprintf declaration.
10102 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10103 replace calls to snprintf by calls to xsnprintf throughout.
10104
10105 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10106
10107 * configure.ac: Add configure check for alloca.
10108 * configure, config.in: Regenerate.
10109 * server.h: Include alloca.h if it exists.
10110 * gdbreplay.c: Include alloca.h if it exists.
10111
10112 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10113
10114 * linux-low.c (__SIGRTMIN): Define if not already defined.
10115 (linux_create_inferior): Check for __ANDROID__ rather than
10116 __SIGRTMIN.
10117 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10118 are already deferred.
10119 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10120 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10121 stopped and already has a pending signal to report.
10122 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10123 a pending signal to report or is moving out of a jump pad.
10124 (linux_init_signals): Check for __ANDROID__ rather than
10125 __SIGRTMIN.
10126
10127 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10128
10129 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10130 debug_threads check. Avoid a linear search when not doing debug
10131 output.
10132
10133 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10134
10135 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10136 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10137 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10138 (process_event): Change local fd's type to gdb_fildes_t.
10139 (create_file_handler): Adjust prototype.
10140 (delete_file_handler): Adjust prototype.
10141 (handle_file_event): Adjust prototype. Use pfildes.
10142 (create_file_event): Adjsut prototype.
10143 * remote-utils.c (remote_desc, listen_desc): Change type to
10144 gdb_fildes_t.
10145 * server.h: New gdb_fildes_t typedef.
10146 [USE_WIN32API]: Include winsock2.h.
10147 (delete_file_handler, add_file_handler): Adjust prototypes.
10148 (pfildes): Declare.
10149 * utils.c (pfildes): New.
10150
10151 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10152
10153 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10154 * configure: Regenerate.
10155
10156 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10157
10158 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10159 (linux_done_accessing_memory): ... this.
10160 (linux_target_ops): Adjust.
10161 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10162 * nto-low.c (nto_target_ops): Adjust comment.
10163 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10164 * spu-low.c (spu_target_ops): Adjust comment.
10165 * target.h (target_ops): Rename unprepare_to_access_memory field
10166 to done_accessing_memory.
10167 (unprepare_to_access_memory): Rename to ...
10168 (done_accessing_memory): ... this.
10169
10170 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10171
10172 * linux-low.c (linux_prepare_to_access_memory): New.
10173 (linux_unprepare_to_access_memory): New.
10174 (linux_target_ops): Install them.
10175 * server.c (read_memory): Rename to ...
10176 (gdb_read_memory): ... this. Use
10177 prepare_to_access_memory/prepare_to_access_memory.
10178 (write_memory): Rename to ...
10179 (gdb_write_memory): ... this. Use
10180 prepare_to_access_memory/prepare_to_access_memory.
10181 (handle_search_memory_1): Adjust.
10182 (process_serial_event): Adjust.
10183 * target.h (struct target_ops): New fields
10184 prepare_to_access_memory and unprepare_to_access_memory.
10185 (prepare_to_access_memory, unprepare_to_access_memory): New.
10186 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10187 prepare_to_access_memory/prepare_to_access_memory.
10188 * nto-low.c (nto_target_ops): Adjust.
10189 * spu-low.c (spu_target_ops): Adjust.
10190 * win32-low.c (win32_target_ops): Adjust.
10191
10192 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10193
10194 * Makefile.in (WARN_CFLAGS): Get it from configure.
10195 (WERROR_CFLAGS): New.
10196 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10197 * configure.ac: Introduce --enable-werror, which adds -Werror to
10198 the compiler command line. Enabled by default. Disable with
10199 --disable-werror. Add -Wdeclaration-after-statement
10200 Wpointer-arith and -Wformat-nonliteral to warning flags.
10201 * configure: Regenerate.
10202
10203 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10204
10205 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10206
10207 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10208
10209 * gdbreplay.c (remote_error): New.
10210 (gdbchar): New.
10211 (expect): Use gdbchar. Check for error reading from GDB.
10212 Clarify sync error output.
10213 (play): Check for errors writing to GDB.
10214 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10215 * remote-utils.c (getpkt): Check for errors writing to the remote
10216 descriptor.
10217
10218 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10219
10220 * linux-low.c (linux_wait_1): Move non-debugging code out of
10221 `debug_threads' control.
10222
10223 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10224
10225 * linux-low.c (linux_wait_1): Don't set last_status here.
10226 * server.c (push_event, queue_stop_reply_callback): Assert we're
10227 not pushing a TARGET_WAITKIND_IGNORE event.
10228 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10229 (myresume, handle_target_event): Set the thread's last_resume_kind
10230 and last_status from the target returned status.
10231
10232 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10233
10234 PR threads/10729
10235
10236 * linux-x86-low.c (update_debug_registers_callback): New.
10237 (i386_dr_low_set_addr): Use it.
10238 (i386_dr_low_get_addr): New.
10239 (i386_dr_low_set_control): Use update_debug_registers_callback.
10240 (i386_dr_low_get_control): New.
10241 (i386_dr_low_get_status): Adjust.
10242 * linux-low.c (linux_stop_lwp): New.
10243 * linux-low.h (linux_stop_lwp): Declare.
10244
10245 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10246 argument instead of a i386_debug_reg_state.
10247 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10248 a i386_debug_reg_state.
10249 (i386_insert_aligned_watchpoint): Adjust.
10250 (i386_remove_aligned_watchpoint): Adjust.
10251 (i386_low_stopped_data_address): Read the debug registers from the
10252 inferior instead of from the mirrors.
10253 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10254 (i386_dr_low_get_addr): Declare.
10255 (i386_dr_low_get_control): Declare.
10256 (i386_dr_low_get_status): Change prototype.
10257
10258 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10259 (i386_dr_low_get_addr): New.
10260 (i386_dr_low_get_control): New.
10261 (i386_dr_low_get_status): Adjust prototype. Return
10262 dr_status_mirror.
10263 (i386_initial_stuff): Clear dr_status_mirror and
10264 dr_control_mirror.
10265 (i386_get_thread_context): Adjust.
10266 (i386_set_thread_context): Adjust.
10267 (i386_thread_added): Adjust.
10268
10269 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10270
10271 * linux-low.h (linux_thread_area): Delete declaration.
10272
10273 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10274
10275 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10276 after its termination.
10277
10278 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10279
10280 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10281 (gdb_wants_all_stopped): Delete.
10282 (linux_wait_1): Don't call them.
10283 * server.c (handle_v_cont): Tag all threads as want-stopped.
10284 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10285 stopped as "client-wants-stopped".
10286
10287 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10288
10289 * Makefile.in (signals_h): New.
10290 (server_h): Depend on it.
10291 (server.o): Don't depend on $(signals_def).
10292 (signals.o): Depend on $(signals_def).
10293
10294 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10295
10296 * Makefile.in (signals_def): New.
10297 (server_h): Append include/gdb/signals.h and signals_def.
10298 (server.o): Append signals_def.
10299
10300 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10301
10302 * server.c (handle_target_event): Use target_signal_to_host for
10303 resume_info.sig initialization.
10304 * target.h (struct thread_resume) <sig>: New comment.
10305
10306 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10307
10308 * server.c (handle_query): strcpy() the returned string from paddress()
10309 instead of sprintf().
10310 * utils.c (paddress): Return phex_nz().
10311
10312 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10313
10314 * server.c (handle_v_cont): Call mourn_inferior if process
10315 just exited.
10316 (myresume): Likewise.
10317
10318 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10319
10320 Static tracepoints, and integration with UST.
10321
10322 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10323 * mem-break.c (uninsert_all_breakpoints)
10324 (reinsert_all_breakpoints): New.
10325 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10326 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10327 (gdb_agent_ust_loaded, helper_thread_id)
10328 (gdb_agent_helper_thread_id): New macros.
10329 (struct ipa_sym_addresses): Add addr_ust_loaded,
10330 addr_helper_thread_id, addr_cmd_buf.
10331 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10332 (in_process_agent_loaded_ust): New.
10333 (write_e_ust_not_loaded): New.
10334 (maybe_write_ipa_ust_not_loaded): New.
10335 (struct collect_static_trace_data_action): New.
10336 (enum tracepoint_type) <static_tracepoint>: New.
10337 (struct tracepoint) <handle>: Mention static tracepoints.
10338 (struct static_tracepoint_ctx): New.
10339 (CMD_BUF_SIZE): New.
10340 (add_tracepoint_action): Handle static tracepoint actions.
10341 (unprobe_marker_at): New.
10342 (clear_installed_tracepoints): Handle static tracepoints.
10343 (cmd_qtdp): Handle static tracepoints.
10344 (probe_marker_at): New.
10345 (cmd_qtstart): Handle static tracepoints.
10346 (response_tracepoint): Handle static tracepoints.
10347 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10348 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10349 (get_context_regcache): Handle static tracepoints.
10350 (do_action_at_tracepoint): Handle static tracepoint actions.
10351 (traceframe_find_block_type): Handle static trace data blocks.
10352 (traceframe_read_sdata): New.
10353 (download_tracepoints): Download static tracepoint actions.
10354 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10355 (GDB_PROBE_NAME): New.
10356 (ust_ops): New.
10357 (GET_UST_SYM): New.
10358 (USTF): New.
10359 (dlsym_ust): New.
10360 (ust_marker_to_static_tracepoint): New.
10361 (gdb_probe): New.
10362 (collect_ust_data_at_tracepoint): New.
10363 (gdb_ust_probe): New.
10364 (UNIX_PATH_MAX, SOCK_DIR): New.
10365 (gdb_ust_connect_sync_socket): New.
10366 (resume_thread, stop_thread): New.
10367 (run_inferior_command): New.
10368 (init_named_socket): New.
10369 (gdb_ust_socket_init): New.
10370 (cstr_to_hexstr): New.
10371 (next_st): New.
10372 (first_marker, next_marker): New.
10373 (response_ust_marker): New.
10374 (cmd_qtfstm, cmd_qtsstm): New.
10375 (unprobe_marker_at, probe_marker_at): New.
10376 (cmd_qtstmat, gdb_ust_thread): New.
10377 (gdb_ust_init): New.
10378 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10379 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10380 (ST_REGENTRY): New.
10381 (x86_64_st_collect_regmap): New.
10382 (X86_64_NUM_ST_COLLECT_GREGS): New.
10383 (AMD64_RIP_REGNUM): New.
10384 (supply_static_tracepoint_registers): New.
10385 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10386 (ST_REGENTRY): New.
10387 (i386_st_collect_regmap): New.
10388 (i386_NUM_ST_COLLECT_GREGS): New.
10389 (supply_static_tracepoint_registers): New.
10390 * server.c (handle_query): Handle qXfer:statictrace:read.
10391 <qSupported>: Report support for StaticTracepoints, and
10392 qXfer:statictrace:read features.
10393 * server.h (traceframe_read_sdata)
10394 (supply_static_tracepoint_registers): Declare.
10395 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10396 (unpack_varlen_hex): Include in IPA build.
10397 * Makefile.in (ustlibs, ustinc): New.
10398 (IPA_OBJS): Add remote-utils-ipa.o.
10399 ($(IPA_LIB)): Link -ldl and -lpthread.
10400 (UST_CFLAGS): New.
10401 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10402 * config.in, configure: Regenerate.
10403
10404 2010-06-20 Ian Lance Taylor <iant@google.com>
10405 Pedro Alves <pedro@codesourcery.com>
10406
10407 * linux-x86-low.c (always_true): Delete.
10408 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10409 trying to fool the compiler with always_true.
10410
10411 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10412
10413 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10414 conditions in gdbserver.
10415
10416 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10417
10418 * spu-low.c (spu_read_memory): Wrap around local store limit.
10419 (spu_write_memory): Likewise.
10420
10421 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10422
10423 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10424 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10425 LONGEST uses.
10426 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10427 uses.
10428 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10429 uses with LONGEST uses.
10430
10431 2010-06-14 Stan Shebs <stan@codesourcery.com>
10432 Pedro Alves <pedro@codesourcery.com>
10433
10434 Bytecode compiler.
10435
10436 * linux-x86-low.c: Include limits.h.
10437 (add_insns): New.
10438 (always_true): New.
10439 (EMIT_ASM): New.
10440 (EMIT_ASM32): New.
10441 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10442 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10443 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10444 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10445 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10446 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10447 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10448 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10449 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10450 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10451 (amd64_emit_void_call_2): New.
10452 (amd64_emit_ops): New.
10453 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10454 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10455 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10456 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10457 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10458 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10459 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10460 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10461 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10462 (i386_emit_stack_adjust, i386_emit_int_call_1)
10463 (i386_emit_void_call_2): New.
10464 (i386_emit_ops): New.
10465 (x86_emit_ops): New.
10466 (the_low_target): Install x86_emit_ops.
10467 * server.h (struct emit_ops): New.
10468 (get_raw_reg_func_addr): Declare.
10469 (current_insn_ptr, emit_error): Declare.
10470 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10471 (set_trace_state_variable_value): New defines.
10472 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10473 addr_get_trace_state_variable_value and
10474 addr_set_trace_state_variable_value.
10475 (symbol_list): New fields for get_raw_reg,
10476 get_trace_state_variable_value and set_trace_state_variable_value.
10477 (condfn): New typedef.
10478 (struct tracepoint): New field `compiled_cond'.
10479 (do_action_at_tracepoint): Clear compiled_cond.
10480 (get_trace_state_variable_value, set_trace_state_variable_value):
10481 Export in the IPA.
10482 (condition_true_at_tracepoint): If there's a compiled condition,
10483 run that.
10484 (current_insn_ptr, emit_error): New globals.
10485 (struct bytecode_address): New.
10486 (get_raw_reg_func_addr): New.
10487 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10488 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10489 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10490 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10491 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10492 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10493 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10494 (compile_tracepoint_condition, compile_bytecodes): New.
10495 * target.h (emit_ops): Forward declare.
10496 (struct target_ops): New field emit_ops.
10497 (target_emit_ops): New.
10498 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10499 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10500 * linux-low.c (linux_emit_ops): New.
10501 (linux_target_ops): Install it.
10502 * linux-low.h (struct linux_target_ops): New field emit_ops.
10503
10504 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10505
10506 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10507 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10508
10509 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10510 Stan Shebs <stan@codesourcery.com>
10511
10512 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10513 (all): Depend on $(extra_libraries).
10514 (install-only): Install the IPA.
10515 (IPA_OBJS, IPA_LIB): New.
10516 (clean): Remove the IPA lib.
10517 (IPAGENT_CFLAGS): New.
10518 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10519 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10520 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10521 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10522 * configure.ac: Check for atomic builtins support in the compiler.
10523 (IPA_DEPFILES, extra_libraries): Define.
10524 * configure.srv (ipa_obj): Add description.
10525 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10526 (i[34567]86-*-linux*): Set ipa_obj.
10527 (x86_64-*-linux*): Set ipa_obj.
10528 * linux-low.c (stabilizing_threads): New.
10529 (supports_fast_tracepoints): New.
10530 (linux_detach): Stabilize threads before detaching.
10531 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10532 the lwp is either not stabilizing, or is moving out of a jump pad.
10533 (linux_fast_tracepoint_collecting): New.
10534 (maybe_move_out_of_jump_pad): New.
10535 (enqueue_one_deferred_signal): New.
10536 (dequeue_one_deferred_signal): New.
10537 (linux_wait_for_event_1): If moving out of a jump pad, defer
10538 pending signals to later.
10539 (linux_stabilize_threads): New.
10540 (linux_wait_1): Check if threads need moving out of jump pads, and
10541 do it if so.
10542 (stuck_in_jump_pad_callback): New.
10543 (move_out_of_jump_pad_callback): New.
10544 (lwp_running): New.
10545 (linux_resume_one_lwp): Handle moving out of jump pads.
10546 (linux_set_resume_request): Dequeue deferred signals.
10547 (need_step_over_p): Also step over fast tracepoint jumps.
10548 (start_step_over): Also uninsert fast tracepoint jumps.
10549 (finish_step_over): Also reinsert fast tracepoint jumps.
10550 (linux_install_fast_tracepoint_jump): New.
10551 (linux_target_ops): Install linux_stabilize_threads and
10552 linux_install_fast_tracepoint_jump_pad.
10553 * linux-low.h (linux_target_ops) <get_thread_area,
10554 install_fast_tracepoint_jump_pad>: New fields.
10555 (struct lwp_info) <collecting_fast_tracepoint,
10556 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10557 (linux_get_thread_area): Declare.
10558 * linux-x86-low.c (jump_insn): New.
10559 (x86_get_thread_area): New.
10560 (append_insns): New.
10561 (push_opcode): New.
10562 (amd64_install_fast_tracepoint_jump_pad): New.
10563 (i386_install_fast_tracepoint_jump_pad): New.
10564 (x86_install_fast_tracepoint_jump_pad): New.
10565 (the_low_target): Install x86_get_thread_area and
10566 x86_install_fast_tracepoint_jump_pad.
10567 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10568 (struct fast_tracepoint_jump): New.
10569 (fast_tracepoint_jump_insn): New.
10570 (fast_tracepoint_jump_shadow): New.
10571 (find_fast_tracepoint_jump_at): New.
10572 (fast_tracepoint_jump_here): New.
10573 (delete_fast_tracepoint_jump): New.
10574 (set_fast_tracepoint_jump): New.
10575 (uninsert_fast_tracepoint_jumps_at): New.
10576 (reinsert_fast_tracepoint_jumps_at): New.
10577 (set_breakpoint_at): Use write_inferior_memory.
10578 (uninsert_raw_breakpoint): Use write_inferior_memory.
10579 (check_mem_read): Mask out fast tracepoint jumps.
10580 (check_mem_write): Mask out fast tracepoint jumps.
10581 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10582 (set_fast_tracepoint_jump): Declare.
10583 (delete_fast_tracepoint_jump)
10584 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10585 (reinsert_fast_tracepoint_jumps_at): Declare.
10586 * regcache.c: Don't compile many functions when building the
10587 in-process agent library.
10588 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10589 the register buffer in the heap.
10590 (free_register_cache): If the register buffer isn't owned by the
10591 regcache, don't free it.
10592 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10593 pre-existing register caches.
10594 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10595 type.
10596 (convert_ascii_to_int): : Constify `from' parameter type.
10597 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10598 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10599 the needed buffer in-place.
10600 (relocate_instruction): New.
10601 * server.c (handle_query) <qSymbols>: If the target supports
10602 tracepoints, give it a chance of looking up symbols. Report
10603 support for fast tracepoints.
10604 (handle_status): Stabilize threads.
10605 (process_serial_event): Adjust.
10606 * server.h (struct fast_tracepoint_jump): Forward declare.
10607 (struct process_info) <fast_tracepoint_jumps>: New field.
10608 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10609 (decode_X_packet, decode_M_packet): Adjust.
10610 (relocate_instruction): Declare.
10611 (in_process_agent_loaded): Declare.
10612 (tracepoint_look_up_symbols): Declare.
10613 (struct fast_tpoint_collect_status): Declare.
10614 (fast_tracepoint_collecting): Declare.
10615 (force_unlock_trace_buffer): Declare.
10616 (handle_tracepoint_bkpts): Declare.
10617 (initialize_low_tracepoint)
10618 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10619 * target.h (struct target_ops) <stabilize_threads,
10620 install_fast_tracepoint_jump_pad>: New fields.
10621 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10622 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10623 [HAVE_STDINT_H]: Include stdint.h.
10624 (trace_debug_1): Rename to ...
10625 (trace_vdebug): ... this.
10626 (trace_debug): Rename to ...
10627 (trace_debug_1): ... this. Add `level' parameter.
10628 (trace_debug): New.
10629 (ATTR_USED, ATTR_NOINLINE): New.
10630 (IP_AGENT_EXPORT): New.
10631 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10632 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10633 (about_to_request_buffer_space, trace_buffer_is_full)
10634 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10635 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10636 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10637 (traceframe_write_count, traceframes_created)
10638 (trace_state_variables)
10639 New renaming defines.
10640 (struct ipa_sym_addresses): New.
10641 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10642 (symbol_list): New.
10643 (ipa_sym_addrs): New.
10644 (all_tracepoint_symbols_looked_up): New.
10645 (in_process_agent_loaded): New.
10646 (write_e_ipa_not_loaded): New.
10647 (maybe_write_ipa_not_loaded): New.
10648 (tracepoint_look_up_symbols): New.
10649 (debug_threads) [IN_PROCESS_AGENT]: New.
10650 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10651 (UNKNOWN_SIDE_EFFECTS): New.
10652 (stop_tracing): New.
10653 (flush_trace_buffer): New.
10654 (stop_tracing_bkpt): New.
10655 (flush_trace_buffer_bkpt): New.
10656 (read_inferior_integer): New.
10657 (read_inferior_uinteger): New.
10658 (read_inferior_data_pointer): New.
10659 (write_inferior_data_pointer): New.
10660 (write_inferior_integer): New.
10661 (write_inferior_uinteger): New.
10662 (struct collect_static_trace_data_action): Delete.
10663 (enum tracepoint_type): New.
10664 (struct tracepoint) <type>: New field `type'.
10665 <actions_str, step_actions, step_actions_str>: Only include in
10666 GDBserver.
10667 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10668 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10669 (tracepoints): Use IP_AGENT_EXPORT.
10670 (last_tracepoint): Don't include in the IPA.
10671 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10672 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10673 (alloced_trace_state_variables): New.
10674 (trace_state_variables): Use IP_AGENT_EXPORT.
10675 (traceframe_t): Delete unused variable.
10676 (circular_trace_buffer): Don't include in the IPA.
10677 (trace_buffer_start): Delete.
10678 (struct trace_buffer_control): New.
10679 (trace_buffer_free): Delete.
10680 (struct ipa_trace_buffer_control): New.
10681 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10682 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10683 New.
10684 (trace_buffer_ctrl): New.
10685 (TRACE_BUFFER_CTRL_CURR): New.
10686 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10687 Reimplement as macros.
10688 (trace_buffer_wrap): Delete.
10689 (traceframe_write_count, traceframe_read_count)
10690 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10691 (struct tracepoint_hit_ctx) <type>: New field.
10692 (struct fast_tracepoint_ctx): New.
10693 (memory_barrier): New.
10694 (cmpxchg): New.
10695 (record_tracepoint_error): Update atomically in the IPA.
10696 (clear_inferior_trace_buffer): New.
10697 (about_to_request_buffer_space): New.
10698 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10699 updating the same buffer.
10700 (add_tracepoint): Default the tracepoint's type to trap
10701 tracepoint, and orig_size to -1.
10702 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10703 internal variables.
10704 (create_trace_state_variable): New parameter `gdb'. Handle it.
10705 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10706 (cmd_qtdp): Handle fast tracepoints.
10707 (cmd_qtdv): Adjust.
10708 (max_jump_pad_size): New.
10709 (gdb_jump_pad_head): New.
10710 (get_jump_space_head): New.
10711 (claim_jump_space): New.
10712 (sort_tracepoints): New.
10713 (MAX_JUMP_SIZE): New.
10714 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10715 IPA.
10716 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10717 support. Upload fast traceframes, and delete internal IPA
10718 breakpoints.
10719 (stop_tracing_handler): New.
10720 (flush_trace_buffer_handler): New.
10721 (cmd_qtstop): Upload fast tracepoints.
10722 (response_tracepoint): Handle fast tracepoints.
10723 (tracepoint_finished_step): Upload fast traceframes. Set the
10724 tracepoint hit context's tracepoint type.
10725 (handle_tracepoint_bkpts): New.
10726 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10727 type. Add comment about fast tracepoints.
10728 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10729 non-existing action_str field.
10730 (get_context_regcache): Handle fast tracepoints.
10731 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10732 to the regcache.
10733 (fast_tracepoint_from_jump_pad_address): New.
10734 (fast_tracepoint_from_ipa_tpoint_address): New.
10735 (collecting_t): New.
10736 (force_unlock_trace_buffer): New.
10737 (fast_tracepoint_collecting): New.
10738 (collecting): New.
10739 (gdb_collect): New.
10740 (write_inferior_data_ptr): New.
10741 (target_tp_heap): New.
10742 (target_malloc): New.
10743 (download_agent_expr): New.
10744 (UALIGN): New.
10745 (download_tracepoints): New.
10746 (download_trace_state_variables): New.
10747 (upload_fast_traceframes): New.
10748 (IPA_FIRST_TRACEFRAME): New.
10749 (IPA_NEXT_TRACEFRAME_1): New.
10750 (IPA_NEXT_TRACEFRAME): New.
10751 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10752 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10753 (gdb_jump_pad_buffer_end): New.
10754 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10755 (initialize_tracepoint): Adjust.
10756 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10757 buffer. Initialize the low module.
10758 * utils.c (PREFIX, TOOLNAME): New.
10759 (malloc_failure): Use PREFIX.
10760 (error): In the IPA, an error causes an exit.
10761 (fatal, warning): Use PREFIX.
10762 (internal_error): Use TOOLNAME.
10763 (NUMCELLS): Increase to 10.
10764 * configure, config.in: Regenerate.
10765
10766 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10767
10768 * server.c (handle_query) <qSupported>: Do two passes over the
10769 qSupported string to avoid nesting strtok.
10770
10771 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10772
10773 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10774 (CDEPS): New.
10775 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10776 -Wl,--dynamic-list.
10777 * configure: Regenerate.
10778 * proc-service.list: New.
10779
10780 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10781
10782 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10783 New comment.
10784
10785 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10786
10787 * gdbreplay.c (remote_open): Check error return from socket() call by
10788 its equality to -1 not by it being negative.
10789 * remote-utils.c (remote_open): Likewise.
10790
10791 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10792
10793 * config.h: Regenerate.
10794
10795 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10796
10797 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10798 doesn't provide PTRACE_GET_THREAD_AREA.
10799
10800 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10801
10802 * linux-m68k-low.c: Include <asm/ptrace.h>
10803 (ps_get_thread_area): Implement.
10804
10805 2010-05-03 Doug Evans <dje@google.com>
10806
10807 * event-loop.c (struct callback_event): New struct.
10808 (callback_list): New global.
10809 (append_callback_event, delete_callback_event): New functions.
10810 (process_callback): New function.
10811 (start_event_loop): Call it.
10812 * remote-utils.c (NOT_SCHEDULED): Define.
10813 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10814 moved out of readchar.
10815 (readchar): Rewrite. Call reschedule before returning.
10816 (reset_readchar): New function.
10817 (remote_close): Call it.
10818 (process_remaining, reschedule): New functions.
10819 * server.h (callback_handler_func): New typedef.
10820 (append_callback_event, delete_callback_event): Declare.
10821
10822 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10823
10824 * proc-service.c (ps_pglobal_lookup): Use
10825 thread_db_look_up_one_symbol.
10826 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10827 parameter. Use it instead of all_symbols_looked_up.
10828 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10829 field.
10830 (all_symbols_looked_up): Don't declare.
10831 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10832 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10833 field.
10834 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10835 Set all_symbols_looked_up here.
10836 (thread_db_look_up_one_symbol): New.
10837 (thread_db_get_tls_address): Adjust.
10838 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10839 thread_db object on the heap, and tentatively set it in the
10840 process structure.
10841 (thread_db_init): Don't set all_symbols_looked_up here.
10842 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10843
10844 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10845
10846 * linux-low.c (linux_kill, linux_detach): Adjust.
10847 (status_pending_p_callback): Remove redundant statement. Check
10848 for !TARGET_WAITIKIND_IGNORE, instead of
10849 TARGET_WAITKIND_STOPPED.
10850 (handle_tracepoints): Make sure LWP is locked. Adjust.
10851 (linux_wait_for_event_1): Adjust.
10852 (linux_cancel_breakpoints): New.
10853 (unsuspend_one_lwp): New.
10854 (unsuspend_all_lwps): New.
10855 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10856 (send_sigstop_callback): Change return type to int, add new
10857 `except' parameter and handle it.
10858 (suspend_and_send_sigstop_callback): New.
10859 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10860 pass them down. If SUSPEND, also increment the lwp's suspend
10861 count.
10862 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10863 (need_step_over_p): Don't consider suspended LWPs.
10864 (start_step_over): Adjust.
10865 (proceed_one_lwp): Change return type to int, add new `except'
10866 parameter and handle it.
10867 (unsuspend_and_proceed_one_lwp): New.
10868 (proceed_all_lwps): Use find_inferior instead of
10869 for_each_inferior.
10870 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10871 also decrement the suspend count of LWPs. Pass `except' down,
10872 instead of hacking its suspend count.
10873 (linux_pause_all): Add `freeze' parameter. Adjust.
10874 (linux_unpause_all): New.
10875 (linux_target_ops): Install linux_unpause_all.
10876 * server.c (handle_status): Adjust.
10877 * target.h (struct target_ops): New fields `unpause_all' and
10878 `cancel_breakpoints'. Add new parameter to `pause_all'.
10879 (pause_all): Add new `freeze' parameter.
10880 (unpause_all): New.
10881 (cancel_breakpoints): New.
10882 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10883 cancel breakpoints.
10884 (cmd_qtstart): Pause threads.
10885 (stop_tracing): Pause threads, and cancel breakpoints.
10886 * win32-low.c (win32_target_ops): Adjust.
10887
10888 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10889
10890 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10891 the inferior right away from here...
10892 (linux_wait_1): ... to here, and adjust to check the thread's
10893 last_resume_kind instead of the lwp's step or stop_expected flags.
10894
10895 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10896
10897 * README: Use consistent `GDB' and `GDBserver' spellings.
10898
10899 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10900
10901 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10902 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10903 (linux_detach_one_lwp): Assume the lwp is stopped.
10904 (any_thread_of): Delete.
10905 (linux_detach): Stop all lwps here. Don't blindly delete all
10906 breakpoints.
10907 (delete_lwp_callback): New.
10908 (linux_mourn): Delete all lwps of the process that is gone.
10909 (linux_wait_1): Don't delete the last lwp of the process here.
10910 * mem-break.h (mark_breakpoints_out): Declare.
10911 * mem-break.c (mark_breakpoints_out): New.
10912 (free_all_breakpoints): Use it.
10913 * server.c (handle_target_event): If the process is gone, mark
10914 breakpoints out.
10915 * thread-db.c (struct thread_db) <create_bp>: New field.
10916 (thread_db_enable_reporting): Fix prototype. Store a thread event
10917 breakpoint reference in the thread_db struct.
10918 (thread_db_load_search): Clear the thread_db object.
10919 (try_thread_db_load_1): Ditto.
10920 (switch_to_process): New.
10921 (disable_thread_event_reporting): Use it.
10922 (remove_thread_event_breakpoints): New.
10923 (thread_db_detach, thread_db_mourn): Use it.
10924
10925 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10926
10927 * linux-low.c (linux_enable_event_reporting): New.
10928 (linux_wait_for_event_1, handle_extended_wait): Use it.
10929
10930 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10931
10932 * linux-low.c (linux_kill_one_lwp, linux_kill)
10933 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10934 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10935 SIGSTOP even if the LWP is stopped.
10936 (send_sigstop_callback): New.
10937 (stop_all_lwps): Use send_sigstop_callback instead.
10938 (linux_resume_one_thread): Adjust.
10939 (proceed_one_lwp): Still proceed an LWP that the client has
10940 requested to stop, if we haven't reported it as stopped yet. Make
10941 sure that LWPs the client want stopped, have a pending SIGSTOP.
10942
10943 2010-04-26 Doug Evans <dje@google.com>
10944
10945 * server.c (handle_general_set): Make static.
10946
10947 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10948 Print received char after testing for error/eof instead of before.
10949 (input_interrupt): Tweak comment.
10950
10951 2010-04-23 Doug Evans <dje@google.com>
10952
10953 * server.c (start_inferior): Print inferior argv if --debug.
10954
10955 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10956
10957 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10958 * nto-x86-low.c: Include server.h
10959
10960 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10961
10962 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10963 be consistent with other sources of this directory.
10964 (init_registers_amd64): Correct name of source file of this function
10965 in the comment.
10966
10967 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10968
10969 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10970 64-bit executables.
10971
10972 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10973
10974 * win32-i386-low.c: Add 64-bit support.
10975 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10976 (init_registers_amd64): Declare.
10977 (mappings): Add 64-bit version of array.
10978 (init_windows_x86): New function.
10979 (the_low_target): Change init_arch field to init_windows_x86.
10980
10981 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10982
10983 * win32-low.c: Adapt to support also 64-bit architecture.
10984 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10985 (get_image_name): Use SIZE_T type for local variable `done'.
10986 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10987 (toolhelp_get_dll_name): Idem.
10988 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10989 Use uintptr_t typecast to avoid warning.
10990 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10991 (handle_exception): Use phex_nz to avoid warning.
10992 (win32_wait): Remove unused local variable `process'.
10993
10994 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10995
10996 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10997 `amd64-avx.o'.
10998
10999 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11000
11001 * configure.ac: Use `ws2_32' library for srv_mingw.
11002 * configure: Regenerate.
11003 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11004 * remote-utils.c: Likewise.
11005
11006 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11007
11008 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11009 if __x86_64__ is defined.
11010
11011 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11012
11013 * configure: Regenerate.
11014
11015 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11016
11017 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11018 * target.h (target_ops): New get_tib_address field.
11019 * win32-low.h (win32_thread_info): Add thread_local_base field.
11020 * win32-low.c (child_add_thread): Add tlb argument.
11021 Set thread_local_base field to TLB.
11022 (get_child_debug_event): Adapt to child_add_thread change.
11023 (win32_get_tib_address): New function.
11024 (win32_target_ops): Set get_tib_address field to
11025 win32_get_tib_address.
11026 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11027
11028 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11029
11030 * linux-low.c (linux_mourn): Also remove the process.
11031 * server.c (handle_target_event): Don't remove the process here.
11032 * nto-low.c (nto_mourn): New.
11033 (nto_target_ops): Install it.
11034 * spu-low.c (spu_mourn): New.
11035 (spu_target_ops): Install it.
11036 * win32-low.c (win32_mourn): New.
11037 (win32_target_ops): Install it.
11038
11039 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11040
11041 * server.h (buffer_xml_printf): Remove redundant `;'.
11042
11043 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11044
11045 * regcache.c (set_register_cache): Invalidate regcaches before
11046 changing the register cache layout.
11047 (regcache_invalidate_one): Allow a NULL regcache.
11048 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11049 regcaches before changing the register cache layout or the target
11050 regsets.
11051
11052 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11053
11054 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11055 variable warning on Linux/x86-64.
11056
11057 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11058
11059 GDBserver disconnected tracing support.
11060
11061 * linux-low.c (linux_remove_process): Delete.
11062 (add_lwp): Don't set last_resume_kind here.
11063 (linux_kill): Use `mourn'.
11064 (linux_detach): Use `thread_db_detach', and `mourn'.
11065 (linux_mourn): New.
11066 (linux_attach_lwp_1): Adjust comment.
11067 (linux_attach): last_resume_kind moved the thread_info; adjust.
11068 (status_pending_p_callback): Adjust.
11069 (linux_wait_for_event_1): Adjust.
11070 (count_events_callback, select_singlestep_lwp_callback)
11071 (select_event_lwp_callback, cancel_breakpoints_callback)
11072 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11073 (proceed_one_lwp): Adjust.
11074 (linux_async): Add debug output.
11075 (linux_thread_stopped): New.
11076 (linux_pause_all): New.
11077 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11078 linux_pause_all.
11079 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11080 (thread_db_free): Delete declaration.
11081 (thread_db_detach, thread_db_mourn): Declare.
11082 * thread-db.c (thread_db_init): Use thread_db_mourn.
11083 (thread_db_free): Delete, split in two.
11084 (disable_thread_event_reporting): New.
11085 (thread_db_detach): New.
11086 (thread_db_mourn): New.
11087
11088 * server.h (struct thread_info) <last_resume_kind>: New field.
11089 <attached>: Add comment.
11090 <gdb_detached>: New field.
11091 (handler_func): Change return type to int.
11092 (handle_serial_event, handle_target_event): Ditto.
11093 (gdb_connected): Declare.
11094 (tracing): Delete.
11095 (disconnected_tracing): Declare.
11096 (stop_tracing): Declare.
11097
11098 * server.c (handle_query) <qSupported>: Report support for
11099 disconnected tracing.
11100 (queue_stop_reply_callback): Account for running threads.
11101 (gdb_wants_thread_stopped): New.
11102 (gdb_wants_all_threads_stopped): New.
11103 (gdb_reattached_process): New.
11104 (handle_status): Clear the `gdb_detached' flag of all processes.
11105 In all-stop, stop all threads.
11106 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11107 (process_serial_event): If the remote connection breaks, or if an
11108 exit was forced with "monitor exit", force an event loop exit.
11109 Handle disconnected tracing on detach.
11110 (handle_serial_event): Adjust.
11111 (handle_target_event): If GDB isn't connected, forward events back
11112 to the inferior, unless the last process exited, in which case,
11113 exit gdbserver. Adjust interface.
11114
11115 * remote-utils.c (remote_open): Don't block in accept. Instead
11116 register an event loop source on the listen socket file
11117 descriptor. Refactor bits into ...
11118 (listen_desc): ... this new global.
11119 (gdb_connected): ... this new function.
11120 (enable_async_notification): ... this new function.
11121 (handle_accept_event): ... this new function.
11122 (remote_close): Clear remote_desc.
11123
11124 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11125
11126 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11127 New fields.
11128 (mourn_inferior): Define.
11129 (target_process_qsupported): Avoid the dangling else problem.
11130 (thread_stopped): Define.
11131 (pause_all): Define.
11132 (target_waitstatus_to_string): Declare.
11133 * target.c (target_waitstatus_to_string): New.
11134
11135 * tracepoint.c (tracing): Make extern.
11136 (disconnected_tracing): New.
11137 (stop_tracing): Make extern. Handle tracing stops due to GDB
11138 disconnecting.
11139 (cmd_qtdisconnected): New.
11140 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11141 (handle_tracepoint_general_set): Handle QTDisconnected.
11142
11143 * event-loop.c (event_handler_func): Change return type to int.
11144 (process_event): Bail out if the event handler wants the event
11145 loop to stop.
11146 (handle_file_event): Ditto.
11147 (start_event_loop): Bail out if the event handler wants the event
11148 loop to stop.
11149
11150 * nto-low.c (nto_target_ops): Adjust.
11151 * spu-low.c (spu_wait): Don't remove the process here.
11152 (spu_target_ops): Adjust.
11153 * win32-low.c (win32_wait): Don't remove the process here.
11154 (win32_target_ops): Adjust.
11155
11156 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11157
11158 * regcache.c (realloc_register_cache): Invalidate inferior's
11159 regcache before recreating it.
11160
11161 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11162
11163 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11164
11165 2010-04-09 Stan Shebs <stan@codesourcery.com>
11166 Pedro Alves <pedro@codesourcery.com>
11167
11168 * server.h (LONGEST): New.
11169 (struct thread_info) <while_stepping>: New field.
11170 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11171 Declare.
11172 (initialize_tracepoint, handle_tracepoint_general_set)
11173 (handle_tracepoint_query, tracepoint_finished_step)
11174 (tracepoint_was_hit, release_while_stepping_state_list):
11175 (current_traceframe): Declare.
11176 * server.c (handle_general_set): Handle tracepoint packets.
11177 (read_memory): New.
11178 (write_memory): New.
11179 (handle_search_memory_1): Use read_memory.
11180 (handle_query): Report support for conditional tracepoints, trace
11181 state variables, and tracepoint sources. Handle tracepoint
11182 queries.
11183 (main): Initialize the tracepoints module.
11184 (process_serial_event): Handle traceframe reads/writes.
11185
11186 * linux-low.c (handle_tracepoints): New.
11187 (linux_wait_1): Call it.
11188 (linux_resume_one_lwp): Handle while-stepping.
11189 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11190 (linux_target_ops): Install them.
11191 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11192 New field.
11193 * linux-x86-low.c (x86_supports_tracepoints): New.
11194 (the_low_target). Install it.
11195
11196 * mem-break.h (delete_breakpoint): Declare.
11197 * mem-break.c (delete_breakpoint): Make external.
11198
11199 * target.h (struct target_ops): Add `supports_tracepoints',
11200 `read_pc', and `write_pc' fields.
11201 (target_supports_tracepoints): Define.
11202 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11203 (phex_nz): New.
11204
11205 * regcache.h (struct regcache) <registers_owned>: New field.
11206 (init_register_cache, regcache_cpy): Declare.
11207 (regcache_read_pc, regcache_write_pc): Declare.
11208 (register_cache_size): Declare.
11209 (supply_regblock): Declare.
11210 * regcache.c (init_register_cache): New.
11211 (new_register_cache): Use it.
11212 (regcache_cpy): New.
11213 (register_cache_size): New.
11214 (supply_regblock): New.
11215 (regcache_read_pc, regcache_write_pc): New.
11216
11217 * tracepoint.c: New.
11218
11219 * Makefile.in (OBS): Add tracepoint.o.
11220 (tracepoint.o): New rule.
11221
11222 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11223
11224 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11225 (i386-mmx.o): New.
11226 (i386-mmx.c): Likewise.
11227 (i386-mmx-linux.o): Likewise.
11228 (i386-mmx-linux.c): Likewise.
11229
11230 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11231 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11232 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11233 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11234
11235 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11236 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11237 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11238
11239 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11240
11241 * Makefile.in (clean): Updated.
11242 (i386-avx.o): New.
11243 (i386-avx.c): Likewise.
11244 (i386-avx-linux.o): Likewise.
11245 (i386-avx-linux.c): Likewise.
11246 (amd64-avx.o): Likewise.
11247 (amd64-avx.c): Likewise.
11248 (amd64-avx-linux.o): Likewise.
11249 (amd64-avx-linux.c): Likewise.
11250
11251 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11252 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11253 (srv_amd64_regobj): Add amd64-avx.o.
11254 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11255 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11256 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11257 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11258 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11259 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11260 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11261
11262 * i387-fp.c: Include "i386-xstate.h".
11263 (i387_xsave): New.
11264 (i387_cache_to_xsave): Likewise.
11265 (i387_xsave_to_cache): Likewise.
11266 (x86_xcr0): Likewise.
11267
11268 * i387-fp.h (i387_cache_to_xsave): Likewise.
11269 (i387_xsave_to_cache): Likewise.
11270 (x86_xcr0): Likewise.
11271
11272 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11273 * linux-crisv32-low.c (target_regsets): Likewise.
11274 * linux-m68k-low.c (target_regsets): Likewise.
11275 * linux-mips-low.c (target_regsets): Likewise.
11276 * linux-ppc-low.c (target_regsets): Likewise.
11277 * linux-s390-low.c (target_regsets): Likewise.
11278 * linux-sh-low.c (target_regsets): Likewise.
11279 * linux-sparc-low.c (target_regsets): Likewise.
11280 * linux-xtensa-low.c (target_regsets): Likewise.
11281
11282 * linux-low.c: Include <sys/uio.h>.
11283 (regsets_fetch_inferior_registers): Support nt_type.
11284 (regsets_store_inferior_registers): Likewise.
11285 (linux_process_qsupported): New.
11286 (linux_target_ops): Add linux_process_qsupported.
11287
11288 * linux-low.h (regset_info): Add nt_type.
11289 (linux_target_ops): Add process_qsupported.
11290
11291 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11292 and <sys/uio.h>.
11293 (init_registers_i386_avx_linux): New.
11294 (init_registers_amd64_avx_linux): Likewise.
11295 (xmltarget_i386_linux_no_xml): Likewise.
11296 (xmltarget_amd64_linux_no_xml): Likewise.
11297 (PTRACE_GETREGSET): Likewise.
11298 (PTRACE_SETREGSET): Likewise.
11299 (x86_fill_xstateregset): Likewise.
11300 (x86_store_xstateregset): Likewise.
11301 (use_xml): Likewise.
11302 (x86_linux_update_xmltarget): Likewise.
11303 (x86_linux_process_qsupported): Likewise.
11304 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11305 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11306 init_registers_i386_linux here. Call
11307 x86_linux_update_xmltarget.
11308 (the_low_target): Add x86_linux_process_qsupported.
11309
11310 * server.c (handle_query): Call target_process_qsupported.
11311
11312 * target.h (target_ops): Add process_qsupported.
11313 (target_process_qsupported): New.
11314
11315 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11316
11317 * inferiors.c (add_thread): Set last_status kind to
11318 TARGET_WAITKIND_IGNORE.
11319 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11320 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11321 (linux_wait_1): Move `thread' local definition to block that uses
11322 it. Don't NULL initialize `event_child'.
11323 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11324 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11325 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11326
11327 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11328
11329 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11330 an extended waitstatus, or by a watchpoint.
11331 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11332 thread was stepping or has been stopped by a watchpoint.
11333
11334 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11335
11336 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11337 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11338 of another, then delete the previous, and validate all
11339 breakpoints.
11340 (validate_inserted_breakpoint): New.
11341 (delete_disabled_breakpoints): New.
11342 (validate_breakpoints): New.
11343 (check_mem_read): Validate breakpoints before trusting their
11344 shadow. Delete disabled breakpoints.
11345 (check_mem_write): Validate breakpoints before trusting they
11346 should be inserted. Delete disabled breakpoints.
11347 * mem-break.h (validate_breakpoints):
11348 * server.c (handle_query): Validate breakpoints when we see a
11349 qSymbol query.
11350
11351 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11352
11353 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11354 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11355 if we could tell there's a GDB breakpoint at stop_pc.
11356 (need_step_over_p): Don't do a step over if we find a GDB
11357 breakpoint at the resume PC.
11358
11359 * mem-break.c (struct raw_breakpoint): New.
11360 (enum bkpt_type): New type `gdb_breakpoint'.
11361 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11362 fields. New field `raw'.
11363 (find_raw_breakpoint_at): New.
11364 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11365 breakpoint instead.
11366 (set_breakpoint_at): Adjust.
11367 (delete_raw_breakpoint): New.
11368 (release_breakpoint): New.
11369 (delete_breakpoint): Rename to...
11370 (delete_breakpoint_1): ... this. Add proc parameter. Use
11371 release_breakpoint. Return ENOENT.
11372 (delete_breakpoint): Reimplement.
11373 (find_breakpoint_at): Delete.
11374 (find_gdb_breakpoint_at): New.
11375 (delete_breakpoint_at): Delete.
11376 (set_gdb_breakpoint_at): New.
11377 (delete_gdb_breakpoint_at): New.
11378 (gdb_breakpoint_here): New.
11379 (set_reinsert_breakpoint): Use release_breakpoint.
11380 (uninsert_breakpoint): Rename to ...
11381 (uninsert_raw_breakpoint): ... this.
11382 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11383 (reinsert_raw_breakpoint): Change parameter type to
11384 raw_breakpoint.
11385 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11386 instead.
11387 (check_breakpoints): Adjust. Use release_breakpoint.
11388 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11389 (breakpoint_inserted_here): Ditto.
11390 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11391 Don't trust the breakpoint's shadow if it is not inserted.
11392 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11393 (delete_all_breakpoints): Adjust.
11394 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11395 use delete_breakpoint_1.
11396
11397 * mem-break.h (breakpoints_supported): Delete declaration.
11398 (set_gdb_breakpoint_at): Declare.
11399 (gdb_breakpoint_here): Declare.
11400 (delete_breakpoint_at): Delete.
11401 (delete_gdb_breakpoint_at): Declare.
11402
11403 * server.h (struct raw_breakpoint): Forward declare.
11404 (struct process_info): New field `raw_breakpoints'.
11405
11406 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11407 breakpoints.
11408
11409 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11410
11411 * linux-low.c (status_pending_p_callback): Fix comment.
11412 (linux_wait_for_event_1): Move most of the internal breakpoint
11413 handling from here...
11414 (linux_wait_1): ... to here.
11415 (count_events_callback): New.
11416 (select_singlestep_lwp_callback): New.
11417 (select_event_lwp_callback): New.
11418 (cancel_breakpoints_callback): New.
11419 (select_event_lwp): New.
11420 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11421 priority to all LWPs that have had events that should be reported
11422 to the client. Cancel breakpoints when about to reporting the
11423 event to the client, not while stopping lwps. No longer cancel
11424 finished single-steps here.
11425 (cancel_finished_single_step): Delete.
11426 (cancel_finished_single_steps): Delete.
11427
11428 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11429
11430 * mem-break.c (enum bkpt_type): New.
11431 (struct breakpoint): New field `type'.
11432 (set_breakpoint_at): Change return type to struct breakpoint
11433 pointer. Set type to `other_breakpoint' by default.
11434 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11435 in the breakpoint list.
11436 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11437 (reinsert_breakpoint): Rename to ...
11438 (reinsert_raw_breakpoint): ... this.
11439 (reinsert_breakpoints_at): Adjust.
11440 * mem-break.h (struct breakpoint): Declare.
11441 (set_breakpoint_at): Change return type to struct breakpoint
11442 pointer.
11443
11444 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11445
11446 * server.c (handle_query): Assign, not compare.
11447
11448 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11449
11450 Teach linux gdbserver to step-over-breakpoints.
11451
11452 * linux-low.c (can_hardware_single_step): New.
11453 (supports_breakpoints): New.
11454 (handle_extended_wait): If stopping threads, read the stop pc of
11455 the new cloned LWP.
11456 (get_pc): New.
11457 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11458 low target doesn't support retrieving the PC.
11459 (add_lwp): Set last_resume_kind to resume_continue.
11460 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11461 (linux_attach): Don't clear stop_expected. Set the lwp's
11462 last_resume_kind to resume_stop.
11463 (linux_detach_one_lwp): Don't check for removed breakpoints.
11464 (check_removed_breakpoint): Delete.
11465 (status_pending_p): Rename to ...
11466 (status_pending_p_callback): ... this. Don't check for removed
11467 breakpoints. Don't consider threads that are stopped from GDB's
11468 perspective.
11469 (linux_wait_for_lwp): Always read the stop_pc here.
11470 (cancel_breakpoint): New.
11471 (step_over_bkpt): New global.
11472 (linux_wait_for_event_1): Implement stepping over breakpoints.
11473 (gdb_wants_lwp_stopped): New.
11474 (gdb_wants_all_stopped): New.
11475 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11476 single-step traps here. Store the thread's last reported target
11477 wait status.
11478 (send_sigstop): Don't clear stop_expected. Always set it,
11479 instead.
11480 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11481 (cancel_finished_single_step): New.
11482 (cancel_finished_single_steps): New.
11483 (wait_for_sigstop): Don't cancel finished single-step traps here.
11484 (linux_resume_one_lwp): Don't check for removed breakpoints.
11485 Don't set `step' on non-hardware step archs.
11486 (linux_set_resume_request): Ignore resume_stop requests if already
11487 stopping or stopped. Set the lwp's last_resume_kind.
11488 (resume_status_pending_p): Don't check for removed breakpoints.
11489 (need_step_over_p): New.
11490 (start_step_over): New.
11491 (finish_step_over): New.
11492 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11493 requests. Clear the thread's last reported target waitstatus.
11494 Don't use the `suspended' flag. Don't consider pending breakpoints.
11495 (linux_resume): Start a step-over if necessary.
11496 (proceed_one_lwp): New.
11497 (proceed_all_lwps): New.
11498 (unstop_all_lwps): New.
11499 * linux-low.h (struct lwp_info): Rewrite comment for the
11500 `suspended' flag. Add the `stop_pc' field. Delete the
11501 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11502 Add `'last_resume_kind' and `need_step_over' fields.
11503 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11504 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11505 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11506 (set_raw_breakpoint_at): New.
11507 (set_breakpoint_at): Rewrite to use it.
11508 (reinsert_breakpoint_handler): Delete.
11509 (set_reinsert_breakpoint): New.
11510 (reinsert_breakpoint_by_bp): Delete.
11511 (delete_reinsert_breakpoints): New.
11512 (uninsert_breakpoint): Rewrite.
11513 (uninsert_breakpoints_at): New.
11514 (reinsert_breakpoint): Rewrite.
11515 (reinsert_breakpoints_at): New.
11516 (check_breakpoints): Rewrite.
11517 (breakpoint_here): New.
11518 (breakpoint_inserted_here): New.
11519 (check_mem_read): Adjust.
11520 * mem-break.h (breakpoints_supported, breakpoint_here)
11521 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11522 (reinsert_breakpoint_by_bp): Delete declaration.
11523 (delete_reinsert_breakpoints): Declare.
11524 (reinsert_breakpoint): Delete declaration.
11525 (reinsert_breakpoints_at): Declare.
11526 (uninsert_breakpoint): Delete declaration.
11527 (uninsert_breakpoints_at): Declare.
11528 (check_breakpoints): Adjust prototype.
11529 * server.h: Adjust include order.
11530 (struct thread_info): Declare here. Add a `last_status' field.
11531
11532 2010-03-23 Michael Snyder <msnyder@vmware.com>
11533
11534 * server.c (crc32): New function.
11535 (handle_query): Add handling for 'qCRC:' request.
11536
11537 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11538
11539 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11540 lwp had been stopped by a watchpoint.
11541
11542 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11543
11544 * server.h (internal_error): Declare.
11545 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11546 * utils.c (internal_error): New function.
11547
11548 2010-03-15 Andreas Schwab <schwab@redhat.com>
11549
11550 * configure.srv: Fix typo setting srv_regobj.
11551
11552 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11553
11554 * linux-low.c (fetch_register): Avoid passing a non string literal
11555 format to `error'.
11556 (usr_store_inferior_registers): Ditto.
11557
11558 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11559
11560 * linux-low.c (linux_write_memory): Bail out early if peeking
11561 memory failed.
11562
11563 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11564
11565 * linux-low.h (struct lwp_info): New fields
11566 `stopped_by_watchpoint' and `stopped_data_address'.
11567 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11568 here, and cache them in the lwp object.
11569 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11570 directly.
11571 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11572 field.
11573 (linux_stopped_by_watchpoint): Rewrite.
11574 (linux_stopped_data_address): Rewrite.
11575
11576 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11577
11578 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11579 switching the current inferior, not before.
11580
11581 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11582
11583 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11584 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11585 i386-linux.c and amd64-linux.c.
11586 (reg-i386.o): Removed.
11587 (reg-i386.c): Likewise.
11588 (reg-i386-linux.o): Likewise.
11589 (reg-i386-linux.c): Likewise.
11590 (reg-x86-64.o): Likewise.
11591 (reg-x86-64.c): Likewise.
11592 (reg-x86-64-linux.o): Likewise.
11593 (reg-x86-64-linux.c): Likewise.
11594 (i386.o): New.
11595 (i386.c): Likewise.
11596 (i386-linux.o): Likewise.
11597 (i386-linux.c): Likewise.
11598 (amd64.o): Likewise.
11599 (amd64.c): Likewise.
11600 (amd64-linux.o): Likewise.
11601 (amd64-linux.c): Likewise.
11602
11603 * configure.srv (srv_i386_regobj): New.
11604 (srv_i386_linux_regobj): Likewise.
11605 (srv_amd64_regobj): Likewise.
11606 (srv_amd64_linux_regobj): Likewise.
11607 (srv_i386_32bit_xmlfiles): Likewise.
11608 (srv_i386_64bit_xmlfiles): Likewise.
11609 (srv_i386_xmlfiles): Likewise.
11610 (srv_amd64_xmlfiles): Likewise.
11611 (srv_i386_linux_xmlfiles): Likewise.
11612 (srv_amd64_linux_xmlfiles): Likewise.
11613 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11614 srv_xmlfiles to $srv_i386_xmlfiles.
11615 (i[34567]86-*-mingw32ce*): Likewise.
11616 (i[34567]86-*-mingw*): Likewise.
11617 (i[34567]86-*-nto*): Likewise.
11618 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11619 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11620 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11621 (x86_64-*-linux*): Likewise.
11622
11623 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11624 (init_registers_amd64_linux): New.
11625 (x86_arch_setup): Replace init_registers_x86_64_linux with
11626 init_registers_amd64_linux.
11627
11628 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11629
11630 * configure.ac: Check for libdl. If it is not available link against
11631 static libthread_db.
11632 * configure: Regenerate.
11633
11634 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11635
11636 PR9605
11637
11638 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11639 handing a read watchpoint.
11640 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11641
11642 2010-02-12 Doug Evans <dje@google.com>
11643
11644 * linux-low.c (linux_supports_tracefork_flag): Document.
11645 (linux_look_up_symbols): Add comment.
11646
11647 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11648
11649 * regcache.c (supply_register): Clear regcache if buf is NULL.
11650
11651 2010-02-02 Nicolas Roche <roche@sourceware.org>
11652 Joel Brobecker <brobecker@adacore.com>
11653
11654 * inferiors.c (find_inferior): Add function documentation.
11655 (unloaded_dll): Handle the case where the unloaded dll has not
11656 been previously registered in the dll list.
11657
11658 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11659
11660 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11661 (thumb2_breakpoint): New.
11662 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11663
11664 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11665
11666 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11667 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11668 breakpoints.
11669
11670 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11671
11672 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11673
11674 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11675
11676 * linux-s390-low.c (s390_collect_ptrace_register)
11677 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11678
11679 2010-01-21 Doug Evans <dje@google.com>
11680
11681 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11682 (PTRACE_ARG4_TYPE): New macro.
11683 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11684 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11685 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11686 (usr_store_inferior_registers): Ditto.
11687 (linux_read_memory, linux_write_memory): Ditto.
11688 (linux_test_for_tracefork): Ditto.
11689
11690 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11691 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11692
11693 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11694
11695 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11696 target.
11697
11698 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11699
11700 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11701 prototype to take a regcache. Adjust.
11702
11703 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11704
11705 * regcache.h (struct thread_info): Forward declare.
11706 (struct regcache): New.
11707 (new_register_cache): Adjust prototype.
11708 (get_thread_regcache): Declare.
11709 (free_register_cache): Adjust prototype.
11710 (registers_to_string, registers_from_string): Ditto.
11711 (supply_register, supply_register_by_name, collect_register)
11712 (collect_register_as_string, collect_register_by_name): Ditto.
11713 * regcache.c (struct inferior_regcache_data): Delete.
11714 (get_regcache): Rename to ...
11715 (get_thread_regcache): ... this. Adjust. Switch inferior before
11716 fetching registers.
11717 (regcache_invalidate_one): Adjust.
11718 (regcache_invalidate): Fix prototype.
11719 (new_register_cache): Return the new register cache.
11720 (free_register_cache): Change prototype.
11721 (realloc_register_cache): Adjust.
11722 (registers_to_string): Change prototype to take a regcache. Adjust.
11723 (registers_from_string): Ditto.
11724 (register_data): Ditto.
11725 (supply_register): Ditto.
11726 (supply_register_by_name): Ditto.
11727 (collect_register): Ditto.
11728 (collect_register_as_string): Ditto.
11729 (collect_register_by_name): Ditto.
11730 * server.c (process_serial_event): Adjust.
11731 * linux-low.h (regset_fill_func, regset_store_func): Change
11732 prototype.
11733 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11734 Change prototype.
11735 * linux-low.c (get_stop_pc): Adjust.
11736 (check_removed_breakpoint): Adjust.
11737 (linux_wait_for_event): Adjust.
11738 (linux_resume_one_lwp): Adjust.
11739 (fetch_register): Add regcache parameter. Adjust.
11740 (usr_store_inferior_registers): Ditto.
11741 (regsets_fetch_inferior_registers): Ditto.
11742 (regsets_store_inferior_registers): Ditto.
11743 (linux_fetch_registers, linux_store_registers): Ditto.
11744 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11745 regcache. Adjust.
11746 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11747 Ditto.
11748 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11749 prototype to take a regcache.
11750 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11751 * remote-utils.c (convert_ascii_to_int, outreg)
11752 (prepare_resume_reply): Change prototype to take a regcache.
11753 Adjust.
11754 * target.h (struct target_ops) <fetch_registers, store_registers>:
11755 Change prototype to take a regcache.
11756 (fetch_inferior_registers, store_inferior_registers): Change
11757 prototype to take a regcache. Adjust.
11758 * proc-service.c (ps_lgetregs): Adjust.
11759 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11760 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11761 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11762 take a regcache. Adjust.
11763 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11764 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11765 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11766 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11767 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11768 (cris_cannot_fetch_register):
11769 (cris_breakpoint_at): Change prototype to take a regcache.
11770 Adjust.
11771 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11772 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11773 to take a regcache. Adjust.
11774 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11775 Adjust.
11776 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11777 take a regcache. Adjust.
11778 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11779 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11780 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11781 * linux-mips-low.c (mips_get_pc):
11782 (mips_set_pc): Change prototype to take a regcache. Adjust.
11783 (mips_reinsert_addr): Adjust.
11784 (mips_collect_register): Change prototype to take a regcache.
11785 Adjust.
11786 (mips_supply_register):
11787 (mips_collect_register_32bit, mips_supply_register_32bit)
11788 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11789 (mips_store_fpregset): Ditto.
11790 * linux-ppc-low.c (ppc_supply_ptrace_register)
11791 (ppc_supply_ptrace_register): Ditto.
11792 (parse_spufs_run): Adjust.
11793 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11794 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11795 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11796 take a regcache. Adjust.
11797 * linux-s390-low.c (s390_collect_ptrace_register)
11798 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11799 (s390_set_pc): Change prototype to take a regcache. Adjust.
11800 (s390_arch_setup): Adjust.
11801 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11802 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11803 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11804 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11805 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11806 regcache. Adjust.
11807 (sparc_breakpoint_at): Adjust.
11808 * linux-xtensa-low.c (xtensa_fill_gregset):
11809 (xtensa_store_gregset):
11810 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11811 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11812 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11813 prototype to take a regcache. Adjust.
11814 * win32-arm-low.c (arm_fetch_inferior_register)
11815 (arm_store_inferior_register): Change prototype to take a
11816 regcache. Adjust.
11817 * win32-i386-low.c (i386_fetch_inferior_register)
11818 (i386_store_inferior_register): Change prototype to take a
11819 regcache. Adjust.
11820 * win32-low.c (child_fetch_inferior_registers)
11821 (child_store_inferior_registers): Change prototype to take a
11822 regcache. Adjust.
11823 (win32_wait): Adjust.
11824 (win32_fetch_inferior_registers): Change prototype to take a
11825 regcache. Adjust.
11826 (win32_store_inferior_registers): Adjust.
11827 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11828 store_inferior_register>: Change prototype to take a regcache.
11829
11830 2010-01-20 Doug Evans <dje@google.com>
11831
11832 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11833 #ifdef.
11834 (linux_wait_for_event1, linux_init_signals): Ditto.
11835 (W_STOPCODE): Provide definition if missing.
11836
11837 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11838
11839 * linux-low.c (linux_core_of_thread): New.
11840 (compare_ints, show_process, list_threads): New.
11841 (linux_qxfer_osdata): Report threads and cores.
11842 (linux_target_op): Register linux_core_of_thread.
11843 * remote-utils.c (prepare_resume_reply): Report the core.
11844 (buffer_xml_printf): Support %d specifier.
11845 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11846 New.
11847 (handle_query): Handle qXfer:threads. Announce availability
11848 thereof.
11849 * target.h (struct target_ops): New field core_of_thread.
11850
11851 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11852
11853 * Makefile.in (clean): Remove new generated files.
11854 (reg-s390.o, reg-s390.c): Remove rules.
11855 (reg-s390x.o, reg-s390x.c): Likewise.
11856 (s390-linux32.o, s390-linux32.c): Add rules.
11857 (s390-linux64.o, s390-linux64.c): Likewise.
11858 (s390x-linux64.o, s390x-linux64.c): Likewise.
11859 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11860 * linux-s390-low.c: Include <elf.h>.
11861 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11862 (init_registers_s390): Remove prototype.
11863 (init_registers_s390x): Likewise.
11864 (init_registers_s390_linux32): Add prototype.
11865 (init_registers_s390_linux64): Likewise.
11866 (init_registers_s390x_linux64): Likewise.
11867 (s390_num_regs_3264): New define.
11868 (s390_regmap_3264): New global variable.
11869 (s390_cannot_fetch_register): Remove obsolete check.
11870 (s390_cannot_store_register): Likewise.
11871 (s390_collect_ptrace_register): Handle upper/lower register halves.
11872 (s390_supply_ptrace_register): Likewise.
11873 (s390_fill_gregset): Update to register number changes.
11874 (s390_get_hwcap): New routine.
11875 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11876 Install appropriate regmap and register set.
11877
11878 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11879
11880 * server.c (gdbserver_version): Update copyright year to 2010.
11881 * gdbreplay.c (gdbreplay_version): Likewise.
11882
11883 2009-12-28 Doug Evans <dje@google.com>
11884
11885 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11886 elf/external.h. Include <elf.h> instead but only if necessary.
11887
11888 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11889
11890 * linux-low.c (linux_remove_process): Remove `detaching'
11891 parameter. Don't release/detach from thread_db here.
11892 (linux_kill): Release/detach from thread_db here, ...
11893 (linux_detach): ... and here, before actually detaching.
11894 (linux_wait_1): ... and here, when a process exits.
11895 * thread-db.c (any_thread_of): New.
11896 (thread_db_free): Switch the current inferior to a thread of the
11897 passed in process.
11898
11899 2009-12-21 Doug Evans <dje@google.com>
11900
11901 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11902
11903 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11904 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11905 warning ifndef __NR_tkill. Move setting of errno there too.
11906 Delete unnecessary resetting of errno after syscall.
11907 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11908
11909 * configure.ac: Check for dladdr.
11910 * config.in: Regenerate.
11911 * configure: Regenerate.
11912 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11913 (try_thread_db_load): Update.
11914
11915 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11916
11917 2009-12-18 Doug Evans <dje@google.com>
11918
11919 * event-loop.c: Include unistd.h if it exists.
11920
11921 * linux-low.c (my_waitpid): Move definition away from being in
11922 between linux_tracefork_child/linux_test_for_tracefork.
11923
11924 * gdb_proc_service.h (psaddr_t): Fix type.
11925 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11926 signature to match glibc.
11927
11928 2009-12-16 Doug Evans <dje@google.com>
11929
11930 * linux-low.c (linux_read_memory): Fix argument to read.
11931
11932 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11933
11934 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11935 events, don't leave current_inferior pointing at null.
11936
11937 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11938
11939 * win32-low.c (LOG): Delete.
11940 (OUTMSG): Output to stderr.
11941 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11942 on compile time LOG macro.
11943 (win32_wait): Fix debug output.
11944
11945 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11946
11947 * win32-low.c (win32_add_one_solib): If the dll name is
11948 "ntdll.dll", prepend the system directory to the dll path.
11949
11950 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11951
11952 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11953
11954 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11955 Vladimir Prus <vladimir@codesourcery.com>
11956
11957 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11958 * configure.ac: Check for __mcoldfire__ and set
11959 gdb_cv_m68k_is_coldfire.
11960 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11961 reg-cf.o and reg-m68k.o.
11962 * configure: Regenerated.
11963
11964 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11965
11966 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11967 Pass it to thread_db_free.
11968 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11969 proper `detaching' argument to linux_remove_process.
11970 * linux-low.h (thread_db_free): Add `detaching' parameter.
11971 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11972 to thread_db_free.
11973 (thread_db_free): Add `detaching' parameter. Only
11974 call td_ta_clear_event if detaching from process.
11975
11976 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11977
11978 * thread-db.c (thread_db_free): Fix typo.
11979
11980 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11981
11982 PR gdb/10838
11983 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11984
11985 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11986
11987 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11988 with an i686 compiler.
11989 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11990 needed.
11991 * configure: Rebuilt.
11992
11993 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11994
11995 PR gdb/10783
11996
11997 * server.c (handle_search_memory_1): Correct read_addr initialization
11998 in loop for searching subsequent chunks.
11999
12000 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12001
12002 * configure.ac: New --with-libthread-db option.
12003 * thread-db.c: Allow direct dependence on libthread_db.
12004 (thread_db_free): Adjust.
12005 * config.in: Regenerate.
12006 * configure: Likewise.
12007
12008 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12009
12010 PR gdb/10757
12011 * thread-db.c (attach_thread): New function.
12012 (maybe_attach_thread): Return success/failure.
12013 (find_new_threads_callback): Adjust.
12014 (thread_db_find_new_threads): Loop until no new threads.
12015
12016 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12017
12018 * proc-service.c (ps_lgetregs): Formatting.
12019
12020 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12021
12022 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12023 * configure.ac: Adjust.
12024 * linux-low.h (struct process_info_private): Move members to struct
12025 thread_db.
12026 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12027 * linux-low.c (linux_remove_process): Adjust.
12028 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12029 * server.c (handle_query): Move code ...
12030 (handle_monitor_command): ... here. New function.
12031 * target.h (struct target_ops): New member.
12032 * thread-db.c (struct thread_db): New.
12033 (libthread_db_search_path): New variable.
12034 (thread_db_create_event, thread_db_enable_reporting)
12035 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12036 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12037 (try_thread_db_load_1, dladdr_to_soname): New functions.
12038 (try_thread_db_load, thread_db_load_search): New functions.
12039 (thread_db_init): Search for libthread_db.
12040 (thread_db_free): New function.
12041 (thread_db_handle_monitor_command): Likewise.
12042 * config.in: Regenerate.
12043 * configure: Regenerate.
12044
12045 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12046
12047 * spu-low.c (spu_kill): Wait for inferior to terminate.
12048 Call clear_inferiors.
12049 (spu_detach): Call clear_inferiors.
12050
12051 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12052
12053 * aclocal.m4: Regenerate.
12054 * config.in: Likewise.
12055 * configure: Likewise.
12056
12057 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12058
12059 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12060 (parse_spufs_run): New function.
12061 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12062 (ppc_breakpoint_at): Handle SPU breakpoints.
12063
12064 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12065
12066 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12067 (SPUFS_MAGIC): Define.
12068 (spu_enumerate_spu_ids): New function.
12069 (linux_qxfer_spu): New function.
12070 (linux_target_ops): Install linux_qxfer_spu.
12071
12072 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12073
12074 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12075 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12076 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12077 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12078 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12079 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12080 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12081 (init_registers_powerpc_cell32l): Add prototype.
12082 (init_registers_powerpc_cell64l): Likewise.
12083 (ppc_arch_setup): Detect Cell/B.E. architecture.
12084
12085 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12086
12087 * Makefile.in (datarootdir): New variable.
12088
12089 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12090
12091 * linux-low.c (linux_write_memory): Update debugging output.
12092 * Makefile.in (clean): Add new descriptions.
12093 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12094 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12095 * configure.srv: Add new files for arm*-*-linux*.
12096 * linux-arm-low.c: Add new declarations.
12097 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12098 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12099 (HWCAP_VFPv3D16): New.
12100 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12101 instead of __IWMMXT__.
12102 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12103 (arm_arch_setup): New.
12104 (target_regsets): Remove #ifdef. Add VFP regset.
12105 (the_low_target): Use arm_arch_setup.
12106
12107 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12108
12109 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12110 the main thread again.
12111
12112 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12113
12114 Adding Neutrino gdbserver.
12115 * configure: Regenerated.
12116 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12117 * configure.srv (i[34567]86-*-nto*): New target.
12118 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12119 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12120 (nto_comctrl) [__QNX__]: New function.
12121 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12122
12123 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12124
12125 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12126 srv_tgtobj.
12127
12128 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12129 Pedro Alves <pedro@codesourcery.com>
12130
12131 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12132 don't support CONTEXT_EXTENDED_REGISTERS.
12133 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12134 (the_low_target): Install them.
12135 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12136 failing with ERROR_PIPE_NOT_CONNECTED.
12137
12138 2009-06-30 Doug Evans <dje@google.com>
12139 Pierre Muller <muller@ics.u-strasbg.fr>
12140
12141 Add h/w watchpoint support to x86-linux, win32-i386.
12142 * Makefile.in (SFILES): Add i386-low.c
12143 (i386_low_h): Define.
12144 (i386-low.o): Add dependencies.
12145 (linux-x86-low.o): Add i386-low.h dependency.
12146 (win32-i386-low.o): Ditto.
12147 * i386-low.c: New file.
12148 * i386-low.h: New file.
12149 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12150 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12151 * linux-low.c (linux_add_process): Initialize arch_private.
12152 (linux_remove_process): Free arch_private.
12153 (add_lwp): Initialize arch_private.
12154 (delete_lwp): Free arch_private.
12155 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12156 provided.
12157 * linux-low.h (process_info_private): New member arch_private.
12158 (lwp_info): New member arch_private.
12159 (linux_target_ops): New members new_process, new_thread,
12160 prepare_to_resume.
12161 (ptid_of): New macro.
12162 * linux-x86-low.c: Include stddef.h, i386-low.h.
12163 (arch_process_info): New struct.
12164 (arch_lwp_info): New struct.
12165 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12166 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12167 (i386_dr_low_get_status): New function.
12168 (x86_insert_point, x86_remove_point): New functions.
12169 (x86_stopped_by_watchpoint): New function.
12170 (x86_stopped_data_address): New function.
12171 (x86_linux_new_process, x86_linux_new_thread): New functions.
12172 (x86_linux_prepare_to_resume): New function.
12173 (the_low_target): Add entries for insert_point, remove_point,
12174 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12175 prepare_to_resume.
12176 * server.c (debug_hw_points): New global.
12177 (monitor_show_help): Document set debug-hw-points.
12178 (handle_query): Process "set debug-hw-points".
12179 * server.h (debug_hw_points): Declare.
12180 (paddress): Declare.
12181 * utils.c (NUMCELLS, CELLSIZE): New macros.
12182 (get_sell, xsnprintf, paddress): New functions.
12183 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12184 remove_point, stopped_by_watchpoint, stopped_data_address.
12185 * win32-i386-low.c: Include i386-low.h.
12186 (debug_reg_state): Replaces dr.
12187 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12188 (i386_dr_low_get_status): New function.
12189 (i386_insert_point, i386_remove_point): New functions.
12190 (i386_stopped_by_watchpoint): New function.
12191 (i386_stopped_data_address): New function.
12192 (i386_initial_stuff): Update.
12193 (get_thread_context,set_thread_context,i386_thread_added): Update.
12194 (the_low_target): Add entries for insert_point,
12195 remove_point, stopped_by_watchpoint, stopped_data_address.
12196 * win32-low.c (win32_insert_watchpoint): New function.
12197 (win32_remove_watchpoint): New function.
12198 (win32_stopped_by_watchpoint): New function.
12199 (win32_stopped_data_address): New function.
12200 (win32_target_ops): Add entries for insert_watchpoint,
12201 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12202 * win32-low.h (win32_target_ops): New members insert_point,
12203 remove_point, stopped_by_watchpoint, stopped_data_address.
12204
12205 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12206
12207 * server.c (process_serial_event): Re-return unsupported, not
12208 error, if the type isn't recognized. Re-allow supporting only
12209 insert or remove packets. Also call require_running for
12210 breakpoints. Add missing break statement to default case. Tidy.
12211 * target.h (struct target_ops): Rename insert_watchpoint to
12212 insert_point, and remove_watchpoint to remove_point.
12213
12214 * linux-low.h (struct linux_target_ops): Likewise.
12215 * linux-low.c (linux_insert_watchpoint): Rename to ...
12216 (linux_insert_point): ... this. Adjust.
12217 (linux_remove_watchpoint): Rename to ...
12218 (linux_remove_point): ... this. Adjust.
12219 (linux_target_ops): Adjust.
12220 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12221 (cris_insert_point): ... this.
12222 (cris_remove_watchpoint): Rename to ...
12223 (cris_remove_point): ... this.
12224 (the_low_target): Adjust.
12225
12226 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12227
12228 * server.c (handle_v_kill): Pass signal_pid to
12229 kill_inferior if multi_process is zero.
12230
12231 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12232
12233 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12234 * target.h (target_ops): Comment for *_watchpoint to make it clear
12235 the functions can get types '0' and '1'.
12236
12237 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12238
12239 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12240 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12241 * regcache.c (get_regcache): Likewise.
12242 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12243 * win32-low.c (child_fetch_inferior_registers): Remove check for
12244 regno 0.
12245
12246 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12247 Pedro Alves <pedro@codesourcery.com>
12248
12249 * target.h (struct target_ops) <supports_multi_process>: New
12250 callback.
12251 (target_supports_multi_process): New.
12252 * server.c (handle_query): Even if GDB reports support, only
12253 enable multi-process if the target also supports it. Report
12254 multi-process support only if the target backend supports it.
12255 * linux-low.c (linux_supports_multi_process): New function.
12256 (linux_target_ops): Install it as target_supports_multi_process
12257 callback.
12258
12259 2009-05-24 Doug Evans <dje@google.com>
12260
12261 Global renaming of find_thread_pid to find_thread_ptid.
12262 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12263 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12264 All callers updated.
12265
12266 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12267 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12268 directly.
12269
12270 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12271 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12272 (linux_resume_one_lwp): Ditto.
12273
12274 2009-05-23 Doug Evans <dje@google.com>
12275
12276 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12277 from struct inferior_list_entry * to struct lwp_info *.
12278 All callers updated.
12279
12280 2009-05-13 Doug Evans <dje@google.com>
12281
12282 * linux-x86-low.c: Don't include assert.h.
12283 (x86_siginfo_fixup): Use fatal, not assert.
12284 (x86_arch_setup): Fix comment.
12285
12286 2009-05-12 Doug Evans <dje@google.com>
12287
12288 Biarch support for i386/amd64 gdbserver.
12289 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12290 Add linux-x86-low.c.
12291 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12292 (linux-x86-low.o): Add.
12293 * linux-x86-64-low.c: Delete.
12294 * linux-i386-low.c: Delete.
12295 * linux-x86-low.c: New file.
12296 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12297 linux-x86-low.o.
12298 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12299 linux-x86-low.o.
12300 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12301 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12302 (linux_child_pid_to_exec_file): New function.
12303 (elf_64_header_p, elf_64_file_p): New functions.
12304 (siginfo_fixup): New function.
12305 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12306 give target a chance to convert layout.
12307 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12308 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12309
12310 2009-05-07 Doug Evans <dje@google.com>
12311
12312 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12313 (regsets_store_inferior_registers): Ditto.
12314
12315 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12316
12317 PR server/10048
12318
12319 * linux-low.c (must_set_ptrace_flags): Delete.
12320 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12321 of the global.
12322 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12323 `lwp->must_set_ptrace_flags' instead.
12324 (linux_wait_for_event_1): Set ptrace options here.
12325 (linux_wait_1): ... not here.
12326
12327 2009-04-30 Doug Evans <dje@google.com>
12328
12329 * inferiors.c (started_inferior_callback): New function.
12330 (attached_inferior_callback): New function.
12331 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12332 * server.c (print_started_pid, print_attached_pid): New functions.
12333 (detach_or_kill_for_exit): New function.
12334 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12335 * server.h (have_started_inferiors_p): Declare.
12336 (have_attached_inferiors_p): Declare.
12337
12338 * inferiors.c (remove_process): Fix memory leak, free process.
12339 * linux-low.c (linux_remove_process): New function.
12340 (linux_kill): Call it instead of remove_process.
12341 (linux_detach, linux_wait_1): Ditto.
12342
12343 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12344
12345 * configure.srv: Add x86 Windows CE target.
12346
12347 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12348
12349 * inferiors.c (get_thread_process): Make global.
12350 * server.h (get_thread_process): Add prototype.
12351 * thread-db.c (find_one_thread): Use get_thread_process
12352 instead of current_process.
12353 (thread_db_get_tls_address): Do not crash if called when
12354 thread layer is not yet initialized.
12355
12356 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12357
12358 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12359 * spu-low.c (current_tid): Rename to ...
12360 (current_ptid): ... this.
12361 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12362 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12363 ptid_get_lwp (current_ptid) instead of current_tid.
12364 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12365 instead of current_tid. Use find_process_pid to verify pid
12366 argument is valid. Pass proper argument to remove_process.
12367 (spu_thread_alive): Compare current_ptid instead of current_tid.
12368 (spu_resume): Likewise.
12369
12370 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12371
12372 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12373 variable.
12374
12375 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12376
12377 Implement the multiprocess extensions, and add linux multiprocess
12378 support.
12379
12380 * server.h (ULONGEST): Declare.
12381 (struct ptid, ptid_t): New.
12382 (minus_one_ptid, null_ptid): Declare.
12383 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12384 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12385 (struct inferior_list_entry): Change `id' type from unsigned from
12386 to ptid_t.
12387 (struct sym_cache, struct breakpoint, struct
12388 process_info_private): Forward declare.
12389 (struct process_info): Declare.
12390 (current_process): Declare.
12391 (all_processes): Declare.
12392 (initialize_inferiors): Declare.
12393 (add_thread): Adjust to use ptid_t.
12394 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12395 (add_process, remove_process, find_thread_pid): Declare.
12396 (find_inferior_id): Adjust to use ptid_t.
12397 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12398 (multi_process): Declare.
12399 (push_event): Adjust to use ptid_t.
12400 (read_ptid, write_ptid): Declare.
12401 (prepare_resume_reply): Adjust to use ptid_t.
12402 (clear_symbol_cache): Declare.
12403 * inferiors.c (all_processes): New.
12404 (null_ptid, minus_one_ptid): New.
12405 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12406 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12407 (add_thread): Change unsigned long to ptid. Remove gdb_id
12408 parameter. Adjust.
12409 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12410 (gdb_id_to_thread): Rename to ...
12411 (find_thread_pid): ... this. Change unsigned long to ptid.
12412 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12413 (loaded_dll, pull_pid_from_list): Adjust.
12414 (add_process, remove_process, find_process_pid)
12415 (get_thread_process, current_process, initialize_inferiors): New.
12416 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12417 (struct target_waitstatus) <related_pid>: Ditto.
12418 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12419 return type to int.
12420 (struct target_ops) <join>: Add `pid' argument.
12421 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12422 (struct target_ops) <wait>: Add `ptid' field. Change return type
12423 to ptid.
12424 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12425 (mywait): Add `ptid' argument. Change return type to ptid_t.
12426 (target_pid_to_str): Declare.
12427 * target.c (set_desired_inferior): Adjust to use ptids.
12428 (mywait): Add new `ptid' argument. Adjust.
12429 (target_pid_to_str): New.
12430 * mem-break.h (free_all_breakpoints): Declare.
12431 * mem-break.c (breakpoints): Delelete.
12432 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12433 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12434 to use per-process breakpoint list.
12435 (free_all_breakpoints): New.
12436 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12437 (symbol_cache, all_symbols_looked_up): Delete.
12438 (hexchars): New.
12439 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12440 read_ptid): New.
12441 (prepare_resume_reply): Change ptid argument's type from unsigned
12442 long to ptid_t. Adjust. Implement W;process and X;process.
12443 (free_sym_cache, clear_symbol_cache): New.
12444 (look_up_one_symbol): Adjust to per-process symbol cache. *
12445 * server.c (cont_thread, general_thread, step_thread): Change type
12446 to ptid_t.
12447 (attached): Delete.
12448 (multi_process): New.
12449 (last_ptid): Change type to ptid_t.
12450 (struct vstop_notif) <ptid>: Change type to ptid_t.
12451 (queue_stop_reply, push_event): Change `ptid' argument's type to
12452 ptid_t.
12453 (discard_queued_stop_replies): Add `pid' argument.
12454 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12455 changes. Don't reference the `attached' global.
12456 (attach_inferior): Adjust to mywait interface changes.
12457 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12458 features. Handle and report "multiprocess+". Handle
12459 "qAttached:PID".
12460 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12461 changes.
12462 (handle_v_kill): New.
12463 (handle_v_stopped): Adjust to use target_pid_to_str.
12464 (handle_v_requests): Allow multiple attaches and runs when
12465 multiprocess extensions are in effect. Handle "vKill".
12466 (myresume): Adjust to use ptids.
12467 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12468 (handle_status): Adjust to discard_queued_stop_replies interface
12469 change.
12470 (first_thread_of, kill_inferior_callback)
12471 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12472 (main): Call initialize_inferiors. Adjust to use ptids, killing
12473 and detaching from all inferiors. Handle multiprocess packet
12474 variants.
12475 * linux-low.h: Include gdb_proc_service.h.
12476 (struct process_info_private): New.
12477 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12478 <lwpid_of>: Use ptid_get_lwp.
12479 (get_lwp_thread): Adjust.
12480 (struct lwp_info): Add `dead' member.
12481 (find_lwp_pid): Declare.
12482 * linux-low.c (thread_db_active): Delete.
12483 (new_inferior): Adjust comment.
12484 (inferior_pid): Delete.
12485 (linux_add_process): New.
12486 (handle_extended_wait): Adjust.
12487 (add_lwp): Change unsigned long to ptid.
12488 (linux_create_inferior): Add process to processes table. Adjust
12489 to use ptids. Don't set new_inferior here.
12490 (linux_attach_lwp): Rename to ...
12491 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12492 it. Adjust to use ptids.
12493 (linux_attach_lwp): New.
12494 (linux_attach): Add process to processes table. Don't set
12495 new_inferior here.
12496 (struct counter): New.
12497 (second_thread_of_pid_p, last_thread_of_process_p): New.
12498 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12499 multiple processes.
12500 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12501 processes. Remove process from process table.
12502 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12503 to multiple processes.
12504 (any_thread_of): New.
12505 (linux_detach): Add `pid' argument, and handle it. Remove process
12506 from processes table.
12507 (linux_join): Add `pid' argument. Handle it.
12508 (linux_thread_alive): Change unsighed long argument to ptid_t.
12509 Consider dead lwps as not being alive.
12510 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12511 threads we're not interested in.
12512 (same_lwp, find_lwp_pid): New.
12513 (linux_wait_for_lwp): Change `pid' argument's type from int to
12514 ptid_t. Adjust.
12515 (linux_wait_for_event): Rename to ...
12516 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12517 from int to ptid_t. Adjust.
12518 (linux_wait_for_event): New.
12519 (linux_wait_1): Add `ptid' argument. Change return type to
12520 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12521 that exit from the process table.
12522 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12523 Adjust.
12524 (mark_lwp_dead): New.
12525 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12526 stopping all threads, mark its main lwp as dead.
12527 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12528 ptids.
12529 (fetch_register, usr_store_inferior_registers)
12530 (regsets_fetch_inferior_registers)
12531 (regsets_store_inferior_registers, linux_read_memory)
12532 (linux_write_memory): Inline `inferior_pid'.
12533 (linux_look_up_symbols): Adjust to use per-process
12534 `thread_db_active'.
12535 (linux_request_interrupt): Adjust to use ptids.
12536 (linux_read_auxv): Inline `inferior_pid'.
12537 (initialize_low): Don't reference thread_db_active.
12538 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12539 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12540 (ps_getpid): Return the pid of the current inferior.
12541 * thread-db.c (proc_handle, thread_agent): Delete.
12542 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12543 per-process data.
12544 (find_one_thread): Change argument type to ptid_t. Adjust to
12545 per-process data.
12546 (maybe_attach_thread): Adjust to per-process data and ptids.
12547 (thread_db_find_new_threads): Ditto.
12548 (thread_db_init): Ditto.
12549 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12550 processes table. Adjust to use ptids.
12551 (spu_kill, spu_detach): Adjust interface. Remove process from
12552 processes table.
12553 (spu_join, spu_thread_alive): Adjust interface.
12554 (spu_wait): Adjust interface. Remove process from processes
12555 table. Adjust to use ptids.
12556 * win32-low.c (current_inferior_tid): Delete.
12557 (current_inferior_ptid): New.
12558 (debug_event_ptid): New.
12559 (thread_rec): Take a ptid. Adjust.
12560 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12561 (child_delete_thread): Ditto.
12562 (do_initial_child_stuff): Add `attached' argument. Add process to
12563 processes table.
12564 (child_fetch_inferior_registers, child_store_inferior_registers):
12565 Adjust.
12566 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12567 (win32_attach): Pass 1 to do_initial_child_stuff.
12568 (win32_kill): Adjust interface. Remove process from processes
12569 table.
12570 (win32_detach): Ditto.
12571 (win32_join): Adjust interface.
12572 (win32_thread_alive): Take a ptid.
12573 (win32_resume): Adjust to use ptids.
12574 (get_child_debug_event): Ditto.
12575 (win32_wait): Adjust interface. Remove exiting process from
12576 processes table.
12577
12578 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12579
12580 Non-stop mode support.
12581
12582 * server.h (non_stop): Declare.
12583 (gdb_client_data, handler_func): Declare.
12584 (delete_file_handler, add_file_handler, start_event_loop):
12585 Declare.
12586 (handle_serial_event, handle_target_event, push_event)
12587 (putpkt_notif): Declare.
12588 * target.h (enum resume_kind): New.
12589 (struct thread_resume): Replace `step' field by `kind' field.
12590 (TARGET_WNOHANG): Define.
12591 (struct target_ops) <wait>: Add `options' argument.
12592 <supports_non_stop, async, start_non_stop>: New fields.
12593 (target_supports_non_stop, target_async): New.
12594 (start_non_stop): Declare.
12595 (mywait): Add `options' argument.
12596 * target.c (mywait): Add `options' argument. Print child exit
12597 notifications here.
12598 (start_non_stop): New.
12599 * server.c (non_stop, own_buf, mem_buf): New globals.
12600 (struct vstop_notif): New.
12601 (notif_queue): New global.
12602 (queue_stop_reply, push_event, discard_queued_stop_replies)
12603 (send_next_stop_reply): New.
12604 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12605 interface changes.
12606 (attach_inferior): In non-stop mode, don't wait for the target
12607 here.
12608 (handle_general_set): Handle QNonStop.
12609 (handle_query): When handling qC, return the current general
12610 thread, instead of the first thread of the list.
12611 (handle_query): If the backend supports non-stop mode, include
12612 QNonStop+ in the qSupported query response.
12613 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12614 and non-stop mode.
12615 (handle_v_attach, handle_v_run): Handle non-stop mode.
12616 (handle_v_stopped): New.
12617 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12618 (myresume): Adjust to use resume_kind. Handle non-stop.
12619 (queue_stop_reply_callback): New.
12620 (handle_status): Handle non-stop mode.
12621 (main): Clear non_stop flag on reconnection. Use the event-loop.
12622 Refactor serial protocol handling from here ...
12623 (process_serial_event): ... to this new function. When GDB
12624 selects any thread, select one here. In non-stop mode, wait until
12625 GDB acks all pending events before exiting.
12626 (handle_serial_event, handle_target_event): New.
12627 * remote-utils.c (remote_open): Install remote_desc in the event
12628 loop.
12629 (remote_close): Remove remote_desc from the event loop.
12630 (putpkt_binary): Rename to...
12631 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12632 (putpkt_binary): New as wrapper around putpkt_binary_1.
12633 (putpkt_notif): New.
12634 (prepare_resume_reply): In non-stop mode, don't change the
12635 general_thread.
12636 * event-loop.c: New.
12637 * Makefile.in (OBJ): Add event-loop.o.
12638 (event-loop.o): New rule.
12639
12640 * linux-low.h (pid_of): Moved here.
12641 (lwpid_of): New.
12642 (get_lwp_thread): Use lwpid_of.
12643 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12644 * linux-low.c (pid_of): Delete.
12645 (inferior_pid): Use lwpid_of.
12646 (linux_event_pipe): New.
12647 (target_is_async_p): New.
12648 (delete_lwp): New.
12649 (handle_extended_wait): Use lwpid_of.
12650 (add_lwp): Don't set lwpid field.
12651 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12652 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12653 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12654 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12655 first. Adjust to linux_wait_for_event interface changes. Use
12656 lwpid_of.
12657 (linux_detach): Don't delete the main lwp here.
12658 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12659 (status_pending_p): Don't consider explicitly suspended lwps.
12660 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12661 pointer. Add OPTIONS argument. Change return type to int. Use
12662 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12663 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12664 pointer. Add status pointer argument. Return a pid instead of a
12665 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12666 changes. In non-stop mode, don't switch to a random thread.
12667 (linux_wait): Rename to...
12668 (linux_wait_1): ... this. Add target_options argument, and handle
12669 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12670 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12671 clean exit and signal exit code. Don't stop all threads in
12672 non-stop mode. In all-stop mode, only stop all threads when
12673 reporting a stop to GDB. Handle explicit thread stop requests.
12674 (async_file_flush, async_file_mark): New.
12675 (linux_wait): New.
12676 (send_sigstop): Use lwpid_of.
12677 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12678 interface changes. In non-stop mode, don't switch to a random
12679 thread.
12680 (linux_resume_one_lwp): Use lwpid_of.
12681 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12682 (linux_resume_one_thread): ... this. Handle resume_stop. In
12683 non-stop mode, don't look for pending flag in all threads.
12684 (resume_status_pending_p): Don't consider explicitly suspended
12685 threads.
12686 (my_waitpid): Reimplement. Emulate __WALL.
12687 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12688 Use lwpid_of.
12689 (sigchld_handler, linux_supports_non_stop, linux_async)
12690 (linux_start_non_stop): New.
12691 (linux_target_ops): Register linux_supports_non_stop, linux_async
12692 and linux_start_non_stop.
12693 (initialize_low): Install SIGCHLD handler.
12694 * thread-db.c (thread_db_create_event, find_one_thread)
12695 (thread_db_get_tls_address): Use lwpid_of.
12696 * win32-low.c (win32_detach): Adjust to use resume_kind.
12697 (win32_wait): Add `options' argument.
12698 * spu-low.c (spu_resume): Adjust to use resume_kind.
12699 (spu_wait): Add `options' argument.
12700
12701 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12702
12703 Decouple target code from remote protocol.
12704
12705 * target.h (enum target_waitkind): New.
12706 (struct target_waitstatus): New.
12707 (struct target_ops) <wait>: Return an unsigned long. Take a
12708 target_waitstatus pointer instead of a char pointer.
12709 (mywait): Likewise.
12710 * target.c (mywait): Change prototype to return an unsigned long.
12711 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12712 * server.h (thread_from_wait, old_thread_from_wait): Delete
12713 declarations.
12714 (prepare_resume_reply): Change prototype to take a
12715 target_waitstatus.
12716 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12717 (last_status, last_ptid): New.
12718 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12719 pid instead of a signal.
12720 (attach_inferior): Remove "status" and "signal" parameters.
12721 Adjust.
12722 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12723 not as an address.
12724 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12725 (handle_v_requests, myresume): Remove "status" and "signal"
12726 parameters. Adjust.
12727 (handle_status): New.
12728 (main): Delete local `status'. Adjust.
12729 * remote-utils.c: Include target.h.
12730 (prepare_resume_reply): Change prototype to take a
12731 target_waitstatus. Adjust.
12732
12733 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12734 interface.
12735 * spu-low.c (spu_wait): Adjust.
12736 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12737 Delete.
12738 (win32_wait): Adjust.
12739
12740 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12741
12742 * target.h (struct thread_resume): Delete leave_stopped member.
12743 (struct target_ops): Add a `n' argument to the `resume' callback.
12744 * server.c (start_inferior): Adjust.
12745 (handle_v_cont, myresume): Adjust.
12746 * linux-low.c (check_removed_breakpoint): Adjust to resume
12747 interface change, and to removed leave_stopped field.
12748 (resume_ptr): Delete.
12749 (struct thread_resume_array): New.
12750 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12751 resume interface change.
12752 (linux_continue_one_thread, linux_queue_one_thread)
12753 (resume_status_pending_p): Check if the resume field is NULL
12754 instead of checking the leave_stopped member.
12755 (linux_resume): Adjust to the target resume interface change.
12756 * spu-low.c (spu_resume): Adjust to the target resume interface
12757 change.
12758 * win32-low.c (win32_detach, win32_resume): Ditto.
12759
12760 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12761
12762 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12763 flag.
12764 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12765 pending.
12766 (linux_continue_one_thread): Only preserve the stepping flag if
12767 there's a pending breakpoint.
12768
12769 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12770
12771 * server.c (main): After the inferior having exited, call
12772 remote_close before exiting gdbserver.
12773
12774 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12775
12776 Fix size of FPSCR in Power 7 processors.
12777 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12778 (PPC_FEATURE_HAS_DFP): New #define.
12779 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12780 size of the FPSCR.
12781
12782 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12783
12784 * server.c (handle_query) Whitespace and formatting.
12785
12786 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12787
12788 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12789 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12790 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12791 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12792 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12793 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12794 Makefile.in, configure.ac: Fix whitespace throughout.
12795 * configure: Regenerate.
12796
12797 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12798
12799 * inferiors.c (find_inferior): Make it safe for the callback
12800 function to delete the currently iterated inferior.
12801
12802 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12803
12804 * Makefile.in (linuw_low_h): Move higher.
12805 (thread-db.o): Depend on $(linux_low_h).
12806
12807 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12808
12809 Rename "process" to "lwp" throughout.
12810
12811 * linux-low.c (all_processes): Rename to...
12812 (all_lwps): ... this.
12813 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12814 (add_process): Rename to ...
12815 (add_lwp): ... this. Adjust.
12816 (linux_create_inferior): Adjust.
12817 (linux_attach_lwp): Adjust.
12818 (linux_attach): Adjust.
12819 (linux_kill_one_process): Rename to ...
12820 (linux_kill_one_lwp): ... this. Adjust.
12821 (linux_kill): Adjust.
12822 (linux_detach_one_process): Rename to ...
12823 (linux_detach_one_lwp): ... this. Adjust.
12824 (linux_detach): Adjust.
12825 (check_removed_breakpoint): Adjust.
12826 (status_pending_p): Adjust.
12827 (linux_wait_for_process): Rename to ...
12828 (linux_wait_for_lwp): ... this. Adjust.
12829 (linux_wait_for_event): Adjust.
12830 (send_sigstop): Adjust.
12831 (wait_for_sigstop): Adjust.
12832 (stop_all_processes): Rename to ...
12833 (stop_all_lwps): ... this.
12834 (linux_resume_one_process): Rename to ...
12835 (linux_resume_one_lwp): ... this. Adjust.
12836 (linux_set_resume_request, linux_continue_one_thread)
12837 (linux_queue_one_thread, resume_status_pending_p)
12838 (usr_store_inferior_registers, regsets_store_inferior_registers)
12839 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12840 Adjust.
12841 * linux-low.h (get_process): Rename to ...
12842 (get_lwp): ... this. Adjust.
12843 (get_thread_process): Rename to ...
12844 (get_thread_lwp): ... this. Adjust.
12845 (get_process_thread): Rename to ...
12846 (get_lwp_thread): ... this. Adjust.
12847 (struct process_info): Rename to ...
12848 (struct lwp_info): ... this.
12849 (all_processes): Rename to ...
12850 (all_lwps): ... this.
12851 * proc-service.c (ps_lgetregs): Adjust.
12852 * thread-db.c (thread_db_create_event, find_one_thread)
12853 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12854
12855 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12856
12857 * server.c (handle_query): Handle "qAttached".
12858
12859 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12860
12861 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12862 GPLv3, update license URL.
12863
12864 2009-03-01 Doug Evans <dje@google.com>
12865
12866 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12867 (server_h): Add gdb_signals.h.
12868 (signals.o): Update.
12869 * server.h (target_signal_from_host,target_signal_to_host_p)
12870 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12871
12872 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12873
12874 * remote-utils.c (getpkt): Also generate remote-debug
12875 information if noack_mode is set.
12876
12877 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12878
12879 * server.c (handle_query): Report qXfer:siginfo:read and
12880 qXfer:siginfo:write as supported and handle them.
12881 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12882 * linux-low.c (linux_xfer_siginfo): New.
12883 (linux_target_ops): Set it.
12884
12885 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12886
12887 * server.c (gdbserver_usage): Mention --remote-debug.
12888 (main): Accept '--remote-debug' switch.
12889
12890 2009-01-18 Doug Evans <dje@google.com>
12891
12892 * regcache.c (new_register_cache): No need to check result of xcalloc.
12893 * server.c (handle_search_memory): Back out calls to xmalloc,
12894 result is checked and error is returned to user upon failure.
12895 (handle_query): Ditto. Add more checks for result of malloc.
12896 (handle_v_cont): Check result of malloc, report error back to
12897 user upon failure.
12898 (handle_v_run): Ditto. Call freeargv.
12899 * server.h (freeargv): Declare.
12900 * utils.c (freeargv): New fn.
12901
12902 2009-01-15 Doug Evans <dje@google.com>
12903
12904 * gdbreplay.c (perror_with_name): Make arg const char *.
12905 * server.h (target_signal_to_name): Make return type const char *.
12906 * thread-db.c (thread_db_err_str): Make return type const char *.
12907 * utils.c (perror_with_name): Make arg const char *.
12908
12909 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12910
12911 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12912 when handling a EXIT_PROCESS_DEBUG_EVENT.
12913
12914 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12915
12916 * gdbreplay.c (gdbreplay_version): Update copyright year.
12917 * server.c (gdbserver_version): Likewise.
12918
12919 2009-01-05 Doug Evans <dje@google.com>
12920
12921 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12922 (handle_extended_wait): Improve comment.
12923
12924 2008-12-13 Doug Evans <dje@google.com>
12925
12926 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12927 * server.h (ATTR_MALLOC): New macro.
12928 (xmalloc,xcalloc,xstrdup): Declare.
12929 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12930 * inferiors.c: Ditto.
12931 * linux-low.c: Ditto.
12932 * mem-break.c: Ditto.
12933 * regcache.c: Ditto.
12934 * remote-utils.c: Ditto.
12935 * server.c: Ditto.
12936 * target.c: Ditto.
12937 * win32-low.c: Ditto.
12938
12939 2008-12-12 Doug Evans <dje@google.com>
12940
12941 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12942 in debugging printf.
12943
12944 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12945
12946 2008-12-09 Doug Evans <dje@google.com>
12947
12948 * linux-low.h (struct process_info): Delete member tid, unused.
12949 * thread-db.c (find_one_thread): Update.
12950 (maybe_attach_thread): Update.
12951
12952 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12953
12954 * target.h (struct target_ops): Add qxfer_osdata member.
12955 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12956 and dirent.h.
12957 (linux_qxfer_osdata): New functions.
12958 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12959 callback.
12960 * server.c (handle_query): Handle "qXfer:osdata:read:".
12961 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12962 (buffer_xml_printf): New functions.
12963 * server.h (struct buffer): New.
12964 (buffer_grow_str, buffer_grow_str0): New macros.
12965 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12966 (buffer_xml_printf): Declare.
12967
12968 2008-11-24 Doug Evans <dje@google.com>
12969
12970 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12971
12972 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * server.c (handle_v_run): Always use the supplied argument list.
12975
12976 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12977
12978 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12979 (xtensa_regmap_table): Add entry for scompare1.
12980
12981 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12982
12983 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12984 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12985 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12986 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12987 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12988 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12989 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12990 XML target descriptions.
12991 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12992 when inferior is running on an ISA 2.05 or later processor. Add
12993 special case to return offset for full 64-bit slot of FPSCR when
12994 in 32-bits.
12995
12996 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12997
12998 * Makefile.in (SFILES, clean): Added sparc64 files.
12999 (reg-sparc64.o, reg-sparc64.c): New.
13000 * configure.srv (sparc*-*-linux*): New configuration.
13001 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13002 syscall arguments for SPARC.
13003 (regsets_store_inferior_registers): Likewise.
13004 * linux-sparc-low.c: New file.
13005
13006 2008-10-21 Doug Evans <dje@google.com>
13007
13008 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13009 (READLINE_DIR,READLINE_DEP): Delete.
13010 (INTERNAL_CFLAGS): Update.
13011 (LINTFLAGS): Update.
13012
13013 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13014
13015 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13016 whole argv from the last run, not just argv[0].
13017
13018 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13019
13020 * regcache.c (new_register_cache): Return NULL if the register
13021 cache size isn't known yet.
13022 (free_register_cache): Avoid dereferencing a NULL regcache.
13023
13024 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13025
13026 * configure.srv: Merge MIPS and MIPS64.
13027
13028 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13029
13030 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13031
13032 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13033
13034 * Makefile.in: Add required vsx dependencies.
13035
13036 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13037 Declare init_registers_powerpc_vsx32l.
13038 Declare init_registers_powerpc_vsx64l.
13039 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13040 (ppc_arch_setup): Check for VSX in hwcap.
13041 (ppc_fill_vsxregset): New function.
13042 (ppc_store_vsxregset): New function.
13043 Add new VSX entry in regset_info target_regsets.
13044
13045 * configure.srv: Add new VSX dependencies.
13046
13047 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13048
13049 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13050 (remote_open): Set or clear transport_is_reliable.
13051 (putpkt_binary): Don't expect acks in noack mode.
13052 (getpkt): Don't send ack/nac in noack mode.
13053 * server.c (handle_general_set): Handle QStartNoAckMode.
13054 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13055 qSupported.
13056 (main): Reset noack_mode on every connection.
13057 * server.h (noack_mode): Declare.
13058
13059 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13060
13061 * Makefile.in (GDBREPLAY_OBS): New variable.
13062 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13063
13064 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13065 Daniel Jacobowitz <dan@codesourcery.com>
13066
13067 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13068 (usr_store_inferior_registers): Likewise.
13069 (regsets_store_inferior_registers): Likewise.
13070
13071 2008-07-31 Rolf Jansen <rj@surtec.com>
13072 Pedro Alves <pedro@codesourcery.com>
13073
13074 * configure.ac: Check for memmem declaration.
13075 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13076 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13077 (disable_packet_qfThreadInfo): Unconditionally compile.
13078 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13079 * configure, config.in: Regenerate.
13080
13081 2008-07-28 Doug Kwan <dougkwan@google.com>
13082
13083 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13084 (linux_write_memory): Remove declaration of errno.
13085
13086 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13087
13088 * linux-low.c (handle_extended_wait): Do not use "status"
13089 variable uninitialized.
13090
13091 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13092
13093 * server.c (handle_v_attach): Inhibit reporting dll changes.
13094
13095 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13096
13097 * remote-utils.c (prepare_resume_reply): If requested, don't
13098 output "thread:TID" in the T stop reply.
13099
13100 * server.c (disable_packet_vCont, disable_packet_Tthread)
13101 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13102 (handle_query): If requested, disable support for qC, qfThreadInfo
13103 and qsThreadInfo.
13104 (handle_v_requests): If requested, disable support for vCont.
13105 (gdbserver_show_disableable): New.
13106 (main): Handle --disable-packet and --disable-packet=LIST.
13107
13108 * server.h (disable_packet_vCont, disable_packet_Tthread)
13109 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13110
13111 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13112
13113 * server.c (gdbserver_usage): Mention --version.
13114
13115 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * Makefile.in (gdbreplay.o): New rule.
13118
13119 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13120
13121 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13122 message, not gdbserver.
13123
13124 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13125 Nathan Sidwell <nathan@codesourcery.com>
13126 Joseph Myers <joseph@codesourcery.com>
13127
13128 * acinclude.m4: Include ../../config/acx.m4.
13129 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13130 * configure, config.in: Regenerate.
13131 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13132 * server.c (gdbserver_version): Print PKGVERSION.
13133 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13134 (main): Adjust gdbserver_usage calls.
13135 * gdbreplay.c (version, host_name): Add declarations.
13136 (gdbreplay_version, gdbreplay_usage): New.
13137 (main): Accept --version and --help options.
13138
13139 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13142 (arm_breakpoint_at): Handle Thumb.
13143 (the_low_target): Add comment.
13144
13145 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13148
13149 2008-05-09 Doug Evans <dje@google.com>
13150
13151 * server.h (decode_search_memory_packet): Declare.
13152 * remote-utils.c (decode_search_memory_packet): New fn.
13153 * server.c (handle_search_memory_1): New fn.
13154 (handle_search_memory): New fn.
13155 (handle_query): Process qSearch:memory packets.
13156
13157 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13158
13159 * regcache.c (registers_length): Remove.
13160 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13161 full register packet.
13162 * regcache.h (registers_length): Remove prototype.
13163 * server.h (PBUFSIZ): Define to 16384.
13164
13165 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13166
13167 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13168 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13169 powerpc-64l.o, and powerpc-altivec64l.o.
13170 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13171 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13172 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13173 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13174 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13175 to srv_xmlfiles.
13176
13177 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13178 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13179 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13180 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13181 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13182 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13183 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13184 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13185 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13186 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13187 (clean): Update.
13188
13189 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13190 (init_registers_powerpc_32l): ... this new prototype.
13191 (init_registers_powerpc_32): Remove, replace by ...
13192 (init_registers_powerpc_altivec32l): ... this new prototype.
13193 (init_registers_powerpc_e500): Remove, replace by ...
13194 (init_registers_powerpc_e500l): ... this new prototype.
13195 (init_registers_ppc64): Remove, replace by ...
13196 (init_registers_powerpc_64l): ... this new prototype.
13197 (init_registers_powerpc_64): Remove, replace by ...
13198 (init_registers_powerpc_altivec64l): ... this new prototype.
13199 (ppc_num_regs): Set to 73.
13200 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13201 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13202 (ppc_cannot_store_register): Handle orig_r3 and trap.
13203 (ppc_arch_setup): Update init_registers_... calls.
13204 (ppc_fill_gregset): Handle orig_r3 and trap.
13205
13206 * inferiors.c (clear_inferiors): Reset current_inferior.
13207
13208 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13209
13210 * acinclude.m4: Add override.m4.
13211 * configure: Regenerate.
13212
13213 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13214
13215 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13216 initial call to init_register_ppc64.
13217
13218 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13219
13220 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13221 single powerpc*-*-linux* case.
13222 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13223
13224 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13227 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13228 from reg_xmlfiles.
13229 * linux-ppc-low.c: Include <elf.h>.
13230 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13231 (ppc_hwcap): New global variable.
13232 (ppc_regmap): Remove __SPE__ #ifdef sections.
13233 (ppc_regmap_e500): New global variable.
13234 (ppc_cannot_store_register): Update __SPE__ special case.
13235 (ppc_get_hwcap): New function.
13236 (ppc_arch_setup): Use it to determine whether inferior supports
13237 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13238 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13239 Do not access registers if target does not support AltiVec.
13240 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13241 Do not access registers if target does not support SPE.
13242 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13243
13244 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13245
13246 * linux-low.c (disabled_regsets, num_regsets): New.
13247 (use_regsets_p): Delete.
13248 (linux_wait_for_process): Clear disabled_regsets.
13249 (regsets_fetch_inferior_registers): Check and set it.
13250 (regsets_store_inferior_registers): Likewise.
13251 (linux_fetch_registers, linux_store_registers): Do not use
13252 use_regsets_p.
13253 (initialize_low): Allocate disabled_regsets.
13254
13255 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * Makefile.in (LIBOBJS): New.
13258 (OBS): Use LIBOBJS.
13259 (memmem.o): New rule.
13260 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13261 * configure: Regenerated.
13262
13263 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13264
13265 * server.c (handle_query): Never return "unsupported" for
13266 qXfer:features:read queries.
13267
13268 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * server.c (get_features_xml): Fix inverted condition.
13271 (handle_query): Always support qXfer:feature:read.
13272
13273 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13274
13275 * server.c (wrapper_argv): New.
13276 (start_inferior): Handle wrapper_argv. If set, expect an extra
13277 trap.
13278 (gdbserver_usage): Document --wrapper.
13279 (main): Parse --wrapper.
13280
13281 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13282
13283 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13284 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13285 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13286 (ppc_set_pc): Likewise.
13287 (ppc_arch_setup): New function.
13288 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13289 of collect_register.
13290 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13291
13292 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13293
13294 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13295 instead of linux-ppc64-low.o.
13296 * linux-ppc64-low.c: Remove file.
13297 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13298 (linux-ppc64-low.o): Remove rule.
13299
13300 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13301 (init_registers_powerpc_64): Likewise.
13302 (ppc_regmap): Conditionally define depending on __powerpc64__.
13303 (ppc_cannot_store_register): Do not special-case "fpscr" when
13304 compiled on __powerpc64__.
13305 (ppc_collect_ptrace_register): New function.
13306 (ppc_supply_ptrace_register): New function.
13307 (ppc_breakpoint): Change type to "unsigned int".
13308 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13309 (the_low_target): Conditionally provide initializers for the
13310 arch_setup member depending on __powerpc64__. Install
13311 collect_ptrace_register and supply_ptrace_register members.
13312
13313 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13314
13315 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13316 * server.c (gdbserver_xmltarget): Define.
13317 (get_features_xml): Use it to replace "target.xml" and arch_string.
13318
13319 * configure.srv: Remove srv_xmltarget. Add XML files that were
13320 mentioned there to srv_xmlfiles instead. Remove conditional tests
13321 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13322 srv_xmlfiles and srv_regobj to include all possible choices.
13323 * configure.ac (srv_xmltarget): Remove.
13324 (srv_xmlfiles): Do not add "target.xml".
13325 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13326 checks for supplementary target information.
13327 * configure: Regenerate.
13328 * Makefile.in (XML_TARGET): Remove.
13329 (target.xml): Remove rule.
13330 (clean): Do not clean up target.xml.
13331 (.PRECIOUS): Do not mention target.xml.
13332
13333 * target.h (struct target_ops): Remove arch_string member.
13334 * linux-low.c (linux_arch_string): Remove.
13335 (linux_target_ops): Remove arch_string initializer.
13336 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13337 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13338 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13339 * spu-low.c (spu_arch_string): Remove.
13340 (spu_target_ops): Remove arch_string initializer.
13341 * win32-low.c (win32_arch_string): Remove.
13342 (win32_target_ops): Remove arch_string initializer.
13343 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13344 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13345 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13346
13347 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13348
13349 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13350 by collect_ptrace_register and supply_ptrace_register hooks.
13351 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13352 instead of checking for the_low_target.left_pad_xfer.
13353 (usr_store_inferior_registers): Use collect_ptrace_register callback
13354 instead of checking for the_low_target.left_pad_xfer.
13355
13356 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13357 (s390_supply_ptrace_register): Likewise.
13358 (s390_fill_gregset): Call s390_collect_ptrace_register.
13359 (the_low_target): Update.
13360
13361 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13362 (ppc_supply_ptrace_register): Likewise.
13363 (the_low_target): Update.
13364
13365 * linux-i386-low.c (the_low_target): Update.
13366 * linux-x86-64-low.c (the_low_target): Update.
13367
13368 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13369
13370 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13371 reg-s390.o and reg-s390x.o.
13372
13373 * linux-low.c (new_inferior): New global variable.
13374 (linux_create_inferior, linux_attach): Set it.
13375 (linux_wait_for_process): Call the_low_target.arch_setup after the
13376 target has stopped for the first time.
13377 (initialize_low): Do not call the_low_target.arch_setup.
13378
13379 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13380 (s390_set_pc): Likewise.
13381 (s390_arch_setup): New function.
13382 (the_low_target): Use s390_arch_setup as arch_setup routine.
13383
13384 * regcache.c (realloc_register_cache): New function.
13385 (set_register_cache): Call it for each existing regcache.
13386
13387 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13388
13389 * server.h (init_registers): Remove prototype.
13390
13391 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13392 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13393 instead of init_registers ().
13394 * linux-arm-low.c (init_registers_arm): Add prototype.
13395 (init_registers_arm_with_iwmmxt): Likewise.
13396 (the_low_target): Add initializer for arch_setup field.
13397 * linux-cris-low.c (init_registers_cris): Add prototype.
13398 (the_low_target): Add initializer for arch_setup field.
13399 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13400 (the_low_target): Add initializer for arch_setup field.
13401 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13402 (the_low_target): Add initializer for arch_setup field.
13403 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13404 (the_low_target): Add initializer for arch_setup field.
13405 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13406 (the_low_target): Add initializer for arch_setup field.
13407 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13408 (the_low_target): Add initializer for arch_setup field.
13409 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13410 (init_registers_mips64_linux): Likewise.
13411 (the_low_target): Add initializer for arch_setup field.
13412 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13413 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13414 (the_low_target): Add initializer for arch_setup field.
13415 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13416 (init_registers_powerpc_64): Likewise.
13417 (the_low_target): Add initializer for arch_setup field.
13418 * linux-s390-low.c (init_registers_s390): Add prototype.
13419 (init_registers_s390x): Likewise.
13420 (the_low_target): Add initializer for arch_setup field.
13421 * linux-sh-low.c (init_registers_sh): Add prototype.
13422 (the_low_target): Add initializer for arch_setup field.
13423 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13424 (the_low_target): Add initializer for arch_setup field.
13425 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13426 (the_low_target): Add initializer for arch_setup field.
13427
13428 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13429 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13430 instead of init_registers ().
13431 * win32-arm-low.c (init_registers_arm): Add prototype.
13432 (the_low_target): Add initializer for arch_setup field.
13433 * win32-i386-low.c (init_registers_i386): Add prototype.
13434 (the_low_target): Add initializer for arch_setup field.
13435
13436 * spu-low.c (init_registers_spu): Add prototype.
13437 (initialize_low): Call initialie_registers_spu () instead of
13438 initialize_registers ().
13439
13440 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13441
13442 * server.c (handle_v_requests): When handling the vRun and vAttach
13443 packets, if already debugging a process, don't kill it. Return an
13444 error instead.
13445
13446 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13447
13448 * server.c (handle_query): Correct length check.
13449
13450 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13451
13452 * win32-low.c (do_initial_child_stuff): Add process handle
13453 parameter. Set current_process_handle and current_process_id from the
13454 parameters. Clear globals.
13455 (win32_create_inferior): Don't set current_process_handle and
13456 current_process_id here. Instead pass them on the call to
13457 do_initial_child_stuff.
13458 (win32_attach): Likewise.
13459 (win32_clear_inferiors): New.
13460 (win32_kill): Don't close the current process handle or the
13461 current thread handle here. Instead call win32_clear_inferiors.
13462 (win32_detach): Don't open a new handle to the process. Call
13463 win32_clear_inferiors.
13464 (win32_join): Don't rely on current_process_handle; open a new
13465 handle using the process id.
13466 (win32_wait): Call win32_clear_inferiors when the inferior process
13467 has exited.
13468
13469 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * server.c (monitor_show_help): Add "exit".
13472
13473 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13474
13475 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13476 (clean): Add reg-xtensa.c.
13477 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13478 * configure.srv (xtensa*-*-linux*) New target.
13479 * linux-xtensa-low.c: New.
13480 * xtensa-xtregs.c: New.
13481
13482 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13483
13484 * hostio.c: Don't include errno.h.
13485 (errno_to_fileio_errno): Move to hostio-errno.
13486 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13487 error number outputting to the target->hostio_last_error callback.
13488 (hostio_packet_error): Use FILEIO_EINVAL directly.
13489 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13490 calls to hostio_error.
13491 * hostio-errno.c: New.
13492 * server.h (hostio_last_error_from_errno): Declare.
13493 * target.h (target_ops): Add hostio_last_error member.
13494 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13495 as hostio_last_error handler.
13496 * spu-low.c (spu_target_ops): Likewise.
13497 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13498 (wince_hostio_last_error): New functions.
13499 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13500 as hostio_last_error handler.
13501 (win32_target_ops) [!_WIN32_WCE]: Register
13502 hostio_last_error_from_errno as hostio_last_error handler.
13503 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13504 (hostio-errno.o): New rule.
13505 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13506 * configure.srv (srv_hostio_err_objs): New variable. Default to
13507 hostio-errno.o.
13508 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13509 * configure: Regenerate.
13510
13511 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13512
13513 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13514 (linux_kill, linux_detach): Clean up the process list.
13515 * remote-utils.c (remote_open): Improve port number parsing.
13516 (putpkt_binary, input_interrupt): Only send interrupts if the target
13517 is running.
13518 * server.c (extended_protocol): Make static.
13519 (attached): Define earlier.
13520 (exit_requested, response_needed, program_argv): New variables.
13521 (target_running): New.
13522 (start_inferior): Clear attached here.
13523 (attach_inferior): Set attached here.
13524 (require_running): Define.
13525 (handle_query): Use require_running and target_running. Implement
13526 "monitor exit".
13527 (handle_v_attach, handle_v_run): New.
13528 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13529 (gdbserver_usage): Update.
13530 (main): Redo argument parsing. Handle --debug and --multi. Handle
13531 --attach along with other options or after the port. Save
13532 program_argv. Support no initial program. Resynchronize
13533 communication with GDB after an error. Handle "monitor exit".
13534 Use require_running and target_running. Always allow the extended
13535 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13536 restart in extended mode.
13537 * README: Refer to the GDB manual. Update --attach usage.
13538
13539 2007-12-20 Andreas Schwab <schwab@suse.de>
13540
13541 * linux-low.c (STACK_SIZE): Define.
13542 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13543 (linux_test_for_tracefork): Likewise.
13544
13545 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13546
13547 * linux-low.c (linux_wait_for_event): Update messages. Do not
13548 reinsert auto-delete breakpoints.
13549 * mem-break.c (struct breakpoint): Change return type of handler to
13550 int.
13551 (set_breakpoint_at): Update handler type.
13552 (reinsert_breakpoint_handler): Return 1 instead of calling
13553 delete_breakpoint.
13554 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13555 setting a new one.
13556 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13557 * mem-break.h (set_breakpoint_at): Update handler type.
13558 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13559 * win32-low.c (auto_delete_breakpoint): New.
13560 (get_child_debug_event): Use it.
13561
13562 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13563
13564 * configure.ac: Check for pread and pwrite.
13565 * hostio.c (handle_pread): Fall back to lseek and read.
13566 (handle_pwrite): Fall back to lseek and write.
13567 * config.in, configure: Regenerated.
13568
13569 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * server.c (myresume): Add own_buf argument.
13572 (main): Update calls.
13573
13574 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13577 * remote-utils.c (remote_open): Do not call disable_async_io.
13578 (block_async_io): Delete.
13579 (unblock_async_io): Make static.
13580 (initialize_async_io): New.
13581 * server.c (handle_v_cont): Handle async I/O here.
13582 (myresume): Likewise. Move other common resume tasks here...
13583 (main): ... from here. Call initialize_async_io. Disable async
13584 I/O before the main loop.
13585 * server.h (initialize_async_io): Declare.
13586 (block_async_io, unblock_async_io): Delete prototypes.
13587 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13588
13589 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13590
13591 * remote-utils.c (readchar): Allow binary data in received messages.
13592
13593 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13594
13595 * win32-low.c (attaching): New global.
13596 (win32_create_inferior): Clear the `attaching' global.
13597 (win32_attach): Set the `attaching' global.
13598 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13599 attaching. Only set a breakpoint at the entry point if not
13600 attaching.
13601
13602 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13603
13604 * server.c (main): Don't report dll events on the initial
13605 connection on attaches.
13606
13607 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13608
13609 * server.c (main): Relax numerical bases supported for the pid of
13610 the --attach command line argument.
13611
13612 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13613
13614 * win32-low.c (win32_attach): Call OpenProcess before
13615 DebugActiveProcess, not after. Add last error output to error
13616 call.
13617
13618 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13619
13620 * win32-low.c (win32_get_thread_context)
13621 (win32_set_thread_context): New functions.
13622 (thread_rec): Use win32_get_thread_context.
13623 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13624 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13625 field.
13626
13627 2007-12-03 Leo Zayas
13628 Pedro Alves <pedro_alves@portugalmail.pt>
13629
13630 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13631 global variables.
13632 (child_add_thread): Minor cleanup.
13633 (child_continue): Resume artificially suspended threads before
13634 calling ContinueDebugEvent.
13635 (suspend_one_thread): New.
13636 (fake_breakpoint_event): New.
13637 (get_child_debug_event): Change return type to int. Check here if
13638 gdb sent an interrupt request. If a soft interrupt was requested,
13639 fake a breakpoint event. Return 0 if there is no event to handle,
13640 and 1 otherwise.
13641 (win32_wait): Don't check here if gdb sent an interrupt request.
13642 Ensure there is a valid event to handle.
13643 (win32_request_interrupt): Add soft interruption method as last
13644 resort.
13645
13646 2007-12-03 Leo Zayas
13647 Pedro Alves <pedro_alves@portugalmail.pt>
13648
13649 * win32-low.h (win32_thread_info): Add descriptions to the
13650 structure members. Replace `suspend_count' counter by a
13651 `suspended' flag.
13652 * win32-low.c (thread_rec): Update condition of when to get the
13653 context from the inferior. Rely on ContextFlags being set if it
13654 has already been retrieved. Only suspend the inferior thread if
13655 we haven't already. Warn if that fails.
13656 (continue_one_thread): s/suspend_count/suspended/. Only call
13657 ResumeThread once. Warn if that fails.
13658
13659 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13660
13661 * win32-low.c (win32_wait): Don't read from the inferior when it
13662 has already exited.
13663
13664 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13665
13666 * Makefile.in (win32_low_h): New variable.
13667 (win32-low.o): Add dependency on $(win32_low_h).
13668 (win32-arm-low.o, win32-i386-low.o): New rules.
13669
13670 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13671
13672 * hostio.c: Correct copyright year.
13673
13674 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * Makefile.in (OBS): Add hostio.o.
13677 (hostio.o): New rule.
13678 * server.h (handle_vFile): Declare.
13679 * hostio.c: New file.
13680 * server.c (handle_v_requests): Take packet_len and new_packet_len
13681 for binary packets. Call handle_vFile.
13682 (main): Update call to handle_v_requests.
13683
13684 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * linux-low.c: Include <sched.h>.
13687
13688 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13689
13690 * linux-low.c (linux_tracefork_grandchild): New.
13691 (linux_tracefork_child): Use clone.
13692 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13693
13694 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13695
13696 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13697
13698 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13701
13702 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * inferiors.c (change_inferior_id): Delete.
13705 (add_pid_to_list, pull_pid_from_list): New.
13706 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13707 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13708 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13709 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13710 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13711 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13712 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13713 (using_threads): Always set to 1.
13714 (handle_extended_wait): New.
13715 (add_process): Do not set TID.
13716 (linux_create_inferior): Set must_set_ptrace_flags.
13717 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13718 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13719 (linux_thread_alive): Rename TID argument to LWPID.
13720 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13721 (linux_wait_for_event): Do not use TID or check using_threads. Update
13722 call to dead_thread_notify. Call handle_extended_wait.
13723 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13724 (send_sigstop): Delete sigstop_sent.
13725 (wait_for_sigstop): Avoid TID.
13726 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13727 (linux_test_for_tracefork): New.
13728 (linux_lookup_signals): Use thread_db_active and
13729 linux_supports_tracefork_flag.
13730 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13731 * linux-low.h (get_process_thread): Avoid TID.
13732 (struct process_ifo): Move thread_known and tid to the end. Remove
13733 sigstop_sent.
13734 (linux_attach_lwp, thread_db_init): Update prototypes.
13735 * server.h (change_inferior_id): Delete prototype.
13736 (add_pid_to_list, pull_pid_from_list): New prototypes.
13737 * thread-db.c (thread_db_use_events): New.
13738 (find_first_thread): Rename to...
13739 (find_one_thread): ...this. Update callers and messages. Do not
13740 call fatal. Check thread_db_use_events. Do not call
13741 change_inferior_id or new_thread_notify.
13742 (maybe_attach_thread): Update. Do not call new_thread_notify.
13743 (thread_db_init): Set thread_db_use_events. Check use_events.
13744 * utils.c (fatal, warning): Correct message prefix.
13745
13746 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * Makefile.in (clean): Remove new files.
13749 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13750 (powerpc-64.o, powerpc-64.c): New rules.
13751 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13752 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13753 with SPE.
13754 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13755 SPE targets.
13756 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13757 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13758 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13759 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13760 (target_regsets): Add AltiVec and SPE register sets.
13761 * configure.ac: Check for AltiVec and SPE.
13762 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13763 (ppc_fill_vrregset, ppc_store_vrregset): New.
13764 (target_regsets): Add AltiVec register set.
13765 * configure: Regenerated.
13766
13767 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13768
13769 * linux-low.c (O_LARGEFILE): Define.
13770 (linux_read_memory): Use /proc/PID/mem.
13771 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13772 * configure, config.in: Regenerated.
13773
13774 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * linux-low.c (linux_wait_for_event): Do not pass signals while
13777 single-stepping.
13778
13779 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13780
13781 * win32-low.c (create_process): New.
13782 (win32_create_inferior): Use create_process instead of
13783 CreateProcess. If create_process failed retry appending an ".exe"
13784 suffix. Store the GetLastError result immediatelly after
13785 create_process calls and use it on the call to error.
13786
13787 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13788
13789 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13790
13791 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13792
13793 * configure.ac: Switch license to GPLv3.
13794
13795 2007-08-01 Michael Snyder <msnyder@access-company.com>
13796
13797 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13798
13799 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13800
13801 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13802 typedef.
13803 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13804 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13805 CloseToolhelp32Snapshot.
13806 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13807 CloseToolhelp32Snapshot.
13808
13809 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13810
13811 * server.c (main): Check for inferior exit before main loop.
13812
13813 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13814
13815 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13816 instead of on tmp_desc.
13817
13818 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13819 Daniel Jacobowitz <dan@codesourcery.com>
13820
13821 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13822 (add_thread): Minor cleanups.
13823 (clear_inferiors): Move lower in the file. Clear the DLL
13824 list.
13825 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13826 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13827 (xml_escape_text): New.
13828 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13829 for qSupported.
13830 (handle_v_cont): Report errors.
13831 (gdbserver_version): Update.
13832 (main): Correct size of own_buf. Do not report initial DLL events.
13833 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13834 (unloaded_dll, xml_escape_text): New.
13835 * win32-low.c (enum target_waitkind): Update comments.
13836 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13837 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13838 (win32_EnumProcessModules, win32_GetModuleInformation)
13839 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13840 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13841 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13842 (win32_Module32First, win32_Module32Next, load_toolhelp)
13843 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13844 (get_child_debug_event): Handle DLL events.
13845 (win32_wait): Likewise.
13846
13847 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13848
13849 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13850 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13851
13852 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13853
13854 * win32-low.c (handle_output_debug_string): Ignore event if not
13855 waiting.
13856
13857 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13858
13859 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13860
13861 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13862
13863 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13864
13865 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * inferiors.c (change_inferior_id): Add comment.
13868 * linux-low.c (check_removed_breakpoint): Add an early
13869 prototype. Improve debug output.
13870 (linux_attach): Doc update.
13871 (linux_detach_one_process, linux_detach): Clean up before releasing
13872 each process.
13873 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13874 * linux-low.h (struct process_info): Doc improvement.
13875 * mem-break.c (delete_all_breakpoints): New.
13876 * mem-break.h (delete_all_breakpoints): New prototype.
13877 * thread-db.c (find_first_thread): New.
13878 (thread_db_create_event): Call it instead of
13879 thread_db_find_new_threads. Clean up unused variables.
13880 (maybe_attach_thread): Remove first thread handling.
13881 (thread_db_find_new_threads): Use find_first_thread.
13882 (thread_db_get_tls_address): Likewise.
13883
13884 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13885
13886 * thread-db.c (thread_db_find_new_threads): Add prototype.
13887 (thread_db_create_event): Check for the main thread before adding
13888 a new thread.
13889 (maybe_attach_thread): Only enable event reporting if TID == 0.
13890 (thread_db_get_tls_address): Check for new threads.
13891
13892 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * linux-low.c (linux_create_inferior): Try execv before execvp.
13895 * spu-low.c (spu_create_inferior): Likewise.
13896
13897 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13898
13899 * linux-low.c (linux_create_inferior): Change execv to execvp.
13900 * spu-low.c (spu_create_inferior): Likewies.
13901
13902 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13903
13904 * Makefile.in (clean): Clean new files instead of deleted ones.
13905 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13906 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13907 rules.
13908 * configure.srv: Specify XML files and new regformats for MIPS and
13909 MIPS64 GNU/Linux.
13910 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13911 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13912 an entry for the restart register.
13913 (mips_cannot_fetch_register, mips_cannot_store_register)
13914 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13915 register names to match the XML descriptions.
13916 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13917 restart register instead of $0.
13918
13919 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13920 Markus Deuling <deuling@de.ibm.com>
13921
13922 * remote-utils.c (decode_xfer_write): New function.
13923 * server.h (decode_xfer_write): Add prototype.
13924 * server.c (handle_query): Add PACKET_LEN argument. Support
13925 qXfer:spu:read and qXfer:spu:write packets.
13926 (main): Pass packet_len to handle_query.
13927 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13928 * target.h (target_ops): Add qxfer_spu.
13929
13930 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13931
13932 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13933 accessing non-seekable spufs files.
13934
13935 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13936
13937 * server.c (handle_query): Add reply for qC packet.
13938
13939 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13940 Leo Zayas <lerele@champenstudios@com>
13941
13942 * server.h (check_remote_input_interrupt_request): New function.
13943 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13944 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13945 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13946 (check_remote_input_interrupt_request): New function.
13947 * server.h (check_remote_input_interrupt_request): Declare.
13948 * win32-low.c (winapi_DebugBreakProcess,
13949 winapi_GenerateConsoleCtrlEvent): New typedefs.
13950 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13951 to 250 ms.
13952 (win32_wait): Check for remote interrupt request
13953 with check_remote_input_interrupt_request.
13954 (win32_request_interrupt): New function.
13955 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13956
13957 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13958
13959 * win32-low.c (debug_registers_changed,
13960 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13961 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13962 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13963 (thread_rec): Get context using the low target.
13964 (child_add_thread): Call thread_added on the low target,
13965 which does the same thing.
13966 (regptr): Delete.
13967 (do_initial_child_stuff): Remove debug registers references.
13968 Set context using the low target. Resume threads after
13969 setting the contexts.
13970 (child_continue): Remove dead variable. Remove debug
13971 registers references.
13972 (child_fetch_inferior_registers): Go through the low target.
13973 (do_child_store_inferior_registers): Remove.
13974 (child_store_inferior_registers): Go through the low target.
13975 (win32_resume): Remove debug registers references.
13976 Set context using the low target.
13977 (handle_exception): Change return type to void. Don't record
13978 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13979 first chance exception.
13980 (get_child_debug_event): Change return type to void. Remove
13981 goto loop. Always return after waiting for debug event.
13982 (win32_wait): Convert to switch statement. Handle spurious
13983 events.
13984
13985 * win32-i386-low.c (debug_registers_changed,
13986 debug_registers_used): New.
13987 (initial_stuff): Rename to ...
13988 (i386_initial_stuff): ... this. Clear debug registers
13989 state variables.
13990 (store_debug_registers): Delete.
13991 (i386_get_thread_context): New.
13992 (load_debug_registers): Delete.
13993 (i386_set_thread_context): New.
13994 (i386_thread_added): New.
13995 (single_step): Rename to ...
13996 (i386_single_step): ... this.
13997 (do_fetch_inferior_registers): Rename to ...
13998 (i386_fetch_inferior_register): ... this.
13999 (i386_store_inferior_register): New.
14000 (the_low_target): Adapt to new interface.
14001
14002 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14003 (arm_get_thread_context): New.
14004 (arm_set_thread_context): New.
14005 (regptr): New.
14006 (do_fetch_inferior_registers): Rename to ...
14007 (arm_fetch_inferior_register): ... this.
14008 (arm_store_inferior_register): New.
14009 (arm_wince_breakpoint): Reimplement as unsigned long.
14010 (arm_wince_breakpoint_len): Define.
14011 (the_low_target): Adapt to new interface.
14012
14013 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14014 load_debug_registers. Add get_thread_context, set_thread_context,
14015 thread_added and store_inferior_register. Rename
14016 fetch_inferior_registers to fetch_inferior_register.
14017 (regptr): Remove declaration.
14018
14019 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14020
14021 * linux-low.c (linux_detach): Change return type to int. Return 0.
14022 * spu-low.c (spu_detach): Likewise.
14023
14024 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14025
14026 * target.h (target_ops): Change return type of detach to int.
14027 Add join.
14028 (join_inferior): New.
14029 * server.c (main): Don't skip detach support on mingw32.
14030 If the inferior doesn't support detaching return error.
14031 Call join_inferior instead of using waitpid.
14032 * linux-low.c (linux_join): New.
14033 (linux_target_op): Add linux_join.
14034 * spu-low.c (spu_join): New.
14035 (spu_target_ops): Add spu_join.
14036 * win32-low.c (win32_detach): Adapt to new interface.
14037 Reopen current_process_handle before detaching. Issue a child
14038 resume before detaching.
14039 (win32_join): New.
14040 (win32_target_op): Add win32_join.
14041
14042 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14043
14044 * win32-low.c (win32-attach): Fix return value.
14045 * target.h (target_ops): Describe ATTACH return values.
14046
14047 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14048
14049 * win32-low.c (GETPROCADDRESS): Define.
14050 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14051 (winapi_DebugSetProcessKillOnExit): Likewise.
14052 (win32_create_inferior): Force usage of ansi CreateProcessA.
14053 (win32_attach): Use GETPROCADDRESS.
14054 (win32_detach): Likewise.
14055
14056 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14057
14058 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14059
14060 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14061
14062 * win32-low.c: Commit leftover changes from 2007-03-29.
14063
14064 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14065
14066 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14067 fields short instead of int. Add explicit padding.
14068 (i387_cache_to_fsave): Remove unnecessary casts.
14069 (i387_fsave_to_cache): Doc fix.
14070 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14071
14072 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14073
14074 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14075 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14076
14077 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14078
14079 * configure.srv (arm*-*-mingw32ce*): Move near the other
14080 arm targets.
14081
14082 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14083
14084 * configure.ac: Add errno checking.
14085 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14086 sys/file.h and malloc.h.
14087 (AC_CHECK_DECLS): Add perror.
14088 (srv_mingwce): Handle.
14089 * configure.srv (i[34567]86-*-cygwin*): Add
14090 win32-i386-low.o to srv_tgtobj.
14091 (i[34567]86-*-mingw*): Likewise.
14092 (arm*-*-mingw32ce*): Add case.
14093 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14094 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14095 [__MINGW32CE__] (strerror): New function.
14096 [__MINGW32CE__] (errno): Define to GetLastError.
14097 [__MINGW32CE__] (COUNTOF): New macro.
14098 (remote_open): Remove extra close call.
14099 * mem-break.c (delete_breakpoint_at): New function.
14100 * mem-break.h (delete_breakpoint_at): Declare.
14101 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14102 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14103 [USE_WIN32API] (read, write): Add char* casts.
14104 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14105 * server.h: Include wincecompat.h on Windows CE.
14106 [HAVE_ERRNO_H]: Check.
14107 (perror): Declare if not declared.
14108 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14109 (perror_with_name): Remove errno declaration.
14110 * wincecompat.h: New.
14111 * wincecompat.c: New.
14112 * win32-low.h: New.
14113 * win32-arm-low.c: New.
14114 * win32-i386-low.c: New.
14115 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14116 (OUTMSG2): Make it safe.
14117 (_T): New macro.
14118 (COUNTOF): New macro.
14119 (NUM_REGS): Get it from the low target.
14120 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14121 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14122 (thread_rec): Let low target handle debug registers.
14123 (child_add_thread): Likewise.
14124 (child_init_thread_list): Likewise.
14125 (continue_one_thread): Likewise.
14126 (regptr): New.
14127 (do_child_fetch_inferior_registers): Move to ...
14128 * win32-i386-low.c: ... here, and rename to ...
14129 (do_fetch_inferior_registers): ... this.
14130 * win32-low.c (child_fetch_inferior_registers):
14131 Go through the low target.
14132 (do_child_store_inferior_registers): Use regptr.
14133 (strwinerror): New function.
14134 (win32_create_inferior): Handle Windows CE.
14135 Use strwinerror instead of strerror on Windows error
14136 codes. Add program to the error output.
14137 Don't close the main thread handle on Windows CE.
14138 (win32_attach): Use coredll.dll on Windows CE.
14139 (win32_kill): Close current process and current
14140 thread handles.
14141 (win32_detach): Use coredll.dll on Windows CE.
14142 (win32_resume): Let low target handle debug registers, and
14143 step request.
14144 (handle_exception): Add/Remove initial breakpoint. Avoid
14145 non-existant WSTOPSIG on Windows CE.
14146 (win32_read_inferior_memory): Cast to remove warning.
14147 (win32_arch_string): Go through the low target.
14148 (initialize_low): Call set_breakpoint_data with the low
14149 target's breakpoint.
14150 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14151 FOP_REGNUM, mappings): Move to ...
14152 * win32-i386-low.c: ... here.
14153 * win32-low.c (win32_thread_info): Move to ...
14154 * win32-low.h: ... here.
14155 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14156 win32-arm-low.c and wincecompat.c.
14157 (all:): Add $EXEEXT.
14158 (install-only:): Likewise.
14159 (gdbserver:): Likewise.
14160 (gdbreplay:): Likewise.
14161 * config.in: Regenerate.
14162 * configure: Regenerate.
14163
14164 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14165
14166 * win32-low.c: Rename typedef thread_info to
14167 win32_thread_info throughout.
14168
14169 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14170
14171 * win32-i386-low.c: Rename to ...
14172 * win32-low.c: ... this.
14173 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14174 * Makefile.in: Likewise.
14175
14176 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14177
14178 * remote-utils.c (monitor_output): Constify msg parameter.
14179 * server.h (monitor_output): Likewise.
14180 * win32-i386-low.c (handle_output_debug_string): New.
14181 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14182 handle_output_debug_string.
14183 (get_child_debug_event): Likewise.
14184
14185 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14186
14187 * server.c (main): Correct strtoul check.
14188
14189 2007-03-27 Jon Ringle <jon@ringle.org>
14190
14191 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14192
14193 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14194
14195 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14196
14197 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * terminal.h: Check HAVE_SGTTY_H.
14200
14201 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14202
14203 * remote-utils.c (remote_open): Print out the assigned port number.
14204
14205 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * remote-utils.c (monitor_output): New function.
14208 * server.c (debug_threads): Define here.
14209 (monitor_show_help): New function.
14210 (handle_query): Handle qRcmd.
14211 (main): Do not handle 'd' packet.
14212 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14213 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14214 of debug_threads.
14215
14216 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14217
14218 * Makefile.in (EXEEXT): New.
14219 (clean): Use $(EXEEXT).
14220
14221 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14222
14223 * target.h (target_ops): Rename send_signal to request_interrupt,
14224 and remove enum target_signal parameter.
14225 * linux-low.c (linux_request_interrupt): Rename from
14226 linux_send_signal, and always send SIGINT.
14227 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14228 and always send SIGINT.
14229 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14230 of send_signal.
14231 (input_interrupt): Likewise.
14232
14233 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14234
14235 * server.c (get_features_xml): Check if target implemented
14236 arch_string.
14237 * win32-i386-low.c (win32_arch_string): New.
14238 (win32_target_ops): Add win32_arch_string as arch_string member.
14239
14240 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14241
14242 * spu-low.c (spu_arch_string): New.
14243 (spu_target_ops): Add spu_arch_string.
14244
14245 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14248 * configure.ac: Do not check for terminal.h.
14249 * configure, config.in: Regenerated.
14250
14251 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * Makefile.in (OBS): Add $(XML_BUILTIN).
14254 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14255 (clean): Update.
14256 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14257 (arm-with-iwmmxt.c): New.
14258 * config.in, configure: Regenerate.
14259 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14260 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14261 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14262 (arm*-*-linux*): Add iWMMXt and regset support.
14263 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14264 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14265 (arm_store_wmmxregset, target_regsets): New.
14266 * server.c (get_features_xml): Take annex argument. Check builtin
14267 XML documents.
14268 (handle_query): Handle multiple annexes.
14269
14270 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14271
14272 * remote-utils.c [USE_WIN32API] (read, write): Define.
14273 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14274 write.
14275
14276 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14277
14278 * linux-i386-low.c (the_low_target): Set arch_string.
14279 * linux-x86-64-low.c (the_low_target): Likewise.
14280 * linux-low.c (linux_arch_string): New.
14281 (linux_target_ops): Add it.
14282 * linux-low.h (struct linux_target_ops): Add arch_string.
14283 * server.c (write_qxfer_response): Use const void * for DATA.
14284 (get_features_xml): New.
14285 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14286 * target.h (struct target_ops): Add arch_string method.
14287
14288 2007-01-03 Denis Pilat <denis.pilat@st.com>
14289 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * linux-low.c (linux_kill): Handle being called with no threads.
14292 * win32-i386-low.c (win32_kill): Likewise.
14293 (get_child_debug_event): Clear current_process_handle.
14294
14295 2006-12-30 Denis PILAT <denis.pilat@st.com>
14296 Daniel Jacobowitz <dan@codesourcery.com>
14297
14298 * remote-utils.c (remote_open): Check the type of specified
14299 serial port devices before opening them.
14300 * server.c (main): Kill the inferior if an error occurs during
14301 the first remote_open.
14302
14303 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14304
14305 * README: Update supported targets.
14306
14307 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14308
14309 * Makefile.in (clean): Remove reg-mips64.c.
14310 (reg-mips64.c, reg-mips64.o): New rules.
14311 * configure.srv: Handle mips64. Include regset support for mips.
14312 * linux-mips-low.c (union mips_register): New.
14313 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14314 (mips_breakpoint, mips_breakpoint_at): Use int.
14315 (mips_collect_register, mips_supply_register)
14316 (mips_collect_register_32bit, mips_supply_register_32bit)
14317 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14318 (mips_store_fpregset, target_regsets): New.
14319 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14320
14321 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14322
14323 * configure.srv: Add target "spu*-*-*".
14324 * Makefile.in (clean): Remove reg-spu.c.
14325 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14326 * spu-low.c: New file.
14327
14328 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14329
14330 * configure.ac: Correct td_thr_tls_get_addr test.
14331 * configure: Regenerated.
14332
14333 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14334
14335 * linux-low.c (linux_wait_for_event): Reformat. Use the
14336 pass_signals array.
14337 * remote-utils.c (decode_address_to_semicolon): New.
14338 * server.c (pass_signals, handle_general_set): New.
14339 (handle_query): Mention QPassSignals for qSupported.
14340 (main): Call handle_general_set.
14341 * server.h (pass_signals, decode_address_to_semicolon): New.
14342
14343 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * server.c (handle_query): Correct error handling for read_auxv.
14346
14347 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14348
14349 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14350 and srv_linux_thread_db to yes.
14351 * linux-s390-low.c (s390_fill_gregset): New function.
14352 (target_regsets): Define data structure.
14353
14354 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14357 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14358 * config.in, configure: Regenerated.
14359 * inferiors.c (gdb_id_to_thread): New function.
14360 (gdb_id_to_thread_id): Use it.
14361 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14362 * linux-low.h (struct process_info): Add th member.
14363 (thread_db_get_tls_address): New prototype.
14364 * remote-utils.c (decode_address): Make non-static.
14365 * server.c (handle_query): Handle qGetTLSAddr.
14366 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14367 * target.h (struct target_ops): Add get_tls_address.
14368 * thread-db.c (maybe_attach_thread): Save the thread handle.
14369 (thread_db_get_tls_address): New.
14370
14371 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14374 (linux_resume_one_process): Take a siginfo_t *. Update all
14375 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14376 (struct pending_signals): Add a siginfo_t.
14377 (linux_wait_for_process): Always set last_status.
14378 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14379 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14380 * linux-low.h (struct process_info): Add last_status.
14381
14382 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14383
14384 * remote-utils.c (try_rle): New function.
14385 (putpkt_binary): Use it.
14386
14387 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14390 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14391 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14392 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14393 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14394 point registers.
14395
14396 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14397
14398 * server.c (terminal_fd): New variable.
14399 (old_foreground_pgrp): Likewise.
14400 (restore_old_foreground_pgrp): New function.
14401 (start_inferior): Record the terminal file descriptor in terminal_fd
14402 and its original foreground group in old_foreground_pgrp. Register
14403 restore_old_foreground_pgrp with atexit().
14404
14405 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14406
14407 * server.c (handle_query): Correct qPart to qXfer.
14408
14409 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * configure.ac: Check for more headers which are missing on
14412 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14413 * configure.srv: Add Cygwin and mingw32.
14414 * remote-utils.c: Don't include headers unconditionally which
14415 are missing on mingw32. Include <winsock.h> for mingw32.
14416 (remote_open): Adjust for mingw32 support. Flush
14417 standard error after writing to it.
14418 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14419 (unblock_async_io, enable_async_io, disable_async_io)
14420 (readchar, getpkt): Update for Winsock support.
14421 (prepare_resume_reply): Expect a protocol signal number.
14422 * server.c: Disable <sys/wait.h> on mingw32.
14423 (start_inferior): Adjust for mingw32 support. Flush
14424 standard error after writing to it.
14425 (attach_inferior): Likewise. Use protocol signal
14426 numbers.
14427 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14428 and names.
14429 * win32-i386-low.c: New file.
14430 * Makefile.in (XM_CLIBS): Set.
14431 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14432 (win32-i386-low.o): New dependency rule.
14433 * linux-low.c (linux_wait): Use target signal numbers.
14434 * target.h (struct target_ops): Doc fix.
14435 * server.h (target_signal_to_name): New prototype.
14436 * gdbreplay.c: Don't include headers unconditionally which
14437 are missing on mingw32. Include <winsock.h> for mingw32.
14438 (remote_close, remote_open): Adjust for Winsock support.
14439 * configure, config.in: Regenerated.
14440
14441 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14442
14443 * server.c (decode_xfer_read, write_qxfer_response): New.
14444 (handle_query): Take a packet length argument. Handle
14445 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14446 the qSupported response.
14447 (main): Update call to handle_query.
14448
14449 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14450
14451 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14452 (putpkt_binary): Renamed from putpkt and adjusted for binary
14453 data.
14454 (putpkt): New wrapper for putpkt_binary.
14455 (readchar): Don't mask off the high bit.
14456 (decode_X_packet): New function.
14457 * server.c (main): Call putpkt_binary if a handler sets the packet
14458 length. Save the length of the incoming packet. Handle 'X'.
14459 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14460
14461 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * server.c (handle_query): Handle qSupported.
14464
14465 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14466
14467 * remote-utils.c (all_symbols_looked_up): New variable.
14468 (look_up_one_symbol): Check it.
14469 * server.h (look_up_one_symbol): New declaration.
14470 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14471
14472 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * Makefile.in (linux-arm-low.o): Update dependencies.
14475 * linux-arm-low.c: Include "gdb_proc_service.h".
14476 (PTRACE_GET_THREAD_AREA): Define.
14477 (ps_get_thread_area): New function.
14478
14479 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14480
14481 * configure.srv (m68k*-*-uclinux*): New target.
14482 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14483 (linux_resume_one_process): Remove extraneous cast.
14484 (linux_read_offsets): New.
14485 (linux_target_op): Add linux_read_offsets on mmuless systems.
14486 * server.c (handle_query): Add qOffsets logic.
14487 * target.h (struct target_ops): Add read_offsets.
14488
14489 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14490
14491 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14492 (PTRACE_GET_THREAD_AREA): Define.
14493 (ps_get_thread_area): New function.
14494 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14495 (linux-x86-64-low.o): Update.
14496
14497 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14498
14499 * configure.ac: Remove checks for prfpregset_t.
14500 * gdb_proc_service.h: New file.
14501 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14502 new "gdb_proc_service.h".
14503 * proc-service.c: Likewise.
14504 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14505 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14506 * Makefile.in (gdb_proc_service_h): Updated.
14507 * configure, config.in: Regenerated.
14508
14509 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * remote-utils.c (prepare_resume_reply): Move declaration
14512 of gdb_id_from_wait to the top of the block.
14513
14514 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * linux-low.c (regsets_store_inferior_registers): Read the regset
14517 from the target before filling it.
14518
14519 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14520
14521 * server.c (attach_inferior): Return SIGTRAP for a successful
14522 attach.
14523
14524 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14525
14526 * Makefile.in (OBS): Add version.o.
14527 (STAGESTUFF): Delete.
14528 (version.o): Add dependencies.
14529 (version.c): Replace rule.
14530 (clean): Remove version.c.
14531 * server.c (gdbserver_version): New.
14532 (gdbserver_usage): Use printf.
14533 (main): Handle --version and --help.
14534 * server.h (version, host_name): Add declarations.
14535
14536 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14537
14538 * linux-arm-low.c:
14539 * linux-arm-low.c:
14540 * inferiors.c:
14541 * i387-fp.h:
14542 * i387-fp.c:
14543 * gdbreplay.c:
14544 * regcache.c:
14545 * proc-service.c:
14546 * mem-break.h:
14547 * mem-break.c:
14548 * linux-x86-64-low.c:
14549 * linux-sh-low.c:
14550 * linux-s390-low.c:
14551 * linux-ppc64-low.c:
14552 * linux-ppc-low.c:
14553 * linux-mips-low.c:
14554 * linux-m68k-low.c:
14555 * linux-m32r-low.c:
14556 * linux-low.h:
14557 * linux-low.c:
14558 * linux-ia64-low.c:
14559 * linux-i386-low.c:
14560 * linux-crisv32-low.c:
14561 * thread-db.c:
14562 * terminal.h:
14563 * target.h:
14564 * target.c:
14565 * server.h:
14566 * server.c:
14567 * remote-utils.c:
14568 * regcache.h:
14569 * utils.c:
14570 * Makefile.in:
14571 * configure.ac:
14572 * gdbserver.1: Add (C) after Copyright. Update the FSF
14573 address.
14574
14575 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14576
14577 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14578 (arm_breakpoint_at): Recognize both breakpoints.
14579 (the_low_target): Use the correct breakpoint instruction.
14580
14581 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14582
14583 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14584 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14585 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14586 (the_low_target): Update.
14587
14588 2005-10-25 Andreas Schwab <schwab@suse.de>
14589
14590 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14591
14592 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14593 (ia64_num_regs): Reduce to 462.
14594
14595 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14596
14597 * acinclude.m4: Correct quoting.
14598 * aclocal.m4: Regenerated.
14599
14600 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14601 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14602 (thread_db_init): Call thread_db_err_str.
14603 * configure.ac: Check for TD_VERSION.
14604 * config.in, configure: Regenerated.
14605
14606 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14607
14608 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14609
14610 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14613 is not available. Define HAVE_PTRACE_GETREGS if it is.
14614 * config.in, configure: Regenerated.
14615 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14616 * linux-i386-low.c, linux-m68k-low.c: Update to use
14617 HAVE_PTRACE_GETREGS.
14618 * linux-low.c (regsets_fetch_inferior_registers)
14619 (regsets_store_inferior_registers): Only return 0 if we processed
14620 GENERAL_REGS.
14621 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14622 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14623
14624 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * inferiors.c (struct thread_info): Add gdb_id.
14627 (add_thread): Add gdb_id argument.
14628 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14629 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14630 calls to add_thread.
14631 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14632 * server.c (handle_query): Use thread_to_gdb_id.
14633 (handle_v_cont, main): Use gdb_id_to_thread_id.
14634 * server.h (add_thread): Update prototype.
14635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14636 prototypes.
14637
14638 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14639
14640 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14641 left-padded registers.
14642 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14643 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14644
14645 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14646
14647 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14648 * configure: Regenerate.
14649 * config.in: Regenerate.
14650 * server.h (NEED_DECLARATION_STRERROR):
14651 Replace with !HAVE_DECL_STRERROR.
14652
14653 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14654
14655 * linux-low.c (linux_wait, linux_send_signal): Don't test
14656 an unsigned long variable for > 0 if it could be MAX_ULONG.
14657 * server.c (myresume): Likewise.
14658 * target.c (set_desired_inferior): Likewise.
14659
14660 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14661
14662 * configure.ac: Simplify and improve check for socklen_t.
14663 * configure, config.in: Regenerate.
14664
14665 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * acconfig.h: Remove.
14668 * configure.ac: Add a test for socklen_t. Use three-argument
14669 AC_DEFINE throughout.
14670 * config.in: Regenerated using autoheader 2.59.
14671 * configure: Regenerated.
14672
14673 * gdbreplay.c (socklen_t): Provide a default.
14674 (remote_open): Use socklen_t.
14675 * remote-utils.c (socklen_t): Provide a default.
14676 (remote_open): Use socklen_t.
14677 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14678 unsigned char.
14679
14680 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14681 char for buffers.
14682 * linux-low.c (linux_read_memory, linux_write_memory)
14683 (linux_read_auxv): Likewise.
14684 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14685 (check_mem_write): Likewise.
14686 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14687 Likewise.
14688 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14689 (registers_from_string, register_data): Likewise.
14690 * server.c (handle_query, main): Likewise.
14691 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14692 (decode_M_packet): Likewise.
14693 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14694 * target.h (struct target_ops): Update read_memory, write_memory,
14695 and read_auxv.
14696 (read_inferior_memory, write_inferior_memory): Update.
14697 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14698 to unsigned char *.
14699 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14700 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14701 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14702 linux-s390-low.c, linux-sh-low.c: Update for changes in
14703 read_inferior_memory and the_low_target->breakpoint.
14704
14705 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14706
14707 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14708 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14709 * configure.srv: Add powerpc64-*-linux*.
14710 * linux-ppc64-low.c: New file.
14711
14712 2005-05-23 Orjan Friberg <orjanf@axis.com>
14713
14714 * linux-cris-low.c: New file with support for CRIS.
14715 * linux-crisv32-low.c: Ditto for CRISv32.
14716 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14717 (clean): Add reg-cris.c and reg-crisv32.c.
14718 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14719 reg-crisv32.o, and reg-crisv32.c to make rules.
14720 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14721 recognized targets.
14722
14723 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14724
14725 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14726 of sizeof (PTRACE_XFER_TYPE).
14727 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14728
14729 2005-05-12 Orjan Friberg <orjanf@axis.com>
14730
14731 * target.h (struct target_ops): Add insert_watchpoint,
14732 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14733 pointers for hardware watchpoint support.
14734 * linux-low.h (struct linux_target_ops): Ditto.
14735 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14736 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14737 to linux_target_ops.
14738 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14739 reply packet.
14740 * server.c (main): Recognize 'Z' and 'z' packets.
14741
14742 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14743
14744 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14745 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14746 (the_low_target): Add new members.
14747
14748 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * proc-service.c (ps_lgetregs): Search all_processes instead of
14751 all_threads.
14752
14753 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14754
14755 * server.c (start_inferior): Change return type to int.
14756 (attach_inferior): Change sigptr to int *.
14757 (handle_v_cont, handle_v_requests): Change signal to int *.
14758 (main): Change signal to int.
14759
14760 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14761
14762 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14763 * configure.srv: Add m32r*-*-linux*.
14764 * linux-m32r-low.c: New file.
14765
14766 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14767
14768 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14769
14770 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14773 Take unsigned long arguments for PIDs.
14774 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14775 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14776 (wait_for_sigstop, linux_resume_one_process)
14777 (regsets_fetch_inferior_registers, linux_send_signal)
14778 (linux_read_auxv): Likewise. Update the types of variables holding
14779 PIDs. Update format string specifiers.
14780 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14781 * remote-utils.c (prepare_resume_reply): Likewise.
14782 * server.c (cont_thread, general_thread, step_thread)
14783 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14784 unsigned long.
14785 (handle_query): Update format specifiers.
14786 (handle_v_cont, main): Use strtoul for thread IDs.
14787 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14788 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14789 (general_thread, step_thread, thread_from_wait)
14790 (old_thread_from_wait): Update.
14791 * target.h (struct thread_resume): Use unsigned long for THREAD.
14792 (struct target_ops): Use unsigned long for arguments to attach and
14793 thread_alive.
14794
14795 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * acinclude.m4: Include bfd/bfd.m4 directly.
14798 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14799 <agriffis@toolchain.org>.
14800 * aclocal.m4, configure: Regenerated.
14801
14802 2005-01-07 Andrew Cagney <cagney@gnu.org>
14803
14804 * configure.ac: Rename configure.in, require autoconf 2.59.
14805 * configure: Re-generate.
14806
14807 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14808
14809 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14810 LIBS when finished.
14811 * aclocal.m4: Regenerated.
14812 * configure: Regenerated.
14813
14814 2004-11-21 Andreas Schwab <schwab@suse.de>
14815
14816 * linux-m68k-low.c (m68k_num_gregs): Define.
14817 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14818 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14819 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14820 (m68k_breakpoint_at): New. Add to the_low_target.
14821
14822 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14823 srv_linux_thread_db to yes.
14824
14825 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14826
14827 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14828 (ARCH_SET_FS): Likewise.
14829 (ARCH_GET_FS): Likewise.
14830 (ARCH_GET_GS): Likewise.
14831
14832 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14833
14834 * linux-i386-low.c (ps_get_thread_area): New.
14835 * linux-x86-64-low.c (ps_get_thread_area): New.
14836 * linux-low.c: Include <sys/syscall.h>.
14837 (linux_kill_one_process): Don't kill the first thread here.
14838 (linux_kill): Kill the first thread here.
14839 (kill_lwp): New function.
14840 (send_sigstop, linux_send_signal): Use it.
14841 * proc-service.c: Clean up #ifdefs.
14842 (fpregset_info): Delete.
14843 (ps_lgetregs): Update and enable implementation.
14844 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14845 implementations.
14846 * remote-utils.c (struct sym_cache, symbol_cache): New.
14847 (input_interrupt): Print a clearer message.
14848 (async_io_enabled): New variable.
14849 (enable_async_io, disable_async_io): Use it. Update comments.
14850 (look_up_one_symbol): Use the symbol cache.
14851 * thread-db.c (thread_db_look_up_symbols): New function.
14852 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14853
14854 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14855
14856 * configure.in: Test for -rdynamic.
14857 * configure: Regenerated.
14858 * Makefile (INTERNAL_LDFLAGS): New.
14859 (gdbserver, gdbreplay): Use it.
14860
14861 2004-09-02 Andrew Cagney <cagney@gnu.org>
14862
14863 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14864
14865 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14866
14867 * linux-low.c (linux_wait): Clear all_processes list also.
14868
14869 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14870
14871 * linux-low.c: Include <errno.h>. Remove extern declaration of
14872 errno.
14873
14874 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14875
14876 * gdbreplay.c, server.h, utils.c: Update copyright years.
14877
14878 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14879
14880 * server.c (main): Print child status or termination signal from
14881 variable 'signal', not 'sig'.
14882
14883 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14884
14885 * linux-low.c (linux_read_memory): Change return type to
14886 int. Check for and return error from ptrace().
14887 * target.c (read_inferior_memory): Change return type to int. Pass
14888 back return status from the_target->read_memory().
14889 * target.h (struct target_ops): Adapt *read_memory() prototype.
14890 Update comment.
14891 (read_inferior_memory): Adapt prototype.
14892 * server.c (main): Return an error packet if
14893 read_inferior_memory() returns an error.
14894
14895 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14898 Unify with other clean targets.
14899
14900 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14901
14902 * server.c (handle_v_cont): Call set_desired_inferior.
14903
14904 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14905
14906 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14907
14908 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14909
14910 * linux-low.c (linux_wait): Unblock async I/O.
14911 (linux_resume): Block and enable async I/O.
14912 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14913 * server.h (block_async_io, unblock_async_io): Add prototypes.
14914
14915 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14916
14917 * remote-utils.c (remote_open): Print a status notice after
14918 opening a TCP port.
14919 * server.c (attach_inferior): Print a status notice after
14920 attaching.
14921
14922 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14923
14924 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14925
14926 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14927
14928 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14929 error packet.
14930 * server.c, target.h: Update copyright years.
14931
14932 2004-02-25 Roland McGrath <roland@redhat.com>
14933
14934 * target.h (struct target_ops): New member `read_auxv'.
14935 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14936 * linux-low.c (linux_read_auxv): New function.
14937 (linux_target_ops): Initialize `read_auxv' member to that.
14938
14939 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14940
14941 Committed by Jim Blandy <jimb@redhat.com>.
14942
14943 * linux-s390-low.c (s390_num_regs): Update.
14944 (s390_regmap): Remove control registers. Use __s390x__ predefine
14945 instead of GPR_SIZE to distiguish s390 and s390x targets.
14946
14947 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14948
14949 * linux-low.c: Update copyright year.
14950 (check_removed_breakpoint): Clear pending_is_breakpoint.
14951 (linux_set_resume_request, linux_queue_one_thread)
14952 (resume_status_pending_p): New functions.
14953 (linux_continue_one_thread): Use process->resume.
14954 (linux_resume): Only resume threads if there are no pending events.
14955 * linux-low.h (struct process_info): Add resume request
14956 pointer.
14957
14958 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14959
14960 * regcache.c (new_register_cache): Clear the allocated register
14961 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14962
14963 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14964
14965 * linux-low.c (linux_resume): Take a struct thread_resume *
14966 argument.
14967 (linux_wait): Update call.
14968 (resume_ptr): New static variable.
14969 (linux_continue_one_thread): Renamed from
14970 linux_continue_one_process. Use resume_ptr.
14971 (linux_resume): Use linux_continue_one_thread.
14972 * server.c (handle_v_cont, handle_v_requests): New functions.
14973 (myresume): New function.
14974 (main): Handle 'v' case.
14975 * target.h (struct thread_resume): New type.
14976 (struct target_ops): Change argument of "resume" to struct
14977 thread_resume *.
14978 (myresume): Delete macro.
14979
14980 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14981
14982 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14983 (uninstall): Support DESTDIR.
14984
14985 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14986
14987 * configure.srv: Add xscale*linux copy of arm*linux entry.
14988
14989 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14990
14991 * linux-arm-low.c (arm_reinsert_addr): New function.
14992 (the_low_target): Add arm_reinsert_addr.
14993
14994 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14995
14996 * mem-break.c: Remove whitespace at end of file.
14997
14998 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14999
15000 * configure.in: Check whether we need to prototype strerror.
15001 * server.h: Optionally prototype strerror.
15002 * gdbreplay.c (perror_with_name): Use strerror.
15003 * linux-low.c (linux_attach_lwp): Use strerror.
15004 * utils.c (perror_with_name): Use strerror.
15005 * config.in, configure: Regenerated.
15006
15007 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15008
15009 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15010 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15011
15012 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15013
15014 * Makefile.in (SFILES): Update.
15015 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15016 low-sun3.c: Remove files.
15017
15018 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15019
15020 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15021 (linux_detach_one_process, linux_detach): New functions.
15022 (linux_target_ops): Add linux_detach.
15023 * server.c (main): Handle 'D' packet.
15024 * target.h (struct target_ops): Add "detach" member.
15025 (detach_inferior): Define.
15026
15027 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15028
15029 From Kelley Cook <kelleycook@wideopenwest.com>:
15030 * configure.srv: Accept i[34567]86 variants.
15031
15032 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15033
15034 * linux-low.c (linux_wait_for_event): Correct comment typos.
15035 (linux_resume_one_process): Call check_removed_breakpoint.
15036 (linux_send_signal): New function.
15037 (linux_target_ops): Add linux_send_signal.
15038 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15039 of kill.
15040 * target.h (struct target_ops): Add send_signal.
15041
15042 2003-05-29 Jim Blandy <jimb@redhat.com>
15043
15044 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15045 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15046 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15047 away part of the register's value.
15048
15049 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15050
15051 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15052 (linux_wait_for_event, linux_init_signals): Likewise.
15053
15054 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15055
15056 * configure.in: Check for stdlib.h.
15057 * configure: Regenerated.
15058 * config.in: Regenerated.
15059
15060 2003-01-04 Andreas Schwab <schwab@suse.de>
15061
15062 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15063
15064 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15065
15066 * Makefile.in: Remove obsolete code.
15067
15068 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15069
15070 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15071 defined(PT_FPR0_HI).
15072
15073 2002-11-17 Stuart Hughes <seh@zee2.com>
15074
15075 * linux-arm-low.c (arm_num_regs): Increase.
15076 (arm_regmap): Include status register.
15077
15078 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15079
15080 * linux-low.c (register_addr): Remove incorrect -1 check.
15081
15082 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15083
15084 * linux-low.c (linux_create_inferior): Call setpgid. Return
15085 the new PID.
15086 (unstopped_p, linux_signal_pid): Remove.
15087 (linux_target_ops): Remove linux_signal_pid.
15088 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15089 global instead of target method.
15090 * target.h (struct target_ops): Remove signal_pid. Update comment
15091 for create_inferior.
15092 * server.c (signal_pid): New variable.
15093 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15094 gdbserver. Set the child to be the foreground process group.
15095 (attach_inferior): Set signal_pid.
15096
15097 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15098
15099 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15100
15101 2002-08-20 Jim Blandy <jimb@redhat.com>
15102
15103 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15104 default for this.
15105
15106 2002-08-01 Andrew Cagney <cagney@redhat.com>
15107
15108 * Makefile.in: Make chill references obsolete.
15109
15110 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15111
15112 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15113 * configure: Regenerate.
15114 * config.in: Regenerate.
15115
15116 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15117
15118 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15119 (perror_with_name, remote_close, remote_open, expect, play): Static.
15120
15121 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15122
15123 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15124 byte offsets instead of an array of indexes.
15125 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15126
15127 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15128
15129 * regcache.c: Add comment.
15130
15131 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15132
15133 * thread-db.c: New file.
15134 * proc-service.c: New file.
15135 * acinclude.m4: New file.
15136 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15137 proc-service.o, and thread-db.o.
15138 (linux-low.o): Add USE_THREAD_DB.
15139 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15140 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15141 * aclocal.m4: Regenerated.
15142 * config.in: Regenerated.
15143 * configure: Regenerated.
15144 * configure.in: Check for proc_service.h, sys/procfs.h,
15145 thread_db.h, and linux/elf.h headrs.
15146 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15147 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15148 Check for -lthread_db and thread support.
15149 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15150 PowerPC, and SuperH.
15151 * i387-fp.c: Constify arguments.
15152 * i387-fp.h: Likewise.
15153 * inferiors.c: (struct thread_info): Renamed from
15154 `struct inferior_info'. Remove PID member. Use generic inferior
15155 list header. All uses updated.
15156 (inferiors, signal_pid): Removed.
15157 (all_threads): New variable.
15158 (get_thread): Define.
15159 (add_inferior_to_list): New function.
15160 (for_each_inferior): New function.
15161 (change_inferior_id): New function.
15162 (add_inferior): Removed.
15163 (remove_inferior): New function.
15164 (add_thread): New function.
15165 (free_one_thread): New function.
15166 (remove_thread): New function.
15167 (clear_inferiors): Use for_each_inferior and free_one_thread.
15168 (find_inferior): New function.
15169 (find_inferior_id): New function.
15170 (inferior_target_data): Update argument type.
15171 (set_inferior_target_data): Likewise.
15172 (inferior_regcache_data): Likewise.
15173 (set_inferior_regcache_data): Likewise.
15174 * linux-low.c (linux_bp_reinsert): Remove.
15175 (all_processes, stopping_threads, using_thrads)
15176 (struct pending_signals, debug_threads, pid_of): New.
15177 (inferior_pid): Replace with macro.
15178 (struct inferior_linux_data): Remove.
15179 (get_stop_pc, add_process): New functions.
15180 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15181 Use add_process and add_thread.
15182 (linux_attach_lwp): New function, based on old linux_attach. Use
15183 add_process and add_thread. Set stop_expected for new threads.
15184 (linux_attach): New function.
15185 (linux_kill_one_process): New function.
15186 (linux_kill): Kill all LWPs.
15187 (linux_thread_alive): Use find_inferior_id.
15188 (check_removed_breakpoints, status_pending_p): New functions.
15189 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15190 Update. Use WNOHANG. Wait for cloned processes also. Update process
15191 struct for the found process.
15192 (linux_wait_for_event): New function.
15193 (linux_wait): Use it. Support LWPs.
15194 (send_sigstop, wait_for_sigstop, stop_all_processes)
15195 (linux_resume_one_process, linux_continue_one_process): New functions.
15196 (linux_resume): Support LWPs.
15197 (REGISTER_RAW_SIZE): Remove.
15198 (fetch_register): Use register_size instead. Call supply_register.
15199 (usr_store_inferior_registers): Likewise. Call collect_register.
15200 Fix recursive case.
15201 (regsets_fetch_inferior_registers): Improve error message.
15202 (regsets_store_inferior_registers): Add debugging.
15203 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15204 (unstopped_p, linux_signal_pid): New functions.
15205 (linux_target_ops): Add linux_signal_pid.
15206 (linux_init_signals): New function.
15207 (initialize_low): Call it. Initialize using_threads.
15208 * regcache.c (inferior_regcache_data): Add valid
15209 flag.
15210 (get_regcache): Fetch registers lazily. Add fetch argument
15211 and update all callers.
15212 (regcache_invalidate_one, regcache_invalidate): New
15213 functions.
15214 (new_register_cache): Renamed from create_register_cache.
15215 Return the new regcache.
15216 (free_register_cache): Change argument to a void *.
15217 (registers_to_string, registers_from_string): Call get_regcache
15218 with fetch flag set.
15219 (register_data): Make static. Pass fetch flag to get_regcache.
15220 (supply_register): Call get_regcache with fetch flag clear.
15221 (collect_register): Call get_regcache with fetch flag set.
15222 (collect_register_as_string): New function.
15223 * regcache.h: Update.
15224 * remote-utils.c (putpkt): Flush after debug output and use
15225 stderr.
15226 Handle input interrupts while waiting for an ACK.
15227 (input_interrupt): Use signal_pid method.
15228 (getpkt): Flush after debug output and use stderr.
15229 (outreg): Use collect_register_as_string.
15230 (new_thread_notify, dead_thread_notify): New functions.
15231 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15232 and general_thread.
15233 (look_up_one_symbol): Flush after debug output.
15234 * server.c (step_thread, server_waiting): New variables.
15235 (start_inferior): Don't use signal_pid. Update call to mywait.
15236 (attach_inferior): Update call to mywait.
15237 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15238 (main): Don't fetch/store registers explicitly. Use
15239 set_desired_inferior. Support proposed ``Hs'' packet. Update
15240 calls to mywait.
15241 * server.h: Update.
15242 (struct inferior_list, struct_inferior_list_entry): New.
15243 * target.c (set_desired_inferior): New.
15244 (write_inferior_memory): Constify.
15245 (mywait): New function.
15246 * target.h: Update.
15247 (struct target_ops): New signal_pid method.
15248 (mywait): Removed macro, added prototype.
15249
15250 * linux-low.h (regset_func): Removed.
15251 (regset_fill_func, regset_store_func): New.
15252 (enum regset_type): New.
15253 (struct regset_info): Add type field. Use new operation types.
15254 (struct linux_target_ops): stop_pc renamed to get_pc.
15255 Add decr_pc_after_break and breakpoint_at.
15256 (get_process, get_thread_proess, get_process_thread)
15257 (strut process_info, all_processes, linux_attach_lwp)
15258 (thread_db_init): New.
15259
15260 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15261 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15262 (the_low_target): Add new members.
15263 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15264 (i386_store_fpxregset): Constify.
15265 (target_regsets): Add new kind identifier.
15266 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15267 (i386_set_pc): Add debugging.
15268 (i386_breakpoint_at): New function.
15269 (the_low_target): Add new members.
15270 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15271 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15272 (mips_breakpoint_at): New.
15273 (the_low_target): Add new members.
15274 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15275 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15276 (the_low_target): Add new members.
15277 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15278 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15279 (the_low_target): Add new members.
15280 * linux-x86-64-low.c (target_regsets): Add new kind
15281 identifier.
15282
15283 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15284
15285 From Martin Pool <mbp@samba.org>:
15286 * server.c (gdbserver_usage): New function.
15287 (main): Call it.
15288
15289 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15290
15291 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15292 stop_at -> stop_pc.
15293
15294 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15295
15296 * Makefile.in: Remove obsolete code.
15297
15298 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15299
15300 * linux-low.c (regsets_fetch_inferior_registers),
15301 (regsets_store_inferior_registers): Removed cast to int from
15302 ptrace() calls.
15303 * regcache.h: Added declaration of struct inferior_info.
15304
15305 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15306
15307 * inferiors.c (struct inferior_info): Add regcache_data.
15308 (add_inferior): Call create_register_cache.
15309 (clear_inferiors): Call free_register_cache.
15310 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15311 * regcache.c (struct inferior_regcache_data): New.
15312 (registers): Remove.
15313 (get_regcache): New function.
15314 (create_register_cache, free_register_cache): New functions.
15315 (set_register_cache): Don't initialize the register cache here.
15316 (registers_to_string, registers_from_string, register_data): Call
15317 get_regcache.
15318 * regcache.h: Add prototypes.
15319 * server.h: Likewise.
15320
15321 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15322
15323 * mem-break.c: New file.
15324 * mem-break.h: New file.
15325 * Makefile.in: Add mem-break.o rule; update server.h
15326 dependencies.
15327 * inferiors.c (struct inferior_info): Add target_data
15328 member.
15329 (clear_inferiors): Free target_data member if set.
15330 (inferior_target_data, set_inferior_target_data): New functions.
15331 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15332 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15333 * linux-low.c (linux_bp_reinsert): New variable.
15334 (struct inferior_linux_data): New.
15335 (linux_create_inferior): Use set_inferior_target_data.
15336 (linux_attach): Likewise. Call add_inferior.
15337 (linux_wait_for_one_inferior): New function.
15338 (linux_wait): Call it.
15339 (linux_write_memory): Add const.
15340 (initialize_low): Call set_breakpoint_data.
15341 * linux-low.h (struct linux_target_ops): Add breakpoint
15342 handling members.
15343 * server.c (attach_inferior): Remove extra add_inferior
15344 call.
15345 * server.h: Include mem-break.h. Update inferior.c
15346 prototypes.
15347 * target.c (read_inferior_memory)
15348 (write_inferior_memory): New functions.
15349 * target.h (read_inferior_memory)
15350 (write_inferior_memory): Change macros to prototypes.
15351 (struct target_ops): Update comments. Add const to write_memory
15352 definition.
15353
15354 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15355
15356 * linux-low.c (usr_store_inferior_registers): Support
15357 registers which are allowed to fail to store.
15358 * linux-low.h (linux_target_ops): Likewise.
15359 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15360 (ppc_cannot_store_register): FPSCR may not be storable.
15361
15362 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15363
15364 * server.h: Include <string.h> if HAVE_STRING_H.
15365 * ChangeLog: Correct paths in last ChangeLog entry.
15366
15367 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * linux-low.h: Remove obsolete prototypes.
15370 (struct linux_target_ops): New.
15371 (extern the_low_target): New.
15372 * linux-low.c (num_regs, regmap): Remove declarations.
15373 (register_addr): Use the_low_target explicitly.
15374 (fetch_register): Likewise.
15375 (usr_fetch_inferior_registers): Likewise.
15376 (usr_store_inferior_registers): Likewise.
15377 * linux-arm-low.c (num_regs): Remove.
15378 (arm_num_regs): Define.
15379 (arm_regmap): Renamed from regmap, made static.
15380 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15381 made static.
15382 (arm_cannot_store_register): Renamed from cannot_store_register,
15383 made static.
15384 (the_low_target): New.
15385 * linux-i386-low.c (num_regs): Remove.
15386 (i386_num_regs): Define.
15387 (i386_regmap): Renamed from regmap, made static.
15388 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15389 made static.
15390 (i386_cannot_store_register): Renamed from cannot_store_register,
15391 made static.
15392 (the_low_target): New.
15393 * linux-ia64-low.c (num_regs): Remove.
15394 (ia64_num_regs): Define.
15395 (ia64_regmap): Renamed from regmap, made static.
15396 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15397 made static.
15398 (ia64_cannot_store_register): Renamed from cannot_store_register,
15399 made static.
15400 (the_low_target): New.
15401 * linux-m68k-low.c (num_regs): Remove.
15402 (m68k_num_regs): Define.
15403 (m68k_regmap): Renamed from regmap, made static.
15404 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15405 made static.
15406 (m68k_cannot_store_register): Renamed from cannot_store_register,
15407 made static.
15408 (the_low_target): New.
15409 * linux-mips-low.c (num_regs): Remove.
15410 (mips_num_regs): Define.
15411 (mips_regmap): Renamed from regmap, made static.
15412 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15413 made static.
15414 (mips_cannot_store_register): Renamed from cannot_store_register,
15415 made static.
15416 (the_low_target): New.
15417 * linux-ppc-low.c (num_regs): Remove.
15418 (ppc_num_regs): Define.
15419 (ppc_regmap): Renamed from regmap, made static.
15420 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15421 made static.
15422 (ppc_cannot_store_register): Renamed from cannot_store_register,
15423 made static.
15424 (the_low_target): New.
15425 * linux-s390-low.c (num_regs): Remove.
15426 (s390_num_regs): Define.
15427 (s390_regmap): Renamed from regmap, made static.
15428 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15429 made static.
15430 (s390_cannot_store_register): Renamed from cannot_store_register,
15431 made static.
15432 (the_low_target): New.
15433 * linux-sh-low.c (num_regs): Remove.
15434 (sh_num_regs): Define.
15435 (sh_regmap): Renamed from regmap, made static.
15436 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15437 made static.
15438 (sh_cannot_store_register): Renamed from cannot_store_register,
15439 made static.
15440 (the_low_target): New.
15441 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15442 (the_low_target): New.
15443
15444 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15445
15446 * Makefile.in: Add stamp-h target.
15447 * configure.in: Create stamp-h.
15448 * configure: Regenerated.
15449
15450 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15451
15452 * inferiors.c: New file.
15453 * target.c: New file.
15454 * target.h: New file.
15455 * Makefile.in: Add target.o and inferiors.o. Update
15456 dependencies.
15457 * linux-low.c (inferior_pid): New static variable,
15458 moved from server.c.
15459 (linux_create_inferior): Renamed from create_inferior.
15460 Call add_inferior. Return 0 on success instead of a PID.
15461 (linux_attach): Renamed from myattach.
15462 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15463 (linux_thread_alive): Renamed from mythread_alive.
15464 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15465 child dies.
15466 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15467 (regsets_store_inferior_registers): Correct error message.
15468 Add missing ``return 0''.
15469 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15470 (linux_store_registers): Renamed from store_inferior_registers.
15471 (linux_read_memory): Renamed from read_inferior_memory.
15472 (linux_write_memory): Renamed from write_inferior_memory.
15473 (linux_target_ops): New structure.
15474 (initialize_low): Call set_target_ops ().
15475 * remote-utils.c (unhexify): New function.
15476 (hexify): New function.
15477 (input_interrupt): Send signals to ``signal_pid''.
15478 * server.c (inferior_pid): Remove.
15479 (start_inferior): Update create_inferior call.
15480 (attach_inferior): Call add_inferior.
15481 (handle_query): New function.
15482 (main): Call handle_query for `q' packets.
15483 * server.h: Include "target.h". Remove obsolete prototypes.
15484 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15485
15486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15487
15488 * Makefile.in: Add WARN_CFLAGS. Update configury
15489 dependencies.
15490 * configure.in: Check for <string.h>
15491 * configure: Regenerate.
15492 * config.in: Regenerate.
15493 * gdbreplay.c: Include needed system headers.
15494 (remote_open): Remove strchr prototype.
15495 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15496 * regcache.c (supply_register): Change buf argument to const void *.
15497 (supply_register_by_name): Likewise.
15498 (collect_register): Change buf argument to void *.
15499 (collect_register_by_name): Likewise.
15500 * regcache.h: Add missing prototypes.
15501 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15502 * server.c (handle_query): New function.
15503 (attached): New static variable, moved out of main.
15504 (main): Quiet longjmp clobber warnings.
15505 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15506 * utils.c (error): Remove NORETURN.
15507 (fatal): Likewise.
This page took 0.333399 seconds and 5 git commands to generate.