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