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