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