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