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