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