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