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