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