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