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