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