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