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