]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
*** empty log message ***
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3065dfb6
SS
12011-11-02 Stan Shebs <stan@codesourcery.com>
2
3 * tracepoint.c (agent_mem_read_string): New function.
4 (eval_agent_expr): Call it for tracenz.
5 * server.c (handle_query): Report support for tracenz.
6
fd0d8c7c
YQ
72011-11-02 Yao Qi <yao@codesourcery.com>
8
9 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10
609086b1
YQ
112011-11-02 Yao Qi <yao@codesourcery.com>
12
13 * target.h: Fix a typo in comment.
14
b9fd1791
PA
152011-10-31 Pedro Alves <pedro@codesourcery.com>
16
17 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
18 clobber the breakpoints' shadows with fast tracepoint jumps.
19 * mem-break.h (check_mem_write): Add `myaddr' parameter.
20 * target.c (write_inferior_memory): Also pass MYADDR down to
21 check_mem_write.
22
03583c20
UW
232011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
24
25 * configure.ac: Check support for personality routine.
26 * configure: Regenerate.
27 * config.in: Likewise.
28 * linux-low.c: Include <sys/personality.h>.
29 Define ADDR_NO_RANDOMIZE if necessary.
30 (linux_create_inferior): Disable address space randomization when
31 forking inferior, if requested.
32 (linux_supports_disable_randomization): New function.
33 (linux_target_ops): Install it.
34 * server.h (disable_randomization): Declare.
35 * server.c (disable_randomization): New global variable.
36 (handle_general_set): Handle QDisableRandomization.
37 (handle_query): Likewise for qSupported.
38 (main): Support --disable-randomization and --no-disable-randomization
39 command line arguments.
40 * target.h (struct target_ops): Add supports_disable_randomization.
41 (target_supports_disable_randomization): New macro.
42
723b724b
MF
432011-09-29 Mike Frysinger <vapier@gentoo.org>
44
45 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
46 ifdef check.
47 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
48 [!PT_GETDSBT] (target_loadmap): New definition.
49 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
50 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
51 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
52 and PT_GETDSBT to LINUX_LOADMAP.
53 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
54 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
55
55329a5c 562011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
57
58 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
59 (arm_linux_hwbp_cap): New static variable.
60 (arm_linux_get_hwbp_cap): Replace by ...
61 (arm_linux_init_hwbp_cap): ... this new function.
62 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
63 (arm_linux_get_hw_watchpoint_count): Likewise.
64 (arm_linux_get_hw_watchpoint_max_length): Likewise.
65 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
66 (arm_prepare_to_resume): Use perror_with_name instead of error.
67
55329a5c 682011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
69
70 * linux-arm-low.c: Include <signal.h>.
71 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
72 (struct arm_linux_hwbp_cap): New data type.
73 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
74 (struct arm_linux_hw_breakpoint): New data type.
75 (MAX_BPTS, MAX_WPTS): Define.
76 (struct arch_process_info, struct arch_lwp_info): New data types.
77 (arm_linux_get_hwbp_cap): New function.
78 (arm_linux_get_hw_breakpoint_count): Likewise.
79 (arm_linux_get_hw_watchpoint_count): Likewise.
80 (arm_linux_get_hw_watchpoint_max_length): Likewise.
81 (arm_hwbp_control_initialize): Likewise.
82 (arm_hwbp_control_is_enabled): Likewise.
83 (arm_hwbp_control_is_initialized): Likewise.
84 (arm_hwbp_control_disable): Likewise.
85 (arm_linux_hw_breakpoint_equal): Likewise.
86 (arm_linux_hw_point_initialize): Likewise.
87 (struct update_registers_data): New data structure.
88 (update_registers_callback: New function.
89 (arm_insert_point): Likewise.
90 (arm_remove_point): Likewise.
91 (arm_stopped_by_watchpoint): Likewise.
92 (arm_stopped_data_address): Likewise.
93 (arm_new_process): Likewise.
94 (arm_new_thread): Likewise.
95 (arm_prepare_to_resume): Likewise.
96 (the_low_target): Register arm_insert_point, arm_remove_point,
97 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
98 arm_new_thread, and arm_prepare_to_resume.
99
6b9801d4
SS
1002011-09-15 Stan Shebs <stan@codesourcery.com>
101
102 * server.h (struct emit_ops): Add compare-goto fields.
103 * tracepoint.c (gdb_agent_op_sizes): New table.
104 (emit_eq_goto): New function.
105 (emit_ne_goto): New function.
106 (emit_lt_goto): New function.
107 (emit_le_goto): New function.
108 (emit_gt_goto): New function.
109 (emit_ge_goto): New function.
110 (is_goto_target): New function.
111 (compile_bytecodes): Recognize special cases of compare-goto
112 combinations and call specialized emitters for them.
113 * linux-x86-low.c (amd64_emit_eq_goto): New function.
114 (amd64_emit_ne_goto): New function.
115 (amd64_emit_lt_goto): New function.
116 (amd64_emit_le_goto): New function.
117 (amd64_emit_gt_goto): New function.
118 (amd64_emit_ge_goto): New function.
119 (amd64_emit_ops): Add the new functions.
120 (i386_emit_eq_goto): New function.
121 (i386_emit_ne_goto): New function.
122 (i386_emit_lt_goto): New function.
123 (i386_emit_le_goto): New function.
124 (i386_emit_gt_goto): New function.
125 (i386_emit_ge_goto): New function.
126 (i386_emit_ops): Add the new functions.
127
bf15cbda
SS
1282011-09-08 Stan Shebs <stan@codesourcery.com>
129
130 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
131 (i386_emit_epilogue): Restore %ebx.
132
943ca1dd
JZ
1332011-08-31 Jie Zhang <jzhang918@gmail.com>
134
135 * server.c (step_thread): Remove definition.
136 (process_serial_event): Don't handle Hs.
137 * server.h (step_thread): Remove declaration.
138 * target.c (set_desired_inferior): Remove use of step_thread.
139
e3deef73
LM
1402011-08-24 Luis Machado <lgustavo@codesourcery.com>
141
142 * linux-low.c: Include linux-procfs.h.
143 (linux_attach_lwp_1): Update comments.
144 (linux_attach): Scan for existing threads when attaching to a
145 process that is the tgid.
146 * Makefile.in: Update dependencies.
147
13da1c97
LM
1482011-08-24 Luis Machado <lgustavo@codesourcery.com>
149
150 * configure.srv: Add linux-procfs.o dependencies.
151
881127c9
YQ
1522011-08-14 Yao Qi <yao@codesourcery.com>
153
154 * target.h (struct target_ops): Fix indent.
155 * win32-low.c (win32_target_ops): Fix comment.
156
58dbd541
YQ
1572011-08-14 Andrew Jenner <andrew@codesourcery.com>
158 Yao Qi <yao@codesourcery.com>
159
160 * Makefile.in (clean): Remove tic6x-*.c files.
161 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
162 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
163 (tic6x-c64xp-linux.c): Likewise.
164 * configure.srv: Add support for tic6x-*-uclinux.
165 * linux-tic6x-low.c: New.
166 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
167
78d85199
YQ
1682011-08-14 Andrew Stubbs <ams@codesourcery.com>
169 Yao Qi <yao@codesourcery.com>
170
171 * target.h (struct target_ops): Add read_loadmap.
172 * linux-low.c (struct target_loadseg): New type.
173 (struct target_loadmap): New type.
174 (linux_read_loadmap): New function.
175 (linux_target_ops): Add linux_read_loadmap.
176 * server.c (handle_query): Support qXfer:fdpic:read packet.
177 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
178
a959a88d
EZ
1792011-08-05 Eli Zaretskii <eliz@gnu.org>
180
181 * win32-low.c: Include <stdint.h>.
182
1ced966e
PA
1832011-07-22 Pedro Alves <pedro@codesourcery.com>
184
185 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
186 to the inferior here.
187 (i386_remove_aligned_watchpoint): Ditto.
188 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
189 fit part of the watchpoint in the debug registers.
190 (i386_update_inferior_debug_regs): New.
191 (i386_low_insert_watchpoint): Work on a local mirror of the debug
192 registers, and only update the inferior on success.
193 (i386_low_remove_watchpoint): Ditto.
194
d26e3629
KY
1952011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
196
197 * linux-low.c (compare_ints, unique, list_threads, show_process,
198 linux_core_of_thread): Delete.
199 (linux_target_ops): Change linux_core_of_thread to
200 linux_common_core_of_thread.
201 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
202 * utils.c (malloc_failure): Change type of argument.
203 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
204 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
205 common/linux-osdata.c, common/ptid.c and common/buffer.c.
206 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
207 (IPA_OBJS): Add common-utils-ipa.o.
208 (ptid_h, linux_osdata_h): New macros.
209 (server_h): Add common/common-utils.h, common/xml-utils.h,
210 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
211 common/ptid.h.
212 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
213 ptid.o, buffer.o): New rules.
214 (linux-low.o): Add common/linux-osdata.h as a dependency.
215 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
216 * configure.ac: Add AC_HEADER_DIRENT check.
217 * config.in: Regenerate.
218 * configure: Regenerate.
219 * remote-utils.c (xml_escape_text): Delete.
220 (buffer_grow, buffer_free, buffer_init, buffer_finish,
221 buffer_xml_printf): Move to common/buffer.c.
222 * server.c (main): Remove call to initialize_inferiors.
223 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
224 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
225 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
226 internal_error, gdb_assert, gdb_assert_fail): Delete.
227 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
228 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
229 common/buffer.h.
230 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
231 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
232 initialize_inferiors): Delete.
233
2275a1a7
PA
2342011-07-20 Pedro Alves <pedro@codesourcery.com>
235
236 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
237 symbol error.
238
0a5b1e09
PA
2392011-05-31 Pedro Alves <pedro@codesourcery.com>
240
241 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
242 assertion.
243 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
244
6938fd34
YQ
2452011-05-26 Yao Qi <yao@codesourcery.com>
246
247 * Makefile.in (thread-db.o): Track dependence to
248 common/gdb_thread_db.h.
249 * thread-db.c: include gdb_thread_db.h from right place.
250
b481f9e0
TT
2512011-05-16 Adrian Cornish <gnu@bluedreamer.com>
252
253 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
254 __FILE__ and __LINE__ to internal_error.
255
98a5dd13
DE
2562011-05-13 Doug Evans <dje@google.com>
257
258 * thread-db.c (try_thread_db_load_from_sdir): New function.
259 (try_thread_db_load_from_dir): New function.
260 (thread_db_load_search): Handle $sdir, ignore $pdir.
261 Remove trying of system directories if search of
262 libthread-db-search-path fails, that is now done via $sdir.
263
d248b706
KY
2642011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
265
266 * server.c (handle_query): Add EnableDisableTracepoints to the list
267 of supported features.
268 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
269 tracepoints.
270 (cmd_qtenable_disable): New.
271 (cmd_qtstart): Install tracepoints even if disabled.
272 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
273 receiving a QTEnable or QTDisable packet.
274 (gdb_collect): Skip data collection if fast tracepoint is disabled.
275 (ust_marker_to_static_tracepoint): Do not ignore disabled static
276 tracepoints.
277 (gdb_probe): Skip data collection if static tracepoint is disabled.
278
84e578fb
DE
2792011-05-10 Doug Evans <dje@google.com>
280
281 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
282
71f55dd8
DE
2832011-05-04 Doug Evans <dje@google.com>
284
285 * linux-low.c (linux_join): Skip process lookup.
286 * spu-low.c (spu_join): Ditto.
287 * server.c (join_inferiors_callback): Delete.
288 (process_serial_event): For 'D' packet (detach) call join_inferior
289 directly.
290
4d393d60
JM
2912011-05-04 Joseph Myers <joseph@codesourcery.com>
292
293 * README: Don't mention xscale*-*-linux*.
294 * configure.srv (xscale*-*-linux*): Don't handle target.
295
b00ad6ff
NF
2962011-04-27 Nathan Froyd <froydnj@codesourcery.com>
297
298 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
299 casting pointers.
300 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
301 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
302 (i386_emit_void_call_2): Likewise.
303
af96c192
YQ
3042011-04-26 Yao Qi <yao@codesourcery.com>
305
306 * linux-low.c: Move common macros to linux-ptrace.h.
307 Include linux-ptrace.h.
308 * Makefile.in (linux_ptrace_h): New.
309 (linux-low.o): Depends on linux-ptrace.h.
310
03f2bd59
JK
3112011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
312
313 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
314 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
315 (remote_prepare): New function with most of the TCP code from ...
316 (remote_open): ... here. Detect PORT here unconditionally. Move also
317 setting transport_is_reliable.
318 * server.c (run_once): New variable.
319 (gdbserver_usage): Document it.
320 (main): Set run_once for `--once'. Call remote_prepare. Exit after
321 the first run if RUN_ONCE.
322 * server.h (run_once, remote_prepare): New declarations.
323
7a9dd1b2
TT
3242011-04-19 Tom Tromey <tromey@redhat.com>
325
326 * win32-low.c (handle_load_dll): Remove duplicate "the".
327
81239425
PM
3282011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
329
330 Remove support for old Cygwin 1.5 versions.
331 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
332 function to avoid warning.
333 (win32_add_one_solib): Use cygwin_conv_path function to avoid
334 warning.
335
9e0627f1
PM
3362011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
337
338 * gdbserver/server.h (Macro _): Define it if not available.
339
588eebee
MS
3402011-03-14 Michael Snyder <msnyder@vmware.com>
341
348af9f7 342 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 343
43f70d4c
JB
3442011-03-10 Joel Brobecker <brobecker@adacore.com>
345
346 * Makefile.in (maintainer-clean realclean distclean): Remove
347 "make ... subdir_do" command.
348
348af9f7
MS
3492011-03-10 Michael Snyder <msnyder@vmware.com>
350
351 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
352
353 * server.c (handle_v_run): Free alloced buffer on early return.
354
e637a4f5
YQ
3552011-03-09 Yao Qi <yao@codesourcery.com>
356
357 Revert:
358 2011-03-04 Yao Qi <yao@codesourcery.com>
359
360 * Makefile.in: Remove GNU make feature --directory.
361
362 2011-03-05 Yao Qi <yao@codesourcery.com>
363
364 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
365 (subdir_do): New make target. Copied from gdb/Makefile.
366 (maintainer-clean, realclean, distclean, clean): Call corresponding
367 make targets in common/Makefile.
368
369 2011-02-11 Yao Qi <yao@codesourcery.com>
370
371 * configure.ac: Call AC_PROG_RANLIB.
372 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
373 * configure: Regenerate.
374
e6edda56
JK
3752011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
376
377 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
378
e5141119
JB
3792011-03-06 Yao Qi <yao@codesourcery.com>
380
381 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
382
64794aa4
JB
3832011-03-05 Yao Qi <yao@codesourcery.com>
384
385 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
386 (subdir_do): New make target. Copied from gdb/Makefile.
387 (maintainer-clean, realclean, distclean, clean): Call corresponding
388 make targets in common/Makefile.
389
7a762829
YQ
3902011-03-04 Yao Qi <yao@codesourcery.com>
391
392 * Makefile.in: Remove GNU make feature --directory.
393
348af9f7
MS
3942011-03-04 Michael Snyder <msnyder@vmware.com>
395
396 * server.c (queue_stop_reply): Call xmalloc not malloc.
397
3982011-03-02 Michael Snyder <msnyder@vmware.com>
399
400 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
401
9f72fee2
MS
4022011-02-28 Michael Snyder <msnyder@vmware.com>
403
588eebee
MS
404 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
405 (cmd_qtframe): Ditto.
406 (cmd_qtbuffer): Ditto.
407 (cmd_bigqtbuffer): Ditto.
408
9f72fee2
MS
409 * utils.c (decimal2str): Initialize 'width' to nine, then
410 don't mess with it.
411
8040bd49
UW
4122011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
413
414 * hostio.c (require_data): Free *data, not data.
415
7e52cbd0
JK
4162011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
417
418 * hostio.c (require_data): Use free, not xfree.
419
9130f83e
MS
4202011-02-27 Michael Snyder <msnyder@vmware.com>
421
4b812f4e
MS
422 * server.c (handle_query): Discard unused value.
423
9130f83e
MS
424 * hostio.c (require_data): Free malloc memory before returning
425 error.
426
69d37113
MS
4272011-02-26 Michael Snyder <msnyder@vmware.com>
428
429 * linux-low.c (list_threads): Call closedir for dirent.
430
35f5825a
MS
4312011-02-27 Michael Snyder <msnyder@vmware.com>
432
2a589cef
MS
433 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
434 a case statement falls through.
435
0adea5f7
MS
436 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
437
35f5825a
MS
438 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
439 in comparison.
440
238f1c74
MS
4412011-02-26 Michael Snyder <msnyder@vmware.com>
442
443 * utils.c (decimal2str): Eliminate dead code and dead param.
444 (pulongest): Drop dead param from call to decimal2str.
445 (plongest): Ditto.
446
633ff500
JB
4472011-02-24 Joel Brobecker <brobecker@adacore.com>
448
449 Revert the following patch (not approved yet):
450 2011-02-21 Hui Zhu <teawater@gmail.com>
451 * tracepoint.c (tp_printf): New function.
452 (eval_agent_expr): Handle gdb_agent_op_printf.
453
f9c6ff72
HZ
4542011-02-21 Hui Zhu <teawater@gmail.com>
455
456 * tracepoint.c (tp_printf): New function.
457 (eval_agent_expr): Handle gdb_agent_op_printf.
458
94d5e490
TT
4592011-02-18 Tom Tromey <tromey@redhat.com>
460
461 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
462 (tracepoint.o): Likewise.
463 * tracepoint.c (enum gdb_agent_op): Use ax.def.
464 (gdb_agent_op_names): Likewise.
465
c7f96d2b
TT
4662011-02-18 Tom Tromey <tromey@redhat.com>
467
468 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
469 gdb_agent_op_rot>: New constants.
470 (gdb_agent_op_names): Add pick and roll.
471 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
472 cases.
473
0feedb2c
JK
4742011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
475
476 * aclocal.m4: Regenerated with aclocal-1.11.1.
477
b3b9301e
PA
4782011-02-14 Pedro Alves <pedro@codesourcery.com>
479
480 * server.c (handle_qxfer_traceframe_info): New.
481 (qxfer_packets): Register "traceframe-info".
482 (handle_query): Report support for qXfer:traceframe-info:read+.
483 * tracepoint.c (match_blocktype): New.
484 (traceframe_find_block_type): Rename to ...
485 (traceframe_walk_blocks): ... this. Add callback filter argument,
486 and use it.
487 (traceframe_find_block_type): New, reimplemented on top of
488 traceframe_walk_blocks.
489 (build_traceframe_info_xml): New.
490 (traceframe_read_info): New.
491 * server.h (traceframe_read_info): Declare.
492
4f3e6fb7
YQ
4932011-02-11 Yao Qi <yao@codesourcery.com>
494
495 * configure.ac: Call AC_PROG_RANLIB.
496 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
497 * configure: Regenerate.
498
764880b7
PA
4992011-02-07 Pedro Alves <pedro@codesourcery.com>
500
501 * server.c (gdb_read_memory): Change return semantics to allow
502 partial transfers.
503 (handle_search_memory_1): Adjust.
504 (process_serial_event) <'m' packet>: Handle partial transfers.
505 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
506
1c79eb8a
PA
5072011-01-28 Pedro Alves <pedro@codesourcery.com>
508
509 * regcache.c (init_register_cache): Initialize
510 regcache->register_status.
511 (free_register_cache): Release regcache->register_status.
512 (regcache_cpy): Copy register_status.
513 (registers_to_string): Print 'x's for unavailable registers.
514 (supply_register): Mark the register's status valid or
515 unavailable, depending on whether a buffer was passed in or not.
516 (supply_register_zeroed): New.
517 (supply_regblock): Mark the registers' status valid or
518 unavailable, depending on whether a buffer was passed in or not.
519 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
520 (struct regcache): New `register_status' field.
521 (supply_register_zeroed): Declare.
522 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
523 supply_register_zeroed, rather than passing a NULL buffer to
524 supply_register.
525 * tracepoint.c (fetch_traceframe_registers): Update comment.
526
85724a0e
PA
5272011-01-28 Pedro Alves <pedro@codesourcery.com>
528
529 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
530 buffer explicit.
531
d08aafef
PA
5322011-01-25 Pedro Alves <pedro@codesourcery.com>
533
534 * server.h (decode_xfer_write): Change prototype.
535 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
536 and don't extract the annex here.
537 * server.c (decode_xfer_read): Remove `annex' parameter,
538 and don't extract the annex here.
539 (decode_xfer): New.
540 (struct qxfer): New.
541 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
542 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
543 (handle_qxfer_statictrace): New functions, abstracted out from
544 handle_query, and made to use the struct qxfer interface.
545 (handle_threads_qxfer_proper): Rename to ...
546 (handle_qxfer_threads_proper): ... this.
547 (handle_threads_qxfer): Rename to ...
548 (handle_qxfer_threads): ... this. Adjust.
549 (qxfer_packets): New array.
550 (handle_qxfer): New function.
551 (handle_query): Use handle_qxfer.
552
493e2a69
MS
5532011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
554
555 * gdbreplay.c: Shorten lines of >= 80 columns.
556 * linux-low.c: Ditto.
557 * linux-ppc-low.c: Ditto.
558 * linux-s390-low.c: Ditto.
559 * linux-sparc-low.c: Ditto.
560 * linux-x86-low.c: Ditto.
561 * linux-xtensa-low.c: Ditto.
562 * mem-break.c: Ditto.
563 * nto-low.c: Ditto.
564 * regcache.h: Ditto.
565 * remote-utils.c: Ditto.
566 * server.c: Ditto.
567 * server.h: Ditto.
568 * thread-db.c: Ditto.
569 * tracepoint.c: Ditto.
570 * utils.c: Ditto.
571 * win32-low.h: Ditto.
572
44944448
JB
5732011-01-05 Joel Brobecker <brobecker@adacore.com>
574
575 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
576 update.
577
71ce852c
JB
5782011-01-01 Joel Brobecker <brobecker@adacore.com>
579
580 * server.c (gdbserver_version): Update copyright year in version
581 output.
582 * gdbreplay.c (gdbreplay_version): Ditto.
583
eb826dc6
MF
5842010-12-29 Jie Zhang <jie.zhang@analog.com>
585
586 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
587 * linux-bfin-low.c: New file.
588 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
589 PT_DATA_ADDR for BFIN targets.
590 * Makefile.in (SFILES): Add linux-bfin-low.c.
591 (clean): Remove reg-bfin.c.
592 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
593 * README: Mention supported Blackfin targets.
594
39ab222a
MF
5952010-12-23 Mike Frysinger <vapier@gentoo.org>
596
597 * .gitignore: New file.
598
a1f2ce7d
MF
5992010-11-16 Mike Frysinger <vapier@gentoo.org>
600
601 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
602
f474844c
JZ
6032010-10-22 Jie Zhang <jie@codesourcery.com>
604
605 * Makefile.in: Add FLAGS_TO_PASS variable.
606 (install): Remove dependency of install-only and recursively
607 invoke make for install-only.
608
f1048712
DE
6092010-10-04 Doug Evans <dje@google.com>
610
611 * Makefile.in (uninstall): Use $(DESTDIR).
612
b53a1623
PA
6132010-09-24 Pedro Alves <pedro@codesourcery.com>
614
e6ee044d
PA
615 PR gdb/11842
616
b53a1623
PA
617 * linux-x86-low.c (compat_siginfo_from_siginfo)
618 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
619 si_code is < 0. Check for si_code == SI_TIMER before checking for
620 si_code < 0.
621
fa1bd1e4
JB
6222010-09-13 Joel Brobecker <brobecker@adacore.com>
623
624 * lynx-i386-low.c: New file.
625 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
626
47fac8f8
JB
6272010-09-13 Joel Brobecker <brobecker@adacore.com>
628
629 * lynx-low.c (ptrace_request_to_str): Remove handling for
630 request values that have been removed in LynxOS 5.x.
631
1adfc54d
JB
6322010-09-13 Joel Brobecker <brobecker@adacore.com>
633
634 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
635 <ptrace.h>
636
c2a66c29
NS
6372010-09-09 Nathan Sidwell <nathan@codesourcery.com>
638
639 * configure.ac: Add --enable-inprocess-agent option.
640 * configure: Rebuilt.
641
32fcada3
YQ
6422010-09-06 Yao Qi <yao@codesourcery.com>
643
644 * linux-low.c (linux_kill): Remove unused variable.
645 (linux_stabilize_threads): Likewise.
646 * server.c (start_inferior): Likewise.
647 (queue_stop_reply_callback): Likewise.
648 * tracepoint.c (do_action_at_tracepoint): Likewise.
649
0cccb683
YQ
6502010-09-06 Yao Qi <yao@codesourcery.com>
651
652 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
653 on return.
654
423ec54c
JK
6552010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
656
657 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
658
12ac6819
PA
6592010-09-06 Pedro Alves <pedro@codesourcery.com>
660
661 * Makefile.in (install-only): Replace $IPA_DEPFILES with
662 "$(IPA_DEPFILES)".
663
8ed54b31
JB
6642010-09-01 Joel Brobecker <brobecker@adacore.com>
665
666 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
667 gdbserver/lynx-ppc-low.c: New files.
668 * Makefile.in (lynx_low_h): New variable.
669 (lynx-low.o, lynx-ppc-low.o): New rules.
670 * configure.ac: On LynxOS, link with -lnetinet.
671 * configure.srv: Add handling of powerpc-*-lynxos* targets.
672 * configure: regenerate.
673
bb0116a4
JB
6742010-09-01 Joel Brobecker <brobecker@adacore.com>
675
676 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
677 * configure.ac: Add check for vasprintf and vsnprintf.
678 * configure, config.in: Regenerate.
679 * server.h (vasprintf, vsnprintf): Add conditional declarations.
680
a778ab81 6812010-09-01 Joel Brobecker <brobecker@adacore.com>
682
683 * gdbreplay.c: Move include of alloca.h up, next to include of
684 malloc.h.
685 * server.h: Add include of malloc.h.
686 * mem-break.c: Remove include of malloc.h.
687 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
688
8b034a19 6892010-09-01 Joel Brobecker <brobecker@adacore.com>
690
691 * Makefile.in (memmem.o): Build with -Wno-error.
692
6932010-09-01 Joel Brobecker <brobecker@adacore.com>
694
695 * utils.c (xsnprintf): Make non-static.
696 * server.h: Add xsnprintf declaration.
697 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
698 replace calls to snprintf by calls to xsnprintf throughout.
699
7002010-09-01 Joel Brobecker <brobecker@adacore.com>
701
702 * configure.ac: Add configure check for alloca.
703 * configure, config.in: Regenerate.
704 * server.h: Include alloca.h if it exists.
705 * gdbreplay.c: Include alloca.h if it exists.
706
1a981360
PA
7072010-08-28 Pedro Alves <pedro@codesourcery.com>
708
709 * linux-low.c (__SIGRTMIN): Define if not already defined.
710 (linux_create_inferior): Check for __ANDROID__ rather than
711 __SIGRTMIN.
712 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
713 are already deferred.
714 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
715 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
716 stopped and already has a pending signal to report.
717 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
718 a pending signal to report or is moving out of a jump pad.
719 (linux_init_signals): Check for __ANDROID__ rather than
720 __SIGRTMIN.
721
b4d51a55
PA
7222010-08-28 Pedro Alves <pedro@codesourcery.com>
723
724 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
725 debug_threads check. Avoid a linear search when not doing debug
726 output.
727
ec48365d
PA
7282010-08-27 Pedro Alves <pedro@codesourcery.com>
729
730 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
731 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
732 (struct file_handler) <fd>: Change type to gdb_fildes_t.
733 (process_event): Change local fd's type to gdb_fildes_t.
734 (create_file_handler): Adjust prototype.
735 (delete_file_handler): Adjust prototype.
736 (handle_file_event): Adjust prototype. Use pfildes.
737 (create_file_event): Adjsut prototype.
738 * remote-utils.c (remote_desc, listen_desc): Change type to
739 gdb_fildes_t.
740 * server.h: New gdb_fildes_t typedef.
741 [USE_WIN32API]: Include winsock2.h.
742 (delete_file_handler, add_file_handler): Adjust prototypes.
743 (pfildes): Declare.
744 * utils.c (pfildes): New.
745
854d88f0
PA
7462010-08-27 Pedro Alves <pedro@codesourcery.com>
747
748 * configure.ac (build_warnings): Add -Wno-char-subscripts.
749 * configure: Regenerate.
750
0146f85b
PA
7512010-08-27 Pedro Alves <pedro@codesourcery.com>
752
753 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
754 (linux_done_accessing_memory): ... this.
755 (linux_target_ops): Adjust.
756 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
757 * nto-low.c (nto_target_ops): Adjust comment.
758 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
759 * spu-low.c (spu_target_ops): Adjust comment.
760 * target.h (target_ops): Rename unprepare_to_access_memory field
761 to done_accessing_memory.
762 (unprepare_to_access_memory): Rename to ...
763 (done_accessing_memory): ... this.
764
90d74c30
PA
7652010-08-26 Pedro Alves <pedro@codesourcery.com>
766
767 * linux-low.c (linux_prepare_to_access_memory): New.
768 (linux_unprepare_to_access_memory): New.
769 (linux_target_ops): Install them.
770 * server.c (read_memory): Rename to ...
771 (gdb_read_memory): ... this. Use
772 prepare_to_access_memory/prepare_to_access_memory.
773 (write_memory): Rename to ...
774 (gdb_write_memory): ... this. Use
775 prepare_to_access_memory/prepare_to_access_memory.
776 (handle_search_memory_1): Adjust.
777 (process_serial_event): Adjust.
778 * target.h (struct target_ops): New fields
779 prepare_to_access_memory and unprepare_to_access_memory.
780 (prepare_to_access_memory, unprepare_to_access_memory): New.
781 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
782 prepare_to_access_memory/prepare_to_access_memory.
783 * nto-low.c (nto_target_ops): Adjust.
784 * spu-low.c (spu_target_ops): Adjust.
785 * win32-low.c (win32_target_ops): Adjust.
786
fd467969
PA
7872010-08-26 Pedro Alves <pedro@codesourcery.com>
788
789 * Makefile.in (WARN_CFLAGS): Get it from configure.
790 (WERROR_CFLAGS): New.
791 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
792 * configure.ac: Introduce --enable-werror, which adds -Werror to
793 the compiler command line. Enabled by default. Disable with
794 --disable-werror. Add -Wdeclaration-after-statement
795 Wpointer-arith and -Wformat-nonliteral to warning flags.
796 * configure: Regenerate.
797
331e2f5f
PA
7982010-08-26 Pedro Alves <pedro@codesourcery.com>
799
800 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
801
e581f2b4
PA
8022010-08-26 Pedro Alves <pedro@codesourcery.com>
803
804 * gdbreplay.c (remote_error): New.
805 (gdbchar): New.
806 (expect): Use gdbchar. Check for error reading from GDB.
807 Clarify sync error output.
808 (play): Check for errors writing to GDB.
809 * linux-low.c (sigchld_handler): Really ignore `write' errors.
810 * remote-utils.c (getpkt): Check for errors writing to the remote
811 descriptor.
812
3c11dd79
PA
8132010-08-25 Pedro Alves <pedro@codesourcery.com>
814
815 * linux-low.c (linux_wait_1): Move non-debugging code out of
816 `debug_threads' control.
817
d20a8ad9
PA
8182010-08-25 Pedro Alves <pedro@codesourcery.com>
819
820 * linux-low.c (linux_wait_1): Don't set last_status here.
821 * server.c (push_event, queue_stop_reply_callback): Assert we're
822 not pushing a TARGET_WAITKIND_IGNORE event.
823 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
824 (myresume, handle_target_event): Set the thread's last_resume_kind
825 and last_status from the target returned status.
826
964e4306
PA
8272010-08-25 Pedro Alves <pedro@codesourcery.com>
828
829 PR threads/10729
830
831 * linux-x86-low.c (update_debug_registers_callback): New.
832 (i386_dr_low_set_addr): Use it.
833 (i386_dr_low_get_addr): New.
834 (i386_dr_low_set_control): Use update_debug_registers_callback.
835 (i386_dr_low_get_control): New.
836 (i386_dr_low_get_status): Adjust.
837 * linux-low.c (linux_stop_lwp): New.
838 * linux-low.h (linux_stop_lwp): Declare.
839
840 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
841 argument instead of a i386_debug_reg_state.
842 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
843 a i386_debug_reg_state.
844 (i386_insert_aligned_watchpoint): Adjust.
845 (i386_remove_aligned_watchpoint): Adjust.
846 (i386_low_stopped_data_address): Read the debug registers from the
847 inferior instead of from the mirrors.
848 * i386-low.h (struct i386_debug_reg_state): Extend comment.
849 (i386_dr_low_get_addr): Declare.
850 (i386_dr_low_get_control): Declare.
851 (i386_dr_low_get_status): Change prototype.
852
853 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
854 (i386_dr_low_get_addr): New.
855 (i386_dr_low_get_control): New.
856 (i386_dr_low_get_status): Adjust prototype. Return
857 dr_status_mirror.
858 (i386_initial_stuff): Clear dr_status_mirror and
859 dr_control_mirror.
860 (i386_get_thread_context): Adjust.
861 (i386_set_thread_context): Adjust.
862 (i386_thread_added): Adjust.
863
5f21a75b
PA
8642010-08-24 Pedro Alves <pedro@codesourcery.com>
865
866 * linux-low.h (linux_thread_area): Delete declaration.
867
3e4c1235
TS
8682010-08-11 Thomas Schwinge <thomas@codesourcery.com>
869
870 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
871 after its termination.
872
1971b033
PA
8732010-08-09 Pedro Alves <pedro@codesourcery.com>
874
875 * linux-low.c (gdb_wants_lwp_stopped): Delete.
876 (gdb_wants_all_stopped): Delete.
877 (linux_wait_1): Don't call them.
878 * server.c (handle_v_cont): Tag all threads as want-stopped.
879 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
880 stopped as "client-wants-stopped".
881
310444ac
PA
8822010-07-31 Pedro Alves <pedro@codesourcery.com>
883
884 * Makefile.in (signals_h): New.
885 (server_h): Depend on it.
886 (server.o): Don't depend on $(signals_def).
887 (signals.o): Depend on $(signals_def).
888
a19cae16
JK
8892010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
890
891 * Makefile.in (signals_def): New.
892 (server_h): Append include/gdb/signals.h and signals_def.
893 (server.o): Append signals_def.
894
30d50328
JK
8952010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
896
897 * server.c (handle_target_event): Use target_signal_to_host for
898 resume_info.sig initialization.
899 * target.h (struct thread_resume) <sig>: New comment.
900
5c3216e2
OS
9012010-07-20 Ozkan Sezer <sezeroz@gmail.com>
902
c6f46ca0
OS
903 * server.c (handle_query): strcpy() the returned string from paddress()
904 instead of sprintf().
5c3216e2
OS
905 * utils.c (paddress): Return phex_nz().
906
6bd31874
JB
9072010-07-07 Joel Brobecker <brobecker@adacore.com>
908
909 * server.c (handle_v_cont): Call mourn_inferior if process
910 just exited.
911 (myresume): Likewise.
912
0fb4aa4b
PA
9132010-07-01 Pedro Alves <pedro@codesourcery.com>
914
915 Static tracepoints, and integration with UST.
916
917 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
918 * mem-break.c (uninsert_all_breakpoints)
919 (reinsert_all_breakpoints): New.
920 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
921 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
922 (gdb_agent_ust_loaded, helper_thread_id)
923 (gdb_agent_helper_thread_id): New macros.
924 (struct ipa_sym_addresses): Add addr_ust_loaded,
925 addr_helper_thread_id, addr_cmd_buf.
926 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
927 (in_process_agent_loaded_ust): New.
928 (write_e_ust_not_loaded): New.
929 (maybe_write_ipa_ust_not_loaded): New.
930 (struct collect_static_trace_data_action): New.
931 (enum tracepoint_type) <static_tracepoint>: New.
932 (struct tracepoint) <handle>: Mention static tracepoints.
933 (struct static_tracepoint_ctx): New.
934 (CMD_BUF_SIZE): New.
935 (add_tracepoint_action): Handle static tracepoint actions.
936 (unprobe_marker_at): New.
937 (clear_installed_tracepoints): Handle static tracepoints.
938 (cmd_qtdp): Handle static tracepoints.
939 (probe_marker_at): New.
940 (cmd_qtstart): Handle static tracepoints.
941 (response_tracepoint): Handle static tracepoints.
942 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
943 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
944 (get_context_regcache): Handle static tracepoints.
945 (do_action_at_tracepoint): Handle static tracepoint actions.
946 (traceframe_find_block_type): Handle static trace data blocks.
947 (traceframe_read_sdata): New.
948 (download_tracepoints): Download static tracepoint actions.
949 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
950 (GDB_PROBE_NAME): New.
951 (ust_ops): New.
952 (GET_UST_SYM): New.
953 (USTF): New.
954 (dlsym_ust): New.
955 (ust_marker_to_static_tracepoint): New.
956 (gdb_probe): New.
957 (collect_ust_data_at_tracepoint): New.
958 (gdb_ust_probe): New.
959 (UNIX_PATH_MAX, SOCK_DIR): New.
960 (gdb_ust_connect_sync_socket): New.
961 (resume_thread, stop_thread): New.
962 (run_inferior_command): New.
963 (init_named_socket): New.
964 (gdb_ust_socket_init): New.
965 (cstr_to_hexstr): New.
966 (next_st): New.
967 (first_marker, next_marker): New.
968 (response_ust_marker): New.
969 (cmd_qtfstm, cmd_qtsstm): New.
970 (unprobe_marker_at, probe_marker_at): New.
971 (cmd_qtstmat, gdb_ust_thread): New.
972 (gdb_ust_init): New.
973 (initialize_tracepoint_ftlib): Call gdb_ust_init.
974 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
975 (ST_REGENTRY): New.
976 (x86_64_st_collect_regmap): New.
977 (X86_64_NUM_ST_COLLECT_GREGS): New.
978 (AMD64_RIP_REGNUM): New.
979 (supply_static_tracepoint_registers): New.
980 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
981 (ST_REGENTRY): New.
982 (i386_st_collect_regmap): New.
983 (i386_NUM_ST_COLLECT_GREGS): New.
984 (supply_static_tracepoint_registers): New.
985 * server.c (handle_query): Handle qXfer:statictrace:read.
986 <qSupported>: Report support for StaticTracepoints, and
987 qXfer:statictrace:read features.
988 * server.h (traceframe_read_sdata)
989 (supply_static_tracepoint_registers): Declare.
990 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
991 (unpack_varlen_hex): Include in IPA build.
992 * Makefile.in (ustlibs, ustinc): New.
993 (IPA_OBJS): Add remote-utils-ipa.o.
994 ($(IPA_LIB)): Link -ldl and -lpthread.
995 (UST_CFLAGS): New.
996 (IPAGENT_CFLAGS): Add UST_CFLAGS.
997 * config.in, configure: Regenerate.
998
9e4344e5
PA
9992010-06-20 Ian Lance Taylor <iant@google.com>
1000 Pedro Alves <pedro@codesourcery.com>
1001
1002 * linux-x86-low.c (always_true): Delete.
1003 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1004 trying to fool the compiler with always_true.
1005
c6beb2cb
PA
10062010-06-20 Pedro Alves <pedro@codesourcery.com>
1007
1008 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1009 conditions in gdbserver.
1010
d2ed6730
UW
10112010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1012
1013 * spu-low.c (spu_read_memory): Wrap around local store limit.
1014 (spu_write_memory): Likewise.
1015
4e29fb54
PA
10162010-06-15 Pedro Alves <pedro@codesourcery.com>
1017
1018 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1019 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1020 LONGEST uses.
1021 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1022 uses.
1023 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1024 uses with LONGEST uses.
1025
6a271cae
PA
10262010-06-14 Stan Shebs <stan@codesourcery.com>
1027 Pedro Alves <pedro@codesourcery.com>
1028
1029 Bytecode compiler.
1030
1031 * linux-x86-low.c: Include limits.h.
1032 (add_insns): New.
1033 (always_true): New.
1034 (EMIT_ASM): New.
1035 (EMIT_ASM32): New.
1036 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1037 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1038 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1039 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1040 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1041 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1042 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1043 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1044 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1045 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1046 (amd64_emit_void_call_2): New.
1047 (amd64_emit_ops): New.
1048 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1049 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1050 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1051 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1052 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1053 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1054 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1055 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1056 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1057 (i386_emit_stack_adjust, i386_emit_int_call_1)
1058 (i386_emit_void_call_2): New.
1059 (i386_emit_ops): New.
1060 (x86_emit_ops): New.
1061 (the_low_target): Install x86_emit_ops.
1062 * server.h (struct emit_ops): New.
1063 (get_raw_reg_func_addr): Declare.
1064 (current_insn_ptr, emit_error): Declare.
1065 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1066 (set_trace_state_variable_value): New defines.
1067 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1068 addr_get_trace_state_variable_value and
1069 addr_set_trace_state_variable_value.
1070 (symbol_list): New fields for get_raw_reg,
1071 get_trace_state_variable_value and set_trace_state_variable_value.
1072 (condfn): New typedef.
1073 (struct tracepoint): New field `compiled_cond'.
1074 (do_action_at_tracepoint): Clear compiled_cond.
1075 (get_trace_state_variable_value, set_trace_state_variable_value):
1076 Export in the IPA.
1077 (condition_true_at_tracepoint): If there's a compiled condition,
1078 run that.
1079 (current_insn_ptr, emit_error): New globals.
1080 (struct bytecode_address): New.
1081 (get_raw_reg_func_addr): New.
1082 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1083 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1084 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1085 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1086 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1087 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1088 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1089 (compile_tracepoint_condition, compile_bytecodes): New.
1090 * target.h (emit_ops): Forward declare.
1091 (struct target_ops): New field emit_ops.
1092 (target_emit_ops): New.
1093 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1094 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1095 * linux-low.c (linux_emit_ops): New.
1096 (linux_target_ops): Install it.
1097 * linux-low.h (struct linux_target_ops): New field emit_ops.
1098
92b72907
UW
10992010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1100
1101 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1102 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1103
fa593d66
PA
11042010-06-01 Pedro Alves <pedro@codesourcery.com>
1105 Stan Shebs <stan@codesourcery.com>
1106
1107 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1108 (all): Depend on $(extra_libraries).
1109 (install-only): Install the IPA.
1110 (IPA_OBJS, IPA_LIB): New.
1111 (clean): Remove the IPA lib.
1112 (IPAGENT_CFLAGS): New.
1113 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1114 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1115 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1116 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1117 * configure.ac: Check for atomic builtins support in the compiler.
1118 (IPA_DEPFILES, extra_libraries): Define.
1119 * configure.srv (ipa_obj): Add description.
1120 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1121 (i[34567]86-*-linux*): Set ipa_obj.
1122 (x86_64-*-linux*): Set ipa_obj.
1123 * linux-low.c (stabilizing_threads): New.
1124 (supports_fast_tracepoints): New.
1125 (linux_detach): Stabilize threads before detaching.
1126 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1127 the lwp is either not stabilizing, or is moving out of a jump pad.
1128 (linux_fast_tracepoint_collecting): New.
1129 (maybe_move_out_of_jump_pad): New.
1130 (enqueue_one_deferred_signal): New.
1131 (dequeue_one_deferred_signal): New.
1132 (linux_wait_for_event_1): If moving out of a jump pad, defer
1133 pending signals to later.
1134 (linux_stabilize_threads): New.
1135 (linux_wait_1): Check if threads need moving out of jump pads, and
1136 do it if so.
1137 (stuck_in_jump_pad_callback): New.
1138 (move_out_of_jump_pad_callback): New.
1139 (lwp_running): New.
1140 (linux_resume_one_lwp): Handle moving out of jump pads.
1141 (linux_set_resume_request): Dequeue deferred signals.
1142 (need_step_over_p): Also step over fast tracepoint jumps.
1143 (start_step_over): Also uninsert fast tracepoint jumps.
1144 (finish_step_over): Also reinsert fast tracepoint jumps.
1145 (linux_install_fast_tracepoint_jump): New.
1146 (linux_target_ops): Install linux_stabilize_threads and
1147 linux_install_fast_tracepoint_jump_pad.
1148 * linux-low.h (linux_target_ops) <get_thread_area,
1149 install_fast_tracepoint_jump_pad>: New fields.
1150 (struct lwp_info) <collecting_fast_tracepoint,
1151 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1152 (linux_get_thread_area): Declare.
1153 * linux-x86-low.c (jump_insn): New.
1154 (x86_get_thread_area): New.
1155 (append_insns): New.
1156 (push_opcode): New.
1157 (amd64_install_fast_tracepoint_jump_pad): New.
1158 (i386_install_fast_tracepoint_jump_pad): New.
1159 (x86_install_fast_tracepoint_jump_pad): New.
1160 (the_low_target): Install x86_get_thread_area and
1161 x86_install_fast_tracepoint_jump_pad.
1162 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1163 (struct fast_tracepoint_jump): New.
1164 (fast_tracepoint_jump_insn): New.
1165 (fast_tracepoint_jump_shadow): New.
1166 (find_fast_tracepoint_jump_at): New.
1167 (fast_tracepoint_jump_here): New.
1168 (delete_fast_tracepoint_jump): New.
1169 (set_fast_tracepoint_jump): New.
1170 (uninsert_fast_tracepoint_jumps_at): New.
1171 (reinsert_fast_tracepoint_jumps_at): New.
1172 (set_breakpoint_at): Use write_inferior_memory.
1173 (uninsert_raw_breakpoint): Use write_inferior_memory.
1174 (check_mem_read): Mask out fast tracepoint jumps.
1175 (check_mem_write): Mask out fast tracepoint jumps.
1176 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1177 (set_fast_tracepoint_jump): Declare.
1178 (delete_fast_tracepoint_jump)
1179 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1180 (reinsert_fast_tracepoint_jumps_at): Declare.
1181 * regcache.c: Don't compile many functions when building the
1182 in-process agent library.
1183 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1184 the register buffer in the heap.
1185 (free_register_cache): If the register buffer isn't owned by the
1186 regcache, don't free it.
1187 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1188 pre-existing register caches.
1189 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1190 type.
1191 (convert_ascii_to_int): : Constify `from' parameter type.
1192 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1193 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1194 the needed buffer in-place.
1195 (relocate_instruction): New.
1196 * server.c (handle_query) <qSymbols>: If the target supports
1197 tracepoints, give it a chance of looking up symbols. Report
1198 support for fast tracepoints.
1199 (handle_status): Stabilize threads.
1200 (process_serial_event): Adjust.
1201 * server.h (struct fast_tracepoint_jump): Forward declare.
1202 (struct process_info) <fast_tracepoint_jumps>: New field.
1203 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1204 (decode_X_packet, decode_M_packet): Adjust.
1205 (relocate_instruction): Declare.
1206 (in_process_agent_loaded): Declare.
1207 (tracepoint_look_up_symbols): Declare.
1208 (struct fast_tpoint_collect_status): Declare.
1209 (fast_tracepoint_collecting): Declare.
1210 (force_unlock_trace_buffer): Declare.
1211 (handle_tracepoint_bkpts): Declare.
1212 (initialize_low_tracepoint)
1213 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1214 * target.h (struct target_ops) <stabilize_threads,
1215 install_fast_tracepoint_jump_pad>: New fields.
1216 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1217 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1218 [HAVE_STDINT_H]: Include stdint.h.
1219 (trace_debug_1): Rename to ...
1220 (trace_vdebug): ... this.
1221 (trace_debug): Rename to ...
1222 (trace_debug_1): ... this. Add `level' parameter.
1223 (trace_debug): New.
1224 (ATTR_USED, ATTR_NOINLINE): New.
1225 (IP_AGENT_EXPORT): New.
1226 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1227 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1228 (about_to_request_buffer_space, trace_buffer_is_full)
1229 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1230 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1231 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1232 (traceframe_write_count, traceframes_created)
1233 (trace_state_variables)
1234 New renaming defines.
1235 (struct ipa_sym_addresses): New.
1236 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1237 (symbol_list): New.
1238 (ipa_sym_addrs): New.
1239 (all_tracepoint_symbols_looked_up): New.
1240 (in_process_agent_loaded): New.
1241 (write_e_ipa_not_loaded): New.
1242 (maybe_write_ipa_not_loaded): New.
1243 (tracepoint_look_up_symbols): New.
1244 (debug_threads) [IN_PROCESS_AGENT]: New.
1245 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1246 (UNKNOWN_SIDE_EFFECTS): New.
1247 (stop_tracing): New.
1248 (flush_trace_buffer): New.
1249 (stop_tracing_bkpt): New.
1250 (flush_trace_buffer_bkpt): New.
1251 (read_inferior_integer): New.
1252 (read_inferior_uinteger): New.
1253 (read_inferior_data_pointer): New.
1254 (write_inferior_data_pointer): New.
1255 (write_inferior_integer): New.
1256 (write_inferior_uinteger): New.
1257 (struct collect_static_trace_data_action): Delete.
1258 (enum tracepoint_type): New.
1259 (struct tracepoint) <type>: New field `type'.
1260 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1261 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1262 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1263 (tracepoints): Use IP_AGENT_EXPORT.
1264 (last_tracepoint): Don't include in the IPA.
1265 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1266 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1267 (alloced_trace_state_variables): New.
1268 (trace_state_variables): Use IP_AGENT_EXPORT.
1269 (traceframe_t): Delete unused variable.
1270 (circular_trace_buffer): Don't include in the IPA.
1271 (trace_buffer_start): Delete.
1272 (struct trace_buffer_control): New.
1273 (trace_buffer_free): Delete.
1274 (struct ipa_trace_buffer_control): New.
1275 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1276 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1277 New.
1278 (trace_buffer_ctrl): New.
1279 (TRACE_BUFFER_CTRL_CURR): New.
1280 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1281 Reimplement as macros.
1282 (trace_buffer_wrap): Delete.
1283 (traceframe_write_count, traceframe_read_count)
1284 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1285 (struct tracepoint_hit_ctx) <type>: New field.
1286 (struct fast_tracepoint_ctx): New.
1287 (memory_barrier): New.
1288 (cmpxchg): New.
1289 (record_tracepoint_error): Update atomically in the IPA.
1290 (clear_inferior_trace_buffer): New.
1291 (about_to_request_buffer_space): New.
1292 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1293 updating the same buffer.
1294 (add_tracepoint): Default the tracepoint's type to trap
1295 tracepoint, and orig_size to -1.
1296 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1297 internal variables.
1298 (create_trace_state_variable): New parameter `gdb'. Handle it.
1299 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1300 (cmd_qtdp): Handle fast tracepoints.
1301 (cmd_qtdv): Adjust.
1302 (max_jump_pad_size): New.
1303 (gdb_jump_pad_head): New.
1304 (get_jump_space_head): New.
1305 (claim_jump_space): New.
1306 (sort_tracepoints): New.
1307 (MAX_JUMP_SIZE): New.
1308 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1309 IPA.
1310 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1311 support. Upload fast traceframes, and delete internal IPA
1312 breakpoints.
1313 (stop_tracing_handler): New.
1314 (flush_trace_buffer_handler): New.
1315 (cmd_qtstop): Upload fast tracepoints.
1316 (response_tracepoint): Handle fast tracepoints.
1317 (tracepoint_finished_step): Upload fast traceframes. Set the
1318 tracepoint hit context's tracepoint type.
1319 (handle_tracepoint_bkpts): New.
1320 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1321 type. Add comment about fast tracepoints.
1322 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1323 non-existing action_str field.
1324 (get_context_regcache): Handle fast tracepoints.
1325 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1326 to the regcache.
1327 (fast_tracepoint_from_jump_pad_address): New.
1328 (fast_tracepoint_from_ipa_tpoint_address): New.
1329 (collecting_t): New.
1330 (force_unlock_trace_buffer): New.
1331 (fast_tracepoint_collecting): New.
1332 (collecting): New.
1333 (gdb_collect): New.
1334 (write_inferior_data_ptr): New.
1335 (target_tp_heap): New.
1336 (target_malloc): New.
1337 (download_agent_expr): New.
1338 (UALIGN): New.
1339 (download_tracepoints): New.
1340 (download_trace_state_variables): New.
1341 (upload_fast_traceframes): New.
1342 (IPA_FIRST_TRACEFRAME): New.
1343 (IPA_NEXT_TRACEFRAME_1): New.
1344 (IPA_NEXT_TRACEFRAME): New.
1345 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1346 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1347 (gdb_jump_pad_buffer_end): New.
1348 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1349 (initialize_tracepoint): Adjust.
1350 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1351 buffer. Initialize the low module.
1352 * utils.c (PREFIX, TOOLNAME): New.
1353 (malloc_failure): Use PREFIX.
1354 (error): In the IPA, an error causes an exit.
1355 (fatal, warning): Use PREFIX.
1356 (internal_error): Use TOOLNAME.
1357 (NUMCELLS): Increase to 10.
1358 * configure, config.in: Regenerate.
1359
d149dd1d
PA
13602010-06-01 Pedro Alves <pedro@codesourcery.com>
1361
1362 * server.c (handle_query) <qSupported>: Do two passes over the
1363 qSupported string to avoid nesting strtok.
1364
f6528abd
JK
13652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1366
1367 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1368 (CDEPS): New.
1369 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1370 -Wl,--dynamic-list.
1371 * configure: Regenerate.
1372 * proc-service.list: New.
1373
ca2a87a0
JK
13742010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1375
1376 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1377 New comment.
1378
363a6e9f
OS
13792010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1380
1381 * gdbreplay.c (remote_open): Check error return from socket() call by
1382 its equality to -1 not by it being negative.
1383 * remote-utils.c (remote_open): Likewise.
1384
d23b6cb1
PA
13852010-05-23 Pedro Alves <pedro@codesourcery.com>
1386
1387 * config.h: Regenerate.
1388
28d3cf85
MK
13892010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1390
1391 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1392 doesn't provide PTRACE_GET_THREAD_AREA.
1393
fea36a59
MK
13942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1395
1396 * linux-m68k-low.c: Include <asm/ptrace.h>
1397 (ps_get_thread_area): Implement.
1398
24b066ba
DE
13992010-05-03 Doug Evans <dje@google.com>
1400
1401 * event-loop.c (struct callback_event): New struct.
1402 (callback_list): New global.
1403 (append_callback_event, delete_callback_event): New functions.
1404 (process_callback): New function.
1405 (start_event_loop): Call it.
1406 * remote-utils.c (NOT_SCHEDULED): Define.
1407 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1408 moved out of readchar.
1409 (readchar): Rewrite. Call reschedule before returning.
1410 (reset_readchar): New function.
1411 (remote_close): Call it.
1412 (process_remaining, reschedule): New functions.
1413 * server.h (callback_handler_func): New typedef.
1414 (append_callback_event, delete_callback_event): Declare.
1415
9836d6ea
PA
14162010-05-03 Pedro Alves <pedro@codesourcery.com>
1417
1418 * proc-service.c (ps_pglobal_lookup): Use
1419 thread_db_look_up_one_symbol.
1420 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1421 parameter. Use it instead of all_symbols_looked_up.
1422 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1423 field.
1424 (all_symbols_looked_up): Don't declare.
1425 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1426 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1427 field.
1428 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1429 Set all_symbols_looked_up here.
1430 (thread_db_look_up_one_symbol): New.
1431 (thread_db_get_tls_address): Adjust.
1432 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1433 thread_db object on the heap, and tentatively set it in the
1434 process structure.
1435 (thread_db_init): Don't set all_symbols_looked_up here.
1436 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1437
7984d532
PA
14382010-05-03 Pedro Alves <pedro@codesourcery.com>
1439
1440 * linux-low.c (linux_kill, linux_detach): Adjust.
1441 (status_pending_p_callback): Remove redundant statement. Check
1442 for !TARGET_WAITIKIND_IGNORE, instead of
1443 TARGET_WAITKIND_STOPPED.
1444 (handle_tracepoints): Make sure LWP is locked. Adjust.
1445 (linux_wait_for_event_1): Adjust.
1446 (linux_cancel_breakpoints): New.
1447 (unsuspend_one_lwp): New.
1448 (unsuspend_all_lwps): New.
1449 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1450 (send_sigstop_callback): Change return type to int, add new
1451 `except' parameter and handle it.
1452 (suspend_and_send_sigstop_callback): New.
1453 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1454 pass them down. If SUSPEND, also increment the lwp's suspend
1455 count.
1456 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1457 (need_step_over_p): Don't consider suspended LWPs.
1458 (start_step_over): Adjust.
1459 (proceed_one_lwp): Change return type to int, add new `except'
1460 parameter and handle it.
1461 (unsuspend_and_proceed_one_lwp): New.
1462 (proceed_all_lwps): Use find_inferior instead of
1463 for_each_inferior.
1464 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1465 also decrement the suspend count of LWPs. Pass `except' down,
1466 instead of hacking its suspend count.
1467 (linux_pause_all): Add `freeze' parameter. Adjust.
1468 (linux_unpause_all): New.
1469 (linux_target_ops): Install linux_unpause_all.
1470 * server.c (handle_status): Adjust.
1471 * target.h (struct target_ops): New fields `unpause_all' and
1472 `cancel_breakpoints'. Add new parameter to `pause_all'.
1473 (pause_all): Add new `freeze' parameter.
1474 (unpause_all): New.
1475 (cancel_breakpoints): New.
1476 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1477 cancel breakpoints.
1478 (cmd_qtstart): Pause threads.
1479 (stop_tracing): Pause threads, and cancel breakpoints.
1480 * win32-low.c (win32_target_ops): Adjust.
1481
e471f25b
PA
14822010-05-03 Pedro Alves <pedro@codesourcery.com>
1483
1484 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1485 the inferior right away from here...
1486 (linux_wait_1): ... to here, and adjust to check the thread's
1487 last_resume_kind instead of the lwp's step or stop_expected flags.
1488
1915ef4f
PA
14892010-05-02 Pedro Alves <pedro@codesourcery.com>
1490
1491 * README: Use consistent `GDB' and `GDBserver' spellings.
1492
f9e39928
PA
14932010-05-02 Pedro Alves <pedro@codesourcery.com>
1494
1495 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1496 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1497 (linux_detach_one_lwp): Assume the lwp is stopped.
1498 (any_thread_of): Delete.
1499 (linux_detach): Stop all lwps here. Don't blindly delete all
1500 breakpoints.
1501 (delete_lwp_callback): New.
1502 (linux_mourn): Delete all lwps of the process that is gone.
1503 (linux_wait_1): Don't delete the last lwp of the process here.
1504 * mem-break.h (mark_breakpoints_out): Declare.
1505 * mem-break.c (mark_breakpoints_out): New.
1506 (free_all_breakpoints): Use it.
1507 * server.c (handle_target_event): If the process is gone, mark
1508 breakpoints out.
1509 * thread-db.c (struct thread_db) <create_bp>: New field.
1510 (thread_db_enable_reporting): Fix prototype. Store a thread event
1511 breakpoint reference in the thread_db struct.
1512 (thread_db_load_search): Clear the thread_db object.
1513 (try_thread_db_load_1): Ditto.
1514 (switch_to_process): New.
1515 (disable_thread_event_reporting): Use it.
1516 (remove_thread_event_breakpoints): New.
1517 (thread_db_detach, thread_db_mourn): Use it.
1518
1e7fc18c
PA
15192010-05-01 Pedro Alves <pedro@codesourcery.com>
1520
1521 * linux-low.c (linux_enable_event_reporting): New.
1522 (linux_wait_for_event_1, handle_extended_wait): Use it.
1523
02fc4de7
PA
15242010-04-30 Pedro Alves <pedro@codesourcery.com>
1525
1526 * linux-low.c (linux_kill_one_lwp, linux_kill)
1527 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1528 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1529 SIGSTOP even if the LWP is stopped.
1530 (send_sigstop_callback): New.
1531 (stop_all_lwps): Use send_sigstop_callback instead.
1532 (linux_resume_one_thread): Adjust.
1533 (proceed_one_lwp): Still proceed an LWP that the client has
1534 requested to stop, if we haven't reported it as stopped yet. Make
1535 sure that LWPs the client want stopped, have a pending SIGSTOP.
1536
bc3b5632
DE
15372010-04-26 Doug Evans <dje@google.com>
1538
ae1ada35
DE
1539 * server.c (handle_general_set): Make static.
1540
bc3b5632
DE
1541 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1542 Print received char after testing for error/eof instead of before.
1543 (input_interrupt): Tweak comment.
1544
65730243
DE
15452010-04-23 Doug Evans <dje@google.com>
1546
1547 * server.c (start_inferior): Print inferior argv if --debug.
1548
a8ae7dc0
AR
15492010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1550
1551 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1552 * nto-x86-low.c: Include server.h
1553
1c07cc19
PM
15542010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1555
1556 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1557 be consistent with other sources of this directory.
1558 (init_registers_amd64): Correct name of source file of this function
1559 in the comment.
1560
e0a61e09
PM
15612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1562
1563 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1564 64-bit executables.
1565
54709339
PM
15662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1567
1568 * win32-i386-low.c: Add 64-bit support.
1569 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1570 (init_registers_amd64): Declare.
1571 (mappings): Add 64-bit version of array.
1572 (init_windows_x86): New function.
1573 (the_low_target): Change init_arch field to init_windows_x86.
1574
e8f0053d
PM
15752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1576
1577 * win32-low.c: Adapt to support also 64-bit architecture.
1578 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1579 (get_image_name): Use SIZE_T type for local variable `done'.
1580 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1581 (toolhelp_get_dll_name): Idem.
1582 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1583 Use uintptr_t typecast to avoid warning.
1584 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1585 (handle_exception): Use phex_nz to avoid warning.
1586 (win32_wait): Remove unused local variable `process'.
1587
c481e77e
PM
15882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1589
1590 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1591 `amd64-avx.o'.
1592
12ea4b69
PM
15932010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1594
1595 * configure.ac: Use `ws2_32' library for srv_mingw.
1596 * configure: Regenerate.
1597 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1598 * remote-utils.c: Likewise.
1599
f6d1620c
L
16002010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1601
1602 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1603 if __x86_64__ is defined.
1604
8e642873
PM
16052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1606
1607 * configure: Regenerate.
1608
711e434b
PM
16092010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1610
1611 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1612 * target.h (target_ops): New get_tib_address field.
1613 * win32-low.h (win32_thread_info): Add thread_local_base field.
1614 * win32-low.c (child_add_thread): Add tlb argument.
1615 Set thread_local_base field to TLB.
1616 (get_child_debug_event): Adapt to child_add_thread change.
1617 (win32_get_tib_address): New function.
1618 (win32_target_ops): Set get_tib_address field to
1619 win32_get_tib_address.
1620 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1621
505106cd
PA
16222010-04-12 Pedro Alves <pedro@codesourcery.com>
1623
505106cd
PA
1624 * linux-low.c (linux_mourn): Also remove the process.
1625 * server.c (handle_target_event): Don't remove the process here.
1626 * nto-low.c (nto_mourn): New.
1627 (nto_target_ops): Install it.
1628 * spu-low.c (spu_mourn): New.
1629 (spu_target_ops): Install it.
1630 * win32-low.c (win32_mourn): New.
1631 (win32_target_ops): Install it.
1632
e8470a06
PA
16332010-04-12 Pedro Alves <pedro@codesourcery.com>
1634
1635 * server.h (buffer_xml_printf): Remove redundant `;'.
1636
45ba0d02
PA
16372010-04-12 Pedro Alves <pedro@codesourcery.com>
1638
1639 * regcache.c (set_register_cache): Invalidate regcaches before
1640 changing the register cache layout.
1641 (regcache_invalidate_one): Allow a NULL regcache.
1642 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1643 regcaches before changing the register cache layout or the target
1644 regsets.
1645
59e04013
L
16462010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1649 variable warning on Linux/x86-64.
1650
8336d594
PA
16512010-04-11 Pedro Alves <pedro@codesourcery.com>
1652
1653 GDBserver disconnected tracing support.
1654
1655 * linux-low.c (linux_remove_process): Delete.
1656 (add_lwp): Don't set last_resume_kind here.
1657 (linux_kill): Use `mourn'.
1658 (linux_detach): Use `thread_db_detach', and `mourn'.
1659 (linux_mourn): New.
1660 (linux_attach_lwp_1): Adjust comment.
1661 (linux_attach): last_resume_kind moved the thread_info; adjust.
1662 (status_pending_p_callback): Adjust.
1663 (linux_wait_for_event_1): Adjust.
1664 (count_events_callback, select_singlestep_lwp_callback)
1665 (select_event_lwp_callback, cancel_breakpoints_callback)
1666 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1667 (proceed_one_lwp): Adjust.
1668 (linux_async): Add debug output.
1669 (linux_thread_stopped): New.
1670 (linux_pause_all): New.
1671 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1672 linux_pause_all.
1673 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1674 (thread_db_free): Delete declaration.
1675 (thread_db_detach, thread_db_mourn): Declare.
1676 * thread-db.c (thread_db_init): Use thread_db_mourn.
1677 (thread_db_free): Delete, split in two.
1678 (disable_thread_event_reporting): New.
1679 (thread_db_detach): New.
1680 (thread_db_mourn): New.
1681
1682 * server.h (struct thread_info) <last_resume_kind>: New field.
1683 <attached>: Add comment.
1684 <gdb_detached>: New field.
1685 (handler_func): Change return type to int.
1686 (handle_serial_event, handle_target_event): Ditto.
1687 (gdb_connected): Declare.
1688 (tracing): Delete.
1689 (disconnected_tracing): Declare.
1690 (stop_tracing): Declare.
1691
1692 * server.c (handle_query) <qSupported>: Report support for
1693 disconnected tracing.
1694 (queue_stop_reply_callback): Account for running threads.
1695 (gdb_wants_thread_stopped): New.
1696 (gdb_wants_all_threads_stopped): New.
1697 (gdb_reattached_process): New.
1698 (handle_status): Clear the `gdb_detached' flag of all processes.
1699 In all-stop, stop all threads.
1700 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1701 (process_serial_event): If the remote connection breaks, or if an
1702 exit was forced with "monitor exit", force an event loop exit.
1703 Handle disconnected tracing on detach.
1704 (handle_serial_event): Adjust.
1705 (handle_target_event): If GDB isn't connected, forward events back
1706 to the inferior, unless the last process exited, in which case,
1707 exit gdbserver. Adjust interface.
1708
1709 * remote-utils.c (remote_open): Don't block in accept. Instead
1710 register an event loop source on the listen socket file
1711 descriptor. Refactor bits into ...
1712 (listen_desc): ... this new global.
1713 (gdb_connected): ... this new function.
1714 (enable_async_notification): ... this new function.
1715 (handle_accept_event): ... this new function.
1716 (remote_close): Clear remote_desc.
1717
1718 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1719
1720 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1721 New fields.
1722 (mourn_inferior): Define.
1723 (target_process_qsupported): Avoid the dangling else problem.
1724 (thread_stopped): Define.
1725 (pause_all): Define.
1726 (target_waitstatus_to_string): Declare.
1727 * target.c (target_waitstatus_to_string): New.
1728
1729 * tracepoint.c (tracing): Make extern.
1730 (disconnected_tracing): New.
1731 (stop_tracing): Make extern. Handle tracing stops due to GDB
1732 disconnecting.
1733 (cmd_qtdisconnected): New.
1734 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1735 (handle_tracepoint_general_set): Handle QTDisconnected.
1736
1737 * event-loop.c (event_handler_func): Change return type to int.
1738 (process_event): Bail out if the event handler wants the event
1739 loop to stop.
1740 (handle_file_event): Ditto.
1741 (start_event_loop): Bail out if the event handler wants the event
1742 loop to stop.
1743
1744 * nto-low.c (nto_target_ops): Adjust.
1745 * spu-low.c (spu_wait): Don't remove the process here.
1746 (spu_target_ops): Adjust.
1747 * win32-low.c (win32_wait): Don't remove the process here.
1748 (win32_target_ops): Adjust.
1749
5d267c4c
PA
17502010-04-11 Pedro Alves <pedro@codesourcery.com>
1751
1752 * regcache.c (realloc_register_cache): Invalidate inferior's
1753 regcache before recreating it.
1754
623ccd72
PA
17552010-04-09 Pedro Alves <pedro@codesourcery.com>
1756
1757 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1758
219f2f23
PA
17592010-04-09 Stan Shebs <stan@codesourcery.com>
1760 Pedro Alves <pedro@codesourcery.com>
1761
1762 * server.h (LONGEST): New.
1763 (struct thread_info) <while_stepping>: New field.
1764 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1765 Declare.
1766 (initialize_tracepoint, handle_tracepoint_general_set)
1767 (handle_tracepoint_query, tracepoint_finished_step)
1768 (tracepoint_was_hit, release_while_stepping_state_list):
1769 (current_traceframe): Declare.
1770 * server.c (handle_general_set): Handle tracepoint packets.
1771 (read_memory): New.
1772 (write_memory): New.
1773 (handle_search_memory_1): Use read_memory.
1774 (handle_query): Report support for conditional tracepoints, trace
1775 state variables, and tracepoint sources. Handle tracepoint
1776 queries.
1777 (main): Initialize the tracepoints module.
1778 (process_serial_event): Handle traceframe reads/writes.
1779
1780 * linux-low.c (handle_tracepoints): New.
1781 (linux_wait_1): Call it.
1782 (linux_resume_one_lwp): Handle while-stepping.
1783 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1784 (linux_target_ops): Install them.
1785 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1786 New field.
1787 * linux-x86-low.c (x86_supports_tracepoints): New.
1788 (the_low_target). Install it.
1789
1790 * mem-break.h (delete_breakpoint): Declare.
1791 * mem-break.c (delete_breakpoint): Make external.
1792
1793 * target.h (struct target_ops): Add `supports_tracepoints',
1794 `read_pc', and `write_pc' fields.
1795 (target_supports_tracepoints): Define.
1796 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1797 (phex_nz): New.
1798
1799 * regcache.h (struct regcache) <registers_owned>: New field.
1800 (init_register_cache, regcache_cpy): Declare.
1801 (regcache_read_pc, regcache_write_pc): Declare.
1802 (register_cache_size): Declare.
1803 (supply_regblock): Declare.
1804 * regcache.c (init_register_cache): New.
1805 (new_register_cache): Use it.
1806 (regcache_cpy): New.
1807 (register_cache_size): New.
1808 (supply_regblock): New.
1809 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 1810
219f2f23
PA
1811 * tracepoint.c: New.
1812
1813 * Makefile.in (OBS): Add tracepoint.o.
1814 (tracepoint.o): New rule.
1815
3a13a53b
L
18162010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1817
1818 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1819 (i386-mmx.o): New.
1820 (i386-mmx.c): Likewise.
1821 (i386-mmx-linux.o): Likewise.
1822 (i386-mmx-linux.c): Likewise.
1823
1824 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1825 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1826 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1827 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1828
1829 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1830 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1831 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1832
1570b33e
L
18332010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1834
1835 * Makefile.in (clean): Updated.
1836 (i386-avx.o): New.
1837 (i386-avx.c): Likewise.
1838 (i386-avx-linux.o): Likewise.
1839 (i386-avx-linux.c): Likewise.
1840 (amd64-avx.o): Likewise.
1841 (amd64-avx.c): Likewise.
1842 (amd64-avx-linux.o): Likewise.
1843 (amd64-avx-linux.c): Likewise.
1844
1845 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1846 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1847 (srv_amd64_regobj): Add amd64-avx.o.
1848 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1849 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1850 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1851 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1852 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1853 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1854 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1855
1856 * i387-fp.c: Include "i386-xstate.h".
1857 (i387_xsave): New.
1858 (i387_cache_to_xsave): Likewise.
1859 (i387_xsave_to_cache): Likewise.
1860 (x86_xcr0): Likewise.
1861
1862 * i387-fp.h (i387_cache_to_xsave): Likewise.
1863 (i387_xsave_to_cache): Likewise.
1864 (x86_xcr0): Likewise.
1865
1866 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1867 * linux-crisv32-low.c (target_regsets): Likewise.
1868 * linux-m68k-low.c (target_regsets): Likewise.
1869 * linux-mips-low.c (target_regsets): Likewise.
1870 * linux-ppc-low.c (target_regsets): Likewise.
1871 * linux-s390-low.c (target_regsets): Likewise.
1872 * linux-sh-low.c (target_regsets): Likewise.
1873 * linux-sparc-low.c (target_regsets): Likewise.
1874 * linux-xtensa-low.c (target_regsets): Likewise.
1875
1876 * linux-low.c: Include <sys/uio.h>.
1877 (regsets_fetch_inferior_registers): Support nt_type.
1878 (regsets_store_inferior_registers): Likewise.
1879 (linux_process_qsupported): New.
1880 (linux_target_ops): Add linux_process_qsupported.
1881
1882 * linux-low.h (regset_info): Add nt_type.
1883 (linux_target_ops): Add process_qsupported.
1884
1885 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1886 and <sys/uio.h>.
1887 (init_registers_i386_avx_linux): New.
1888 (init_registers_amd64_avx_linux): Likewise.
1889 (xmltarget_i386_linux_no_xml): Likewise.
1890 (xmltarget_amd64_linux_no_xml): Likewise.
1891 (PTRACE_GETREGSET): Likewise.
1892 (PTRACE_SETREGSET): Likewise.
1893 (x86_fill_xstateregset): Likewise.
1894 (x86_store_xstateregset): Likewise.
1895 (use_xml): Likewise.
1896 (x86_linux_update_xmltarget): Likewise.
1897 (x86_linux_process_qsupported): Likewise.
1898 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1899 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1900 init_registers_i386_linux here. Call
1901 x86_linux_update_xmltarget.
1902 (the_low_target): Add x86_linux_process_qsupported.
1903
1904 * server.c (handle_query): Call target_process_qsupported.
1905
1906 * target.h (target_ops): Add process_qsupported.
1907 (target_process_qsupported): New.
1908
fc7238bb
PA
19092010-04-03 Pedro Alves <pedro@codesourcery.com>
1910
1911 * inferiors.c (add_thread): Set last_status kind to
1912 TARGET_WAITKIND_IGNORE.
1913 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1914 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1915 (linux_wait_1): Move `thread' local definition to block that uses
1916 it. Don't NULL initialize `event_child'.
1917 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1918 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1919 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1920
bdabb078
PA
19212010-04-01 Pedro Alves <pedro@codesourcery.com>
1922
1923 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1924 an extended waitstatus, or by a watchpoint.
1925 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1926 thread was stepping or has been stopped by a watchpoint.
1927
d3bbe7a0
PA
19282010-04-01 Pedro Alves <pedro@codesourcery.com>
1929
1930 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1931 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1932 of another, then delete the previous, and validate all
1933 breakpoints.
1934 (validate_inserted_breakpoint): New.
1935 (delete_disabled_breakpoints): New.
1936 (validate_breakpoints): New.
1937 (check_mem_read): Validate breakpoints before trusting their
1938 shadow. Delete disabled breakpoints.
1939 (check_mem_write): Validate breakpoints before trusting they
1940 should be inserted. Delete disabled breakpoints.
1941 * mem-break.h (validate_breakpoints):
1942 * server.c (handle_query): Validate breakpoints when we see a
1943 qSymbol query.
1944
8b07ae33
PA
19452010-04-01 Pedro Alves <pedro@codesourcery.com>
1946
1947 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1948 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1949 if we could tell there's a GDB breakpoint at stop_pc.
1950 (need_step_over_p): Don't do a step over if we find a GDB
1951 breakpoint at the resume PC.
1952
1953 * mem-break.c (struct raw_breakpoint): New.
1954 (enum bkpt_type): New type `gdb_breakpoint'.
1955 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1956 fields. New field `raw'.
1957 (find_raw_breakpoint_at): New.
1958 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1959 breakpoint instead.
1960 (set_breakpoint_at): Adjust.
1961 (delete_raw_breakpoint): New.
1962 (release_breakpoint): New.
1963 (delete_breakpoint): Rename to...
1964 (delete_breakpoint_1): ... this. Add proc parameter. Use
1965 release_breakpoint. Return ENOENT.
1966 (delete_breakpoint): Reimplement.
1967 (find_breakpoint_at): Delete.
1968 (find_gdb_breakpoint_at): New.
1969 (delete_breakpoint_at): Delete.
1970 (set_gdb_breakpoint_at): New.
1971 (delete_gdb_breakpoint_at): New.
1972 (gdb_breakpoint_here): New.
1973 (set_reinsert_breakpoint): Use release_breakpoint.
1974 (uninsert_breakpoint): Rename to ...
1975 (uninsert_raw_breakpoint): ... this.
1976 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1977 (reinsert_raw_breakpoint): Change parameter type to
1978 raw_breakpoint.
1979 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1980 instead.
1981 (check_breakpoints): Adjust. Use release_breakpoint.
1982 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1983 (breakpoint_inserted_here): Ditto.
1984 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1985 Don't trust the breakpoint's shadow if it is not inserted.
1986 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1987 (delete_all_breakpoints): Adjust.
1988 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1989 use delete_breakpoint_1.
1990
1991 * mem-break.h (breakpoints_supported): Delete declaration.
1992 (set_gdb_breakpoint_at): Declare.
1993 (gdb_breakpoint_here): Declare.
1994 (delete_breakpoint_at): Delete.
1995 (delete_gdb_breakpoint_at): Declare.
1996
1997 * server.h (struct raw_breakpoint): Forward declare.
1998 (struct process_info): New field `raw_breakpoints'.
1999
2000 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2001 breakpoints.
2002
6bf5e0ba
PA
20032010-03-24 Pedro Alves <pedro@codesourcery.com>
2004
2005 * linux-low.c (status_pending_p_callback): Fix comment.
2006 (linux_wait_for_event_1): Move most of the internal breakpoint
2007 handling from here...
2008 (linux_wait_1): ... to here.
2009 (count_events_callback): New.
2010 (select_singlestep_lwp_callback): New.
2011 (select_event_lwp_callback): New.
2012 (cancel_breakpoints_callback): New.
2013 (select_event_lwp): New.
2014 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2015 priority to all LWPs that have had events that should be reported
2016 to the client. Cancel breakpoints when about to reporting the
2017 event to the client, not while stopping lwps. No longer cancel
2018 finished single-steps here.
2019 (cancel_finished_single_step): Delete.
2020 (cancel_finished_single_steps): Delete.
2021
414a389f
PA
20222010-03-24 Pedro Alves <pedro@codesourcery.com>
2023
2024 * mem-break.c (enum bkpt_type): New.
2025 (struct breakpoint): New field `type'.
2026 (set_breakpoint_at): Change return type to struct breakpoint
2027 pointer. Set type to `other_breakpoint' by default.
2028 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2029 in the breakpoint list.
2030 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2031 (reinsert_breakpoint): Rename to ...
2032 (reinsert_raw_breakpoint): ... this.
2033 (reinsert_breakpoints_at): Adjust.
2034 * mem-break.h (struct breakpoint): Declare.
2035 (set_breakpoint_at): Change return type to struct breakpoint
2036 pointer.
2037
2280c721
PA
20382010-03-24 Pedro Alves <pedro@codesourcery.com>
2039
2040 * server.c (handle_query): Assign, not compare.
2041
d50171e4
PA
20422010-03-24 Pedro Alves <pedro@codesourcery.com>
2043
2044 Teach linux gdbserver to step-over-breakpoints.
2045
2046 * linux-low.c (can_hardware_single_step): New.
2047 (supports_breakpoints): New.
2048 (handle_extended_wait): If stopping threads, read the stop pc of
2049 the new cloned LWP.
2050 (get_pc): New.
2051 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2052 low target doesn't support retrieving the PC.
2053 (add_lwp): Set last_resume_kind to resume_continue.
2054 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2055 (linux_attach): Don't clear stop_expected. Set the lwp's
2056 last_resume_kind to resume_stop.
2057 (linux_detach_one_lwp): Don't check for removed breakpoints.
2058 (check_removed_breakpoint): Delete.
2059 (status_pending_p): Rename to ...
2060 (status_pending_p_callback): ... this. Don't check for removed
2061 breakpoints. Don't consider threads that are stopped from GDB's
2062 perspective.
2063 (linux_wait_for_lwp): Always read the stop_pc here.
2064 (cancel_breakpoint): New.
2065 (step_over_bkpt): New global.
2066 (linux_wait_for_event_1): Implement stepping over breakpoints.
2067 (gdb_wants_lwp_stopped): New.
2068 (gdb_wants_all_stopped): New.
2069 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2070 single-step traps here. Store the thread's last reported target
2071 wait status.
2072 (send_sigstop): Don't clear stop_expected. Always set it,
2073 instead.
2074 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2075 (cancel_finished_single_step): New.
2076 (cancel_finished_single_steps): New.
2077 (wait_for_sigstop): Don't cancel finished single-step traps here.
2078 (linux_resume_one_lwp): Don't check for removed breakpoints.
2079 Don't set `step' on non-hardware step archs.
2080 (linux_set_resume_request): Ignore resume_stop requests if already
2081 stopping or stopped. Set the lwp's last_resume_kind.
2082 (resume_status_pending_p): Don't check for removed breakpoints.
2083 (need_step_over_p): New.
2084 (start_step_over): New.
2085 (finish_step_over): New.
2086 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2087 requests. Clear the thread's last reported target waitstatus.
2088 Don't use the `suspended' flag. Don't consider pending breakpoints.
2089 (linux_resume): Start a step-over if necessary.
2090 (proceed_one_lwp): New.
2091 (proceed_all_lwps): New.
2092 (unstop_all_lwps): New.
2093 * linux-low.h (struct lwp_info): Rewrite comment for the
2094 `suspended' flag. Add the `stop_pc' field. Delete the
2095 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2096 Add `'last_resume_kind' and `need_step_over' fields.
2097 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2098 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2099 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2100 (set_raw_breakpoint_at): New.
2101 (set_breakpoint_at): Rewrite to use it.
2102 (reinsert_breakpoint_handler): Delete.
2103 (set_reinsert_breakpoint): New.
2104 (reinsert_breakpoint_by_bp): Delete.
2105 (delete_reinsert_breakpoints): New.
2106 (uninsert_breakpoint): Rewrite.
2107 (uninsert_breakpoints_at): New.
2108 (reinsert_breakpoint): Rewrite.
2109 (reinsert_breakpoints_at): New.
2110 (check_breakpoints): Rewrite.
2111 (breakpoint_here): New.
2112 (breakpoint_inserted_here): New.
2113 (check_mem_read): Adjust.
2114 * mem-break.h (breakpoints_supported, breakpoint_here)
2115 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2116 (reinsert_breakpoint_by_bp): Delete declaration.
2117 (delete_reinsert_breakpoints): Declare.
2118 (reinsert_breakpoint): Delete declaration.
2119 (reinsert_breakpoints_at): Declare.
2120 (uninsert_breakpoint): Delete declaration.
2121 (uninsert_breakpoints_at): Declare.
2122 (check_breakpoints): Adjust prototype.
2123 * server.h: Adjust include order.
2124 (struct thread_info): Declare here. Add a `last_status' field.
2125
30ba68cb
MS
21262010-03-23 Michael Snyder <msnyder@vmware.com>
2127
2128 * server.c (crc32): New function.
2129 (handle_query): Add handling for 'qCRC:' request.
2130
b9a881c2
PA
21312010-03-23 Pedro Alves <pedro@codesourcery.com>
2132
2133 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2134 lwp had been stopped by a watchpoint.
2135
e92d13d5
PA
21362010-03-16 Pedro Alves <pedro@codesourcery.com>
2137
2138 * server.h (internal_error): Declare.
2139 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2140 * utils.c (internal_error): New function.
2141
64daa791
AS
21422010-03-15 Andreas Schwab <schwab@redhat.com>
2143
2144 * configure.srv: Fix typo setting srv_regobj.
2145
f52cd8cd
PA
21462010-03-15 Pedro Alves <pedro@codesourcery.com>
2147
2148 * linux-low.c (fetch_register): Avoid passing a non string literal
2149 format to `error'.
2150 (usr_store_inferior_registers): Ditto.
2151
93ae6fdc
PA
21522010-03-14 Pedro Alves <pedro@codesourcery.com>
2153
2154 * linux-low.c (linux_write_memory): Bail out early if peeking
2155 memory failed.
2156
c3adc08c
PA
21572010-03-14 Pedro Alves <pedro@codesourcery.com>
2158
2159 * linux-low.h (struct lwp_info): New fields
2160 `stopped_by_watchpoint' and `stopped_data_address'.
2161 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2162 here, and cache them in the lwp object.
2163 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2164 directly.
2165 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2166 field.
2167 (linux_stopped_by_watchpoint): Rewrite.
2168 (linux_stopped_data_address): Rewrite.
2169
bce522a2
PA
21702010-03-06 Simo Melenius <simo.melenius@iki.fi>
2171
2172 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2173 switching the current inferior, not before.
2174
90884b2b
L
21752010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2176
2177 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2178 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2179 i386-linux.c and amd64-linux.c.
2180 (reg-i386.o): Removed.
2181 (reg-i386.c): Likewise.
2182 (reg-i386-linux.o): Likewise.
2183 (reg-i386-linux.c): Likewise.
2184 (reg-x86-64.o): Likewise.
2185 (reg-x86-64.c): Likewise.
2186 (reg-x86-64-linux.o): Likewise.
2187 (reg-x86-64-linux.c): Likewise.
2188 (i386.o): New.
2189 (i386.c): Likewise.
2190 (i386-linux.o): Likewise.
2191 (i386-linux.c): Likewise.
2192 (amd64.o): Likewise.
2193 (amd64.c): Likewise.
2194 (amd64-linux.o): Likewise.
2195 (amd64-linux.c): Likewise.
2196
2197 * configure.srv (srv_i386_regobj): New.
2198 (srv_i386_linux_regobj): Likewise.
2199 (srv_amd64_regobj): Likewise.
2200 (srv_amd64_linux_regobj): Likewise.
2201 (srv_i386_32bit_xmlfiles): Likewise.
2202 (srv_i386_64bit_xmlfiles): Likewise.
2203 (srv_i386_xmlfiles): Likewise.
2204 (srv_amd64_xmlfiles): Likewise.
2205 (srv_i386_linux_xmlfiles): Likewise.
2206 (srv_amd64_linux_xmlfiles): Likewise.
2207 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2208 srv_xmlfiles to $srv_i386_xmlfiles.
2209 (i[34567]86-*-mingw32ce*): Likewise.
2210 (i[34567]86-*-mingw*): Likewise.
2211 (i[34567]86-*-nto*): Likewise.
2212 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2213 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2214 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2215 (x86_64-*-linux*): Likewise.
2216
2217 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2218 (init_registers_amd64_linux): New.
2219 (x86_arch_setup): Replace init_registers_x86_64_linux with
2220 init_registers_amd64_linux.
2221
193f13e6
MK
22222010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2223
2224 * configure.ac: Check for libdl. If it is not available link against
2225 static libthread_db.
2226 * configure: Regenerate.
2227
85d721b8
PA
22282010-02-22 Pedro Alves <pedro@codesourcery.com>
2229
2230 PR9605
2231
2232 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2233 handing a read watchpoint.
2234 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2235
6076632b
DE
22362010-02-12 Doug Evans <dje@google.com>
2237
2238 * linux-low.c (linux_supports_tracefork_flag): Document.
2239 (linux_look_up_symbols): Add comment.
2240
3327ccf7
L
22412010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2242
2243 * regcache.c (supply_register): Clear regcache if buf is NULL.
2244
0718675c 22452010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 2246 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
2247
2248 * inferiors.c (find_inferior): Add function documentation.
2249 (unloaded_dll): Handle the case where the unloaded dll has not
2250 been previously registered in the dll list.
2251
177321bd
DJ
22522010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2253
2254 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2255 (thumb2_breakpoint): New.
2256 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2257
2b009048
DJ
22582010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2259
2260 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2261 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2262 breakpoints.
2263
3be029c7
PA
22642010-01-21 Pedro Alves <pedro@codesourcery.com>
2265
2266 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2267
18f5de3b
JK
22682010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2269
2270 * linux-s390-low.c (s390_collect_ptrace_register)
2271 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2272
3743bb4f
DE
22732010-01-21 Doug Evans <dje@google.com>
2274
14ce3065
DE
2275 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2276 (PTRACE_ARG4_TYPE): New macro.
2277 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2278 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2279 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2280 (usr_store_inferior_registers): Ditto.
2281 (linux_read_memory, linux_write_memory): Ditto.
2282 (linux_test_for_tracefork): Ditto.
2283
3743bb4f
DE
2284 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2285 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2286
8b315be5
PA
22872010-01-21 Pedro Alves <pedro@codesourcery.com>
2288
2289 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2290 target.
2291
85492558
PA
22922010-01-21 Pedro Alves <pedro@codesourcery.com>
2293
2294 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2295 prototype to take a regcache. Adjust.
2296
442ea881
PA
22972010-01-20 Pedro Alves <pedro@codesourcery.com>
2298
2299 * regcache.h (struct thread_info): Forward declare.
2300 (struct regcache): New.
2301 (new_register_cache): Adjust prototype.
2302 (get_thread_regcache): Declare.
2303 (free_register_cache): Adjust prototype.
2304 (registers_to_string, registers_from_string): Ditto.
2305 (supply_register, supply_register_by_name, collect_register)
2306 (collect_register_as_string, collect_register_by_name): Ditto.
2307 * regcache.c (struct inferior_regcache_data): Delete.
2308 (get_regcache): Rename to ...
2309 (get_thread_regcache): ... this. Adjust. Switch inferior before
2310 fetching registers.
2311 (regcache_invalidate_one): Adjust.
2312 (regcache_invalidate): Fix prototype.
2313 (new_register_cache): Return the new register cache.
2314 (free_register_cache): Change prototype.
2315 (realloc_register_cache): Adjust.
2316 (registers_to_string): Change prototype to take a regcache. Adjust.
2317 (registers_from_string): Ditto.
2318 (register_data): Ditto.
2319 (supply_register): Ditto.
2320 (supply_register_by_name): Ditto.
2321 (collect_register): Ditto.
2322 (collect_register_as_string): Ditto.
2323 (collect_register_by_name): Ditto.
2324 * server.c (process_serial_event): Adjust.
2325 * linux-low.h (regset_fill_func, regset_store_func): Change
2326 prototype.
2327 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2328 Change prototype.
2329 * linux-low.c (get_stop_pc): Adjust.
2330 (check_removed_breakpoint): Adjust.
2331 (linux_wait_for_event): Adjust.
2332 (linux_resume_one_lwp): Adjust.
2333 (fetch_register): Add regcache parameter. Adjust.
2334 (usr_store_inferior_registers): Ditto.
2335 (regsets_fetch_inferior_registers): Ditto.
2336 (regsets_store_inferior_registers): Ditto.
2337 (linux_fetch_registers, linux_store_registers): Ditto.
2338 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2339 regcache. Adjust.
2340 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2341 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2342 prototype to take a regcache.
2343 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2344 * remote-utils.c (convert_ascii_to_int, outreg)
2345 (prepare_resume_reply): Change prototype to take a regcache.
2346 Adjust.
2347 * target.h (struct target_ops) <fetch_registers, store_registers>:
2348 Change prototype to take a regcache.
2349 (fetch_inferior_registers, store_inferior_registers): Change
2350 prototype to take a regcache. Adjust.
2351 * proc-service.c (ps_lgetregs): Adjust.
2352 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2353 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2354 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2355 take a regcache. Adjust.
2356 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2357 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2358 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2359 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2360 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2361 (cris_cannot_fetch_register):
2362 (cris_breakpoint_at): Change prototype to take a regcache.
2363 Adjust.
2364 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2365 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2366 to take a regcache. Adjust.
2367 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2368 Adjust.
2369 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2370 take a regcache. Adjust.
2371 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2372 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2373 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2374 * linux-mips-low.c (mips_get_pc):
2375 (mips_set_pc): Change prototype to take a regcache. Adjust.
2376 (mips_reinsert_addr): Adjust.
2377 (mips_collect_register): Change prototype to take a regcache.
2378 Adjust.
2379 (mips_supply_register):
2380 (mips_collect_register_32bit, mips_supply_register_32bit)
2381 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2382 (mips_store_fpregset): Ditto.
2383 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2384 Ditto.
2385 (parse_spufs_run): Adjust.
2386 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2387 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2388 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2389 take a regcache. Adjust.
2390 * linux-s390-low.c (s390_collect_ptrace_register)
2391 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2392 (s390_set_pc): Change prototype to take a regcache. Adjust.
2393 (s390_arch_setup): Adjust.
2394 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2395 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2396 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2397 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2398 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2399 regcache. Adjust.
2400 (sparc_breakpoint_at): Adjust.
2401 * linux-xtensa-low.c (xtensa_fill_gregset):
2402 (xtensa_store_gregset):
2403 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2404 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2405 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2406 prototype to take a regcache. Adjust.
2407 * win32-arm-low.c (arm_fetch_inferior_register)
2408 (arm_store_inferior_register): Change prototype to take a
2409 regcache. Adjust.
2410 * win32-i386-low.c (i386_fetch_inferior_register)
2411 (i386_store_inferior_register): Change prototype to take a
2412 regcache. Adjust.
2413 * win32-low.c (child_fetch_inferior_registers)
2414 (child_store_inferior_registers): Change prototype to take a
2415 regcache. Adjust.
2416 (win32_wait): Adjust.
2417 (win32_fetch_inferior_registers): Change prototype to take a
2418 regcache. Adjust.
2419 (win32_store_inferior_registers): Adjust.
2420 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2421 store_inferior_register>: Change prototype to take a regcache.
2422
60c3d7b0
DE
24232010-01-20 Doug Evans <dje@google.com>
2424
2425 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2426 #ifdef.
2427 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 2428 (W_STOPCODE): Provide definition if missing.
60c3d7b0 2429
dc146f7c
VP
24302010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2431
2432 * linux-low.c (linux_core_of_thread): New.
2433 (compare_ints, show_process, list_threads): New.
2434 (linux_qxfer_osdata): Report threads and cores.
2435 (linux_target_op): Register linux_core_of_thread.
2436 * remote-utils.c (prepare_resume_reply): Report the core.
2437 (buffer_xml_printf): Support %d specifier.
2438 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2439 New.
2440 (handle_query): Handle qXfer:threads. Announce availability
2441 thereof.
2442 * target.h (struct target_ops): New field core_of_thread.
2443
7803799a
UW
24442010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2445
2446 * Makefile.in (clean): Remove new generated files.
2447 (reg-s390.o, reg-s390.c): Remove rules.
2448 (reg-s390x.o, reg-s390x.c): Likewise.
2449 (s390-linux32.o, s390-linux32.c): Add rules.
2450 (s390-linux64.o, s390-linux64.c): Likewise.
2451 (s390x-linux64.o, s390x-linux64.c): Likewise.
2452 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2453 * linux-s390-low.c: Include <elf.h>.
2454 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2455 (init_registers_s390): Remove prototype.
2456 (init_registers_s390x): Likewise.
2457 (init_registers_s390_linux32): Add prototype.
2458 (init_registers_s390_linux64): Likewise.
2459 (init_registers_s390x_linux64): Likewise.
2460 (s390_num_regs_3264): New define.
2461 (s390_regmap_3264): New global variable.
2462 (s390_cannot_fetch_register): Remove obsolete check.
2463 (s390_cannot_store_register): Likewise.
2464 (s390_collect_ptrace_register): Handle upper/lower register halves.
2465 (s390_supply_ptrace_register): Likewise.
2466 (s390_fill_gregset): Update to register number changes.
2467 (s390_get_hwcap): New routine.
2468 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2469 Install appropriate regmap and register set.
2470
6e7ffa39
JB
24712010-01-01 Joel Brobecker <brobecker@adacore.com>
2472
2473 * server.c (gdbserver_version): Update copyright year to 2010.
2474 * gdbreplay.c (gdbreplay_version): Likewise.
2475
957f3f49
DE
24762009-12-28 Doug Evans <dje@google.com>
2477
2478 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2479 elf/external.h. Include <elf.h> instead but only if necessary.
2480
ca5c370d
PA
24812009-12-28 Pedro Alves <pedro@codesourcery.com>
2482
2483 * linux-low.c (linux_remove_process): Remove `detaching'
2484 parameter. Don't release/detach from thread_db here.
2485 (linux_kill): Release/detach from thread_db here, ...
2486 (linux_detach): ... and here, before actually detaching.
2487 (linux_wait_1): ... and here, when a process exits.
2488 * thread-db.c (any_thread_of): New.
2489 (thread_db_free): Switch the current inferior to a thread of the
2490 passed in process.
2491
4ee62156
DE
24922009-12-21 Doug Evans <dje@google.com>
2493
d90e6a88
DE
2494 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2495
c5f62d5f
DE
2496 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2497 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2498 warning ifndef __NR_tkill. Move setting of errno there too.
2499 Delete unnecessary resetting of errno after syscall.
2500 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2501
10e86dd7
DE
2502 * configure.ac: Check for dladdr.
2503 * config.in: Regenerate.
2504 * configure: Regenerate.
2505 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2506 (try_thread_db_load): Update.
2507
4ee62156
DE
2508 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2509
00f515da
DE
25102009-12-18 Doug Evans <dje@google.com>
2511
e9464885
DE
2512 * event-loop.c: Include unistd.h if it exists.
2513
07d4f67e
DE
2514 * linux-low.c (my_waitpid): Move definition away from being in
2515 between linux_tracefork_child/linux_test_for_tracefork.
2516
00f515da
DE
2517 * gdb_proc_service.h (psaddr_t): Fix type.
2518 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2519 signature to match glibc.
2520
1de1badb
DE
25212009-12-16 Doug Evans <dje@google.com>
2522
2523 * linux-low.c (linux_read_memory): Fix argument to read.
2524
aeeb81d1
PA
25252009-11-26 Pedro Alves <pedro@codesourcery.com>
2526
2527 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2528 events, don't leave current_inferior pointing at null.
2529
10357975
PA
25302009-11-26 Pedro Alves <pedro@codesourcery.com>
2531
2532 * win32-low.c (LOG): Delete.
2533 (OUTMSG): Output to stderr.
2534 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2535 on compile time LOG macro.
2536 (win32_wait): Fix debug output.
2537
cf6e3471
PA
25382009-11-26 Pedro Alves <pedro@codesourcery.com>
2539
2540 * win32-low.c (win32_add_one_solib): If the dll name is
2541 "ntdll.dll", prepend the system directory to the dll path.
2542
0c85e18e
MK
25432009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2544
2545 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2546
9ac544ce 25472009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 2548 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
2549
2550 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2551 * configure.ac: Check for __mcoldfire__ and set
2552 gdb_cv_m68k_is_coldfire.
2553 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2554 reg-cf.o and reg-m68k.o.
2555 * configure: Regenerated.
2556
fd7dd3e6
PA
25572009-11-16 Pedro Alves <pedro@codesourcery.com>
2558
2559 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2560 Pass it to thread_db_free.
2561 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2562 proper `detaching' argument to linux_remove_process.
2563 * linux-low.h (thread_db_free): Add `detaching' parameter.
2564 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2565 to thread_db_free.
2566 (thread_db_free): Add `detaching' parameter. Only
2567 call td_ta_clear_event if detaching from process.
2568
75aa492e
MK
25692009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2570
2571 * thread-db.c (thread_db_free): Fix typo.
2572
21e1bee4
PP
25732009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2574
2575 PR gdb/10838
2576 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2577
8838b45e
NS
25782009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2579
2580 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2581 with an i686 compiler.
2582 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2583 needed.
2584 * configure: Rebuilt.
2585
8a35fb51
SL
25862009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2587
2588 PR gdb/10783
2589
2590 * server.c (handle_search_memory_1): Correct read_addr initialization
2591 in loop for searching subsequent chunks.
2592
96f15937
PP
25932009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2594
2595 * configure.ac: New --with-libthread-db option.
2596 * thread-db.c: Allow direct dependence on libthread_db.
2597 (thread_db_free): Adjust.
2598 * config.in: Regenerate.
2599 * configure: Likewise.
889bf7c5 2600
5f7d1694
PP
26012009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2602
2603 PR gdb/10757
2604 * thread-db.c (attach_thread): New function.
2605 (maybe_attach_thread): Return success/failure.
2606 (find_new_threads_callback): Adjust.
889bf7c5
PA
2607 (thread_db_find_new_threads): Loop until no new threads.
2608
88e3b899
PA
26092009-10-13 Pedro Alves <pedro@codesourcery.com>
2610
2611 * proc-service.c (ps_lgetregs): Formatting.
2612
cdbfd419
PP
26132009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2614
2615 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2616 * configure.ac: Adjust.
2617 * linux-low.h (struct process_info_private): Move members to struct
2618 thread_db.
2619 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2620 * linux-low.c (linux_remove_process): Adjust.
2621 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2622 * server.c (handle_query): Move code ...
2623 (handle_monitor_command): ... here. New function.
2624 * target.h (struct target_ops): New member.
2625 * thread-db.c (struct thread_db): New.
2626 (libthread_db_search_path): New variable.
2627 (thread_db_create_event, thread_db_enable_reporting)
2628 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2629 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2630 (try_thread_db_load_1, dladdr_to_soname): New functions.
2631 (try_thread_db_load, thread_db_load_search): New functions.
2632 (thread_db_init): Search for libthread_db.
2633 (thread_db_free): New function.
2634 (thread_db_handle_monitor_command): Likewise.
2635 * config.in: Regenerate.
2636 * configure: Regenerate.
889bf7c5 2637
4168d2d6
UW
26382009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2639
2640 * spu-low.c (spu_kill): Wait for inferior to terminate.
2641 Call clear_inferiors.
2642 (spu_detach): Call clear_inferiors.
2643
81ecdfbb
RW
26442009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2645
2646 * aclocal.m4: Regenerate.
2647 * config.in: Likewise.
2648 * configure: Likewise.
2649
0b9ff2c0
UW
26502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2651
2652 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2653 (parse_spufs_run): New function.
2654 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2655 (ppc_breakpoint_at): Handle SPU breakpoints.
2656
efcbbd14
UW
26572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2658
2659 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2660 (SPUFS_MAGIC): Define.
2661 (spu_enumerate_spu_ids): New function.
2662 (linux_qxfer_spu): New function.
2663 (linux_target_ops): Install linux_qxfer_spu.
2664
f4d9bade
UW
26652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2666
2667 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2668 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2669 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2670 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2671 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2672 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2673 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2674 (init_registers_powerpc_cell32l): Add prototype.
2675 (init_registers_powerpc_cell64l): Likewise.
2676 (ppc_arch_setup): Detect Cell/B.E. architecture.
2677
96e946ca
RW
26782009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2679
2680 * Makefile.in (datarootdir): New variable.
2681
58d6951d
DJ
26822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2683
2684 * linux-low.c (linux_write_memory): Update debugging output.
2685 * Makefile.in (clean): Add new descriptions.
2686 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2687 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2688 * configure.srv: Add new files for arm*-*-linux*.
2689 * linux-arm-low.c: Add new declarations.
2690 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2691 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2692 (HWCAP_VFPv3D16): New.
2693 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2694 instead of __IWMMXT__.
2695 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2696 (arm_arch_setup): New.
2697 (target_regsets): Remove #ifdef. Add VFP regset.
2698 (the_low_target): Use arm_arch_setup.
2699
12b42a12
DJ
27002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2701
2702 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2703 the main thread again.
2704
ac8c974e
AR
27052009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2706
2707 Adding Neutrino gdbserver.
2708 * configure: Regenerated.
2709 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2710 * configure.srv (i[34567]86-*-nto*): New target.
2711 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2712 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2713 (nto_comctrl) [__QNX__]: New function.
2714 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2715
4424e0c3 27162009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
2717
2718 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2719 srv_tgtobj.
2720
912cf4ba
PA
27212009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2722 Pedro Alves <pedro@codesourcery.com>
2723
2724 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2725 don't support CONTEXT_EXTENDED_REGISTERS.
2726 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2727 (the_low_target): Install them.
2728 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2729 failing with ERROR_PIPE_NOT_CONNECTED.
2730
aa5ca48f
DE
27312009-06-30 Doug Evans <dje@google.com>
2732 Pierre Muller <muller@ics.u-strasbg.fr>
2733
2734 Add h/w watchpoint support to x86-linux, win32-i386.
2735 * Makefile.in (SFILES): Add i386-low.c
2736 (i386_low_h): Define.
2737 (i386-low.o): Add dependencies.
2738 (linux-x86-low.o): Add i386-low.h dependency.
2739 (win32-i386-low.o): Ditto.
2740 * i386-low.c: New file.
2741 * i386-low.h: New file.
2742 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2743 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2744 * linux-low.c (linux_add_process): Initialize arch_private.
2745 (linux_remove_process): Free arch_private.
2746 (add_lwp): Initialize arch_private.
2747 (delete_lwp): Free arch_private.
2748 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2749 provided.
2750 * linux-low.h (process_info_private): New member arch_private.
2751 (lwp_info): New member arch_private.
2752 (linux_target_ops): New members new_process, new_thread,
2753 prepare_to_resume.
2754 (ptid_of): New macro.
2755 * linux-x86-low.c: Include stddef.h, i386-low.h.
2756 (arch_process_info): New struct.
2757 (arch_lwp_info): New struct.
2758 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2759 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2760 (i386_dr_low_get_status): New function.
2761 (x86_insert_point, x86_remove_point): New functions.
2762 (x86_stopped_by_watchpoint): New function.
2763 (x86_stopped_data_address): New function.
2764 (x86_linux_new_process, x86_linux_new_thread): New functions.
2765 (x86_linux_prepare_to_resume): New function.
2766 (the_low_target): Add entries for insert_point, remove_point,
2767 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2768 prepare_to_resume.
2769 * server.c (debug_hw_points): New global.
2770 (monitor_show_help): Document set debug-hw-points.
2771 (handle_query): Process "set debug-hw-points".
2772 * server.h (debug_hw_points): Declare.
2773 (paddress): Declare.
2774 * utils.c (NUMCELLS, CELLSIZE): New macros.
2775 (get_sell, xsnprintf, paddress): New functions.
2776 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2777 remove_point, stopped_by_watchpoint, stopped_data_address.
2778 * win32-i386-low.c: Include i386-low.h.
2779 (debug_reg_state): Replaces dr.
2780 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2781 (i386_dr_low_get_status): New function.
2782 (i386_insert_point, i386_remove_point): New functions.
2783 (i386_stopped_by_watchpoint): New function.
2784 (i386_stopped_data_address): New function.
2785 (i386_initial_stuff): Update.
2786 (get_thread_context,set_thread_context,i386_thread_added): Update.
2787 (the_low_target): Add entries for insert_point,
2788 remove_point, stopped_by_watchpoint, stopped_data_address.
2789 * win32-low.c (win32_insert_watchpoint): New function.
2790 (win32_remove_watchpoint): New function.
2791 (win32_stopped_by_watchpoint): New function.
2792 (win32_stopped_data_address): New function.
2793 (win32_target_ops): Add entries for insert_watchpoint,
2794 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2795 * win32-low.h (win32_target_ops): New members insert_point,
2796 remove_point, stopped_by_watchpoint, stopped_data_address.
2797
d993e290
PA
27982009-06-25 Pedro Alves <pedro@codesourcery.com>
2799
2800 * server.c (process_serial_event): Re-return unsupported, not
2801 error, if the type isn't recognized. Re-allow supporting only
2802 insert or remove packets. Also call require_running for
2803 breakpoints. Add missing break statement to default case. Tidy.
2804 * target.h (struct target_ops): Rename insert_watchpoint to
2805 insert_point, and remove_watchpoint to remove_point.
2806
2807 * linux-low.h (struct linux_target_ops): Likewise.
2808 * linux-low.c (linux_insert_watchpoint): Rename to ...
2809 (linux_insert_point): ... this. Adjust.
2810 (linux_remove_watchpoint): Rename to ...
2811 (linux_remove_point): ... this. Adjust.
2812 (linux_target_ops): Adjust.
2813 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2814 (cris_insert_point): ... this.
2815 (cris_remove_watchpoint): Rename to ...
2816 (cris_remove_point): ... this.
2817 (the_low_target): Adjust.
2818
0f54c268
PM
28192009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2820
2821 * server.c (handle_v_kill): Pass signal_pid to
2822 kill_inferior if multi_process is zero.
2823
c6314022
AR
28242009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2825
2826 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2827 * target.h (target_ops): Comment for *_watchpoint to make it clear
2828 the functions can get types '0' and '1'.
2829
4463ce24
AR
28302009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2831
2832 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2833 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2834 * regcache.c (get_regcache): Likewise.
2835 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2836 * win32-low.c (child_fetch_inferior_registers): Remove check for
2837 regno 0.
2838
cf8fd78b
PA
28392009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2840 Pedro Alves <pedro@codesourcery.com>
2841
2842 * target.h (struct target_ops) <supports_multi_process>: New
2843 callback.
2844 (target_supports_multi_process): New.
2845 * server.c (handle_query): Even if GDB reports support, only
2846 enable multi-process if the target also supports it. Report
2847 multi-process support only if the target backend supports it.
2848 * linux-low.c (linux_supports_multi_process): New function.
2849 (linux_target_ops): Install it as target_supports_multi_process
2850 callback.
2851
47c0c975
DE
28522009-05-24 Doug Evans <dje@google.com>
2853
e09875d4
DE
2854 Global renaming of find_thread_pid to find_thread_ptid.
2855 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2856 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2857 All callers updated.
2858
e27d73f6
DE
2859 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2860 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2861 directly.
2862
47c0c975
DE
2863 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2864 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2865 (linux_resume_one_lwp): Ditto.
2866
2acc282a
DE
28672009-05-23 Doug Evans <dje@google.com>
2868
2869 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2870 from struct inferior_list_entry * to struct lwp_info *.
2871 All callers updated.
2872
9f1036c1
DE
28732009-05-13 Doug Evans <dje@google.com>
2874
2875 * linux-x86-low.c: Don't include assert.h.
2876 (x86_siginfo_fixup): Use fatal, not assert.
2877 (x86_arch_setup): Fix comment.
2878
d0722149
DE
28792009-05-12 Doug Evans <dje@google.com>
2880
2881 Biarch support for i386/amd64 gdbserver.
2882 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2883 Add linux-x86-low.c.
2884 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2885 (linux-x86-low.o): Add.
2886 * linux-x86-64-low.c: Delete.
2887 * linux-i386-low.c: Delete.
2888 * linux-x86-low.c: New file.
2889 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2890 linux-x86-low.o.
2891 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2892 linux-x86-low.o.
2893 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2894 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2895 (linux_child_pid_to_exec_file): New function.
2896 (elf_64_header_p, elf_64_file_p): New functions.
2897 (siginfo_fixup): New function.
2898 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2899 give target a chance to convert layout.
2900 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2901 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2902
fdeb2a12
DE
29032009-05-07 Doug Evans <dje@google.com>
2904
2905 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2906 (regsets_store_inferior_registers): Ditto.
2907
a6dbe5df
PA
29082009-05-06 Pedro Alves <pedro@codesourcery.com>
2909
2910 PR server/10048
2911
2912 * linux-low.c (must_set_ptrace_flags): Delete.
2913 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2914 of the global.
2915 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2916 `lwp->must_set_ptrace_flags' instead.
ba42693b 2917 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
2918 (linux_wait_1): ... not here.
2919
5091eb23
DE
29202009-04-30 Doug Evans <dje@google.com>
2921
9f767825
DE
2922 * inferiors.c (started_inferior_callback): New function.
2923 (attached_inferior_callback): New function.
2924 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2925 * server.c (print_started_pid, print_attached_pid): New functions.
2926 (detach_or_kill_for_exit): New function.
2927 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2928 * server.h (have_started_inferiors_p): Declare.
2929 (have_attached_inferiors_p): Declare.
2930
5091eb23
DE
2931 * inferiors.c (remove_process): Fix memory leak, free process.
2932 * linux-low.c (linux_remove_process): New function.
2933 (linux_kill): Call it instead of remove_process.
2934 (linux_detach, linux_wait_1): Ditto.
2935
155c8968
PA
29362009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2937
2938 * configure.srv: Add x86 Windows CE target.
2939
7fe519cb
UW
29402009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2941
2942 * inferiors.c (get_thread_process): Make global.
2943 * server.h (get_thread_process): Add prototype.
2944 * thread-db.c (find_one_thread): Use get_thread_process
2945 instead of current_process.
2946 (thread_db_get_tls_address): Do not crash if called when
2947 thread layer is not yet initialized.
2948
5472f405
UW
29492009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2950
2951 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2952 * spu-low.c (current_tid): Rename to ...
2953 (current_ptid): ... this.
2954 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2955 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2956 ptid_get_lwp (current_ptid) instead of current_tid.
2957 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2958 instead of current_tid. Use find_process_pid to verify pid
2959 argument is valid. Pass proper argument to remove_process.
2960 (spu_thread_alive): Compare current_ptid instead of current_tid.
2961 (spu_resume): Likewise.
2962
55ac2b99
PA
29632009-04-02 Pedro Alves <pedro@codesourcery.com>
2964
2965 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2966 variable.
2967
95954743
PA
29682009-04-01 Pedro Alves <pedro@codesourcery.com>
2969
2970 Implement the multiprocess extensions, and add linux multiprocess
2971 support.
2972
2973 * server.h (ULONGEST): Declare.
2974 (struct ptid, ptid_t): New.
2975 (minus_one_ptid, null_ptid): Declare.
2976 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2977 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2978 (struct inferior_list_entry): Change `id' type from unsigned from
2979 to ptid_t.
2980 (struct sym_cache, struct breakpoint, struct
2981 process_info_private): Forward declare.
2982 (struct process_info): Declare.
2983 (current_process): Declare.
2984 (all_processes): Declare.
2985 (initialize_inferiors): Declare.
2986 (add_thread): Adjust to use ptid_t.
2987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2988 (add_process, remove_process, find_thread_pid): Declare.
2989 (find_inferior_id): Adjust to use ptid_t.
2990 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2991 (multi_process): Declare.
2992 (push_event): Adjust to use ptid_t.
2993 (read_ptid, write_ptid): Declare.
2994 (prepare_resume_reply): Adjust to use ptid_t.
2995 (clear_symbol_cache): Declare.
2996 * inferiors.c (all_processes): New.
2997 (null_ptid, minus_one_ptid): New.
2998 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2999 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3000 (add_thread): Change unsigned long to ptid. Remove gdb_id
3001 parameter. Adjust.
3002 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3003 (gdb_id_to_thread): Rename to ...
3004 (find_thread_pid): ... this. Change unsigned long to ptid.
3005 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3006 (loaded_dll, pull_pid_from_list): Adjust.
3007 (add_process, remove_process, find_process_pid)
3008 (get_thread_process, current_process, initialize_inferiors): New.
3009 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3010 (struct target_waitstatus) <related_pid>: Ditto.
3011 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3012 return type to int.
3013 (struct target_ops) <join>: Add `pid' argument.
3014 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3015 (struct target_ops) <wait>: Add `ptid' field. Change return type
3016 to ptid.
3017 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3018 (mywait): Add `ptid' argument. Change return type to ptid_t.
3019 (target_pid_to_str): Declare.
3020 * target.c (set_desired_inferior): Adjust to use ptids.
3021 (mywait): Add new `ptid' argument. Adjust.
3022 (target_pid_to_str): New.
3023 * mem-break.h (free_all_breakpoints): Declare.
3024 * mem-break.c (breakpoints): Delelete.
3025 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3026 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3027 to use per-process breakpoint list.
3028 (free_all_breakpoints): New.
3029 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3030 (symbol_cache, all_symbols_looked_up): Delete.
3031 (hexchars): New.
3032 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3033 read_ptid): New.
3034 (prepare_resume_reply): Change ptid argument's type from unsigned
3035 long to ptid_t. Adjust. Implement W;process and X;process.
3036 (free_sym_cache, clear_symbol_cache): New.
3037 (look_up_one_symbol): Adjust to per-process symbol cache. *
3038 * server.c (cont_thread, general_thread, step_thread): Change type
3039 to ptid_t.
3040 (attached): Delete.
3041 (multi_process): New.
3042 (last_ptid): Change type to ptid_t.
3043 (struct vstop_notif) <ptid>: Change type to ptid_t.
3044 (queue_stop_reply, push_event): Change `ptid' argument's type to
3045 ptid_t.
3046 (discard_queued_stop_replies): Add `pid' argument.
3047 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3048 changes. Don't reference the `attached' global.
3049 (attach_inferior): Adjust to mywait interface changes.
3050 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3051 features. Handle and report "multiprocess+". Handle
3052 "qAttached:PID".
3053 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3054 changes.
3055 (handle_v_kill): New.
3056 (handle_v_stopped): Adjust to use target_pid_to_str.
3057 (handle_v_requests): Allow multiple attaches and runs when
3058 multiprocess extensions are in effect. Handle "vKill".
3059 (myresume): Adjust to use ptids.
3060 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3061 (handle_status): Adjust to discard_queued_stop_replies interface
3062 change.
3063 (first_thread_of, kill_inferior_callback)
3064 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3065 (main): Call initialize_inferiors. Adjust to use ptids, killing
3066 and detaching from all inferiors. Handle multiprocess packet
3067 variants.
3068 * linux-low.h: Include gdb_proc_service.h.
3069 (struct process_info_private): New.
3070 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3071 <lwpid_of>: Use ptid_get_lwp.
3072 (get_lwp_thread): Adjust.
3073 (struct lwp_info): Add `dead' member.
3074 (find_lwp_pid): Declare.
3075 * linux-low.c (thread_db_active): Delete.
3076 (new_inferior): Adjust comment.
3077 (inferior_pid): Delete.
3078 (linux_add_process): New.
3079 (handle_extended_wait): Adjust.
3080 (add_lwp): Change unsigned long to ptid.
3081 (linux_create_inferior): Add process to processes table. Adjust
3082 to use ptids. Don't set new_inferior here.
3083 (linux_attach_lwp): Rename to ...
3084 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3085 it. Adjust to use ptids.
3086 (linux_attach_lwp): New.
3087 (linux_attach): Add process to processes table. Don't set
3088 new_inferior here.
3089 (struct counter): New.
3090 (second_thread_of_pid_p, last_thread_of_process_p): New.
3091 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3092 multiple processes.
3093 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3094 processes. Remove process from process table.
3095 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3096 to multiple processes.
3097 (any_thread_of): New.
3098 (linux_detach): Add `pid' argument, and handle it. Remove process
3099 from processes table.
3100 (linux_join): Add `pid' argument. Handle it.
3101 (linux_thread_alive): Change unsighed long argument to ptid_t.
3102 Consider dead lwps as not being alive.
3103 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3104 threads we're not interested in.
3105 (same_lwp, find_lwp_pid): New.
3106 (linux_wait_for_lwp): Change `pid' argument's type from int to
3107 ptid_t. Adjust.
3108 (linux_wait_for_event): Rename to ...
3109 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3110 from int to ptid_t. Adjust.
3111 (linux_wait_for_event): New.
3112 (linux_wait_1): Add `ptid' argument. Change return type to
3113 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3114 that exit from the process table.
3115 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3116 Adjust.
3117 (mark_lwp_dead): New.
3118 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3119 stopping all threads, mark its main lwp as dead.
3120 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3121 ptids.
3122 (fetch_register, usr_store_inferior_registers)
3123 (regsets_fetch_inferior_registers)
3124 (regsets_store_inferior_registers, linux_read_memory)
3125 (linux_write_memory): Inline `inferior_pid'.
3126 (linux_look_up_symbols): Adjust to use per-process
3127 `thread_db_active'.
3128 (linux_request_interrupt): Adjust to use ptids.
3129 (linux_read_auxv): Inline `inferior_pid'.
3130 (initialize_low): Don't reference thread_db_active.
3131 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3132 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3133 (ps_getpid): Return the pid of the current inferior.
3134 * thread-db.c (proc_handle, thread_agent): Delete.
3135 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3136 per-process data.
3137 (find_one_thread): Change argument type to ptid_t. Adjust to
3138 per-process data.
3139 (maybe_attach_thread): Adjust to per-process data and ptids.
3140 (thread_db_find_new_threads): Ditto.
3141 (thread_db_init): Ditto.
3142 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3143 processes table. Adjust to use ptids.
3144 (spu_kill, spu_detach): Adjust interface. Remove process from
3145 processes table.
3146 (spu_join, spu_thread_alive): Adjust interface.
3147 (spu_wait): Adjust interface. Remove process from processes
3148 table. Adjust to use ptids.
3149 * win32-low.c (current_inferior_tid): Delete.
3150 (current_inferior_ptid): New.
3151 (debug_event_ptid): New.
3152 (thread_rec): Take a ptid. Adjust.
3153 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3154 (child_delete_thread): Ditto.
3155 (do_initial_child_stuff): Add `attached' argument. Add process to
3156 processes table.
3157 (child_fetch_inferior_registers, child_store_inferior_registers):
3158 Adjust.
3159 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3160 (win32_attach): Pass 1 to do_initial_child_stuff.
3161 (win32_kill): Adjust interface. Remove process from processes
3162 table.
3163 (win32_detach): Ditto.
3164 (win32_join): Adjust interface.
3165 (win32_thread_alive): Take a ptid.
3166 (win32_resume): Adjust to use ptids.
3167 (get_child_debug_event): Ditto.
3168 (win32_wait): Adjust interface. Remove exiting process from
3169 processes table.
3170
bd99dc85
PA
31712009-04-01 Pedro Alves <pedro@codesourcery.com>
3172
3173 Non-stop mode support.
3174
3175 * server.h (non_stop): Declare.
3176 (gdb_client_data, handler_func): Declare.
3177 (delete_file_handler, add_file_handler, start_event_loop):
3178 Declare.
3179 (handle_serial_event, handle_target_event, push_event)
3180 (putpkt_notif): Declare.
3181 * target.h (enum resume_kind): New.
3182 (struct thread_resume): Replace `step' field by `kind' field.
3183 (TARGET_WNOHANG): Define.
3184 (struct target_ops) <wait>: Add `options' argument.
3185 <supports_non_stop, async, start_non_stop>: New fields.
3186 (target_supports_non_stop, target_async): New.
3187 (start_non_stop): Declare.
3188 (mywait): Add `options' argument.
3189 * target.c (mywait): Add `options' argument. Print child exit
3190 notifications here.
3191 (start_non_stop): New.
3192 * server.c (non_stop, own_buf, mem_buf): New globals.
3193 (struct vstop_notif): New.
3194 (notif_queue): New global.
3195 (queue_stop_reply, push_event, discard_queued_stop_replies)
3196 (send_next_stop_reply): New.
3197 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3198 interface changes.
3199 (attach_inferior): In non-stop mode, don't wait for the target
3200 here.
3201 (handle_general_set): Handle QNonStop.
3202 (handle_query): When handling qC, return the current general
3203 thread, instead of the first thread of the list.
3204 (handle_query): If the backend supports non-stop mode, include
3205 QNonStop+ in the qSupported query response.
3206 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3207 and non-stop mode.
3208 (handle_v_attach, handle_v_run): Handle non-stop mode.
3209 (handle_v_stopped): New.
3210 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3211 (myresume): Adjust to use resume_kind. Handle non-stop.
3212 (queue_stop_reply_callback): New.
3213 (handle_status): Handle non-stop mode.
3214 (main): Clear non_stop flag on reconnection. Use the event-loop.
3215 Refactor serial protocol handling from here ...
3216 (process_serial_event): ... to this new function. When GDB
3217 selects any thread, select one here. In non-stop mode, wait until
3218 GDB acks all pending events before exiting.
3219 (handle_serial_event, handle_target_event): New.
3220 * remote-utils.c (remote_open): Install remote_desc in the event
3221 loop.
3222 (remote_close): Remove remote_desc from the event loop.
3223 (putpkt_binary): Rename to...
3224 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3225 (putpkt_binary): New as wrapper around putpkt_binary_1.
3226 (putpkt_notif): New.
3227 (prepare_resume_reply): In non-stop mode, don't change the
3228 general_thread.
3229 * event-loop.c: New.
3230 * Makefile.in (OBJ): Add event-loop.o.
3231 (event-loop.o): New rule.
3232
3233 * linux-low.h (pid_of): Moved here.
3234 (lwpid_of): New.
3235 (get_lwp_thread): Use lwpid_of.
3236 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3237 * linux-low.c (pid_of): Delete.
3238 (inferior_pid): Use lwpid_of.
3239 (linux_event_pipe): New.
3240 (target_is_async_p): New.
3241 (delete_lwp): New.
3242 (handle_extended_wait): Use lwpid_of.
3243 (add_lwp): Don't set lwpid field.
3244 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3245 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3246 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3247 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3248 first. Adjust to linux_wait_for_event interface changes. Use
3249 lwpid_of.
3250 (linux_detach): Don't delete the main lwp here.
3251 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3252 (status_pending_p): Don't consider explicitly suspended lwps.
3253 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3254 pointer. Add OPTIONS argument. Change return type to int. Use
3255 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3256 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3257 pointer. Add status pointer argument. Return a pid instead of a
3258 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3259 changes. In non-stop mode, don't switch to a random thread.
3260 (linux_wait): Rename to...
3261 (linux_wait_1): ... this. Add target_options argument, and handle
3262 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3263 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3264 clean exit and signal exit code. Don't stop all threads in
3265 non-stop mode. In all-stop mode, only stop all threads when
3266 reporting a stop to GDB. Handle explicit thread stop requests.
3267 (async_file_flush, async_file_mark): New.
3268 (linux_wait): New.
3269 (send_sigstop): Use lwpid_of.
3270 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3271 interface changes. In non-stop mode, don't switch to a random
3272 thread.
3273 (linux_resume_one_lwp): Use lwpid_of.
3274 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3275 (linux_resume_one_thread): ... this. Handle resume_stop. In
3276 non-stop mode, don't look for pending flag in all threads.
3277 (resume_status_pending_p): Don't consider explicitly suspended
3278 threads.
3279 (my_waitpid): Reimplement. Emulate __WALL.
3280 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3281 Use lwpid_of.
3282 (sigchld_handler, linux_supports_non_stop, linux_async)
3283 (linux_start_non_stop): New.
3284 (linux_target_ops): Register linux_supports_non_stop, linux_async
3285 and linux_start_non_stop.
3286 (initialize_low): Install SIGCHLD handler.
3287 * thread-db.c (thread_db_create_event, find_one_thread)
3288 (thread_db_get_tls_address): Use lwpid_of.
3289 * win32-low.c (win32_detach): Adjust to use resume_kind.
3290 (win32_wait): Add `options' argument.
3291 * spu-low.c (spu_resume): Adjust to use resume_kind.
3292 (spu_wait): Add `options' argument.
3293
5b1c542e
PA
32942009-04-01 Pedro Alves <pedro@codesourcery.com>
3295
3296 Decouple target code from remote protocol.
3297
3298 * target.h (enum target_waitkind): New.
3299 (struct target_waitstatus): New.
3300 (struct target_ops) <wait>: Return an unsigned long. Take a
3301 target_waitstatus pointer instead of a char pointer.
3302 (mywait): Likewise.
3303 * target.c (mywait): Change prototype to return an unsigned long.
3304 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3305 * server.h (thread_from_wait, old_thread_from_wait): Delete
3306 declarations.
3307 (prepare_resume_reply): Change prototype to take a
3308 target_waitstatus.
3309 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3310 (last_status, last_ptid): New.
3311 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3312 pid instead of a signal.
3313 (attach_inferior): Remove "status" and "signal" parameters.
3314 Adjust.
3315 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3316 not as an address.
3317 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3318 (handle_v_requests, myresume): Remove "status" and "signal"
3319 parameters. Adjust.
3320 (handle_status): New.
3321 (main): Delete local `status'. Adjust.
3322 * remote-utils.c: Include target.h.
3323 (prepare_resume_reply): Change prototype to take a
3324 target_waitstatus. Adjust.
3325
3326 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3327 interface.
3328 * spu-low.c (spu_wait): Adjust.
3329 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3330 Delete.
3331 (win32_wait): Adjust.
3332
2bd7c093
PA
33332009-04-01 Pedro Alves <pedro@codesourcery.com>
3334
3335 * target.h (struct thread_resume): Delete leave_stopped member.
3336 (struct target_ops): Add a `n' argument to the `resume' callback.
3337 * server.c (start_inferior): Adjust.
3338 (handle_v_cont, myresume): Adjust.
3339 * linux-low.c (check_removed_breakpoint): Adjust to resume
3340 interface change, and to removed leave_stopped field.
3341 (resume_ptr): Delete.
3342 (struct thread_resume_array): New.
3343 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3344 resume interface change.
3345 (linux_continue_one_thread, linux_queue_one_thread)
3346 (resume_status_pending_p): Check if the resume field is NULL
3347 instead of checking the leave_stopped member.
3348 (linux_resume): Adjust to the target resume interface change.
3349 * spu-low.c (spu_resume): Adjust to the target resume interface
3350 change.
3351 * win32-low.c (win32_detach, win32_resume): Ditto.
3352
c35fafde
PA
33532009-04-01 Pedro Alves <pedro@codesourcery.com>
3354
3355 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3356 flag.
3357 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3358 pending.
3359 (linux_continue_one_thread): Only preserve the stepping flag if
3360 there's a pending breakpoint.
3361
0a59d50b
PA
33622009-03-31 Pedro Alves <pedro@codesourcery.com>
3363
3364 * server.c (main): After the inferior having exited, call
3365 remote_close before exiting gdbserver.
3366
f04c6d38
TJB
33672009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3368
3369 Fix size of FPSCR in Power 7 processors.
3370 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3371 (PPC_FEATURE_HAS_DFP): New #define.
3372 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3373 size of the FPSCR.
3374
78e5cee6
PA
33752009-03-23 Pedro Alves <pedro@codesourcery.com>
3376
3377 * server.c (handle_query) Whitespace and formatting.
3378
1b3f6016
PA
33792009-03-22 Pedro Alves <pedro@codesourcery.com>
3380
3381 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3382 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3383 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3384 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3385 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3386 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3387 Makefile.in, configure.ac: Fix whitespace throughout.
3388 * configure: Regenerate.
3389
a07b2135
PA
33902009-03-22 Pedro Alves <pedro@codesourcery.com>
3391
3392 * inferiors.c (find_inferior): Make it safe for the callback
3393 function to delete the currently iterated inferior.
3394
67cc2626
PA
33952009-03-22 Pedro Alves <pedro@codesourcery.com>
3396
3397 * Makefile.in (linuw_low_h): Move higher.
3398 (thread-db.o): Depend on $(linux_low_h).
3399
54a0b537
PA
34002009-03-17 Pedro Alves <pedro@codesourcery.com>
3401
3402 Rename "process" to "lwp" throughout.
3403
3404 * linux-low.c (all_processes): Rename to...
3405 (all_lwps): ... this.
3406 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3407 (add_process): Rename to ...
3408 (add_lwp): ... this. Adjust.
3409 (linux_create_inferior): Adjust.
3410 (linux_attach_lwp): Adjust.
3411 (linux_attach): Adjust.
3412 (linux_kill_one_process): Rename to ...
3413 (linux_kill_one_lwp): ... this. Adjust.
3414 (linux_kill): Adjust.
3415 (linux_detach_one_process): Rename to ...
3416 (linux_detach_one_lwp): ... this. Adjust.
3417 (linux_detach): Adjust.
3418 (check_removed_breakpoint): Adjust.
3419 (status_pending_p): Adjust.
3420 (linux_wait_for_process): Rename to ...
3421 (linux_wait_for_lwp): ... this. Adjust.
3422 (linux_wait_for_event): Adjust.
3423 (send_sigstop): Adjust.
3424 (wait_for_sigstop): Adjust.
3425 (stop_all_processes): Rename to ...
3426 (stop_all_lwps): ... this.
3427 (linux_resume_one_process): Rename to ...
3428 (linux_resume_one_lwp): ... this. Adjust.
3429 (linux_set_resume_request, linux_continue_one_thread)
3430 (linux_queue_one_thread, resume_status_pending_p)
3431 (usr_store_inferior_registers, regsets_store_inferior_registers)
3432 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3433 Adjust.
3434 * linux-low.h (get_process): Rename to ...
3435 (get_lwp): ... this. Adjust.
3436 (get_thread_process): Rename to ...
3437 (get_thread_lwp): ... this. Adjust.
3438 (get_process_thread): Rename to ...
3439 (get_lwp_thread): ... this. Adjust.
3440 (struct process_info): Rename to ...
3441 (struct lwp_info): ... this.
3442 (all_processes): Rename to ...
3443 (all_lwps): ... this.
3444 * proc-service.c (ps_lgetregs): Adjust.
3445 * thread-db.c (thread_db_create_event, find_one_thread)
3446 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3447
0b16c5cf
PA
34482009-03-14 Pedro Alves <pedro@codesourcery.com>
3449
3450 * server.c (handle_query): Handle "qAttached".
3451
32de4b9d
NS
34522009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3453
3454 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3455 GPLv3, update license URL.
3456
2aecd87f
DE
34572009-03-01 Doug Evans <dje@google.com>
3458
93efd302 3459 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
3460 (server_h): Add gdb_signals.h.
3461 (signals.o): Update.
3462 * server.h (target_signal_from_host,target_signal_to_host_p)
3463 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3464
86b1f9c5
PM
34652009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3466
3467 * remote-utils.c (getpkt): Also generate remote-debug
3468 information if noack_mode is set.
3469
4aa995e1
PA
34702009-02-06 Pedro Alves <pedro@codesourcery.com>
3471
3472 * server.c (handle_query): Report qXfer:siginfo:read and
3473 qXfer:siginfo:write as supported and handle them.
3474 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3475 * linux-low.c (linux_xfer_siginfo): New.
3476 (linux_target_ops): Set it.
3477
62709adf
PA
34782009-01-26 Pedro Alves <pedro@codesourcery.com>
3479
3480 * server.c (gdbserver_usage): Mention --remote-debug.
3481 (main): Accept '--remote-debug' switch.
3482
aef93bd7
DE
34832009-01-18 Doug Evans <dje@google.com>
3484
3485 * regcache.c (new_register_cache): No need to check result of xcalloc.
3486 * server.c (handle_search_memory): Back out calls to xmalloc,
3487 result is checked and error is returned to user upon failure.
3488 (handle_query): Ditto. Add more checks for result of malloc.
3489 (handle_v_cont): Check result of malloc, report error back to
3490 user upon failure.
3491 (handle_v_run): Ditto. Call freeargv.
3492 * server.h (freeargv): Declare.
3493 * utils.c (freeargv): New fn.
3494
54363045
DE
34952009-01-15 Doug Evans <dje@google.com>
3496
f626972c
DE
3497 * gdbreplay.c (perror_with_name): Make arg const char *.
3498 * server.h (target_signal_to_name): Make return type const char *.
0842e787 3499 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 3500 * utils.c (perror_with_name): Make arg const char *.
54363045 3501
18aae699
PA
35022009-01-14 Pedro Alves <pedro@codesourcery.com>
3503
3504 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3505 when handling a EXIT_PROCESS_DEBUG_EVENT.
3506
ff703abe
JB
35072009-01-06 Joel Brobecker <brobecker@adacore.com>
3508
3509 * gdbreplay.c (gdbreplay_version): Update copyright year.
3510 * server.c (gdbserver_version): Likewise.
3511
f21cc1a2 35122009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
3513
3514 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 3515 (handle_extended_wait): Improve comment.
0e21c1ec 3516
bca929d3
DE
35172008-12-13 Doug Evans <dje@google.com>
3518
3519 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3520 * server.h (ATTR_MALLOC): New macro.
3521 (xmalloc,xcalloc,xstrdup): Declare.
3522 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3523 * inferiors.c: Ditto.
3524 * linux-low.c: Ditto.
3525 * mem-break.c: Ditto.
3526 * regcache.c: Ditto.
3527 * remote-utils.c: Ditto.
3528 * server.c: Ditto.
3529 * target.c: Ditto.
3530 * win32-low.c: Ditto.
3531
97438e3f
DE
35322008-12-12 Doug Evans <dje@google.com>
3533
896c7fbb
DE
3534 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3535 in debugging printf.
3536
97438e3f
DE
3537 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3538
e3b886f8
DE
35392008-12-09 Doug Evans <dje@google.com>
3540
3541 * linux-low.h (struct process_info): Delete member tid, unused.
3542 * thread-db.c (find_one_thread): Update.
3543 (maybe_attach_thread): Update.
3544
07e059b5
VP
35452008-12-02 Pedro Alves <pedro@codesourcery.com>
3546
889bf7c5
PA
3547 * target.h (struct target_ops): Add qxfer_osdata member.
3548 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3549 and dirent.h.
3550 (linux_qxfer_osdata): New functions.
3551 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3552 callback.
3553 * server.c (handle_query): Handle "qXfer:osdata:read:".
3554 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3555 (buffer_xml_printf): New functions.
3556 * server.h (struct buffer): New.
3557 (buffer_grow_str, buffer_grow_str0): New macros.
3558 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3559 (buffer_xml_printf): Declare.
07e059b5 3560
4cab47ab
DE
35612008-11-24 Doug Evans <dje@google.com>
3562
3563 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3564
f142445f
DJ
35652008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3566
3567 * server.c (handle_v_run): Always use the supplied argument list.
3568
d0107bb6 35692008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 3570
d0107bb6
BW
3571 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3572 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 3573
2c4ad781
TJB
35742008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3575
3576 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3577 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3578 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3579 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3580 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3581 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3582 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3583 XML target descriptions.
3584 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3585 when inferior is running on an ISA 2.05 or later processor. Add
3586 special case to return offset for full 64-bit slot of FPSCR when
3587 in 32-bits.
3588
dfb64f85
DJ
35892008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3590
3591 * Makefile.in (SFILES, clean): Added sparc64 files.
3592 (reg-sparc64.o, reg-sparc64.c): New.
3593 * configure.srv (sparc*-*-linux*): New configuration.
3594 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3595 syscall arguments for SPARC.
3596 (regsets_store_inferior_registers): Likewise.
3597 * linux-sparc-low.c: New file.
3598
66b6e1dd
DE
35992008-10-21 Doug Evans <dje@google.com>
3600
3601 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3602 (READLINE_DIR,READLINE_DEP): Delete.
3603 (INTERNAL_CFLAGS): Update.
3604 (LINTFLAGS): Update.
3605
9b710a42
PA
36062008-10-10 Pedro Alves <pedro@codesourcery.com>
3607
3608 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3609 whole argv from the last run, not just argv[0].
3610
5822d809
PA
36112008-09-08 Pedro Alves <pedro@codesourcery.com>
3612
3613 * regcache.c (new_register_cache): Return NULL if the register
3614 cache size isn't known yet.
3615 (free_register_cache): Avoid dereferencing a NULL regcache.
3616
74aac56f
DJ
36172008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3618
3619 * configure.srv: Merge MIPS and MIPS64.
3620
400b20f5
MR
36212008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3622
3623 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3624
677c5bb1
LM
36252008-08-18 Luis Machado <luisgpm@br.ibm.com>
3626
3627 * Makefile.in: Add required vsx dependencies.
3628
3629 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3630 Declare init_registers_powerpc_vsx32l.
3631 Declare init_registers_powerpc_vsx64l.
3632 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3633 (ppc_arch_setup): Check for VSX in hwcap.
3634 (ppc_fill_vsxregset): New function.
3635 (ppc_store_vsxregset): New function.
3636 Add new VSX entry in regset_info target_regsets.
3637
3638 * configure.srv: Add new VSX dependencies.
3639
a6f3e723
SL
36402008-08-12 Pedro Alves <pedro@codesourcery.com>
3641
3642 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3643 (remote_open): Set or clear transport_is_reliable.
3644 (putpkt_binary): Don't expect acks in noack mode.
3645 (getpkt): Don't send ack/nac in noack mode.
3646 * server.c (handle_general_set): Handle QStartNoAckMode.
3647 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3648 qSupported.
3649 (main): Reset noack_mode on every connection.
3650 * server.h (noack_mode): Declare.
3651
a417dc56
RW
36522008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3653
3654 * Makefile.in (GDBREPLAY_OBS): New variable.
3655 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3656
3221518c
UW
36572008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3658 Daniel Jacobowitz <dan@codesourcery.com>
3659
3660 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3661 (usr_store_inferior_registers): Likewise.
3662 (regsets_store_inferior_registers): Likewise.
3663
ec56be1b
PA
36642008-07-31 Rolf Jansen <rj@surtec.com>
3665 Pedro Alves <pedro@codesourcery.com>
3666
3667 * configure.ac: Check for memmem declaration.
3668 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3669 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3670 (disable_packet_qfThreadInfo): Unconditionally compile.
3671 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3672 * configure, config.in: Regenerate.
3673
2fe5e3ff
DE
36742008-07-28 Doug Kwan <dougkwan@google.com>
3675
3676 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3677 (linux_write_memory): Remove declaration of errno.
3678
836acd6d
UW
36792008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3680
3681 * linux-low.c (handle_extended_wait): Do not use "status"
3682 variable uninitialized.
3683
aeba519e
PA
36842008-07-07 Pedro Alves <pedro@codesourcery.com>
3685
3686 * server.c (handle_v_attach): Inhibit reporting dll changes.
3687
db42f210
PA
36882008-06-27 Pedro Alves <pedro@codesourcery.com>
3689
3690 * remote-utils.c (prepare_resume_reply): If requested, don't
3691 output "thread:TID" in the T stop reply.
3692
3693 * server.c (disable_packet_vCont, disable_packet_Tthread)
3694 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3695 (handle_query): If requested, disable support for qC, qfThreadInfo
3696 and qsThreadInfo.
3697 (handle_v_requests): If requested, disable support for vCont.
3698 (gdbserver_show_disableable): New.
3699 (main): Handle --disable-packet and --disable-packet=LIST.
3700
3701 * server.h (disable_packet_vCont, disable_packet_Tthread)
3702 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3703
8e4c5421
CD
37042008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3705
3706 * server.c (gdbserver_usage): Mention --version.
3707
6e23a804
DJ
37082008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3709
3710 * Makefile.in (gdbreplay.o): New rule.
3711
90aa6a40
JM
37122008-06-06 Joseph Myers <joseph@codesourcery.com>
3713
3714 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3715 message, not gdbserver.
3716
c16158bc 37172008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
3718 Nathan Sidwell <nathan@codesourcery.com>
3719 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
3720
3721 * acinclude.m4: Include ../../config/acx.m4.
3722 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3723 * configure, config.in: Regenerate.
3724 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3725 * server.c (gdbserver_version): Print PKGVERSION.
3726 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3727 (main): Adjust gdbserver_usage calls.
3728 * gdbreplay.c (version, host_name): Add declarations.
3729 (gdbreplay_version, gdbreplay_usage): New.
3730 (main): Accept --version and --help options.
3731
aeb75bf5
DJ
37322008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3733
3734 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3735 (arm_breakpoint_at): Handle Thumb.
3736 (the_low_target): Add comment.
3737
76b233dd
UW
37382008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3739
3740 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3741
08388c79
DE
37422008-05-09 Doug Evans <dje@google.com>
3743
a3c83fae
DE
3744 * server.h (decode_search_memory_packet): Declare.
3745 * remote-utils.c (decode_search_memory_packet): New fn.
3746 * server.c (handle_search_memory_1): New fn.
08388c79
DE
3747 (handle_search_memory): New fn.
3748 (handle_query): Process qSearch:memory packets.
3749
bb9c3d36
UW
37502008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3751
3752 * regcache.c (registers_length): Remove.
3753 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3754 full register packet.
3755 * regcache.h (registers_length): Remove prototype.
3756 * server.h (PBUFSIZ): Define to 16384.
3757
7284e1be
UW
37582008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3759
3760 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3761 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3762 powerpc-64l.o, and powerpc-altivec64l.o.
3763 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3764 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3765 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3766 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3767 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3768 to srv_xmlfiles.
3769
3770 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3771 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3772 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3773 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3774 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3775 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3776 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3777 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3778 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3779 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3780 (clean): Update.
3781
3782 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3783 (init_registers_powerpc_32l): ... this new prototype.
3784 (init_registers_powerpc_32): Remove, replace by ...
3785 (init_registers_powerpc_altivec32l): ... this new prototype.
3786 (init_registers_powerpc_e500): Remove, replace by ...
3787 (init_registers_powerpc_e500l): ... this new prototype.
3788 (init_registers_ppc64): Remove, replace by ...
3789 (init_registers_powerpc_64l): ... this new prototype.
3790 (init_registers_powerpc_64): Remove, replace by ...
3791 (init_registers_powerpc_altivec64l): ... this new prototype.
3792 (ppc_num_regs): Set to 73.
3793 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3794 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3795 (ppc_cannot_store_register): Handle orig_r3 and trap.
3796 (ppc_arch_setup): Update init_registers_... calls.
3797 (ppc_fill_gregset): Handle orig_r3 and trap.
3798
3799 * inferiors.c (clear_inferiors): Reset current_inferior.
3800
fdc59709
PB
38012008-04-23 Paolo Bonzini <bonzini@gnu.org>
3802
889bf7c5
PA
3803 * acinclude.m4: Add override.m4.
3804 * configure: Regenerate.
fdc59709 3805
c9b2f845
UW
38062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3807
3808 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3809 initial call to init_register_ppc64.
3810
550512b8
UW
38112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3812
3813 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3814 powerpc*-*-linux* case.
3815 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3816
b6430ec3
UW
38172008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3818
3819 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 3820 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
3821 from reg_xmlfiles.
3822 * linux-ppc-low.c: Include <elf.h>.
3823 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3824 (ppc_hwcap): New global variable.
3825 (ppc_regmap): Remove __SPE__ #ifdef sections.
3826 (ppc_regmap_e500): New global variable.
3827 (ppc_cannot_store_register): Update __SPE__ special case.
3828 (ppc_get_hwcap): New function.
3829 (ppc_arch_setup): Use it to determine whether inferior supports
3830 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3831 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3832 Do not access registers if target does not support AltiVec.
3833 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3834 Do not access registers if target does not support SPE.
3835 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3836
52fa2412
UW
38372008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3838
3839 * linux-low.c (disabled_regsets, num_regsets): New.
3840 (use_regsets_p): Delete.
3841 (linux_wait_for_process): Clear disabled_regsets.
3842 (regsets_fetch_inferior_registers): Check and set it.
3843 (regsets_store_inferior_registers): Likewise.
3844 (linux_fetch_registers, linux_store_registers): Do not use
3845 use_regsets_p.
3846 (initialize_low): Allocate disabled_regsets.
3847
e28b3332
DJ
38482008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3849
3850 * Makefile.in (LIBOBJS): New.
3851 (OBS): Use LIBOBJS.
3852 (memmem.o): New rule.
3853 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3854 * configure: Regenerated.
3855
4536995d
UW
38562008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3857
3858 * server.c (handle_query): Never return "unsupported" for
3859 qXfer:features:read queries.
3860
221c031f
UW
38612008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3862
3863 * server.c (get_features_xml): Fix inverted condition.
3864 (handle_query): Always support qXfer:feature:read.
3865
ccd213ac
DJ
38662008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3867
3868 * server.c (wrapper_argv): New.
3869 (start_inferior): Handle wrapper_argv. If set, expect an extra
3870 trap.
3871 (gdbserver_usage): Document --wrapper.
3872 (main): Parse --wrapper.
3873
6fe305f7
UW
38742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3875
3876 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3877 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3878 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3879 (ppc_set_pc): Likewise.
3880 (ppc_arch_setup): New function.
3881 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3882 of collect_register.
889bf7c5 3883 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 3884
5b0a002e
UW
38852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3886
3887 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3888 instead of linux-ppc64-low.o.
3889 * linux-ppc64-low.c: Remove file.
3890 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3891 (linux-ppc64-low.o): Remove rule.
3892
3893 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3894 (init_registers_powerpc_64): Likewise.
3895 (ppc_regmap): Conditionally define depending on __powerpc64__.
3896 (ppc_cannot_store_register): Do not special-case "fpscr" when
3897 compiled on __powerpc64__.
3898 (ppc_collect_ptrace_register): New function.
3899 (ppc_supply_ptrace_register): New function.
3900 (ppc_breakpoint): Change type to "unsigned int".
3901 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3902 (the_low_target): Conditionally provide initializers for the
889bf7c5 3903 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
3904 collect_ptrace_register and supply_ptrace_register members.
3905
9b4b61c8
UW
39062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3907
3908 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3909 * server.c (gdbserver_xmltarget): Define.
3910 (get_features_xml): Use it to replace "target.xml" and arch_string.
3911
3912 * configure.srv: Remove srv_xmltarget. Add XML files that were
3913 mentioned there to srv_xmlfiles instead. Remove conditional tests
3914 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3915 srv_xmlfiles and srv_regobj to include all possible choices.
3916 * configure.ac (srv_xmltarget): Remove.
3917 (srv_xmlfiles): Do not add "target.xml".
3918 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3919 checks for supplementary target information.
3920 * configure: Regenerate.
3921 * Makefile.in (XML_TARGET): Remove.
3922 (target.xml): Remove rule.
3923 (clean): Do not clean up target.xml.
3924 (.PRECIOUS): Do not mention target.xml.
3925
3926 * target.h (struct target_ops): Remove arch_string member.
3927 * linux-low.c (linux_arch_string): Remove.
3928 (linux_target_ops): Remove arch_string initializer.
3929 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3930 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3931 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3932 * spu-low.c (spu_arch_string): Remove.
3933 (spu_target_ops): Remove arch_string initializer.
3934 * win32-low.c (win32_arch_string): Remove.
3935 (win32_target_ops): Remove arch_string initializer.
3936 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3937 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3938 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3939
ee1a7ae4
UW
39402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3941
3942 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3943 by collect_ptrace_register and supply_ptrace_register hooks.
3944 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3945 instead of checking for the_low_target.left_pad_xfer.
3946 (usr_store_inferior_registers): Use collect_ptrace_register callback
3947 instead of checking for the_low_target.left_pad_xfer.
3948
3949 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3950 (s390_supply_ptrace_register): Likewise.
3951 (s390_fill_gregset): Call s390_collect_ptrace_register.
3952 (the_low_target): Update.
3953
3954 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3955 (ppc_supply_ptrace_register): Likewise.
3956 (the_low_target): Update.
3957
3958 * linux-i386-low.c (the_low_target): Update.
3959 * linux-x86-64-low.c (the_low_target): Update.
3960
d61ddec4
UW
39612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3962
3963 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3964 reg-s390.o and reg-s390x.o.
3965
3966 * linux-low.c (new_inferior): New global variable.
3967 (linux_create_inferior, linux_attach): Set it.
3968 (linux_wait_for_process): Call the_low_target.arch_setup after the
3969 target has stopped for the first time.
3970 (initialize_low): Do not call the_low_target.arch_setup.
3971
3972 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3973 (s390_set_pc): Likewise.
3974 (s390_arch_setup): New function.
3975 (the_low_target): Use s390_arch_setup as arch_setup routine.
3976
3977 * regcache.c (realloc_register_cache): New function.
3978 (set_register_cache): Call it for each existing regcache.
3979
d05b4ac3
UW
39802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3981
3982 * server.h (init_registers): Remove prototype.
3983
3984 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3985 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3986 instead of init_registers ().
3987 * linux-arm-low.c (init_registers_arm): Add prototype.
3988 (init_registers_arm_with_iwmmxt): Likewise.
3989 (the_low_target): Add initializer for arch_setup field.
3990 * linux-cris-low.c (init_registers_cris): Add prototype.
3991 (the_low_target): Add initializer for arch_setup field.
3992 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3993 (the_low_target): Add initializer for arch_setup field.
3994 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3995 (the_low_target): Add initializer for arch_setup field.
3996 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3997 (the_low_target): Add initializer for arch_setup field.
3998 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3999 (the_low_target): Add initializer for arch_setup field.
4000 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4001 (the_low_target): Add initializer for arch_setup field.
4002 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4003 (init_registers_mips64_linux): Likewise.
4004 (the_low_target): Add initializer for arch_setup field.
4005 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4006 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4007 (the_low_target): Add initializer for arch_setup field.
4008 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4009 (init_registers_powerpc_64): Likewise.
4010 (the_low_target): Add initializer for arch_setup field.
4011 * linux-s390-low.c (init_registers_s390): Add prototype.
4012 (init_registers_s390x): Likewise.
4013 (the_low_target): Add initializer for arch_setup field.
4014 * linux-sh-low.c (init_registers_sh): Add prototype.
4015 (the_low_target): Add initializer for arch_setup field.
4016 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4017 (the_low_target): Add initializer for arch_setup field.
4018 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4019 (the_low_target): Add initializer for arch_setup field.
4020
4021 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4022 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4023 instead of init_registers ().
4024 * win32-arm-low.c (init_registers_arm): Add prototype.
4025 (the_low_target): Add initializer for arch_setup field.
4026 * win32-i386-low.c (init_registers_i386): Add prototype.
4027 (the_low_target): Add initializer for arch_setup field.
4028
4029 * spu-low.c (init_registers_spu): Add prototype.
4030 (initialize_low): Call initialie_registers_spu () instead of
4031 initialize_registers ().
4032
fd96d250
PA
40332008-02-19 Pedro Alves <pedro@codesourcery.com>
4034
4035 * server.c (handle_v_requests): When handling the vRun and vAttach
4036 packets, if already debugging a process, don't kill it. Return an
4037 error instead.
4038
d41b6bb4
DJ
40392008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4040
4041 * server.c (handle_query): Correct length check.
4042
5ac588cf
PA
40432008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4044
4045 * win32-low.c (do_initial_child_stuff): Add process handle
4046 parameter. Set current_process_handle and current_process_id from the
4047 parameters. Clear globals.
4048 (win32_create_inferior): Don't set current_process_handle and
4049 current_process_id here. Instead pass them on the call to
4050 do_initial_child_stuff.
4051 (win32_attach): Likewise.
4052 (win32_clear_inferiors): New.
4053 (win32_kill): Don't close the current process handle or the
4054 current thread handle here. Instead call win32_clear_inferiors.
4055 (win32_detach): Don't open a new handle to the process. Call
4056 win32_clear_inferiors.
4057 (win32_join): Don't rely on current_process_handle; open a new
4058 handle using the process id.
4059 (win32_wait): Call win32_clear_inferiors when the inferior process
4060 has exited.
4061
ecd7ecbc
DJ
40622008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4063
4064 * server.c (monitor_show_help): Add "exit".
4065
1525d545
MG
40662008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4067
ecd7ecbc 4068 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
4069 (clean): Add reg-xtensa.c.
4070 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
4071 * configure.srv (xtensa*-*-linux*) New target.
4072 * linux-xtensa-low.c: New.
4073 * xtensa-xtregs.c: New.
1525d545 4074
59a016f0
PA
40752008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4076
4077 * hostio.c: Don't include errno.h.
4078 (errno_to_fileio_errno): Move to hostio-errno.
4079 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4080 error number outputting to the target->hostio_last_error callback.
4081 (hostio_packet_error): Use FILEIO_EINVAL directly.
4082 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4083 calls to hostio_error.
4084 * hostio-errno.c: New.
4085 * server.h (hostio_last_error_from_errno): Declare.
4086 * target.h (target_ops): Add hostio_last_error member.
4087 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4088 as hostio_last_error handler.
889bf7c5 4089 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
4090 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4091 (wince_hostio_last_error): New functions.
4092 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4093 as hostio_last_error handler.
4094 (win32_target_ops) [!_WIN32_WCE]: Register
4095 hostio_last_error_from_errno as hostio_last_error handler.
4096 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4097 (hostio-errno.o): New rule.
4098 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4099 * configure.srv (srv_hostio_err_objs): New variable. Default to
4100 hostio-errno.o.
4101 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4102 * configure: Regenerate.
4103
2d717e4f
DJ
41042008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4105
4106 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4107 (linux_kill, linux_detach): Clean up the process list.
4108 * remote-utils.c (remote_open): Improve port number parsing.
4109 (putpkt_binary, input_interrupt): Only send interrupts if the target
4110 is running.
4111 * server.c (extended_protocol): Make static.
4112 (attached): Define earlier.
4113 (exit_requested, response_needed, program_argv): New variables.
4114 (target_running): New.
4115 (start_inferior): Clear attached here.
4116 (attach_inferior): Set attached here.
4117 (require_running): Define.
4118 (handle_query): Use require_running and target_running. Implement
4119 "monitor exit".
4120 (handle_v_attach, handle_v_run): New.
4121 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4122 (gdbserver_usage): Update.
4123 (main): Redo argument parsing. Handle --debug and --multi. Handle
4124 --attach along with other options or after the port. Save
4125 program_argv. Support no initial program. Resynchronize
4126 communication with GDB after an error. Handle "monitor exit".
4127 Use require_running and target_running. Always allow the extended
4128 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4129 restart in extended mode.
4130 * README: Refer to the GDB manual. Update --attach usage.
4131
7407e2de
AS
41322007-12-20 Andreas Schwab <schwab@suse.de>
4133
4134 * linux-low.c (STACK_SIZE): Define.
4135 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4136 (linux_test_for_tracefork): Likewise.
4137
b65d95c5
DJ
41382007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4139
4140 * linux-low.c (linux_wait_for_event): Update messages. Do not
4141 reinsert auto-delete breakpoints.
4142 * mem-break.c (struct breakpoint): Change return type of handler to
4143 int.
4144 (set_breakpoint_at): Update handler type.
4145 (reinsert_breakpoint_handler): Return 1 instead of calling
4146 delete_breakpoint.
4147 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4148 setting a new one.
4149 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4150 * mem-break.h (set_breakpoint_at): Update handler type.
4151 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4152 * win32-low.c (auto_delete_breakpoint): New.
4153 (get_child_debug_event): Use it.
4154
4e799345
DJ
41552007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4156
4157 * configure.ac: Check for pread and pwrite.
4158 * hostio.c (handle_pread): Fall back to lseek and read.
4159 (handle_pwrite): Fall back to lseek and write.
4160 * config.in, configure: Regenerated.
4161
27524b67
DJ
41622007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4163
4164 * server.c (myresume): Add own_buf argument.
4165 (main): Update calls.
4166
a20d5e98
DJ
41672007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4168
4169 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4170 * remote-utils.c (remote_open): Do not call disable_async_io.
4171 (block_async_io): Delete.
4172 (unblock_async_io): Make static.
4173 (initialize_async_io): New.
4174 * server.c (handle_v_cont): Handle async I/O here.
4175 (myresume): Likewise. Move other common resume tasks here...
4176 (main): ... from here. Call initialize_async_io. Disable async
4177 I/O before the main loop.
4178 * server.h (initialize_async_io): Declare.
4179 (block_async_io, unblock_async_io): Delete prototypes.
4180 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4181
b79d787e
DJ
41822007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4183
4184 * remote-utils.c (readchar): Allow binary data in received messages.
4185
d97903b2
PA
41862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4187
4188 * win32-low.c (attaching): New global.
4189 (win32_create_inferior): Clear the `attaching' global.
4190 (win32_attach): Set the `attaching' global.
4191 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4192 attaching. Only set a breakpoint at the entry point if not
4193 attaching.
4194
311de423
PA
41952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4196
4197 * server.c (main): Don't report dll events on the initial
4198 connection on attaches.
4199
6c2d16d2
PA
42002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4201
4202 * server.c (main): Relax numerical bases supported for the pid of
4203 the --attach command line argument.
4204
5ca906e6
PA
42052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4206
4207 * win32-low.c (win32_attach): Call OpenProcess before
4208 DebugActiveProcess, not after. Add last error output to error
4209 call.
4210
9c6c8194
PA
42112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4212
4213 * win32-low.c (win32_get_thread_context)
4214 (win32_set_thread_context): New functions.
4215 (thread_rec): Use win32_get_thread_context.
4216 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4217 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4218 field.
4219
4d5d1aaa
PA
42202007-12-03 Leo Zayas
4221 Pedro Alves <pedro_alves@portugalmail.pt>
4222
4223 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4224 global variables.
4225 (child_add_thread): Minor cleanup.
4226 (child_continue): Resume artificially suspended threads before
4227 calling ContinueDebugEvent.
4228 (suspend_one_thread): New.
4229 (fake_breakpoint_event): New.
4230 (get_child_debug_event): Change return type to int. Check here if
4231 gdb sent an interrupt request. If a soft interrupt was requested,
4232 fake a breakpoint event. Return 0 if there is no event to handle,
4233 and 1 otherwise.
4234 (win32_wait): Don't check here if gdb sent an interrupt request.
4235 Ensure there is a valid event to handle.
4236 (win32_request_interrupt): Add soft interruption method as last
4237 resort.
4238
c436e841
PA
42392007-12-03 Leo Zayas
4240 Pedro Alves <pedro_alves@portugalmail.pt>
4241
4242 * win32-low.h (win32_thread_info): Add descriptions to the
4243 structure members. Replace `suspend_count' counter by a
4244 `suspended' flag.
4245 * win32-low.c (thread_rec): Update condition of when to get the
4246 context from the inferior. Rely on ContextFlags being set if it
4247 has already been retrieved. Only suspend the inferior thread if
4248 we haven't already. Warn if that fails.
4249 (continue_one_thread): s/suspend_count/suspended/. Only call
4250 ResumeThread once. Warn if that fails.
4251
e7b5fa67
PA
42522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4253
4254 * win32-low.c (win32_wait): Don't read from the inferior when it
4255 has already exited.
4256
a385171d
PA
42572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4258
4259 * Makefile.in (win32_low_h): New variable.
4260 (win32-low.o): Add dependency on $(win32_low_h).
4261 (win32-arm-low.o, win32-i386-low.o): New rules.
4262
f80c84b3
DJ
42632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4264
4265 * hostio.c: Correct copyright year.
4266
a6b151f1
DJ
42672007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4268
4269 * Makefile.in (OBS): Add hostio.o.
4270 (hostio.o): New rule.
4271 * server.h (handle_vFile): Declare.
4272 * hostio.c: New file.
4273 * server.c (handle_v_requests): Take packet_len and new_packet_len
4274 for binary packets. Call handle_vFile.
4275 (main): Update call to handle_v_requests.
4276
f9387fc3
DJ
42772007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4278
4279 * linux-low.c: Include <sched.h>.
4280
51c2684e
DJ
42812007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4282
4283 * linux-low.c (linux_tracefork_grandchild): New.
4284 (linux_tracefork_child): Use clone.
4285 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4286
75f83163
JB
42872007-10-31 Joel Brobecker <brobecker@adacore.com>
4288
4289 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4290
da5898ce
DJ
42912007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4292
4293 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4294
24a09b5f
DJ
42952007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4296
4297 * inferiors.c (change_inferior_id): Delete.
4298 (add_pid_to_list, pull_pid_from_list): New.
4299 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4300 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4301 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4302 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4303 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4304 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4305 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4306 (using_threads): Always set to 1.
4307 (handle_extended_wait): New.
4308 (add_process): Do not set TID.
4309 (linux_create_inferior): Set must_set_ptrace_flags.
4310 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4311 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4312 (linux_thread_alive): Rename TID argument to LWPID.
4313 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4314 (linux_wait_for_event): Do not use TID or check using_threads. Update
4315 call to dead_thread_notify. Call handle_extended_wait.
4316 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4317 (send_sigstop): Delete sigstop_sent.
4318 (wait_for_sigstop): Avoid TID.
4319 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4320 (linux_test_for_tracefork): New.
4321 (linux_lookup_signals): Use thread_db_active and
4322 linux_supports_tracefork_flag.
4323 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4324 * linux-low.h (get_process_thread): Avoid TID.
4325 (struct process_ifo): Move thread_known and tid to the end. Remove
4326 sigstop_sent.
4327 (linux_attach_lwp, thread_db_init): Update prototypes.
4328 * server.h (change_inferior_id): Delete prototype.
4329 (add_pid_to_list, pull_pid_from_list): New prototypes.
4330 * thread-db.c (thread_db_use_events): New.
4331 (find_first_thread): Rename to...
4332 (find_one_thread): ...this. Update callers and messages. Do not
4333 call fatal. Check thread_db_use_events. Do not call
4334 change_inferior_id or new_thread_notify.
4335 (maybe_attach_thread): Update. Do not call new_thread_notify.
4336 (thread_db_init): Set thread_db_use_events. Check use_events.
4337 * utils.c (fatal, warning): Correct message prefix.
4338
30ed0a8f
DJ
43392007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4340
4341 * Makefile.in (clean): Remove new files.
4342 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4343 (powerpc-64.o, powerpc-64.c): New rules.
4344 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4345 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4346 with SPE.
4347 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4348 SPE targets.
4349 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4350 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4351 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4352 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4353 (target_regsets): Add AltiVec and SPE register sets.
4354 * configure.ac: Check for AltiVec and SPE.
4355 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4356 (ppc_fill_vrregset, ppc_store_vrregset): New.
4357 (target_regsets): Add AltiVec register set.
4358 * configure: Regenerated.
4359
fd462a61
DJ
43602007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4361
4362 * linux-low.c (O_LARGEFILE): Define.
4363 (linux_read_memory): Use /proc/PID/mem.
4364 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4365 * configure, config.in: Regenerated.
4366
69f223ed
DJ
43672007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4368
4369 * linux-low.c (linux_wait_for_event): Do not pass signals while
4370 single-stepping.
4371
aec18585
PA
43722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4373
4374 * win32-low.c (create_process): New.
4375 (win32_create_inferior): Use create_process instead of
4376 CreateProcess. If create_process failed retry appending an ".exe"
4377 suffix. Store the GetLastError result immediatelly after
4378 create_process calls and use it on the call to error.
4379
34d86ddd
PA
43802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4381
4382 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4383
5a0e3bd0
JB
43842007-08-23 Joel Brobecker <brobecker@adacore.com>
4385
4386 * configure.ac: Switch license to GPLv3.
4387
f88c79e6
MS
43882007-08-01 Michael Snyder <msnyder@access-company.com>
4389
4390 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4391
6b3d9b83
PA
43922007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4393
4394 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4395 typedef.
4396 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4397 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4398 CloseToolhelp32Snapshot.
4399 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4400 CloseToolhelp32Snapshot.
4401
c588c53c
MS
44022007-07-27 Michael Snyder <michael.snyder@access-company.com>
4403
4404 * server.c (main): Check for inferior exit before main loop.
4405
aa0403d9
PA
44062007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4407
4408 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4409 instead of on tmp_desc.
4410
255e7678
DJ
44112007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4412 Daniel Jacobowitz <dan@codesourcery.com>
4413
4414 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4415 (add_thread): Minor cleanups.
4416 (clear_inferiors): Move lower in the file. Clear the DLL
4417 list.
4418 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4419 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4420 (xml_escape_text): New.
4421 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4422 for qSupported.
4423 (handle_v_cont): Report errors.
4424 (gdbserver_version): Update.
4425 (main): Correct size of own_buf. Do not report initial DLL events.
4426 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4427 (unloaded_dll, xml_escape_text): New.
4428 * win32-low.c (enum target_waitkind): Update comments.
4429 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4430 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4431 (win32_EnumProcessModules, win32_GetModuleInformation)
4432 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4433 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4434 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4435 (win32_Module32First, win32_Module32Next, load_toolhelp)
4436 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4437 (get_child_debug_event): Handle DLL events.
4438 (win32_wait): Likewise.
4439
0d37add9
DJ
44402007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4441
4442 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4443 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4444
45e2715e
PA
44452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4446
4447 * win32-low.c (handle_output_debug_string): Ignore event if not
4448 waiting.
4449
c5674cf1
PA
44502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4451
4452 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4453
2bbe3cc1
DJ
44542007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4455
4456 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4457
ae13219e
DJ
44582007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4459
4460 * inferiors.c (change_inferior_id): Add comment.
4461 * linux-low.c (check_removed_breakpoint): Add an early
4462 prototype. Improve debug output.
4463 (linux_attach): Doc update.
4464 (linux_detach_one_process, linux_detach): Clean up before releasing
4465 each process.
4466 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4467 * linux-low.h (struct process_info): Doc improvement.
4468 * mem-break.c (delete_all_breakpoints): New.
4469 * mem-break.h (delete_all_breakpoints): New prototype.
4470 * thread-db.c (find_first_thread): New.
4471 (thread_db_create_event): Call it instead of
4472 thread_db_find_new_threads. Clean up unused variables.
4473 (maybe_attach_thread): Remove first thread handling.
4474 (thread_db_find_new_threads): Use find_first_thread.
4475 (thread_db_get_tls_address): Likewise.
4476
4105de34
DJ
44772007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4478
4479 * thread-db.c (thread_db_find_new_threads): Add prototype.
4480 (thread_db_create_event): Check for the main thread before adding
4481 a new thread.
4482 (maybe_attach_thread): Only enable event reporting if TID == 0.
4483 (thread_db_get_tls_address): Check for new threads.
4484
2b876972
DJ
44852007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4486
4487 * linux-low.c (linux_create_inferior): Try execv before execvp.
4488 * spu-low.c (spu_create_inferior): Likewise.
4489
7a245884
DJ
44902007-06-13 Mike Frysinger <vapier@gentoo.org>
4491
4492 * linux-low.c (linux_create_inferior): Change execv to execvp.
4493 * spu-low.c (spu_create_inferior): Likewies.
4494
117ce543
DJ
44952007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4496
4497 * Makefile.in (clean): Clean new files instead of deleted ones.
4498 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4499 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4500 rules.
4501 * configure.srv: Specify XML files and new regformats for MIPS and
4502 MIPS64 GNU/Linux.
4503 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4504 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4505 an entry for the restart register.
4506 (mips_cannot_fetch_register, mips_cannot_store_register)
4507 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4508 register names to match the XML descriptions.
4509 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4510 restart register instead of $0.
4511
0e7f50da
UW
45122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4513 Markus Deuling <deuling@de.ibm.com>
4514
4515 * remote-utils.c (decode_xfer_write): New function.
4516 * server.h (decode_xfer_write): Add prototype.
4517 * server.c (handle_query): Add PACKET_LEN argument. Support
4518 qXfer:spu:read and qXfer:spu:write packets.
4519 (main): Pass packet_len to handle_query.
4520 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4521 * target.h (target_ops): Add qxfer_spu.
4522
374c1d38
UW
45232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4524
4525 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4526 accessing non-seekable spufs files.
4527
bb63802a
UW
45282007-05-16 Markus Deuling <deuling@de.ibm.com>
4529
889bf7c5 4530 * server.c (handle_query): Add reply for qC packet.
bb63802a 4531
7390519e
PA
45322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4533 Leo Zayas <lerele@champenstudios@com>
4534
4535 * server.h (check_remote_input_interrupt_request): New function.
4536 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4537 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4538 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4539 (check_remote_input_interrupt_request): New function.
4540 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 4541 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
4542 winapi_GenerateConsoleCtrlEvent): New typedefs.
4543 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4544 to 250 ms.
4545 (win32_wait): Check for remote interrupt request
4546 with check_remote_input_interrupt_request.
4547 (win32_request_interrupt): New function.
4548 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4549
34b34921
PA
45502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4551
4552 * win32-low.c (debug_registers_changed,
4553 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4554 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4555 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4556 (thread_rec): Get context using the low target.
4557 (child_add_thread): Call thread_added on the low target,
4558 which does the same thing.
4559 (regptr): Delete.
4560 (do_initial_child_stuff): Remove debug registers references.
4561 Set context using the low target. Resume threads after
4562 setting the contexts.
4563 (child_continue): Remove dead variable. Remove debug
4564 registers references.
4565 (child_fetch_inferior_registers): Go through the low target.
4566 (do_child_store_inferior_registers): Remove.
4567 (child_store_inferior_registers): Go through the low target.
4568 (win32_resume): Remove debug registers references.
4569 Set context using the low target.
4570 (handle_exception): Change return type to void. Don't record
4571 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4572 first chance exception.
889bf7c5 4573 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
4574 goto loop. Always return after waiting for debug event.
4575 (win32_wait): Convert to switch statement. Handle spurious
4576 events.
4577
4578 * win32-i386-low.c (debug_registers_changed,
4579 debug_registers_used): New.
4580 (initial_stuff): Rename to ...
4581 (i386_initial_stuff): ... this. Clear debug registers
4582 state variables.
4583 (store_debug_registers): Delete.
4584 (i386_get_thread_context): New.
4585 (load_debug_registers): Delete.
4586 (i386_set_thread_context): New.
4587 (i386_thread_added): New.
4588 (single_step): Rename to ...
4589 (i386_single_step): ... this.
4590 (do_fetch_inferior_registers): Rename to ...
4591 (i386_fetch_inferior_register): ... this.
4592 (i386_store_inferior_register): New.
4593 (the_low_target): Adapt to new interface.
4594
4595 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4596 (arm_get_thread_context): New.
4597 (arm_set_thread_context): New.
4598 (regptr): New.
4599 (do_fetch_inferior_registers): Rename to ...
4600 (arm_fetch_inferior_register): ... this.
4601 (arm_store_inferior_register): New.
4602 (arm_wince_breakpoint): Reimplement as unsigned long.
4603 (arm_wince_breakpoint_len): Define.
4604 (the_low_target): Adapt to new interface.
4605
4606 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4607 load_debug_registers. Add get_thread_context, set_thread_context,
4608 thread_added and store_inferior_register. Rename
4609 fetch_inferior_registers to fetch_inferior_register.
4610 (regptr): Remove declaration.
4611
dd6953e1
PA
46122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4613
4614 * linux-low.c (linux_detach): Change return type to int. Return 0.
4615 * spu-low.c (spu_detach): Likewise.
4616
444d6139
PA
46172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4618
4619 * target.h (target_ops): Change return type of detach to int.
4620 Add join.
4621 (join_inferior): New.
4622 * server.c (main): Don't skip detach support on mingw32.
4623 If the inferior doesn't support detaching return error.
4624 Call join_inferior instead of using waitpid.
4625 * linux-low.c (linux_join): New.
4626 (linux_target_op): Add linux_join.
4627 * spu-low.c (spu_join): New.
4628 (spu_target_ops): Add spu_join.
4629 * win32-low.c (win32_detach): Adapt to new interface.
4630 Reopen current_process_handle before detaching. Issue a child
4631 resume before detaching.
4632 (win32_join): New.
4633 (win32_target_op): Add win32_join.
4634
1d5315fe
PA
46352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4636
4637 * win32-low.c (win32-attach): Fix return value.
4638 * target.h (target_ops): Describe ATTACH return values.
4639
bf914831
PA
46402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4641
4642 * win32-low.c (GETPROCADDRESS): Define.
4643 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4644 (winapi_DebugSetProcessKillOnExit): Likewise.
4645 (win32_create_inferior): Force usage of ansi CreateProcessA.
4646 (win32_attach): Use GETPROCADDRESS.
4647 (win32_detach): Likewise.
4648
f72f3e60
PA
46492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4650
4651 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4652
ed50f18f
PA
46532007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4654
4655 * win32-low.c: Commit leftover changes from 2007-03-29.
4656
0c2ead7e
DJ
46572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4658
4659 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4660 fields short instead of int. Add explicit padding.
4661 (i387_cache_to_fsave): Remove unnecessary casts.
4662 (i387_fsave_to_cache): Doc fix.
4663 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4664
73725ff3
DJ
46652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4666
4667 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4668 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4669
d99f33d8
PA
46702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4671
4672 * configure.srv (arm*-*-mingw32ce*): Move near the other
4673 arm targets.
4674
68070c10
PA
46752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4676
2482afc6 4677 * configure.ac: Add errno checking.
68070c10
PA
4678 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4679 sys/file.h and malloc.h.
4680 (AC_CHECK_DECLS): Add perror.
4681 (srv_mingwce): Handle.
2482afc6 4682 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
4683 win32-i386-low.o to srv_tgtobj.
4684 (i[34567]86-*-mingw*): Likewise.
4685 (arm*-*-mingw32ce*): Add case.
4686 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4687 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4688 [__MINGW32CE__] (strerror): New function.
4689 [__MINGW32CE__] (errno): Define to GetLastError.
4690 [__MINGW32CE__] (COUNTOF): New macro.
4691 (remote_open): Remove extra close call.
4692 * mem-break.c (delete_breakpoint_at): New function.
4693 * mem-break.h (delete_breakpoint_at): Declare.
4694 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4695 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4696 [USE_WIN32API] (read, write): Add char* casts.
4697 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4698 * server.h: Include wincecompat.h on Windows CE.
4699 [HAVE_ERRNO_H]: Check.
4700 (perror): Declare if not declared.
4701 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4702 (perror_with_name): Remove errno declaration.
4703 * wincecompat.h: New.
4704 * wincecompat.c: New.
4705 * win32-low.h: New.
4706 * win32-arm-low.c: New.
4707 * win32-i386-low.c: New.
4708 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4709 (OUTMSG2): Make it safe.
4710 (_T): New macro.
4711 (COUNTOF): New macro.
4712 (NUM_REGS): Get it from the low target.
4713 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4714 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4715 (thread_rec): Let low target handle debug registers.
4716 (child_add_thread): Likewise.
4717 (child_init_thread_list): Likewise.
4718 (continue_one_thread): Likewise.
4719 (regptr): New.
4720 (do_child_fetch_inferior_registers): Move to ...
4721 * win32-i386-low.c: ... here, and rename to ...
4722 (do_fetch_inferior_registers): ... this.
889bf7c5 4723 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
4724 Go through the low target.
4725 (do_child_store_inferior_registers): Use regptr.
4726 (strwinerror): New function.
4727 (win32_create_inferior): Handle Windows CE.
4728 Use strwinerror instead of strerror on Windows error
4729 codes. Add program to the error output.
4730 Don't close the main thread handle on Windows CE.
4731 (win32_attach): Use coredll.dll on Windows CE.
4732 (win32_kill): Close current process and current
4733 thread handles.
4734 (win32_detach): Use coredll.dll on Windows CE.
4735 (win32_resume): Let low target handle debug registers, and
4736 step request.
4737 (handle_exception): Add/Remove initial breakpoint. Avoid
4738 non-existant WSTOPSIG on Windows CE.
4739 (win32_read_inferior_memory): Cast to remove warning.
4740 (win32_arch_string): Go through the low target.
4741 (initialize_low): Call set_breakpoint_data with the low
4742 target's breakpoint.
4743 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4744 FOP_REGNUM, mappings): Move to ...
4745 * win32-i386-low.c: ... here.
4746 * win32-low.c (win32_thread_info): Move to ...
4747 * win32-low.h: ... here.
4748 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4749 win32-arm-low.c and wincecompat.c.
4750 (all:): Add $EXEEXT.
4751 (install-only:): Likewise.
4752 (gdbserver:): Likewise.
4753 (gdbreplay:): Likewise.
4754 * config.in: Regenerate.
4755 * configure: Regenerate.
4756
41093d81
PA
47572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4758
4759 * win32-low.c: Rename typedef thread_info to
4760 win32_thread_info throughout.
4761
544afa54
PA
47622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4763
4764 * win32-i386-low.c: Rename to ...
4765 * win32-low.c: ... this.
4766 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4767 * Makefile.in: Likewise.
4768
bce7165d
PA
47692007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4770
4771 * remote-utils.c (monitor_output): Constify msg parameter.
4772 * server.h (monitor_output): Likewise.
4773 * win32-i386-low.c (handle_output_debug_string): New.
4774 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4775 handle_output_debug_string.
4776 (get_child_debug_event): Likewise.
4777
506c7aa0
DJ
47782007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4779
4780 * server.c (main): Correct strtoul check.
4781
42c81e2a
DJ
47822007-03-27 Jon Ringle <jon@ringle.org>
4783
4784 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4785
9453113a
DJ
47862007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4787
4788 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4789
64a69107
DJ
47902007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4791
4792 * terminal.h: Check HAVE_SGTTY_H.
4793
47942007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
4795
4796 * remote-utils.c (remote_open): Print out the assigned port number.
4797
c74d0ad8
DJ
47982007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4799
4800 * remote-utils.c (monitor_output): New function.
4801 * server.c (debug_threads): Define here.
4802 (monitor_show_help): New function.
4803 (handle_query): Handle qRcmd.
4804 (main): Do not handle 'd' packet.
4805 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4806 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4807 of debug_threads.
4808
de7c3b4a
PA
48092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4810
4811 * Makefile.in (EXEEXT): New.
4812 (clean): Use $(EXEEXT).
4813
ef57601b
PA
48142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4815
4816 * target.h (target_ops): Rename send_signal to request_interrupt,
4817 and remove enum target_signal parameter.
4818 * linux-low.c (linux_request_interrupt): Rename from
4819 linux_send_signal, and always send SIGINT.
4820 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4821 and always send SIGINT.
4822 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4823 of send_signal.
4824 (input_interrupt): Likewise.
4825
820f2bda
PA
48262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4827
4828 * server.c (get_features_xml): Check if target implemented
4829 arch_string.
4830 * win32-i386-low.c (win32_arch_string): New.
4831 (win32_target_ops): Add win32_arch_string as arch_string member.
4832
ab39bf24
UW
48332007-02-22 Markus Deuling <deuling@de.ibm.com>
4834
4835 * spu-low.c (spu_arch_string): New.
4836 (spu_target_ops): Add spu_arch_string.
4837
61ff6e04
DJ
48382007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4839
4840 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4841 * configure.ac: Do not check for terminal.h.
4842 * configure, config.in: Regenerated.
4843
fb1e4ffc
DJ
48442007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4845
4846 * Makefile.in (OBS): Add $(XML_BUILTIN).
4847 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4848 (clean): Update.
4849 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4850 (arm-with-iwmmxt.c): New.
4851 * config.in, configure: Regenerate.
4852 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4853 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4854 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4855 (arm*-*-linux*): Add iWMMXt and regset support.
4856 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4857 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4858 (arm_store_wmmxregset, target_regsets): New.
4859 * server.c (get_features_xml): Take annex argument. Check builtin
4860 XML documents.
4861 (handle_query): Handle multiple annexes.
4862
0f48aa01
DJ
48632007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4864
4865 * remote-utils.c [USE_WIN32API] (read, write): Define.
4866 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4867 write.
4868
23181151
DJ
48692007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4870
4871 * linux-i386-low.c (the_low_target): Set arch_string.
4872 * linux-x86-64-low.c (the_low_target): Likewise.
4873 * linux-low.c (linux_arch_string): New.
4874 (linux_target_ops): Add it.
4875 * linux-low.h (struct linux_target_ops): Add arch_string.
4876 * server.c (write_qxfer_response): Use const void * for DATA.
4877 (get_features_xml): New.
4878 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4879 * target.h (struct target_ops): Add arch_string method.
4880
9d606399
DJ
48812007-01-03 Denis Pilat <denis.pilat@st.com>
4882 Daniel Jacobowitz <dan@codesourcery.com>
4883
4884 * linux-low.c (linux_kill): Handle being called with no threads.
4885 * win32-i386-low.c (win32_kill): Likewise.
4886 (get_child_debug_event): Clear current_process_handle.
4887
48882006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
4889 Daniel Jacobowitz <dan@codesourcery.com>
4890
4891 * remote-utils.c (remote_open): Check the type of specified
4892 serial port devices before opening them.
4893 * server.c (main): Kill the inferior if an error occurs during
4894 the first remote_open.
4895
a5e13d24
DJ
48962006-12-05 Markus Deuling <deuling@de.ibm.com>
4897
4898 * README: Update supported targets.
4899
186947f7
DJ
49002006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4901
4902 * Makefile.in (clean): Remove reg-mips64.c.
4903 (reg-mips64.c, reg-mips64.o): New rules.
4904 * configure.srv: Handle mips64. Include regset support for mips.
4905 * linux-mips-low.c (union mips_register): New.
4906 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4907 (mips_breakpoint, mips_breakpoint_at): Use int.
4908 (mips_collect_register, mips_supply_register)
4909 (mips_collect_register_32bit, mips_supply_register_32bit)
4910 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4911 (mips_store_fpregset, target_regsets): New.
4912 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4913
a13e2c95
UW
49142006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4915
4916 * configure.srv: Add target "spu*-*-*".
4917 * Makefile.in (clean): Remove reg-spu.c.
4918 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4919 * spu-low.c: New file.
4920
cb7283db
DJ
49212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4922
4923 * configure.ac: Correct td_thr_tls_get_addr test.
4924 * configure: Regenerated.
4925
89be2091
DJ
49262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4927
4928 * linux-low.c (linux_wait_for_event): Reformat. Use the
4929 pass_signals array.
4930 * remote-utils.c (decode_address_to_semicolon): New.
4931 * server.c (pass_signals, handle_general_set): New.
4932 (handle_query): Mention QPassSignals for qSupported.
4933 (main): Call handle_general_set.
4934 * server.h (pass_signals, decode_address_to_semicolon): New.
4935
000ef4f0
DJ
49362006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4937
4938 * server.c (handle_query): Correct error handling for read_auxv.
4939
b7149293
UW
49402005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4941
4942 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4943 and srv_linux_thread_db to yes.
4944 * linux-s390-low.c (s390_fill_gregset): New function.
4945 (target_regsets): Define data structure.
4946
dae5f5cf
DJ
49472006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4948
4949 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4950 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4951 * config.in, configure: Regenerated.
4952 * inferiors.c (gdb_id_to_thread): New function.
4953 (gdb_id_to_thread_id): Use it.
4954 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4955 * linux-low.h (struct process_info): Add th member.
4956 (thread_db_get_tls_address): New prototype.
4957 * remote-utils.c (decode_address): Make non-static.
4958 * server.c (handle_query): Handle qGetTLSAddr.
4959 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4960 * target.h (struct target_ops): Add get_tls_address.
4961 * thread-db.c (maybe_attach_thread): Save the thread handle.
4962 (thread_db_get_tls_address): New.
4963
32ca6d61
DJ
49642006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4965
4966 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4967 (linux_resume_one_process): Take a siginfo_t *. Update all
4968 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4969 (struct pending_signals): Add a siginfo_t.
4970 (linux_wait_for_process): Always set last_status.
4971 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4972 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4973 * linux-low.h (struct process_info): Add last_status.
4974
5ffff7c1
DJ
49752006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4976
4977 * remote-utils.c (try_rle): New function.
4978 (putpkt_binary): Use it.
4979
8695c747
DJ
49802006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4981
4982 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4983 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4984 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4985 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4986 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4987 point registers.
4988
290fadea
RS
49892006-08-08 Richard Sandiford <richard@codesourcery.com>
4990
4991 * server.c (terminal_fd): New variable.
4992 (old_foreground_pgrp): Likewise.
4993 (restore_old_foreground_pgrp): New function.
4994 (start_inferior): Record the terminal file descriptor in terminal_fd
4995 and its original foreground group in old_foreground_pgrp. Register
4996 restore_old_foreground_pgrp with atexit().
4997
9f2e1e63
DJ
49982006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4999
5000 * server.c (handle_query): Correct qPart to qXfer.
5001
b80864fb
DJ
50022006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5003
5004 * configure.ac: Check for more headers which are missing on
5005 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5006 * configure.srv: Add Cygwin and mingw32.
5007 * remote-utils.c: Don't include headers unconditionally which
5008 are missing on mingw32. Include <winsock.h> for mingw32.
5009 (remote_open): Adjust for mingw32 support. Flush
5010 standard error after writing to it.
5011 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5012 (unblock_async_io, enable_async_io, disable_async_io)
5013 (readchar, getpkt): Update for Winsock support.
5014 (prepare_resume_reply): Expect a protocol signal number.
5015 * server.c: Disable <sys/wait.h> on mingw32.
5016 (start_inferior): Adjust for mingw32 support. Flush
5017 standard error after writing to it.
5018 (attach_inferior): Likewise. Use protocol signal
5019 numbers.
5020 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5021 and names.
5022 * win32-i386-low.c: New file.
5023 * Makefile.in (XM_CLIBS): Set.
5024 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5025 (win32-i386-low.o): New dependency rule.
5026 * linux-low.c (linux_wait): Use target signal numbers.
5027 * target.h (struct target_ops): Doc fix.
5028 * server.h (target_signal_to_name): New prototype.
5029 * gdbreplay.c: Don't include headers unconditionally which
5030 are missing on mingw32. Include <winsock.h> for mingw32.
5031 (remote_close, remote_open): Adjust for Winsock support.
5032 * configure, config.in: Regenerated.
5033
0876f84a
DJ
50342006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5035
5036 * server.c (decode_xfer_read, write_qxfer_response): New.
5037 (handle_query): Take a packet length argument. Handle
5038 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5039 the qSupported response.
5040 (main): Update call to handle_query.
5041
01f9e8fa
DJ
50422006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5043
5044 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5045 (putpkt_binary): Renamed from putpkt and adjusted for binary
5046 data.
5047 (putpkt): New wrapper for putpkt_binary.
5048 (readchar): Don't mask off the high bit.
5049 (decode_X_packet): New function.
5050 * server.c (main): Call putpkt_binary if a handler sets the packet
5051 length. Save the length of the incoming packet. Handle 'X'.
5052 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5053
be2a5f71
DJ
50542006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5055
5056 * server.c (handle_query): Handle qSupported.
5057
ea025f5f
DJ
50582006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5059
5060 * remote-utils.c (all_symbols_looked_up): New variable.
5061 (look_up_one_symbol): Check it.
5062 * server.h (look_up_one_symbol): New declaration.
5063 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5064
9308fc88
DJ
50652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5066
5067 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 5068 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
5069 (PTRACE_GET_THREAD_AREA): Define.
5070 (ps_get_thread_area): New function.
5071
52fb6437
NS
50722006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5073
5074 * configure.srv (m68k*-*-uclinux*): New target.
5075 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5076 (linux_resume_one_process): Remove extraneous cast.
5077 (linux_read_offsets): New.
5078 (linux_target_op): Add linux_read_offsets on mmuless systems.
5079 * server.c (handle_query): Add qOffsets logic.
5080 * target.h (struct target_ops): Add read_offsets.
5081
21b0f40c
DJ
50822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5083
5084 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5085 (PTRACE_GET_THREAD_AREA): Define.
5086 (ps_get_thread_area): New function.
5087 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5088 (linux-x86-64-low.o): Update.
5089
0050a760
DJ
50902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5091
5092 * configure.ac: Remove checks for prfpregset_t.
5093 * gdb_proc_service.h: New file.
5094 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5095 new "gdb_proc_service.h".
5096 * proc-service.c: Likewise.
5097 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5098 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5099 * Makefile.in (gdb_proc_service_h): Updated.
5100 * configure, config.in: Regenerated.
5101
b92a518e
DJ
51022006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5103
5104 * remote-utils.c (prepare_resume_reply): Move declaration
5105 of gdb_id_from_wait to the top of the block.
5106
545587ee
DJ
51072006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5108
5109 * linux-low.c (regsets_store_inferior_registers): Read the regset
5110 from the target before filling it.
5111
9db87ebd
DJ
51122006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5113
5114 * server.c (attach_inferior): Return SIGTRAP for a successful
5115 attach.
5116
dd24457d
DJ
51172006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5118
5119 * Makefile.in (OBS): Add version.o.
5120 (STAGESTUFF): Delete.
5121 (version.o): Add dependencies.
5122 (version.c): Replace rule.
5123 (clean): Remove version.c.
5124 * server.c (gdbserver_version): New.
5125 (gdbserver_usage): Use printf.
5126 (main): Handle --version and --help.
5127 * server.h (version, host_name): Add declarations.
5128
6f0f660e
EZ
51292005-12-23 Eli Zaretskii <eliz@gnu.org>
5130
889bf7c5
PA
5131 * linux-arm-low.c:
5132 * linux-arm-low.c:
5133 * inferiors.c:
5134 * i387-fp.h:
5135 * i387-fp.c:
5136 * gdbreplay.c:
5137 * regcache.c:
5138 * proc-service.c:
5139 * mem-break.h:
5140 * mem-break.c:
5141 * linux-x86-64-low.c:
5142 * linux-sh-low.c:
5143 * linux-s390-low.c:
5144 * linux-ppc64-low.c:
5145 * linux-ppc-low.c:
5146 * linux-mips-low.c:
5147 * linux-m68k-low.c:
5148 * linux-m32r-low.c:
5149 * linux-low.h:
5150 * linux-low.c:
5151 * linux-ia64-low.c:
5152 * linux-i386-low.c:
5153 * linux-crisv32-low.c:
5154 * thread-db.c:
5155 * terminal.h:
5156 * target.h:
5157 * target.c:
5158 * server.h:
5159 * server.c:
5160 * remote-utils.c:
5161 * regcache.h:
5162 * utils.c:
5163 * Makefile.in:
5164 * configure.ac:
6f0f660e
EZ
5165 * gdbserver.1: Add (C) after Copyright. Update the FSF
5166 address.
5167
9d1fb177
DJ
51682005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5169
5170 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5171 (arm_breakpoint_at): Recognize both breakpoints.
5172 (the_low_target): Use the correct breakpoint instruction.
5173
011a70c2
DJ
51742005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5175
5176 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5177 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5178 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5179 (the_low_target): Update.
5180
7fb85e41
AS
51812005-10-25 Andreas Schwab <schwab@suse.de>
5182
5183 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5184
5185 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5186 (ia64_num_regs): Reduce to 462.
5187
3db0444b
DJ
51882005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5189
5190 * acinclude.m4: Correct quoting.
5191 * aclocal.m4: Regenerated.
5192
5193 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5194 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5195 (thread_db_init): Call thread_db_err_str.
5196 * configure.ac: Check for TD_VERSION.
5197 * config.in, configure: Regenerated.
5198
bee0189a
DJ
51992005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5200
5201 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5202
e9d25b98
DJ
52032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5204
5205 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5206 is not available. Define HAVE_PTRACE_GETREGS if it is.
5207 * config.in, configure: Regenerated.
5208 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5209 * linux-i386-low.c, linux-m68k-low.c: Update to use
5210 HAVE_PTRACE_GETREGS.
5211 * linux-low.c (regsets_fetch_inferior_registers)
5212 (regsets_store_inferior_registers): Only return 0 if we processed
5213 GENERAL_REGS.
5214 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5215 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5216
a06660f7
DJ
52172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5218
5219 * inferiors.c (struct thread_info): Add gdb_id.
5220 (add_thread): Add gdb_id argument.
5221 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5222 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5223 calls to add_thread.
5224 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5225 * server.c (handle_query): Use thread_to_gdb_id.
5226 (handle_v_cont, main): Use gdb_id_to_thread_id.
5227 * server.h (add_thread): Update prototype.
5228 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5229 prototypes.
5230
5a1f5858
DJ
52312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5232
5233 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5234 left-padded registers.
5235 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5236 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5237
e122f1f5
SE
52382005-07-01 Steve Ellcey <sje@cup.hp.com>
5239
5240 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5241 * configure: Regenerate.
5242 * config.in: Regenerate.
5243 * server.h (NEED_DECLARATION_STRERROR):
5244 Replace with !HAVE_DECL_STRERROR.
5245
d592fa2f
DJ
52462005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5247
5248 * linux-low.c (linux_wait, linux_send_signal): Don't test
5249 an unsigned long variable for > 0 if it could be MAX_ULONG.
5250 * server.c (myresume): Likewise.
5251 * target.c (set_desired_inferior): Likewise.
5252
ccbd4912
MK
52532005-06-13 Mark Kettenis <kettenis@gnu.org>
5254
5255 * configure.ac: Simplify and improve check for socklen_t.
5256 * configure, config.in: Regenerate.
5257
f450004a
DJ
52582005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5259
5260 * acconfig.h: Remove.
5261 * configure.ac: Add a test for socklen_t. Use three-argument
5262 AC_DEFINE throughout.
5263 * config.in: Regenerated using autoheader 2.59.
5264 * configure: Regenerated.
5265
5266 * gdbreplay.c (socklen_t): Provide a default.
5267 (remote_open): Use socklen_t.
5268 * remote-utils.c (socklen_t): Provide a default.
5269 (remote_open): Use socklen_t.
5270 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5271 unsigned char.
5272
5273 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5274 char for buffers.
5275 * linux-low.c (linux_read_memory, linux_write_memory)
5276 (linux_read_auxv): Likewise.
5277 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5278 (check_mem_write): Likewise.
5279 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5280 Likewise.
5281 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5282 (registers_from_string, register_data): Likewise.
5283 * server.c (handle_query, main): Likewise.
5284 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5285 (decode_M_packet): Likewise.
5286 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5287 * target.h (struct target_ops): Update read_memory, write_memory,
5288 and read_auxv.
5289 (read_inferior_memory, write_inferior_memory): Update.
5290 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5291 to unsigned char *.
5292 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5293 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5294 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5295 linux-s390-low.c, linux-sh-low.c: Update for changes in
5296 read_inferior_memory and the_low_target->breakpoint.
5297
eee84df1
DJ
52982005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5299
5300 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5301 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5302 * configure.srv: Add powerpc64-*-linux*.
5303 * linux-ppc64-low.c: New file.
5304
45b134e5
OF
53052005-05-23 Orjan Friberg <orjanf@axis.com>
5306
5307 * linux-cris-low.c: New file with support for CRIS.
5308 * linux-crisv32-low.c: Ditto for CRISv32.
5309 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5310 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 5311 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
5312 reg-crisv32.o, and reg-crisv32.c to make rules.
5313 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5314 recognized targets.
5315
48d93c75
UW
53162005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5317
5318 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5319 of sizeof (PTRACE_XFER_TYPE).
5320 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5321
e013ee27
OF
53222005-05-12 Orjan Friberg <orjanf@axis.com>
5323
889bf7c5 5324 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
5325 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5326 pointers for hardware watchpoint support.
5327 * linux-low.h (struct linux_target_ops): Ditto.
5328 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5329 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5330 to linux_target_ops.
5331 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5332 reply packet.
5333 * server.c (main): Recognize 'Z' and 'z' packets.
5334
b0ded00b
UW
53352005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5336
5337 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5338 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5339 (the_low_target): Add new members.
5340
8643e2ad
DJ
53412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5342
5343 * proc-service.c (ps_lgetregs): Search all_processes instead of
5344 all_threads.
5345
fc620387
DJ
53462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5347
5348 * server.c (start_inferior): Change return type to int.
5349 (attach_inferior): Change sigptr to int *.
5350 (handle_v_cont, handle_v_requests): Change signal to int *.
5351 (main): Change signal to int.
5352
53532005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
5354
5355 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5356 * configure.srv: Add m32r*-*-linux*.
5357 * linux-m32r-low.c: New file.
5358
e0e76420
DJ
53592005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5360
5361 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5362
a1928bad
DJ
53632005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5364
5365 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5366 Take unsigned long arguments for PIDs.
5367 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5368 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5369 (wait_for_sigstop, linux_resume_one_process)
5370 (regsets_fetch_inferior_registers, linux_send_signal)
5371 (linux_read_auxv): Likewise. Update the types of variables holding
5372 PIDs. Update format string specifiers.
5373 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5374 * remote-utils.c (prepare_resume_reply): Likewise.
5375 * server.c (cont_thread, general_thread, step_thread)
5376 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5377 unsigned long.
5378 (handle_query): Update format specifiers.
5379 (handle_v_cont, main): Use strtoul for thread IDs.
5380 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5381 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5382 (general_thread, step_thread, thread_from_wait)
5383 (old_thread_from_wait): Update.
5384 * target.h (struct thread_resume): Use unsigned long for THREAD.
5385 (struct target_ops): Use unsigned long for arguments to attach and
5386 thread_alive.
5387
dcdb98d2
DJ
53882005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5389
5390 * acinclude.m4: Include bfd/bfd.m4 directly.
5391 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5392 <agriffis@toolchain.org>.
5393 * aclocal.m4, configure: Regenerated.
5394
bec39cab
AC
53952005-01-07 Andrew Cagney <cagney@gnu.org>
5396
5397 * configure.ac: Rename configure.in, require autoconf 2.59.
5398 * configure: Re-generate.
5399
434c4c77
DJ
54002004-12-08 Daniel Jacobowitz <dan@debian.org>
5401
5402 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5403 LIBS when finished.
5404 * aclocal.m4: Regenerated.
5405 * configure: Regenerated.
5406
db1d3e1b
AS
54072004-11-21 Andreas Schwab <schwab@suse.de>
5408
5409 * linux-m68k-low.c (m68k_num_gregs): Define.
5410 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5411 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5412 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5413 (m68k_breakpoint_at): New. Add to the_low_target.
5414
5415 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5416 srv_linux_thread_db to yes.
5417
43360365
JB
54182004-10-20 Joel Brobecker <brobecker@gnat.com>
5419
5420 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5421 (ARCH_SET_FS): Likewise.
5422 (ARCH_GET_FS): Likewise.
5423 (ARCH_GET_GS): Likewise.
5424
fd500816
DJ
54252004-10-16 Daniel Jacobowitz <dan@debian.org>
5426
5427 * linux-i386-low.c (ps_get_thread_area): New.
5428 * linux-x86-64-low.c (ps_get_thread_area): New.
5429 * linux-low.c: Include <sys/syscall.h>.
5430 (linux_kill_one_process): Don't kill the first thread here.
5431 (linux_kill): Kill the first thread here.
5432 (kill_lwp): New function.
5433 (send_sigstop, linux_send_signal): Use it.
5434 * proc-service.c: Clean up #ifdefs.
5435 (fpregset_info): Delete.
5436 (ps_lgetregs): Update and enable implementation.
5437 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5438 implementations.
5439 * remote-utils.c (struct sym_cache, symbol_cache): New.
5440 (input_interrupt): Print a clearer message.
5441 (async_io_enabled): New variable.
5442 (enable_async_io, disable_async_io): Use it. Update comments.
5443 (look_up_one_symbol): Use the symbol cache.
5444 * thread-db.c (thread_db_look_up_symbols): New function.
5445 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5446
f6de3c42
DJ
54472004-10-16 Daniel Jacobowitz <dan@debian.org>
5448
5449 * configure.in: Test for -rdynamic.
5450 * configure: Regenerated.
5451 * Makefile (INTERNAL_LDFLAGS): New.
5452 (gdbserver, gdbreplay): Use it.
5453
2c0fc042
AC
54542004-09-02 Andrew Cagney <cagney@gnu.org>
5455
5456 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5457
075b3282
DJ
54582004-03-23 Daniel Jacobowitz <drow@mvista.com>
5459
5460 * linux-low.c (linux_wait): Clear all_processes list also.
5461
fa6a77dc
DJ
54622004-03-12 Daniel Jacobowitz <drow@mvista.com>
5463
5464 * linux-low.c: Include <errno.h>. Remove extern declaration of
5465 errno.
5466
6d782a97
DJ
54672004-03-12 Daniel Jacobowitz <drow@mvista.com>
5468
5469 * gdbreplay.c, server.h, utils.c: Update copyright years.
5470
3a7fb99b
DJ
54712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5472
5473 * server.c (main): Print child status or termination signal from
5474 variable 'signal', not 'sig'.
5475
c3e735a6
DJ
54762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5477
5478 * linux-low.c (linux_read_memory): Change return type to
5479 int. Check for and return error from ptrace().
5480 * target.c (read_inferior_memory): Change return type to int. Pass
5481 back return status from the_target->read_memory().
5482 * target.h (struct target_ops): Adapt *read_memory() prototype.
5483 Update comment.
5484 (read_inferior_memory): Adapt prototype.
5485 * server.c (main): Return an error packet if
5486 read_inferior_memory() returns an error.
5487
a59d1c82
DJ
54882004-03-04 Daniel Jacobowitz <drow@mvista.com>
5489
5490 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5491 Unify with other clean targets.
5492
dc3f8883
DJ
54932004-02-29 Daniel Jacobowitz <drow@mvista.com>
5494
5495 * server.c (handle_v_cont): Call set_desired_inferior.
5496
89a208da
DJ
54972004-02-29 Daniel Jacobowitz <drow@mvista.com>
5498
5499 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5500
62ea82f5
DJ
55012004-02-29 Daniel Jacobowitz <drow@mvista.com>
5502
5503 * linux-low.c (linux_wait): Unblock async I/O.
5504 (linux_resume): Block and enable async I/O.
5505 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5506 * server.h (block_async_io, unblock_async_io): Add prototypes.
5507
6910d122
DJ
55082004-02-29 Daniel Jacobowitz <drow@mvista.com>
5509
5510 * remote-utils.c (remote_open): Print a status notice after
5511 opening a TCP port.
5512 * server.c (attach_inferior): Print a status notice after
5513 attaching.
5514
55152004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
5516
5517 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5518
c89dc5d4
DJ
55192004-02-26 Daniel Jacobowitz <drow@mvista.com>
5520
5521 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5522 error packet.
5523 * server.c, target.h: Update copyright years.
5524
4b8dad4a
RM
55252004-02-25 Roland McGrath <roland@redhat.com>
5526
5527 * target.h (struct target_ops): New member `read_auxv'.
5528 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5529 * linux-low.c (linux_read_auxv): New function.
5530 (linux_target_ops): Initialize `read_auxv' member to that.
5531
d7446758
JB
55322004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5533
5534 Committed by Jim Blandy <jimb@redhat.com>.
5535
5536 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 5537 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
5538 instead of GPR_SIZE to distiguish s390 and s390x targets.
5539
5544ad89
DJ
55402004-01-31 Daniel Jacobowitz <drow@mvista.com>
5541
5542 * linux-low.c: Update copyright year.
5543 (check_removed_breakpoint): Clear pending_is_breakpoint.
5544 (linux_set_resume_request, linux_queue_one_thread)
5545 (resume_status_pending_p): New functions.
5546 (linux_continue_one_thread): Use process->resume.
5547 (linux_resume): Only resume threads if there are no pending events.
5548 * linux-low.h (struct process_info): Add resume request
5549 pointer.
5550
2a68b70e
DJ
55512004-01-30 Daniel Jacobowitz <drow@mvista.com>
5552
5553 * regcache.c (new_register_cache): Clear the allocated register
5554 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5555
64386c31
DJ
55562003-10-13 Daniel Jacobowitz <drow@mvista.com>
5557
5558 * linux-low.c (linux_resume): Take a struct thread_resume *
5559 argument.
5560 (linux_wait): Update call.
5561 (resume_ptr): New static variable.
5562 (linux_continue_one_thread): Renamed from
5563 linux_continue_one_process. Use resume_ptr.
5564 (linux_resume): Use linux_continue_one_thread.
5565 * server.c (handle_v_cont, handle_v_requests): New functions.
5566 (myresume): New function.
5567 (main): Handle 'v' case.
5568 * target.h (struct thread_resume): New type.
5569 (struct target_ops): Change argument of "resume" to struct
5570 thread_resume *.
5571 (myresume): Delete macro.
5572
c938e9b0
L
55732003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5574
5575 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5576 (uninstall): Support DESTDIR.
5577
7f313d07
BC
5578Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5579
5580 * configure.srv: Add xscale*linux copy of arm*linux entry.
5581
3b2fc2ea
DJ
55822003-07-24 Daniel Jacobowitz <drow@mvista.com>
5583
5584 * linux-arm-low.c (arm_reinsert_addr): New function.
5585 (the_low_target): Add arm_reinsert_addr.
5586
1c0a559e
MK
55872003-07-08 Mark Kettenis <kettenis@gnu.org>
5588
5589 * mem-break.c: Remove whitespace at end of file.
5590
43d5792c
DJ
55912003-06-28 Daniel Jacobowitz <drow@mvista.com>
5592
5593 * configure.in: Check whether we need to prototype strerror.
5594 * server.h: Optionally prototype strerror.
5595 * gdbreplay.c (perror_with_name): Use strerror.
5596 * linux-low.c (linux_attach_lwp): Use strerror.
5597 * utils.c (perror_with_name): Use strerror.
5598 * config.in, configure: Regenerated.
5599
c8a86edf
DJ
56002003-06-28 Daniel Jacobowitz <drow@mvista.com>
5601
5602 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5603 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5604
73d37363
DJ
56052003-06-20 Daniel Jacobowitz <drow@mvista.com>
5606
5607 * Makefile.in (SFILES): Update.
5608 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5609 low-sun3.c: Remove files.
5610
6ad8ae5c
DJ
56112003-06-17 Daniel Jacobowitz <drow@mvista.com>
5612
5613 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5614 (linux_detach_one_process, linux_detach): New functions.
5615 (linux_target_ops): Add linux_detach.
5616 * server.c (main): Handle 'D' packet.
5617 * target.h (struct target_ops): Add "detach" member.
5618 (detach_inferior): Define.
5619
1581182a
MK
56202003-06-13 Mark Kettenis <kettenis@gnu.org>
5621
5622 From Kelley Cook <kelleycook@wideopenwest.com>:
5623 * configure.srv: Accept i[34567]86 variants.
5624
e5379b03
DJ
56252003-06-05 Daniel Jacobowitz <drow@mvista.com>
5626
5627 * linux-low.c (linux_wait_for_event): Correct comment typos.
5628 (linux_resume_one_process): Call check_removed_breakpoint.
5629 (linux_send_signal): New function.
5630 (linux_target_ops): Add linux_send_signal.
5631 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5632 of kill.
5633 * target.h (struct target_ops): Add send_signal.
5634
2ff29de4
JB
56352003-05-29 Jim Blandy <jimb@redhat.com>
5636
5637 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5638 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5639 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5640 away part of the register's value.
5641
254787d4
DJ
56422003-03-26 Daniel Jacobowitz <drow@mvista.com>
5643
5644 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5645 (linux_wait_for_event, linux_init_signals): Likewise.
5646
94e10508
DJ
56472003-03-17 Daniel Jacobowitz <drow@mvista.com>
5648
5649 * configure.in: Check for stdlib.h.
5650 * configure: Regenerated.
5651 * config.in: Regenerated.
5652
4c0711e0
DJ
56532003-01-04 Andreas Schwab <schwab@suse.de>
5654
5655 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5656
ef66e766
AC
56572003-01-02 Andrew Cagney <ac131313@redhat.com>
5658
5659 * Makefile.in: Remove obsolete code.
5660
a1358604
DJ
56612002-11-20 Daniel Jacobowitz <drow@mvista.com>
5662
5663 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5664 defined(PT_FPR0_HI).
5665
23ce3b1c
DJ
56662002-11-17 Stuart Hughes <seh@zee2.com>
5667
5668 * linux-arm-low.c (arm_num_regs): Increase.
5669 (arm_regmap): Include status register.
5670
56712002-11-17 Daniel Jacobowitz <drow@mvista.com>
5672
5673 * linux-low.c (register_addr): Remove incorrect -1 check.
5674
a9fa9f7d
DJ
56752002-08-29 Daniel Jacobowitz <drow@mvista.com>
5676
5677 * linux-low.c (linux_create_inferior): Call setpgid. Return
5678 the new PID.
5679 (unstopped_p, linux_signal_pid): Remove.
5680 (linux_target_ops): Remove linux_signal_pid.
5681 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5682 global instead of target method.
5683 * target.h (struct target_ops): Remove signal_pid. Update comment
5684 for create_inferior.
5685 * server.c (signal_pid): New variable.
5686 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 5687 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
5688 (attach_inferior): Set signal_pid.
5689
17574093
DJ
56902002-08-23 Daniel Jacobowitz <drow@mvista.com>
5691
5692 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5693
56942002-08-20 Jim Blandy <jimb@redhat.com>
5695
5696 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5697 default for this.
5698
56992002-08-01 Andrew Cagney <cagney@redhat.com>
5700
5701 * Makefile.in: Make chill references obsolete.
5702
57032002-07-24 Kevin Buettner <kevinb@redhat.com>
5704
5705 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5706 * configure: Regenerate.
5707 * config.in: Regenerate.
5708
57092002-07-09 David O'Brien <obrien@FreeBSD.org>
5710
5711 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5712 (perror_with_name, remote_close, remote_open, expect, play): Static.
5713
57142002-07-04 Michal Ludvig <mludvig@suse.cz>
5715
4b8dad4a 5716 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
5717 byte offsets instead of an array of indexes.
5718 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5719
57202002-06-13 Daniel Jacobowitz <drow@mvista.com>
5721
5722 * regcache.c: Add comment.
5723
57242002-06-11 Daniel Jacobowitz <drow@mvista.com>
5725
5726 * thread-db.c: New file.
5727 * proc-service.c: New file.
5728 * acinclude.m4: New file.
5729 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5730 proc-service.o, and thread-db.o.
5731 (linux-low.o): Add USE_THREAD_DB.
5732 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5733 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5734 * aclocal.m4: Regenerated.
5735 * config.in: Regenerated.
5736 * configure: Regenerated.
5737 * configure.in: Check for proc_service.h, sys/procfs.h,
5738 thread_db.h, and linux/elf.h headrs.
5739 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5740 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5741 Check for -lthread_db and thread support.
5742 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5743 PowerPC, and SuperH.
5744 * i387-fp.c: Constify arguments.
5745 * i387-fp.h: Likewise.
5746 * inferiors.c: (struct thread_info): Renamed from
5747 `struct inferior_info'. Remove PID member. Use generic inferior
5748 list header. All uses updated.
5749 (inferiors, signal_pid): Removed.
5750 (all_threads): New variable.
5751 (get_thread): Define.
5752 (add_inferior_to_list): New function.
5753 (for_each_inferior): New function.
5754 (change_inferior_id): New function.
5755 (add_inferior): Removed.
5756 (remove_inferior): New function.
5757 (add_thread): New function.
5758 (free_one_thread): New function.
5759 (remove_thread): New function.
5760 (clear_inferiors): Use for_each_inferior and free_one_thread.
5761 (find_inferior): New function.
5762 (find_inferior_id): New function.
5763 (inferior_target_data): Update argument type.
5764 (set_inferior_target_data): Likewise.
5765 (inferior_regcache_data): Likewise.
5766 (set_inferior_regcache_data): Likewise.
5767 * linux-low.c (linux_bp_reinsert): Remove.
5768 (all_processes, stopping_threads, using_thrads)
5769 (struct pending_signals, debug_threads, pid_of): New.
5770 (inferior_pid): Replace with macro.
5771 (struct inferior_linux_data): Remove.
5772 (get_stop_pc, add_process): New functions.
5773 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5774 Use add_process and add_thread.
5775 (linux_attach_lwp): New function, based on old linux_attach. Use
5776 add_process and add_thread. Set stop_expected for new threads.
5777 (linux_attach): New function.
5778 (linux_kill_one_process): New function.
5779 (linux_kill): Kill all LWPs.
5780 (linux_thread_alive): Use find_inferior_id.
5781 (check_removed_breakpoints, status_pending_p): New functions.
5782 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5783 Update. Use WNOHANG. Wait for cloned processes also. Update process
5784 struct for the found process.
5785 (linux_wait_for_event): New function.
5786 (linux_wait): Use it. Support LWPs.
5787 (send_sigstop, wait_for_sigstop, stop_all_processes)
5788 (linux_resume_one_process, linux_continue_one_process): New functions.
5789 (linux_resume): Support LWPs.
5790 (REGISTER_RAW_SIZE): Remove.
5791 (fetch_register): Use register_size instead. Call supply_register.
5792 (usr_store_inferior_registers): Likewise. Call collect_register.
5793 Fix recursive case.
5794 (regsets_fetch_inferior_registers): Improve error message.
5795 (regsets_store_inferior_registers): Add debugging.
5796 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5797 (unstopped_p, linux_signal_pid): New functions.
5798 (linux_target_ops): Add linux_signal_pid.
5799 (linux_init_signals): New function.
5800 (initialize_low): Call it. Initialize using_threads.
5801 * regcache.c (inferior_regcache_data): Add valid
5802 flag.
5803 (get_regcache): Fetch registers lazily. Add fetch argument
5804 and update all callers.
5805 (regcache_invalidate_one, regcache_invalidate): New
5806 functions.
5807 (new_register_cache): Renamed from create_register_cache.
5808 Return the new regcache.
5809 (free_register_cache): Change argument to a void *.
5810 (registers_to_string, registers_from_string): Call get_regcache
5811 with fetch flag set.
5812 (register_data): Make static. Pass fetch flag to get_regcache.
5813 (supply_register): Call get_regcache with fetch flag clear.
5814 (collect_register): Call get_regcache with fetch flag set.
5815 (collect_register_as_string): New function.
5816 * regcache.h: Update.
5817 * remote-utils.c (putpkt): Flush after debug output and use
5818 stderr.
5819 Handle input interrupts while waiting for an ACK.
5820 (input_interrupt): Use signal_pid method.
5821 (getpkt): Flush after debug output and use stderr.
5822 (outreg): Use collect_register_as_string.
5823 (new_thread_notify, dead_thread_notify): New functions.
5824 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5825 and general_thread.
5826 (look_up_one_symbol): Flush after debug output.
5827 * server.c (step_thread, server_waiting): New variables.
5828 (start_inferior): Don't use signal_pid. Update call to mywait.
5829 (attach_inferior): Update call to mywait.
5830 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5831 (main): Don't fetch/store registers explicitly. Use
5832 set_desired_inferior. Support proposed ``Hs'' packet. Update
5833 calls to mywait.
5834 * server.h: Update.
5835 (struct inferior_list, struct_inferior_list_entry): New.
5836 * target.c (set_desired_inferior): New.
5837 (write_inferior_memory): Constify.
5838 (mywait): New function.
5839 * target.h: Update.
5840 (struct target_ops): New signal_pid method.
5841 (mywait): Removed macro, added prototype.
5842
5843 * linux-low.h (regset_func): Removed.
5844 (regset_fill_func, regset_store_func): New.
5845 (enum regset_type): New.
5846 (struct regset_info): Add type field. Use new operation types.
5847 (struct linux_target_ops): stop_pc renamed to get_pc.
5848 Add decr_pc_after_break and breakpoint_at.
5849 (get_process, get_thread_proess, get_process_thread)
5850 (strut process_info, all_processes, linux_attach_lwp)
5851 (thread_db_init): New.
5852
5853 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5854 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5855 (the_low_target): Add new members.
5856 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5857 (i386_store_fpxregset): Constify.
5858 (target_regsets): Add new kind identifier.
5859 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5860 (i386_set_pc): Add debugging.
5861 (i386_breakpoint_at): New function.
5862 (the_low_target): Add new members.
5863 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5864 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5865 (mips_breakpoint_at): New.
5866 (the_low_target): Add new members.
5867 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5868 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5869 (the_low_target): Add new members.
5870 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5871 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5872 (the_low_target): Add new members.
5873 * linux-x86-64-low.c (target_regsets): Add new kind
5874 identifier.
5875
58762002-05-15 Daniel Jacobowitz <drow@mvista.com>
5877
5878 From Martin Pool <mbp@samba.org>:
5879 * server.c (gdbserver_usage): New function.
5880 (main): Call it.
5881
58822002-05-14 Daniel Jacobowitz <drow@mvista.com>
5883
5884 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5885 stop_at -> stop_pc.
5886
58872002-05-04 Andrew Cagney <ac131313@redhat.com>
5888
5889 * Makefile.in: Remove obsolete code.
5890
58912002-04-24 Michal Ludvig <mludvig@suse.cz>
5892
5893 * linux-low.c (regsets_fetch_inferior_registers),
5894 (regsets_store_inferior_registers): Removed cast to int from
5895 ptrace() calls.
5896 * regcache.h: Added declaration of struct inferior_info.
5897
58982002-04-20 Daniel Jacobowitz <drow@mvista.com>
5899
5900 * inferiors.c (struct inferior_info): Add regcache_data.
5901 (add_inferior): Call create_register_cache.
5902 (clear_inferiors): Call free_register_cache.
5903 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5904 * regcache.c (struct inferior_regcache_data): New.
5905 (registers): Remove.
5906 (get_regcache): New function.
5907 (create_register_cache, free_register_cache): New functions.
5908 (set_register_cache): Don't initialize the register cache here.
5909 (registers_to_string, registers_from_string, register_data): Call
5910 get_regcache.
5911 * regcache.h: Add prototypes.
5912 * server.h: Likewise.
5913
59142002-04-20 Daniel Jacobowitz <drow@mvista.com>
5915
5916 * mem-break.c: New file.
5917 * mem-break.h: New file.
5918 * Makefile.in: Add mem-break.o rule; update server.h
5919 dependencies.
5920 * inferiors.c (struct inferior_info): Add target_data
5921 member.
5922 (clear_inferiors): Free target_data member if set.
5923 (inferior_target_data, set_inferior_target_data): New functions.
5924 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5925 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5926 * linux-low.c (linux_bp_reinsert): New variable.
5927 (struct inferior_linux_data): New.
5928 (linux_create_inferior): Use set_inferior_target_data.
5929 (linux_attach): Likewise. Call add_inferior.
5930 (linux_wait_for_one_inferior): New function.
5931 (linux_wait): Call it.
5932 (linux_write_memory): Add const.
5933 (initialize_low): Call set_breakpoint_data.
5934 * linux-low.h (struct linux_target_ops): Add breakpoint
5935 handling members.
5936 * server.c (attach_inferior): Remove extra add_inferior
5937 call.
5938 * server.h: Include mem-break.h. Update inferior.c
5939 prototypes.
5940 * target.c (read_inferior_memory)
5941 (write_inferior_memory): New functions.
5942 * target.h (read_inferior_memory)
5943 (write_inferior_memory): Change macros to prototypes.
5944 (struct target_ops): Update comments. Add const to write_memory
5945 definition.
5946
59472002-04-11 Daniel Jacobowitz <drow@mvista.com>
5948
5949 * linux-low.c (usr_store_inferior_registers): Support
5950 registers which are allowed to fail to store.
5951 * linux-low.h (linux_target_ops): Likewise.
5952 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5953 (ppc_cannot_store_register): FPSCR may not be storable.
5954
59552002-04-09 Daniel Jacobowitz <drow@mvista.com>
5956
5957 * server.h: Include <string.h> if HAVE_STRING_H.
5958 * ChangeLog: Correct paths in last ChangeLog entry.
5959
59602002-04-09 Daniel Jacobowitz <drow@mvista.com>
5961
5962 * linux-low.h: Remove obsolete prototypes.
5963 (struct linux_target_ops): New.
5964 (extern the_low_target): New.
5965 * linux-low.c (num_regs, regmap): Remove declarations.
5966 (register_addr): Use the_low_target explicitly.
5967 (fetch_register): Likewise.
5968 (usr_fetch_inferior_registers): Likewise.
5969 (usr_store_inferior_registers): Likewise.
5970 * linux-arm-low.c (num_regs): Remove.
5971 (arm_num_regs): Define.
5972 (arm_regmap): Renamed from regmap, made static.
5973 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5974 made static.
5975 (arm_cannot_store_register): Renamed from cannot_store_register,
5976 made static.
5977 (the_low_target): New.
5978 * linux-i386-low.c (num_regs): Remove.
5979 (i386_num_regs): Define.
5980 (i386_regmap): Renamed from regmap, made static.
5981 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5982 made static.
5983 (i386_cannot_store_register): Renamed from cannot_store_register,
5984 made static.
5985 (the_low_target): New.
5986 * linux-ia64-low.c (num_regs): Remove.
5987 (ia64_num_regs): Define.
5988 (ia64_regmap): Renamed from regmap, made static.
5989 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5990 made static.
5991 (ia64_cannot_store_register): Renamed from cannot_store_register,
5992 made static.
5993 (the_low_target): New.
5994 * linux-m68k-low.c (num_regs): Remove.
5995 (m68k_num_regs): Define.
5996 (m68k_regmap): Renamed from regmap, made static.
5997 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5998 made static.
5999 (m68k_cannot_store_register): Renamed from cannot_store_register,
6000 made static.
6001 (the_low_target): New.
6002 * linux-mips-low.c (num_regs): Remove.
6003 (mips_num_regs): Define.
6004 (mips_regmap): Renamed from regmap, made static.
6005 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6006 made static.
6007 (mips_cannot_store_register): Renamed from cannot_store_register,
6008 made static.
6009 (the_low_target): New.
6010 * linux-ppc-low.c (num_regs): Remove.
6011 (ppc_num_regs): Define.
6012 (ppc_regmap): Renamed from regmap, made static.
6013 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6014 made static.
6015 (ppc_cannot_store_register): Renamed from cannot_store_register,
6016 made static.
6017 (the_low_target): New.
6018 * linux-s390-low.c (num_regs): Remove.
6019 (s390_num_regs): Define.
6020 (s390_regmap): Renamed from regmap, made static.
6021 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6022 made static.
6023 (s390_cannot_store_register): Renamed from cannot_store_register,
6024 made static.
6025 (the_low_target): New.
6026 * linux-sh-low.c (num_regs): Remove.
6027 (sh_num_regs): Define.
6028 (sh_regmap): Renamed from regmap, made static.
6029 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6030 made static.
6031 (sh_cannot_store_register): Renamed from cannot_store_register,
6032 made static.
6033 (the_low_target): New.
6034 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6035 (the_low_target): New.
6036
60372002-04-09 Daniel Jacobowitz <drow@mvista.com>
6038
6039 * Makefile.in: Add stamp-h target.
6040 * configure.in: Create stamp-h.
6041 * configure: Regenerated.
6042
60432002-04-09 Daniel Jacobowitz <drow@mvista.com>
6044
6045 * inferiors.c: New file.
6046 * target.c: New file.
6047 * target.h: New file.
6048 * Makefile.in: Add target.o and inferiors.o. Update
6049 dependencies.
6050 * linux-low.c (inferior_pid): New static variable,
6051 moved from server.c.
6052 (linux_create_inferior): Renamed from create_inferior.
6053 Call add_inferior. Return 0 on success instead of a PID.
6054 (linux_attach): Renamed from myattach.
6055 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6056 (linux_thread_alive): Renamed from mythread_alive.
6057 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6058 child dies.
6059 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6060 (regsets_store_inferior_registers): Correct error message.
6061 Add missing ``return 0''.
6062 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6063 (linux_store_registers): Renamed from store_inferior_registers.
6064 (linux_read_memory): Renamed from read_inferior_memory.
6065 (linux_write_memory): Renamed from write_inferior_memory.
6066 (linux_target_ops): New structure.
6067 (initialize_low): Call set_target_ops ().
6068 * remote-utils.c (unhexify): New function.
6069 (hexify): New function.
6070 (input_interrupt): Send signals to ``signal_pid''.
6071 * server.c (inferior_pid): Remove.
6072 (start_inferior): Update create_inferior call.
6073 (attach_inferior): Call add_inferior.
6074 (handle_query): New function.
6075 (main): Call handle_query for `q' packets.
6076 * server.h: Include "target.h". Remove obsolete prototypes.
6077 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6078
60792002-04-09 Daniel Jacobowitz <drow@mvista.com>
6080
6081 * Makefile.in: Add WARN_CFLAGS. Update configury
6082 dependencies.
6083 * configure.in: Check for <string.h>
6084 * configure: Regenerate.
6085 * config.in: Regenerate.
6086 * gdbreplay.c: Include needed system headers.
6087 (remote_open): Remove strchr prototype.
6088 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6089 * regcache.c (supply_register): Change buf argument to const void *.
6090 (supply_register_by_name): Likewise.
6091 (collect_register): Change buf argument to void *.
6092 (collect_register_by_name): Likewise.
6093 * regcache.h: Add missing prototypes.
6094 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6095 * server.c (handle_query): New function.
6096 (attached): New static variable, moved out of main.
6097 (main): Quiet longjmp clobber warnings.
6098 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6099 * utils.c (error): Remove NORETURN.
6100 (fatal): Likewise.