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