]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Ensure coff-ppc local symbols are zero terminated
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
87f6c4e3
GB
12014-08-06 Gary Benson <gbenson@redhat.com>
2
3 * regcache.c (init_register_cache): Move conditionals inside if.
4
7089dca4
GB
52014-08-06 Gary Benson <gbenson@redhat.com>
6
7 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8
462f517e
GB
92014-07-31 Gary Benson <gbenson@redhat.com>
10
11 * ax.h: Do not include server.h.
12 * gdbthread.h: Likewise.
13 * lynx-low.h: Likewise.
14 * notif.h: Likewise.
15
976411d6
GB
162014-07-30 Gary Benson <gbenson@redhat.com>
17
18 * server.h: Include common-defs.h.
19 Do not include config.h or build-gnulib-gdbserver/config.h.
20
d41f6d8e
GB
212014-07-30 Gary Benson <gbenson@redhat.com>
22
23 * hostio-errno.c: Move server.h to top of includes list.
24 * inferiors.c: Likewise.
25 * linux-x86-low.c: Likewise.
26 * notif.c: Include server.h.
27
314c6a35
TT
282014-07-24 Tom Tromey <tromey@redhat.com>
29 Gary Benson <gbenson@redhat.com>
30
31 * server.h (CORE_ADDR): Now unsigned.
32
69ff6be5
PA
332014-07-16 Pedro Alves <palves@redhat.com>
34
35 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
36
ce9e3fe7
PA
372014-07-15 Pedro Alves <palves@redhat.com>
38
39 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
40 copy.
41
e76126e8
PA
422014-07-11 Pedro Alves <palves@redhat.com>
43
44 * linux-low.c (kill_wait_lwp): New function, based on
45 kill_one_lwp_callback, but use my_waitpid directly.
46 (kill_one_lwp_callback, linux_kill): Use it.
47
8e9db26e
PA
482014-06-23 Pedro Alves <palves@redhat.com>
49
50 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
51 before setting DR0..DR3.
52
698b3e08
GB
532014-06-20 Gary Benson <gbenson@redhat.com>
54
55 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
56 * configure: Regenerated.
57 * config.in: Likewise.
58
125f8a3d
GB
592014-06-20 Gary Benson <gbenson@redhat.com>
60
61 * Makefile.in (SFILES): Update locations for files moved
62 from common to nat.
63 (object file files): Reordered.
64
42995dbd
GB
652014-06-20 Gary Benson <gbenson@redhat.com>
66
67 * i386-low.h (i386_dr_low_can_set_addr): Removed.
68 (i386_dr_low_set_addr): Likewise.
69 (i386_dr_low_get_addr): Likewise.
70 (i386_dr_low_can_set_control): Likewise.
71 (i386_dr_low_set_control): Likewise.
72 (i386_dr_low_get_control): Likewise.
73 (i386_dr_low_get_status): Likewise.
74 (i386_get_debug_register_length): Likewise.
75 * linux-x86-low.c (i386_dr_low_set_addr):
76 Changed signature. Made static.
77 (i386_dr_low_get_addr): Likewise.
78 (i386_dr_low_set_control): Likewise.
79 (i386_dr_low_get_control): Likewise.
80 (i386_dr_low_get_status): Likewise.
81 (i386_dr_low): New global variable.
82 * win32-i386-low.c (i386_dr_low_set_addr):
83 Changed signature. Made static.
84 (i386_dr_low_get_addr): Likewise.
85 (i386_dr_low_set_control): Likewise.
86 (i386_dr_low_get_control): Likewise.
87 (i386_dr_low_get_status): Likewise.
88 (i386_dr_low): New global variable.
89
e1d2394b
MS
902014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
91
92 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
93 * Makefile.in (AR, AR_FLAGS): Define.
94 * configure: Regenerate.
95
3a8ee006
GB
962014-06-19 Gary Benson <gbenson@redhat.com>
97
98 * Makefile.in (i386-dregs.o): New rule.
99 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
100 * i386-low.c (target.h): Remove include.
101 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
102 (DR_CONTROL_SHIFT): Likewise.
103 (DR_CONTROL_SIZE): Likewise.
104 (DR_RW_EXECUTE): Likewise.
105 (DR_RW_WRITE): Likewise.
106 (DR_RW_READ): Likewise.
107 (DR_RW_IORW): Likewise.
108 (DR_LEN_1): Likewise.
109 (DR_LEN_2): Likewise.
110 (DR_LEN_4): Likewise.
111 (DR_LEN_8): Likewise.
112 (DR_LOCAL_ENABLE_SHIFT): Likewise.
113 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
114 (DR_ENABLE_SIZE): Likewise.
115 (DR_LOCAL_SLOWDOWN): Likewise.
116 (DR_GLOBAL_SLOWDOWN): Likewise.
117 (DR_CONTROL_RESERVED): Likewise.
118 (I386_DR_CONTROL_MASK): Likewise.
119 (I386_DR_VACANT): Likewise.
120 (I386_DR_LOCAL_ENABLE): Likewise.
121 (I386_DR_GLOBAL_ENABLE): Likewise.
122 (I386_DR_DISABLE): Likewise.
123 (I386_DR_SET_RW_LEN): Likewise.
124 (I386_DR_GET_RW_LEN): Likewise.
125 (I386_DR_WATCH_HIT): Likewise.
126 (i386_wp_op_t): Likewise.
127 (i386_show_dr): Likewise.
128 (i386_length_and_rw_bits): Likewise.
129 (i386_insert_aligned_watchpoint): Likewise.
130 (i386_remove_aligned_watchpoint): Likewise.
131 (i386_handle_nonaligned_watchpoint): Likewise.
132 i386_update_inferior_debug_regs(): Likewise.
133 (i386_dr_insert_watchpoint): Likewise.
134 (i386_dr_remove_watchpoint): Likewise.
135 (i386_dr_region_ok_for_watchpoint): Likewise.
136 (i386_dr_stopped_data_address): Likewise.
137 (i386_dr_stopped_by_watchpoint): Likewise.
138
8f26655c
GB
1392014-06-19 Gary Benson <gbenson@redhat.com>
140
141 * i386-low.c (i386_dr_show): Renamed to
142 i386_show_dr and made static. All uses updated.
143 (i386_dr_length_and_rw_bits): Renamed to
144 i386_length_and_rw_bits and made static.
145 All uses updated.
146 (i386_dr_insert_aligned_watchpoint): Renamed to
147 i386_insert_aligned_watchpoint and made static.
148 All uses updated.
149 (i386_dr_remove_aligned_watchpoint): Renamed to
150 i386_remove_aligned_watchpoint and made static.
151 All uses updated.
152 (i386_dr_update_inferior_debug_regs): Renamed to
153 i386_update_inferior_debug_regs and made static.
154 All uses updated.
155
b9228891
GB
1562014-06-18 Gary Benson <gbenson@redhat.com>
157
5171def3
GB
158 * i386-low.h (i386_dr_low_can_set_addr): New macro.
159 (i386_dr_low_can_set_control): Likewise.
160 (i386_get_debug_register_length): Likewise.
161 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
162 (i386_dr_low_can_set_control): Likewise.
163 (i386_get_debug_register_length): Likewise.
164
1652014-06-17 Gary Benson <gbenson@redhat.com>
166
b9228891
GB
167 * i386-low.h (i386-dregs.h): New include.
168 (DR_FIRSTADDR): Now in i386-dregs.h.
169 (DR_LASTADDR): Likewise.
170 (DR_NADDR): Likewise.
171 (DR_STATUS): Likewise.
172 (DR_CONTROL): Likewise.
173 (i386_debug_reg_state): Likewise.
174 (i386_dr_insert_watchpoint): Likewise.
175 (i386_dr_remove_watchpoint): Likewise.
176 (i386_dr_region_ok_for_watchpoint): Likewise.
177 (i386_dr_stopped_data_address): Likewise.
178 (i386_dr_stopped_by_watchpoint): Likewise.
179 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
180
4be83cc2
GB
1812014-06-18 Gary Benson <gbenson@redhat.com>
182
183 * i386-low.h (i386_low_insert_watchpoint): Renamed to
184 i386_dr_insert_watchpoint.
185 (i386_low_remove_watchpoint): Renamed to
186 i386_dr_remove_watchpoint.
187 (i386_low_region_ok_for_watchpoint): Renamed to
188 i386_dr_region_ok_for_watchpoint.
189 (i386_low_stopped_data_address): Renamed to
190 i386_dr_stopped_data_address.
191 (i386_low_stopped_by_watchpoint): Renamed to
192 i386_dr_stopped_by_watchpoint.
193 * i386-low.c (i386_show_dr): Renamed to
194 i386_dr_show and made nonstatic. All uses updated.
195 (i386_length_and_rw_bits): Renamed to
196 i386_dr_length_and_rw_bits and made nonstatic.
197 All uses updated.
198 (i386_insert_aligned_watchpoint): Renamed to
199 i386_dr_insert_aligned_watchpoint and made nonstatic.
200 All uses updated.
201 (i386_remove_aligned_watchpoint): Renamed to
202 i386_dr_remove_aligned_watchpoint and made nonstatic.
203 All uses updated.
204 (i386_update_inferior_debug_regs): Renamed to
205 i386_dr_update_inferior_debug_regs and made nonstatic.
206 All uses updated.
207 (i386_low_insert_watchpoint): Renamed to
208 i386_dr_insert_watchpoint. All uses updated.
209 (i386_low_remove_watchpoint): Renamed to
210 i386_dr_remove_watchpoint. All uses updated.
211 (i386_low_region_ok_for_watchpoint): Renamed to
212 i386_dr_region_ok_for_watchpoint. All uses updated.
213 (i386_low_stopped_data_address): Renamed to
214 i386_dr_stopped_data_address. All uses updated.
215 (i386_low_stopped_by_watchpoint): Renamed to
216 i386_dr_stopped_by_watchpoint. All uses updated.
217
131aa0d4
GB
2182014-06-18 Gary Benson <gbenson@redhat.com>
219
220 * i386-low.c (i386_dr_low_can_set_addr): New macro.
221 (i386_dr_low_can_set_control): Likewise.
222 (i386_insert_aligned_watchpoint): New check.
223
d9305f7f
GB
2242014-06-18 Gary Benson <gbenson@redhat.com>
225
226 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
227 Renamed to state.
228
e927c9fc
GB
2292014-06-18 Gary Benson <gbenson@redhat.com>
230
231 * i386-low.c (i386_length_and_rw_bits): Use internal_error
232 instead of fatal and error.
233 (i386_handle_nonaligned_watchpoint): Likewise.
234
1b6d4134
GB
2352014-06-18 Gary Benson <gbenson@redhat.com>
236
237 * i386-low.c (i386_get_debug_register_length): New macro.
238 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
239 (i386_show_dr): Use debug_printf instead of fprintf. Use
240 phex to format values.
241
6e62758f
GB
2422014-06-18 Gary Benson <gbenson@redhat.com>
243
244 * i386-low.h: Comment changes.
245 * i386-low.c: Likewise.
246
fc6e2f03
GB
2472014-06-18 Gary Benson <gbenson@redhat.com>
248
249 * i386-low.c: Whitespace changes.
250
f9d1eeed
TT
2512014-06-12 Tom Tromey <tromey@redhat.com>
252
253 * utils.c (freeargv): Remove.
254
0b04e523
TT
2552014-06-12 Tom Tromey <tromey@redhat.com>
256
257 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
258 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
259 (parse_debug_format_options): Likewise.
260 (gdbserver_usage): Likewise.
261 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
262 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
263 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
264 against libiberty.
265 ($(LIBGNU)): Depend on libiberty.
266 (all-lib): Recurse into all subdirs.
267 (install-only): Invoke "install" target in subdirs.
268 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
269 targets.
270 * configure: Rebuild.
271 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
272 for vasprintf, vsnprintf, or gettimeofday.
273 * configure.srv: Don't add safe-ctype.o or lbasename.o to
274 srv_tgtobj.
275
270c9937
JB
2762014-06-05 Joel Brobecker <brobecker@adacore.com>
277
278 * development.sh: Delete.
279 * Makefile.in (config.status): Adjust dependency on development.sh.
280 * configure.ac: Adjust development.sh source call.
281 * configure: Regenerate.
282
0a261ed8
PA
2832014-06-02 Pedro Alves <palves@redhat.com>
284
285 * ax.c (gdb_free_agent_expr): New function.
286 * ax.h (gdb_free_agent_expr): New declaration.
287 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
288 list.
289 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
290 static.
291 (clear_breakpoint_conditions_and_commands): New function.
292 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
293 (clear_breakpoint_conditions_and_commands): New declaration.
294
e9dae05e
RR
2952014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
296
297 * linux-aarch64-low.c (asm/ptrace.h): Include.
298
5876f503
JK
2992014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
300
301 Fix TLS access for -static -pthread.
302 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
303 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
304 (thread_db_load_search, try_thread_db_load_1): Initialize it.
305
802e8e6d
PA
3062014-05-20 Pedro Alves <palves@redhat.com>
307
308 * linux-aarch64-low.c (aarch64_insert_point)
309 (aarch64_remove_point): No longer check whether the type is
310 supported here. Adjust to new interface.
311 (the_low_target): Install aarch64_supports_z_point_type as
312 supports_z_point_type method.
313 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
314 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
315 instead of a Z packet char. Adjust.
316 (arm_supports_z_point_type): New function.
317 (arm_insert_point, arm_remove_point): Adjust to new interface.
318 (the_low_target): Install arm_supports_z_point_type.
319 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
320 (cris_insert_point, cris_remove_point): Adjust to new interface.
321 Don't check whether the type is supported here.
322 (the_low_target): Install cris_supports_z_point_type.
323 * linux-low.c (linux_supports_z_point_type): New function.
324 (linux_insert_point, linux_remove_point): Adjust to new interface.
325 * linux-low.h (struct linux_target_ops) <insert_point,
326 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
327 raw_breakpoint pointer parameter.
328 <supports_z_point_type>: New method.
329 * linux-mips-low.c (mips_supports_z_point_type): New function.
330 (mips_insert_point, mips_remove_point): Adjust to new interface.
331 Use mips_supports_z_point_type.
332 (the_low_target): Install mips_supports_z_point_type.
333 * linux-ppc-low.c (the_low_target): Install NULL as
334 supports_z_point_type method.
335 * linux-s390-low.c (the_low_target): Install NULL as
336 supports_z_point_type method.
337 * linux-sparc-low.c (the_low_target): Install NULL as
338 supports_z_point_type method.
339 * linux-x86-low.c (x86_supports_z_point_type): New function.
340 (x86_insert_point): Adjust to new insert_point interface. Use
341 insert_memory_breakpoint. Adjust to new
342 i386_low_insert_watchpoint interface.
343 (x86_remove_point): Adjust to remove_point interface. Use
344 remove_memory_breakpoint. Adjust to new
345 i386_low_remove_watchpoint interface.
346 (the_low_target): Install x86_supports_z_point_type.
347 * lynx-low.c (lynx_target_ops): Install NULL as
348 supports_z_point_type callback.
349 * nto-low.c (nto_supports_z_point_type): New.
350 (nto_insert_point, nto_remove_point): Adjust to new interface.
351 (nto_target_ops): Install nto_supports_z_point_type.
352 * mem-break.c: Adjust intro comment.
353 (struct raw_breakpoint) <raw_type, size>: New fields.
354 <inserted>: Update comment.
355 <shlib_disabled>: Delete field.
356 (enum bkpt_type) <gdb_breakpoint>: Delete value.
357 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
358 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
359 (raw_bkpt_type_to_target_hw_bp_type): New function.
360 (find_enabled_raw_code_breakpoint_at): New function.
361 (find_raw_breakpoint_at): New type and size parameters. Use them.
362 (insert_memory_breakpoint): New function, based off
363 set_raw_breakpoint_at.
364 (remove_memory_breakpoint): New function.
365 (set_raw_breakpoint_at): Reimplement.
366 (set_breakpoint): New, based on set_breakpoint_at.
367 (set_breakpoint_at): Reimplement.
368 (delete_raw_breakpoint): Go through the_target->remove_point
369 instead of assuming memory breakpoints.
370 (find_gdb_breakpoint_at): Delete.
371 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
372 (find_gdb_breakpoint): New function.
373 (set_gdb_breakpoint_at): Delete.
374 (z_type_supported): New function.
375 (set_gdb_breakpoint_1): New function, loosely based off
376 set_gdb_breakpoint_at.
377 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
378 (delete_gdb_breakpoint_at): Delete.
379 (delete_gdb_breakpoint_1): New function, loosely based off
380 delete_gdb_breakpoint_at.
381 (delete_gdb_breakpoint): New function.
382 (clear_gdb_breakpoint_conditions): Rename to ...
383 (clear_breakpoint_conditions): ... this. Don't handle a NULL
384 breakpoint.
385 (add_condition_to_breakpoint): Make static.
386 (add_breakpoint_condition): Take a struct breakpoint pointer
387 instead of an address. Adjust.
388 (gdb_condition_true_at_breakpoint): Rename to ...
389 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
390 z_type parameter.
391 (gdb_condition_true_at_breakpoint): Reimplement.
392 (add_breakpoint_commands): Take a struct breakpoint pointer
393 instead of an address. Adjust.
394 (gdb_no_commands_at_breakpoint): Rename to ...
395 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
396 parameter. Return true if no breakpoint was found. Change debug
397 output.
398 (gdb_no_commands_at_breakpoint): Reimplement.
399 (run_breakpoint_commands): Rename to ...
400 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
401 and change return type to boolean.
402 (run_breakpoint_commands): New function.
403 (gdb_breakpoint_here): Also check for Z1 breakpoints.
404 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
405 breakpoint. Go through the_target->remove_point instead of
406 assuming memory breakpoint.
407 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
408 software and hardware breakpoints.
409 (reinsert_raw_breakpoint): Go through the_target->insert_point
410 instead of assuming memory breakpoint.
411 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
412 software and hardware breakpoints.
413 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
414 Check both software and hardware breakpoints.
415 (validate_inserted_breakpoint): Assert the breakpoint is a
416 software breakpoint. Set the inserted flag to -1 instead of
417 setting shlib_disabled.
418 (delete_disabled_breakpoints): Adjust.
419 (validate_breakpoints): Only validate software breakpoints.
420 Adjust to inserted flag change.
421 (check_mem_read, check_mem_write): Skip breakpoint types other
422 than software breakpoints. Adjust to inserted flag change.
423 * mem-break.h (enum raw_bkpt_type): New enum.
424 (raw_breakpoint, struct process_info): Forward declare.
425 (Z_packet_to_target_hw_bp_type): Delete declaration.
426 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
427 (set_gdb_breakpoint, delete_gdb_breakpoint)
428 (clear_breakpoint_conditions): New declarations.
429 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
430 (breakpoint_inserted_here): Update comment.
431 (add_breakpoint_condition, add_breakpoint_commands): Replace
432 address parameter with a breakpoint pointer parameter.
433 (gdb_breakpoint_here): Update comment.
434 (delete_gdb_breakpoint_at): Delete.
435 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
436 * server.c (process_point_options): Take a struct breakpoint
437 pointer instead of an address. Adjust.
438 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
439 delete_gdb_breakpoint.
440 * spu-low.c (spu_target_ops): Install NULL as
441 supports_z_point_type method.
442 * target.h: Include mem-break.h.
443 (struct target_ops) <prepare_to_access_memory>: Update comment.
444 <supports_z_point_type>: New field.
445 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
446 instead of a char. Also take a raw breakpoint pointer.
447 * win32-arm-low.c (the_low_target): Install NULL as
448 supports_z_point_type.
449 * win32-i386-low.c (i386_supports_z_point_type): New function.
450 (i386_insert_point, i386_remove_point): Adjust to new interface.
451 (the_low_target): Install i386_supports_z_point_type.
452 * win32-low.c (win32_supports_z_point_type): New function.
453 (win32_insert_point, win32_remove_point): Adjust to new interface.
454 (win32_target_ops): Install win32_supports_z_point_type.
455 * win32-low.h (struct win32_target_ops):
456 <supports_z_point_type>: New method.
457 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
458 instead of a char. Also take a raw breakpoint pointer.
459
932539e3
PA
4602014-05-20 Pedro Alves <palves@redhat.com>
461
462 * mem-break.h: Include break-common.h.
463 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
464 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
465 (Z_packet_to_target_hw_bp_type): New declaration.
466 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
467 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
468 (Z_PACKET_ACCESS_WP): Delete macros.
469 (Z_packet_to_hw_type): Delete function.
470 * i386-low.h: Don't include break-common.h here.
471 (Z_packet_to_hw_type): Delete declaration.
472 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
474 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
475 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
476 * linux-aarch64-low.c: Don't include break-common.h here.
477 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
478 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
479 (Z_packet_to_target_hw_bp_type): Delete function.
480 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
481 function.
482 (mips_insert_point, mips_remove_point): Use
483 Z_packet_to_target_hw_bp_type.
484
4ff0d3d8
PA
4852014-05-20 Pedro Alves <palves@redhat.com>
486
487 * linux-aarch64-low.c: Include break-common.h.
488 (enum target_point_type): Delete.
489 (Z_packet_to_point_type): Rename to ...
490 (Z_packet_to_target_hw_bp_type): ... this, and return a
491 target_hw_bp_type instead.
492 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
493 instead of an enum target_point_type.
494 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
495 breakpoint type.
496 (aarch64_dr_state_insert_one_point)
497 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
498 (aarch64_handle_aligned_watchpoint)
499 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
500 Take an enum target_hw_bp_type instead of an enum
501 target_point_type.
502 (aarch64_supports_z_point_type): New function.
503 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
504 use Z_packet_to_target_hw_bp_type.
505
786dc519
JB
5062014-05-20 Joel Brobecker <brobecker@adacore.com>
507
508 * configure.ac: Only use -Werror by default when DEVELOPMENT
509 is true.
510 * configure: Regenerate.
511
9e0aa64f
JK
5122014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
513
514 Fix gdbserver qGetTLSAddr for x86_64 -m32.
515 * linux-x86-low.c (X86_64_USER_REGS): New.
516 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
517
2b577b92
YQ
5182014-04-28 Yao Qi <yao@codesourcery.com>
519
520 * Makefile.in (i386-avx512.c): Fix the typo of generated file
521 name.
522
94611da2
PA
5232014-04-25 Pedro Alves <palves@redhat.com>
524
525 PR server/16255
526 * linux-low.c (linux_attach_fail_reason_string): New function.
527 (linux_attach_lwp): Delete.
528 (linux_attach_lwp_1): Rename to ...
529 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
530 argument. Remove "initial" parameter. Return int instead of
531 void. Don't error or warn here.
532 (linux_attach): Adjust to call linux_attach_lwp. Call error on
533 failure to attach to the tgid. Call warning when failing to
534 attach to an lwp.
535 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
536 argument. Remove "initial" parameter. Return int instead of
537 void. Don't error or warn here.
538 (linux_attach_fail_reason_string): New declaration.
539 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
540 interface change. Use linux_attach_fail_reason_string.
541
01f9f808
MS
5422014-04-24 Michael Sturm <michael.sturm@mintel.com>
543 Walfred Tedeschi <walfred.tedeschi@intel.com>
544
545 * Makefile.in: Added rules to handle new files
546 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
547 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
548 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
549 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
550 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
551 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
552 x32-avx512-linux.o.
553 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
554 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
555 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
556 i386/x32-avx512.xml.
557 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
558 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
559 i386/x32-avx512-linux.xml.
560 * i387-fp.c (num_avx512_k_registers): New constant for number
561 of K registers.
562 (num_avx512_zmmh_low_registers): New constant for number of
563 lower ZMM registers (0-15).
564 (num_avx512_zmmh_high_registers): New constant for number of
565 higher ZMM registers (16-31).
566 (num_avx512_ymmh_registers): New contant for number of higher
567 YMM registers (ymm16-31 added by avx521 on x86_64).
568 (num_avx512_xmm_registers): New constant for number of higher
569 XMM registers (xmm16-31 added by AVX512 on x86_64).
570 (struct i387_xsave): Add space for AVX512 registers.
571 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
572 Add code to handle AVX512 registers.
573 (i387_xsave_to_cache): Add code to handle AVX512 registers.
574 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
575 prototypei from generated file.
576 (tdesc_amd64_avx512_linux): Likewise.
577 (init_registers_x32_avx512_linux): Likewise.
578 (tdesc_x32_avx512_linux): Likewise.
579 (init_registers_i386_avx512_linux): Likewise.
580 (tdesc_i386_avx512_linux): Likewise.
581 (x86_64_regmap): Add AVX512 registers.
582 (x86_linux_read_description): Add code to handle AVX512 XSTATE
583 mask.
584 (initialize_low_arch): Add code to initialize AVX512 registers.
585
51aa91f9
PA
5862014-04-23 Pedro Alves <palves@redhat.com>
587
588 * mem-break.c (find_gdb_breakpoint_at): Make static.
589 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
590
a4165e94
PA
5912014-04-23 Pedro Alves <palves@redhat.com>
592
593 * i386-low.c: Don't include break-common.h here.
594 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
595 prototype to take target_hw_bp_type as argument instead of a Z
596 packet char.
597 * i386-low.h: Include break-common.h here.
598 (Z_packet_to_hw_type): Declare.
599 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
600 prototypes.
601 * linux-x86-low.c (x86_insert_point): Convert the packet number to
602 a target_hw_bp_type before calling i386_low_insert_watchpoint.
603 (x86_remove_point): Convert the packet number to a
604 target_hw_bp_type before calling i386_low_remove_watchpoint.
605 * win32-i386-low.c (i386_insert_point): Convert the packet number
606 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
607 (i386_remove_point): Convert the packet number to a
608 target_hw_bp_type before calling i386_low_remove_watchpoint.
609
b8acf843
PA
6102014-04-23 Pedro Alves <palves@redhat.com>
611
612 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
613
d708bcd1
PA
6142014-04-10 Pedro Alves <palves@redhat.com>
615
616 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
617 Check if the condition or command is NULL before checking if the
618 breakpoint is known. On success, return true.
619 * mem-break.h (add_breakpoint_condition): Document return.
620 (add_breakpoint_commands): Add describing comment.
621 * server.c (skip_to_semicolon): New function.
622 (process_point_options): Use it.
623
2eec7d5b
PA
6242014-04-09 Pedro Alves <palves@redhat.com>
625
626 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
627 to lwpid_of.
628
fa96cb38
PA
6292014-02-27 Pedro Alves <palves@redhat.com>
630
631 PR 12702
632 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
633 macros.
634 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
635 output.
636 (last_thread_of_process_p): Take a PID argument instead of a
637 thread pointer.
638 (linux_wait_for_lwp): Delete.
639 (num_lwps, check_zombie_leaders, not_stopped_callback): New
640 functions.
641 (linux_low_filter_event): New function, party factored out from
642 linux_wait_for_event.
643 (linux_wait_for_event): Rename to ...
644 (linux_wait_for_event_filtered): ... this. Add new filter ptid
645 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
646 sigsuspend. Check for zombie leaders.
647 (linux_wait_for_event): Reimplement as wrapper around
648 linux_wait_for_event_filtered.
649 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
650 a normal or signal exit is seen, it's the whole process exiting.
651 (wait_for_sigstop): No longer a for_each_inferior callback.
652 Rewrite on top of linux_wait_for_event_filtered.
653 (stop_all_lwps): Call wait_for_sigstop directly.
654 * server.c (resume, handle_target_event): Handle
655 TARGET_WAITKIND_NO_RESUMED.
656
d763de10
JB
6572014-02-26 Joel Brobecker <brobecker@adacore.com>
658
659 * win32-low.c (psapi_get_dll_name,
660 * win32_CreateToolhelp32Snapshot): Delete.
661 (win32_CreateToolhelp32Snapshot, win32_Module32First)
662 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
663 Delete.
664 (handle_load_dll): Add function description.
665 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
666
850a0f76
JB
6672014-02-26 Joel Brobecker <brobecker@adacore.com>
668
669 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
670 Add comment.
671 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
672 base address when calling win32_add_one_solib.
673 (handle_load_dll): Delete local variable load_addr.
674 Remove 0x1000 offset applied to DLL base address when calling
675 win32_add_one_solib.
676 (handle_unload_dll): Add comment.
677
f25b3fc3
JB
6782014-02-26 Joel Brobecker <brobecker@adacore.com>
679
680 * win32-low.c (win32_add_all_dlls): Renames
681 win32_ensure_ntdll_loaded. Rewrite function documentation.
682 Adjust implementation to always load all DLLs.
683 Add 0x1000 offset to DLL base address when calling
684 win32_add_one_solib.
685 (child_initialization_done): New static global.
686 (do_initial_child_stuff): Set child_initialization_done to
687 zero during child initialization, and 1 after. Replace call
688 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
689 Add comment.
690 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
691 (handle_unload_dll): Add function documentation.
692 (get_child_debug_event): Ignore load and unload DLL events
693 during child initialization.
694
d86d4aaf
DE
6952014-02-20 Doug Evans <dje@google.com>
696
3bc32da3 697 Remove global all_lwps.
d86d4aaf
DE
698 * inferiors.h (ptid_of): Move here from linux-low.h.
699 (pid_of, lwpid_of): Ditto.
700 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
701 parameter is a struct thread_info * now.
702 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
703 directly. Pass &all_threads to find_inferior instead of &all_lwps.
704 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
705 directly.
706 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
707 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
708 * linux-arm-low.c (update_registers_callback): Update, "entry"
709 parameter is a struct thread_info * now.
710 Fetch lwpid from current_inferior directly.
711 (arm_insert_point): Pass &all_threads to find_inferior instead of
712 &all_lwps.
713 (arm_remove_point): Ditto.
714 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
715 (arm_prepare_to_resume): Fetch pid from thread.
716 (arm_read_description): Fetch lwpid from current_inferior directly.
717 * linux-low.c (all_lwps): Delete.
718 (delete_lwp): Delete call to remove_inferior.
719 (handle_extended_wait): Fetch lwpid from thread.
720 (add_lwp): Don't set lwp->entry.id. Remove call to
721 add_inferior_to_list.
722 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
723 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
724 (kill_one_lwp_callback): Ditto.
725 (linux_kill): Don't dereference NULL pointer.
726 Fetch ptid,lwpid from thread.
727 (get_detach_signal): Fetch ptid from thread.
728 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
729 Simplify call to regcache_invalidate_thread.
730 (delete_lwp_callback): Update, "entry" parameter is a
731 struct thread_info * now. Fetch pid from thread.
732 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
733 (status_pending_p_callback): Update, "entry" parameter is a
734 struct thread_info * now. Fetch ptid from thread.
735 (find_lwp_pid): Update, "entry" parameter is a
736 struct thread_info * now.
737 (linux_wait_for_lwp): Fetch pid from thread.
738 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
739 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
740 (enqueue_one_deferred_signal): Fetch lwpid from thread.
741 (dequeue_one_deferred_signal): Ditto.
742 (cancel_breakpoint): Fetch ptid from current_inferior.
743 (linux_wait_for_event): Pass &all_threads to find_inferior,
744 not &all_lwps. Fetch ptid, lwpid from thread.
745 (count_events_callback): Update, "entry" parameter is a
746 struct thread_info * now.
747 (select_singlestep_lwp_callback): Ditto.
748 (select_event_lwp_callback): Ditto.
749 (cancel_breakpoints_callback): Ditto.
750 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
751 not &all_lwps.
752 (select_event_lwp): Ditto. Fetch ptid from event_thread.
753 (unsuspend_one_lwp): Update, "entry" parameter is a
754 struct thread_info * now.
755 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
756 not &all_lwps.
757 (linux_stabilize_threads): Ditto. And for for_each_inferior.
758 Fetch lwpid from thread, not lwp.
759 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
760 Pass &all_threads to find_inferior, not &all_lwps.
761 (send_sigstop): Fetch lwpid from thread, not lwp.
762 (send_sigstop_callback): Update, "entry" parameter is a
763 struct thread_info * now.
764 (suspend_and_send_sigstop_callback): Ditto.
765 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
766 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
767 struct thread_info * now.
768 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
769 from thread, lwp.
770 (lwp_running): Update, "entry" parameter is a
771 struct thread_info * now.
772 (stop_all_lwps): Fetch ptid from thread.
773 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
774 (linux_resume_one_lwp): Fetch lwpid from thread.
775 (linux_set_resume_request): Update, "entry" parameter is a
776 struct thread_info * now. Fetch pid, lwpid from thread.
777 (resume_status_pending_p): Update, "entry" parameter is a
778 struct thread_info * now.
779 (need_step_over_p): Ditto. Fetch lwpid from thread.
780 (start_step_over): Fetch lwpid from thread.
781 (linux_resume_one_thread): Update, "entry" parameter is a
782 struct thread_info * now. Fetch lwpid from thread.
783 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
784 (proceed_one_lwp): Update, "entry" parameter is a
785 struct thread_info * now. Fetch lwpid from thread.
786 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
787 struct thread_info * now.
788 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
789 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
790 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
791 directly.
792 (regsets_store_inferior_registers): Ditto.
793 (fetch_register, store_register): Ditto.
794 (linux_read_memory, linux_write_memory): Ditto.
795 (linux_request_interrupt): Ditto.
796 (linux_read_auxv): Ditto.
797 (linux_xfer_siginfo): Ditto.
798 (linux_qxfer_spu): Ditto.
799 (linux_qxfer_libraries_svr4): Ditto.
800 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
801 moved to inferiors.h.
802 (get_lwp): Delete.
803 (get_thread_lwp): Update.
804 (struct lwp_info): Delete member "entry". Simplify comment for
805 member "thread".
806 (all_lwps): Delete.
807 * linux-mips-low.c (mips_read_description): Fetch lwpid from
808 current_inferior directly.
809 (update_watch_registers_callback): Update, "entry" parameter is a
810 struct thread_info * now. Fetch pid from thread.
811 (mips_linux_prepare_to_resume): Fetch ptid from thread.
812 (mips_insert_point): Fetch lwpid from current_inferior.
813 Pass &all_threads to find_inferior, not &all_lwps.
814 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
815 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
816 directly.
817 (mips_stopped_data_address): Ditto.
818 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
819 directly.
820 * linux-tile-low.c (tile_arch_setup): Ditto.
821 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
822 (update_debug_registers_callback): Update, "entry" parameter is a
823 struct thread_info * now. Fetch pid from thread.
824 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
825 Pass &all_threads to find_inferior, not &all_lwps.
826 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
827 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
828 Pass &all_threads to find_inferior, not &all_lwps.
829 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
830 (i386_dr_low_get_status): Ditto.
831 (x86_linux_prepare_to_resume): Fetch ptid from thread.
832 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
833 (x86_linux_read_description): Ditto.
834 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
835
3b8361aa
DE
8362014-02-20 Doug Evans <dje@google.com>
837
838 * inferiors.c (get_first_inferior): Fix buglet.
839
f7667f0d
DE
8402014-02-19 Doug Evans <dje@google.com>
841
842 * gdbthread.h (add_thread): Change result type to struct thread_info *.
843 * inferiors.c (add_thread): Change result type to struct thread_info *.
844 All callers updated.
845 (add_lwp): Call add_thread here instead of in callers.
846 All callers updated.
847 * linux-low.h (get_lwp_thread): Rewrite.
848 (struct lwp_info): New member "thread".
849
b3312d80
DE
8502014-02-19 Doug Evans <dje@google.com>
851
852 * linux-low.c (add_lwp): Change result to struct lwp_info *.
853 All callers updated.
854
ecc6f45c
DE
8552014-02-19 Doug Evans <dje@google.com>
856
857 * inferiors.c (add_thread): Fix whitespace.
858
649ebbca
DE
8592014-02-19 Doug Evans <dje@google.com>
860
861 * dll.c (clear_dlls): Replace accessing list implemention details
862 with API function.
863 * gdbthread.h (get_first_thread): Declare.
864 * inferiors.c (for_each_inferior_with_data): New function.
865 (get_first_thread): New function.
866 (find_thread_ptid): Simplify.
867 (get_first_inferior): New function.
868 (clear_list): Delete.
869 (one_inferior_p): New function.
870 (clear_inferior_list): New function.
871 (clear_inferiors): Update.
872 * inferiors.h (for_each_inferior_with_data): Declare.
873 (clear_inferior_list): Declare.
874 (one_inferior_p): Declare.
875 (get_first_inferior): Declare.
876 * linux-low.c (linux_wait_for_event): Replace accessing list
877 implemention details with API function.
878 * server.c (target_running): Ditto.
879 (accumulate_file_name_length): New function.
880 (emit_dll_description): New function.
881 (handle_qxfer_libraries): Replace accessing list implemention
882 details with API function.
883 (handle_qxfer_threads_worker): New function.
884 (handle_qxfer_threads_proper): Replace accessing list implemention
885 details with API function.
886 (handle_query): Ditto.
887 (visit_actioned_threads_callback_ftype): New typedef.
888 (visit_actioned_threads_data): New struct.
889 (visit_actioned_threads): Rewrite to be find_inferior callback.
890 (resume): Call find_inferior.
891 (handle_status): Replace accessing list implemention
892 details with API function.
893 (process_serial_event): Replace accessing list implemention details
894 with API function.
895 * target.c (set_desired_inferior): Replace accessing list implemention
896 details with API function.
897 * tracepoint.c (same_process_p): New function.
898 (gdb_agent_about_to_close): Replace accessing list implemention
899 details with API function.
900 * win32-low.c (child_delete_thread): Replace accessing list
901 implemention details with API function.
902 (match_dll_by_basename): New function.
903 (dll_is_loaded_by_basename): New function.
904 (win32_ensure_ntdll_loaded): Replace accessing list implemention
905 details call to dll_is_loaded_by_basename.
906
80894984
DE
9072014-02-19 Doug Evans <dje@google.com>
908
909 * dll.h (struct dll_info): Add comment.
910 * gdbthread.h (struct thread_info): Add comment.
911 (current_ptid): Simplify.
912 * inferiors.c (add_process): Update.
913 (remove_process): Update.
914 * inferiors.h (struct process_info): Rename member "head" to "entry".
915 * linux-low.c (delete_lwp): Update.
916 (add_lwp): Update.
917 (last_thread_of_process_p): Update.
918 (kill_one_lwp_callback, linux_kill): Update.
919 (status_pending_p_callback): Update.
920 (wait_for_sigstop): Update. Simplify read of ptid.
921 (start_step_over): Update.
922 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
923 (get_lwp_thread): Update.
924 (struct lwp_info): Rename member "head" to "entry".
925 * regcache.h (inferior_list_entry): Delete.
926 * server.c (kill_inferior_callback): Update.
927 (detach_or_kill_inferior_callback): Update.
928 (print_started_pid): Update.
929 (print_attached_pid): Update.
930 (process_serial_event): Simplify read of ptid.
931 * thread-db.c (thread_db_create_event): Update.
932 (thread_db_get_tls_address): Update.
933 * win32-low.c (current_inferior_ptid): Simplify.
934
46917d26
TT
9352014-02-19 Tom Tromey <tromey@redhat.com>
936
937 * target.h (struct target_ops) <supports_btrace>: Add target_ops
938 argument.
939 (target_supports_btrace): Update.
940
0759a81e
YQ
9412014-02-14 Yao Qi <yao@codesourcery.com>
942
943 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
944 (rsp-low-ipa.o): New target.
945
a7191e8b
TT
9462014-02-12 Tom Tromey <tromey@redhat.com>
947
948 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
949 convert_ascii_to_int.
950 * regcache.c (registers_to_string): Likewise.
951 * remote-utils.c (decode_M_packet): Likewise.
952 * server.c (process_serial_event): Likewise.
953
ff0e980e
TT
9542014-02-12 Tom Tromey <tromey@redhat.com>
955
956 * server.c (handle_query, handle_v_run): Use hex2bin, not
957 unhexify.
958 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
959
e9371aff
TT
9602014-02-12 Tom Tromey <tromey@redhat.com>
961
962 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
963 convert_int_to_ascii.
964 * regcache.c (registers_to_string, collect_register_as_string):
965 Likewise.
966 * remote-utils.c (look_up_one_symbol, relocate_instruction):
967 Likewise.
968 * server.c (process_serial_event): Likewise.
969 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
970 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
971
971dc0b8
TT
9722014-02-12 Tom Tromey <tromey@redhat.com>
973
974 * remote-utils.c (look_up_one_symbol, monitor_output): Use
975 bin2hex, not hexify.
976 * tracepoint.c (cmd_qtstatus): Likewise.
977
0a822afb
TT
9782014-02-12 Tom Tromey <tromey@redhat.com>
979
980 * remote-utils.c (monitor_output): Pass explicit length to
981 hexify.
982
9c3d6531
TT
9832014-02-12 Tom Tromey <tromey@redhat.com>
984
985 * tracepoint.c: Include rsp-low.h.
986 * server.c: Include rsp-low.h.
987 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
988 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
989 declare.
990 * remote-utils.c: Include rsp-low.h.
991 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
992 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
993 (convert_int_to_ascii, convert_ascii_to_int): Move to
994 common/rsp-low.c.
995 * regcache.c: Include rsp-low.h.
996 * ax.c: Include rsp-low.h.
997 * Makefile.in (SFILES): Add common/rsp-low.c.
998 (OBS): Add rsp-low.o.
999 (rsp-low.o): New target.
1000
01fd3ea5
TT
10012014-02-12 Tom Tromey <tromey@redhat.com>
1002
1003 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1004 Include print-utils.h.
1005 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1006 (plongest, thirty_two, phex_nz): Remove.
1007 * Makefile.in (SFILES): Add common/print-utils.c.
1008 (OBS): Add print-utils.o.
1009 (print-utils-ipa.o): New target.
1010 (print-utils.o): New target.
1011 (IPA_OBJS): Add print-utils-ipa.o.
1012
e99dc820
TT
10132014-02-06 Tom Tromey <tromey@redhat.com>
1014
1015 * Makefile.in (SFILES): Fix indentation.
1016
ee1e2d4f
DE
10172014-02-05 Doug Evans <dje@google.com>
1018
1019 * linux-low.c (linux_wait_for_event): Improve comment.
1020 (linux_wait_1): Keep current_inferior in sync with event_child.
1021
f5a02773
DE
10222014-01-22 Doug Evans <dje@google.com>
1023
1024 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1025
87ce2a04
DE
10262014-01-22 Doug Evans <dje@google.com>
1027
1028 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1029 * configure: Regenerate.
1030 * config.in: Regenerate.
1031 * Makefile.in (SFILES): Add debug.c.
1032 (OBS): Add debug.o.
1033 * debug.c: New file.
1034 * debug.h: New file.
1035 * linux-aarch64-low.c (*): Update all debugging printfs to use
1036 debug_printf instead of fprintf.
1037 * linux-arm-low.c (*): Ditto.
1038 * linux-cris-low.c (*): Ditto.
1039 * linux-crisv32-low.c (*): Ditto.
1040 * linux-m32r-low.c (*): Ditto.
1041 * linux-sparc-low.c (*): Ditto.
1042 * linux-x86.c (*): Ditto.
1043 * linux-low.c (*): Ditto.
1044 (linux_wait_1): Add calls to debug_enter, debug_exit.
1045 (linux_wait): Remove redundant debugging printf.
1046 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1047 (linux_resume, unstop_all_lwps): Ditto.
1048 * mem-break.c (*): Update all debugging printfs to use
1049 debug_printf instead of fprintf.
1050 * remote-utils.c (*): Ditto.
1051 * thread-db.c (*): Ditto.
1052 * server.c #include <ctype.h>, "gdb_vecs.h".
1053 (debug_threads): Moved to debug.c.
1054 (*): Update all debugging printfs to use debug_printf instead of
1055 fprintf.
1056 (start_inferior): Replace call to fflush with call to debug_flush.
1057 (monitor_show_help): Mention set debug-format.
1058 (parse_debug_format_options): New function.
1059 (handle_monitor_command): Handle "monitor set debug-format".
1060 (gdbserver_usage): Mention --debug-format.
1061 (main): Parse --debug-format.
1062 * server.h (debug_threads): Declaration moved to debug.h.
1063 #include "debug.h".
1064 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1065 trace_debug_1 that uses debug_printf.
1066 (tracepoint_look_up_symbols): Update all debugging printfs to use
1067 debug_printf instead of fprintf.
1068
e671835b
BS
10692014-01-20 Baruch Siach <baruch@tkos.co.il>
1070
1071 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1072 sys/ptrace.h.
1073
b5737fa9
PA
10742014-01-17 Pedro Alves <palves@redhat.com>
1075
ea38d2a9 1076 PR build/16445
c7faa97a
PA
1077 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1078 defined after including gdb_proc_service.h.
b5737fa9 1079
40ed484e
DE
10802014-01-16 Doug Evans <dje@google.com>
1081
1082 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1083 (match_dll): Use it.
1084
969c39fb
MM
10852014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1086
1087 * target.h (target_ops) <read_btrace>: Change parameters and
1088 return type to allow error reporting.
1089 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1090 trace reading errors on.
1091 * linux-low.c (linux_low_read_btrace): Pass trace reading
1092 errors on.
1093 (linux_low_disable_btrace): New.
1094
ab7f45ba
DE
10952014-01-15 Doug Evans <dje@google.com>
1096
1097 * inferiors.c (thread_id_to_gdb_id): Delete.
1098 * inferiors.h (thread_id_to_gdb_id): Delete.
1099
66af0f44
EZ
11002014-01-13 Eli Zaretskii <eliz@gnu.org>
1101
1102 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1103 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1104 versions.
1105
9939e131
PA
11062014-01-08 Pedro Alves <palves@redhat.com>
1107
1108 * server.c (handle_status): Don't discard previous queued stop
1109 replies or thread's pending status here.
1110 (main) <disconnection>: Do it here instead.
1111
b7ea362b
PA
11122014-01-08 Pedro Alves <palves@redhat.com>
1113
1114 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1115 * server.c (visit_actioned_threads, handle_pending_status): New
1116 function.
1117 (handle_v_cont): Factor out parts to ...
1118 (resume): ... this new function. If in all-stop, and a thread
1119 being resumed has a pending status, report it without actually
1120 resuming.
1121 (myresume): Adjust to use the new 'resume' function.
1122 (clear_pending_status_callback, set_pending_status_callback)
1123 (find_status_pending_thread_callback): New functions.
1124 (handle_status): Handle the case of multiple threads having
1125 interesting statuses to report. Report threads' real last signal
1126 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1127 with an interesting thread to report the status for, instead of
1128 always reporting the status of the first thread.
1129
28498c42
JB
11302014-01-01 Joel Brobecker <brobecker@adacore.com>
1131
1132 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1133 * gdbreplay.c (gdbreplay_version): Likewise.
1134
f45c82da
YZ
11352013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1136
1137 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1138 iov.iov_len with the real length in use.
1139
379a5e2d
JB
11402013-12-13 Joel Brobecker <brobecker@adacore.com>
1141
1142 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1143 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1144 for all targets that use win32-low.c.
1145 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1146 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1147
4210d83e
PA
11482013-12-13 Pedro Alves <palves@redhat.com>
1149
1150 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1151 if equal to TARGET_WAITKIND_LOADED.
1152 * win32-low.c (cached_status): New static global.
1153 (win32_wait): Add declaration.
1154 (do_initial_child_stuff): Flush all initial pending debug events
1155 up to the initial breakpoint.
1156 (win32_wait): If CACHED_STATUS was set, return that instead
1157 of doing a real wait. Remove the code resuming the execution
1158 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1159 during the initial phase. Also remove the code changing
1160 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1161 TARGET_WAITKIND_STOPPED.
1162
e7f0d979
YQ
11632013-12-11 Yao Qi <yao@codesourcery.com>
1164
1165 * notif.c (handle_notif_ack): Return 0 if no notification
1166 matches.
1167
ebcf782c
DE
11682013-11-20 Doug Evans <dje@google.com>
1169
1170 * linux-low.c (linux_set_resume_request): Fix comment.
1171
20ad9378
DE
11722013-11-20 Doug Evans <dje@google.com>
1173
1174 * linux-low.c (resume_status_pending_p): Tweak comment.
1175
a196ebeb
WT
11762013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1177
1178 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1179 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1180 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1181 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1182 (srv_amd64_regobj): Add amd64-mpx.o.
1183 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1184 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1185 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1186 * i387-fp.c (num_pl_bnd_register) Added constant.
1187 (num_pl_bnd_cfg_registers) Added constant.
1188 (struct i387_xsave) Added reserved area and MPX fields.
1189 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1190 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1191 function.
1192 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1193 (init_registers_amd64_mpx_linux): Declare new function.
1194 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1195 (x86_64_regmap): Add MPX registers.
1196 (x86_linux_read_description): Add MPX case.
1197 (initialize_low_arch): Initialize MPX targets.
1198
0080a2f6
TT
11992013-11-18 Tom Tromey <tromey@redhat.com>
1200
1201 * configure: Rebuild.
1202 * configure.ac: Don't check for stdlib.h.
1203 * gdbreplay.c: Unconditionally include stdlib.h.
1204
2978b111
TT
12052013-11-18 Tom Tromey <tromey@redhat.com>
1206
1207 * config.in: Rebuild.
1208 * configure: Rebuild.
1209 * configure.ac: Don't use AC_HEADER_DIRENT.
1210
a3d08894
TT
12112013-11-18 Tom Tromey <tromey@redhat.com>
1212
1213 * server.h: Don't check HAVE_STRING_H.
1214 * gdbreplay.c: Don't check HAVE_STRING_H.
1215 * configure: Rebuild.
1216
0a5dd17d
TT
12172013-11-18 Tom Tromey <tromey@redhat.com>
1218
1219 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1220 LIBGNU.
1221
1bd2f0ba
TT
12222013-11-08 Tom Tromey <tromey@redhat.com>
1223
1224 * configure, config.in: Rebuild.
1225 * configure.ac: Remove unused configury.
1226
3266f10b
TT
12272013-11-08 Tom Tromey <tromey@redhat.com>
1228
1229 * acinclude.m4: Include common.m4, codeset.m4.
1230 * configure, config.in: Rebuild.
1231 * configure.ac: Use GDB_AC_COMMON.
1232
6682d959
AA
12332013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1234
1235 * linux-s390-low.c (HWCAP_S390_TE): New define.
1236 (s390_arch_setup): Consider the TE field in the HWCAP for
1237 determining 'have_regset_tdb'.
1238
fd0a4d76
SDJ
12392013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1240
1241 PR gdb/16014
1242 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1243 call to sizeof.
1244
1a3d890b
PA
12452013-10-02 Pedro Alves <palves@redhat.com>
1246
1247 * server.c (process_serial_event): Don't output "GDBserver
1248 exiting" if GDB is connected through stdio.
1249 * target.c (mywait): Likewise, be silent if GDB is connected
1250 through stdio.
1251
97ad4581
JB
12522013-10-01 Joel Brobecker <brobecker@adacore.com>
1253
1254 * lynx-low.c (lynx_add_threads_after_attach): New function.
1255 (lynx_attach): Remove call to add_thread. Add call to
1256 lynx_add_threads_after_attach instead.
1257
5b4e221c
MF
12582013-09-28 Mike Frysinger <vapier@gentoo.org>
1259
1260 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1261 * config.in, configure: Regenerated.
1262
ee47b2f8
YQ
12632013-09-18 Yao Qi <yao@codesourcery.com>
1264
1265 PR server/15959
1266 * server.c (start_inferior): Clear 'resume_info'.
1267
d6707650 12682013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1269
d6707650
JW
1270 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1271 for each register.
1272
9243dd0e 12732013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1274
9243dd0e
JW
1275 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1276 linux-tile-low.o to srv_tgtobj.
1277
c623a6ef
WN
12782013-09-16 Will Newton <will.newton@linaro.org>
1279
1280 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1281 out regs.
1282
fb71d39e
PA
12832013-09-06 Pedro Alves <palves@redhat.com>
1284
1285 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1286 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1287 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1288 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1289 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1290 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1291
8e7e9910
PA
12922013-09-06 Pedro Alves <palves@redhat.com>
1293
1294 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1295 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1296
7c3a12ca
PA
12972013-09-06 Pedro Alves <palves@redhat.com>
1298
1299 * linux-amd64-ipa.c: Include tracepoint.h.
1300 * linux-i386-ipa.c: Include tracepoint.h.
1301
8eb3d7b6
RW
13022013-09-06 Ricard Wanderlof <ricardw@axis.com>
1303
1304 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1305 (ps_get_thread_area): New function.
1306
eddddb9d
RW
13072013-09-06 Ricard Wanderlof <ricardw@axis.com>
1308
1309 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1310 (initialize_low_arch): Call init_registers_crisv32 rather than
1311 init_register_crisv32.
1312
533b0600
PA
13132013-09-05 Pedro Alves <palves@redhat.com>
1314
1315 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1316 to ...
1317 * hostio.h: ... this new file.
1318 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1319 win32-low.c: Include hostio.h.
1320
0ce3d3b5
PA
13212013-09-05 Pedro Alves <palves@redhat.com>
1322
1323 * server.h (gdb_client_data, handler_func, callback_handler_func)
1324 (delete_file_handler, add_file_handler, append_callback_event)
1325 (delete_callback_event, start_event_loop, initialize_event_loop):
1326 Move to event-loop.h and include it.
1327 * event-loop.h: New file.
1328
799cdc37
PA
13292013-09-05 Pedro Alves <palves@redhat.com>
1330
1331 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1332 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1333 (loaded_dll, unloaded_dll): Move to ...
1334 * dll.h: ... this new file.
1335 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1336
6a6bbd9d
PA
13372013-09-05 Pedro Alves <palves@redhat.com>
1338
1339 * server.h (current_process, get_thread_process, all_processes)
1340 (add_inferior_to_list, for_each_inferior, current_inferior)
1341 (remove_inferior, add_process, remove_process, find_process_pid)
1342 (have_started_inferiors_p, have_attached_inferiors_p)
1343 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1344 (clear_inferiors, find_inferior, find_inferior_id)
1345 (inferior_target_data, set_inferior_target_data)
1346 (inferior_regcache_data, set_inferior_regcache_data): Move to
1347 inferiors.h, and include it.
1348 * inferiors.h: New file.
1349
f699aaba
PA
13502013-09-05 Pedro Alves <palves@redhat.com>
1351
1352 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1353 Move ...
1354 * ax.h: ... here.
1355
c144c7a0
PA
13562013-09-05 Pedro Alves <palves@redhat.com>
1357
1358 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1359 tracepoint.h.
1360 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1361 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1362 (handle_tracepoint_general_set, handle_tracepoint_query)
1363 (tracepoint_finished_step, tracepoint_was_hit)
1364 (release_while_stepping_state_list, current_traceframe)
1365 (in_readonly_region, traceframe_read_mem)
1366 (fetch_traceframe_registers, traceframe_read_sdata)
1367 (traceframe_read_info, struct fast_tpoint_collect_status)
1368 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1369 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1370 (supply_fast_tracepoint_registers)
1371 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1372 (ipa_tdesc, claim_trampoline_space)
1373 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1374 (agent_mem_read, agent_get_trace_state_variable_value)
1375 (agent_set_trace_state_variable_value, agent_tsv_read)
1376 (agent_mem_read_string, get_raw_reg_func_addr)
1377 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1378 * tracepoint.h: ... this new file.
1379
ff42e6ab
PA
13802013-09-05 Pedro Alves <palves@redhat.com>
1381
1382 * server.h (perror_with_name, error, fatal, warning, paddress)
1383 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1384 include it.
1385 * utils.h: New file.
1386
541af0f4
PA
13872013-09-05 Pedro Alves <palves@redhat.com>
1388
1389 * server.h (remote_debug, noack_mode, transport_is_reliable)
1390 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1391 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1392 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1393 (write_enn, initialize_async_io, enable_async_io)
1394 (disable_async_io, check_remote_input_interrupt_request)
1395 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1396 (dead_thread_notify, prepare_resume_reply)
1397 (decode_address_to_semicolon, decode_address, decode_m_packet)
1398 (decode_M_packet, decode_X_packet, decode_xfer_write)
1399 (decode_search_memory_packet, unhexify, hexify)
1400 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1401 (look_up_one_symbol, relocate_instruction)
1402 (monitor_output): Move to remote-utils.h, and include it.
1403 * remote-utils.h: New file.
1404
eebdf26b
PA
14052013-09-05 Pedro Alves <palves@redhat.com>
1406
1407 * server.h (_): Delete.
1408
3aafd2ff
PA
14092013-09-02 Pedro Alves <palves@redhat.com>
1410
1411 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1412 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1413 allocated.
1414 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1415
cee83bcb
PM
14162013-09-02 Pierre Muller <muller@sourceware.org>
1417
1418 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1419 or WriteProcessMemory complete successfully and handle
1420 ERROR_PARTIAL_COPY error.
1421
9a13b2fa
PA
14222013-09-02 Pedro Alves <palves@redhat.com>
1423
1424 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1425 error instead of EIO.
1426
602e3198
JK
14272013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1428
1429 PR server/15604
1430 * linux-low.c: Include filestuff.h.
1431 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1432 * lynx-low.c: Include filestuff.h.
1433 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1434 * server.c: Include filestuff.h.
1435 (main): Call notice_open_fds.
1436 * spu-low.c: Include filestuff.h.
1437 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1438
96d7229d
LM
14392013-08-22 Luis Machado <lgustavo@codesourcery.com>
1440
1441 * Makefile.in: Explain why ../target and ../nat are not
1442 listed as include file search paths.
1443 (linux-waitpid.o): New object file rule.
1444 * configure.srv (srv_native_linux_obj): New variable.
1445 Replace all occurrences of linux native object files with
1446 $srv_native_linux_obj.
1447 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1448 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1449 (linux_enable_event_reporting): Remove declaration.
1450 (my_waitpid): Moved to common/linux-waitpid.c.
1451 (linux_wait_for_event): Pass ptid when calling
1452 linux_enable_event_reporting.
1453 (linux_supports_tracefork_flag): Remove.
1454 (linux_enable_event_reporting): Likewise.
1455 (linux_tracefork_grandchild): Remove.
1456 (STACK_SIZE): Moved to common/linux-ptrace.c.
1457 (linux_tracefork_child): Remove.
1458 (linux_test_for_tracefork): Remove.
1459 (linux_look_up_symbols): Call linux_supports_traceclone.
1460 (initialize_low): Remove call to linux_test_for_tracefork.
1461 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1462 common/linux-ptrace.h.
1463 (PTRACE_TYPE_ARG4): Likewise.
1464 Include linux-ptrace.h.
1465
32940073
PA
14662013-08-21 Pedro Alves <palves@redhat.com>
1467
1468 * config.in: Renegerate.
1469
33b60d58 14702013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1471
33b60d58
LM
1472 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1473 (SFILES): Remove $(srcdir)/common/target-common.c and
1474 add $(srcdir)/target/waitstatus.c.
1475 (OBS): Remove target-common.o and add waitstatus.o.
1476 (server_h): Remove $(srcdir)/../common/target-common.h and
1477 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1478 and $(srcdir)/../target/waitstatus.h.
1479 (target-common.o): Remove.
1480 (waitstatus.o): New target object file.
1481 * target.h: Do not include target-common.h and
1482 include target/resume.h, target/wait.h and
1483 target/waitstatus.h.
1484
b8e1b30e
LM
14852013-08-13 Luis Machado <lgustavo@codesourcery.com>
1486
1487 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1488 to PTRACE_TYPE_ARG3.
1489 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1490 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1491 PTRACE_TYPE_ARG4.
1492 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1493 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1494
7a60ad40
YQ
14952013-07-27 Jie Zhang <jie@codesourcery.com>
1496 Daniel Jacobowitz <dan@codesourcery.com>
1497 Yao Qi <yao@codesourcery.com>
1498
1499 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1500 (mips-linux-watch.o): New rule.
1501 (mips_linux_watch_h): New variable.
1502 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1503 srv_tgtobj.
1504 * linux-mips-low.c: Include mips-linux-watch.h.
1505 (struct arch_process_info, struct arch_lwp_info): New.
1506 (update_watch_registers_callback): New function.
1507 (mips_linux_new_process, mips_linux_new_thread) New functions.
1508 (mips_linux_prepare_to_resume, mips_insert_point): New
1509 functions.
1510 (mips_remove_point, mips_stopped_by_watchpoint): New
1511 functions.
1512 (rsp_bp_type_to_target_hw_bp_type): New function.
1513 (mips_stopped_data_address): New function.
1514 (the_low_target): Add watchpoint support functions.
1515
de6f69ad
YQ
15162013-07-27 Yao Qi <yao@codesourcery.com>
1517
1518 * i386-low.c: Include break-common.h.
1519 (enum target_hw_bp_type): Remove.
1520
3360c0bf
LM
15212013-07-24 Luis Machado <lgustavo@codesourcery.com>
1522
1523 * Makefile.in (SFILES): /common/target-common.c.
1524 (OBS): Add target-common.o.
1525 (server_h): Add $(srcdir)/../common/target-common.h.
1526 (target-common.o): New target.
1527 * server.c (queue_stop_reply_callback): Free
1528 status string after use.
1529 * target.c (target_waitstatus_to_string): Remove.
1530 * target.h: Include target-common.h.
1531 (resume_kind): Likewise.
1532 (target_waitkind): Likewise.
1533 (target_waitstatus): Likewise.
1534 (TARGET_WNOHANG): Likewise.
1535
bd885420
YQ
15362013-07-04 Yao Qi <yao@codesourcery.com>
1537
1538 * Makefile.in (host_alias): Use @host_noncanonical@.
1539 (target_alias): Use @target_noncanonical@.
1540 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1541 ACX_NONCANONICAL_HOST.
1542 * configure: Regenerated.
1543
1544 Revert:
1545 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1546
1547 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1548 * configure: Rebuild.
1549 * Makefile.in (version_host, version_target): Get from configure.
1550 (version.c): Use $(version_host) and $(version_target).
1551
17ef446e
PA
15522013-07-03 Pedro Alves <palves@redhat.com>
1553
1554 * Makefile.in (config.status): Depend on development.sh.
1555 * acinclude.m4: Include libmcheck.m4.
1556 * configure: Regenerate.
1557
7a9a7487
MG
15582013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1559
1560 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1561 attribute inside the parentheses.
1562 (winapi_DebugSetProcessKillOnExit): Ditto.
1563 (winapi_DebugBreakProcess): Ditto.
1564 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 1565
49b64de6
MG
15662013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1567
1568 * notif.h (notif_event): Add a dummy member to avoid compiler
1569 errors.
1570
d5749ee7
PA
15712013-07-01 Pedro Alves <palves@redhat.com>
1572
1573 * hostio.c (HOSTIO_PATH_MAX): Define.
1574 (require_filename, handle_open, handle_unlink, handle_readlink):
1575 Use it.
1576
d8d2a3ee
PA
15772013-07-01 Pedro Alves <palves@redhat.com>
1578
1579 * server.h: Include "pathmax.h".
1580 * linux-low.c: Don't include sys/param.h.
1581 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1582 MAXPATHLEN.
1583 * win32-low.c: Don't include sys/param.h.
1584 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1585
bc7dea8d
PA
15862013-07-01 Pedro Alves <palves@redhat.com>
1587
1588 * event-loop.c: Don't check HAVE_UNISTD_H before including
1589 <unistd.h>.
1590 * gdbreplay.c: Likewise.
1591 * remote-utils.c: Likewise.
1592 * server.c: Likewise.
1593 * configure.ac: Don't check for unistd.h.
1594 * configure: Regenerate.
1595
d6c2da54
TT
15962013-06-28 Tom Tromey <tromey@redhat.com>
1597
1598 * Makefile.in (version.c): Use version.in, not
1599 common/version.in.
1600
257b6bec
MG
16012013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1602
1603 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1604 * configure: Rebuild.
1605 * Makefile.in (version_host, version_target): Get from configure.
1606 (version.c): Use $(version_host) and $(version_target).
1607
86ebe149
DK
16082013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1609
1610 Fix trace-status to output user name without trailing colon.
1611 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1612
f30aa5af
DK
16132013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1614
1615 Fix trace-status to output proper start-time and stop-time.
1616 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1617 output start time and stop time in hex as gdb expects.
1618
28a93511
YQ
16192013-06-26 Pedro Alves <pedro@codesourcery.com>
1620
1621 * tracepoint.c (build_traceframe_info_xml): Output trace state
1622 variables present in the trace buffer.
1623
01208463
TT
16242013-06-24 Tom Tromey <tromey@redhat.com>
1625
1626 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1627 create-version.sh.
1628 (version.o): Remove.
1629 * gdbreplay.c: Include version.h.
1630 (version, host_name): Don't declare.
1631 * server.h: Include version.h.
1632 (version, host_name): Don't declare.
1633
760256f9
PA
16342013-06-12 Pedro Alves <palves@redhat.com>
1635
1636 * linux-x86-low.c (linux_is_elf64): Delete global.
1637 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1638 with local linux_pid_exe_is_elf_64_file use.
1639
030031ee
PA
16402013-06-11 Pedro Alves <palves@redhat.com>
1641
1642 * linux-low.c (regset_disabled, disable_regset): New functions.
1643 (regsets_fetch_inferior_registers)
1644 (regsets_store_inferior_registers): Use them.
1645 (initialize_regsets_info); Don't allocate the disabled_regsets
1646 array here.
1647 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1648 comment.
1649
5da6eb0a
PA
16502013-06-11 Pedro Alves <palves@redhat.com>
1651
1652 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1653 xmalloc.
1654
7e5aaa09
PA
16552013-06-11 Pedro Alves <palves@redhat.com>
1656
1657 * linux-x86-low.c (initialize_low_arch): Call
1658 init_registers_x32_avx_linux.
1659
d878444c
JK
16602013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1661
1662 Fix compatibility with Android Bionic.
1663 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1664 it is not empty.
1665
3aee8918
PA
16662013-06-07 Pedro Alves <palves@redhat.com>
1667
5f2b57b5 1668 PR server/14823
3aee8918
PA
1669 * Makefile.in (OBS): Add tdesc.o.
1670 (IPA_OBJS): Add tdesc-ipa.o.
1671 (tdesc-ipa.o): New rule.
1672 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1673 interface.
1674 * linux-low.c (new_inferior): Delete.
1675 (disabled_regsets, num_regsets): Delete.
1676 (linux_add_process): Adjust to set the new per-process
1677 new_inferior flag.
1678 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1679 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1680 was a stop. When calling arch_setup, switch the current inferior
1681 to the thread that got an event.
1682 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1683 (regsets_fetch_inferior_registers)
1684 (regsets_store_inferior_registers): New regsets_info parameter.
1685 Adjust to use it.
1686 (linux_register_in_regsets): New regs_info parameter. Adjust to
1687 use it.
1688 (register_addr, fetch_register, store_register): New usrregs_info
1689 parameter. Adjust to use it.
1690 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1691 parameter regs_info. Adjust to use it.
1692 (linux_fetch_registers): Get the current inferior's regs_info, and
1693 adjust to use it.
1694 (linux_store_registers): Ditto.
1695 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1696 (initialize_low): Don't initialize the target_regsets here. Call
1697 initialize_low_arch.
1698 * linux-low.h (target_regsets): Delete declaration.
1699 (struct regsets_info): New.
1700 (struct usrregs_info): New.
1701 (struct regs_info): New.
1702 (struct process_info_private) <new_inferior>: New field.
1703 (struct linux_target_ops): Delete the num_regs, regmap, and
1704 regset_bitmap fields. New field regs_info.
1705 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1706 * i387-fp.c (num_xmm_registers): Delete.
1707 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1708 calls to new interface.
1709 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1710 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1711 Infer the number of xmm registers from the regcache's target
1712 description.
1713 * i387-fp.h (num_xmm_registers): Delete.
1714 * inferiors.c (add_thread): Don't install the thread's regcache
1715 here.
1716 * proc-service.c (gregset_info): Fetch the current inferior's
1717 regs_info. Adjust to use it.
1718 * regcache.c: Include tdesc.h.
1719 (register_bytes, reg_defs, num_registers)
1720 (gdbserver_expedite_regs): Delete.
1721 (get_thread_regcache): If the thread doesn't have a regcache yet,
1722 create one, instead of aborting gdbserver.
1723 (regcache_invalidate_one): Rename to ...
1724 (regcache_invalidate_thread): ... this.
1725 (regcache_invalidate_one): New.
1726 (regcache_invalidate): Only invalidate registers of the current
1727 process.
1728 (init_register_cache): Add target_desc parameter, and use it.
1729 (new_register_cache): Ditto. Assert the target description has a
1730 non zero registers_size.
1731 (regcache_cpy): Add assertions. Adjust.
1732 (realloc_register_cache, set_register_cache): Delete.
1733 (registers_to_string, registers_from_string): Adjust.
1734 (find_register_by_name, find_regno, find_register_by_number)
1735 (register_cache_size): Add target_desc parameter, and use it.
1736 (free_register_cache_thread, free_register_cache_thread_one)
1737 (regcache_release, register_cache_size): New.
1738 (register_size): Add target_desc parameter, and use it.
1739 (register_data, supply_register, supply_register_zeroed)
1740 (supply_regblock, supply_register_by_name, collect_register)
1741 (collect_register_as_string, collect_register_by_name): Adjust.
1742 * regcache.h (struct target_desc): Forward declare.
1743 (struct regcache) <tdesc>: New field.
1744 (init_register_cache, new_register_cache): Add target_desc
1745 parameter.
1746 (regcache_invalidate_thread): Declare.
1747 (regcache_invalidate_one): Delete declaration.
1748 (regcache_release): Declare.
1749 (find_register_by_number, register_cache_size, register_size)
1750 (find_regno): Add target_desc parameter.
1751 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1752 declarations.
1753 * remote-utils.c: Include tdesc.h.
1754 (outreg, prepare_resume_reply): Adjust.
1755 * server.c: Include tdesc.h.
1756 (gdbserver_xmltarget): Delete declaration.
1757 (get_features_xml, process_serial_event): Adjust.
1758 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1759 declare.
1760 (struct process_info) <tdesc>: New field.
1761 (ipa_tdesc): Declare.
1762 * tdesc.c: New file.
1763 * tdesc.h: New file.
1764 * tracepoint.c: Include tdesc.h.
1765 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1766 (get_context_regcache): Adjust to pass ipa_tdesc down.
1767 (do_action_at_tracepoint): Adjust to get the register cache size
1768 from the context regcache's description.
1769 (traceframe_walk_blocks): Adjust to get the register cache size
1770 from the current trace frame's description.
1771 (traceframe_get_pc): Adjust to get current trace frame's
1772 description and pass it down.
1773 (gdb_collect): Adjust to get the register cache size from the
1774 IPA's description.
1775 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1776 (gdbserver_xmltarget): Delete.
1777 (initialize_low_tracepoint): Set the ipa's target description.
1778 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1779 (initialize_low_tracepoint): Set the ipa's target description.
1780 * linux-x86-low.c: Include tdesc.h.
1781 [__x86_64__] (is_64bit_tdesc): New.
1782 (ps_get_thread_area, x86_get_thread_area): Use it.
1783 (i386_cannot_store_register): Rename to ...
1784 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1785 (i386_cannot_fetch_register): Rename to ...
1786 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1787 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1788 to new interface.
1789 (target_regsets): Rename to ...
1790 (x86_regsets): ... this.
1791 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1792 interface.
1793 (x86_siginfo_fixup): Use is_64bit_tdesc.
1794 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1795 (tdesc_x32_avx_linux, tdesc_x32_linux)
1796 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1797 Declare.
1798 (x86_linux_update_xmltarget): Delete.
1799 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1800 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1801 (AMD64_LINUX_USER64_CS): New.
1802 (x86_linux_read_description): New, based on
1803 x86_linux_update_xmltarget.
1804 (same_process_callback): New.
1805 (x86_arch_setup_process_callback): New.
1806 (x86_linux_update_xmltarget): New.
1807 (x86_regsets_info): New.
1808 (amd64_linux_regs_info): New.
1809 (i386_linux_usrregs_info): New.
1810 (i386_linux_regs_info): New.
1811 (x86_linux_regs_info): New.
1812 (x86_arch_setup): Reimplement.
1813 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1814 (x86_emit_ops): Ditto.
1815 (the_low_target): Adjust. Install x86_linux_regs_info,
1816 x86_cannot_fetch_register, and x86_cannot_store_register.
1817 (initialize_low_arch): New.
1818 * linux-ia64-low.c (tdesc_ia64): Declare.
1819 (ia64_fetch_register): Adjust.
1820 (ia64_usrregs_info, regs_info): New globals.
1821 (ia64_regs_info): New function.
1822 (the_low_target): Adjust.
1823 (initialize_low_arch): New function.
1824 * linux-sparc-low.c (tdesc_sparc64): Declare.
1825 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1826 Adjust.
1827 (sparc_arch_setup): New function.
1828 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1829 (the_low_target): Adjust.
1830 (initialize_low_arch): New function.
1831 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1832 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1833 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1834 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1835 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1836 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1837 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1838 (tdesc_powerpc_isa205_vsx64l): Declare.
1839 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1840 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1841 (ppc_set_pc, ppc_get_hwcap): Adjust.
1842 (ppc_usrregs_info): Forward declare.
1843 (!__powerpc64__) ppc_regmap_adjusted: New global.
1844 (ppc_arch_setup): Adjust to the current process'es target
1845 description.
1846 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1847 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1848 (ppc_store_evrregset): Adjust.
1849 (target_regsets): Rename to ...
1850 (ppc_regsets): ... this, and make static.
1851 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1852 (ppc_regs_info): New function.
1853 (the_low_target): Adjust.
1854 (initialize_low_arch): New function.
1855 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1856 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1857 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1858 (tdesc_s390x_linux64v2): Declare.
1859 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1860 (s390_fill_gregset, s390_store_last_break): Adjust.
1861 (target_regsets): Rename to ...
1862 (s390_regsets): ... this, and make static.
1863 (s390_get_pc, s390_set_pc): Adjust.
1864 (s390_get_hwcap): New target_desc parameter, and use it.
1865 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1866 (s390_arch_setup): Adjust to set the current process'es target
1867 description. Don't adjust the regmap.
1868 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1869 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1870 (regs_info_3264): New globals.
1871 (s390_regs_info): New function.
1872 (the_low_target): Adjust.
1873 (initialize_low_arch): New function.
1874 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1875 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1876 [__mips64] (init_registers_mips_linux)
1877 (init_registers_mips_dsp_linux): Delete defines.
1878 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1879 (have_dsp): New global.
1880 (mips_read_description): New, based on mips_arch_setup.
1881 (mips_arch_setup): Reimplement.
1882 (get_usrregs_info): New function.
1883 (mips_cannot_fetch_register, mips_cannot_store_register)
1884 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1885 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1886 (target_regsets): Rename to ...
1887 (mips_regsets): ... this, and make static.
1888 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1889 (dsp_regs_info, regs_info): New globals.
1890 (mips_regs_info): New function.
1891 (the_low_target): Adjust.
1892 (initialize_low_arch): New function.
1893 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1894 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1895 Declare.
1896 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1897 (arm_read_description): New, with bits factored from
1898 arm_arch_setup.
1899 (arm_arch_setup): Reimplement.
1900 (target_regsets): Rename to ...
1901 (arm_regsets): ... this, and make static.
1902 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1903 (arm_regs_info): New function.
1904 (the_low_target): Adjust.
1905 (initialize_low_arch): New function.
1906 * linux-m68k-low.c (tdesc_m68k): Declare.
1907 (target_regsets): Rename to ...
1908 (m68k_regsets): ... this, and make static.
1909 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1910 (m68k_regs_info): New function.
1911 (m68k_arch_setup): New function.
1912 (the_low_target): Adjust.
1913 (initialize_low_arch): New function.
1914 * linux-sh-low.c (tdesc_sharch): Declare.
1915 (target_regsets): Rename to ...
1916 (sh_regsets): ... this, and make static.
1917 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1918 (sh_regs_info, sh_arch_setup): New functions.
1919 (the_low_target): Adjust.
1920 (initialize_low_arch): New function.
1921 * linux-bfin-low.c (tdesc_bfin): Declare.
1922 (bfin_arch_setup): New function.
1923 (bfin_usrregs_info, regs_info): New globals.
1924 (bfin_regs_info): New function.
1925 (the_low_target): Adjust.
1926 (initialize_low_arch): New function.
1927 * linux-cris-low.c (tdesc_cris): Declare.
1928 (cris_arch_setup): New function.
1929 (cris_usrregs_info, regs_info): New globals.
1930 (cris_regs_info): New function.
1931 (the_low_target): Adjust.
1932 (initialize_low_arch): New function.
1933 * linux-cris-low.c (tdesc_crisv32): Declare.
1934 (cris_arch_setup): New function.
1935 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1936 (cris_regs_info): New function.
1937 (the_low_target): Adjust.
1938 (initialize_low_arch): New function.
1939 * linux-m32r-low.c (tdesc_m32r): Declare.
1940 (m32r_arch_setup): New function.
1941 (m32r_usrregs_info, regs_info): New globals.
1942 (m32r_regs_info): Adjust.
1943 (initialize_low_arch): New function.
1944 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1945 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1946 (tic6x_usrregs_info): Forward declare.
1947 (tic6x_read_description): New function, based on ...
1948 (tic6x_arch_setup): ... this. Reimplement.
1949 (target_regsets): Rename to ...
1950 (tic6x_regsets): ... this, and make static.
1951 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1952 (tic6x_regs_info): New function.
1953 (the_low_target): Adjust.
1954 (initialize_low_arch): New function.
1955 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1956 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1957 (target_regsets): Rename to ...
1958 (xtensa_regsets): ... this, and make static.
1959 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1960 globals.
1961 (xtensa_arch_setup, xtensa_regs_info): New functions.
1962 (the_low_target): Adjust.
1963 (initialize_low_arch): New function.
1964 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1965 (nios2_arch_setup): Set the current process'es tdesc.
1966 (target_regsets): Rename to ...
1967 (nios2_regsets): ... this.
1968 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1969 (nios2_regs_info): New function.
1970 (the_low_target): Adjust.
1971 (initialize_low_arch): New function.
a261b8f5
PA
1972 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1973 (aarch64_arch_setup): Set the current process'es tdesc.
1974 (target_regsets): Rename to ...
1975 (aarch64_regsets): ... this.
1976 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1977 (aarch64_regs_info): New function.
1978 (the_low_target): Adjust.
1979 (initialize_low_arch): New function.
3aee8918
PA
1980 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1981 globals.
1982 (target_regsets): Rename to ...
1983 (tile_regsets): ... this.
1984 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1985 (tile_regs_info): New function.
1986 (tile_arch_setup): Set the current process'es tdesc.
1987 (the_low_target): Adjust.
1988 (initialize_low_arch): New function.
1989 * spu-low.c (tdesc_spu): Declare.
1990 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1991 * win32-arm-low.c (tdesc_arm): Declare.
1992 (arm_arch_setup): New function.
1993 (the_low_target): Install arm_arch_setup instead of
1994 init_registers_arm.
1995 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1996 (init_windows_x86): Rename to ...
1997 (i386_arch_setup): ... this. Set `win32_tdesc'.
1998 (the_low_target): Adjust.
1999 * win32-low.c (win32_tdesc): New global.
2000 (child_add_thread): Don't create the thread cache here.
2001 (do_initial_child_stuff): Set the new process'es tdesc.
2002 * win32-low.h (struct target_desc): Forward declare.
2003 (win32_tdesc): Declare.
2004 * lynx-i386-low.c (tdesc_i386): Declare global.
2005 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2006 * lynx-low.c (lynx_tdesc): New global.
2007 (lynx_add_process): Set the new process'es tdesc.
2008 * lynx-low.h (struct target_desc): Forward declare.
2009 (lynx_tdesc): Declare global.
2010 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2011 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2012 * nto-low.c (nto_tdesc): New global.
2013 (do_attach): Set the new process'es tdesc.
2014 * nto-low.h (struct target_desc): Forward declare.
2015 (nto_tdesc): Declare.
2016 * nto-x86-low.c (tdesc_i386): Declare.
2017 (nto_x86_arch_setup): Set `nto_tdesc'.
2018
b1fbec62
GB
20192013-06-04 Gary Benson <gbenson@redhat.com>
2020
2021 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2022 to qSupported response when appropriate.
2023 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2024 with nonzero-length annex.
2025 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2026 arguments supplied in annex.
2027
d1ec4ce7
DE
20282013-05-31 Doug Evans <dje@google.com>
2029
ac44adcb 2030 PR server/15594
d1ec4ce7
DE
2031 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2032 64 bits in 64-cross-32 environment.
2033
9b25f2d3
PA
20342013-05-28 Pedro Alves <palves@redhat.com>
2035
2036 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2037 (aarch64-without-fpu.c): Delete rule.
2038 * configure.srv (aarch64*-*-linux*): Remove references to
2039 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2040 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2041 declaration.
2042
6740dc9c
PA
20432013-05-24 Pedro Alves <palves@redhat.com>
2044
2045 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2046 instead of strchr/decode_address. Error if the range isn't split
2047 with a ','. Don't assume there's be a ':' in the action.
2048
c2d6af84
PA
20492013-05-23 Yao Qi <yao@codesourcery.com>
2050 Pedro Alves <palves@redhat.com>
2051
2052 * linux-low.c (lwp_in_step_range): New function.
2053 (linux_wait_1): If the thread was range stepping and stopped
2054 outside the stepping range, report the stop to GDB. Otherwise,
2055 continue stepping. Add range stepping debug output.
2056 (linux_set_resume_request): Copy the step range from the resume
2057 request to the lwp.
2058 (linux_supports_range_stepping): New.
2059 (linux_target_ops) <supports_range_stepping>: Set to
2060 linux_supports_range_stepping.
2061 * linux-low.h (struct linux_target_ops)
2062 <supports_range_stepping>: New field.
2063 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2064 * linux-x86-low.c (x86_supports_range_stepping): New.
2065 (the_low_target) <supports_range_stepping>: Set to
2066 x86_supports_range_stepping.
2067 * server.c (handle_v_cont): Handle 'r' action.
2068 (handle_v_requests): Append ";r" if the target supports range
2069 stepping.
2070 * target.h (struct thread_resume) <step_range_start,
2071 step_range_end>: New fields.
2072 (struct target_ops) <supports_range_stepping>:
2073 New field.
2074 (target_supports_range_stepping): New macro.
2075
58794e1a
JB
20762013-05-17 Joel Brobecker <brobecker@adacore.com>
2077
2078 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2079 confusion in comment.
2080
d631c5a7
JB
20812013-05-17 Joel Brobecker <brobecker@adacore.com>
2082
2083 * lynx-low.c (struct process_info_private): New type.
2084 (lynx_add_process): New function.
2085 (lynx_create_inferior, lynx_attach): Replace calls to
2086 add_process by calls to lynx_add_process.
2087 (lynx_resume): If PTID is null, then try using
2088 current_process()->private->last_wait_event_ptid.
2089 Add comments.
2090 (lynx_clear_inferiors): Delete. The contents of that function
2091 has been inlined in lynx_mourn;
2092 (lynx_wait_1): Save the ptid in the process's private data.
2093 (lynx_mourn): Free the process' private data. Replace call
2094 to lynx_clear_inferiors by call to clear_inferiors.
2095
96f7a20f
YQ
20962013-05-17 Yao Qi <yao@codesourcery.com>
2097
2098 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2099 the right place.
2100
db0dfaa0
LM
21012013-05-16 Luis Machado <lgustavo@codesourcery.com>
2102
2103 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2104 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2105 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2106 PT_TEXT_END_ADDR guards. Update comments.
2107 (linux_target_op) <read_offsets>: Conditionally define to
2108 linux_read_offsets if the target is UCLIBC and if it defines
2109 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2110
68f5f838
SL
21112013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2112 Andrew Jenner <andrew@codesourcery.com>
2113
2114 * Makefile.in (SFILES): Add linux-nios2-low.c.
2115 (clean): Add action to delete nios2-linux.c.
2116 (nios2-linux.c): New rule.
2117 * configure.srv: Add nios2*-*-linux*.
2118 * linux-nios2-low.c: New.
2119
1ebff1fd
HAQ
21202013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2121
2122 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2123
f6150862
HZ
21242013-04-25 Hui Zhu <hui@codesourcery.com>
2125
2126 PR gdb/15186
f6150862
HZ
2127 * ax.c (ax_printf): Add fflush.
2128
614c279d
TT
21292013-04-22 Tom Tromey <tromey@redhat.com>
2130
2131 * Makefile.in (SFILES): Add filestuff.c.
2132 (OBS): Add filestuff.o.
2133 (filestuff.o): New target.
2134 * config.in, configure: Rebuild.
2135 * configure.ac: Check for fdwalk, pipe2.
2136
7d4e5717
PA
21372013-04-17 Pedro Alves <palves@redhat.com>
2138
2139 * configure.ac (USE_THREAD_DB): Delete variable.
2140 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2141 Don't AC_SUBST USE_THREAD_DB.
2142 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2143 * config.in, configure: Regenerate.
2144
d5c93e41
PA
21452013-04-16 Pedro Alves <palves@redhat.com>
2146
2147 * linux-low.h (struct lwp_info) <thread_known>: Move under
2148 the USE_THREAD_DB #ifdef.
2149
04f5fe89
PA
21502013-04-16 Pedro Alves <palves@redhat.com>
2151
2152 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2153 (linux-low.o): Delete rule.
2154 * linux-low.h: Always include "gdb_thread_db.h" instead of
2155 conditionally including thread_db.h.
2156 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2157 HAVE_THREAD_DB_H.
2158
480b27bf
JK
21592013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2160
2161 * Makefile.in (install-only): Fix make install regression.
2162
43662968
JK
21632013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2164
2165 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2166 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2167 installation.
2168 * gdbserver.1: Remove.
2169
3e74e146
PA
21702013-03-22 Pedro Alves <palves@redhat.com>
2171
2172 * linux-low.c (handle_extended_wait): Don't call
2173 linux_enable_event_reporting.
2174
a8347a2a
TT
21752013-03-15 Tony Theodore <tonyt@logyst.com>
2176
2177 PR build/9098:
2178 * Makefile.in (SHELL): Use @SHELL@.
2179
eeb56fa7
SDJ
21802013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2181
2182 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2183 compiler warning.
2184
4fa7e2ff
JB
21852013-03-13 Joel Brobecker <brobecker@adacore.com>
2186
2187 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2188 Remove extraneous NULL element.
2189
8ddb1965
YQ
21902013-03-13 Yao Qi <yao@codesourcery.com>
2191
2192 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2193 'V' block in trace frame.
2194
9accd112
MM
21952013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2196
2197 * target.h (struct target_ops): Add btrace ops.
2198 (target_supports_btrace): New macro.
2199 (target_enable_btrace): New macro.
2200 (target_disable_btrace): New macro.
2201 (target_read_btrace): New macro.
2202 * gdbthread.h (struct thread_info): Add btrace field.
2203 * server.c: Include btrace-common.h.
2204 (handle_btrace_general_set): New function.
2205 (handle_btrace_enable): New function.
2206 (handle_btrace_disable): New function.
2207 (handle_general_set): Call handle_btrace_general_set.
2208 (handle_qxfer_btrace): New function.
2209 (struct qxfer qxfer_packets[]): Add btrace entry.
2210 * inferiors.c (remove_thread): Disable btrace.
2211 * linux-low: Include linux-btrace.h.
2212 (linux_low_enable_btrace): New function.
2213 (linux_low_read_btrace): New function.
2214 (linux_target_ops): Add btrace ops.
2215 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2216 Add srv_linux_btrace=yes.
2217 (x86_64-*-linux*): Add linux-btrace.o.
2218 Add srv_linux_btrace=yes.
2219 * configure.ac: Define HAVE_LINUX_BTRACE.
2220 * config.in: Regenerated.
2221 * configure: Regenerated.
2222
5cc22e4c
MM
22232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2224
2225 * server.c (handle_qxfer): Preserve error message if -3 is
2226 returned.
2227 (qxfer): Document the -3 return value.
2228
7c97f91e
MM
22292013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2230
2231 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2232 (linux_btrace_h): New variable.
2233 (linux-btrace.o): New rule.
2234
be9a119c 22352013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2236 Hafiz Abid Qadeer <abidh@codesourcery.com>
2237
2238 * tracepoint.c (trace_buffer_size): New global.
2239 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2240 (init_trace_buffer): Change to one-argument function. Allocate
2241 trace buffer memory.
2242 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2243 handle QTBuffer:size packet.
2244 (cmd_bigqtbuffer_size): New function.
2245 (initialize_tracepoint): Call init_trace_buffer with
2246 DEFAULT_TRACE_BUFFER_SIZE.
2247 * server.c (handle_query): Add QTBuffer:size in the
2248 supported packets.
2249
e64f7499
YQ
22502013-03-07 Yao Qi <yao@codesourcery.com>
2251
2252 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2253 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2254 of -1.
2255 (cmd_qtsp): Adjust condition. Do post increment.
2256 Set cur_action and cur_step_action back to 0.
2257
f0ae6fc3
PA
22582013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2259
2260 PR server/15236
2261 * linux-low.c (linux_write_memory): Return early success if LEN is
2262 zero.
2263
b5b0b0af
CV
22642013-03-05 Corinna Vinschen <vinschen@redhat.de>
2265
334ad4a8 2266 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2267
589bc927
TT
22682013-02-28 Tom Tromey <tromey@redhat.com>
2269
2270 * configure.ac: Invoke AC_SYS_LARGEFILE.
2271 * configure, config.in: Rebuild.
2272
dfe07582
CV
22732013-02-28 Corinna Vinschen <vinschen@redhat.com>
2274
2275 * win32-low.c: Throughout, fix format strings and casts of
2276 printf-like functions to avoid type related warnings on all
2277 platforms.
2278 (get_child_debug_event): Print dwDebugEventCode as hex since
2279 that's how it's usually documented.
2280
736cd585
YQ
22812013-02-28 Yao Qi <yao@codesourcery.com>
2282
2283 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2284 pulongest.
2285
e1f58301
JW
22862013-02-27 Jiong Wang <jiwang@tilera.com>
2287
2288 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2289 (reg-tilegx32.c): New rule.
2290 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2291 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2292 different register info initializer according to elf class.
2293 (init_registers_tilgx32): New function. The tilegx32 register info
2294 initializer.
2295 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2296 (tile_store_gregset): Likewise.
2297
d171ca78
YQ
22982013-02-27 Yao Qi <yao@codesourcery.com>
2299
2300 * server.c (process_point_options): Print debug message when
2301 debug_threads is true.
2302
282bbdf3
YQ
23032013-02-26 Yao Qi <yao@codesourcery.com>
2304
2305 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2306
aca22551
PA
23072013-02-19 Pedro Alves <palves@redhat.com>
2308 Kai Tietz <ktietz@redhat.com>
2309
2310 PR gdb/15161
2311
2312 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2313 instead of strtoul to extract address from packet.
2314 (process_serial_event) <'z'>: Likewise.
2315
4f3cee1c
YQ
23162013-02-18 Yao Qi <yao@codesourcery.com>
2317
2318 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2319
8e1d55a3
PA
23202013-02-14 Pedro Alves <palves@redhat.com>
2321
2322 Plug memory leak.
2323
2324 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2325 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2326
458820da
PA
23272013-02-14 Pedro Alves <palves@redhat.com>
2328
2329 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2330
baea0dae
PA
23312013-02-14 Pedro Alves <palves@redhat.com>
2332
2333 * tracepoint.c (save_string): Delete.
2334 (add_tracepoint_action): Use savestring instead of save_string.
2335
0b1afbb3
PA
23362013-02-12 Pedro Alves <palves@redhat.com>
2337
2338 * linux-xtensa-low.c: Ditto.
2339 * xtensa-xtregs.c: Ditto.
2340
8a4ac37e
PA
23412013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2342
2343 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2344 thread_db.
2345
148de6bb
MS
23462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2347
2348 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2349 aarch64_num_wp_regs and aarch64_num_bp_regs to
2350 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2351
55fac6e0
MS
23522013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2353
2354 * linux-aarch64-low.c (ps_get_thread_area): Replace
2355 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2356
176eb98c
MS
23572013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2358 Marcus Shawcroft <marcus.shawcroft@arm.com>
2359 Nigel Stephens <nigel.stephens@arm.com>
2360 Yufeng Zhang <yufeng.zhang@arm.com>
2361
2362 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2363 (aarch64.c, aarch64-without-fpu.c): New targets.
2364 * configure.srv (aarch64*-*-linux*): New.
2365 * linux-aarch64-low.c: New file.
2366
56f7af9c
MS
23672013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2368
43aaf8b6 2369 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2370 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2371 (dequeue_one_deferred_signal, linux_resume_one_thread)
2372 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2373 (linux_tracefork_grandchild, linux_test_for_tracefork)
2374 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2375 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2376 where the argument is 0.
2377
60f662b0
YQ
23782013-01-25 Yao Qi <yao@codesourcery.com>
2379
2380 * event-loop.c: Include "queue.h".
2381 (gdb_event_p): New typedef.
2382 (struct gdb_event) <next_event>: Remove.
2383 (event_queue): Change to QUEUE(gdb_event_p).
2384 (async_queue_event): Remove.
2385 (gdb_event_xfree): New.
2386 (initialize_event_loop): New.
2387 (process_event): Use API from QUEUE.
2388 (wait_for_event): Likewise.
2389 * server.c (main): Call initialize_event_loop.
2390 * server.h (initialize_event_loop): Declare.
2391
5ae4861a
YQ
23922013-01-18 Yao Qi <yao@codesourcery.com>
2393
2394 * ax.h (struct eval_agent_expr_context): New.
2395 (gdb_eval_agent_expr): Update declaration.
2396 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2397 TFRAME. Add new argument CTX.
2398 * server.h (struct eval_agent_expr_context): Declare.
2399 (agent_mem_read, agent_tsv_read): Update declaration.
2400 (agent_mem_read_string): Likewise.
2401 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2402 (add_traceframe_block): Add new argument TPOINT.
2403 Increase TPOINT->traceframe_usage.
2404 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2405 eval_tracepoint_agent_expr.
2406 (condition_true_at_tracepoint): Likewise.
2407 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2408 (agent_mem_read_string, agent_tsv_read): Likewise.
2409
85e00e85
YQ
24102013-01-16 Yao Qi <yao@codesourcery.com>
2411
2412 * linux-low.c (linux_resume_one_lwp): Don't check
2413 'lwp->bp_reinsert != 0'.
2414
4039cf45
JB
24152013-01-07 Joel Brobecker <brobecker@adacore.com>
2416 Pedro Alves <palves@redhat.com>
2417
2418 * lynx-low.c (ptrace_request_to_str): Define a temporary
2419 macro and use it to simplify this function's implementation.
2420
9044dee2
JB
24212013-01-07 Joel Brobecker <brobecker@adacore.com>
2422
2423 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2424 sets errno.
2425
e6352c8f
JB
24262013-01-07 Joel Brobecker <brobecker@adacore.com>
2427
2428 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2429
50681a27
JB
24302013-01-07 Joel Brobecker <brobecker@adacore.com>
2431
2432 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2433
3f6e77ef
JB
24342013-01-07 Joel Brobecker <brobecker@adacore.com>
2435
2436 * lynx-low.c (lynx_resume): Use the resume_info parameter
2437 to determine the ptid for the lynx_ptrace call, unless
2438 it is equal to minus_one_ptid, in which case we use the
2439 ptid of the current_inferior.
2440 (lynx_wait_1): After having received a thread create/exit
2441 event, resume the inferior's execution using the signaling
2442 thread's ptid, rather than the old ptid.
2443
7fda33ae
JB
24442013-01-07 Joel Brobecker <brobecker@adacore.com>
2445
2446 * lynx-low.c (lynx_resume): Delete variable ret.
2447
b9786c74
JB
24482013-01-01 Joel Brobecker <brobecker@adacore.com>
2449
2450 * gdbreplay.c (gdbreplay_version): Update copyright year.
2451 * server.c (gdbserver_version): Likewise.
2452
8b93d60f
JB
24532012-12-17 Joel Brobecker <brobecker@adacore.com>
2454
2455 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2456 new thread.
2457
037335a7
JB
24582012-12-17 Joel Brobecker <brobecker@adacore.com>
2459
2460 * lynx-low.c (ptrace_request_to_str): Add handling for
2461 PTRACE_GETTRACESIG.
2462
52d4cbd8
JB
24632012-12-17 Joel Brobecker <brobecker@adacore.com>
2464
2465 * lynx-low.c (lynx_attach): Delete variable new_process.
2466
ab8f6ca9
JB
24672012-12-17 Joel Brobecker <brobecker@adacore.com>
2468
2469 * lynx-low.c (lynx_create_inferior): Delete variable
2470 new_process.
2471
78cbc024
JB
24722012-12-17 Joel Brobecker <brobecker@adacore.com>
2473
2474 * lynx-low.c (ptrace_request_to_str): Do not handle
2475 PTRACE_GETTHREADLIST if this macro does not exist.
2476
14a00470
YQ
24772012-12-15 Yao Qi <yao@codesourcery.com>
2478
2479 * Makefile.in (OBS): Add notif.o.
2480 * notif.c, notif.h: New.
2481 * server.c: Include "notif.h".
2482 (struct vstop_notif) <next>: Remove.
2483 <base>: New field.
2484 (queue_stop_reply): Update.
2485 (push_event, send_next_stop_reply): Remove.
2486 (discard_queued_stop_replies): Update.
2487 (notif_stop): New variable.
2488 (handle_v_stopped): Remove.
2489 (handle_v_requests): Don't call handle_v_stopped. Call
2490 handle_ack_notif instead.
2491 (queue_stop_reply_callback): Call notif_event_enque instead
2492 of queue_stop_reply.
2493 (handle_status): Don't call send_next_stop_reply, call
2494 notif_write_event instead.
2495 (kill_inferior_callback): Likewise.
2496 (detach_or_kill_inferior_callback): Likewise.
2497 (main): Call initialize_notif.
2498 (process_serial_event): Call QUEUE_is_empty.
2499 (handle_target_event): Call notif_push instead of push event.
2500 * server.h (push_event): Remove declaration.
2501
61c125b9
TT
25022012-12-10 Tom Tromey <tromey@redhat.com>
2503
2504 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2505 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2506 macros.
2507 (.c.o): Rewrite.
2508 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2509 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2510 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2511 (amd64-linux-ipa.o, ax.o): Rewrite.
2512 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2513 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2514 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2515 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2516 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2517 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2518 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2519 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2520 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2521 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2522 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2523 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2524 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2525 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2526 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2527 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2528 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2529 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2530 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2531 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2532 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2533 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2534 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2535 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2536 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2537 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2538 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2539 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2540 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2541 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2542 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2543 (reg-tilegx.o): Remove.
2544 (all_object_files): New macro.
2545 Include .deps files.
2546 * aclocal.m4, configure: Rebuild.
2547 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2548 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2549 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2550
e90e9ad9
TT
25512012-12-05 Tom Tromey <tromey@redhat.com>
2552
2553 PR gdb/14917:
2554 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2555
02d403bf 25562012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
2557
2558 * configure.ac: Check for linux/perf_event.h.
2559 * config.in: Regenerated.
2560 * configure: Regenerated.
2561
0270a750
PA
25622012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2563
2564 * hostio.c (handle_readlink): Decrease buffer size
2565 parameter passed to readlink by one byte.
2566
8c29b58e
YQ
25672012-11-26 Yao Qi <yao@codesourcery.com>
2568
2569 * configure.ac (build_warnings): Append '-Wempty-body'.
2570 * configure: Regenerated.
2571 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2572 body.
2573
8bdce1ff
PM
25742012-11-15 Pierre Muller <muller@sourceware.org>
2575
2576 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2577 * config.in: Regenerate.
2578 * configure: Regenerate.
2579 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2580 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2581 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2582 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2583 header.
2584 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2585 instead of <sys/wait.h> header.
2586 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2587
02d403bf 25882012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
2589
2590 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2591 (various make rules): Remove -DGDBSERVER
2592
fbd5db48
YQ
25932012-11-09 Yao Qi <yao@codesourcery.com>
2594
2595 * spu-low.c (current_ptid): Move it to ..
2596 * gdbthread.h: ... here. New.
2597 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2598 * server.c (myresume, process_serial_event): Likewise.
2599 * thread-db.c (thread_db_find_new_threads): Likewise.
2600 * tracepoint.c (run_inferior_command): Likewise.
2601
b3dc46ff
AB
26022012-10-01 Andrew Burgess <aburgess@broadcom.com>
2603
2604 * server.c (handle_search_memory_1): Include access length in
2605 warning message.
2606
07c04788
HPN
26072012-09-05 Michael Brandt <michael.brandt@axis.com>
2608
2609 * linux-crisv32-low.c: Fix compile errors.
2610
918d227b
YQ
26112012-09-04 Yao Qi <yao@codesourcery.com>
2612
2613 * tracepoint.c (cmd_qtsv): Adjust debug message.
2614 Don't check CUR_TPOINT.
2615
18c1b81a
YQ
26162012-08-28 Yao Qi <yao@codesourcery.com>
2617
2618 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2619 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2620 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2621 Remove declarations of xmalloc, xreallloc, xstrdup and
2622 freeargv.
2623 * Makefile.in (libiberty_h): New.
2624 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2625 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2626
dc82f37b
YQ
26272012-08-23 Yao Qi <yao@codesourcery.com>
2628
2629 * server.h: Remove declaration of 'xsnprintf'.
2630
406b1477
KS
26312012-08-22 Keith Seitz <keiths@redhat.com>
2632
2633 * server.h: Include build-gnulib-gbserver/config.h.
2634 * gdbreplay.c: Likewise.
2635
e6712ff1
DE
26362012-08-08 Doug Evans <dje@google.com>
2637
2638 * Makefile.in (SFILES): Add gdb_vecs.c.
2639 (OBS): Add gdb_vecs.o.
2640 (gdb_vecs_h, host_defs_h): New variables.
2641 (thread-db.o): Add $(gdb_vecs_h) dependency.
2642 (gdb_vecs.o): New rule.
2643 * thread-db.c: #include "gdb_vecs.h".
2644 (thread_db_load_search): Use a vector to iterate over path elements.
2645 Handle text appearing after "$pdir".
2646
2647 * configure.ac: Add check for strstr.
2648 * config.in: Regenerate.
2649 * configure: Regenerate.
2650
7c3270ae
UW
26512012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2652
2653 * hostio.c (handle_pread): If pread fails, fall back to attempting
2654 lseek/read.
2655 (handle_pwrite): Likewise for pwrite.
2656
b62e2b27
UW
26572012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2658
2659 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2660 between unsupported TYPE and unimplementable ADDR/LEN combination.
2661 (arm_insert_point): Act on new return value.
2662
78a99e91
PA
26632012-07-31 Pedro Alves <palves@redhat.com>
2664
2665 * server.c (process_point_options): Only skip tokens if we find
2666 one that is unrecognized. Don't treat 'X' specially while
2667 skipping unrecognized tokens.
2668
fcf303ab
UW
26692012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2670
2671 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2672 to 4-byte-align HW breakpoint addresses for Thumb.
2673
7255706c
YQ
26742012-07-27 Yao Qi <yao@codesourcery.com>
2675
2676 PR remote/14161.
2677
2678 * server.h: Declare gdb_agent_about_to_close.
2679 * target.c (kill_inferior): Include "agent.h".
2680 New. Send command 'kill'.
2681 * target.h (kill_inferior): Removed macro.
2682 * tracepoint.c (gdb_agent_about_to_close): New.
2683 (gdb_agent_helper_thread): Handle command 'close'.
2684 Wait endlessly until the inferior stops.
2685 Install gdb_agent_remove_socket to atexit hook.
2686 (agent_socket_name): New static variable.
2687 (gdb_agent_socket_init): Replace local variable 'name' with
2688 'agent_socket_name'.
2689 (gdb_agent_remove_socket): New.
2690
5a3f286f
YQ
26912012-07-27 Yao Qi <yao@codesourcery.com>
2692
2693 * server.c (process_point_options): Stop at 'X' when parsing.
2694
961bd387
ME
26952012-07-19 Michael Eager <eager@eagercon.com>
2696
a261b8f5 2697 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
2698 to hw_execute.
2699 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2700 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2701 hardware breakpoint.
2702
aa7c7447
JK
27032012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2704
2705 * gdbserver/linux-low.c (initialize_low): Call
2706 linux_ptrace_init_warnings.
2707
7f216e7c
DE
27082012-07-02 Doug Evans <dje@google.com>
2709
2710 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2711 pointer to int.
2712
d3ce09f5
SS
27132012-07-02 Stan Shebs <stan@codesourcery.com>
2714
2715 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2716 (ax.o): Add it to build rule.
2717 (ax-ipa.o): Ditto.
2718 (OBS): Add format.o.
2719 (IPA_OBS): Add format.o.
2720 * server.c (handle_query): Claim support for breakpoint commands.
2721 (process_point_options): Add command case.
2722 (process_serial_event): Leave running if there are printfs in
2723 effect.
2724 * mem-break.h (any_persistent_commands): Declare.
2725 (add_breakpoint_commands): Declare.
2726 (gdb_no_commands_at_breakpoint): Declare.
2727 (run_breakpoint_commands): Declare.
2728 * mem-break.c (struct point_command_list): New struct.
2729 (struct breakpoint): New field command_list.
2730 (any_persistent_commands): New function.
2731 (add_commands_to_breakpoint): New function.
2732 (add_breakpoint_commands): New function.
2733 (gdb_no_commands_at_breakpoint): New function.
2734 (run_breakpoint_commands): New function.
2735 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2736 locally.
2737 * ax.c: Include format.h.
2738 (ax_printf): New function.
2739 (gdb_eval_agent_expr): Add printf opcode.
2740
2f8f6aed
YQ
27412012-06-13 Yao Qi <yao@codesourcery.com>
2742
2743 * server.c (start_inferior): Remove duplicated writes to fields
2744 'last_resume_kind' and 'last_status' of 'current_inferior'.
2745
0c9070b3
YQ
27462012-06-12 Yao Qi <yao@codesourcery.com>
2747 Pedro Alves <palves@redhat.com>
2748
2749 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2750 comment.
2751 * server.c (handle_v_cont): Extend comment.
2752
c52daf70
YQ
27532012-06-11 Yao Qi <yao@codesourcery.com>
2754
2755 * linux-low.c (linux_attach): Add 'static'.
2756
d38bbb0a
YQ
27572012-06-06 Yao Qi <yao@codesourcery.com>
2758
2759 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2760
89dc0afd
JK
27612012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2762
2763 Fix gcc -flto compilation warning.
2764 * server.c (main): Make variable multi_mode and attach volatile.
2765
75f62ce7
TJB
27662012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2767
2768 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2769 if the platform doesn't know about it.
2770
65f479b6
PA
27712012-05-30 Jeff Kenton <jkenton@tilera.com>
2772
2773 * Makefile.in (SFILES): Add linux-tile-low.c.
2774 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2775 * configure.srv: Handle tilegx-*-linux*.
2776 * linux-tile-low.c: New file.
2777
0c5bf5a9
JK
27782012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2779
2780 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2781
a493e3e2
PA
27822012-05-24 Pedro Alves <palves@redhat.com>
2783
2784 PR gdb/7205
2785
43aaf8b6 2786 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 2787
2ea28649
PA
27882012-05-24 Pedro Alves <palves@redhat.com>
2789
2790 PR gdb/7205
2791
2792 Replace target_signal with gdb_signal throughout.
2793
8d409d16
MR
27942012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2795
2796 * linux-low.c (linux_store_registers): Avoid the copying sequence
2797 when no data has been retrieved by ptrace.
2798
23512c01
MGD
27992012-05-22 Will Deacon <will.deacon@arm.com>
2800
2801 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2802 Include asm/ptrace.h.
2803 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2804 already defined.
2805
4934b29e
MR
28062012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2807
2808 * linux-low.c (linux_store_registers): Don't re-retrieve data
2809 with ptrace that has already been obtained from /proc. Always
2810 copy any data retrieved with ptrace to the buffer supplied.
2811
bde24c0a
PA
28122012-05-11 Yao Qi <yao@codesourcery.com>
2813 Pedro Alves <palves@redhat.com>
2814
2815 * linux-low.c (enum stopping_threads_kind): New.
2816 (stopping_threads): Change type to `enum stopping_threads_kind'.
2817 (handle_extended_wait): If stopping and suspending threads, leave
2818 the new_lwp suspended too.
2819 (linux_wait_for_event): Adjust.
2820 (stop_all_lwps): Set `stopping_threads' to
2821 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2822 whether we're suspending threads or just stopping them. Assert no
2823 recursion happens.
2824
623b6bdf
YQ
28252012-04-29 Yao Qi <yao@codesourcery.com>
2826
2827 * server.h: Move some code to ...
2828 * gdbthread.h: ... here. New.
2829 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2830 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2831 (nto-low.o, win32-low.o): Likewise.
2832 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2833 * regcache.c, remote-utils.c, server.c: Likewise.
2834 * target.c, tracepoint.c, win32-low.c: Likewise.
2835
f15f9948
TJB
28362012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2837
2838 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2839 (PTRACE_ARG4_TYPE): Likewise.
2840 (PTRACE_XFER_TYPE): Likewise.
2841 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2842 ptrace to PTRACE_ARG3_TYPE.
2843 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2844 (PTRACE_ARG4_TYPE): Likewise.
2845 (PTRACE_XFER_TYPE): Likewise.
2846 (linux_detach_one_lwp): Cast fourth argument of
2847 ptrace to long then PTRACE_ARG4_TYPE.
2848 (regsets_fetch_inferior_registers): Cast third argument of
2849 ptrace to long then PTRACE_ARG3_TYPE.
2850 (regsets_store_inferior_registers): Likewise.
2851
38ea300a
PA
28522012-04-20 Pedro Alves <palves@redhat.com>
2853
2854 * configure: Regenerate.
2855
c971b7fa
PA
28562012-04-19 Pedro Alves <palves@redhat.com>
2857
43aaf8b6 2858 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 2859 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
2860 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2861 (all, install-only, uninstall, clean-info, all-lib, clean): No
2862 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2863 (maintainer-clean realclean distclean): Use subdir_do.
2864 (subdir_do): New.
2865 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 2866 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
2867 * acinclude.m4: Include acx_configure_dir.m4.
2868 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2869 calls. Call AC_PROG_RANLIB. Configure gnulib using
2870 ACX_CONFIGURE_DIR.
2871 (GNULIB): New.
2872 (GNULIB_STDINT_H): Adjust.
2873 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2874 * gdbreplay.c: Include build-gnulib/config.h.
2875 * server.h: Likewise.
2876 * aclocal.m4: Regenerate.
2877 * config.in: Regenerate.
2878 * configure: Regenerate.
c971b7fa 2879
809277f8
PA
28802012-04-19 Pedro Alves <palves@redhat.com>
2881
2882 * Makefile.in (LIBGNU, INCGNU): Adjust.
2883 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2884 (all, install-only, uninstall, clean-info, all-lib, clean)
2885 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2886 * configure.ac: Adjust AC_OUTPUT output.
2887 * aclocal.m4: Regenerate.
2888 * configure: Regenerate.
2889
fd9bb8b8
PA
28902012-04-19 Pedro Alves <palves@redhat.com>
2891
2892 * Makefile.in (generated_files): New.
2893 (server_h): Remove the explicit dependency on config.h, and depend
2894 on $generated_files.
2895
1c298c66
PA
28962012-04-19 Pedro Alves <palves@redhat.com>
2897
2898 * Makefile.in (INCGNU): Add -Ignulib.
2899
57c4b50b
PA
29002012-04-19 Pedro Alves <palves@redhat.com>
2901
2902 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2903 (INCGNU): ... this, and spell out -I here.
2904 (GNULIB_LIB): Rename to ...
2905 (LIBGNU): ... this.
2906 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2907
1030e047
PA
29082012-04-19 Pedro Alves <palves@redhat.com>
2909
2910 * config.in: Regenerate.
2911
447d4319
PA
29122012-04-19 Pedro Alves <palves@redhat.com>
2913
2914 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2915 * server.h (memmem): Remove declaration.
2916 * config.in: Regenerate.
2917 * configure: Regenerate.
2918
aad9eab9
YQ
29192012-04-19 Yao Qi <yao@codesourcery.com>
2920
2921 * Makefile.in (SFILES): Add common/vec.c.
2922 (OBS): Add vec.o.
2923 (vec.o): New rule.
2924
3e10640f
YQ
29252012-04-19 Yao Qi <yao@codesourcery.com>
2926
2927 * remote-utils.c (prepare_resume_reply): Replace with macro
2928 target_core_of_thread.
2929 * server.c (handle_qxfer_threads_proper): Likewise.
2930 * target.h (traget_core_of_thread): New macro.
2931
71622373
PA
29322012-04-18 Pedro Alves <palves@redhat.com>
2933
2934 * aclocal.m4: Regenerate.
2935 * configure: Regenerate.
2936
80d26939
YQ
29372012-04-16 Yao Qi <yao@codesourcery.com>
2938
2939 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2940 duplicated on address.
2941
42476b70
YQ
29422012-04-16 Yao Qi <yao@codesourcery.com>
2943
2944 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2945 (struct tracepoint_action_ops) <send>: New field.
2946 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2947 (agent_expr_send, x_tracepoint_action_send): New.
2948 (l_tracepoint_action_send): New.
2949 (cmd_qtdp): Download and install tracepoint
2950 according to `use_agent'.
2951 (run_inferior_command): Add one more parameter `len'.
2952 Update callers.
2953 (tracepoint_send_agent): New.
2954 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2955
7bc83639
YQ
29562012-04-16 Yao Qi <yao@codesourcery.com>
2957
2958 * tracepoint.c (download_tracepoints): Moved to ...
2959 (cmd_qtstart): ... here.
2960
5f18041e
YQ
29612012-04-14 Yao Qi <yao@codesourcery.com>
2962
2963 * tracepoint.c: Include inttypes.h.
2964 (struct collect_memory_action): Use sized types.
2965 (struct tracepoint): Likewise.
2966 (cmd_qtdp, stop_tracing): Update print specifiers.
2967 (cmd_qtp, response_tracepoint): Likewise.
2968 (collect_data_at_tracepoint): Likewise.
2969 (collect_data_at_step): Likewise.
2970
55a8c076
YQ
29712012-04-14 Yao Qi <yao@codesourcery.com>
2972
2973 Import gnulib module inttypes.
2974 * aclocal.m4, config.in, configure: Regenerated.
2975
dc750257
YQ
29762012-04-14 Yao Qi <yao@codesourcery.com>
2977
2978 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2979 Makefile and config.status at last.
2980
0ab5faf9
YQ
29812012-04-13 Yao Qi <yao@codesourcery.com>
2982
2983 * tracepoint.c: Include stdint.h unconditionally.
2984
18f5fd81
TJB
29852012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2986
2987 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2988 on BFD_HAVE_SYS_PROCFS_TYPE.
2989 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2990 * configure: Regenerate.
2991 * config.in: Likewise.
2992
4d47af5c
L
29932012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2994
2995 * Makefile.in (clean): Also remove x32.c x32-linux.c
2996 x32-avx.c x32-avx-linux.c.
2997 (x32.o): New target.
2998 (x32.c): Likewise.
2999 (x32-linux.o): Likewise.
3000 (x32-linux.c): Likewise.
3001 (x32-avx.o): Likewise.
3002 (x32-avx.c): Likewise.
3003 (x32-avx-linux.o): Likewise.
3004 (x32-avx-linux.c): Likewise.
3005
3006 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3007 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3008 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3009 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3010 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3011 i386/x32-avx-linux.xml.
3012
3013 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3014 (init_registers_x32_avx_linux): Likwise.
3015 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3016 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3017
ecedbe58
PA
30182012-04-13 Pedro Alves <palves@redhat.com>
3019
3020 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3021 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3022 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3023 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3024 the sub-make.
3025
c92b5177
L
30262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3027
3028 * linux-x86-low.c (compat_x32_clock_t): New.
3029 (compat_x32_siginfo_t): Likewise.
3030 (compat_x32_siginfo_from_siginfo): Likewise.
3031 (siginfo_from_compat_x32_siginfo): Likewise.
3032 (linux_is_elf64): Likewise.
3033 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3034 and siginfo_from_compat_x32_siginfo for x32.
3035 (x86_arch_setup): Set linux_is_elf64.
3036
214d508e
L
30372012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3038
3039 PR gdb/13969
3040 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3041 e_machine field.
3042 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3043 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3044 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3045 compatible with process.
3046
c9a1864a
YQ
30472012-04-12 Yao Qi <yao@codesourcery.com>
3048
3049 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3050 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3051 (install-only, install-info, clean): Handle sub dir gnulib.
3052 (all-lib, am--refresh): New targets.
3053 (memmem.o): Remove target.
3054 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3055 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3056 (AC_REPLACE_FUNCS): Remove memmem.
3057 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3058 (AC_OUTPUT): Generate Makefile in gnulib/.
3059 * aclocal.m4, config.in, configure: Regenerated.
3060
367ba2c2
MR
30612012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3062
3063 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3064
9d236627
PA
30652012-04-05 Pedro Alves <palves@redhat.com>
3066
3067 -Werror=strict-aliasing
3068
3069 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3070 pointer.
3071
111217b3
PA
30722012-04-04 Pedro Alves <palves@redhat.com>
3073
3074 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3075 (sparc_store_gregset_from_stack, sparc_store_gregset)
3076 (sparc_breakpoint_at): Fix formatting.
3077
8365dcf5
TJB
30782012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3079
3080 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3081 are available.
3082 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3083 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3084 * config.in: Regenerate.
3085 * configure: Likewise.
3086
689cc2ae
PA
30872012-03-29 Pedro Alves <palves@redhat.com>
3088
3089 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3090 Correct ptrace arguments.
3091
c14dfd32
PA
30922012-03-28 Pedro Alves <palves@redhat.com>
3093
3094 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3095 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3096 (IA64_FR1_REGNUM): New defines.
3097 (ia64_fetch_register): New.
3098 (the_low_target): Install it.
3099 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3100 field.
3101 * linux-low.c (linux_fetch_registers): Try the
3102 the_low_target.fetch_register hook first.
3103
3104 * linux-arm-low.c (the_low_target): Adjust.
3105 * linux-bfin-low.c (the_low_target): Adjust.
3106 * linux-cris-low.c (the_low_target): Adjust.
3107 * linux-crisv32-low.c (the_low_target): Adjust.
3108 * linux-m32r-low.c (the_low_target): Adjust.
3109 * linux-m68k-low.c (the_low_target): Adjust.
3110 * linux-mips-low.c (the_low_target): Adjust.
3111 * linux-ppc-low.c (the_low_target): Adjust.
3112 * linux-s390-low.c (the_low_target): Adjust.
3113 * linux-sh-low.c (the_low_target): Adjust.
3114 * linux-sparc-low.c (the_low_target): Adjust.
3115 * linux-tic6x-low.c (the_low_target): Adjust.
3116 * linux-x86-low.c (the_low_target): Adjust.
3117 * linux-xtensa-low.c (the_low_target): Adjust.
3118
63c88e13
PA
31192012-03-26 Pedro Alves <palves@redhat.com>
3120
3121 * server.c (handle_qxfer_libraries): Don't bail early if
3122 the_target->qxfer_libraries_svr4 is not NULL.
3123
fb723180
PA
31242012-03-26 Pedro Alves <palves@redhat.com>
3125
3126 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3127
0afae3cf
PA
31282012-03-23 Pedro Alves <palves@redhat.com>
3129
3130 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3131 "library-list-svr4" element's start tag when the the DSO list is
3132 empty.
3133
485f1ee4
PA
31342012-03-23 Pedro Alves <palves@redhat.com>
3135
3136 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3137 a variable whose type size is the same as the inferior's pointer
3138 size.
3139
a5362b9a
TS
31402012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3141
3142 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3143 struct siginfo.
3144 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3145 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3146 * linux-low.h: Include <signal.h>.
3147 (struct siginfo): Remove forward declaration.
3148 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3149 struct siginfo.
3150
d226c142
MF
31512012-03-21 Mike Frysinger <vapier@gentoo.org>
3152
3153 * .gitignore: Ignore more files.
3154
122f36ef
PA
31552012-03-19 Pedro Alves <palves@redhat.com>
3156 Jan Kratochvil <jan.kratochvil@redhat.com>
3157
3158 * server.c (cont_thread, general_thread): Add describing comments.
3159 (start_inferior): Clear `cont_thread'.
3160 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3161 of a process.
3162
fc3e5175
YQ
31632012-03-15 Yao Qi <yao@codesourcery.com>
3164
3165 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3166 handling to ...
3167 (cmd_qtdp): ... here.
3168
8d0d92cd
YQ
31692012-03-15 Yao Qi <yao@codesourcery.com>
3170
3171 * tracepoint.c (struct tracepoint_action_ops): New.
3172 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3173 (m_tracepoint_action_download): New.
3174 (r_tracepoint_action_download): New.
3175 (x_tracepoint_action_download): New.
3176 (l_tracepoint_action_download): New.
3177 (add_tracepoint_action): Install `action->ops' according type.
3178 (download_tracepoint_1): Move code `download' function pointer
3179 of various tracepoint_action_ops.
3180
87b0bb13
JK
31812012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3182
3183 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3184 linux_ptrace_attach_warnings.
3185
5f572dec
JK
31862012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3187
3188 * Makefile.in (linux-ptrace.o): New.
3189 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3190 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3191 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3192 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3193 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3194 of these targets.
3195 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3196
f4647387
YQ
31972012-03-08 Yao Qi <yao@codesourcery.com>
3198 Pedro Alves <palves@redhat.com>
3199
3200 Fix PR server/13392.
3201 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3202 offset of JMP insn.
3203 * tracepoint.c (remove_tracepoint): New.
3204 (cmd_qtdp): Call remove_tracepoint when failed to install.
3205
9b224c5e
PA
32062012-03-07 Pedro Alves <palves@redhat.com>
3207
3208 * linux-low.c (get_detach_signal): New.
3209 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3210 Pass on pending signals to PTRACE_DETACH. Check the result of the
3211 ptrace call.
3212 * server.c (program_signals, program_signals_p): New.
3213 (handle_general_set): Handle QProgramSignals.
3214 * server.h (program_signals, program_signals_p): Declare.
3215
e237a7e2
JK
32162012-03-05 Pedro Alves <palves@redhat.com>
3217 Jan Kratochvil <jan.kratochvil@redhat.com>
3218
3219 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3220 New comment why.
3221
5808517f
YQ
32222012-03-03 Yao Qi <yao@codesourcery.com>
3223
3224 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3225 agent_look_up_symbols.
3226
58b4daa5
YQ
32272012-03-03 Yao Qi <yao@codesourcery.com>
3228
3229 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3230 (linux-x86-low.o): Likewise.
3231 * server.h: Remove in_process_agent_loaded.
3232 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3233 common/agent.c.
3234 Update callers.
3235
8ffcbaaf
YQ
32362012-03-03 Yao Qi <yao@codesourcery.com>
3237
3238 * tracepoint.c (gdb_agent_capability): New global.
3239 (in_process_agent_loaded_ust): Renamed to
3240 `in_process_agent_supports_ust'.
3241 Update callers.
3242 (in_process_agent_supports_ust): Call agent_capability_check.
3243 (clear_installed_tracepoints): Assert that agent supports
3244 agent.
3245
d1feda86
YQ
32462012-03-03 Yao Qi <yao@codesourcery.com>
3247
3248 * linux-low.c (linux_supports_agent): New.
3249 (linux_target_ops): Initialize field `supports_agent' with
3250 linux_supports_agent.
3251 * target.h (struct target_ops) <supports_agent>: New.
3252 (target_supports_agent): New macro.
3253 * server.c (handle_general_set): Handle packet 'QAgent'.
3254 (handle_query): Send `QAgent+'.
3255 * Makefile.in (server.o): Depends on agent.h.
3256
2fa291ac
YQ
32572012-03-03 Yao Qi <yao@codesourcery.com>
3258
3259 * Makefile.in (OBS): Add agent.o.
3260 Add new rule for agent.o.
3261 Track dependence of tracepoint.c on agent.h.
3262 * tracepoint.c (run_inferior_command_1):
3263 (run_inferior_command): Call agent_run_command.
3264 (gdb_ust_connect_sync_socket): Deleted. Move it to
3265 common/agent.c.
3266 (resume_thread, stop_thread): Likewise.
3267 (gdb_ust_socket_init): Renamed to ...
3268 (gdb_agent_socket_init): ... New.
3269 (gdb_ust_thread): Renamed to ...
3270 (gdb_agent_helper_thread): ... New.
3271 (gdb_ust_init): Move some code to ...
3272 (gdb_agent_init): ... here. New.
3273 [HAVE_UST]: Call gdb_ust_init.
3274 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3275 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3276 * config.in, configure: Regenerated.
3277
05044653
PA
32782012-03-02 Pedro Alves <palves@redhat.com>
3279
3280 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3281 * linux-low.c (struct simple_pid_list): New.
3282 (stopped_pids): New a struct simple_pid_list pointer.
3283 (add_to_pid_list, pull_pid_from_list): New.
3284 (handle_extended_wait): Don't assume the first signal new children
3285 report is SIGSTOP. Adjust call to pull_pid_from_list.
3286 (linux_wait_for_lwp): Adjust.
3287
8d00225b
YQ
32882012-03-02 Yao Qi <yao@codesourcery.com>
3289
3290 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3291 debug log.
3292
19560ba5
YQ
32932012-03-02 Yao Qi <yao@codesourcery.com>
3294
3295 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3296 `stop_pc' and `tpoint'. Update caller.
3297
1faeff08
MR
32982012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3299
3300 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3301 * linux-low.c (use_linux_regsets): New macro.
3302 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3303 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3304 (linux_register_in_regsets): New function.
3305 (usr_fetch_inferior_registers): Skip registers covered by
3306 regsets.
3307 (usr_store_inferior_registers): Likewise.
3308 (usr_fetch_inferior_registers): New macro.
3309 (usr_store_inferior_registers): Likewise.
3310 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3311 (linux_store_registers): Likewise.
3312 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3313 prototype.
3314 (init_registers_mips64_dsp_linux): Likewise.
3315 (init_registers_mips_linux): New macro.
3316 (init_registers_mips_dsp_linux): Likewise.
3317 (mips_dsp_num_regs): Likewise.
3318 (DSP_BASE, DSP_CONTROL): New fallback macros.
3319 (mips_base_regs): New macro.
3320 (mips_regmap): Use it. Fix the size.
3321 (mips_dsp_regmap): New variable.
3322 (mips_dsp_regset_bitmap): Likewise.
3323 (mips_arch_setup): New function.
3324 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3325 than mips_regmap.
3326 (mips_cannot_store_register): Likewise.
3327 (the_low_target): Update .arch_setup, .num_regs and .regmap
3328 initializers. Add .regset_bitmap initializer.
3329 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3330 initializer.
3331 * linux-bfin-low.c (the_low_target): Likewise.
3332 * linux-cris-low.c (the_low_target): Likewise.
3333 * linux-crisv32-low.c (the_low_target): Likewise.
3334 * linux-ia64-low.c (the_low_target): Likewise.
3335 * linux-m32r-low.c (the_low_target): Likewise.
3336 * linux-m68k-low.c (the_low_target): Likewise.
3337 * linux-ppc-low.c (the_low_target): Likewise.
3338 * linux-s390-low.c (the_low_target): Likewise.
3339 * linux-sh-low.c (the_low_target): Likewise.
3340 * linux-sparc-low.c (the_low_target): Likewise.
3341 * linux-tic6x-low.c (the_low_target): Likewise.
3342 * linux-x86-low.c (the_low_target): Likewise.
3343 * linux-xtensa-low.c (the_low_target): Likewise.
3344 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3345 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3346 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3347 srv_xmlfiles.
3348 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3349 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3350
c03e6ccc
YQ
33512012-02-29 Yao Qi <yao@codesourcery.com>
3352 Pedro Alves <palves@redhat.com>
3353
3354 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3355 `step_over_finished' is true.
3356
644cebc9
PA
33572012-02-27 Pedro Alves <palves@redhat.com>
3358
3359 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3360 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3361
c14d7ab2
PA
33622012-02-27 Pedro Alves <palves@redhat.com>
3363
3364 PR server/9684
3365 * linux-low.c (pid_is_stopped): New.
3366 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3367
412c89dd
LM
33682012-02-25 Luis Machado <lgustavo@codesourcery.com>
3369
3370 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3371 of conditions.
3372
b745defe
MR
33732012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3374
3375 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3376
9f3a5c85
LM
33772012-02-24 Luis Machado <lgustavo@codesourcery>
3378
3379 * server.c (handle_query): Advertise support for target-side
3380 breakpoint condition evaluation.
3381 (process_point_options): New function.
3382 (process_serial_event): When inserting a breakpoint, check for
3383 a target-side condition that should be evaluated.
3384
3385 * mem-break.c: Include regcache.h and ax.h.
3386 (point_cond_list_t): New data structure.
3387 (breakpoint) <cond_list>: New field.
3388 (find_gdb_breakpoint_at): Make non-static.
3389 (delete_gdb_breakpoint_at): Clear any target-side
3390 conditions.
3391 (clear_gdb_breakpoint_conditions): New function.
3392 (add_condition_to_breakpoint): Likewise.
3393 (add_breakpoint_condition): Likewise.
3394 (gdb_condition_true_at_breakpoint): Likewise.
3395 (gdb_breakpoint_here): Return result directly instead
3396 of going through a local variable.
3397
3398 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3399 (clear_gdb_breakpoint_conditions): Likewise.
3400 (add_breakpoint_condition): Likewise.
3401 (gdb_condition_true_at_breakpoint): Likewise.
3402
3403 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3404 (need_step_over_p): Take target-side breakpoint condition into
3405 consideration.
3406
5e1dc496
LM
34072012-02-24 Luis Machado <lgustavo@codesourcery>
3408
3409 * server.h: Include tracepoint.h.
3410 (agent_mem_read, agent_get_trace_state_variable_value,
3411 agent_set_trace_state_variable_value,
3412 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3413 get_set_tsv_func_addr): New prototypes.
3414
3415 * ax.h: New include file.
3416 * ax.c: New source file.
3417
3418 * tracepoint.c: Include ax.h.
3419 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3420 agent_expr, eval_result_type): Move to ax.h.
3421 (parse_agent_expr): Rename to ...
3422 (gdb_parse_agent_expr): ... this, make it non-static and move
3423 to ax.h.
3424 (unparse_agent_expr) Rename to ...
3425 (gdb_unparse_agent_expr): ... this, make it non-static and move
3426 to ax.h.
3427 (eval_agent_expr): Rename to ...
3428 (eval_tracepoint_agent_expr): ... this.
3429 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3430 forward declarations.
3431 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3432 (agent_get_trace_state_variable_value): New function.
3433 (agent_set_trace_state_variable_value): New function.
3434 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3435 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3436 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3437 (condition_true_at_tracepoint): Likewise.
3438 (parse_agent_expr): Rename to ...
3439 (gdb_parse_agent_expr): ... this and move to ax.c.
3440 (unparse_agent_expr): Rename to ...
3441 (gdb_unparse_agent_expr): ... this and move to ax.c.
3442 (gdb_agent_op_name): Move to ax.c.
3443 (eval_agent_expr): Rename to ...
3444 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3445 and move to ax.c.
3446 (eval_tracepoint_agent_expr): New function.
3447 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3448 non-static.
5e1dc496
LM
3449 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3450 ax.c.
3451 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3452 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3453 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3454 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3455 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3456 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3457 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3458 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3459 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3460 (compile_bytecodes): Remove forward declaration.
3461 (is_goto_target): Move to ax.c.
3462 (compile_bytecodes): Move to ax.c and call
3463 agent_get_trace_state_variable_value (...) and
3464 agent_set_trace_state_variable_value (...).
3465
3466 * Makefile.in: Update ax.c and IPA dependencies.
3467
277e4e52
PA
34682012-02-24 Pedro Alves <palves@redhat.com>
3469
3470 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3471 (cmd_bigqtbuffer_circular): ... this. Only handle
3472 'QTBuffer:circular:'.
3473 (handle_tracepoint_general_set): Adjust.
3474
bf4c19f7
YQ
34752012-02-16 Yao Qi <yao@codesourcery.com>
3476
3477 * inferiors.c: Move code to ...
3478 * dll.c: .... here. New.
3479 * server.h: Declare clear_dlls.
3480 * Makefile.in (SFILES): Add dll.c.
3481 (OBS): Add dll.o
3482 (dll.o): New rule.
3483
d73f2619
YQ
34842012-02-11 Yao Qi <yao@codesourcery.com>
3485
3486 * server.c: (handle_monitor_command): Add a new parameter
3487 `own_buf'.
3488 (handle_query): Update caller.
3489
f8255c2a
JB
34902012-02-09 Joel Brobecker <brobecker@adacore.com>
3491
3492 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3493 * configure, config.in: Regenerate.
3494 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3495 is not defined.
3496
da84f473
PA
34972012-02-02 Pedro Alves <palves@redhat.com>
3498
3499 Try SIGKILL first, then PTRACE_KILL.
3500 * linux-low.c (linux_kill_one_lwp): New.
3501 (linux_kill_one_lwp): Rename to ...
3502 (kill_one_lwp_callback): ... this. Use the new
3503 linux_kill_one_lwp.
3504
e886a173
PA
35052012-02-02 Pedro Alves <palves@redhat.com>
3506
3507 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3508 inferior.
3509
be07f1a2
PA
35102012-01-27 Pedro Alves <palves@redhat.com>
3511
3512 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3513 (elf_64_file_p): Make static.
3514 (linux_pid_exe_is_elf_64_file): New.
3515 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3516 Delete declarations.
3517 (linux_pid_exe_is_elf_64_file): Declare.
3518 * linux-x86-low.c (x86_arch_setup): Use
3519 linux_pid_exe_is_elf_64_file.
3520
d8301ad1
JK
35212012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3522
3523 * linux-low.c (linux_wait_for_event_1): Rename to ...
3524 (linux_wait_for_event): ... here and merge it with former
3525 linux_wait_for_event - new variable wait_ptid, use it.
3526 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3527
01b17894
PA
35282012-01-23 Pedro Alves <palves@redhat.com>
3529
3530 * server.c (main): Avoid yet another case of infinite loop while
3531 detaching/killing after a longjmp.
3532
e825046f
JK
35332012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3534
3535 Code cleanup.
3536 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3537
b9e7b9c3
UW
35382012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3539
3540 * hostio.c (handle_readlink): New function.
3541 (handle_vFile): Call it to handle "vFile:readlink" packets.
3542
901f9912
UW
35432012-01-20 Pedro Alves <palves@redhat.com>
3544 Ulrich Weigand <ulrich.weigand@linaro.org>
3545
3546 * server.c (handle_v_requests): Only support vAttach and vRun to
3547 start multiple processes when in extended protocol mode.
3548
fc1ab1a0
PA
35492012-01-17 Pedro Alves <palves@redhat.com>
3550
3551 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3552 memalign plus mprotect to allocate the scratch buffer.
3553
7d5d4e98
PA
35542012-01-13 Pedro Alves <palves@redhat.com>
3555
3556 * server.c (attach_inferior): Clear `cont_thread'.
3557
f128d5e9
PA
35582012-01-13 Pedro Alves <palves@redhat.com>
3559
3560 * server.c (main): Avoid infinite loop while detaching/killing
3561 after a longjmp.
3562
06db92f0
DE
35632012-01-09 Doug Evans <dje@google.com>
3564
3565 * server.c (start_inferior): Set last_ptid in --wrapper case.
3566
32d92999
YQ
35672012-01-06 Yao Qi <yao@codesourcery.com>
3568
3569 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3570 defined.
3571 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3572
5e0a92a9
YQ
35732012-01-04 Yao Qi <yao@codesourcery.com>
3574
3575 * tracepoint.c (cmd_qtdp): Print debug message
3576 for static tracepoint.
3577
ae639e8c
YQ
35782012-01-04 Yao Qi <yao@codesourcery.com>
3579
3580 * tracepoint.c (trace_vdebug): Differentiate debug message
3581 between gdbserver and IPA.
3582
f72429c5
YQ
35832012-01-03 Yao Qi <yao@codesourcery.com>
3584
3585 * tracepoint.c (tracepoint_was_hit): Don't collect for
3586 static tracepoint.
3587
12c3e59c
JB
35882012-01-02 Joel Brobecker <brobecker@adacore.com>
3589
3590 * terminal.h: Reformat copyright header.
3591
67827812
JB
35922012-01-02 Joel Brobecker <brobecker@adacore.com>
3593
3594 * server.c (gdbserver_version): Update copyright year.
3595 * gdbreplay.c (gdbreplay_version): Likewise.
3596
3e52c33d
JK
35972011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3598
3599 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3600
3601 Revert:
3602 2011-12-18 Hui Zhu <teawater@gmail.com>
3603 * linux-low.c (linux_create_inferior): Save return value to ret.
3604
66f1260e
HZ
36052011-12-18 Hui Zhu <teawater@gmail.com>
3606
3607 * linux-low.c (linux_create_inferior): Save return value to ret.
3608
e77616d7
DE
36092011-12-16 Doug Evans <dje@google.com>
3610
e7b06c57
DE
3611 * linux-low.c (linux_create_inferior): If stdio connection,
3612 redirect stdin from /dev/null, stdout to stderr.
3613 * remote-utils.c (remote_is_stdio): New static global.
3614 (remote_connection_is_stdio): New function.
3615 (remote_prepare): Handle stdio connection.
3616 (remote_open): Ditto.
3617 (remote_close): Don't close stdin for stdio connections.
3618 (read_prim,write_prim): New functions. Replace all calls to
3619 read/write to these.
3620 * server.c (main): Watch for "-" argument. Move call to
3621 remote_prepare before start_inferior.
3622 * server.h (STDIO_CONNECTION_NAME): New macro.
3623 (remote_connection_is_stdio): Declare.
3624
e77616d7
DE
3625 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3626 in debugging output.
3627
82067193
YQ
36282011-12-15 Yao Qi <yao@codesourcery.com>
3629
3630 * tracepoint.c: Include sys/syscall.h.
3631 (gdb_ust_thread): Remove preprocessor conditional.
3632
82bfbe7e
PA
36332011-12-14 Pedro Alves <pedro@codesourcery.com>
3634
3635 * linux-low.c (linux_detach_one_lwp): Call
3636 the_low_target.prepare_to_resume before detaching.
3637
712c6575
YQ
36382011-12-14 Yao Qi <yao@codesourcery.com>
3639
3640 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3641 of write.
3642
d54d1edf
YQ
36432011-12-14 Yao Qi <yao@codesourcery.com>
3644
3645 * i386-low.c (i386_low_stopped_data_address): Initialize local
3646 variable `control'.
3647
6210a125
PA
36482011-12-13 Pedro Alves <pedro@codesourcery.com>
3649
3650 PR remote/13492
3651
3652 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3653 DR_CONTROL unless necessary. Extend comments.
3654 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3655 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3656
2ece8244
YQ
36572011-12-13 Yao Qi <yao@codesourcery.com>
3658
3659 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3660 macros.
3661 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3662
784867a5
JK
36632011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3664
3665 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3666 Print new debug message for such case.
3667
6bf36717
JK
36682011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3669
3670 Fix overlapping memcpy.
3671 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3672 the read_inferior_memory transfer.
3673 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3674 write_inferior_memory transfer.
3675 (set_fast_tracepoint_jump): New variable buf. Use it for the
3676 read_inferior_memory and write_inferior_memory transfers.
3677 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3678 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3679 Use it for the write_inferior_memory transfer.
3680 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3681 buffers.
3682
50275556
MR
36832011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3684
3685 * linux-low.c (fetch_register, store_register): Make code
3686 consistent, fix formatting.
3687
7325beb4
MR
36882011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3689
3690 * linux-low.c (usr_store_inferior_registers): Factor out code
3691 to handle individual registers into...
3692 (store_register): ... this new function.
3693
c642a434
UW
36942011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3695
3696 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3697 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3698 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3699 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3700 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3701 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3702 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3703 (srv_xmlfiles): Add new XML files.
3704
3705 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3706 and <sys/uio.h>.
3707 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3708 (init_registers_s390_linux32v1): Add prototype.
3709 (init_registers_s390_linux32v2): Likewise.
3710 (init_registers_s390_linux64v1): Likewise.
3711 (init_registers_s390_linux64v2): Likewise.
3712 (init_registers_s390x_linux64v1): Likewise.
3713 (init_registers_s390x_linux64v2): Likewise.
3714 (s390_num_regs): Increment to 52.
3715 (s390_regmap): Add orig_r2 register.
3716 (s390_num_regs_3264): Increment to 68.
3717 (s390_regmap_3264): Add orig_r2 register.
3718 (s390_collect_ptrace_register): Handle orig_r2 register.
3719 (s390_supply_ptrace_register): Likewise.
3720 (s390_fill_last_break): New function.
3721 (s390_store_last_break): Likewise.
3722 (s390_fill_system_call): New function.
3723 (s390_store_system_call): Likewise.
3724 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3725 register sets.
3726 (s390_check_regset): New function.
3727 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3728 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3729 Update target_regsets for available register sets.
3730
2268b414
JK
37312011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3732 Jan Kratochvil <jan.kratochvil@redhat.com>
3733
3734 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3735 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3736 New.
3737 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3738 * linux-low.h (struct process_info_private): New member r_debug.
3739 * server.c (handle_qxfer_libraries): Call
3740 the_target->qxfer_libraries_svr4.
3741 (handle_qxfer_libraries_svr4): New function.
3742 (qxfer_packets): New entry "libraries-svr4".
3743 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3744 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3745 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3746 PACKET_qXfer_libraries_svr4.
3747
d6db1fab
UW
37482011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3749
3750 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3751 PSW address/mask between 8-byte and 16-byte formats.
3752 (s390_supply_ptrace_register): Likewise.
3753 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3754 basic addressing mode bit.
3755
242f5f1c
SS
37562011-11-24 Stan Shebs <stan@codesourcery.com>
3757
3758 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3759
f196051f
SS
37602011-11-17 Stan Shebs <stan@codesourcery.com>
3761
3762 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3763 (tracing_start_time): New global.
3764 (tracing_stop_time): New global.
3765 (tracing_user_name): New global.
3766 (tracing_notes): New global.
3767 (tracing_stop_note): New global.
3768 (cmd_qtstart): Set traceframe_usage, start_time.
3769 (stop_tracing): Set stop_time.
3770 (cmd_qtstatus): Report additional status.
3771 (cmd_qtp): New function.
3772 (handle_tracepoint_query): Call it.
3773 (cmd_qtnotes): New function.
3774 (handle_tracepoint_general_set): Call it.
3775 (get_timestamp): Rename from tsv_get_timestamp.
3776
405f8e94
SS
37772011-11-14 Stan Shebs <stan@codesourcery.com>
3778 Kwok Cheung Yeung <kcy@codesourcery.com>
3779
3780 * linux-x86-low.c (small_jump_insn): New.
3781 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3782 trampoline and error message, build a trampoline and issue a small
3783 jump instruction to it.
3784 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3785 trampoline and error message.
3786 (x86_get_min_fast_tracepoint_insn_len): New.
3787 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3788 * linux-low.h (struct linux_target_ops): Add arguments to
3789 install_fast_tracepoint_jump_pad operation, add new operation.
3790 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3791 arguments.
3792 (linux_get_min_fast_tracepoint_insn_len): New function.
3793 (linux_target_op): Add new operation.
3794 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3795 (gdb_trampoline_buffer_end): Ditto.
3796 (gdb_trampoline_buffer_error): Ditto.
3797 (struct ipa_sym_addresses): Add fields for new IPA variables.
3798 (symbol_list): Add entries for new IPA variables.
3799 (struct tracepoint): Add fields to hold the address range of the
3800 trampoline used by the tracepoint.
3801 (trampoline_buffer_head): New static variable.
3802 (trampoline_buffer_tail): Ditto.
3803 (claim_trampoline_space): New function.
3804 (have_fast_tracepoint_trampoline_buffer): New function.
3805 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3806 structure.
3807 (install_fast_tracepoint): Ditto, also add error buffer argument.
3808 (cmd_qtminftpilen): New function.
3809 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3810 (fast_tracepoint_from_trampoline_address): New function.
3811 (fast_tracepoint_collecting): Handle trampoline as part of jump
3812 pad space.
3813 (set_trampoline_buffer_space): New function.
3814 (initialize_tracepoint): Initialize new IPA variables.
3815 * target.h (struct target_ops): Add arguments to
3816 install_fast_tracepoint_jump_pad operation, add new
3817 get_min_fast_tracepoint_insn_len operation.
3818 (target_get_min_fast_tracepoint_insn_len): New.
3819 (install_fast_tracepoint_jump_pad): Add arguments.
3820 * server.h (IPA_BUFSIZ): Define.
3821 * linux-i386-ipa.c: Include extra header files.
3822 (initialize_fast_tracepoint_trampoline_buffer): New function.
3823 (initialize_low_tracepoint): Call it.
3824 * server.h (set_trampoline_buffer_space): Declare.
3825 (claim_trampoline_space): Ditto.
3826 (have_fast_tracepoint_trampoline_buffer): Ditto.
3827
1e4d1764
YQ
38282011-11-14 Yao Qi <yao@codesourcery.com>
3829
3830 * server.c (handle_query): Handle InstallInTrace for qSupported.
3831 * tracepoint.c (add_tracepoint): Sort list.
3832 (install_tracepoint, download_tracepoint): New.
3833 (cmd_qtdp): Call them to install and download tracepoints.
3834 (sort_tracepoints): Removed.
3835 (cmd_qtstart): Update.
3836
5c73ff4e
YQ
38372011-11-14 Yao Qi <yao@codesourcery.com>
3838
3839 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3840 * mem-break.h: Declare.
3841 * tracepoint.c (cmd_qtstart): Move some code to ...
3842 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3843 New.
3844 (download_tracepoints): Move some code to ...
3845 (download_tracepoint_1): ... here. New.
3846
86a30030
YQ
38472011-11-08 Yao Qi <yao@codesourcery.com>
3848
3849 * remote-utils.c (relocate_instruction): A comment fix.
3850
8d26e50c
JB
38512011-11-07 Joel Brobecker <brobecker@adacore.com>
3852
3853 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3854 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3855 dr_status_mirror and dr_control_mirror from debug_reg_state.
3856 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3857 (i386_initial_stuff): Remove use of deleted globals.
3858 (i386_get_thread_context, i386_set_thread_context,
3859 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3860 from debug_reg_state.
3861
a59306a3
YQ
38622011-11-05 Yao Qi <yao@codesourcery.com>
3863
3864 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3865 address as TPOINT's.
3866
3065dfb6
SS
38672011-11-02 Stan Shebs <stan@codesourcery.com>
3868
3869 * tracepoint.c (agent_mem_read_string): New function.
3870 (eval_agent_expr): Call it for tracenz.
3871 * server.c (handle_query): Report support for tracenz.
3872
fd0d8c7c
YQ
38732011-11-02 Yao Qi <yao@codesourcery.com>
3874
3875 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3876
609086b1
YQ
38772011-11-02 Yao Qi <yao@codesourcery.com>
3878
3879 * target.h: Fix a typo in comment.
3880
b9fd1791
PA
38812011-10-31 Pedro Alves <pedro@codesourcery.com>
3882
3883 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3884 clobber the breakpoints' shadows with fast tracepoint jumps.
3885 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3886 * target.c (write_inferior_memory): Also pass MYADDR down to
3887 check_mem_write.
3888
03583c20
UW
38892011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3890
3891 * configure.ac: Check support for personality routine.
3892 * configure: Regenerate.
3893 * config.in: Likewise.
3894 * linux-low.c: Include <sys/personality.h>.
3895 Define ADDR_NO_RANDOMIZE if necessary.
3896 (linux_create_inferior): Disable address space randomization when
3897 forking inferior, if requested.
3898 (linux_supports_disable_randomization): New function.
3899 (linux_target_ops): Install it.
3900 * server.h (disable_randomization): Declare.
3901 * server.c (disable_randomization): New global variable.
3902 (handle_general_set): Handle QDisableRandomization.
3903 (handle_query): Likewise for qSupported.
3904 (main): Support --disable-randomization and --no-disable-randomization
3905 command line arguments.
3906 * target.h (struct target_ops): Add supports_disable_randomization.
3907 (target_supports_disable_randomization): New macro.
3908
723b724b
MF
39092011-09-29 Mike Frysinger <vapier@gentoo.org>
3910
3911 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3912 ifdef check.
3913 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3914 [!PT_GETDSBT] (target_loadmap): New definition.
3915 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3916 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3917 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3918 and PT_GETDSBT to LINUX_LOADMAP.
3919 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3920 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3921
55329a5c 39222011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
3923
3924 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3925 (arm_linux_hwbp_cap): New static variable.
3926 (arm_linux_get_hwbp_cap): Replace by ...
3927 (arm_linux_init_hwbp_cap): ... this new function.
3928 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3929 (arm_linux_get_hw_watchpoint_count): Likewise.
3930 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3931 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3932 (arm_prepare_to_resume): Use perror_with_name instead of error.
3933
55329a5c 39342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
3935
3936 * linux-arm-low.c: Include <signal.h>.
3937 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3938 (struct arm_linux_hwbp_cap): New data type.
3939 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3940 (struct arm_linux_hw_breakpoint): New data type.
3941 (MAX_BPTS, MAX_WPTS): Define.
3942 (struct arch_process_info, struct arch_lwp_info): New data types.
3943 (arm_linux_get_hwbp_cap): New function.
3944 (arm_linux_get_hw_breakpoint_count): Likewise.
3945 (arm_linux_get_hw_watchpoint_count): Likewise.
3946 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3947 (arm_hwbp_control_initialize): Likewise.
3948 (arm_hwbp_control_is_enabled): Likewise.
3949 (arm_hwbp_control_is_initialized): Likewise.
3950 (arm_hwbp_control_disable): Likewise.
3951 (arm_linux_hw_breakpoint_equal): Likewise.
3952 (arm_linux_hw_point_initialize): Likewise.
3953 (struct update_registers_data): New data structure.
3954 (update_registers_callback: New function.
3955 (arm_insert_point): Likewise.
3956 (arm_remove_point): Likewise.
3957 (arm_stopped_by_watchpoint): Likewise.
3958 (arm_stopped_data_address): Likewise.
3959 (arm_new_process): Likewise.
3960 (arm_new_thread): Likewise.
3961 (arm_prepare_to_resume): Likewise.
3962 (the_low_target): Register arm_insert_point, arm_remove_point,
3963 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3964 arm_new_thread, and arm_prepare_to_resume.
3965
6b9801d4
SS
39662011-09-15 Stan Shebs <stan@codesourcery.com>
3967
3968 * server.h (struct emit_ops): Add compare-goto fields.
3969 * tracepoint.c (gdb_agent_op_sizes): New table.
3970 (emit_eq_goto): New function.
3971 (emit_ne_goto): New function.
3972 (emit_lt_goto): New function.
3973 (emit_le_goto): New function.
3974 (emit_gt_goto): New function.
3975 (emit_ge_goto): New function.
3976 (is_goto_target): New function.
3977 (compile_bytecodes): Recognize special cases of compare-goto
3978 combinations and call specialized emitters for them.
3979 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3980 (amd64_emit_ne_goto): New function.
3981 (amd64_emit_lt_goto): New function.
3982 (amd64_emit_le_goto): New function.
3983 (amd64_emit_gt_goto): New function.
3984 (amd64_emit_ge_goto): New function.
3985 (amd64_emit_ops): Add the new functions.
3986 (i386_emit_eq_goto): New function.
3987 (i386_emit_ne_goto): New function.
3988 (i386_emit_lt_goto): New function.
3989 (i386_emit_le_goto): New function.
3990 (i386_emit_gt_goto): New function.
3991 (i386_emit_ge_goto): New function.
3992 (i386_emit_ops): Add the new functions.
3993
bf15cbda
SS
39942011-09-08 Stan Shebs <stan@codesourcery.com>
3995
3996 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3997 (i386_emit_epilogue): Restore %ebx.
3998
943ca1dd
JZ
39992011-08-31 Jie Zhang <jzhang918@gmail.com>
4000
4001 * server.c (step_thread): Remove definition.
4002 (process_serial_event): Don't handle Hs.
4003 * server.h (step_thread): Remove declaration.
4004 * target.c (set_desired_inferior): Remove use of step_thread.
4005
e3deef73
LM
40062011-08-24 Luis Machado <lgustavo@codesourcery.com>
4007
4008 * linux-low.c: Include linux-procfs.h.
4009 (linux_attach_lwp_1): Update comments.
4010 (linux_attach): Scan for existing threads when attaching to a
4011 process that is the tgid.
4012 * Makefile.in: Update dependencies.
4013
13da1c97
LM
40142011-08-24 Luis Machado <lgustavo@codesourcery.com>
4015
4016 * configure.srv: Add linux-procfs.o dependencies.
4017
881127c9
YQ
40182011-08-14 Yao Qi <yao@codesourcery.com>
4019
4020 * target.h (struct target_ops): Fix indent.
4021 * win32-low.c (win32_target_ops): Fix comment.
4022
58dbd541
YQ
40232011-08-14 Andrew Jenner <andrew@codesourcery.com>
4024 Yao Qi <yao@codesourcery.com>
4025
4026 * Makefile.in (clean): Remove tic6x-*.c files.
4027 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4028 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4029 (tic6x-c64xp-linux.c): Likewise.
4030 * configure.srv: Add support for tic6x-*-uclinux.
4031 * linux-tic6x-low.c: New.
4032 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4033
78d85199
YQ
40342011-08-14 Andrew Stubbs <ams@codesourcery.com>
4035 Yao Qi <yao@codesourcery.com>
4036
4037 * target.h (struct target_ops): Add read_loadmap.
4038 * linux-low.c (struct target_loadseg): New type.
4039 (struct target_loadmap): New type.
4040 (linux_read_loadmap): New function.
4041 (linux_target_ops): Add linux_read_loadmap.
4042 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4043 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4044 to NULL.
78d85199 4045
a959a88d
EZ
40462011-08-05 Eli Zaretskii <eliz@gnu.org>
4047
4048 * win32-low.c: Include <stdint.h>.
4049
1ced966e
PA
40502011-07-22 Pedro Alves <pedro@codesourcery.com>
4051
4052 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4053 to the inferior here.
4054 (i386_remove_aligned_watchpoint): Ditto.
4055 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4056 fit part of the watchpoint in the debug registers.
4057 (i386_update_inferior_debug_regs): New.
4058 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4059 registers, and only update the inferior on success.
4060 (i386_low_remove_watchpoint): Ditto.
4061
d26e3629
KY
40622011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4063
4064 * linux-low.c (compare_ints, unique, list_threads, show_process,
4065 linux_core_of_thread): Delete.
4066 (linux_target_ops): Change linux_core_of_thread to
4067 linux_common_core_of_thread.
4068 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4069 * utils.c (malloc_failure): Change type of argument.
4070 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4071 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4072 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4073 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4074 (IPA_OBJS): Add common-utils-ipa.o.
4075 (ptid_h, linux_osdata_h): New macros.
4076 (server_h): Add common/common-utils.h, common/xml-utils.h,
4077 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4078 common/ptid.h.
4079 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4080 ptid.o, buffer.o): New rules.
4081 (linux-low.o): Add common/linux-osdata.h as a dependency.
4082 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4083 * configure.ac: Add AC_HEADER_DIRENT check.
4084 * config.in: Regenerate.
4085 * configure: Regenerate.
4086 * remote-utils.c (xml_escape_text): Delete.
4087 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4088 buffer_xml_printf): Move to common/buffer.c.
4089 * server.c (main): Remove call to initialize_inferiors.
4090 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4091 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4092 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4093 internal_error, gdb_assert, gdb_assert_fail): Delete.
4094 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4095 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4096 common/buffer.h.
4097 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4098 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4099 initialize_inferiors): Delete.
4100
2275a1a7
PA
41012011-07-20 Pedro Alves <pedro@codesourcery.com>
4102
4103 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4104 symbol error.
4105
0a5b1e09
PA
41062011-05-31 Pedro Alves <pedro@codesourcery.com>
4107
4108 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4109 assertion.
4110 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4111
6938fd34
YQ
41122011-05-26 Yao Qi <yao@codesourcery.com>
4113
4114 * Makefile.in (thread-db.o): Track dependence to
4115 common/gdb_thread_db.h.
4116 * thread-db.c: include gdb_thread_db.h from right place.
4117
b481f9e0
TT
41182011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4119
4120 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4121 __FILE__ and __LINE__ to internal_error.
4122
98a5dd13
DE
41232011-05-13 Doug Evans <dje@google.com>
4124
4125 * thread-db.c (try_thread_db_load_from_sdir): New function.
4126 (try_thread_db_load_from_dir): New function.
4127 (thread_db_load_search): Handle $sdir, ignore $pdir.
4128 Remove trying of system directories if search of
4129 libthread-db-search-path fails, that is now done via $sdir.
4130
d248b706
KY
41312011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4132
4133 * server.c (handle_query): Add EnableDisableTracepoints to the list
4134 of supported features.
43aaf8b6 4135 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4136 tracepoints.
43aaf8b6
PA
4137 (cmd_qtenable_disable): New.
4138 (cmd_qtstart): Install tracepoints even if disabled.
4139 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4140 receiving a QTEnable or QTDisable packet.
4141 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4142 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4143 tracepoints.
4144 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4145
84e578fb
DE
41462011-05-10 Doug Evans <dje@google.com>
4147
4148 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4149
71f55dd8
DE
41502011-05-04 Doug Evans <dje@google.com>
4151
4152 * linux-low.c (linux_join): Skip process lookup.
4153 * spu-low.c (spu_join): Ditto.
4154 * server.c (join_inferiors_callback): Delete.
4155 (process_serial_event): For 'D' packet (detach) call join_inferior
4156 directly.
4157
4d393d60
JM
41582011-05-04 Joseph Myers <joseph@codesourcery.com>
4159
4160 * README: Don't mention xscale*-*-linux*.
4161 * configure.srv (xscale*-*-linux*): Don't handle target.
4162
b00ad6ff
NF
41632011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4164
4165 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4166 casting pointers.
4167 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4168 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4169 (i386_emit_void_call_2): Likewise.
4170
af96c192
YQ
41712011-04-26 Yao Qi <yao@codesourcery.com>
4172
43aaf8b6
PA
4173 * linux-low.c: Move common macros to linux-ptrace.h.
4174 Include linux-ptrace.h.
af96c192
YQ
4175 * Makefile.in (linux_ptrace_h): New.
4176 (linux-low.o): Depends on linux-ptrace.h.
4177
03f2bd59
JK
41782011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4179
4180 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4181 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4182 (remote_prepare): New function with most of the TCP code from ...
4183 (remote_open): ... here. Detect PORT here unconditionally. Move also
4184 setting transport_is_reliable.
4185 * server.c (run_once): New variable.
4186 (gdbserver_usage): Document it.
4187 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4188 the first run if RUN_ONCE.
4189 * server.h (run_once, remote_prepare): New declarations.
4190
7a9dd1b2
TT
41912011-04-19 Tom Tromey <tromey@redhat.com>
4192
4193 * win32-low.c (handle_load_dll): Remove duplicate "the".
4194
81239425
PM
41952011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4196
4197 Remove support for old Cygwin 1.5 versions.
4198 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4199 function to avoid warning.
4200 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4201 warning.
4202
9e0627f1
PM
42032011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4204
4205 * gdbserver/server.h (Macro _): Define it if not available.
4206
588eebee
MS
42072011-03-14 Michael Snyder <msnyder@vmware.com>
4208
348af9f7 4209 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4210
43f70d4c
JB
42112011-03-10 Joel Brobecker <brobecker@adacore.com>
4212
4213 * Makefile.in (maintainer-clean realclean distclean): Remove
4214 "make ... subdir_do" command.
4215
348af9f7
MS
42162011-03-10 Michael Snyder <msnyder@vmware.com>
4217
4218 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4219
4220 * server.c (handle_v_run): Free alloced buffer on early return.
4221
e637a4f5
YQ
42222011-03-09 Yao Qi <yao@codesourcery.com>
4223
4224 Revert:
4225 2011-03-04 Yao Qi <yao@codesourcery.com>
4226
4227 * Makefile.in: Remove GNU make feature --directory.
4228
4229 2011-03-05 Yao Qi <yao@codesourcery.com>
4230
4231 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4232 (subdir_do): New make target. Copied from gdb/Makefile.
4233 (maintainer-clean, realclean, distclean, clean): Call corresponding
4234 make targets in common/Makefile.
4235
4236 2011-02-11 Yao Qi <yao@codesourcery.com>
4237
4238 * configure.ac: Call AC_PROG_RANLIB.
4239 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4240 * configure: Regenerate.
4241
e6edda56
JK
42422011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4243
4244 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4245
e5141119
JB
42462011-03-06 Yao Qi <yao@codesourcery.com>
4247
4248 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4249
64794aa4
JB
42502011-03-05 Yao Qi <yao@codesourcery.com>
4251
4252 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4253 (subdir_do): New make target. Copied from gdb/Makefile.
4254 (maintainer-clean, realclean, distclean, clean): Call corresponding
4255 make targets in common/Makefile.
4256
7a762829
YQ
42572011-03-04 Yao Qi <yao@codesourcery.com>
4258
4259 * Makefile.in: Remove GNU make feature --directory.
4260
348af9f7
MS
42612011-03-04 Michael Snyder <msnyder@vmware.com>
4262
4263 * server.c (queue_stop_reply): Call xmalloc not malloc.
4264
42652011-03-02 Michael Snyder <msnyder@vmware.com>
4266
4267 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4268
9f72fee2
MS
42692011-02-28 Michael Snyder <msnyder@vmware.com>
4270
588eebee
MS
4271 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4272 (cmd_qtframe): Ditto.
4273 (cmd_qtbuffer): Ditto.
4274 (cmd_bigqtbuffer): Ditto.
4275
9f72fee2
MS
4276 * utils.c (decimal2str): Initialize 'width' to nine, then
4277 don't mess with it.
4278
8040bd49
UW
42792011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4280
4281 * hostio.c (require_data): Free *data, not data.
4282
7e52cbd0
JK
42832011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4284
4285 * hostio.c (require_data): Use free, not xfree.
4286
9130f83e
MS
42872011-02-27 Michael Snyder <msnyder@vmware.com>
4288
4b812f4e
MS
4289 * server.c (handle_query): Discard unused value.
4290
9130f83e
MS
4291 * hostio.c (require_data): Free malloc memory before returning
4292 error.
4293
69d37113
MS
42942011-02-26 Michael Snyder <msnyder@vmware.com>
4295
4296 * linux-low.c (list_threads): Call closedir for dirent.
4297
35f5825a
MS
42982011-02-27 Michael Snyder <msnyder@vmware.com>
4299
2a589cef
MS
4300 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4301 a case statement falls through.
4302
0adea5f7
MS
4303 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4304
35f5825a
MS
4305 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4306 in comparison.
4307
238f1c74
MS
43082011-02-26 Michael Snyder <msnyder@vmware.com>
4309
4310 * utils.c (decimal2str): Eliminate dead code and dead param.
4311 (pulongest): Drop dead param from call to decimal2str.
4312 (plongest): Ditto.
4313
633ff500
JB
43142011-02-24 Joel Brobecker <brobecker@adacore.com>
4315
4316 Revert the following patch (not approved yet):
4317 2011-02-21 Hui Zhu <teawater@gmail.com>
4318 * tracepoint.c (tp_printf): New function.
4319 (eval_agent_expr): Handle gdb_agent_op_printf.
4320
f9c6ff72
HZ
43212011-02-21 Hui Zhu <teawater@gmail.com>
4322
4323 * tracepoint.c (tp_printf): New function.
4324 (eval_agent_expr): Handle gdb_agent_op_printf.
4325
94d5e490
TT
43262011-02-18 Tom Tromey <tromey@redhat.com>
4327
4328 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4329 (tracepoint.o): Likewise.
4330 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4331 (gdb_agent_op_names): Likewise.
4332
c7f96d2b
TT
43332011-02-18 Tom Tromey <tromey@redhat.com>
4334
4335 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4336 gdb_agent_op_rot>: New constants.
4337 (gdb_agent_op_names): Add pick and roll.
4338 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4339 cases.
4340
0feedb2c
JK
43412011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4342
4343 * aclocal.m4: Regenerated with aclocal-1.11.1.
4344
b3b9301e
PA
43452011-02-14 Pedro Alves <pedro@codesourcery.com>
4346
4347 * server.c (handle_qxfer_traceframe_info): New.
4348 (qxfer_packets): Register "traceframe-info".
4349 (handle_query): Report support for qXfer:traceframe-info:read+.
4350 * tracepoint.c (match_blocktype): New.
4351 (traceframe_find_block_type): Rename to ...
4352 (traceframe_walk_blocks): ... this. Add callback filter argument,
4353 and use it.
4354 (traceframe_find_block_type): New, reimplemented on top of
4355 traceframe_walk_blocks.
4356 (build_traceframe_info_xml): New.
4357 (traceframe_read_info): New.
4358 * server.h (traceframe_read_info): Declare.
4359
4f3e6fb7
YQ
43602011-02-11 Yao Qi <yao@codesourcery.com>
4361
4362 * configure.ac: Call AC_PROG_RANLIB.
4363 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4364 * configure: Regenerate.
4365
764880b7
PA
43662011-02-07 Pedro Alves <pedro@codesourcery.com>
4367
4368 * server.c (gdb_read_memory): Change return semantics to allow
4369 partial transfers.
4370 (handle_search_memory_1): Adjust.
4371 (process_serial_event) <'m' packet>: Handle partial transfers.
4372 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4373
1c79eb8a
PA
43742011-01-28 Pedro Alves <pedro@codesourcery.com>
4375
4376 * regcache.c (init_register_cache): Initialize
4377 regcache->register_status.
4378 (free_register_cache): Release regcache->register_status.
4379 (regcache_cpy): Copy register_status.
4380 (registers_to_string): Print 'x's for unavailable registers.
4381 (supply_register): Mark the register's status valid or
4382 unavailable, depending on whether a buffer was passed in or not.
4383 (supply_register_zeroed): New.
4384 (supply_regblock): Mark the registers' status valid or
4385 unavailable, depending on whether a buffer was passed in or not.
4386 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4387 (struct regcache): New `register_status' field.
4388 (supply_register_zeroed): Declare.
4389 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4390 supply_register_zeroed, rather than passing a NULL buffer to
4391 supply_register.
4392 * tracepoint.c (fetch_traceframe_registers): Update comment.
4393
85724a0e
PA
43942011-01-28 Pedro Alves <pedro@codesourcery.com>
4395
4396 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4397 buffer explicit.
4398
d08aafef
PA
43992011-01-25 Pedro Alves <pedro@codesourcery.com>
4400
4401 * server.h (decode_xfer_write): Change prototype.
4402 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4403 and don't extract the annex here.
4404 * server.c (decode_xfer_read): Remove `annex' parameter,
4405 and don't extract the annex here.
4406 (decode_xfer): New.
4407 (struct qxfer): New.
4408 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4409 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4410 (handle_qxfer_statictrace): New functions, abstracted out from
4411 handle_query, and made to use the struct qxfer interface.
4412 (handle_threads_qxfer_proper): Rename to ...
4413 (handle_qxfer_threads_proper): ... this.
4414 (handle_threads_qxfer): Rename to ...
4415 (handle_qxfer_threads): ... this. Adjust.
4416 (qxfer_packets): New array.
4417 (handle_qxfer): New function.
4418 (handle_query): Use handle_qxfer.
4419
493e2a69
MS
44202011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4421
4422 * gdbreplay.c: Shorten lines of >= 80 columns.
4423 * linux-low.c: Ditto.
4424 * linux-ppc-low.c: Ditto.
4425 * linux-s390-low.c: Ditto.
4426 * linux-sparc-low.c: Ditto.
4427 * linux-x86-low.c: Ditto.
4428 * linux-xtensa-low.c: Ditto.
4429 * mem-break.c: Ditto.
4430 * nto-low.c: Ditto.
4431 * regcache.h: Ditto.
4432 * remote-utils.c: Ditto.
4433 * server.c: Ditto.
4434 * server.h: Ditto.
4435 * thread-db.c: Ditto.
4436 * tracepoint.c: Ditto.
4437 * utils.c: Ditto.
4438 * win32-low.h: Ditto.
4439
44944448
JB
44402011-01-05 Joel Brobecker <brobecker@adacore.com>
4441
4442 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4443 update.
4444
71ce852c
JB
44452011-01-01 Joel Brobecker <brobecker@adacore.com>
4446
4447 * server.c (gdbserver_version): Update copyright year in version
4448 output.
4449 * gdbreplay.c (gdbreplay_version): Ditto.
4450
eb826dc6
MF
44512010-12-29 Jie Zhang <jie.zhang@analog.com>
4452
4453 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4454 * linux-bfin-low.c: New file.
4455 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4456 PT_DATA_ADDR for BFIN targets.
4457 * Makefile.in (SFILES): Add linux-bfin-low.c.
4458 (clean): Remove reg-bfin.c.
4459 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4460 * README: Mention supported Blackfin targets.
4461
39ab222a
MF
44622010-12-23 Mike Frysinger <vapier@gentoo.org>
4463
4464 * .gitignore: New file.
4465
a1f2ce7d
MF
44662010-11-16 Mike Frysinger <vapier@gentoo.org>
4467
4468 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4469
f474844c
JZ
44702010-10-22 Jie Zhang <jie@codesourcery.com>
4471
4472 * Makefile.in: Add FLAGS_TO_PASS variable.
4473 (install): Remove dependency of install-only and recursively
4474 invoke make for install-only.
4475
f1048712
DE
44762010-10-04 Doug Evans <dje@google.com>
4477
4478 * Makefile.in (uninstall): Use $(DESTDIR).
4479
b53a1623
PA
44802010-09-24 Pedro Alves <pedro@codesourcery.com>
4481
e6ee044d
PA
4482 PR gdb/11842
4483
b53a1623
PA
4484 * linux-x86-low.c (compat_siginfo_from_siginfo)
4485 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4486 si_code is < 0. Check for si_code == SI_TIMER before checking for
4487 si_code < 0.
4488
fa1bd1e4
JB
44892010-09-13 Joel Brobecker <brobecker@adacore.com>
4490
4491 * lynx-i386-low.c: New file.
4492 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4493
47fac8f8
JB
44942010-09-13 Joel Brobecker <brobecker@adacore.com>
4495
4496 * lynx-low.c (ptrace_request_to_str): Remove handling for
4497 request values that have been removed in LynxOS 5.x.
4498
1adfc54d
JB
44992010-09-13 Joel Brobecker <brobecker@adacore.com>
4500
4501 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4502 <ptrace.h>
4503
c2a66c29
NS
45042010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4505
4506 * configure.ac: Add --enable-inprocess-agent option.
4507 * configure: Rebuilt.
4508
32fcada3
YQ
45092010-09-06 Yao Qi <yao@codesourcery.com>
4510
4511 * linux-low.c (linux_kill): Remove unused variable.
4512 (linux_stabilize_threads): Likewise.
4513 * server.c (start_inferior): Likewise.
4514 (queue_stop_reply_callback): Likewise.
4515 * tracepoint.c (do_action_at_tracepoint): Likewise.
4516
0cccb683
YQ
45172010-09-06 Yao Qi <yao@codesourcery.com>
4518
4519 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4520 on return.
4521
423ec54c
JK
45222010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4525
12ac6819
PA
45262010-09-06 Pedro Alves <pedro@codesourcery.com>
4527
4528 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4529 "$(IPA_DEPFILES)".
4530
8ed54b31
JB
45312010-09-01 Joel Brobecker <brobecker@adacore.com>
4532
4533 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4534 gdbserver/lynx-ppc-low.c: New files.
4535 * Makefile.in (lynx_low_h): New variable.
4536 (lynx-low.o, lynx-ppc-low.o): New rules.
4537 * configure.ac: On LynxOS, link with -lnetinet.
4538 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4539 * configure: regenerate.
4540
bb0116a4
JB
45412010-09-01 Joel Brobecker <brobecker@adacore.com>
4542
4543 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4544 * configure.ac: Add check for vasprintf and vsnprintf.
4545 * configure, config.in: Regenerate.
4546 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4547
a778ab81 45482010-09-01 Joel Brobecker <brobecker@adacore.com>
4549
4550 * gdbreplay.c: Move include of alloca.h up, next to include of
4551 malloc.h.
4552 * server.h: Add include of malloc.h.
4553 * mem-break.c: Remove include of malloc.h.
4554 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4555
8b034a19 45562010-09-01 Joel Brobecker <brobecker@adacore.com>
4557
4558 * Makefile.in (memmem.o): Build with -Wno-error.
4559
45602010-09-01 Joel Brobecker <brobecker@adacore.com>
4561
4562 * utils.c (xsnprintf): Make non-static.
4563 * server.h: Add xsnprintf declaration.
4564 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4565 replace calls to snprintf by calls to xsnprintf throughout.
4566
45672010-09-01 Joel Brobecker <brobecker@adacore.com>
4568
4569 * configure.ac: Add configure check for alloca.
4570 * configure, config.in: Regenerate.
4571 * server.h: Include alloca.h if it exists.
4572 * gdbreplay.c: Include alloca.h if it exists.
4573
1a981360
PA
45742010-08-28 Pedro Alves <pedro@codesourcery.com>
4575
4576 * linux-low.c (__SIGRTMIN): Define if not already defined.
4577 (linux_create_inferior): Check for __ANDROID__ rather than
4578 __SIGRTMIN.
4579 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4580 are already deferred.
4581 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4582 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4583 stopped and already has a pending signal to report.
4584 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4585 a pending signal to report or is moving out of a jump pad.
4586 (linux_init_signals): Check for __ANDROID__ rather than
4587 __SIGRTMIN.
4588
b4d51a55
PA
45892010-08-28 Pedro Alves <pedro@codesourcery.com>
4590
4591 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4592 debug_threads check. Avoid a linear search when not doing debug
4593 output.
4594
ec48365d
PA
45952010-08-27 Pedro Alves <pedro@codesourcery.com>
4596
4597 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4598 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4599 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4600 (process_event): Change local fd's type to gdb_fildes_t.
4601 (create_file_handler): Adjust prototype.
4602 (delete_file_handler): Adjust prototype.
4603 (handle_file_event): Adjust prototype. Use pfildes.
4604 (create_file_event): Adjsut prototype.
4605 * remote-utils.c (remote_desc, listen_desc): Change type to
4606 gdb_fildes_t.
4607 * server.h: New gdb_fildes_t typedef.
4608 [USE_WIN32API]: Include winsock2.h.
4609 (delete_file_handler, add_file_handler): Adjust prototypes.
4610 (pfildes): Declare.
4611 * utils.c (pfildes): New.
4612
854d88f0
PA
46132010-08-27 Pedro Alves <pedro@codesourcery.com>
4614
4615 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4616 * configure: Regenerate.
4617
0146f85b
PA
46182010-08-27 Pedro Alves <pedro@codesourcery.com>
4619
4620 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4621 (linux_done_accessing_memory): ... this.
4622 (linux_target_ops): Adjust.
4623 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4624 * nto-low.c (nto_target_ops): Adjust comment.
4625 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4626 * spu-low.c (spu_target_ops): Adjust comment.
4627 * target.h (target_ops): Rename unprepare_to_access_memory field
4628 to done_accessing_memory.
4629 (unprepare_to_access_memory): Rename to ...
4630 (done_accessing_memory): ... this.
4631
90d74c30
PA
46322010-08-26 Pedro Alves <pedro@codesourcery.com>
4633
4634 * linux-low.c (linux_prepare_to_access_memory): New.
4635 (linux_unprepare_to_access_memory): New.
4636 (linux_target_ops): Install them.
4637 * server.c (read_memory): Rename to ...
4638 (gdb_read_memory): ... this. Use
4639 prepare_to_access_memory/prepare_to_access_memory.
4640 (write_memory): Rename to ...
4641 (gdb_write_memory): ... this. Use
4642 prepare_to_access_memory/prepare_to_access_memory.
4643 (handle_search_memory_1): Adjust.
4644 (process_serial_event): Adjust.
4645 * target.h (struct target_ops): New fields
4646 prepare_to_access_memory and unprepare_to_access_memory.
4647 (prepare_to_access_memory, unprepare_to_access_memory): New.
4648 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4649 prepare_to_access_memory/prepare_to_access_memory.
4650 * nto-low.c (nto_target_ops): Adjust.
4651 * spu-low.c (spu_target_ops): Adjust.
4652 * win32-low.c (win32_target_ops): Adjust.
4653
fd467969
PA
46542010-08-26 Pedro Alves <pedro@codesourcery.com>
4655
4656 * Makefile.in (WARN_CFLAGS): Get it from configure.
4657 (WERROR_CFLAGS): New.
4658 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4659 * configure.ac: Introduce --enable-werror, which adds -Werror to
4660 the compiler command line. Enabled by default. Disable with
4661 --disable-werror. Add -Wdeclaration-after-statement
4662 Wpointer-arith and -Wformat-nonliteral to warning flags.
4663 * configure: Regenerate.
4664
331e2f5f
PA
46652010-08-26 Pedro Alves <pedro@codesourcery.com>
4666
4667 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4668
e581f2b4
PA
46692010-08-26 Pedro Alves <pedro@codesourcery.com>
4670
4671 * gdbreplay.c (remote_error): New.
4672 (gdbchar): New.
4673 (expect): Use gdbchar. Check for error reading from GDB.
4674 Clarify sync error output.
4675 (play): Check for errors writing to GDB.
4676 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4677 * remote-utils.c (getpkt): Check for errors writing to the remote
4678 descriptor.
4679
3c11dd79
PA
46802010-08-25 Pedro Alves <pedro@codesourcery.com>
4681
4682 * linux-low.c (linux_wait_1): Move non-debugging code out of
4683 `debug_threads' control.
4684
d20a8ad9
PA
46852010-08-25 Pedro Alves <pedro@codesourcery.com>
4686
4687 * linux-low.c (linux_wait_1): Don't set last_status here.
4688 * server.c (push_event, queue_stop_reply_callback): Assert we're
4689 not pushing a TARGET_WAITKIND_IGNORE event.
4690 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4691 (myresume, handle_target_event): Set the thread's last_resume_kind
4692 and last_status from the target returned status.
4693
964e4306
PA
46942010-08-25 Pedro Alves <pedro@codesourcery.com>
4695
4696 PR threads/10729
4697
4698 * linux-x86-low.c (update_debug_registers_callback): New.
4699 (i386_dr_low_set_addr): Use it.
4700 (i386_dr_low_get_addr): New.
4701 (i386_dr_low_set_control): Use update_debug_registers_callback.
4702 (i386_dr_low_get_control): New.
4703 (i386_dr_low_get_status): Adjust.
4704 * linux-low.c (linux_stop_lwp): New.
4705 * linux-low.h (linux_stop_lwp): Declare.
4706
4707 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4708 argument instead of a i386_debug_reg_state.
4709 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4710 a i386_debug_reg_state.
4711 (i386_insert_aligned_watchpoint): Adjust.
4712 (i386_remove_aligned_watchpoint): Adjust.
4713 (i386_low_stopped_data_address): Read the debug registers from the
4714 inferior instead of from the mirrors.
4715 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4716 (i386_dr_low_get_addr): Declare.
4717 (i386_dr_low_get_control): Declare.
4718 (i386_dr_low_get_status): Change prototype.
4719
4720 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4721 (i386_dr_low_get_addr): New.
4722 (i386_dr_low_get_control): New.
4723 (i386_dr_low_get_status): Adjust prototype. Return
4724 dr_status_mirror.
4725 (i386_initial_stuff): Clear dr_status_mirror and
4726 dr_control_mirror.
4727 (i386_get_thread_context): Adjust.
4728 (i386_set_thread_context): Adjust.
4729 (i386_thread_added): Adjust.
4730
5f21a75b
PA
47312010-08-24 Pedro Alves <pedro@codesourcery.com>
4732
4733 * linux-low.h (linux_thread_area): Delete declaration.
4734
3e4c1235
TS
47352010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4736
4737 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4738 after its termination.
4739
1971b033
PA
47402010-08-09 Pedro Alves <pedro@codesourcery.com>
4741
4742 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4743 (gdb_wants_all_stopped): Delete.
4744 (linux_wait_1): Don't call them.
4745 * server.c (handle_v_cont): Tag all threads as want-stopped.
4746 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4747 stopped as "client-wants-stopped".
4748
310444ac
PA
47492010-07-31 Pedro Alves <pedro@codesourcery.com>
4750
4751 * Makefile.in (signals_h): New.
4752 (server_h): Depend on it.
4753 (server.o): Don't depend on $(signals_def).
4754 (signals.o): Depend on $(signals_def).
4755
a19cae16
JK
47562010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4757
4758 * Makefile.in (signals_def): New.
4759 (server_h): Append include/gdb/signals.h and signals_def.
4760 (server.o): Append signals_def.
4761
30d50328
JK
47622010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4763
4764 * server.c (handle_target_event): Use target_signal_to_host for
4765 resume_info.sig initialization.
4766 * target.h (struct thread_resume) <sig>: New comment.
4767
5c3216e2
OS
47682010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4769
c6f46ca0
OS
4770 * server.c (handle_query): strcpy() the returned string from paddress()
4771 instead of sprintf().
5c3216e2
OS
4772 * utils.c (paddress): Return phex_nz().
4773
6bd31874
JB
47742010-07-07 Joel Brobecker <brobecker@adacore.com>
4775
4776 * server.c (handle_v_cont): Call mourn_inferior if process
4777 just exited.
4778 (myresume): Likewise.
4779
0fb4aa4b
PA
47802010-07-01 Pedro Alves <pedro@codesourcery.com>
4781
4782 Static tracepoints, and integration with UST.
4783
4784 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4785 * mem-break.c (uninsert_all_breakpoints)
4786 (reinsert_all_breakpoints): New.
4787 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4788 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4789 (gdb_agent_ust_loaded, helper_thread_id)
4790 (gdb_agent_helper_thread_id): New macros.
4791 (struct ipa_sym_addresses): Add addr_ust_loaded,
4792 addr_helper_thread_id, addr_cmd_buf.
4793 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4794 (in_process_agent_loaded_ust): New.
4795 (write_e_ust_not_loaded): New.
4796 (maybe_write_ipa_ust_not_loaded): New.
4797 (struct collect_static_trace_data_action): New.
4798 (enum tracepoint_type) <static_tracepoint>: New.
4799 (struct tracepoint) <handle>: Mention static tracepoints.
4800 (struct static_tracepoint_ctx): New.
4801 (CMD_BUF_SIZE): New.
4802 (add_tracepoint_action): Handle static tracepoint actions.
4803 (unprobe_marker_at): New.
4804 (clear_installed_tracepoints): Handle static tracepoints.
4805 (cmd_qtdp): Handle static tracepoints.
4806 (probe_marker_at): New.
4807 (cmd_qtstart): Handle static tracepoints.
4808 (response_tracepoint): Handle static tracepoints.
4809 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4810 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4811 (get_context_regcache): Handle static tracepoints.
4812 (do_action_at_tracepoint): Handle static tracepoint actions.
4813 (traceframe_find_block_type): Handle static trace data blocks.
4814 (traceframe_read_sdata): New.
4815 (download_tracepoints): Download static tracepoint actions.
4816 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4817 (GDB_PROBE_NAME): New.
4818 (ust_ops): New.
4819 (GET_UST_SYM): New.
4820 (USTF): New.
4821 (dlsym_ust): New.
4822 (ust_marker_to_static_tracepoint): New.
4823 (gdb_probe): New.
4824 (collect_ust_data_at_tracepoint): New.
4825 (gdb_ust_probe): New.
4826 (UNIX_PATH_MAX, SOCK_DIR): New.
4827 (gdb_ust_connect_sync_socket): New.
4828 (resume_thread, stop_thread): New.
4829 (run_inferior_command): New.
4830 (init_named_socket): New.
4831 (gdb_ust_socket_init): New.
4832 (cstr_to_hexstr): New.
4833 (next_st): New.
4834 (first_marker, next_marker): New.
4835 (response_ust_marker): New.
4836 (cmd_qtfstm, cmd_qtsstm): New.
4837 (unprobe_marker_at, probe_marker_at): New.
4838 (cmd_qtstmat, gdb_ust_thread): New.
4839 (gdb_ust_init): New.
4840 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4841 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4842 (ST_REGENTRY): New.
4843 (x86_64_st_collect_regmap): New.
4844 (X86_64_NUM_ST_COLLECT_GREGS): New.
4845 (AMD64_RIP_REGNUM): New.
4846 (supply_static_tracepoint_registers): New.
4847 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4848 (ST_REGENTRY): New.
4849 (i386_st_collect_regmap): New.
4850 (i386_NUM_ST_COLLECT_GREGS): New.
4851 (supply_static_tracepoint_registers): New.
4852 * server.c (handle_query): Handle qXfer:statictrace:read.
4853 <qSupported>: Report support for StaticTracepoints, and
4854 qXfer:statictrace:read features.
4855 * server.h (traceframe_read_sdata)
4856 (supply_static_tracepoint_registers): Declare.
4857 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4858 (unpack_varlen_hex): Include in IPA build.
4859 * Makefile.in (ustlibs, ustinc): New.
4860 (IPA_OBJS): Add remote-utils-ipa.o.
4861 ($(IPA_LIB)): Link -ldl and -lpthread.
4862 (UST_CFLAGS): New.
4863 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4864 * config.in, configure: Regenerate.
4865
9e4344e5
PA
48662010-06-20 Ian Lance Taylor <iant@google.com>
4867 Pedro Alves <pedro@codesourcery.com>
4868
4869 * linux-x86-low.c (always_true): Delete.
4870 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4871 trying to fool the compiler with always_true.
4872
c6beb2cb
PA
48732010-06-20 Pedro Alves <pedro@codesourcery.com>
4874
4875 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4876 conditions in gdbserver.
4877
d2ed6730
UW
48782010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4879
4880 * spu-low.c (spu_read_memory): Wrap around local store limit.
4881 (spu_write_memory): Likewise.
4882
4e29fb54
PA
48832010-06-15 Pedro Alves <pedro@codesourcery.com>
4884
4885 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4886 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4887 LONGEST uses.
4888 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4889 uses.
4890 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4891 uses with LONGEST uses.
4892
6a271cae
PA
48932010-06-14 Stan Shebs <stan@codesourcery.com>
4894 Pedro Alves <pedro@codesourcery.com>
4895
4896 Bytecode compiler.
4897
4898 * linux-x86-low.c: Include limits.h.
4899 (add_insns): New.
4900 (always_true): New.
4901 (EMIT_ASM): New.
4902 (EMIT_ASM32): New.
4903 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4904 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4905 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4906 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4907 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4908 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4909 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4910 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4911 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4912 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4913 (amd64_emit_void_call_2): New.
4914 (amd64_emit_ops): New.
4915 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4916 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4917 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4918 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4919 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4920 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4921 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4922 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4923 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4924 (i386_emit_stack_adjust, i386_emit_int_call_1)
4925 (i386_emit_void_call_2): New.
4926 (i386_emit_ops): New.
4927 (x86_emit_ops): New.
4928 (the_low_target): Install x86_emit_ops.
4929 * server.h (struct emit_ops): New.
4930 (get_raw_reg_func_addr): Declare.
4931 (current_insn_ptr, emit_error): Declare.
4932 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4933 (set_trace_state_variable_value): New defines.
4934 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4935 addr_get_trace_state_variable_value and
4936 addr_set_trace_state_variable_value.
4937 (symbol_list): New fields for get_raw_reg,
4938 get_trace_state_variable_value and set_trace_state_variable_value.
4939 (condfn): New typedef.
4940 (struct tracepoint): New field `compiled_cond'.
4941 (do_action_at_tracepoint): Clear compiled_cond.
4942 (get_trace_state_variable_value, set_trace_state_variable_value):
4943 Export in the IPA.
4944 (condition_true_at_tracepoint): If there's a compiled condition,
4945 run that.
4946 (current_insn_ptr, emit_error): New globals.
4947 (struct bytecode_address): New.
4948 (get_raw_reg_func_addr): New.
4949 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4950 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4951 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4952 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4953 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4954 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4955 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4956 (compile_tracepoint_condition, compile_bytecodes): New.
4957 * target.h (emit_ops): Forward declare.
4958 (struct target_ops): New field emit_ops.
4959 (target_emit_ops): New.
4960 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4961 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4962 * linux-low.c (linux_emit_ops): New.
4963 (linux_target_ops): Install it.
4964 * linux-low.h (struct linux_target_ops): New field emit_ops.
4965
92b72907
UW
49662010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4967
4968 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4969 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4970
fa593d66
PA
49712010-06-01 Pedro Alves <pedro@codesourcery.com>
4972 Stan Shebs <stan@codesourcery.com>
4973
4974 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4975 (all): Depend on $(extra_libraries).
4976 (install-only): Install the IPA.
4977 (IPA_OBJS, IPA_LIB): New.
4978 (clean): Remove the IPA lib.
4979 (IPAGENT_CFLAGS): New.
4980 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4981 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4982 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4983 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4984 * configure.ac: Check for atomic builtins support in the compiler.
4985 (IPA_DEPFILES, extra_libraries): Define.
4986 * configure.srv (ipa_obj): Add description.
4987 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4988 (i[34567]86-*-linux*): Set ipa_obj.
4989 (x86_64-*-linux*): Set ipa_obj.
4990 * linux-low.c (stabilizing_threads): New.
4991 (supports_fast_tracepoints): New.
4992 (linux_detach): Stabilize threads before detaching.
4993 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4994 the lwp is either not stabilizing, or is moving out of a jump pad.
4995 (linux_fast_tracepoint_collecting): New.
4996 (maybe_move_out_of_jump_pad): New.
4997 (enqueue_one_deferred_signal): New.
4998 (dequeue_one_deferred_signal): New.
4999 (linux_wait_for_event_1): If moving out of a jump pad, defer
5000 pending signals to later.
5001 (linux_stabilize_threads): New.
5002 (linux_wait_1): Check if threads need moving out of jump pads, and
5003 do it if so.
5004 (stuck_in_jump_pad_callback): New.
5005 (move_out_of_jump_pad_callback): New.
5006 (lwp_running): New.
5007 (linux_resume_one_lwp): Handle moving out of jump pads.
5008 (linux_set_resume_request): Dequeue deferred signals.
5009 (need_step_over_p): Also step over fast tracepoint jumps.
5010 (start_step_over): Also uninsert fast tracepoint jumps.
5011 (finish_step_over): Also reinsert fast tracepoint jumps.
5012 (linux_install_fast_tracepoint_jump): New.
5013 (linux_target_ops): Install linux_stabilize_threads and
5014 linux_install_fast_tracepoint_jump_pad.
5015 * linux-low.h (linux_target_ops) <get_thread_area,
5016 install_fast_tracepoint_jump_pad>: New fields.
5017 (struct lwp_info) <collecting_fast_tracepoint,
5018 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5019 (linux_get_thread_area): Declare.
5020 * linux-x86-low.c (jump_insn): New.
5021 (x86_get_thread_area): New.
5022 (append_insns): New.
5023 (push_opcode): New.
5024 (amd64_install_fast_tracepoint_jump_pad): New.
5025 (i386_install_fast_tracepoint_jump_pad): New.
5026 (x86_install_fast_tracepoint_jump_pad): New.
5027 (the_low_target): Install x86_get_thread_area and
5028 x86_install_fast_tracepoint_jump_pad.
5029 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5030 (struct fast_tracepoint_jump): New.
5031 (fast_tracepoint_jump_insn): New.
5032 (fast_tracepoint_jump_shadow): New.
5033 (find_fast_tracepoint_jump_at): New.
5034 (fast_tracepoint_jump_here): New.
5035 (delete_fast_tracepoint_jump): New.
5036 (set_fast_tracepoint_jump): New.
5037 (uninsert_fast_tracepoint_jumps_at): New.
5038 (reinsert_fast_tracepoint_jumps_at): New.
5039 (set_breakpoint_at): Use write_inferior_memory.
5040 (uninsert_raw_breakpoint): Use write_inferior_memory.
5041 (check_mem_read): Mask out fast tracepoint jumps.
5042 (check_mem_write): Mask out fast tracepoint jumps.
5043 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5044 (set_fast_tracepoint_jump): Declare.
5045 (delete_fast_tracepoint_jump)
5046 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5047 (reinsert_fast_tracepoint_jumps_at): Declare.
5048 * regcache.c: Don't compile many functions when building the
5049 in-process agent library.
5050 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5051 the register buffer in the heap.
5052 (free_register_cache): If the register buffer isn't owned by the
5053 regcache, don't free it.
5054 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5055 pre-existing register caches.
5056 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5057 type.
5058 (convert_ascii_to_int): : Constify `from' parameter type.
5059 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5060 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5061 the needed buffer in-place.
5062 (relocate_instruction): New.
5063 * server.c (handle_query) <qSymbols>: If the target supports
5064 tracepoints, give it a chance of looking up symbols. Report
5065 support for fast tracepoints.
5066 (handle_status): Stabilize threads.
5067 (process_serial_event): Adjust.
5068 * server.h (struct fast_tracepoint_jump): Forward declare.
5069 (struct process_info) <fast_tracepoint_jumps>: New field.
5070 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5071 (decode_X_packet, decode_M_packet): Adjust.
5072 (relocate_instruction): Declare.
5073 (in_process_agent_loaded): Declare.
5074 (tracepoint_look_up_symbols): Declare.
5075 (struct fast_tpoint_collect_status): Declare.
5076 (fast_tracepoint_collecting): Declare.
5077 (force_unlock_trace_buffer): Declare.
5078 (handle_tracepoint_bkpts): Declare.
5079 (initialize_low_tracepoint)
5080 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5081 * target.h (struct target_ops) <stabilize_threads,
5082 install_fast_tracepoint_jump_pad>: New fields.
5083 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5084 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5085 [HAVE_STDINT_H]: Include stdint.h.
5086 (trace_debug_1): Rename to ...
5087 (trace_vdebug): ... this.
5088 (trace_debug): Rename to ...
5089 (trace_debug_1): ... this. Add `level' parameter.
5090 (trace_debug): New.
5091 (ATTR_USED, ATTR_NOINLINE): New.
5092 (IP_AGENT_EXPORT): New.
5093 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5094 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5095 (about_to_request_buffer_space, trace_buffer_is_full)
5096 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5097 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5098 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5099 (traceframe_write_count, traceframes_created)
5100 (trace_state_variables)
5101 New renaming defines.
5102 (struct ipa_sym_addresses): New.
5103 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5104 (symbol_list): New.
5105 (ipa_sym_addrs): New.
5106 (all_tracepoint_symbols_looked_up): New.
5107 (in_process_agent_loaded): New.
5108 (write_e_ipa_not_loaded): New.
5109 (maybe_write_ipa_not_loaded): New.
5110 (tracepoint_look_up_symbols): New.
5111 (debug_threads) [IN_PROCESS_AGENT]: New.
5112 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5113 (UNKNOWN_SIDE_EFFECTS): New.
5114 (stop_tracing): New.
5115 (flush_trace_buffer): New.
5116 (stop_tracing_bkpt): New.
5117 (flush_trace_buffer_bkpt): New.
5118 (read_inferior_integer): New.
5119 (read_inferior_uinteger): New.
5120 (read_inferior_data_pointer): New.
5121 (write_inferior_data_pointer): New.
5122 (write_inferior_integer): New.
5123 (write_inferior_uinteger): New.
5124 (struct collect_static_trace_data_action): Delete.
5125 (enum tracepoint_type): New.
5126 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5127 <actions_str, step_actions, step_actions_str>: Only include in
5128 GDBserver.
fa593d66
PA
5129 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5130 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5131 (tracepoints): Use IP_AGENT_EXPORT.
5132 (last_tracepoint): Don't include in the IPA.
5133 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5134 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5135 (alloced_trace_state_variables): New.
5136 (trace_state_variables): Use IP_AGENT_EXPORT.
5137 (traceframe_t): Delete unused variable.
5138 (circular_trace_buffer): Don't include in the IPA.
5139 (trace_buffer_start): Delete.
5140 (struct trace_buffer_control): New.
5141 (trace_buffer_free): Delete.
5142 (struct ipa_trace_buffer_control): New.
5143 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5144 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5145 New.
5146 (trace_buffer_ctrl): New.
5147 (TRACE_BUFFER_CTRL_CURR): New.
5148 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5149 Reimplement as macros.
5150 (trace_buffer_wrap): Delete.
5151 (traceframe_write_count, traceframe_read_count)
5152 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5153 (struct tracepoint_hit_ctx) <type>: New field.
5154 (struct fast_tracepoint_ctx): New.
5155 (memory_barrier): New.
5156 (cmpxchg): New.
5157 (record_tracepoint_error): Update atomically in the IPA.
5158 (clear_inferior_trace_buffer): New.
5159 (about_to_request_buffer_space): New.
5160 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5161 updating the same buffer.
5162 (add_tracepoint): Default the tracepoint's type to trap
5163 tracepoint, and orig_size to -1.
5164 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5165 internal variables.
5166 (create_trace_state_variable): New parameter `gdb'. Handle it.
5167 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5168 (cmd_qtdp): Handle fast tracepoints.
5169 (cmd_qtdv): Adjust.
5170 (max_jump_pad_size): New.
5171 (gdb_jump_pad_head): New.
5172 (get_jump_space_head): New.
5173 (claim_jump_space): New.
5174 (sort_tracepoints): New.
5175 (MAX_JUMP_SIZE): New.
5176 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5177 IPA.
5178 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5179 support. Upload fast traceframes, and delete internal IPA
5180 breakpoints.
5181 (stop_tracing_handler): New.
5182 (flush_trace_buffer_handler): New.
5183 (cmd_qtstop): Upload fast tracepoints.
5184 (response_tracepoint): Handle fast tracepoints.
5185 (tracepoint_finished_step): Upload fast traceframes. Set the
5186 tracepoint hit context's tracepoint type.
5187 (handle_tracepoint_bkpts): New.
5188 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5189 type. Add comment about fast tracepoints.
5190 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5191 non-existing action_str field.
5192 (get_context_regcache): Handle fast tracepoints.
5193 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5194 to the regcache.
5195 (fast_tracepoint_from_jump_pad_address): New.
5196 (fast_tracepoint_from_ipa_tpoint_address): New.
5197 (collecting_t): New.
5198 (force_unlock_trace_buffer): New.
5199 (fast_tracepoint_collecting): New.
5200 (collecting): New.
5201 (gdb_collect): New.
5202 (write_inferior_data_ptr): New.
5203 (target_tp_heap): New.
5204 (target_malloc): New.
5205 (download_agent_expr): New.
5206 (UALIGN): New.
5207 (download_tracepoints): New.
5208 (download_trace_state_variables): New.
5209 (upload_fast_traceframes): New.
5210 (IPA_FIRST_TRACEFRAME): New.
5211 (IPA_NEXT_TRACEFRAME_1): New.
5212 (IPA_NEXT_TRACEFRAME): New.
5213 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5214 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5215 (gdb_jump_pad_buffer_end): New.
5216 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5217 (initialize_tracepoint): Adjust.
5218 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5219 buffer. Initialize the low module.
5220 * utils.c (PREFIX, TOOLNAME): New.
5221 (malloc_failure): Use PREFIX.
5222 (error): In the IPA, an error causes an exit.
5223 (fatal, warning): Use PREFIX.
5224 (internal_error): Use TOOLNAME.
5225 (NUMCELLS): Increase to 10.
5226 * configure, config.in: Regenerate.
5227
d149dd1d
PA
52282010-06-01 Pedro Alves <pedro@codesourcery.com>
5229
5230 * server.c (handle_query) <qSupported>: Do two passes over the
5231 qSupported string to avoid nesting strtok.
5232
f6528abd
JK
52332010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5234
5235 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5236 (CDEPS): New.
5237 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5238 -Wl,--dynamic-list.
5239 * configure: Regenerate.
5240 * proc-service.list: New.
5241
ca2a87a0
JK
52422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5243
5244 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5245 New comment.
5246
363a6e9f
OS
52472010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5248
5249 * gdbreplay.c (remote_open): Check error return from socket() call by
5250 its equality to -1 not by it being negative.
5251 * remote-utils.c (remote_open): Likewise.
5252
d23b6cb1
PA
52532010-05-23 Pedro Alves <pedro@codesourcery.com>
5254
5255 * config.h: Regenerate.
5256
28d3cf85
MK
52572010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5258
5259 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5260 doesn't provide PTRACE_GET_THREAD_AREA.
5261
fea36a59
MK
52622010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5263
5264 * linux-m68k-low.c: Include <asm/ptrace.h>
5265 (ps_get_thread_area): Implement.
5266
24b066ba
DE
52672010-05-03 Doug Evans <dje@google.com>
5268
5269 * event-loop.c (struct callback_event): New struct.
5270 (callback_list): New global.
5271 (append_callback_event, delete_callback_event): New functions.
5272 (process_callback): New function.
5273 (start_event_loop): Call it.
5274 * remote-utils.c (NOT_SCHEDULED): Define.
5275 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5276 moved out of readchar.
5277 (readchar): Rewrite. Call reschedule before returning.
5278 (reset_readchar): New function.
5279 (remote_close): Call it.
5280 (process_remaining, reschedule): New functions.
5281 * server.h (callback_handler_func): New typedef.
5282 (append_callback_event, delete_callback_event): Declare.
5283
9836d6ea
PA
52842010-05-03 Pedro Alves <pedro@codesourcery.com>
5285
5286 * proc-service.c (ps_pglobal_lookup): Use
5287 thread_db_look_up_one_symbol.
5288 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5289 parameter. Use it instead of all_symbols_looked_up.
5290 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5291 field.
5292 (all_symbols_looked_up): Don't declare.
5293 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5294 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5295 field.
5296 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5297 Set all_symbols_looked_up here.
5298 (thread_db_look_up_one_symbol): New.
5299 (thread_db_get_tls_address): Adjust.
5300 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5301 thread_db object on the heap, and tentatively set it in the
5302 process structure.
5303 (thread_db_init): Don't set all_symbols_looked_up here.
5304 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5305
7984d532
PA
53062010-05-03 Pedro Alves <pedro@codesourcery.com>
5307
5308 * linux-low.c (linux_kill, linux_detach): Adjust.
5309 (status_pending_p_callback): Remove redundant statement. Check
5310 for !TARGET_WAITIKIND_IGNORE, instead of
5311 TARGET_WAITKIND_STOPPED.
5312 (handle_tracepoints): Make sure LWP is locked. Adjust.
5313 (linux_wait_for_event_1): Adjust.
5314 (linux_cancel_breakpoints): New.
5315 (unsuspend_one_lwp): New.
5316 (unsuspend_all_lwps): New.
5317 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5318 (send_sigstop_callback): Change return type to int, add new
5319 `except' parameter and handle it.
5320 (suspend_and_send_sigstop_callback): New.
5321 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5322 pass them down. If SUSPEND, also increment the lwp's suspend
5323 count.
5324 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5325 (need_step_over_p): Don't consider suspended LWPs.
5326 (start_step_over): Adjust.
5327 (proceed_one_lwp): Change return type to int, add new `except'
5328 parameter and handle it.
5329 (unsuspend_and_proceed_one_lwp): New.
5330 (proceed_all_lwps): Use find_inferior instead of
5331 for_each_inferior.
5332 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5333 also decrement the suspend count of LWPs. Pass `except' down,
5334 instead of hacking its suspend count.
5335 (linux_pause_all): Add `freeze' parameter. Adjust.
5336 (linux_unpause_all): New.
5337 (linux_target_ops): Install linux_unpause_all.
5338 * server.c (handle_status): Adjust.
5339 * target.h (struct target_ops): New fields `unpause_all' and
5340 `cancel_breakpoints'. Add new parameter to `pause_all'.
5341 (pause_all): Add new `freeze' parameter.
5342 (unpause_all): New.
5343 (cancel_breakpoints): New.
5344 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5345 cancel breakpoints.
5346 (cmd_qtstart): Pause threads.
5347 (stop_tracing): Pause threads, and cancel breakpoints.
5348 * win32-low.c (win32_target_ops): Adjust.
5349
e471f25b
PA
53502010-05-03 Pedro Alves <pedro@codesourcery.com>
5351
5352 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5353 the inferior right away from here...
5354 (linux_wait_1): ... to here, and adjust to check the thread's
5355 last_resume_kind instead of the lwp's step or stop_expected flags.
5356
1915ef4f
PA
53572010-05-02 Pedro Alves <pedro@codesourcery.com>
5358
5359 * README: Use consistent `GDB' and `GDBserver' spellings.
5360
f9e39928
PA
53612010-05-02 Pedro Alves <pedro@codesourcery.com>
5362
5363 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5364 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5365 (linux_detach_one_lwp): Assume the lwp is stopped.
5366 (any_thread_of): Delete.
5367 (linux_detach): Stop all lwps here. Don't blindly delete all
5368 breakpoints.
5369 (delete_lwp_callback): New.
5370 (linux_mourn): Delete all lwps of the process that is gone.
5371 (linux_wait_1): Don't delete the last lwp of the process here.
5372 * mem-break.h (mark_breakpoints_out): Declare.
5373 * mem-break.c (mark_breakpoints_out): New.
5374 (free_all_breakpoints): Use it.
5375 * server.c (handle_target_event): If the process is gone, mark
5376 breakpoints out.
5377 * thread-db.c (struct thread_db) <create_bp>: New field.
5378 (thread_db_enable_reporting): Fix prototype. Store a thread event
5379 breakpoint reference in the thread_db struct.
5380 (thread_db_load_search): Clear the thread_db object.
5381 (try_thread_db_load_1): Ditto.
5382 (switch_to_process): New.
5383 (disable_thread_event_reporting): Use it.
5384 (remove_thread_event_breakpoints): New.
5385 (thread_db_detach, thread_db_mourn): Use it.
5386
1e7fc18c
PA
53872010-05-01 Pedro Alves <pedro@codesourcery.com>
5388
5389 * linux-low.c (linux_enable_event_reporting): New.
5390 (linux_wait_for_event_1, handle_extended_wait): Use it.
5391
02fc4de7
PA
53922010-04-30 Pedro Alves <pedro@codesourcery.com>
5393
5394 * linux-low.c (linux_kill_one_lwp, linux_kill)
5395 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5396 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5397 SIGSTOP even if the LWP is stopped.
5398 (send_sigstop_callback): New.
5399 (stop_all_lwps): Use send_sigstop_callback instead.
5400 (linux_resume_one_thread): Adjust.
5401 (proceed_one_lwp): Still proceed an LWP that the client has
5402 requested to stop, if we haven't reported it as stopped yet. Make
5403 sure that LWPs the client want stopped, have a pending SIGSTOP.
5404
bc3b5632
DE
54052010-04-26 Doug Evans <dje@google.com>
5406
ae1ada35
DE
5407 * server.c (handle_general_set): Make static.
5408
bc3b5632
DE
5409 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5410 Print received char after testing for error/eof instead of before.
5411 (input_interrupt): Tweak comment.
5412
65730243
DE
54132010-04-23 Doug Evans <dje@google.com>
5414
5415 * server.c (start_inferior): Print inferior argv if --debug.
5416
a8ae7dc0
AR
54172010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5418
5419 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5420 * nto-x86-low.c: Include server.h
5421
1c07cc19
PM
54222010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5423
5424 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5425 be consistent with other sources of this directory.
5426 (init_registers_amd64): Correct name of source file of this function
5427 in the comment.
5428
e0a61e09
PM
54292010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5430
5431 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5432 64-bit executables.
5433
54709339
PM
54342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5435
5436 * win32-i386-low.c: Add 64-bit support.
5437 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5438 (init_registers_amd64): Declare.
5439 (mappings): Add 64-bit version of array.
5440 (init_windows_x86): New function.
5441 (the_low_target): Change init_arch field to init_windows_x86.
5442
e8f0053d
PM
54432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5444
5445 * win32-low.c: Adapt to support also 64-bit architecture.
5446 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5447 (get_image_name): Use SIZE_T type for local variable `done'.
5448 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5449 (toolhelp_get_dll_name): Idem.
5450 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5451 Use uintptr_t typecast to avoid warning.
5452 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5453 (handle_exception): Use phex_nz to avoid warning.
5454 (win32_wait): Remove unused local variable `process'.
5455
c481e77e
PM
54562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5457
5458 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5459 `amd64-avx.o'.
5460
12ea4b69
PM
54612010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5462
5463 * configure.ac: Use `ws2_32' library for srv_mingw.
5464 * configure: Regenerate.
5465 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5466 * remote-utils.c: Likewise.
5467
f6d1620c
L
54682010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5469
5470 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5471 if __x86_64__ is defined.
5472
8e642873
PM
54732010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5474
5475 * configure: Regenerate.
5476
711e434b
PM
54772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5478
5479 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5480 * target.h (target_ops): New get_tib_address field.
5481 * win32-low.h (win32_thread_info): Add thread_local_base field.
5482 * win32-low.c (child_add_thread): Add tlb argument.
5483 Set thread_local_base field to TLB.
5484 (get_child_debug_event): Adapt to child_add_thread change.
5485 (win32_get_tib_address): New function.
5486 (win32_target_ops): Set get_tib_address field to
5487 win32_get_tib_address.
5488 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5489
505106cd
PA
54902010-04-12 Pedro Alves <pedro@codesourcery.com>
5491
505106cd
PA
5492 * linux-low.c (linux_mourn): Also remove the process.
5493 * server.c (handle_target_event): Don't remove the process here.
5494 * nto-low.c (nto_mourn): New.
5495 (nto_target_ops): Install it.
5496 * spu-low.c (spu_mourn): New.
5497 (spu_target_ops): Install it.
5498 * win32-low.c (win32_mourn): New.
5499 (win32_target_ops): Install it.
5500
e8470a06
PA
55012010-04-12 Pedro Alves <pedro@codesourcery.com>
5502
5503 * server.h (buffer_xml_printf): Remove redundant `;'.
5504
45ba0d02
PA
55052010-04-12 Pedro Alves <pedro@codesourcery.com>
5506
5507 * regcache.c (set_register_cache): Invalidate regcaches before
5508 changing the register cache layout.
5509 (regcache_invalidate_one): Allow a NULL regcache.
5510 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5511 regcaches before changing the register cache layout or the target
5512 regsets.
5513
59e04013
L
55142010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5515
5516 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5517 variable warning on Linux/x86-64.
5518
8336d594
PA
55192010-04-11 Pedro Alves <pedro@codesourcery.com>
5520
5521 GDBserver disconnected tracing support.
5522
5523 * linux-low.c (linux_remove_process): Delete.
5524 (add_lwp): Don't set last_resume_kind here.
5525 (linux_kill): Use `mourn'.
5526 (linux_detach): Use `thread_db_detach', and `mourn'.
5527 (linux_mourn): New.
5528 (linux_attach_lwp_1): Adjust comment.
5529 (linux_attach): last_resume_kind moved the thread_info; adjust.
5530 (status_pending_p_callback): Adjust.
5531 (linux_wait_for_event_1): Adjust.
5532 (count_events_callback, select_singlestep_lwp_callback)
5533 (select_event_lwp_callback, cancel_breakpoints_callback)
5534 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5535 (proceed_one_lwp): Adjust.
5536 (linux_async): Add debug output.
5537 (linux_thread_stopped): New.
5538 (linux_pause_all): New.
5539 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5540 linux_pause_all.
5541 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5542 (thread_db_free): Delete declaration.
5543 (thread_db_detach, thread_db_mourn): Declare.
5544 * thread-db.c (thread_db_init): Use thread_db_mourn.
5545 (thread_db_free): Delete, split in two.
5546 (disable_thread_event_reporting): New.
5547 (thread_db_detach): New.
5548 (thread_db_mourn): New.
5549
5550 * server.h (struct thread_info) <last_resume_kind>: New field.
5551 <attached>: Add comment.
5552 <gdb_detached>: New field.
5553 (handler_func): Change return type to int.
5554 (handle_serial_event, handle_target_event): Ditto.
5555 (gdb_connected): Declare.
5556 (tracing): Delete.
5557 (disconnected_tracing): Declare.
5558 (stop_tracing): Declare.
5559
5560 * server.c (handle_query) <qSupported>: Report support for
5561 disconnected tracing.
5562 (queue_stop_reply_callback): Account for running threads.
5563 (gdb_wants_thread_stopped): New.
5564 (gdb_wants_all_threads_stopped): New.
5565 (gdb_reattached_process): New.
5566 (handle_status): Clear the `gdb_detached' flag of all processes.
5567 In all-stop, stop all threads.
5568 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5569 (process_serial_event): If the remote connection breaks, or if an
5570 exit was forced with "monitor exit", force an event loop exit.
5571 Handle disconnected tracing on detach.
5572 (handle_serial_event): Adjust.
5573 (handle_target_event): If GDB isn't connected, forward events back
5574 to the inferior, unless the last process exited, in which case,
5575 exit gdbserver. Adjust interface.
5576
5577 * remote-utils.c (remote_open): Don't block in accept. Instead
5578 register an event loop source on the listen socket file
5579 descriptor. Refactor bits into ...
5580 (listen_desc): ... this new global.
5581 (gdb_connected): ... this new function.
5582 (enable_async_notification): ... this new function.
5583 (handle_accept_event): ... this new function.
5584 (remote_close): Clear remote_desc.
5585
5586 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5587
5588 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5589 New fields.
5590 (mourn_inferior): Define.
5591 (target_process_qsupported): Avoid the dangling else problem.
5592 (thread_stopped): Define.
5593 (pause_all): Define.
5594 (target_waitstatus_to_string): Declare.
5595 * target.c (target_waitstatus_to_string): New.
5596
5597 * tracepoint.c (tracing): Make extern.
5598 (disconnected_tracing): New.
5599 (stop_tracing): Make extern. Handle tracing stops due to GDB
5600 disconnecting.
5601 (cmd_qtdisconnected): New.
5602 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5603 (handle_tracepoint_general_set): Handle QTDisconnected.
5604
5605 * event-loop.c (event_handler_func): Change return type to int.
5606 (process_event): Bail out if the event handler wants the event
5607 loop to stop.
5608 (handle_file_event): Ditto.
5609 (start_event_loop): Bail out if the event handler wants the event
5610 loop to stop.
5611
5612 * nto-low.c (nto_target_ops): Adjust.
5613 * spu-low.c (spu_wait): Don't remove the process here.
5614 (spu_target_ops): Adjust.
5615 * win32-low.c (win32_wait): Don't remove the process here.
5616 (win32_target_ops): Adjust.
5617
5d267c4c
PA
56182010-04-11 Pedro Alves <pedro@codesourcery.com>
5619
5620 * regcache.c (realloc_register_cache): Invalidate inferior's
5621 regcache before recreating it.
5622
623ccd72
PA
56232010-04-09 Pedro Alves <pedro@codesourcery.com>
5624
5625 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5626
219f2f23
PA
56272010-04-09 Stan Shebs <stan@codesourcery.com>
5628 Pedro Alves <pedro@codesourcery.com>
5629
5630 * server.h (LONGEST): New.
5631 (struct thread_info) <while_stepping>: New field.
5632 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5633 Declare.
5634 (initialize_tracepoint, handle_tracepoint_general_set)
5635 (handle_tracepoint_query, tracepoint_finished_step)
5636 (tracepoint_was_hit, release_while_stepping_state_list):
5637 (current_traceframe): Declare.
5638 * server.c (handle_general_set): Handle tracepoint packets.
5639 (read_memory): New.
5640 (write_memory): New.
5641 (handle_search_memory_1): Use read_memory.
5642 (handle_query): Report support for conditional tracepoints, trace
5643 state variables, and tracepoint sources. Handle tracepoint
5644 queries.
5645 (main): Initialize the tracepoints module.
5646 (process_serial_event): Handle traceframe reads/writes.
5647
5648 * linux-low.c (handle_tracepoints): New.
5649 (linux_wait_1): Call it.
5650 (linux_resume_one_lwp): Handle while-stepping.
5651 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5652 (linux_target_ops): Install them.
5653 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5654 New field.
5655 * linux-x86-low.c (x86_supports_tracepoints): New.
5656 (the_low_target). Install it.
5657
5658 * mem-break.h (delete_breakpoint): Declare.
5659 * mem-break.c (delete_breakpoint): Make external.
5660
5661 * target.h (struct target_ops): Add `supports_tracepoints',
5662 `read_pc', and `write_pc' fields.
5663 (target_supports_tracepoints): Define.
5664 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5665 (phex_nz): New.
5666
5667 * regcache.h (struct regcache) <registers_owned>: New field.
5668 (init_register_cache, regcache_cpy): Declare.
5669 (regcache_read_pc, regcache_write_pc): Declare.
5670 (register_cache_size): Declare.
5671 (supply_regblock): Declare.
5672 * regcache.c (init_register_cache): New.
5673 (new_register_cache): Use it.
5674 (regcache_cpy): New.
5675 (register_cache_size): New.
5676 (supply_regblock): New.
5677 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 5678
219f2f23
PA
5679 * tracepoint.c: New.
5680
5681 * Makefile.in (OBS): Add tracepoint.o.
5682 (tracepoint.o): New rule.
5683
3a13a53b
L
56842010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5685
5686 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5687 (i386-mmx.o): New.
5688 (i386-mmx.c): Likewise.
5689 (i386-mmx-linux.o): Likewise.
5690 (i386-mmx-linux.c): Likewise.
5691
5692 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5693 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5694 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5695 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5696
5697 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5698 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5699 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5700
1570b33e
L
57012010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5702
5703 * Makefile.in (clean): Updated.
5704 (i386-avx.o): New.
5705 (i386-avx.c): Likewise.
5706 (i386-avx-linux.o): Likewise.
5707 (i386-avx-linux.c): Likewise.
5708 (amd64-avx.o): Likewise.
5709 (amd64-avx.c): Likewise.
5710 (amd64-avx-linux.o): Likewise.
5711 (amd64-avx-linux.c): Likewise.
5712
5713 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5714 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5715 (srv_amd64_regobj): Add amd64-avx.o.
5716 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5717 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5718 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5719 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5720 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5721 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5722 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5723
5724 * i387-fp.c: Include "i386-xstate.h".
5725 (i387_xsave): New.
5726 (i387_cache_to_xsave): Likewise.
5727 (i387_xsave_to_cache): Likewise.
5728 (x86_xcr0): Likewise.
5729
5730 * i387-fp.h (i387_cache_to_xsave): Likewise.
5731 (i387_xsave_to_cache): Likewise.
5732 (x86_xcr0): Likewise.
5733
5734 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5735 * linux-crisv32-low.c (target_regsets): Likewise.
5736 * linux-m68k-low.c (target_regsets): Likewise.
5737 * linux-mips-low.c (target_regsets): Likewise.
5738 * linux-ppc-low.c (target_regsets): Likewise.
5739 * linux-s390-low.c (target_regsets): Likewise.
5740 * linux-sh-low.c (target_regsets): Likewise.
5741 * linux-sparc-low.c (target_regsets): Likewise.
5742 * linux-xtensa-low.c (target_regsets): Likewise.
5743
5744 * linux-low.c: Include <sys/uio.h>.
5745 (regsets_fetch_inferior_registers): Support nt_type.
5746 (regsets_store_inferior_registers): Likewise.
5747 (linux_process_qsupported): New.
5748 (linux_target_ops): Add linux_process_qsupported.
5749
5750 * linux-low.h (regset_info): Add nt_type.
5751 (linux_target_ops): Add process_qsupported.
5752
5753 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5754 and <sys/uio.h>.
5755 (init_registers_i386_avx_linux): New.
5756 (init_registers_amd64_avx_linux): Likewise.
5757 (xmltarget_i386_linux_no_xml): Likewise.
5758 (xmltarget_amd64_linux_no_xml): Likewise.
5759 (PTRACE_GETREGSET): Likewise.
5760 (PTRACE_SETREGSET): Likewise.
5761 (x86_fill_xstateregset): Likewise.
5762 (x86_store_xstateregset): Likewise.
5763 (use_xml): Likewise.
5764 (x86_linux_update_xmltarget): Likewise.
5765 (x86_linux_process_qsupported): Likewise.
5766 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5767 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5768 init_registers_i386_linux here. Call
5769 x86_linux_update_xmltarget.
5770 (the_low_target): Add x86_linux_process_qsupported.
5771
5772 * server.c (handle_query): Call target_process_qsupported.
5773
5774 * target.h (target_ops): Add process_qsupported.
5775 (target_process_qsupported): New.
5776
fc7238bb
PA
57772010-04-03 Pedro Alves <pedro@codesourcery.com>
5778
5779 * inferiors.c (add_thread): Set last_status kind to
5780 TARGET_WAITKIND_IGNORE.
5781 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5782 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5783 (linux_wait_1): Move `thread' local definition to block that uses
5784 it. Don't NULL initialize `event_child'.
5785 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5786 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5787 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5788
bdabb078
PA
57892010-04-01 Pedro Alves <pedro@codesourcery.com>
5790
5791 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5792 an extended waitstatus, or by a watchpoint.
5793 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5794 thread was stepping or has been stopped by a watchpoint.
5795
d3bbe7a0
PA
57962010-04-01 Pedro Alves <pedro@codesourcery.com>
5797
5798 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5799 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5800 of another, then delete the previous, and validate all
5801 breakpoints.
5802 (validate_inserted_breakpoint): New.
5803 (delete_disabled_breakpoints): New.
5804 (validate_breakpoints): New.
5805 (check_mem_read): Validate breakpoints before trusting their
5806 shadow. Delete disabled breakpoints.
5807 (check_mem_write): Validate breakpoints before trusting they
5808 should be inserted. Delete disabled breakpoints.
5809 * mem-break.h (validate_breakpoints):
5810 * server.c (handle_query): Validate breakpoints when we see a
5811 qSymbol query.
5812
8b07ae33
PA
58132010-04-01 Pedro Alves <pedro@codesourcery.com>
5814
5815 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5816 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5817 if we could tell there's a GDB breakpoint at stop_pc.
5818 (need_step_over_p): Don't do a step over if we find a GDB
5819 breakpoint at the resume PC.
5820
5821 * mem-break.c (struct raw_breakpoint): New.
5822 (enum bkpt_type): New type `gdb_breakpoint'.
5823 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5824 fields. New field `raw'.
5825 (find_raw_breakpoint_at): New.
5826 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5827 breakpoint instead.
5828 (set_breakpoint_at): Adjust.
5829 (delete_raw_breakpoint): New.
5830 (release_breakpoint): New.
5831 (delete_breakpoint): Rename to...
5832 (delete_breakpoint_1): ... this. Add proc parameter. Use
5833 release_breakpoint. Return ENOENT.
5834 (delete_breakpoint): Reimplement.
5835 (find_breakpoint_at): Delete.
5836 (find_gdb_breakpoint_at): New.
5837 (delete_breakpoint_at): Delete.
5838 (set_gdb_breakpoint_at): New.
5839 (delete_gdb_breakpoint_at): New.
5840 (gdb_breakpoint_here): New.
5841 (set_reinsert_breakpoint): Use release_breakpoint.
5842 (uninsert_breakpoint): Rename to ...
5843 (uninsert_raw_breakpoint): ... this.
5844 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5845 (reinsert_raw_breakpoint): Change parameter type to
5846 raw_breakpoint.
5847 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5848 instead.
5849 (check_breakpoints): Adjust. Use release_breakpoint.
5850 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5851 (breakpoint_inserted_here): Ditto.
5852 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5853 Don't trust the breakpoint's shadow if it is not inserted.
5854 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5855 (delete_all_breakpoints): Adjust.
5856 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5857 use delete_breakpoint_1.
5858
5859 * mem-break.h (breakpoints_supported): Delete declaration.
5860 (set_gdb_breakpoint_at): Declare.
5861 (gdb_breakpoint_here): Declare.
5862 (delete_breakpoint_at): Delete.
5863 (delete_gdb_breakpoint_at): Declare.
5864
5865 * server.h (struct raw_breakpoint): Forward declare.
5866 (struct process_info): New field `raw_breakpoints'.
5867
5868 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5869 breakpoints.
5870
6bf5e0ba
PA
58712010-03-24 Pedro Alves <pedro@codesourcery.com>
5872
5873 * linux-low.c (status_pending_p_callback): Fix comment.
5874 (linux_wait_for_event_1): Move most of the internal breakpoint
5875 handling from here...
5876 (linux_wait_1): ... to here.
5877 (count_events_callback): New.
5878 (select_singlestep_lwp_callback): New.
5879 (select_event_lwp_callback): New.
5880 (cancel_breakpoints_callback): New.
5881 (select_event_lwp): New.
5882 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5883 priority to all LWPs that have had events that should be reported
5884 to the client. Cancel breakpoints when about to reporting the
5885 event to the client, not while stopping lwps. No longer cancel
5886 finished single-steps here.
5887 (cancel_finished_single_step): Delete.
5888 (cancel_finished_single_steps): Delete.
5889
414a389f
PA
58902010-03-24 Pedro Alves <pedro@codesourcery.com>
5891
5892 * mem-break.c (enum bkpt_type): New.
5893 (struct breakpoint): New field `type'.
5894 (set_breakpoint_at): Change return type to struct breakpoint
5895 pointer. Set type to `other_breakpoint' by default.
5896 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5897 in the breakpoint list.
5898 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5899 (reinsert_breakpoint): Rename to ...
5900 (reinsert_raw_breakpoint): ... this.
5901 (reinsert_breakpoints_at): Adjust.
5902 * mem-break.h (struct breakpoint): Declare.
5903 (set_breakpoint_at): Change return type to struct breakpoint
5904 pointer.
5905
2280c721
PA
59062010-03-24 Pedro Alves <pedro@codesourcery.com>
5907
5908 * server.c (handle_query): Assign, not compare.
5909
d50171e4
PA
59102010-03-24 Pedro Alves <pedro@codesourcery.com>
5911
5912 Teach linux gdbserver to step-over-breakpoints.
5913
5914 * linux-low.c (can_hardware_single_step): New.
5915 (supports_breakpoints): New.
5916 (handle_extended_wait): If stopping threads, read the stop pc of
5917 the new cloned LWP.
5918 (get_pc): New.
5919 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5920 low target doesn't support retrieving the PC.
5921 (add_lwp): Set last_resume_kind to resume_continue.
5922 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5923 (linux_attach): Don't clear stop_expected. Set the lwp's
5924 last_resume_kind to resume_stop.
5925 (linux_detach_one_lwp): Don't check for removed breakpoints.
5926 (check_removed_breakpoint): Delete.
5927 (status_pending_p): Rename to ...
5928 (status_pending_p_callback): ... this. Don't check for removed
5929 breakpoints. Don't consider threads that are stopped from GDB's
5930 perspective.
5931 (linux_wait_for_lwp): Always read the stop_pc here.
5932 (cancel_breakpoint): New.
5933 (step_over_bkpt): New global.
5934 (linux_wait_for_event_1): Implement stepping over breakpoints.
5935 (gdb_wants_lwp_stopped): New.
5936 (gdb_wants_all_stopped): New.
5937 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5938 single-step traps here. Store the thread's last reported target
5939 wait status.
5940 (send_sigstop): Don't clear stop_expected. Always set it,
5941 instead.
5942 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5943 (cancel_finished_single_step): New.
5944 (cancel_finished_single_steps): New.
5945 (wait_for_sigstop): Don't cancel finished single-step traps here.
5946 (linux_resume_one_lwp): Don't check for removed breakpoints.
5947 Don't set `step' on non-hardware step archs.
5948 (linux_set_resume_request): Ignore resume_stop requests if already
5949 stopping or stopped. Set the lwp's last_resume_kind.
5950 (resume_status_pending_p): Don't check for removed breakpoints.
5951 (need_step_over_p): New.
5952 (start_step_over): New.
5953 (finish_step_over): New.
5954 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5955 requests. Clear the thread's last reported target waitstatus.
5956 Don't use the `suspended' flag. Don't consider pending breakpoints.
5957 (linux_resume): Start a step-over if necessary.
5958 (proceed_one_lwp): New.
5959 (proceed_all_lwps): New.
5960 (unstop_all_lwps): New.
5961 * linux-low.h (struct lwp_info): Rewrite comment for the
5962 `suspended' flag. Add the `stop_pc' field. Delete the
5963 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5964 Add `'last_resume_kind' and `need_step_over' fields.
5965 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5966 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5967 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5968 (set_raw_breakpoint_at): New.
5969 (set_breakpoint_at): Rewrite to use it.
5970 (reinsert_breakpoint_handler): Delete.
5971 (set_reinsert_breakpoint): New.
5972 (reinsert_breakpoint_by_bp): Delete.
5973 (delete_reinsert_breakpoints): New.
5974 (uninsert_breakpoint): Rewrite.
5975 (uninsert_breakpoints_at): New.
5976 (reinsert_breakpoint): Rewrite.
5977 (reinsert_breakpoints_at): New.
5978 (check_breakpoints): Rewrite.
5979 (breakpoint_here): New.
5980 (breakpoint_inserted_here): New.
5981 (check_mem_read): Adjust.
5982 * mem-break.h (breakpoints_supported, breakpoint_here)
5983 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5984 (reinsert_breakpoint_by_bp): Delete declaration.
5985 (delete_reinsert_breakpoints): Declare.
5986 (reinsert_breakpoint): Delete declaration.
5987 (reinsert_breakpoints_at): Declare.
5988 (uninsert_breakpoint): Delete declaration.
5989 (uninsert_breakpoints_at): Declare.
5990 (check_breakpoints): Adjust prototype.
5991 * server.h: Adjust include order.
5992 (struct thread_info): Declare here. Add a `last_status' field.
5993
30ba68cb
MS
59942010-03-23 Michael Snyder <msnyder@vmware.com>
5995
5996 * server.c (crc32): New function.
5997 (handle_query): Add handling for 'qCRC:' request.
5998
b9a881c2
PA
59992010-03-23 Pedro Alves <pedro@codesourcery.com>
6000
6001 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6002 lwp had been stopped by a watchpoint.
6003
e92d13d5
PA
60042010-03-16 Pedro Alves <pedro@codesourcery.com>
6005
6006 * server.h (internal_error): Declare.
6007 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6008 * utils.c (internal_error): New function.
6009
64daa791
AS
60102010-03-15 Andreas Schwab <schwab@redhat.com>
6011
6012 * configure.srv: Fix typo setting srv_regobj.
6013
f52cd8cd
PA
60142010-03-15 Pedro Alves <pedro@codesourcery.com>
6015
6016 * linux-low.c (fetch_register): Avoid passing a non string literal
6017 format to `error'.
6018 (usr_store_inferior_registers): Ditto.
6019
93ae6fdc
PA
60202010-03-14 Pedro Alves <pedro@codesourcery.com>
6021
6022 * linux-low.c (linux_write_memory): Bail out early if peeking
6023 memory failed.
6024
c3adc08c
PA
60252010-03-14 Pedro Alves <pedro@codesourcery.com>
6026
6027 * linux-low.h (struct lwp_info): New fields
6028 `stopped_by_watchpoint' and `stopped_data_address'.
6029 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6030 here, and cache them in the lwp object.
6031 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6032 directly.
6033 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6034 field.
6035 (linux_stopped_by_watchpoint): Rewrite.
6036 (linux_stopped_data_address): Rewrite.
6037
bce522a2
PA
60382010-03-06 Simo Melenius <simo.melenius@iki.fi>
6039
6040 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6041 switching the current inferior, not before.
6042
90884b2b
L
60432010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6044
6045 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6046 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6047 i386-linux.c and amd64-linux.c.
6048 (reg-i386.o): Removed.
6049 (reg-i386.c): Likewise.
6050 (reg-i386-linux.o): Likewise.
6051 (reg-i386-linux.c): Likewise.
6052 (reg-x86-64.o): Likewise.
6053 (reg-x86-64.c): Likewise.
6054 (reg-x86-64-linux.o): Likewise.
6055 (reg-x86-64-linux.c): Likewise.
6056 (i386.o): New.
6057 (i386.c): Likewise.
6058 (i386-linux.o): Likewise.
6059 (i386-linux.c): Likewise.
6060 (amd64.o): Likewise.
6061 (amd64.c): Likewise.
6062 (amd64-linux.o): Likewise.
6063 (amd64-linux.c): Likewise.
6064
6065 * configure.srv (srv_i386_regobj): New.
6066 (srv_i386_linux_regobj): Likewise.
6067 (srv_amd64_regobj): Likewise.
6068 (srv_amd64_linux_regobj): Likewise.
6069 (srv_i386_32bit_xmlfiles): Likewise.
6070 (srv_i386_64bit_xmlfiles): Likewise.
6071 (srv_i386_xmlfiles): Likewise.
6072 (srv_amd64_xmlfiles): Likewise.
6073 (srv_i386_linux_xmlfiles): Likewise.
6074 (srv_amd64_linux_xmlfiles): Likewise.
6075 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6076 srv_xmlfiles to $srv_i386_xmlfiles.
6077 (i[34567]86-*-mingw32ce*): Likewise.
6078 (i[34567]86-*-mingw*): Likewise.
6079 (i[34567]86-*-nto*): Likewise.
6080 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6081 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6082 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6083 (x86_64-*-linux*): Likewise.
6084
6085 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6086 (init_registers_amd64_linux): New.
6087 (x86_arch_setup): Replace init_registers_x86_64_linux with
6088 init_registers_amd64_linux.
6089
193f13e6
MK
60902010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6091
6092 * configure.ac: Check for libdl. If it is not available link against
6093 static libthread_db.
6094 * configure: Regenerate.
6095
85d721b8
PA
60962010-02-22 Pedro Alves <pedro@codesourcery.com>
6097
6098 PR9605
6099
6100 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6101 handing a read watchpoint.
6102 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6103
6076632b
DE
61042010-02-12 Doug Evans <dje@google.com>
6105
6106 * linux-low.c (linux_supports_tracefork_flag): Document.
6107 (linux_look_up_symbols): Add comment.
6108
3327ccf7
L
61092010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6110
6111 * regcache.c (supply_register): Clear regcache if buf is NULL.
6112
0718675c 61132010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6114 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6115
6116 * inferiors.c (find_inferior): Add function documentation.
6117 (unloaded_dll): Handle the case where the unloaded dll has not
6118 been previously registered in the dll list.
6119
177321bd
DJ
61202010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6121
6122 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6123 (thumb2_breakpoint): New.
6124 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6125
2b009048
DJ
61262010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6127
6128 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6129 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6130 breakpoints.
6131
3be029c7
PA
61322010-01-21 Pedro Alves <pedro@codesourcery.com>
6133
6134 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6135
18f5de3b
JK
61362010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6137
6138 * linux-s390-low.c (s390_collect_ptrace_register)
6139 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6140
3743bb4f
DE
61412010-01-21 Doug Evans <dje@google.com>
6142
14ce3065
DE
6143 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6144 (PTRACE_ARG4_TYPE): New macro.
6145 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6146 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6147 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6148 (usr_store_inferior_registers): Ditto.
6149 (linux_read_memory, linux_write_memory): Ditto.
6150 (linux_test_for_tracefork): Ditto.
6151
3743bb4f
DE
6152 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6153 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6154
8b315be5
PA
61552010-01-21 Pedro Alves <pedro@codesourcery.com>
6156
6157 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6158 target.
6159
85492558
PA
61602010-01-21 Pedro Alves <pedro@codesourcery.com>
6161
6162 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6163 prototype to take a regcache. Adjust.
6164
442ea881
PA
61652010-01-20 Pedro Alves <pedro@codesourcery.com>
6166
6167 * regcache.h (struct thread_info): Forward declare.
6168 (struct regcache): New.
6169 (new_register_cache): Adjust prototype.
6170 (get_thread_regcache): Declare.
6171 (free_register_cache): Adjust prototype.
6172 (registers_to_string, registers_from_string): Ditto.
6173 (supply_register, supply_register_by_name, collect_register)
6174 (collect_register_as_string, collect_register_by_name): Ditto.
6175 * regcache.c (struct inferior_regcache_data): Delete.
6176 (get_regcache): Rename to ...
6177 (get_thread_regcache): ... this. Adjust. Switch inferior before
6178 fetching registers.
6179 (regcache_invalidate_one): Adjust.
6180 (regcache_invalidate): Fix prototype.
6181 (new_register_cache): Return the new register cache.
6182 (free_register_cache): Change prototype.
6183 (realloc_register_cache): Adjust.
6184 (registers_to_string): Change prototype to take a regcache. Adjust.
6185 (registers_from_string): Ditto.
6186 (register_data): Ditto.
6187 (supply_register): Ditto.
6188 (supply_register_by_name): Ditto.
6189 (collect_register): Ditto.
6190 (collect_register_as_string): Ditto.
6191 (collect_register_by_name): Ditto.
6192 * server.c (process_serial_event): Adjust.
6193 * linux-low.h (regset_fill_func, regset_store_func): Change
6194 prototype.
6195 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6196 Change prototype.
6197 * linux-low.c (get_stop_pc): Adjust.
6198 (check_removed_breakpoint): Adjust.
6199 (linux_wait_for_event): Adjust.
6200 (linux_resume_one_lwp): Adjust.
6201 (fetch_register): Add regcache parameter. Adjust.
6202 (usr_store_inferior_registers): Ditto.
6203 (regsets_fetch_inferior_registers): Ditto.
6204 (regsets_store_inferior_registers): Ditto.
6205 (linux_fetch_registers, linux_store_registers): Ditto.
6206 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6207 regcache. Adjust.
43aaf8b6
PA
6208 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6209 Ditto.
442ea881
PA
6210 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6211 prototype to take a regcache.
6212 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6213 * remote-utils.c (convert_ascii_to_int, outreg)
6214 (prepare_resume_reply): Change prototype to take a regcache.
6215 Adjust.
6216 * target.h (struct target_ops) <fetch_registers, store_registers>:
6217 Change prototype to take a regcache.
6218 (fetch_inferior_registers, store_inferior_registers): Change
6219 prototype to take a regcache. Adjust.
6220 * proc-service.c (ps_lgetregs): Adjust.
6221 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6222 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6223 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6224 take a regcache. Adjust.
6225 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6226 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6227 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6228 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6229 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6230 (cris_cannot_fetch_register):
6231 (cris_breakpoint_at): Change prototype to take a regcache.
6232 Adjust.
6233 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6234 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6235 to take a regcache. Adjust.
6236 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6237 Adjust.
6238 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6239 take a regcache. Adjust.
6240 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6241 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6242 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6243 * linux-mips-low.c (mips_get_pc):
6244 (mips_set_pc): Change prototype to take a regcache. Adjust.
6245 (mips_reinsert_addr): Adjust.
6246 (mips_collect_register): Change prototype to take a regcache.
6247 Adjust.
6248 (mips_supply_register):
6249 (mips_collect_register_32bit, mips_supply_register_32bit)
6250 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6251 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6252 * linux-ppc-low.c (ppc_supply_ptrace_register)
6253 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6254 (parse_spufs_run): Adjust.
6255 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6256 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6257 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6258 take a regcache. Adjust.
6259 * linux-s390-low.c (s390_collect_ptrace_register)
6260 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6261 (s390_set_pc): Change prototype to take a regcache. Adjust.
6262 (s390_arch_setup): Adjust.
6263 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6264 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6265 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6266 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6267 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6268 regcache. Adjust.
6269 (sparc_breakpoint_at): Adjust.
6270 * linux-xtensa-low.c (xtensa_fill_gregset):
6271 (xtensa_store_gregset):
6272 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6273 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6274 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6275 prototype to take a regcache. Adjust.
6276 * win32-arm-low.c (arm_fetch_inferior_register)
6277 (arm_store_inferior_register): Change prototype to take a
6278 regcache. Adjust.
6279 * win32-i386-low.c (i386_fetch_inferior_register)
6280 (i386_store_inferior_register): Change prototype to take a
6281 regcache. Adjust.
6282 * win32-low.c (child_fetch_inferior_registers)
6283 (child_store_inferior_registers): Change prototype to take a
6284 regcache. Adjust.
6285 (win32_wait): Adjust.
6286 (win32_fetch_inferior_registers): Change prototype to take a
6287 regcache. Adjust.
6288 (win32_store_inferior_registers): Adjust.
6289 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6290 store_inferior_register>: Change prototype to take a regcache.
6291
60c3d7b0
DE
62922010-01-20 Doug Evans <dje@google.com>
6293
6294 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6295 #ifdef.
6296 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6297 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6298
dc146f7c
VP
62992010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6300
6301 * linux-low.c (linux_core_of_thread): New.
6302 (compare_ints, show_process, list_threads): New.
6303 (linux_qxfer_osdata): Report threads and cores.
6304 (linux_target_op): Register linux_core_of_thread.
6305 * remote-utils.c (prepare_resume_reply): Report the core.
6306 (buffer_xml_printf): Support %d specifier.
6307 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6308 New.
6309 (handle_query): Handle qXfer:threads. Announce availability
6310 thereof.
6311 * target.h (struct target_ops): New field core_of_thread.
6312
7803799a
UW
63132010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6314
6315 * Makefile.in (clean): Remove new generated files.
6316 (reg-s390.o, reg-s390.c): Remove rules.
6317 (reg-s390x.o, reg-s390x.c): Likewise.
6318 (s390-linux32.o, s390-linux32.c): Add rules.
6319 (s390-linux64.o, s390-linux64.c): Likewise.
6320 (s390x-linux64.o, s390x-linux64.c): Likewise.
6321 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6322 * linux-s390-low.c: Include <elf.h>.
6323 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6324 (init_registers_s390): Remove prototype.
6325 (init_registers_s390x): Likewise.
6326 (init_registers_s390_linux32): Add prototype.
6327 (init_registers_s390_linux64): Likewise.
6328 (init_registers_s390x_linux64): Likewise.
6329 (s390_num_regs_3264): New define.
6330 (s390_regmap_3264): New global variable.
6331 (s390_cannot_fetch_register): Remove obsolete check.
6332 (s390_cannot_store_register): Likewise.
6333 (s390_collect_ptrace_register): Handle upper/lower register halves.
6334 (s390_supply_ptrace_register): Likewise.
6335 (s390_fill_gregset): Update to register number changes.
6336 (s390_get_hwcap): New routine.
6337 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6338 Install appropriate regmap and register set.
6339
6e7ffa39
JB
63402010-01-01 Joel Brobecker <brobecker@adacore.com>
6341
6342 * server.c (gdbserver_version): Update copyright year to 2010.
6343 * gdbreplay.c (gdbreplay_version): Likewise.
6344
957f3f49
DE
63452009-12-28 Doug Evans <dje@google.com>
6346
6347 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6348 elf/external.h. Include <elf.h> instead but only if necessary.
6349
ca5c370d
PA
63502009-12-28 Pedro Alves <pedro@codesourcery.com>
6351
6352 * linux-low.c (linux_remove_process): Remove `detaching'
6353 parameter. Don't release/detach from thread_db here.
6354 (linux_kill): Release/detach from thread_db here, ...
6355 (linux_detach): ... and here, before actually detaching.
6356 (linux_wait_1): ... and here, when a process exits.
6357 * thread-db.c (any_thread_of): New.
6358 (thread_db_free): Switch the current inferior to a thread of the
6359 passed in process.
6360
4ee62156
DE
63612009-12-21 Doug Evans <dje@google.com>
6362
d90e6a88
DE
6363 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6364
c5f62d5f
DE
6365 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6366 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6367 warning ifndef __NR_tkill. Move setting of errno there too.
6368 Delete unnecessary resetting of errno after syscall.
6369 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6370
10e86dd7
DE
6371 * configure.ac: Check for dladdr.
6372 * config.in: Regenerate.
6373 * configure: Regenerate.
6374 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6375 (try_thread_db_load): Update.
6376
4ee62156
DE
6377 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6378
00f515da
DE
63792009-12-18 Doug Evans <dje@google.com>
6380
e9464885
DE
6381 * event-loop.c: Include unistd.h if it exists.
6382
07d4f67e
DE
6383 * linux-low.c (my_waitpid): Move definition away from being in
6384 between linux_tracefork_child/linux_test_for_tracefork.
6385
00f515da
DE
6386 * gdb_proc_service.h (psaddr_t): Fix type.
6387 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6388 signature to match glibc.
6389
1de1badb
DE
63902009-12-16 Doug Evans <dje@google.com>
6391
6392 * linux-low.c (linux_read_memory): Fix argument to read.
6393
aeeb81d1
PA
63942009-11-26 Pedro Alves <pedro@codesourcery.com>
6395
6396 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6397 events, don't leave current_inferior pointing at null.
6398
10357975
PA
63992009-11-26 Pedro Alves <pedro@codesourcery.com>
6400
6401 * win32-low.c (LOG): Delete.
6402 (OUTMSG): Output to stderr.
6403 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6404 on compile time LOG macro.
6405 (win32_wait): Fix debug output.
6406
cf6e3471
PA
64072009-11-26 Pedro Alves <pedro@codesourcery.com>
6408
6409 * win32-low.c (win32_add_one_solib): If the dll name is
6410 "ntdll.dll", prepend the system directory to the dll path.
6411
0c85e18e
MK
64122009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6413
6414 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6415
9ac544ce 64162009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6417 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6418
6419 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6420 * configure.ac: Check for __mcoldfire__ and set
6421 gdb_cv_m68k_is_coldfire.
6422 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6423 reg-cf.o and reg-m68k.o.
6424 * configure: Regenerated.
6425
fd7dd3e6
PA
64262009-11-16 Pedro Alves <pedro@codesourcery.com>
6427
6428 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6429 Pass it to thread_db_free.
6430 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6431 proper `detaching' argument to linux_remove_process.
6432 * linux-low.h (thread_db_free): Add `detaching' parameter.
6433 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6434 to thread_db_free.
6435 (thread_db_free): Add `detaching' parameter. Only
6436 call td_ta_clear_event if detaching from process.
6437
75aa492e
MK
64382009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6439
6440 * thread-db.c (thread_db_free): Fix typo.
6441
21e1bee4
PP
64422009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6443
6444 PR gdb/10838
6445 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6446
8838b45e
NS
64472009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6448
6449 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6450 with an i686 compiler.
6451 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6452 needed.
6453 * configure: Rebuilt.
6454
8a35fb51
SL
64552009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6456
6457 PR gdb/10783
6458
6459 * server.c (handle_search_memory_1): Correct read_addr initialization
6460 in loop for searching subsequent chunks.
6461
96f15937
PP
64622009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6463
6464 * configure.ac: New --with-libthread-db option.
6465 * thread-db.c: Allow direct dependence on libthread_db.
6466 (thread_db_free): Adjust.
6467 * config.in: Regenerate.
6468 * configure: Likewise.
889bf7c5 6469
5f7d1694
PP
64702009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6471
6472 PR gdb/10757
6473 * thread-db.c (attach_thread): New function.
6474 (maybe_attach_thread): Return success/failure.
6475 (find_new_threads_callback): Adjust.
889bf7c5
PA
6476 (thread_db_find_new_threads): Loop until no new threads.
6477
88e3b899
PA
64782009-10-13 Pedro Alves <pedro@codesourcery.com>
6479
6480 * proc-service.c (ps_lgetregs): Formatting.
6481
cdbfd419
PP
64822009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6483
6484 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6485 * configure.ac: Adjust.
6486 * linux-low.h (struct process_info_private): Move members to struct
6487 thread_db.
6488 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6489 * linux-low.c (linux_remove_process): Adjust.
6490 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6491 * server.c (handle_query): Move code ...
6492 (handle_monitor_command): ... here. New function.
6493 * target.h (struct target_ops): New member.
6494 * thread-db.c (struct thread_db): New.
6495 (libthread_db_search_path): New variable.
6496 (thread_db_create_event, thread_db_enable_reporting)
6497 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6498 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6499 (try_thread_db_load_1, dladdr_to_soname): New functions.
6500 (try_thread_db_load, thread_db_load_search): New functions.
6501 (thread_db_init): Search for libthread_db.
6502 (thread_db_free): New function.
6503 (thread_db_handle_monitor_command): Likewise.
6504 * config.in: Regenerate.
6505 * configure: Regenerate.
889bf7c5 6506
4168d2d6
UW
65072009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6508
6509 * spu-low.c (spu_kill): Wait for inferior to terminate.
6510 Call clear_inferiors.
6511 (spu_detach): Call clear_inferiors.
6512
81ecdfbb
RW
65132009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6514
6515 * aclocal.m4: Regenerate.
6516 * config.in: Likewise.
6517 * configure: Likewise.
6518
0b9ff2c0
UW
65192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6520
6521 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6522 (parse_spufs_run): New function.
6523 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6524 (ppc_breakpoint_at): Handle SPU breakpoints.
6525
efcbbd14
UW
65262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6527
6528 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6529 (SPUFS_MAGIC): Define.
6530 (spu_enumerate_spu_ids): New function.
6531 (linux_qxfer_spu): New function.
6532 (linux_target_ops): Install linux_qxfer_spu.
6533
f4d9bade
UW
65342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6535
6536 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6537 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6538 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6539 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6540 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6541 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6542 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6543 (init_registers_powerpc_cell32l): Add prototype.
6544 (init_registers_powerpc_cell64l): Likewise.
6545 (ppc_arch_setup): Detect Cell/B.E. architecture.
6546
96e946ca
RW
65472009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6548
6549 * Makefile.in (datarootdir): New variable.
6550
58d6951d
DJ
65512009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6552
6553 * linux-low.c (linux_write_memory): Update debugging output.
6554 * Makefile.in (clean): Add new descriptions.
6555 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6556 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6557 * configure.srv: Add new files for arm*-*-linux*.
6558 * linux-arm-low.c: Add new declarations.
6559 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6560 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6561 (HWCAP_VFPv3D16): New.
6562 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6563 instead of __IWMMXT__.
6564 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6565 (arm_arch_setup): New.
6566 (target_regsets): Remove #ifdef. Add VFP regset.
6567 (the_low_target): Use arm_arch_setup.
6568
12b42a12
DJ
65692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6570
6571 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6572 the main thread again.
6573
ac8c974e
AR
65742009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6575
6576 Adding Neutrino gdbserver.
6577 * configure: Regenerated.
6578 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6579 * configure.srv (i[34567]86-*-nto*): New target.
6580 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6581 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6582 (nto_comctrl) [__QNX__]: New function.
6583 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6584
4424e0c3 65852009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
6586
6587 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6588 srv_tgtobj.
6589
912cf4ba
PA
65902009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6591 Pedro Alves <pedro@codesourcery.com>
6592
6593 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6594 don't support CONTEXT_EXTENDED_REGISTERS.
6595 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6596 (the_low_target): Install them.
6597 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6598 failing with ERROR_PIPE_NOT_CONNECTED.
6599
aa5ca48f
DE
66002009-06-30 Doug Evans <dje@google.com>
6601 Pierre Muller <muller@ics.u-strasbg.fr>
6602
6603 Add h/w watchpoint support to x86-linux, win32-i386.
6604 * Makefile.in (SFILES): Add i386-low.c
6605 (i386_low_h): Define.
6606 (i386-low.o): Add dependencies.
6607 (linux-x86-low.o): Add i386-low.h dependency.
6608 (win32-i386-low.o): Ditto.
6609 * i386-low.c: New file.
6610 * i386-low.h: New file.
6611 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6612 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6613 * linux-low.c (linux_add_process): Initialize arch_private.
6614 (linux_remove_process): Free arch_private.
6615 (add_lwp): Initialize arch_private.
6616 (delete_lwp): Free arch_private.
6617 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6618 provided.
6619 * linux-low.h (process_info_private): New member arch_private.
6620 (lwp_info): New member arch_private.
6621 (linux_target_ops): New members new_process, new_thread,
6622 prepare_to_resume.
6623 (ptid_of): New macro.
6624 * linux-x86-low.c: Include stddef.h, i386-low.h.
6625 (arch_process_info): New struct.
6626 (arch_lwp_info): New struct.
6627 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6628 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6629 (i386_dr_low_get_status): New function.
6630 (x86_insert_point, x86_remove_point): New functions.
6631 (x86_stopped_by_watchpoint): New function.
6632 (x86_stopped_data_address): New function.
6633 (x86_linux_new_process, x86_linux_new_thread): New functions.
6634 (x86_linux_prepare_to_resume): New function.
6635 (the_low_target): Add entries for insert_point, remove_point,
6636 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6637 prepare_to_resume.
6638 * server.c (debug_hw_points): New global.
6639 (monitor_show_help): Document set debug-hw-points.
6640 (handle_query): Process "set debug-hw-points".
6641 * server.h (debug_hw_points): Declare.
6642 (paddress): Declare.
6643 * utils.c (NUMCELLS, CELLSIZE): New macros.
6644 (get_sell, xsnprintf, paddress): New functions.
6645 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6646 remove_point, stopped_by_watchpoint, stopped_data_address.
6647 * win32-i386-low.c: Include i386-low.h.
6648 (debug_reg_state): Replaces dr.
6649 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6650 (i386_dr_low_get_status): New function.
6651 (i386_insert_point, i386_remove_point): New functions.
6652 (i386_stopped_by_watchpoint): New function.
6653 (i386_stopped_data_address): New function.
6654 (i386_initial_stuff): Update.
6655 (get_thread_context,set_thread_context,i386_thread_added): Update.
6656 (the_low_target): Add entries for insert_point,
6657 remove_point, stopped_by_watchpoint, stopped_data_address.
6658 * win32-low.c (win32_insert_watchpoint): New function.
6659 (win32_remove_watchpoint): New function.
6660 (win32_stopped_by_watchpoint): New function.
6661 (win32_stopped_data_address): New function.
6662 (win32_target_ops): Add entries for insert_watchpoint,
6663 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6664 * win32-low.h (win32_target_ops): New members insert_point,
6665 remove_point, stopped_by_watchpoint, stopped_data_address.
6666
d993e290
PA
66672009-06-25 Pedro Alves <pedro@codesourcery.com>
6668
6669 * server.c (process_serial_event): Re-return unsupported, not
6670 error, if the type isn't recognized. Re-allow supporting only
6671 insert or remove packets. Also call require_running for
6672 breakpoints. Add missing break statement to default case. Tidy.
6673 * target.h (struct target_ops): Rename insert_watchpoint to
6674 insert_point, and remove_watchpoint to remove_point.
6675
6676 * linux-low.h (struct linux_target_ops): Likewise.
6677 * linux-low.c (linux_insert_watchpoint): Rename to ...
6678 (linux_insert_point): ... this. Adjust.
6679 (linux_remove_watchpoint): Rename to ...
6680 (linux_remove_point): ... this. Adjust.
6681 (linux_target_ops): Adjust.
6682 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6683 (cris_insert_point): ... this.
6684 (cris_remove_watchpoint): Rename to ...
6685 (cris_remove_point): ... this.
6686 (the_low_target): Adjust.
6687
0f54c268
PM
66882009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6689
6690 * server.c (handle_v_kill): Pass signal_pid to
6691 kill_inferior if multi_process is zero.
6692
c6314022
AR
66932009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6694
6695 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6696 * target.h (target_ops): Comment for *_watchpoint to make it clear
6697 the functions can get types '0' and '1'.
6698
4463ce24
AR
66992009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6700
6701 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6702 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6703 * regcache.c (get_regcache): Likewise.
6704 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6705 * win32-low.c (child_fetch_inferior_registers): Remove check for
6706 regno 0.
6707
cf8fd78b
PA
67082009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6709 Pedro Alves <pedro@codesourcery.com>
6710
6711 * target.h (struct target_ops) <supports_multi_process>: New
6712 callback.
6713 (target_supports_multi_process): New.
6714 * server.c (handle_query): Even if GDB reports support, only
6715 enable multi-process if the target also supports it. Report
6716 multi-process support only if the target backend supports it.
6717 * linux-low.c (linux_supports_multi_process): New function.
6718 (linux_target_ops): Install it as target_supports_multi_process
6719 callback.
6720
47c0c975
DE
67212009-05-24 Doug Evans <dje@google.com>
6722
e09875d4
DE
6723 Global renaming of find_thread_pid to find_thread_ptid.
6724 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6725 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6726 All callers updated.
6727
e27d73f6
DE
6728 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6729 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6730 directly.
6731
47c0c975
DE
6732 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6733 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6734 (linux_resume_one_lwp): Ditto.
6735
2acc282a
DE
67362009-05-23 Doug Evans <dje@google.com>
6737
6738 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6739 from struct inferior_list_entry * to struct lwp_info *.
6740 All callers updated.
6741
9f1036c1
DE
67422009-05-13 Doug Evans <dje@google.com>
6743
6744 * linux-x86-low.c: Don't include assert.h.
6745 (x86_siginfo_fixup): Use fatal, not assert.
6746 (x86_arch_setup): Fix comment.
6747
d0722149
DE
67482009-05-12 Doug Evans <dje@google.com>
6749
6750 Biarch support for i386/amd64 gdbserver.
6751 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6752 Add linux-x86-low.c.
6753 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6754 (linux-x86-low.o): Add.
6755 * linux-x86-64-low.c: Delete.
6756 * linux-i386-low.c: Delete.
6757 * linux-x86-low.c: New file.
6758 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6759 linux-x86-low.o.
6760 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6761 linux-x86-low.o.
6762 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6763 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6764 (linux_child_pid_to_exec_file): New function.
6765 (elf_64_header_p, elf_64_file_p): New functions.
6766 (siginfo_fixup): New function.
6767 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6768 give target a chance to convert layout.
6769 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6770 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6771
fdeb2a12
DE
67722009-05-07 Doug Evans <dje@google.com>
6773
6774 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6775 (regsets_store_inferior_registers): Ditto.
6776
a6dbe5df
PA
67772009-05-06 Pedro Alves <pedro@codesourcery.com>
6778
6779 PR server/10048
6780
6781 * linux-low.c (must_set_ptrace_flags): Delete.
6782 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6783 of the global.
6784 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6785 `lwp->must_set_ptrace_flags' instead.
ba42693b 6786 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
6787 (linux_wait_1): ... not here.
6788
5091eb23
DE
67892009-04-30 Doug Evans <dje@google.com>
6790
9f767825
DE
6791 * inferiors.c (started_inferior_callback): New function.
6792 (attached_inferior_callback): New function.
6793 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6794 * server.c (print_started_pid, print_attached_pid): New functions.
6795 (detach_or_kill_for_exit): New function.
6796 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6797 * server.h (have_started_inferiors_p): Declare.
6798 (have_attached_inferiors_p): Declare.
6799
5091eb23
DE
6800 * inferiors.c (remove_process): Fix memory leak, free process.
6801 * linux-low.c (linux_remove_process): New function.
6802 (linux_kill): Call it instead of remove_process.
6803 (linux_detach, linux_wait_1): Ditto.
6804
155c8968
PA
68052009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6806
6807 * configure.srv: Add x86 Windows CE target.
6808
7fe519cb
UW
68092009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6810
6811 * inferiors.c (get_thread_process): Make global.
6812 * server.h (get_thread_process): Add prototype.
6813 * thread-db.c (find_one_thread): Use get_thread_process
6814 instead of current_process.
6815 (thread_db_get_tls_address): Do not crash if called when
6816 thread layer is not yet initialized.
6817
5472f405
UW
68182009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6819
6820 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6821 * spu-low.c (current_tid): Rename to ...
6822 (current_ptid): ... this.
6823 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6824 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6825 ptid_get_lwp (current_ptid) instead of current_tid.
6826 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6827 instead of current_tid. Use find_process_pid to verify pid
6828 argument is valid. Pass proper argument to remove_process.
6829 (spu_thread_alive): Compare current_ptid instead of current_tid.
6830 (spu_resume): Likewise.
6831
55ac2b99
PA
68322009-04-02 Pedro Alves <pedro@codesourcery.com>
6833
6834 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6835 variable.
6836
95954743
PA
68372009-04-01 Pedro Alves <pedro@codesourcery.com>
6838
6839 Implement the multiprocess extensions, and add linux multiprocess
6840 support.
6841
6842 * server.h (ULONGEST): Declare.
6843 (struct ptid, ptid_t): New.
6844 (minus_one_ptid, null_ptid): Declare.
6845 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6846 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6847 (struct inferior_list_entry): Change `id' type from unsigned from
6848 to ptid_t.
6849 (struct sym_cache, struct breakpoint, struct
6850 process_info_private): Forward declare.
6851 (struct process_info): Declare.
6852 (current_process): Declare.
6853 (all_processes): Declare.
6854 (initialize_inferiors): Declare.
6855 (add_thread): Adjust to use ptid_t.
6856 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6857 (add_process, remove_process, find_thread_pid): Declare.
6858 (find_inferior_id): Adjust to use ptid_t.
6859 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6860 (multi_process): Declare.
6861 (push_event): Adjust to use ptid_t.
6862 (read_ptid, write_ptid): Declare.
6863 (prepare_resume_reply): Adjust to use ptid_t.
6864 (clear_symbol_cache): Declare.
6865 * inferiors.c (all_processes): New.
6866 (null_ptid, minus_one_ptid): New.
6867 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6868 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6869 (add_thread): Change unsigned long to ptid. Remove gdb_id
6870 parameter. Adjust.
6871 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6872 (gdb_id_to_thread): Rename to ...
6873 (find_thread_pid): ... this. Change unsigned long to ptid.
6874 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6875 (loaded_dll, pull_pid_from_list): Adjust.
6876 (add_process, remove_process, find_process_pid)
6877 (get_thread_process, current_process, initialize_inferiors): New.
6878 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6879 (struct target_waitstatus) <related_pid>: Ditto.
6880 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6881 return type to int.
6882 (struct target_ops) <join>: Add `pid' argument.
6883 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6884 (struct target_ops) <wait>: Add `ptid' field. Change return type
6885 to ptid.
6886 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6887 (mywait): Add `ptid' argument. Change return type to ptid_t.
6888 (target_pid_to_str): Declare.
6889 * target.c (set_desired_inferior): Adjust to use ptids.
6890 (mywait): Add new `ptid' argument. Adjust.
6891 (target_pid_to_str): New.
6892 * mem-break.h (free_all_breakpoints): Declare.
6893 * mem-break.c (breakpoints): Delelete.
6894 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6895 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6896 to use per-process breakpoint list.
6897 (free_all_breakpoints): New.
6898 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6899 (symbol_cache, all_symbols_looked_up): Delete.
6900 (hexchars): New.
6901 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6902 read_ptid): New.
6903 (prepare_resume_reply): Change ptid argument's type from unsigned
6904 long to ptid_t. Adjust. Implement W;process and X;process.
6905 (free_sym_cache, clear_symbol_cache): New.
6906 (look_up_one_symbol): Adjust to per-process symbol cache. *
6907 * server.c (cont_thread, general_thread, step_thread): Change type
6908 to ptid_t.
6909 (attached): Delete.
6910 (multi_process): New.
6911 (last_ptid): Change type to ptid_t.
6912 (struct vstop_notif) <ptid>: Change type to ptid_t.
6913 (queue_stop_reply, push_event): Change `ptid' argument's type to
6914 ptid_t.
6915 (discard_queued_stop_replies): Add `pid' argument.
6916 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6917 changes. Don't reference the `attached' global.
6918 (attach_inferior): Adjust to mywait interface changes.
6919 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6920 features. Handle and report "multiprocess+". Handle
6921 "qAttached:PID".
6922 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6923 changes.
6924 (handle_v_kill): New.
6925 (handle_v_stopped): Adjust to use target_pid_to_str.
6926 (handle_v_requests): Allow multiple attaches and runs when
6927 multiprocess extensions are in effect. Handle "vKill".
6928 (myresume): Adjust to use ptids.
6929 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6930 (handle_status): Adjust to discard_queued_stop_replies interface
6931 change.
6932 (first_thread_of, kill_inferior_callback)
6933 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6934 (main): Call initialize_inferiors. Adjust to use ptids, killing
6935 and detaching from all inferiors. Handle multiprocess packet
6936 variants.
6937 * linux-low.h: Include gdb_proc_service.h.
6938 (struct process_info_private): New.
6939 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6940 <lwpid_of>: Use ptid_get_lwp.
6941 (get_lwp_thread): Adjust.
6942 (struct lwp_info): Add `dead' member.
6943 (find_lwp_pid): Declare.
6944 * linux-low.c (thread_db_active): Delete.
6945 (new_inferior): Adjust comment.
6946 (inferior_pid): Delete.
6947 (linux_add_process): New.
6948 (handle_extended_wait): Adjust.
6949 (add_lwp): Change unsigned long to ptid.
6950 (linux_create_inferior): Add process to processes table. Adjust
6951 to use ptids. Don't set new_inferior here.
6952 (linux_attach_lwp): Rename to ...
6953 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6954 it. Adjust to use ptids.
6955 (linux_attach_lwp): New.
6956 (linux_attach): Add process to processes table. Don't set
6957 new_inferior here.
6958 (struct counter): New.
6959 (second_thread_of_pid_p, last_thread_of_process_p): New.
6960 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6961 multiple processes.
6962 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6963 processes. Remove process from process table.
6964 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6965 to multiple processes.
6966 (any_thread_of): New.
6967 (linux_detach): Add `pid' argument, and handle it. Remove process
6968 from processes table.
6969 (linux_join): Add `pid' argument. Handle it.
6970 (linux_thread_alive): Change unsighed long argument to ptid_t.
6971 Consider dead lwps as not being alive.
6972 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6973 threads we're not interested in.
6974 (same_lwp, find_lwp_pid): New.
6975 (linux_wait_for_lwp): Change `pid' argument's type from int to
6976 ptid_t. Adjust.
6977 (linux_wait_for_event): Rename to ...
6978 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6979 from int to ptid_t. Adjust.
6980 (linux_wait_for_event): New.
6981 (linux_wait_1): Add `ptid' argument. Change return type to
6982 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6983 that exit from the process table.
6984 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6985 Adjust.
6986 (mark_lwp_dead): New.
6987 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6988 stopping all threads, mark its main lwp as dead.
6989 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6990 ptids.
6991 (fetch_register, usr_store_inferior_registers)
6992 (regsets_fetch_inferior_registers)
6993 (regsets_store_inferior_registers, linux_read_memory)
6994 (linux_write_memory): Inline `inferior_pid'.
6995 (linux_look_up_symbols): Adjust to use per-process
6996 `thread_db_active'.
6997 (linux_request_interrupt): Adjust to use ptids.
6998 (linux_read_auxv): Inline `inferior_pid'.
6999 (initialize_low): Don't reference thread_db_active.
7000 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7001 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7002 (ps_getpid): Return the pid of the current inferior.
7003 * thread-db.c (proc_handle, thread_agent): Delete.
7004 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7005 per-process data.
7006 (find_one_thread): Change argument type to ptid_t. Adjust to
7007 per-process data.
7008 (maybe_attach_thread): Adjust to per-process data and ptids.
7009 (thread_db_find_new_threads): Ditto.
7010 (thread_db_init): Ditto.
7011 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7012 processes table. Adjust to use ptids.
7013 (spu_kill, spu_detach): Adjust interface. Remove process from
7014 processes table.
7015 (spu_join, spu_thread_alive): Adjust interface.
7016 (spu_wait): Adjust interface. Remove process from processes
7017 table. Adjust to use ptids.
7018 * win32-low.c (current_inferior_tid): Delete.
7019 (current_inferior_ptid): New.
7020 (debug_event_ptid): New.
7021 (thread_rec): Take a ptid. Adjust.
7022 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7023 (child_delete_thread): Ditto.
7024 (do_initial_child_stuff): Add `attached' argument. Add process to
7025 processes table.
7026 (child_fetch_inferior_registers, child_store_inferior_registers):
7027 Adjust.
7028 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7029 (win32_attach): Pass 1 to do_initial_child_stuff.
7030 (win32_kill): Adjust interface. Remove process from processes
7031 table.
7032 (win32_detach): Ditto.
7033 (win32_join): Adjust interface.
7034 (win32_thread_alive): Take a ptid.
7035 (win32_resume): Adjust to use ptids.
7036 (get_child_debug_event): Ditto.
7037 (win32_wait): Adjust interface. Remove exiting process from
7038 processes table.
7039
bd99dc85
PA
70402009-04-01 Pedro Alves <pedro@codesourcery.com>
7041
7042 Non-stop mode support.
7043
7044 * server.h (non_stop): Declare.
7045 (gdb_client_data, handler_func): Declare.
7046 (delete_file_handler, add_file_handler, start_event_loop):
7047 Declare.
7048 (handle_serial_event, handle_target_event, push_event)
7049 (putpkt_notif): Declare.
7050 * target.h (enum resume_kind): New.
7051 (struct thread_resume): Replace `step' field by `kind' field.
7052 (TARGET_WNOHANG): Define.
7053 (struct target_ops) <wait>: Add `options' argument.
7054 <supports_non_stop, async, start_non_stop>: New fields.
7055 (target_supports_non_stop, target_async): New.
7056 (start_non_stop): Declare.
7057 (mywait): Add `options' argument.
7058 * target.c (mywait): Add `options' argument. Print child exit
7059 notifications here.
7060 (start_non_stop): New.
7061 * server.c (non_stop, own_buf, mem_buf): New globals.
7062 (struct vstop_notif): New.
7063 (notif_queue): New global.
7064 (queue_stop_reply, push_event, discard_queued_stop_replies)
7065 (send_next_stop_reply): New.
7066 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7067 interface changes.
7068 (attach_inferior): In non-stop mode, don't wait for the target
7069 here.
7070 (handle_general_set): Handle QNonStop.
7071 (handle_query): When handling qC, return the current general
7072 thread, instead of the first thread of the list.
7073 (handle_query): If the backend supports non-stop mode, include
7074 QNonStop+ in the qSupported query response.
7075 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7076 and non-stop mode.
7077 (handle_v_attach, handle_v_run): Handle non-stop mode.
7078 (handle_v_stopped): New.
7079 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7080 (myresume): Adjust to use resume_kind. Handle non-stop.
7081 (queue_stop_reply_callback): New.
7082 (handle_status): Handle non-stop mode.
7083 (main): Clear non_stop flag on reconnection. Use the event-loop.
7084 Refactor serial protocol handling from here ...
7085 (process_serial_event): ... to this new function. When GDB
7086 selects any thread, select one here. In non-stop mode, wait until
7087 GDB acks all pending events before exiting.
7088 (handle_serial_event, handle_target_event): New.
7089 * remote-utils.c (remote_open): Install remote_desc in the event
7090 loop.
7091 (remote_close): Remove remote_desc from the event loop.
7092 (putpkt_binary): Rename to...
7093 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7094 (putpkt_binary): New as wrapper around putpkt_binary_1.
7095 (putpkt_notif): New.
7096 (prepare_resume_reply): In non-stop mode, don't change the
7097 general_thread.
7098 * event-loop.c: New.
7099 * Makefile.in (OBJ): Add event-loop.o.
7100 (event-loop.o): New rule.
7101
7102 * linux-low.h (pid_of): Moved here.
7103 (lwpid_of): New.
7104 (get_lwp_thread): Use lwpid_of.
7105 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7106 * linux-low.c (pid_of): Delete.
7107 (inferior_pid): Use lwpid_of.
7108 (linux_event_pipe): New.
7109 (target_is_async_p): New.
7110 (delete_lwp): New.
7111 (handle_extended_wait): Use lwpid_of.
7112 (add_lwp): Don't set lwpid field.
7113 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7114 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7115 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7116 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7117 first. Adjust to linux_wait_for_event interface changes. Use
7118 lwpid_of.
7119 (linux_detach): Don't delete the main lwp here.
7120 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7121 (status_pending_p): Don't consider explicitly suspended lwps.
7122 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7123 pointer. Add OPTIONS argument. Change return type to int. Use
7124 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7125 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7126 pointer. Add status pointer argument. Return a pid instead of a
7127 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7128 changes. In non-stop mode, don't switch to a random thread.
7129 (linux_wait): Rename to...
7130 (linux_wait_1): ... this. Add target_options argument, and handle
7131 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7132 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7133 clean exit and signal exit code. Don't stop all threads in
7134 non-stop mode. In all-stop mode, only stop all threads when
7135 reporting a stop to GDB. Handle explicit thread stop requests.
7136 (async_file_flush, async_file_mark): New.
7137 (linux_wait): New.
7138 (send_sigstop): Use lwpid_of.
7139 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7140 interface changes. In non-stop mode, don't switch to a random
7141 thread.
7142 (linux_resume_one_lwp): Use lwpid_of.
7143 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7144 (linux_resume_one_thread): ... this. Handle resume_stop. In
7145 non-stop mode, don't look for pending flag in all threads.
7146 (resume_status_pending_p): Don't consider explicitly suspended
7147 threads.
7148 (my_waitpid): Reimplement. Emulate __WALL.
7149 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7150 Use lwpid_of.
7151 (sigchld_handler, linux_supports_non_stop, linux_async)
7152 (linux_start_non_stop): New.
7153 (linux_target_ops): Register linux_supports_non_stop, linux_async
7154 and linux_start_non_stop.
7155 (initialize_low): Install SIGCHLD handler.
7156 * thread-db.c (thread_db_create_event, find_one_thread)
7157 (thread_db_get_tls_address): Use lwpid_of.
7158 * win32-low.c (win32_detach): Adjust to use resume_kind.
7159 (win32_wait): Add `options' argument.
7160 * spu-low.c (spu_resume): Adjust to use resume_kind.
7161 (spu_wait): Add `options' argument.
7162
5b1c542e
PA
71632009-04-01 Pedro Alves <pedro@codesourcery.com>
7164
7165 Decouple target code from remote protocol.
7166
7167 * target.h (enum target_waitkind): New.
7168 (struct target_waitstatus): New.
7169 (struct target_ops) <wait>: Return an unsigned long. Take a
7170 target_waitstatus pointer instead of a char pointer.
7171 (mywait): Likewise.
7172 * target.c (mywait): Change prototype to return an unsigned long.
7173 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7174 * server.h (thread_from_wait, old_thread_from_wait): Delete
7175 declarations.
7176 (prepare_resume_reply): Change prototype to take a
7177 target_waitstatus.
7178 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7179 (last_status, last_ptid): New.
7180 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7181 pid instead of a signal.
7182 (attach_inferior): Remove "status" and "signal" parameters.
7183 Adjust.
7184 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7185 not as an address.
7186 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7187 (handle_v_requests, myresume): Remove "status" and "signal"
7188 parameters. Adjust.
7189 (handle_status): New.
7190 (main): Delete local `status'. Adjust.
7191 * remote-utils.c: Include target.h.
7192 (prepare_resume_reply): Change prototype to take a
7193 target_waitstatus. Adjust.
7194
7195 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7196 interface.
7197 * spu-low.c (spu_wait): Adjust.
7198 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7199 Delete.
7200 (win32_wait): Adjust.
7201
2bd7c093
PA
72022009-04-01 Pedro Alves <pedro@codesourcery.com>
7203
7204 * target.h (struct thread_resume): Delete leave_stopped member.
7205 (struct target_ops): Add a `n' argument to the `resume' callback.
7206 * server.c (start_inferior): Adjust.
7207 (handle_v_cont, myresume): Adjust.
7208 * linux-low.c (check_removed_breakpoint): Adjust to resume
7209 interface change, and to removed leave_stopped field.
7210 (resume_ptr): Delete.
7211 (struct thread_resume_array): New.
7212 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7213 resume interface change.
7214 (linux_continue_one_thread, linux_queue_one_thread)
7215 (resume_status_pending_p): Check if the resume field is NULL
7216 instead of checking the leave_stopped member.
7217 (linux_resume): Adjust to the target resume interface change.
7218 * spu-low.c (spu_resume): Adjust to the target resume interface
7219 change.
7220 * win32-low.c (win32_detach, win32_resume): Ditto.
7221
c35fafde
PA
72222009-04-01 Pedro Alves <pedro@codesourcery.com>
7223
7224 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7225 flag.
7226 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7227 pending.
7228 (linux_continue_one_thread): Only preserve the stepping flag if
7229 there's a pending breakpoint.
7230
0a59d50b
PA
72312009-03-31 Pedro Alves <pedro@codesourcery.com>
7232
7233 * server.c (main): After the inferior having exited, call
7234 remote_close before exiting gdbserver.
7235
f04c6d38
TJB
72362009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7237
7238 Fix size of FPSCR in Power 7 processors.
7239 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7240 (PPC_FEATURE_HAS_DFP): New #define.
7241 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7242 size of the FPSCR.
7243
78e5cee6
PA
72442009-03-23 Pedro Alves <pedro@codesourcery.com>
7245
7246 * server.c (handle_query) Whitespace and formatting.
7247
1b3f6016
PA
72482009-03-22 Pedro Alves <pedro@codesourcery.com>
7249
7250 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7251 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7252 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7253 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7254 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7255 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7256 Makefile.in, configure.ac: Fix whitespace throughout.
7257 * configure: Regenerate.
7258
a07b2135
PA
72592009-03-22 Pedro Alves <pedro@codesourcery.com>
7260
7261 * inferiors.c (find_inferior): Make it safe for the callback
7262 function to delete the currently iterated inferior.
7263
67cc2626
PA
72642009-03-22 Pedro Alves <pedro@codesourcery.com>
7265
7266 * Makefile.in (linuw_low_h): Move higher.
7267 (thread-db.o): Depend on $(linux_low_h).
7268
54a0b537
PA
72692009-03-17 Pedro Alves <pedro@codesourcery.com>
7270
7271 Rename "process" to "lwp" throughout.
7272
7273 * linux-low.c (all_processes): Rename to...
7274 (all_lwps): ... this.
7275 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7276 (add_process): Rename to ...
7277 (add_lwp): ... this. Adjust.
7278 (linux_create_inferior): Adjust.
7279 (linux_attach_lwp): Adjust.
7280 (linux_attach): Adjust.
7281 (linux_kill_one_process): Rename to ...
7282 (linux_kill_one_lwp): ... this. Adjust.
7283 (linux_kill): Adjust.
7284 (linux_detach_one_process): Rename to ...
7285 (linux_detach_one_lwp): ... this. Adjust.
7286 (linux_detach): Adjust.
7287 (check_removed_breakpoint): Adjust.
7288 (status_pending_p): Adjust.
7289 (linux_wait_for_process): Rename to ...
7290 (linux_wait_for_lwp): ... this. Adjust.
7291 (linux_wait_for_event): Adjust.
7292 (send_sigstop): Adjust.
7293 (wait_for_sigstop): Adjust.
7294 (stop_all_processes): Rename to ...
7295 (stop_all_lwps): ... this.
7296 (linux_resume_one_process): Rename to ...
7297 (linux_resume_one_lwp): ... this. Adjust.
7298 (linux_set_resume_request, linux_continue_one_thread)
7299 (linux_queue_one_thread, resume_status_pending_p)
7300 (usr_store_inferior_registers, regsets_store_inferior_registers)
7301 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7302 Adjust.
7303 * linux-low.h (get_process): Rename to ...
7304 (get_lwp): ... this. Adjust.
7305 (get_thread_process): Rename to ...
7306 (get_thread_lwp): ... this. Adjust.
7307 (get_process_thread): Rename to ...
7308 (get_lwp_thread): ... this. Adjust.
7309 (struct process_info): Rename to ...
7310 (struct lwp_info): ... this.
7311 (all_processes): Rename to ...
7312 (all_lwps): ... this.
7313 * proc-service.c (ps_lgetregs): Adjust.
7314 * thread-db.c (thread_db_create_event, find_one_thread)
7315 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7316
0b16c5cf
PA
73172009-03-14 Pedro Alves <pedro@codesourcery.com>
7318
7319 * server.c (handle_query): Handle "qAttached".
7320
32de4b9d
NS
73212009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7322
7323 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7324 GPLv3, update license URL.
7325
2aecd87f
DE
73262009-03-01 Doug Evans <dje@google.com>
7327
93efd302 7328 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7329 (server_h): Add gdb_signals.h.
7330 (signals.o): Update.
7331 * server.h (target_signal_from_host,target_signal_to_host_p)
7332 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7333
86b1f9c5
PM
73342009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7335
7336 * remote-utils.c (getpkt): Also generate remote-debug
7337 information if noack_mode is set.
7338
4aa995e1
PA
73392009-02-06 Pedro Alves <pedro@codesourcery.com>
7340
7341 * server.c (handle_query): Report qXfer:siginfo:read and
7342 qXfer:siginfo:write as supported and handle them.
7343 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7344 * linux-low.c (linux_xfer_siginfo): New.
7345 (linux_target_ops): Set it.
7346
62709adf
PA
73472009-01-26 Pedro Alves <pedro@codesourcery.com>
7348
7349 * server.c (gdbserver_usage): Mention --remote-debug.
7350 (main): Accept '--remote-debug' switch.
7351
aef93bd7
DE
73522009-01-18 Doug Evans <dje@google.com>
7353
7354 * regcache.c (new_register_cache): No need to check result of xcalloc.
7355 * server.c (handle_search_memory): Back out calls to xmalloc,
7356 result is checked and error is returned to user upon failure.
7357 (handle_query): Ditto. Add more checks for result of malloc.
7358 (handle_v_cont): Check result of malloc, report error back to
7359 user upon failure.
7360 (handle_v_run): Ditto. Call freeargv.
7361 * server.h (freeargv): Declare.
7362 * utils.c (freeargv): New fn.
7363
54363045
DE
73642009-01-15 Doug Evans <dje@google.com>
7365
f626972c
DE
7366 * gdbreplay.c (perror_with_name): Make arg const char *.
7367 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7368 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7369 * utils.c (perror_with_name): Make arg const char *.
54363045 7370
18aae699
PA
73712009-01-14 Pedro Alves <pedro@codesourcery.com>
7372
7373 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7374 when handling a EXIT_PROCESS_DEBUG_EVENT.
7375
ff703abe
JB
73762009-01-06 Joel Brobecker <brobecker@adacore.com>
7377
7378 * gdbreplay.c (gdbreplay_version): Update copyright year.
7379 * server.c (gdbserver_version): Likewise.
7380
f21cc1a2 73812009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7382
7383 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7384 (handle_extended_wait): Improve comment.
0e21c1ec 7385
bca929d3
DE
73862008-12-13 Doug Evans <dje@google.com>
7387
7388 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7389 * server.h (ATTR_MALLOC): New macro.
7390 (xmalloc,xcalloc,xstrdup): Declare.
7391 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7392 * inferiors.c: Ditto.
7393 * linux-low.c: Ditto.
7394 * mem-break.c: Ditto.
7395 * regcache.c: Ditto.
7396 * remote-utils.c: Ditto.
7397 * server.c: Ditto.
7398 * target.c: Ditto.
7399 * win32-low.c: Ditto.
7400
97438e3f
DE
74012008-12-12 Doug Evans <dje@google.com>
7402
896c7fbb
DE
7403 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7404 in debugging printf.
7405
97438e3f
DE
7406 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7407
e3b886f8
DE
74082008-12-09 Doug Evans <dje@google.com>
7409
7410 * linux-low.h (struct process_info): Delete member tid, unused.
7411 * thread-db.c (find_one_thread): Update.
7412 (maybe_attach_thread): Update.
7413
07e059b5
VP
74142008-12-02 Pedro Alves <pedro@codesourcery.com>
7415
889bf7c5
PA
7416 * target.h (struct target_ops): Add qxfer_osdata member.
7417 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7418 and dirent.h.
7419 (linux_qxfer_osdata): New functions.
7420 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7421 callback.
7422 * server.c (handle_query): Handle "qXfer:osdata:read:".
7423 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7424 (buffer_xml_printf): New functions.
7425 * server.h (struct buffer): New.
7426 (buffer_grow_str, buffer_grow_str0): New macros.
7427 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7428 (buffer_xml_printf): Declare.
07e059b5 7429
4cab47ab
DE
74302008-11-24 Doug Evans <dje@google.com>
7431
7432 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7433
f142445f
DJ
74342008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7435
7436 * server.c (handle_v_run): Always use the supplied argument list.
7437
d0107bb6 74382008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7439
d0107bb6
BW
7440 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7441 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7442
2c4ad781
TJB
74432008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7444
7445 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7446 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7447 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7448 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7449 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7450 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7451 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7452 XML target descriptions.
7453 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7454 when inferior is running on an ISA 2.05 or later processor. Add
7455 special case to return offset for full 64-bit slot of FPSCR when
7456 in 32-bits.
7457
dfb64f85
DJ
74582008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7459
7460 * Makefile.in (SFILES, clean): Added sparc64 files.
7461 (reg-sparc64.o, reg-sparc64.c): New.
7462 * configure.srv (sparc*-*-linux*): New configuration.
7463 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7464 syscall arguments for SPARC.
7465 (regsets_store_inferior_registers): Likewise.
7466 * linux-sparc-low.c: New file.
7467
66b6e1dd
DE
74682008-10-21 Doug Evans <dje@google.com>
7469
7470 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7471 (READLINE_DIR,READLINE_DEP): Delete.
7472 (INTERNAL_CFLAGS): Update.
7473 (LINTFLAGS): Update.
7474
9b710a42
PA
74752008-10-10 Pedro Alves <pedro@codesourcery.com>
7476
7477 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7478 whole argv from the last run, not just argv[0].
7479
5822d809
PA
74802008-09-08 Pedro Alves <pedro@codesourcery.com>
7481
7482 * regcache.c (new_register_cache): Return NULL if the register
7483 cache size isn't known yet.
7484 (free_register_cache): Avoid dereferencing a NULL regcache.
7485
74aac56f
DJ
74862008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7487
7488 * configure.srv: Merge MIPS and MIPS64.
7489
400b20f5
MR
74902008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7491
7492 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7493
677c5bb1
LM
74942008-08-18 Luis Machado <luisgpm@br.ibm.com>
7495
7496 * Makefile.in: Add required vsx dependencies.
7497
7498 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7499 Declare init_registers_powerpc_vsx32l.
7500 Declare init_registers_powerpc_vsx64l.
7501 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7502 (ppc_arch_setup): Check for VSX in hwcap.
7503 (ppc_fill_vsxregset): New function.
7504 (ppc_store_vsxregset): New function.
7505 Add new VSX entry in regset_info target_regsets.
7506
7507 * configure.srv: Add new VSX dependencies.
7508
a6f3e723
SL
75092008-08-12 Pedro Alves <pedro@codesourcery.com>
7510
7511 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7512 (remote_open): Set or clear transport_is_reliable.
7513 (putpkt_binary): Don't expect acks in noack mode.
7514 (getpkt): Don't send ack/nac in noack mode.
7515 * server.c (handle_general_set): Handle QStartNoAckMode.
7516 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7517 qSupported.
7518 (main): Reset noack_mode on every connection.
7519 * server.h (noack_mode): Declare.
7520
a417dc56
RW
75212008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7522
7523 * Makefile.in (GDBREPLAY_OBS): New variable.
7524 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7525
3221518c
UW
75262008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7527 Daniel Jacobowitz <dan@codesourcery.com>
7528
7529 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7530 (usr_store_inferior_registers): Likewise.
7531 (regsets_store_inferior_registers): Likewise.
7532
ec56be1b
PA
75332008-07-31 Rolf Jansen <rj@surtec.com>
7534 Pedro Alves <pedro@codesourcery.com>
7535
7536 * configure.ac: Check for memmem declaration.
7537 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7538 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7539 (disable_packet_qfThreadInfo): Unconditionally compile.
7540 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7541 * configure, config.in: Regenerate.
7542
2fe5e3ff
DE
75432008-07-28 Doug Kwan <dougkwan@google.com>
7544
7545 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7546 (linux_write_memory): Remove declaration of errno.
7547
836acd6d
UW
75482008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7549
7550 * linux-low.c (handle_extended_wait): Do not use "status"
7551 variable uninitialized.
7552
aeba519e
PA
75532008-07-07 Pedro Alves <pedro@codesourcery.com>
7554
7555 * server.c (handle_v_attach): Inhibit reporting dll changes.
7556
db42f210
PA
75572008-06-27 Pedro Alves <pedro@codesourcery.com>
7558
7559 * remote-utils.c (prepare_resume_reply): If requested, don't
7560 output "thread:TID" in the T stop reply.
7561
7562 * server.c (disable_packet_vCont, disable_packet_Tthread)
7563 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7564 (handle_query): If requested, disable support for qC, qfThreadInfo
7565 and qsThreadInfo.
7566 (handle_v_requests): If requested, disable support for vCont.
7567 (gdbserver_show_disableable): New.
7568 (main): Handle --disable-packet and --disable-packet=LIST.
7569
7570 * server.h (disable_packet_vCont, disable_packet_Tthread)
7571 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7572
8e4c5421
CD
75732008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7574
7575 * server.c (gdbserver_usage): Mention --version.
7576
6e23a804
DJ
75772008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7578
7579 * Makefile.in (gdbreplay.o): New rule.
7580
90aa6a40
JM
75812008-06-06 Joseph Myers <joseph@codesourcery.com>
7582
7583 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7584 message, not gdbserver.
7585
c16158bc 75862008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
7587 Nathan Sidwell <nathan@codesourcery.com>
7588 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
7589
7590 * acinclude.m4: Include ../../config/acx.m4.
7591 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7592 * configure, config.in: Regenerate.
7593 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7594 * server.c (gdbserver_version): Print PKGVERSION.
7595 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7596 (main): Adjust gdbserver_usage calls.
7597 * gdbreplay.c (version, host_name): Add declarations.
7598 (gdbreplay_version, gdbreplay_usage): New.
7599 (main): Accept --version and --help options.
7600
aeb75bf5
DJ
76012008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7602
7603 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7604 (arm_breakpoint_at): Handle Thumb.
7605 (the_low_target): Add comment.
7606
76b233dd
UW
76072008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7608
7609 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7610
08388c79
DE
76112008-05-09 Doug Evans <dje@google.com>
7612
a3c83fae
DE
7613 * server.h (decode_search_memory_packet): Declare.
7614 * remote-utils.c (decode_search_memory_packet): New fn.
7615 * server.c (handle_search_memory_1): New fn.
08388c79
DE
7616 (handle_search_memory): New fn.
7617 (handle_query): Process qSearch:memory packets.
7618
bb9c3d36
UW
76192008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7620
7621 * regcache.c (registers_length): Remove.
7622 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7623 full register packet.
7624 * regcache.h (registers_length): Remove prototype.
7625 * server.h (PBUFSIZ): Define to 16384.
7626
7284e1be
UW
76272008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7628
7629 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7630 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7631 powerpc-64l.o, and powerpc-altivec64l.o.
7632 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7633 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7634 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7635 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7636 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7637 to srv_xmlfiles.
7638
7639 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7640 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7641 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7642 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7643 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7644 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7645 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7646 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7647 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7648 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7649 (clean): Update.
7650
7651 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7652 (init_registers_powerpc_32l): ... this new prototype.
7653 (init_registers_powerpc_32): Remove, replace by ...
7654 (init_registers_powerpc_altivec32l): ... this new prototype.
7655 (init_registers_powerpc_e500): Remove, replace by ...
7656 (init_registers_powerpc_e500l): ... this new prototype.
7657 (init_registers_ppc64): Remove, replace by ...
7658 (init_registers_powerpc_64l): ... this new prototype.
7659 (init_registers_powerpc_64): Remove, replace by ...
7660 (init_registers_powerpc_altivec64l): ... this new prototype.
7661 (ppc_num_regs): Set to 73.
7662 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7663 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7664 (ppc_cannot_store_register): Handle orig_r3 and trap.
7665 (ppc_arch_setup): Update init_registers_... calls.
7666 (ppc_fill_gregset): Handle orig_r3 and trap.
7667
7668 * inferiors.c (clear_inferiors): Reset current_inferior.
7669
fdc59709
PB
76702008-04-23 Paolo Bonzini <bonzini@gnu.org>
7671
889bf7c5
PA
7672 * acinclude.m4: Add override.m4.
7673 * configure: Regenerate.
fdc59709 7674
c9b2f845
UW
76752008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7676
7677 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7678 initial call to init_register_ppc64.
7679
550512b8
UW
76802008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7681
43aaf8b6
PA
7682 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7683 single powerpc*-*-linux* case.
550512b8
UW
7684 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7685
b6430ec3
UW
76862008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7687
7688 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 7689 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
7690 from reg_xmlfiles.
7691 * linux-ppc-low.c: Include <elf.h>.
7692 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7693 (ppc_hwcap): New global variable.
7694 (ppc_regmap): Remove __SPE__ #ifdef sections.
7695 (ppc_regmap_e500): New global variable.
7696 (ppc_cannot_store_register): Update __SPE__ special case.
7697 (ppc_get_hwcap): New function.
7698 (ppc_arch_setup): Use it to determine whether inferior supports
7699 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7700 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7701 Do not access registers if target does not support AltiVec.
7702 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7703 Do not access registers if target does not support SPE.
7704 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7705
52fa2412
UW
77062008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7707
7708 * linux-low.c (disabled_regsets, num_regsets): New.
7709 (use_regsets_p): Delete.
7710 (linux_wait_for_process): Clear disabled_regsets.
7711 (regsets_fetch_inferior_registers): Check and set it.
7712 (regsets_store_inferior_registers): Likewise.
7713 (linux_fetch_registers, linux_store_registers): Do not use
7714 use_regsets_p.
7715 (initialize_low): Allocate disabled_regsets.
7716
e28b3332
DJ
77172008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7718
7719 * Makefile.in (LIBOBJS): New.
7720 (OBS): Use LIBOBJS.
7721 (memmem.o): New rule.
7722 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7723 * configure: Regenerated.
7724
4536995d
UW
77252008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7726
7727 * server.c (handle_query): Never return "unsupported" for
7728 qXfer:features:read queries.
7729
221c031f
UW
77302008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7731
7732 * server.c (get_features_xml): Fix inverted condition.
7733 (handle_query): Always support qXfer:feature:read.
7734
ccd213ac
DJ
77352008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7736
7737 * server.c (wrapper_argv): New.
7738 (start_inferior): Handle wrapper_argv. If set, expect an extra
7739 trap.
7740 (gdbserver_usage): Document --wrapper.
7741 (main): Parse --wrapper.
7742
6fe305f7
UW
77432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7744
7745 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7746 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7747 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7748 (ppc_set_pc): Likewise.
7749 (ppc_arch_setup): New function.
7750 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7751 of collect_register.
889bf7c5 7752 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 7753
5b0a002e
UW
77542008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7755
7756 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7757 instead of linux-ppc64-low.o.
7758 * linux-ppc64-low.c: Remove file.
7759 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7760 (linux-ppc64-low.o): Remove rule.
7761
7762 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7763 (init_registers_powerpc_64): Likewise.
7764 (ppc_regmap): Conditionally define depending on __powerpc64__.
7765 (ppc_cannot_store_register): Do not special-case "fpscr" when
7766 compiled on __powerpc64__.
7767 (ppc_collect_ptrace_register): New function.
7768 (ppc_supply_ptrace_register): New function.
7769 (ppc_breakpoint): Change type to "unsigned int".
7770 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7771 (the_low_target): Conditionally provide initializers for the
889bf7c5 7772 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
7773 collect_ptrace_register and supply_ptrace_register members.
7774
9b4b61c8
UW
77752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7776
7777 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7778 * server.c (gdbserver_xmltarget): Define.
7779 (get_features_xml): Use it to replace "target.xml" and arch_string.
7780
7781 * configure.srv: Remove srv_xmltarget. Add XML files that were
7782 mentioned there to srv_xmlfiles instead. Remove conditional tests
7783 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7784 srv_xmlfiles and srv_regobj to include all possible choices.
7785 * configure.ac (srv_xmltarget): Remove.
7786 (srv_xmlfiles): Do not add "target.xml".
7787 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7788 checks for supplementary target information.
7789 * configure: Regenerate.
7790 * Makefile.in (XML_TARGET): Remove.
7791 (target.xml): Remove rule.
7792 (clean): Do not clean up target.xml.
7793 (.PRECIOUS): Do not mention target.xml.
7794
7795 * target.h (struct target_ops): Remove arch_string member.
7796 * linux-low.c (linux_arch_string): Remove.
7797 (linux_target_ops): Remove arch_string initializer.
7798 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7799 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7800 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7801 * spu-low.c (spu_arch_string): Remove.
7802 (spu_target_ops): Remove arch_string initializer.
7803 * win32-low.c (win32_arch_string): Remove.
7804 (win32_target_ops): Remove arch_string initializer.
7805 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7806 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7807 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7808
ee1a7ae4
UW
78092008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7810
7811 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7812 by collect_ptrace_register and supply_ptrace_register hooks.
7813 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7814 instead of checking for the_low_target.left_pad_xfer.
7815 (usr_store_inferior_registers): Use collect_ptrace_register callback
7816 instead of checking for the_low_target.left_pad_xfer.
7817
7818 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7819 (s390_supply_ptrace_register): Likewise.
7820 (s390_fill_gregset): Call s390_collect_ptrace_register.
7821 (the_low_target): Update.
7822
7823 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7824 (ppc_supply_ptrace_register): Likewise.
7825 (the_low_target): Update.
7826
7827 * linux-i386-low.c (the_low_target): Update.
7828 * linux-x86-64-low.c (the_low_target): Update.
7829
d61ddec4
UW
78302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7831
7832 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7833 reg-s390.o and reg-s390x.o.
7834
7835 * linux-low.c (new_inferior): New global variable.
7836 (linux_create_inferior, linux_attach): Set it.
7837 (linux_wait_for_process): Call the_low_target.arch_setup after the
7838 target has stopped for the first time.
7839 (initialize_low): Do not call the_low_target.arch_setup.
7840
7841 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7842 (s390_set_pc): Likewise.
7843 (s390_arch_setup): New function.
7844 (the_low_target): Use s390_arch_setup as arch_setup routine.
7845
7846 * regcache.c (realloc_register_cache): New function.
7847 (set_register_cache): Call it for each existing regcache.
7848
d05b4ac3
UW
78492008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7850
7851 * server.h (init_registers): Remove prototype.
7852
7853 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7854 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7855 instead of init_registers ().
7856 * linux-arm-low.c (init_registers_arm): Add prototype.
7857 (init_registers_arm_with_iwmmxt): Likewise.
7858 (the_low_target): Add initializer for arch_setup field.
7859 * linux-cris-low.c (init_registers_cris): Add prototype.
7860 (the_low_target): Add initializer for arch_setup field.
7861 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7862 (the_low_target): Add initializer for arch_setup field.
7863 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7864 (the_low_target): Add initializer for arch_setup field.
7865 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7866 (the_low_target): Add initializer for arch_setup field.
7867 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7868 (the_low_target): Add initializer for arch_setup field.
7869 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7870 (the_low_target): Add initializer for arch_setup field.
7871 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7872 (init_registers_mips64_linux): Likewise.
7873 (the_low_target): Add initializer for arch_setup field.
7874 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7875 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7876 (the_low_target): Add initializer for arch_setup field.
7877 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7878 (init_registers_powerpc_64): Likewise.
7879 (the_low_target): Add initializer for arch_setup field.
7880 * linux-s390-low.c (init_registers_s390): Add prototype.
7881 (init_registers_s390x): Likewise.
7882 (the_low_target): Add initializer for arch_setup field.
7883 * linux-sh-low.c (init_registers_sh): Add prototype.
7884 (the_low_target): Add initializer for arch_setup field.
7885 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7886 (the_low_target): Add initializer for arch_setup field.
7887 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7888 (the_low_target): Add initializer for arch_setup field.
7889
7890 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7891 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7892 instead of init_registers ().
7893 * win32-arm-low.c (init_registers_arm): Add prototype.
7894 (the_low_target): Add initializer for arch_setup field.
7895 * win32-i386-low.c (init_registers_i386): Add prototype.
7896 (the_low_target): Add initializer for arch_setup field.
7897
7898 * spu-low.c (init_registers_spu): Add prototype.
7899 (initialize_low): Call initialie_registers_spu () instead of
7900 initialize_registers ().
7901
fd96d250
PA
79022008-02-19 Pedro Alves <pedro@codesourcery.com>
7903
7904 * server.c (handle_v_requests): When handling the vRun and vAttach
7905 packets, if already debugging a process, don't kill it. Return an
7906 error instead.
7907
d41b6bb4
DJ
79082008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7909
7910 * server.c (handle_query): Correct length check.
7911
5ac588cf
PA
79122008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7913
7914 * win32-low.c (do_initial_child_stuff): Add process handle
7915 parameter. Set current_process_handle and current_process_id from the
7916 parameters. Clear globals.
7917 (win32_create_inferior): Don't set current_process_handle and
7918 current_process_id here. Instead pass them on the call to
7919 do_initial_child_stuff.
7920 (win32_attach): Likewise.
7921 (win32_clear_inferiors): New.
7922 (win32_kill): Don't close the current process handle or the
7923 current thread handle here. Instead call win32_clear_inferiors.
7924 (win32_detach): Don't open a new handle to the process. Call
7925 win32_clear_inferiors.
7926 (win32_join): Don't rely on current_process_handle; open a new
7927 handle using the process id.
7928 (win32_wait): Call win32_clear_inferiors when the inferior process
7929 has exited.
7930
ecd7ecbc
DJ
79312008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7932
7933 * server.c (monitor_show_help): Add "exit".
7934
1525d545
MG
79352008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7936
ecd7ecbc 7937 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
7938 (clean): Add reg-xtensa.c.
7939 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
7940 * configure.srv (xtensa*-*-linux*) New target.
7941 * linux-xtensa-low.c: New.
7942 * xtensa-xtregs.c: New.
1525d545 7943
59a016f0
PA
79442008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7945
7946 * hostio.c: Don't include errno.h.
7947 (errno_to_fileio_errno): Move to hostio-errno.
7948 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7949 error number outputting to the target->hostio_last_error callback.
7950 (hostio_packet_error): Use FILEIO_EINVAL directly.
7951 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7952 calls to hostio_error.
7953 * hostio-errno.c: New.
7954 * server.h (hostio_last_error_from_errno): Declare.
7955 * target.h (target_ops): Add hostio_last_error member.
7956 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7957 as hostio_last_error handler.
889bf7c5 7958 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
7959 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7960 (wince_hostio_last_error): New functions.
7961 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7962 as hostio_last_error handler.
7963 (win32_target_ops) [!_WIN32_WCE]: Register
7964 hostio_last_error_from_errno as hostio_last_error handler.
7965 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7966 (hostio-errno.o): New rule.
7967 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7968 * configure.srv (srv_hostio_err_objs): New variable. Default to
7969 hostio-errno.o.
7970 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7971 * configure: Regenerate.
7972
2d717e4f
DJ
79732008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7974
7975 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7976 (linux_kill, linux_detach): Clean up the process list.
7977 * remote-utils.c (remote_open): Improve port number parsing.
7978 (putpkt_binary, input_interrupt): Only send interrupts if the target
7979 is running.
7980 * server.c (extended_protocol): Make static.
7981 (attached): Define earlier.
7982 (exit_requested, response_needed, program_argv): New variables.
7983 (target_running): New.
7984 (start_inferior): Clear attached here.
7985 (attach_inferior): Set attached here.
7986 (require_running): Define.
7987 (handle_query): Use require_running and target_running. Implement
7988 "monitor exit".
7989 (handle_v_attach, handle_v_run): New.
7990 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7991 (gdbserver_usage): Update.
7992 (main): Redo argument parsing. Handle --debug and --multi. Handle
7993 --attach along with other options or after the port. Save
7994 program_argv. Support no initial program. Resynchronize
7995 communication with GDB after an error. Handle "monitor exit".
7996 Use require_running and target_running. Always allow the extended
7997 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7998 restart in extended mode.
7999 * README: Refer to the GDB manual. Update --attach usage.
8000
7407e2de
AS
80012007-12-20 Andreas Schwab <schwab@suse.de>
8002
8003 * linux-low.c (STACK_SIZE): Define.
8004 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8005 (linux_test_for_tracefork): Likewise.
8006
b65d95c5
DJ
80072007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8008
8009 * linux-low.c (linux_wait_for_event): Update messages. Do not
8010 reinsert auto-delete breakpoints.
8011 * mem-break.c (struct breakpoint): Change return type of handler to
8012 int.
8013 (set_breakpoint_at): Update handler type.
8014 (reinsert_breakpoint_handler): Return 1 instead of calling
8015 delete_breakpoint.
8016 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8017 setting a new one.
8018 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8019 * mem-break.h (set_breakpoint_at): Update handler type.
8020 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8021 * win32-low.c (auto_delete_breakpoint): New.
8022 (get_child_debug_event): Use it.
8023
4e799345
DJ
80242007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8025
8026 * configure.ac: Check for pread and pwrite.
8027 * hostio.c (handle_pread): Fall back to lseek and read.
8028 (handle_pwrite): Fall back to lseek and write.
8029 * config.in, configure: Regenerated.
8030
27524b67
DJ
80312007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8032
8033 * server.c (myresume): Add own_buf argument.
8034 (main): Update calls.
8035
a20d5e98
DJ
80362007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8037
8038 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8039 * remote-utils.c (remote_open): Do not call disable_async_io.
8040 (block_async_io): Delete.
8041 (unblock_async_io): Make static.
8042 (initialize_async_io): New.
8043 * server.c (handle_v_cont): Handle async I/O here.
8044 (myresume): Likewise. Move other common resume tasks here...
8045 (main): ... from here. Call initialize_async_io. Disable async
8046 I/O before the main loop.
8047 * server.h (initialize_async_io): Declare.
8048 (block_async_io, unblock_async_io): Delete prototypes.
8049 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8050
b79d787e
DJ
80512007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8052
8053 * remote-utils.c (readchar): Allow binary data in received messages.
8054
d97903b2
PA
80552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8056
8057 * win32-low.c (attaching): New global.
8058 (win32_create_inferior): Clear the `attaching' global.
8059 (win32_attach): Set the `attaching' global.
8060 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8061 attaching. Only set a breakpoint at the entry point if not
8062 attaching.
8063
311de423
PA
80642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8065
8066 * server.c (main): Don't report dll events on the initial
8067 connection on attaches.
8068
6c2d16d2
PA
80692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8070
8071 * server.c (main): Relax numerical bases supported for the pid of
8072 the --attach command line argument.
8073
5ca906e6
PA
80742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8075
8076 * win32-low.c (win32_attach): Call OpenProcess before
8077 DebugActiveProcess, not after. Add last error output to error
8078 call.
8079
9c6c8194
PA
80802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8081
8082 * win32-low.c (win32_get_thread_context)
8083 (win32_set_thread_context): New functions.
8084 (thread_rec): Use win32_get_thread_context.
8085 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8086 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8087 field.
8088
4d5d1aaa
PA
80892007-12-03 Leo Zayas
8090 Pedro Alves <pedro_alves@portugalmail.pt>
8091
8092 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8093 global variables.
8094 (child_add_thread): Minor cleanup.
8095 (child_continue): Resume artificially suspended threads before
8096 calling ContinueDebugEvent.
8097 (suspend_one_thread): New.
8098 (fake_breakpoint_event): New.
8099 (get_child_debug_event): Change return type to int. Check here if
8100 gdb sent an interrupt request. If a soft interrupt was requested,
8101 fake a breakpoint event. Return 0 if there is no event to handle,
8102 and 1 otherwise.
8103 (win32_wait): Don't check here if gdb sent an interrupt request.
8104 Ensure there is a valid event to handle.
8105 (win32_request_interrupt): Add soft interruption method as last
8106 resort.
8107
c436e841
PA
81082007-12-03 Leo Zayas
8109 Pedro Alves <pedro_alves@portugalmail.pt>
8110
8111 * win32-low.h (win32_thread_info): Add descriptions to the
8112 structure members. Replace `suspend_count' counter by a
8113 `suspended' flag.
8114 * win32-low.c (thread_rec): Update condition of when to get the
8115 context from the inferior. Rely on ContextFlags being set if it
8116 has already been retrieved. Only suspend the inferior thread if
8117 we haven't already. Warn if that fails.
8118 (continue_one_thread): s/suspend_count/suspended/. Only call
8119 ResumeThread once. Warn if that fails.
8120
e7b5fa67
PA
81212007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8122
8123 * win32-low.c (win32_wait): Don't read from the inferior when it
8124 has already exited.
8125
a385171d
PA
81262007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8127
8128 * Makefile.in (win32_low_h): New variable.
8129 (win32-low.o): Add dependency on $(win32_low_h).
8130 (win32-arm-low.o, win32-i386-low.o): New rules.
8131
f80c84b3
DJ
81322007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8133
8134 * hostio.c: Correct copyright year.
8135
a6b151f1
DJ
81362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8137
8138 * Makefile.in (OBS): Add hostio.o.
8139 (hostio.o): New rule.
8140 * server.h (handle_vFile): Declare.
8141 * hostio.c: New file.
8142 * server.c (handle_v_requests): Take packet_len and new_packet_len
8143 for binary packets. Call handle_vFile.
8144 (main): Update call to handle_v_requests.
8145
f9387fc3
DJ
81462007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8147
8148 * linux-low.c: Include <sched.h>.
8149
51c2684e
DJ
81502007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8151
8152 * linux-low.c (linux_tracefork_grandchild): New.
8153 (linux_tracefork_child): Use clone.
8154 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8155
75f83163
JB
81562007-10-31 Joel Brobecker <brobecker@adacore.com>
8157
8158 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8159
da5898ce
DJ
81602007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8161
8162 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8163
24a09b5f
DJ
81642007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8165
8166 * inferiors.c (change_inferior_id): Delete.
8167 (add_pid_to_list, pull_pid_from_list): New.
8168 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8169 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8170 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8171 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8172 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8173 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8174 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8175 (using_threads): Always set to 1.
8176 (handle_extended_wait): New.
8177 (add_process): Do not set TID.
8178 (linux_create_inferior): Set must_set_ptrace_flags.
8179 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8180 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8181 (linux_thread_alive): Rename TID argument to LWPID.
8182 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8183 (linux_wait_for_event): Do not use TID or check using_threads. Update
8184 call to dead_thread_notify. Call handle_extended_wait.
8185 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8186 (send_sigstop): Delete sigstop_sent.
8187 (wait_for_sigstop): Avoid TID.
8188 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8189 (linux_test_for_tracefork): New.
8190 (linux_lookup_signals): Use thread_db_active and
8191 linux_supports_tracefork_flag.
8192 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8193 * linux-low.h (get_process_thread): Avoid TID.
8194 (struct process_ifo): Move thread_known and tid to the end. Remove
8195 sigstop_sent.
8196 (linux_attach_lwp, thread_db_init): Update prototypes.
8197 * server.h (change_inferior_id): Delete prototype.
8198 (add_pid_to_list, pull_pid_from_list): New prototypes.
8199 * thread-db.c (thread_db_use_events): New.
8200 (find_first_thread): Rename to...
8201 (find_one_thread): ...this. Update callers and messages. Do not
8202 call fatal. Check thread_db_use_events. Do not call
8203 change_inferior_id or new_thread_notify.
8204 (maybe_attach_thread): Update. Do not call new_thread_notify.
8205 (thread_db_init): Set thread_db_use_events. Check use_events.
8206 * utils.c (fatal, warning): Correct message prefix.
8207
30ed0a8f
DJ
82082007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8209
8210 * Makefile.in (clean): Remove new files.
8211 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8212 (powerpc-64.o, powerpc-64.c): New rules.
8213 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8214 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8215 with SPE.
8216 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8217 SPE targets.
8218 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8219 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8220 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8221 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8222 (target_regsets): Add AltiVec and SPE register sets.
8223 * configure.ac: Check for AltiVec and SPE.
8224 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8225 (ppc_fill_vrregset, ppc_store_vrregset): New.
8226 (target_regsets): Add AltiVec register set.
8227 * configure: Regenerated.
8228
fd462a61
DJ
82292007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8230
8231 * linux-low.c (O_LARGEFILE): Define.
8232 (linux_read_memory): Use /proc/PID/mem.
8233 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8234 * configure, config.in: Regenerated.
8235
69f223ed
DJ
82362007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8237
8238 * linux-low.c (linux_wait_for_event): Do not pass signals while
8239 single-stepping.
8240
aec18585
PA
82412007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8242
8243 * win32-low.c (create_process): New.
8244 (win32_create_inferior): Use create_process instead of
8245 CreateProcess. If create_process failed retry appending an ".exe"
8246 suffix. Store the GetLastError result immediatelly after
8247 create_process calls and use it on the call to error.
8248
34d86ddd
PA
82492007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8250
8251 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8252
5a0e3bd0
JB
82532007-08-23 Joel Brobecker <brobecker@adacore.com>
8254
8255 * configure.ac: Switch license to GPLv3.
8256
f88c79e6
MS
82572007-08-01 Michael Snyder <msnyder@access-company.com>
8258
8259 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8260
6b3d9b83
PA
82612007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8262
8263 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8264 typedef.
8265 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8266 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8267 CloseToolhelp32Snapshot.
8268 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8269 CloseToolhelp32Snapshot.
8270
c588c53c
MS
82712007-07-27 Michael Snyder <michael.snyder@access-company.com>
8272
8273 * server.c (main): Check for inferior exit before main loop.
8274
aa0403d9
PA
82752007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8276
8277 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8278 instead of on tmp_desc.
8279
255e7678
DJ
82802007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8281 Daniel Jacobowitz <dan@codesourcery.com>
8282
8283 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8284 (add_thread): Minor cleanups.
8285 (clear_inferiors): Move lower in the file. Clear the DLL
8286 list.
8287 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8288 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8289 (xml_escape_text): New.
8290 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8291 for qSupported.
8292 (handle_v_cont): Report errors.
8293 (gdbserver_version): Update.
8294 (main): Correct size of own_buf. Do not report initial DLL events.
8295 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8296 (unloaded_dll, xml_escape_text): New.
8297 * win32-low.c (enum target_waitkind): Update comments.
8298 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8299 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8300 (win32_EnumProcessModules, win32_GetModuleInformation)
8301 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8302 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8303 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8304 (win32_Module32First, win32_Module32Next, load_toolhelp)
8305 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8306 (get_child_debug_event): Handle DLL events.
8307 (win32_wait): Likewise.
8308
0d37add9
DJ
83092007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8310
8311 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8312 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8313
45e2715e
PA
83142007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8315
8316 * win32-low.c (handle_output_debug_string): Ignore event if not
8317 waiting.
8318
c5674cf1
PA
83192007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8320
8321 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8322
2bbe3cc1
DJ
83232007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8324
8325 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8326
ae13219e
DJ
83272007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8328
8329 * inferiors.c (change_inferior_id): Add comment.
8330 * linux-low.c (check_removed_breakpoint): Add an early
8331 prototype. Improve debug output.
8332 (linux_attach): Doc update.
8333 (linux_detach_one_process, linux_detach): Clean up before releasing
8334 each process.
8335 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8336 * linux-low.h (struct process_info): Doc improvement.
8337 * mem-break.c (delete_all_breakpoints): New.
8338 * mem-break.h (delete_all_breakpoints): New prototype.
8339 * thread-db.c (find_first_thread): New.
8340 (thread_db_create_event): Call it instead of
8341 thread_db_find_new_threads. Clean up unused variables.
8342 (maybe_attach_thread): Remove first thread handling.
8343 (thread_db_find_new_threads): Use find_first_thread.
8344 (thread_db_get_tls_address): Likewise.
8345
4105de34
DJ
83462007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8347
8348 * thread-db.c (thread_db_find_new_threads): Add prototype.
8349 (thread_db_create_event): Check for the main thread before adding
8350 a new thread.
8351 (maybe_attach_thread): Only enable event reporting if TID == 0.
8352 (thread_db_get_tls_address): Check for new threads.
8353
2b876972
DJ
83542007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8355
8356 * linux-low.c (linux_create_inferior): Try execv before execvp.
8357 * spu-low.c (spu_create_inferior): Likewise.
8358
7a245884
DJ
83592007-06-13 Mike Frysinger <vapier@gentoo.org>
8360
8361 * linux-low.c (linux_create_inferior): Change execv to execvp.
8362 * spu-low.c (spu_create_inferior): Likewies.
8363
117ce543
DJ
83642007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8365
8366 * Makefile.in (clean): Clean new files instead of deleted ones.
8367 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8368 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8369 rules.
8370 * configure.srv: Specify XML files and new regformats for MIPS and
8371 MIPS64 GNU/Linux.
8372 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8373 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8374 an entry for the restart register.
8375 (mips_cannot_fetch_register, mips_cannot_store_register)
8376 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8377 register names to match the XML descriptions.
8378 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8379 restart register instead of $0.
8380
0e7f50da
UW
83812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8382 Markus Deuling <deuling@de.ibm.com>
8383
8384 * remote-utils.c (decode_xfer_write): New function.
8385 * server.h (decode_xfer_write): Add prototype.
8386 * server.c (handle_query): Add PACKET_LEN argument. Support
8387 qXfer:spu:read and qXfer:spu:write packets.
8388 (main): Pass packet_len to handle_query.
8389 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8390 * target.h (target_ops): Add qxfer_spu.
8391
374c1d38
UW
83922007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8393
8394 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8395 accessing non-seekable spufs files.
8396
bb63802a
UW
83972007-05-16 Markus Deuling <deuling@de.ibm.com>
8398
889bf7c5 8399 * server.c (handle_query): Add reply for qC packet.
bb63802a 8400
7390519e
PA
84012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8402 Leo Zayas <lerele@champenstudios@com>
8403
8404 * server.h (check_remote_input_interrupt_request): New function.
8405 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8406 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8407 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8408 (check_remote_input_interrupt_request): New function.
8409 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8410 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8411 winapi_GenerateConsoleCtrlEvent): New typedefs.
8412 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8413 to 250 ms.
8414 (win32_wait): Check for remote interrupt request
8415 with check_remote_input_interrupt_request.
8416 (win32_request_interrupt): New function.
8417 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8418
34b34921
PA
84192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8420
8421 * win32-low.c (debug_registers_changed,
8422 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8423 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8424 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8425 (thread_rec): Get context using the low target.
8426 (child_add_thread): Call thread_added on the low target,
8427 which does the same thing.
8428 (regptr): Delete.
8429 (do_initial_child_stuff): Remove debug registers references.
8430 Set context using the low target. Resume threads after
8431 setting the contexts.
8432 (child_continue): Remove dead variable. Remove debug
8433 registers references.
8434 (child_fetch_inferior_registers): Go through the low target.
8435 (do_child_store_inferior_registers): Remove.
8436 (child_store_inferior_registers): Go through the low target.
8437 (win32_resume): Remove debug registers references.
8438 Set context using the low target.
8439 (handle_exception): Change return type to void. Don't record
8440 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8441 first chance exception.
889bf7c5 8442 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8443 goto loop. Always return after waiting for debug event.
8444 (win32_wait): Convert to switch statement. Handle spurious
8445 events.
8446
8447 * win32-i386-low.c (debug_registers_changed,
8448 debug_registers_used): New.
8449 (initial_stuff): Rename to ...
8450 (i386_initial_stuff): ... this. Clear debug registers
8451 state variables.
8452 (store_debug_registers): Delete.
8453 (i386_get_thread_context): New.
8454 (load_debug_registers): Delete.
8455 (i386_set_thread_context): New.
8456 (i386_thread_added): New.
8457 (single_step): Rename to ...
8458 (i386_single_step): ... this.
8459 (do_fetch_inferior_registers): Rename to ...
8460 (i386_fetch_inferior_register): ... this.
8461 (i386_store_inferior_register): New.
8462 (the_low_target): Adapt to new interface.
8463
8464 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8465 (arm_get_thread_context): New.
8466 (arm_set_thread_context): New.
8467 (regptr): New.
8468 (do_fetch_inferior_registers): Rename to ...
8469 (arm_fetch_inferior_register): ... this.
8470 (arm_store_inferior_register): New.
8471 (arm_wince_breakpoint): Reimplement as unsigned long.
8472 (arm_wince_breakpoint_len): Define.
8473 (the_low_target): Adapt to new interface.
8474
8475 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8476 load_debug_registers. Add get_thread_context, set_thread_context,
8477 thread_added and store_inferior_register. Rename
8478 fetch_inferior_registers to fetch_inferior_register.
8479 (regptr): Remove declaration.
8480
dd6953e1
PA
84812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8482
8483 * linux-low.c (linux_detach): Change return type to int. Return 0.
8484 * spu-low.c (spu_detach): Likewise.
8485
444d6139
PA
84862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8487
8488 * target.h (target_ops): Change return type of detach to int.
8489 Add join.
8490 (join_inferior): New.
8491 * server.c (main): Don't skip detach support on mingw32.
8492 If the inferior doesn't support detaching return error.
8493 Call join_inferior instead of using waitpid.
8494 * linux-low.c (linux_join): New.
8495 (linux_target_op): Add linux_join.
8496 * spu-low.c (spu_join): New.
8497 (spu_target_ops): Add spu_join.
8498 * win32-low.c (win32_detach): Adapt to new interface.
8499 Reopen current_process_handle before detaching. Issue a child
8500 resume before detaching.
8501 (win32_join): New.
8502 (win32_target_op): Add win32_join.
8503
1d5315fe
PA
85042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8505
8506 * win32-low.c (win32-attach): Fix return value.
8507 * target.h (target_ops): Describe ATTACH return values.
8508
bf914831
PA
85092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8510
8511 * win32-low.c (GETPROCADDRESS): Define.
8512 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8513 (winapi_DebugSetProcessKillOnExit): Likewise.
8514 (win32_create_inferior): Force usage of ansi CreateProcessA.
8515 (win32_attach): Use GETPROCADDRESS.
8516 (win32_detach): Likewise.
8517
f72f3e60
PA
85182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8519
8520 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8521
ed50f18f
PA
85222007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8523
8524 * win32-low.c: Commit leftover changes from 2007-03-29.
8525
0c2ead7e
DJ
85262007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8527
8528 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8529 fields short instead of int. Add explicit padding.
8530 (i387_cache_to_fsave): Remove unnecessary casts.
8531 (i387_fsave_to_cache): Doc fix.
8532 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8533
73725ff3
DJ
85342007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8535
8536 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8537 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8538
d99f33d8
PA
85392007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8540
8541 * configure.srv (arm*-*-mingw32ce*): Move near the other
8542 arm targets.
8543
68070c10
PA
85442007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8545
2482afc6 8546 * configure.ac: Add errno checking.
68070c10
PA
8547 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8548 sys/file.h and malloc.h.
8549 (AC_CHECK_DECLS): Add perror.
8550 (srv_mingwce): Handle.
2482afc6 8551 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
8552 win32-i386-low.o to srv_tgtobj.
8553 (i[34567]86-*-mingw*): Likewise.
8554 (arm*-*-mingw32ce*): Add case.
8555 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8556 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8557 [__MINGW32CE__] (strerror): New function.
8558 [__MINGW32CE__] (errno): Define to GetLastError.
8559 [__MINGW32CE__] (COUNTOF): New macro.
8560 (remote_open): Remove extra close call.
8561 * mem-break.c (delete_breakpoint_at): New function.
8562 * mem-break.h (delete_breakpoint_at): Declare.
8563 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8564 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8565 [USE_WIN32API] (read, write): Add char* casts.
8566 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8567 * server.h: Include wincecompat.h on Windows CE.
8568 [HAVE_ERRNO_H]: Check.
8569 (perror): Declare if not declared.
8570 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8571 (perror_with_name): Remove errno declaration.
8572 * wincecompat.h: New.
8573 * wincecompat.c: New.
8574 * win32-low.h: New.
8575 * win32-arm-low.c: New.
8576 * win32-i386-low.c: New.
8577 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8578 (OUTMSG2): Make it safe.
8579 (_T): New macro.
8580 (COUNTOF): New macro.
8581 (NUM_REGS): Get it from the low target.
8582 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8583 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8584 (thread_rec): Let low target handle debug registers.
8585 (child_add_thread): Likewise.
8586 (child_init_thread_list): Likewise.
8587 (continue_one_thread): Likewise.
8588 (regptr): New.
8589 (do_child_fetch_inferior_registers): Move to ...
8590 * win32-i386-low.c: ... here, and rename to ...
8591 (do_fetch_inferior_registers): ... this.
889bf7c5 8592 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
8593 Go through the low target.
8594 (do_child_store_inferior_registers): Use regptr.
8595 (strwinerror): New function.
8596 (win32_create_inferior): Handle Windows CE.
8597 Use strwinerror instead of strerror on Windows error
8598 codes. Add program to the error output.
8599 Don't close the main thread handle on Windows CE.
8600 (win32_attach): Use coredll.dll on Windows CE.
8601 (win32_kill): Close current process and current
8602 thread handles.
8603 (win32_detach): Use coredll.dll on Windows CE.
8604 (win32_resume): Let low target handle debug registers, and
8605 step request.
8606 (handle_exception): Add/Remove initial breakpoint. Avoid
8607 non-existant WSTOPSIG on Windows CE.
8608 (win32_read_inferior_memory): Cast to remove warning.
8609 (win32_arch_string): Go through the low target.
8610 (initialize_low): Call set_breakpoint_data with the low
8611 target's breakpoint.
8612 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8613 FOP_REGNUM, mappings): Move to ...
8614 * win32-i386-low.c: ... here.
8615 * win32-low.c (win32_thread_info): Move to ...
8616 * win32-low.h: ... here.
8617 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8618 win32-arm-low.c and wincecompat.c.
8619 (all:): Add $EXEEXT.
8620 (install-only:): Likewise.
8621 (gdbserver:): Likewise.
8622 (gdbreplay:): Likewise.
8623 * config.in: Regenerate.
8624 * configure: Regenerate.
8625
41093d81
PA
86262007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8627
8628 * win32-low.c: Rename typedef thread_info to
8629 win32_thread_info throughout.
8630
544afa54
PA
86312007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8632
8633 * win32-i386-low.c: Rename to ...
8634 * win32-low.c: ... this.
8635 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8636 * Makefile.in: Likewise.
8637
bce7165d
PA
86382007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8639
8640 * remote-utils.c (monitor_output): Constify msg parameter.
8641 * server.h (monitor_output): Likewise.
8642 * win32-i386-low.c (handle_output_debug_string): New.
8643 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8644 handle_output_debug_string.
8645 (get_child_debug_event): Likewise.
8646
506c7aa0
DJ
86472007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8648
8649 * server.c (main): Correct strtoul check.
8650
42c81e2a
DJ
86512007-03-27 Jon Ringle <jon@ringle.org>
8652
8653 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8654
9453113a
DJ
86552007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8656
8657 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8658
64a69107
DJ
86592007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8660
8661 * terminal.h: Check HAVE_SGTTY_H.
8662
86632007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
8664
8665 * remote-utils.c (remote_open): Print out the assigned port number.
8666
c74d0ad8
DJ
86672007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8668
8669 * remote-utils.c (monitor_output): New function.
8670 * server.c (debug_threads): Define here.
8671 (monitor_show_help): New function.
8672 (handle_query): Handle qRcmd.
8673 (main): Do not handle 'd' packet.
8674 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8675 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8676 of debug_threads.
8677
de7c3b4a
PA
86782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8679
8680 * Makefile.in (EXEEXT): New.
8681 (clean): Use $(EXEEXT).
8682
ef57601b
PA
86832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8684
8685 * target.h (target_ops): Rename send_signal to request_interrupt,
8686 and remove enum target_signal parameter.
8687 * linux-low.c (linux_request_interrupt): Rename from
8688 linux_send_signal, and always send SIGINT.
8689 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8690 and always send SIGINT.
8691 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8692 of send_signal.
8693 (input_interrupt): Likewise.
8694
820f2bda
PA
86952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8696
8697 * server.c (get_features_xml): Check if target implemented
8698 arch_string.
8699 * win32-i386-low.c (win32_arch_string): New.
8700 (win32_target_ops): Add win32_arch_string as arch_string member.
8701
ab39bf24
UW
87022007-02-22 Markus Deuling <deuling@de.ibm.com>
8703
8704 * spu-low.c (spu_arch_string): New.
8705 (spu_target_ops): Add spu_arch_string.
8706
61ff6e04
DJ
87072007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8708
8709 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8710 * configure.ac: Do not check for terminal.h.
8711 * configure, config.in: Regenerated.
8712
fb1e4ffc
DJ
87132007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8714
8715 * Makefile.in (OBS): Add $(XML_BUILTIN).
8716 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8717 (clean): Update.
8718 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8719 (arm-with-iwmmxt.c): New.
8720 * config.in, configure: Regenerate.
8721 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8722 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8723 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8724 (arm*-*-linux*): Add iWMMXt and regset support.
8725 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8726 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8727 (arm_store_wmmxregset, target_regsets): New.
8728 * server.c (get_features_xml): Take annex argument. Check builtin
8729 XML documents.
8730 (handle_query): Handle multiple annexes.
8731
0f48aa01
DJ
87322007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8733
8734 * remote-utils.c [USE_WIN32API] (read, write): Define.
8735 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8736 write.
8737
23181151
DJ
87382007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8739
8740 * linux-i386-low.c (the_low_target): Set arch_string.
8741 * linux-x86-64-low.c (the_low_target): Likewise.
8742 * linux-low.c (linux_arch_string): New.
8743 (linux_target_ops): Add it.
8744 * linux-low.h (struct linux_target_ops): Add arch_string.
8745 * server.c (write_qxfer_response): Use const void * for DATA.
8746 (get_features_xml): New.
8747 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8748 * target.h (struct target_ops): Add arch_string method.
8749
9d606399
DJ
87502007-01-03 Denis Pilat <denis.pilat@st.com>
8751 Daniel Jacobowitz <dan@codesourcery.com>
8752
8753 * linux-low.c (linux_kill): Handle being called with no threads.
8754 * win32-i386-low.c (win32_kill): Likewise.
8755 (get_child_debug_event): Clear current_process_handle.
8756
87572006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
8758 Daniel Jacobowitz <dan@codesourcery.com>
8759
8760 * remote-utils.c (remote_open): Check the type of specified
8761 serial port devices before opening them.
8762 * server.c (main): Kill the inferior if an error occurs during
8763 the first remote_open.
8764
a5e13d24
DJ
87652006-12-05 Markus Deuling <deuling@de.ibm.com>
8766
8767 * README: Update supported targets.
8768
186947f7
DJ
87692006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8770
8771 * Makefile.in (clean): Remove reg-mips64.c.
8772 (reg-mips64.c, reg-mips64.o): New rules.
8773 * configure.srv: Handle mips64. Include regset support for mips.
8774 * linux-mips-low.c (union mips_register): New.
8775 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8776 (mips_breakpoint, mips_breakpoint_at): Use int.
8777 (mips_collect_register, mips_supply_register)
8778 (mips_collect_register_32bit, mips_supply_register_32bit)
8779 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8780 (mips_store_fpregset, target_regsets): New.
8781 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8782
a13e2c95
UW
87832006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8784
8785 * configure.srv: Add target "spu*-*-*".
8786 * Makefile.in (clean): Remove reg-spu.c.
8787 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8788 * spu-low.c: New file.
8789
cb7283db
DJ
87902006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8791
8792 * configure.ac: Correct td_thr_tls_get_addr test.
8793 * configure: Regenerated.
8794
89be2091
DJ
87952006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8796
8797 * linux-low.c (linux_wait_for_event): Reformat. Use the
8798 pass_signals array.
8799 * remote-utils.c (decode_address_to_semicolon): New.
8800 * server.c (pass_signals, handle_general_set): New.
8801 (handle_query): Mention QPassSignals for qSupported.
8802 (main): Call handle_general_set.
8803 * server.h (pass_signals, decode_address_to_semicolon): New.
8804
000ef4f0
DJ
88052006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8806
8807 * server.c (handle_query): Correct error handling for read_auxv.
8808
b7149293
UW
88092005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8810
8811 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8812 and srv_linux_thread_db to yes.
8813 * linux-s390-low.c (s390_fill_gregset): New function.
8814 (target_regsets): Define data structure.
8815
dae5f5cf
DJ
88162006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8817
8818 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8819 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8820 * config.in, configure: Regenerated.
8821 * inferiors.c (gdb_id_to_thread): New function.
8822 (gdb_id_to_thread_id): Use it.
8823 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8824 * linux-low.h (struct process_info): Add th member.
8825 (thread_db_get_tls_address): New prototype.
8826 * remote-utils.c (decode_address): Make non-static.
8827 * server.c (handle_query): Handle qGetTLSAddr.
8828 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8829 * target.h (struct target_ops): Add get_tls_address.
8830 * thread-db.c (maybe_attach_thread): Save the thread handle.
8831 (thread_db_get_tls_address): New.
8832
32ca6d61
DJ
88332006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8834
8835 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8836 (linux_resume_one_process): Take a siginfo_t *. Update all
8837 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8838 (struct pending_signals): Add a siginfo_t.
8839 (linux_wait_for_process): Always set last_status.
8840 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8841 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8842 * linux-low.h (struct process_info): Add last_status.
8843
5ffff7c1
DJ
88442006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8845
8846 * remote-utils.c (try_rle): New function.
8847 (putpkt_binary): Use it.
8848
8695c747
DJ
88492006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8850
8851 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8852 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8853 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8854 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8855 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8856 point registers.
8857
290fadea
RS
88582006-08-08 Richard Sandiford <richard@codesourcery.com>
8859
8860 * server.c (terminal_fd): New variable.
8861 (old_foreground_pgrp): Likewise.
8862 (restore_old_foreground_pgrp): New function.
8863 (start_inferior): Record the terminal file descriptor in terminal_fd
8864 and its original foreground group in old_foreground_pgrp. Register
8865 restore_old_foreground_pgrp with atexit().
8866
9f2e1e63
DJ
88672006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8868
8869 * server.c (handle_query): Correct qPart to qXfer.
8870
b80864fb
DJ
88712006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8872
8873 * configure.ac: Check for more headers which are missing on
8874 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8875 * configure.srv: Add Cygwin and mingw32.
8876 * remote-utils.c: Don't include headers unconditionally which
8877 are missing on mingw32. Include <winsock.h> for mingw32.
8878 (remote_open): Adjust for mingw32 support. Flush
8879 standard error after writing to it.
8880 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8881 (unblock_async_io, enable_async_io, disable_async_io)
8882 (readchar, getpkt): Update for Winsock support.
8883 (prepare_resume_reply): Expect a protocol signal number.
8884 * server.c: Disable <sys/wait.h> on mingw32.
8885 (start_inferior): Adjust for mingw32 support. Flush
8886 standard error after writing to it.
8887 (attach_inferior): Likewise. Use protocol signal
8888 numbers.
8889 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8890 and names.
8891 * win32-i386-low.c: New file.
8892 * Makefile.in (XM_CLIBS): Set.
8893 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8894 (win32-i386-low.o): New dependency rule.
8895 * linux-low.c (linux_wait): Use target signal numbers.
8896 * target.h (struct target_ops): Doc fix.
8897 * server.h (target_signal_to_name): New prototype.
8898 * gdbreplay.c: Don't include headers unconditionally which
8899 are missing on mingw32. Include <winsock.h> for mingw32.
8900 (remote_close, remote_open): Adjust for Winsock support.
8901 * configure, config.in: Regenerated.
8902
0876f84a
DJ
89032006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8904
8905 * server.c (decode_xfer_read, write_qxfer_response): New.
8906 (handle_query): Take a packet length argument. Handle
8907 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8908 the qSupported response.
8909 (main): Update call to handle_query.
8910
01f9e8fa
DJ
89112006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8912
8913 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8914 (putpkt_binary): Renamed from putpkt and adjusted for binary
8915 data.
8916 (putpkt): New wrapper for putpkt_binary.
8917 (readchar): Don't mask off the high bit.
8918 (decode_X_packet): New function.
8919 * server.c (main): Call putpkt_binary if a handler sets the packet
8920 length. Save the length of the incoming packet. Handle 'X'.
8921 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8922
be2a5f71
DJ
89232006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * server.c (handle_query): Handle qSupported.
8926
ea025f5f
DJ
89272006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8928
8929 * remote-utils.c (all_symbols_looked_up): New variable.
8930 (look_up_one_symbol): Check it.
8931 * server.h (look_up_one_symbol): New declaration.
8932 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8933
9308fc88
DJ
89342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8935
8936 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 8937 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
8938 (PTRACE_GET_THREAD_AREA): Define.
8939 (ps_get_thread_area): New function.
8940
52fb6437
NS
89412006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8942
8943 * configure.srv (m68k*-*-uclinux*): New target.
8944 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8945 (linux_resume_one_process): Remove extraneous cast.
8946 (linux_read_offsets): New.
8947 (linux_target_op): Add linux_read_offsets on mmuless systems.
8948 * server.c (handle_query): Add qOffsets logic.
8949 * target.h (struct target_ops): Add read_offsets.
8950
21b0f40c
DJ
89512006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8952
8953 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8954 (PTRACE_GET_THREAD_AREA): Define.
8955 (ps_get_thread_area): New function.
8956 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8957 (linux-x86-64-low.o): Update.
8958
0050a760
DJ
89592006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8960
8961 * configure.ac: Remove checks for prfpregset_t.
8962 * gdb_proc_service.h: New file.
8963 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8964 new "gdb_proc_service.h".
8965 * proc-service.c: Likewise.
8966 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8967 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8968 * Makefile.in (gdb_proc_service_h): Updated.
8969 * configure, config.in: Regenerated.
8970
b92a518e
DJ
89712006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8972
8973 * remote-utils.c (prepare_resume_reply): Move declaration
8974 of gdb_id_from_wait to the top of the block.
8975
545587ee
DJ
89762006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8977
8978 * linux-low.c (regsets_store_inferior_registers): Read the regset
8979 from the target before filling it.
8980
9db87ebd
DJ
89812006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8982
8983 * server.c (attach_inferior): Return SIGTRAP for a successful
8984 attach.
8985
dd24457d
DJ
89862006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8987
8988 * Makefile.in (OBS): Add version.o.
8989 (STAGESTUFF): Delete.
8990 (version.o): Add dependencies.
8991 (version.c): Replace rule.
8992 (clean): Remove version.c.
8993 * server.c (gdbserver_version): New.
8994 (gdbserver_usage): Use printf.
8995 (main): Handle --version and --help.
8996 * server.h (version, host_name): Add declarations.
8997
6f0f660e
EZ
89982005-12-23 Eli Zaretskii <eliz@gnu.org>
8999
889bf7c5
PA
9000 * linux-arm-low.c:
9001 * linux-arm-low.c:
9002 * inferiors.c:
9003 * i387-fp.h:
9004 * i387-fp.c:
9005 * gdbreplay.c:
9006 * regcache.c:
9007 * proc-service.c:
9008 * mem-break.h:
9009 * mem-break.c:
9010 * linux-x86-64-low.c:
9011 * linux-sh-low.c:
9012 * linux-s390-low.c:
9013 * linux-ppc64-low.c:
9014 * linux-ppc-low.c:
9015 * linux-mips-low.c:
9016 * linux-m68k-low.c:
9017 * linux-m32r-low.c:
9018 * linux-low.h:
9019 * linux-low.c:
9020 * linux-ia64-low.c:
9021 * linux-i386-low.c:
9022 * linux-crisv32-low.c:
9023 * thread-db.c:
9024 * terminal.h:
9025 * target.h:
9026 * target.c:
9027 * server.h:
9028 * server.c:
9029 * remote-utils.c:
9030 * regcache.h:
9031 * utils.c:
9032 * Makefile.in:
9033 * configure.ac:
6f0f660e
EZ
9034 * gdbserver.1: Add (C) after Copyright. Update the FSF
9035 address.
9036
9d1fb177
DJ
90372005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9038
9039 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9040 (arm_breakpoint_at): Recognize both breakpoints.
9041 (the_low_target): Use the correct breakpoint instruction.
9042
011a70c2
DJ
90432005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9044
9045 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9046 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9047 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9048 (the_low_target): Update.
9049
7fb85e41
AS
90502005-10-25 Andreas Schwab <schwab@suse.de>
9051
9052 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9053
9054 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9055 (ia64_num_regs): Reduce to 462.
9056
3db0444b
DJ
90572005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9058
9059 * acinclude.m4: Correct quoting.
9060 * aclocal.m4: Regenerated.
9061
9062 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9063 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9064 (thread_db_init): Call thread_db_err_str.
9065 * configure.ac: Check for TD_VERSION.
9066 * config.in, configure: Regenerated.
9067
bee0189a
DJ
90682005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9069
9070 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9071
e9d25b98
DJ
90722005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9073
9074 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9075 is not available. Define HAVE_PTRACE_GETREGS if it is.
9076 * config.in, configure: Regenerated.
9077 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9078 * linux-i386-low.c, linux-m68k-low.c: Update to use
9079 HAVE_PTRACE_GETREGS.
9080 * linux-low.c (regsets_fetch_inferior_registers)
9081 (regsets_store_inferior_registers): Only return 0 if we processed
9082 GENERAL_REGS.
9083 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9084 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9085
a06660f7
DJ
90862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9087
9088 * inferiors.c (struct thread_info): Add gdb_id.
9089 (add_thread): Add gdb_id argument.
9090 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9091 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9092 calls to add_thread.
9093 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9094 * server.c (handle_query): Use thread_to_gdb_id.
9095 (handle_v_cont, main): Use gdb_id_to_thread_id.
9096 * server.h (add_thread): Update prototype.
9097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9098 prototypes.
9099
5a1f5858
DJ
91002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9101
9102 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9103 left-padded registers.
9104 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9105 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9106
e122f1f5
SE
91072005-07-01 Steve Ellcey <sje@cup.hp.com>
9108
9109 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9110 * configure: Regenerate.
9111 * config.in: Regenerate.
9112 * server.h (NEED_DECLARATION_STRERROR):
9113 Replace with !HAVE_DECL_STRERROR.
9114
d592fa2f
DJ
91152005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * linux-low.c (linux_wait, linux_send_signal): Don't test
9118 an unsigned long variable for > 0 if it could be MAX_ULONG.
9119 * server.c (myresume): Likewise.
9120 * target.c (set_desired_inferior): Likewise.
9121
ccbd4912
MK
91222005-06-13 Mark Kettenis <kettenis@gnu.org>
9123
9124 * configure.ac: Simplify and improve check for socklen_t.
9125 * configure, config.in: Regenerate.
9126
f450004a
DJ
91272005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9128
9129 * acconfig.h: Remove.
9130 * configure.ac: Add a test for socklen_t. Use three-argument
9131 AC_DEFINE throughout.
9132 * config.in: Regenerated using autoheader 2.59.
9133 * configure: Regenerated.
9134
9135 * gdbreplay.c (socklen_t): Provide a default.
9136 (remote_open): Use socklen_t.
9137 * remote-utils.c (socklen_t): Provide a default.
9138 (remote_open): Use socklen_t.
9139 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9140 unsigned char.
9141
9142 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9143 char for buffers.
9144 * linux-low.c (linux_read_memory, linux_write_memory)
9145 (linux_read_auxv): Likewise.
9146 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9147 (check_mem_write): Likewise.
9148 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9149 Likewise.
9150 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9151 (registers_from_string, register_data): Likewise.
9152 * server.c (handle_query, main): Likewise.
9153 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9154 (decode_M_packet): Likewise.
9155 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9156 * target.h (struct target_ops): Update read_memory, write_memory,
9157 and read_auxv.
9158 (read_inferior_memory, write_inferior_memory): Update.
9159 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9160 to unsigned char *.
9161 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9162 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9163 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9164 linux-s390-low.c, linux-sh-low.c: Update for changes in
9165 read_inferior_memory and the_low_target->breakpoint.
9166
eee84df1
DJ
91672005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9168
9169 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9170 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9171 * configure.srv: Add powerpc64-*-linux*.
9172 * linux-ppc64-low.c: New file.
9173
45b134e5
OF
91742005-05-23 Orjan Friberg <orjanf@axis.com>
9175
9176 * linux-cris-low.c: New file with support for CRIS.
9177 * linux-crisv32-low.c: Ditto for CRISv32.
9178 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9179 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9180 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9181 reg-crisv32.o, and reg-crisv32.c to make rules.
9182 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9183 recognized targets.
9184
48d93c75
UW
91852005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9186
9187 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9188 of sizeof (PTRACE_XFER_TYPE).
9189 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9190
e013ee27
OF
91912005-05-12 Orjan Friberg <orjanf@axis.com>
9192
889bf7c5 9193 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9194 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9195 pointers for hardware watchpoint support.
9196 * linux-low.h (struct linux_target_ops): Ditto.
9197 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9198 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9199 to linux_target_ops.
9200 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9201 reply packet.
9202 * server.c (main): Recognize 'Z' and 'z' packets.
9203
b0ded00b
UW
92042005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9205
9206 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9207 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9208 (the_low_target): Add new members.
9209
8643e2ad
DJ
92102005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9211
9212 * proc-service.c (ps_lgetregs): Search all_processes instead of
9213 all_threads.
9214
fc620387
DJ
92152005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * server.c (start_inferior): Change return type to int.
9218 (attach_inferior): Change sigptr to int *.
9219 (handle_v_cont, handle_v_requests): Change signal to int *.
9220 (main): Change signal to int.
9221
92222005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9223
9224 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9225 * configure.srv: Add m32r*-*-linux*.
9226 * linux-m32r-low.c: New file.
9227
e0e76420
DJ
92282005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9231
a1928bad
DJ
92322005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9233
9234 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9235 Take unsigned long arguments for PIDs.
9236 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9237 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9238 (wait_for_sigstop, linux_resume_one_process)
9239 (regsets_fetch_inferior_registers, linux_send_signal)
9240 (linux_read_auxv): Likewise. Update the types of variables holding
9241 PIDs. Update format string specifiers.
9242 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9243 * remote-utils.c (prepare_resume_reply): Likewise.
9244 * server.c (cont_thread, general_thread, step_thread)
9245 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9246 unsigned long.
9247 (handle_query): Update format specifiers.
9248 (handle_v_cont, main): Use strtoul for thread IDs.
9249 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9250 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9251 (general_thread, step_thread, thread_from_wait)
9252 (old_thread_from_wait): Update.
9253 * target.h (struct thread_resume): Use unsigned long for THREAD.
9254 (struct target_ops): Use unsigned long for arguments to attach and
9255 thread_alive.
9256
dcdb98d2
DJ
92572005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9258
9259 * acinclude.m4: Include bfd/bfd.m4 directly.
9260 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9261 <agriffis@toolchain.org>.
9262 * aclocal.m4, configure: Regenerated.
9263
bec39cab
AC
92642005-01-07 Andrew Cagney <cagney@gnu.org>
9265
9266 * configure.ac: Rename configure.in, require autoconf 2.59.
9267 * configure: Re-generate.
9268
434c4c77
DJ
92692004-12-08 Daniel Jacobowitz <dan@debian.org>
9270
9271 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9272 LIBS when finished.
9273 * aclocal.m4: Regenerated.
9274 * configure: Regenerated.
9275
db1d3e1b
AS
92762004-11-21 Andreas Schwab <schwab@suse.de>
9277
9278 * linux-m68k-low.c (m68k_num_gregs): Define.
9279 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9280 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9281 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9282 (m68k_breakpoint_at): New. Add to the_low_target.
9283
9284 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9285 srv_linux_thread_db to yes.
9286
43360365
JB
92872004-10-20 Joel Brobecker <brobecker@gnat.com>
9288
9289 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9290 (ARCH_SET_FS): Likewise.
9291 (ARCH_GET_FS): Likewise.
9292 (ARCH_GET_GS): Likewise.
9293
fd500816
DJ
92942004-10-16 Daniel Jacobowitz <dan@debian.org>
9295
9296 * linux-i386-low.c (ps_get_thread_area): New.
9297 * linux-x86-64-low.c (ps_get_thread_area): New.
9298 * linux-low.c: Include <sys/syscall.h>.
9299 (linux_kill_one_process): Don't kill the first thread here.
9300 (linux_kill): Kill the first thread here.
9301 (kill_lwp): New function.
9302 (send_sigstop, linux_send_signal): Use it.
9303 * proc-service.c: Clean up #ifdefs.
9304 (fpregset_info): Delete.
9305 (ps_lgetregs): Update and enable implementation.
9306 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9307 implementations.
9308 * remote-utils.c (struct sym_cache, symbol_cache): New.
9309 (input_interrupt): Print a clearer message.
9310 (async_io_enabled): New variable.
9311 (enable_async_io, disable_async_io): Use it. Update comments.
9312 (look_up_one_symbol): Use the symbol cache.
9313 * thread-db.c (thread_db_look_up_symbols): New function.
9314 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9315
f6de3c42
DJ
93162004-10-16 Daniel Jacobowitz <dan@debian.org>
9317
9318 * configure.in: Test for -rdynamic.
9319 * configure: Regenerated.
9320 * Makefile (INTERNAL_LDFLAGS): New.
9321 (gdbserver, gdbreplay): Use it.
9322
2c0fc042
AC
93232004-09-02 Andrew Cagney <cagney@gnu.org>
9324
9325 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9326
075b3282
DJ
93272004-03-23 Daniel Jacobowitz <drow@mvista.com>
9328
9329 * linux-low.c (linux_wait): Clear all_processes list also.
9330
fa6a77dc
DJ
93312004-03-12 Daniel Jacobowitz <drow@mvista.com>
9332
9333 * linux-low.c: Include <errno.h>. Remove extern declaration of
9334 errno.
9335
6d782a97
DJ
93362004-03-12 Daniel Jacobowitz <drow@mvista.com>
9337
9338 * gdbreplay.c, server.h, utils.c: Update copyright years.
9339
3a7fb99b
DJ
93402004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9341
9342 * server.c (main): Print child status or termination signal from
9343 variable 'signal', not 'sig'.
9344
c3e735a6
DJ
93452004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9346
9347 * linux-low.c (linux_read_memory): Change return type to
9348 int. Check for and return error from ptrace().
9349 * target.c (read_inferior_memory): Change return type to int. Pass
9350 back return status from the_target->read_memory().
9351 * target.h (struct target_ops): Adapt *read_memory() prototype.
9352 Update comment.
9353 (read_inferior_memory): Adapt prototype.
9354 * server.c (main): Return an error packet if
9355 read_inferior_memory() returns an error.
9356
a59d1c82
DJ
93572004-03-04 Daniel Jacobowitz <drow@mvista.com>
9358
9359 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9360 Unify with other clean targets.
9361
dc3f8883
DJ
93622004-02-29 Daniel Jacobowitz <drow@mvista.com>
9363
9364 * server.c (handle_v_cont): Call set_desired_inferior.
9365
89a208da
DJ
93662004-02-29 Daniel Jacobowitz <drow@mvista.com>
9367
9368 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9369
62ea82f5
DJ
93702004-02-29 Daniel Jacobowitz <drow@mvista.com>
9371
9372 * linux-low.c (linux_wait): Unblock async I/O.
9373 (linux_resume): Block and enable async I/O.
9374 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9375 * server.h (block_async_io, unblock_async_io): Add prototypes.
9376
6910d122
DJ
93772004-02-29 Daniel Jacobowitz <drow@mvista.com>
9378
9379 * remote-utils.c (remote_open): Print a status notice after
9380 opening a TCP port.
9381 * server.c (attach_inferior): Print a status notice after
9382 attaching.
9383
93842004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9385
9386 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9387
c89dc5d4
DJ
93882004-02-26 Daniel Jacobowitz <drow@mvista.com>
9389
9390 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9391 error packet.
9392 * server.c, target.h: Update copyright years.
9393
4b8dad4a
RM
93942004-02-25 Roland McGrath <roland@redhat.com>
9395
9396 * target.h (struct target_ops): New member `read_auxv'.
9397 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9398 * linux-low.c (linux_read_auxv): New function.
9399 (linux_target_ops): Initialize `read_auxv' member to that.
9400
d7446758
JB
94012004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9402
9403 Committed by Jim Blandy <jimb@redhat.com>.
9404
9405 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9406 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9407 instead of GPR_SIZE to distiguish s390 and s390x targets.
9408
5544ad89
DJ
94092004-01-31 Daniel Jacobowitz <drow@mvista.com>
9410
9411 * linux-low.c: Update copyright year.
9412 (check_removed_breakpoint): Clear pending_is_breakpoint.
9413 (linux_set_resume_request, linux_queue_one_thread)
9414 (resume_status_pending_p): New functions.
9415 (linux_continue_one_thread): Use process->resume.
9416 (linux_resume): Only resume threads if there are no pending events.
9417 * linux-low.h (struct process_info): Add resume request
9418 pointer.
9419
2a68b70e
DJ
94202004-01-30 Daniel Jacobowitz <drow@mvista.com>
9421
9422 * regcache.c (new_register_cache): Clear the allocated register
9423 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9424
64386c31
DJ
94252003-10-13 Daniel Jacobowitz <drow@mvista.com>
9426
9427 * linux-low.c (linux_resume): Take a struct thread_resume *
9428 argument.
9429 (linux_wait): Update call.
9430 (resume_ptr): New static variable.
9431 (linux_continue_one_thread): Renamed from
9432 linux_continue_one_process. Use resume_ptr.
9433 (linux_resume): Use linux_continue_one_thread.
9434 * server.c (handle_v_cont, handle_v_requests): New functions.
9435 (myresume): New function.
9436 (main): Handle 'v' case.
9437 * target.h (struct thread_resume): New type.
9438 (struct target_ops): Change argument of "resume" to struct
9439 thread_resume *.
9440 (myresume): Delete macro.
9441
c938e9b0
L
94422003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9443
9444 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9445 (uninstall): Support DESTDIR.
9446
7f313d07
BC
9447Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9448
9449 * configure.srv: Add xscale*linux copy of arm*linux entry.
9450
3b2fc2ea
DJ
94512003-07-24 Daniel Jacobowitz <drow@mvista.com>
9452
9453 * linux-arm-low.c (arm_reinsert_addr): New function.
9454 (the_low_target): Add arm_reinsert_addr.
9455
1c0a559e
MK
94562003-07-08 Mark Kettenis <kettenis@gnu.org>
9457
9458 * mem-break.c: Remove whitespace at end of file.
9459
43d5792c
DJ
94602003-06-28 Daniel Jacobowitz <drow@mvista.com>
9461
9462 * configure.in: Check whether we need to prototype strerror.
9463 * server.h: Optionally prototype strerror.
9464 * gdbreplay.c (perror_with_name): Use strerror.
9465 * linux-low.c (linux_attach_lwp): Use strerror.
9466 * utils.c (perror_with_name): Use strerror.
9467 * config.in, configure: Regenerated.
9468
c8a86edf
DJ
94692003-06-28 Daniel Jacobowitz <drow@mvista.com>
9470
9471 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9472 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9473
73d37363
DJ
94742003-06-20 Daniel Jacobowitz <drow@mvista.com>
9475
9476 * Makefile.in (SFILES): Update.
9477 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9478 low-sun3.c: Remove files.
9479
6ad8ae5c
DJ
94802003-06-17 Daniel Jacobowitz <drow@mvista.com>
9481
9482 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9483 (linux_detach_one_process, linux_detach): New functions.
9484 (linux_target_ops): Add linux_detach.
9485 * server.c (main): Handle 'D' packet.
9486 * target.h (struct target_ops): Add "detach" member.
9487 (detach_inferior): Define.
9488
1581182a
MK
94892003-06-13 Mark Kettenis <kettenis@gnu.org>
9490
9491 From Kelley Cook <kelleycook@wideopenwest.com>:
9492 * configure.srv: Accept i[34567]86 variants.
9493
e5379b03
DJ
94942003-06-05 Daniel Jacobowitz <drow@mvista.com>
9495
9496 * linux-low.c (linux_wait_for_event): Correct comment typos.
9497 (linux_resume_one_process): Call check_removed_breakpoint.
9498 (linux_send_signal): New function.
9499 (linux_target_ops): Add linux_send_signal.
9500 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9501 of kill.
9502 * target.h (struct target_ops): Add send_signal.
9503
2ff29de4
JB
95042003-05-29 Jim Blandy <jimb@redhat.com>
9505
9506 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9507 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9508 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9509 away part of the register's value.
9510
254787d4
DJ
95112003-03-26 Daniel Jacobowitz <drow@mvista.com>
9512
9513 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9514 (linux_wait_for_event, linux_init_signals): Likewise.
9515
94e10508
DJ
95162003-03-17 Daniel Jacobowitz <drow@mvista.com>
9517
9518 * configure.in: Check for stdlib.h.
9519 * configure: Regenerated.
9520 * config.in: Regenerated.
9521
4c0711e0
DJ
95222003-01-04 Andreas Schwab <schwab@suse.de>
9523
9524 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9525
ef66e766
AC
95262003-01-02 Andrew Cagney <ac131313@redhat.com>
9527
9528 * Makefile.in: Remove obsolete code.
9529
a1358604
DJ
95302002-11-20 Daniel Jacobowitz <drow@mvista.com>
9531
9532 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9533 defined(PT_FPR0_HI).
9534
23ce3b1c
DJ
95352002-11-17 Stuart Hughes <seh@zee2.com>
9536
9537 * linux-arm-low.c (arm_num_regs): Increase.
9538 (arm_regmap): Include status register.
9539
95402002-11-17 Daniel Jacobowitz <drow@mvista.com>
9541
9542 * linux-low.c (register_addr): Remove incorrect -1 check.
9543
a9fa9f7d
DJ
95442002-08-29 Daniel Jacobowitz <drow@mvista.com>
9545
9546 * linux-low.c (linux_create_inferior): Call setpgid. Return
9547 the new PID.
9548 (unstopped_p, linux_signal_pid): Remove.
9549 (linux_target_ops): Remove linux_signal_pid.
9550 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9551 global instead of target method.
9552 * target.h (struct target_ops): Remove signal_pid. Update comment
9553 for create_inferior.
9554 * server.c (signal_pid): New variable.
9555 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 9556 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
9557 (attach_inferior): Set signal_pid.
9558
17574093
DJ
95592002-08-23 Daniel Jacobowitz <drow@mvista.com>
9560
9561 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9562
95632002-08-20 Jim Blandy <jimb@redhat.com>
9564
9565 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9566 default for this.
9567
95682002-08-01 Andrew Cagney <cagney@redhat.com>
9569
9570 * Makefile.in: Make chill references obsolete.
9571
95722002-07-24 Kevin Buettner <kevinb@redhat.com>
9573
9574 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9575 * configure: Regenerate.
9576 * config.in: Regenerate.
9577
95782002-07-09 David O'Brien <obrien@FreeBSD.org>
9579
9580 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9581 (perror_with_name, remote_close, remote_open, expect, play): Static.
9582
95832002-07-04 Michal Ludvig <mludvig@suse.cz>
9584
4b8dad4a 9585 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
9586 byte offsets instead of an array of indexes.
9587 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9588
95892002-06-13 Daniel Jacobowitz <drow@mvista.com>
9590
9591 * regcache.c: Add comment.
9592
95932002-06-11 Daniel Jacobowitz <drow@mvista.com>
9594
9595 * thread-db.c: New file.
9596 * proc-service.c: New file.
9597 * acinclude.m4: New file.
9598 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9599 proc-service.o, and thread-db.o.
9600 (linux-low.o): Add USE_THREAD_DB.
9601 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9602 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9603 * aclocal.m4: Regenerated.
9604 * config.in: Regenerated.
9605 * configure: Regenerated.
9606 * configure.in: Check for proc_service.h, sys/procfs.h,
9607 thread_db.h, and linux/elf.h headrs.
9608 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9609 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9610 Check for -lthread_db and thread support.
9611 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9612 PowerPC, and SuperH.
9613 * i387-fp.c: Constify arguments.
9614 * i387-fp.h: Likewise.
9615 * inferiors.c: (struct thread_info): Renamed from
9616 `struct inferior_info'. Remove PID member. Use generic inferior
9617 list header. All uses updated.
9618 (inferiors, signal_pid): Removed.
9619 (all_threads): New variable.
9620 (get_thread): Define.
9621 (add_inferior_to_list): New function.
9622 (for_each_inferior): New function.
9623 (change_inferior_id): New function.
9624 (add_inferior): Removed.
9625 (remove_inferior): New function.
9626 (add_thread): New function.
9627 (free_one_thread): New function.
9628 (remove_thread): New function.
9629 (clear_inferiors): Use for_each_inferior and free_one_thread.
9630 (find_inferior): New function.
9631 (find_inferior_id): New function.
9632 (inferior_target_data): Update argument type.
9633 (set_inferior_target_data): Likewise.
9634 (inferior_regcache_data): Likewise.
9635 (set_inferior_regcache_data): Likewise.
9636 * linux-low.c (linux_bp_reinsert): Remove.
9637 (all_processes, stopping_threads, using_thrads)
9638 (struct pending_signals, debug_threads, pid_of): New.
9639 (inferior_pid): Replace with macro.
9640 (struct inferior_linux_data): Remove.
9641 (get_stop_pc, add_process): New functions.
9642 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9643 Use add_process and add_thread.
9644 (linux_attach_lwp): New function, based on old linux_attach. Use
9645 add_process and add_thread. Set stop_expected for new threads.
9646 (linux_attach): New function.
9647 (linux_kill_one_process): New function.
9648 (linux_kill): Kill all LWPs.
9649 (linux_thread_alive): Use find_inferior_id.
9650 (check_removed_breakpoints, status_pending_p): New functions.
9651 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9652 Update. Use WNOHANG. Wait for cloned processes also. Update process
9653 struct for the found process.
9654 (linux_wait_for_event): New function.
9655 (linux_wait): Use it. Support LWPs.
9656 (send_sigstop, wait_for_sigstop, stop_all_processes)
9657 (linux_resume_one_process, linux_continue_one_process): New functions.
9658 (linux_resume): Support LWPs.
9659 (REGISTER_RAW_SIZE): Remove.
9660 (fetch_register): Use register_size instead. Call supply_register.
9661 (usr_store_inferior_registers): Likewise. Call collect_register.
9662 Fix recursive case.
9663 (regsets_fetch_inferior_registers): Improve error message.
9664 (regsets_store_inferior_registers): Add debugging.
9665 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9666 (unstopped_p, linux_signal_pid): New functions.
9667 (linux_target_ops): Add linux_signal_pid.
9668 (linux_init_signals): New function.
9669 (initialize_low): Call it. Initialize using_threads.
9670 * regcache.c (inferior_regcache_data): Add valid
9671 flag.
9672 (get_regcache): Fetch registers lazily. Add fetch argument
9673 and update all callers.
9674 (regcache_invalidate_one, regcache_invalidate): New
9675 functions.
9676 (new_register_cache): Renamed from create_register_cache.
9677 Return the new regcache.
9678 (free_register_cache): Change argument to a void *.
9679 (registers_to_string, registers_from_string): Call get_regcache
9680 with fetch flag set.
9681 (register_data): Make static. Pass fetch flag to get_regcache.
9682 (supply_register): Call get_regcache with fetch flag clear.
9683 (collect_register): Call get_regcache with fetch flag set.
9684 (collect_register_as_string): New function.
9685 * regcache.h: Update.
9686 * remote-utils.c (putpkt): Flush after debug output and use
9687 stderr.
9688 Handle input interrupts while waiting for an ACK.
9689 (input_interrupt): Use signal_pid method.
9690 (getpkt): Flush after debug output and use stderr.
9691 (outreg): Use collect_register_as_string.
9692 (new_thread_notify, dead_thread_notify): New functions.
9693 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9694 and general_thread.
9695 (look_up_one_symbol): Flush after debug output.
9696 * server.c (step_thread, server_waiting): New variables.
9697 (start_inferior): Don't use signal_pid. Update call to mywait.
9698 (attach_inferior): Update call to mywait.
9699 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9700 (main): Don't fetch/store registers explicitly. Use
9701 set_desired_inferior. Support proposed ``Hs'' packet. Update
9702 calls to mywait.
9703 * server.h: Update.
9704 (struct inferior_list, struct_inferior_list_entry): New.
9705 * target.c (set_desired_inferior): New.
9706 (write_inferior_memory): Constify.
9707 (mywait): New function.
9708 * target.h: Update.
9709 (struct target_ops): New signal_pid method.
9710 (mywait): Removed macro, added prototype.
9711
9712 * linux-low.h (regset_func): Removed.
9713 (regset_fill_func, regset_store_func): New.
9714 (enum regset_type): New.
9715 (struct regset_info): Add type field. Use new operation types.
9716 (struct linux_target_ops): stop_pc renamed to get_pc.
9717 Add decr_pc_after_break and breakpoint_at.
9718 (get_process, get_thread_proess, get_process_thread)
9719 (strut process_info, all_processes, linux_attach_lwp)
9720 (thread_db_init): New.
9721
9722 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9723 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9724 (the_low_target): Add new members.
9725 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9726 (i386_store_fpxregset): Constify.
9727 (target_regsets): Add new kind identifier.
9728 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9729 (i386_set_pc): Add debugging.
9730 (i386_breakpoint_at): New function.
9731 (the_low_target): Add new members.
9732 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9733 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9734 (mips_breakpoint_at): New.
9735 (the_low_target): Add new members.
9736 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9737 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9738 (the_low_target): Add new members.
9739 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9740 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9741 (the_low_target): Add new members.
9742 * linux-x86-64-low.c (target_regsets): Add new kind
9743 identifier.
9744
97452002-05-15 Daniel Jacobowitz <drow@mvista.com>
9746
9747 From Martin Pool <mbp@samba.org>:
9748 * server.c (gdbserver_usage): New function.
9749 (main): Call it.
9750
97512002-05-14 Daniel Jacobowitz <drow@mvista.com>
9752
9753 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9754 stop_at -> stop_pc.
9755
97562002-05-04 Andrew Cagney <ac131313@redhat.com>
9757
9758 * Makefile.in: Remove obsolete code.
9759
97602002-04-24 Michal Ludvig <mludvig@suse.cz>
9761
9762 * linux-low.c (regsets_fetch_inferior_registers),
9763 (regsets_store_inferior_registers): Removed cast to int from
9764 ptrace() calls.
9765 * regcache.h: Added declaration of struct inferior_info.
9766
97672002-04-20 Daniel Jacobowitz <drow@mvista.com>
9768
9769 * inferiors.c (struct inferior_info): Add regcache_data.
9770 (add_inferior): Call create_register_cache.
9771 (clear_inferiors): Call free_register_cache.
9772 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9773 * regcache.c (struct inferior_regcache_data): New.
9774 (registers): Remove.
9775 (get_regcache): New function.
9776 (create_register_cache, free_register_cache): New functions.
9777 (set_register_cache): Don't initialize the register cache here.
9778 (registers_to_string, registers_from_string, register_data): Call
9779 get_regcache.
9780 * regcache.h: Add prototypes.
9781 * server.h: Likewise.
9782
97832002-04-20 Daniel Jacobowitz <drow@mvista.com>
9784
9785 * mem-break.c: New file.
9786 * mem-break.h: New file.
9787 * Makefile.in: Add mem-break.o rule; update server.h
9788 dependencies.
9789 * inferiors.c (struct inferior_info): Add target_data
9790 member.
9791 (clear_inferiors): Free target_data member if set.
9792 (inferior_target_data, set_inferior_target_data): New functions.
9793 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9794 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9795 * linux-low.c (linux_bp_reinsert): New variable.
9796 (struct inferior_linux_data): New.
9797 (linux_create_inferior): Use set_inferior_target_data.
9798 (linux_attach): Likewise. Call add_inferior.
9799 (linux_wait_for_one_inferior): New function.
9800 (linux_wait): Call it.
9801 (linux_write_memory): Add const.
9802 (initialize_low): Call set_breakpoint_data.
9803 * linux-low.h (struct linux_target_ops): Add breakpoint
9804 handling members.
9805 * server.c (attach_inferior): Remove extra add_inferior
9806 call.
9807 * server.h: Include mem-break.h. Update inferior.c
9808 prototypes.
9809 * target.c (read_inferior_memory)
9810 (write_inferior_memory): New functions.
9811 * target.h (read_inferior_memory)
9812 (write_inferior_memory): Change macros to prototypes.
9813 (struct target_ops): Update comments. Add const to write_memory
9814 definition.
9815
98162002-04-11 Daniel Jacobowitz <drow@mvista.com>
9817
9818 * linux-low.c (usr_store_inferior_registers): Support
9819 registers which are allowed to fail to store.
9820 * linux-low.h (linux_target_ops): Likewise.
9821 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9822 (ppc_cannot_store_register): FPSCR may not be storable.
9823
98242002-04-09 Daniel Jacobowitz <drow@mvista.com>
9825
9826 * server.h: Include <string.h> if HAVE_STRING_H.
9827 * ChangeLog: Correct paths in last ChangeLog entry.
9828
98292002-04-09 Daniel Jacobowitz <drow@mvista.com>
9830
9831 * linux-low.h: Remove obsolete prototypes.
9832 (struct linux_target_ops): New.
9833 (extern the_low_target): New.
9834 * linux-low.c (num_regs, regmap): Remove declarations.
9835 (register_addr): Use the_low_target explicitly.
9836 (fetch_register): Likewise.
9837 (usr_fetch_inferior_registers): Likewise.
9838 (usr_store_inferior_registers): Likewise.
9839 * linux-arm-low.c (num_regs): Remove.
9840 (arm_num_regs): Define.
9841 (arm_regmap): Renamed from regmap, made static.
9842 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9843 made static.
9844 (arm_cannot_store_register): Renamed from cannot_store_register,
9845 made static.
9846 (the_low_target): New.
9847 * linux-i386-low.c (num_regs): Remove.
9848 (i386_num_regs): Define.
9849 (i386_regmap): Renamed from regmap, made static.
9850 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9851 made static.
9852 (i386_cannot_store_register): Renamed from cannot_store_register,
9853 made static.
9854 (the_low_target): New.
9855 * linux-ia64-low.c (num_regs): Remove.
9856 (ia64_num_regs): Define.
9857 (ia64_regmap): Renamed from regmap, made static.
9858 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9859 made static.
9860 (ia64_cannot_store_register): Renamed from cannot_store_register,
9861 made static.
9862 (the_low_target): New.
9863 * linux-m68k-low.c (num_regs): Remove.
9864 (m68k_num_regs): Define.
9865 (m68k_regmap): Renamed from regmap, made static.
9866 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9867 made static.
9868 (m68k_cannot_store_register): Renamed from cannot_store_register,
9869 made static.
9870 (the_low_target): New.
9871 * linux-mips-low.c (num_regs): Remove.
9872 (mips_num_regs): Define.
9873 (mips_regmap): Renamed from regmap, made static.
9874 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9875 made static.
9876 (mips_cannot_store_register): Renamed from cannot_store_register,
9877 made static.
9878 (the_low_target): New.
9879 * linux-ppc-low.c (num_regs): Remove.
9880 (ppc_num_regs): Define.
9881 (ppc_regmap): Renamed from regmap, made static.
9882 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9883 made static.
9884 (ppc_cannot_store_register): Renamed from cannot_store_register,
9885 made static.
9886 (the_low_target): New.
9887 * linux-s390-low.c (num_regs): Remove.
9888 (s390_num_regs): Define.
9889 (s390_regmap): Renamed from regmap, made static.
9890 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9891 made static.
9892 (s390_cannot_store_register): Renamed from cannot_store_register,
9893 made static.
9894 (the_low_target): New.
9895 * linux-sh-low.c (num_regs): Remove.
9896 (sh_num_regs): Define.
9897 (sh_regmap): Renamed from regmap, made static.
9898 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9899 made static.
9900 (sh_cannot_store_register): Renamed from cannot_store_register,
9901 made static.
9902 (the_low_target): New.
9903 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9904 (the_low_target): New.
9905
99062002-04-09 Daniel Jacobowitz <drow@mvista.com>
9907
9908 * Makefile.in: Add stamp-h target.
9909 * configure.in: Create stamp-h.
9910 * configure: Regenerated.
9911
99122002-04-09 Daniel Jacobowitz <drow@mvista.com>
9913
9914 * inferiors.c: New file.
9915 * target.c: New file.
9916 * target.h: New file.
9917 * Makefile.in: Add target.o and inferiors.o. Update
9918 dependencies.
9919 * linux-low.c (inferior_pid): New static variable,
9920 moved from server.c.
9921 (linux_create_inferior): Renamed from create_inferior.
9922 Call add_inferior. Return 0 on success instead of a PID.
9923 (linux_attach): Renamed from myattach.
9924 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9925 (linux_thread_alive): Renamed from mythread_alive.
9926 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9927 child dies.
9928 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9929 (regsets_store_inferior_registers): Correct error message.
9930 Add missing ``return 0''.
9931 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9932 (linux_store_registers): Renamed from store_inferior_registers.
9933 (linux_read_memory): Renamed from read_inferior_memory.
9934 (linux_write_memory): Renamed from write_inferior_memory.
9935 (linux_target_ops): New structure.
9936 (initialize_low): Call set_target_ops ().
9937 * remote-utils.c (unhexify): New function.
9938 (hexify): New function.
9939 (input_interrupt): Send signals to ``signal_pid''.
9940 * server.c (inferior_pid): Remove.
9941 (start_inferior): Update create_inferior call.
9942 (attach_inferior): Call add_inferior.
9943 (handle_query): New function.
9944 (main): Call handle_query for `q' packets.
9945 * server.h: Include "target.h". Remove obsolete prototypes.
9946 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9947
99482002-04-09 Daniel Jacobowitz <drow@mvista.com>
9949
9950 * Makefile.in: Add WARN_CFLAGS. Update configury
9951 dependencies.
9952 * configure.in: Check for <string.h>
9953 * configure: Regenerate.
9954 * config.in: Regenerate.
9955 * gdbreplay.c: Include needed system headers.
9956 (remote_open): Remove strchr prototype.
9957 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9958 * regcache.c (supply_register): Change buf argument to const void *.
9959 (supply_register_by_name): Likewise.
9960 (collect_register): Change buf argument to void *.
9961 (collect_register_by_name): Likewise.
9962 * regcache.h: Add missing prototypes.
9963 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9964 * server.c (handle_query): New function.
9965 (attached): New static variable, moved out of main.
9966 (main): Quiet longjmp clobber warnings.
9967 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9968 * utils.c (error): Remove NORETURN.
9969 (fatal): Likewise.