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