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