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