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