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