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