Share parts of gdb/gdbthread.h with gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
043a4934
SDJ
12017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * inferiors.c (switch_to_thread): New function.
4
15652511
SDJ
52017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * Makefile.in (SFILE): Add "common/job-control.c".
8 (OBS): Add "job-control.o".
9
21ea5acd
SDJ
102017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11
12 * Makefile: Remove "@host_makefile_frag@".
13
e13cb306
PA
142017-05-05 Pedro Alves <palves@redhat.com>
15
16 * configure: Regenerate.
17
c94fee56
SDJ
182017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
19
20 * configure: Regenerate.
21
a0ff9e1a
SM
222017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
25 software_single_step change of return type to
26 std::vector<CORE_ADDR>.
27 * linux-low.c (install_software_single_step_breakpoints):
28 Likewise.
29 * linux-low.h (install_software_single_step_breakpoints):
30 Likewise.
31
be628ab8
SDJ
322017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
33
34 * remote-utils.c: Include "gdb_termios.h" instead of
35 "terminal.h".
36 * terminal.h: Delete file.
37
7c5ded6a
SDJ
382017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
39
40 * server.c: Include <vector>.
41 <program_argv, wrapper_argv>: Convert to std::vector.
42 (start_inferior): Rewrite function to use C++.
43 (handle_v_run): Likewise. Update code that calculates the argv
44 based on the vRun packet; use C++.
45 (captured_main): Likewise.
46
436252de
SM
472017-04-06 Simon Marchi <simon.marchi@ericsson.com>
48
49 * server.c (handle_v_cont): Initialize thread_resume::thread
50 with null_ptid.
51
9bf2a700
PA
522017-04-05 Pedro Alves <palves@redhat.com>
53
54 * configure: Regenerate.
55
a121b7c1
PA
562017-04-05 Pedro Alves <palves@redhat.com>
57
58 * gdbreplay.c (sync_error): Constify.
59 * linux-x86-low.c (push_opcode): Constify.
60
21c8a587
PA
612017-04-05 Pedro Alves <palves@redhat.com>
62
63 * win32-low.c (get_child_debug_event)
64 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
65 Report TARGET_WAITKIND_SPURIOUS instead.
66
fb32b4f7
PA
672017-04-05 Pedro Alves <palves@redhat.com>
68
69 * remote-utils.c (remote_prepare, remote_open): Constify.
70 * remote-utils.h (remote_prepare, remote_open): Constify.
71 * server.c (captured_main): Constify 'port' handling.
72
65dd1e59
SM
732017-04-04 Simon Marchi <simon.marchi@ericsson.com>
74
75 * Makefile.in (clean): Clear .deps.
76
8fa5b777
SM
772017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * .gitignore: Remove generated files, replace with wildcard.
80 * (clean): Replace removal of generated files with wildcard.
81 (version.c): Replace with...
82 (version-generated.c): ...this.
83 (xml-builtin.c): Replace with...
84 (xml-builtin-generated.c): ...this.
85 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
86 (%.c: *regformats*): Replace with...
87 (%-generated.c: *regformats*): ...this.
88
a12e714b
MF
892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
90
91 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
92 (xtensa_fill_gregset): Call collect_register_by_name for
93 threadptr register.
94 (xtensa_store_gregset): Call supply_register_by_name for
95 threadptr register.
96
1a09b50a
MF
972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
98
99 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
100 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
101 (xtensa_store_gregset): Call supply_register for all registers in
102 a0_regnum..a0_regnum + C0_NREGS range.
103
1a01e7c6
SM
1042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
105
106 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
107 (ax-ipa.o: ax.c): Remove.
108 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
109 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
110 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
111 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
112 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
113
36bc18a8
SM
1142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
115
116 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
117 (print-utils-ipa.o: ../common/print-utils.c): Remove.
118 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
119 (errors-ipa.o: ../common/errors.c): Remove.
120 (format-ipa.o: ../common/format.c): Remove.
121 (common-utils-ipa.o: ../common/common-utils.c): Remove.
122
a8ebe3d5
SM
1232017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * Makefile.in (%-ipa.o: %.c): New rule.
126 (tracepoint-ipa.o: tracepoint.c): Remove.
127 (utils-ipa.o: utils.c): Remove.
128 (remote-utils-ipa.o: remote-utils.c): Remove.
129 (regcache-ipa.o: regcache.c): Remove.
130 (i386-linux-ipa.o: i386-linux.c): Remove.
131 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
132 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
133 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
134 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
135 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
136 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
137 (amd64-linux-ipa.o: amd64-linux.c): Remove.
138 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
139 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
140 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
141 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
142 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
143 (aarch64-ipa.o: aarch64.c): Remove.
144 (s390-linux32-ipa.o: s390-linux32.c): Remove.
145 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
146 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
147 (s390-linux64-ipa.o: s390-linux64.c): Remove.
148 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
149 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
150 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
151 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
152 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
153 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
154 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
155 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
156 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
157 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
158 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
159 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
160 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
161 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
162 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
163 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
164 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
165 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
166 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
167 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
168 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
169 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
170 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
171 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
172 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
173 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
174 (tdesc-ipa.o: tdesc.c): Remove.
175 (x32-linux-ipa.o: x32-linux.c): Remove.
176 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
177 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
178
50cfacb7
SM
1792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * Makefile.in (%.o: ../arch/%.c): New rule.
182 (arm.o: ../arch/arm.c): Remove.
183 (arm-linux.o: ../arch/arm-linux.c): Remove.
184 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
185 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
186
c5a22423
SM
1872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
188
189 * Makefile.in (%.o: ../nat/%.c): New rule.
190 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
191 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
192 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
193 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
194 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
195 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
196 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
197 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
198 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
199 (linux-personality.o: ../nat/linux-personality.c): Remove.
200 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
201 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
202 (x86-linux.o: ../nat/x86-linux.c): Remove.
203 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
204 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
205
6bda016b
SM
2062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
207
208 * Makefile.in (%.o: ../common/%.c): New rule.
209 (signals.o: ../common/signals.c): Remove.
210 (print-utils.o: ../common/print-utils.c): Remove.
211 (rsp-low.o: ../common/rsp-low.c): Remove.
212 (common-utils.o: ../common/common-utils.c): Remove.
213 (posix-strerror.o: ../common/posix-strerror.c): Remove.
214 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
215 (vec.o: ../common/vec.c): Remove.
216 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
217 (xml-utils.o: ../common/xml-utils.c): Remove.
218 (ptid.o: ../common/ptid.c): Remove.
219 (buffer.o: ../common/buffer.c): Remove.
220 (format.o: ../common/format.c): Remove.
221 (filestuff.o: ../common/filestuff.c): Remove.
222 (agent.o: ../common/agent.c): Remove.
223 (errors.o: ../common/errors.c): Remove.
224 (environ.o: ../common/environ.c): Remove.
225 (common-debug.o: ../common/common-debug.c): Remove.
226 (cleanups.o: ../common/cleanups.c): Remove.
227 (common-exceptions.o: ../common/common-exceptions.c): Remove.
228 (fileio.o: ../common/fileio.c): Remove.
229 (common-regcache.o: ../common/common-regcache.c): Remove.
230 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
231 (new-op.o: ../common/new-op.c): Remove.
232 (btrace-common.o: ../common/btrace-common.c): Remove.
233
21122961
SM
2342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * Makefile.in (%.o: ../target/%.c): New rule.
237 (waitstatus.o: ../target/waitstatus.c): Remove.
238
c362e621
SM
2392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * Makefile.in
242 (%.c: ../regformats/%.dat,
243 (%.c: ../regformats/arm/%.dat,
244 (%.c: ../regformats/i386/%.dat,
245 (%.c: ../regformats/rs6000/%.dat): New rules.
246 (aarch64.c): Remove.
247 (reg-arm.c): Remove.
248 (arm-with-iwmmxt.c): Remove.
249 (arm-with-vfpv2.c): Remove.
250 (arm-with-vfpv3.c): Remove.
251 (arm-with-neon.c): Remove.
252 (reg-bfin.c): Remove.
253 (reg-cris.c): Remove.
254 (reg-crisv32.c): Remove.
255 (i386.c): Remove.
256 (i386-linux.c): Remove.
257 (i386-avx.c): Remove.
258 (i386-avx-linux.c): Remove.
259 (i386-avx-avx512.c): Remove.
260 (i386-avx-avx512-linux.c): Remove.
261 (i386-mpx.c): Remove.
262 (i386-mpx-linux.c): Remove.
263 (i386-avx-mpx-avx512-pku.c): Remove.
264 (i386-avx-mpx-avx512-pku-linux.c): Remove.
265 (i386-avx-mpx.c): Remove.
266 (i386-avx-mpx-linux.c): Remove.
267 (i386-mmx.c): Remove.
268 (i386-mmx-linux.c): Remove.
269 (reg-ia64.c): Remove.
270 (reg-m32r.c): Remove.
271 (reg-m68k.c): Remove.
272 (reg-cf.c): Remove.
273 (mips-linux.c): Remove.
274 (mips-dsp-linux.c): Remove.
275 (mips64-linux.c): Remove.
276 (mips64-dsp-linux.c): Remove.
277 (nios2-linux.c): Remove.
278 (powerpc-32.c): Remove.
279 (powerpc-32l.c): Remove.
280 (powerpc-altivec32l.c): Remove.
281 (powerpc-cell32l.c): Remove.
282 (powerpc-vsx32l.c): Remove.
283 (powerpc-isa205-32l.c): Remove.
284 (powerpc-isa205-altivec32l.c): Remove.
285 (powerpc-isa205-vsx32l.c): Remove.
286 (powerpc-e500l.c): Remove.
287 (powerpc-64l.c): Remove.
288 (powerpc-altivec64l.c): Remove.
289 (powerpc-cell64l.c): Remove.
290 (powerpc-vsx64l.c): Remove.
291 (powerpc-isa205-64l.c): Remove.
292 (powerpc-isa205-altivec64l.c): Remove.
293 (powerpc-isa205-vsx64l.c): Remove.
294 (s390-linux32.c): Remove.
295 (s390-linux32v1.c): Remove.
296 (s390-linux32v2.c): Remove.
297 (s390-linux64.c): Remove.
298 (s390-linux64v1.c): Remove.
299 (s390-linux64v2.c): Remove.
300 (s390-te-linux64.c): Remove.
301 (s390-vx-linux64.c): Remove.
302 (s390-tevx-linux64.c): Remove.
303 (s390x-linux64.c): Remove.
304 (s390x-linux64v1.c): Remove.
305 (s390x-linux64v2.c): Remove.
306 (s390x-te-linux64.c): Remove.
307 (s390x-vx-linux64.c): Remove.
308 (s390x-tevx-linux64.c): Remove.
309 (tic6x-c64xp-linux.c): Remove.
310 (tic6x-c64x-linux.c): Remove.
311 (tic6x-c62x-linux.c): Remove.
312 (reg-sh.c): Remove.
313 (reg-sparc64.c): Remove.
314 (reg-spu.c): Remove.
315 (amd64.c): Remove.
316 (amd64-linux.c): Remove.
317 (amd64-avx.c): Remove.
318 (amd64-avx-linux.c): Remove.
319 (amd64-avx-avx512.c): Remove.
320 (amd64-avx-avx512-linux.c): Remove.
321 (amd64-mpx.c): Remove.
322 (amd64-mpx-linux.c): Remove.
323 (amd64-avx-mpx-avx512-pku.c): Remove.
324 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
325 (amd64-avx-mpx.c): Remove.
326 (amd64-avx-mpx-linux.c): Remove.
327 (x32.c): Remove.
328 (x32-linux.c): Remove.
329 (x32-avx.c): Remove.
330 (x32-avx-linux.c): Remove.
331 (x32-avx-avx512.c): Remove.
332 (x32-avx-avx512-linux.c): Remove.
333 (reg-xtensa.c): Remove.
334 (reg-tilegx.c): Remove.
335 (reg-tilegx32.c): Remove.
336
1672e0d9
SDJ
3372017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
338
339 * Makefile.in (SFILES): Add "common/environ.c".
340 (OBJS): Add "common/environ.h".
341
239b6d10
WT
3422017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
343
344 * configure.ac: Check if the fs_base and gs_base members of
345 `struct user_regs_struct' exist.
346 * config.in: Regenerated.
347 * configure: Likewise.
348
694b382c
AT
3492017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
350
351 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
352 target_read_memory.
353 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
354 (get_next_pcs_syscall_next_pc): Likewise.
355
7dc53023
LM
3562016-12-23 Luis Machado <lgustavo@codesourcery.com>
357
358 * win32-i386-low.c: Fix incorrect reference to a couple source files.
359 * nto-x86-low.c: Likewise.
360
ad02e4fe
SM
3612016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * Makefile.in: Include disable-implicit-rules.mk.
364
dcb07cfa
PA
3652016-11-23 Pedro Alves <palves@redhat.com>
366
367 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
368 (debug_vprintf): Use std::chrono::steady_clock instead of
369 gettimeofday. Use '.' instead of ':'.
370 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
371 (get_timestamp): Use std::chrono::steady_clock instead of
372 gettimeofday.
373
8629c02c
SM
3742016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
375
376 * Makefile.in: Fix whitespace formatting.
377
b593ecca
SM
3782016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
379
380 * Makefile.in (SFILES, OBS): Flatten list and order
381 alphabetically.
382
9986ba08
PA
3832016-11-23 Pedro Alves <palves@redhat.com>
384
385 * event-loop.c (handle_file_event): Use warning.
386 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
387 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
388 Use warning.
389
4eefa7bc
PA
3902016-11-23 Pedro Alves <palves@redhat.com>
391
392 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
393 output.
394 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
395 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
396 debug_printf and debug_flush for debug output.
397 * server.c (handle_general_set): Likewise.
398 * thread-db.c (try_thread_db_load): Use debug_printf for debug
399 output.
400
5443506e
SM
4012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * Makefile.in (.c.o): Replace rule with ...
404 (%.o: %.c): ... this one.
405
3b165252
SM
4062016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
409 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
410 make.
411 * configure.ac: Remove checks for the make program.
412 * configure: Re-generate.
413
0bcda685
PA
4142016-10-28 Pedro Alves <palves@redhat.com>
415
416 * Makefile.in (CXX_DIALECT): Get from configure.
417 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
418 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
419 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
420 * config.in: Regenerate.
421 * configure: Regenerate.
422
c3805894
YQ
4232016-10-27 Yao Qi <yao.qi@linaro.org>
424
425 * linux-low.c (linux_supports_range_stepping): Return true if
426 can_software_single_step return true.
427
89342618
YQ
4282016-10-27 Yao Qi <yao.qi@linaro.org>
429
430 * inferiors.c (find_inferior_in_random): New function.
431 * inferiors.h (find_inferior_in_random): Declare.
432 * linux-low.c (linux_wait_for_event_filtered): Call
433 find_inferior_in_random instead of find_inferior.
434
e3652c84
YQ
4352016-10-27 Yao Qi <yao.qi@linaro.org>
436
437 * linux-low.c (linux_wait_1): If single-step breakpoints are
438 inserted, remove them.
439
5a04c4cf
PA
4402016-10-26 Pedro Alves <palves@redhat.com>
441
442 * linux-low.c (handle_extended_wait): Link parent/child fork
443 threads.
444 (linux_wait_1): Unlink them.
445 (linux_set_resume_request): Ignore resume requests for
446 already-resumed and unhandled fork child threads.
447 * linux-low.h (struct lwp_info) <fork_relative>: New field.
448 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
449 New functions.
450 (handle_v_requests) <vCont>: Don't call require_running.
451 * server.h (in_queued_stop_replies): New declaration.
452
cb93dc7f
YQ
4532016-10-24 Yao Qi <yao.qi@linaro.org>
454
455 PR server/20733
456 * linux-aarch64-low.c (append_insns): Cast the return value to
457 'uint32_t *'.
458
a1078bea
YQ
4592016-10-10 Yao Qi <yao.qi@linaro.org>
460
461 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
462
1fb77080
SDJ
4632016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
464
465 * target.c (target_supports_multi_process): New function, moved
466 from...
467 * target.h (target_supports_multi_process): ... here. Remove
468 macro.
469
39b5a3b9
TT
4702016-10-05 Tom Tromey <tom@tromey.com>
471
472 PR remote/20655:
473 * tracepoint.c (handle_tracepoint_bkpts): Check
474 ipa_error_tracepoint, not ipa_stopping_tracepoint.
475
c1d0b70a
YQ
4762016-10-05 Yao Qi <yao.qi@linaro.org>
477
478 * configure.srv: Update the path of arm-*.xml files.
479
0a69eedb
YQ
4802016-10-05 Terry Guo <terry.guo@arm.com>
481 Yao Qi <yao.qi@linaro.org>
482
483 * Makefile.in: Adjust the path of rules.
484 * configure.srv: Update the path of xml files.
485 * regformats/arm-with-iwmmxt.dat: Regenerated.
486 * regformats/arm-with-neon.dat: Likewise.
487 * regformats/arm-with-vfpv2.dat: Likewise.
488 * regformats/arm-with-vfpv3.dat Likewise.
489
17e16485
YQ
4902016-09-30 Yao Qi <yao.qi@linaro.org>
491
492 PR gdbserver/20627
493 * target.c (target_stop_and_wait): Don't call
494 target_continue_no_signal, use resume_stop instead.
495
edeeb602
YQ
4962016-09-26 Yao Qi <yao.qi@linaro.org>
497
498 * linux-low.c (linux_wait_1): Call debug_exit.
499
503b1c39
PA
5002016-09-23 Pedro Alves <palves@redhat.com>
501
502 * Makefile.in (SFILES): Add common/new-op.c.
503 (OBS): Add common/new-op.o.
504 (new-op.o): New rule.
505
74172ecf
SM
5062016-09-21 Simon Marchi <simon.marchi@ericsson.com>
507
508 * .gitinore: Ignore more files.
509
fc6cda2e
YQ
5102016-09-21 Yao Qi <yao.qi@linaro.org>
511
512 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
513 23.
514
bc1e6c81
SDJ
5152016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 * server.c (start_inferior): Call target_mourn_inferior instead of
518 mourn_inferior; pass ptid_t argument to it.
519 (resume): Likewise.
520 (handle_target_event): Likewise.
521 * target.c (target_mourn_inferior): New function.
522 * target.h (mourn_inferior): Delete macro.
523
0e00e962
AA
5242016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
525
526 * linux-low.c (lwp_is_stepping): New function.
527
1d8cb77d
CL
5282016-09-06 Carl Love <cel@us.ibm.com>
529
530 * server.c (start_inferior): Fixed comment, requested comment change
531 didn't get updated correctly. Removed reference to ptrace () call as
532 it is only true on Linux systems.
533
7313bced
CL
5342016-09-06 Carl Love <cel@us.ibm.com>
535
536 * server.c (start_inferior): Do not call
537 function target_post_create_inferior () if the
538 inferior process has already exited.
539
cf6de44d
PA
5402016-09-05 Pedro Alves <palves@redhat.com>
541
542 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
543 (COMPILE.pre, CC_LD): Use CXX directly.
544 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
545 * acinclude.m4: Don't include build-with-cxx.m4.
546 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
547 * configure: Regenerate.
548
c1da6748
AT
5492016-09-02 Akash Trehan <akash.trehan123@gmail.com>
550
551 PR gdb/19495
552 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
553 call writing data to own_buf.
554
f2b9e3df
SDJ
5552016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
556
557 * target.c (mywait): Call target_wait instead of
558 the_target->wait.
559 (target_wait): New function.
560
049a8570
SDJ
5612016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
562
563 * server.c (start_inferior): New variable 'ptid'. Replace calls
564 to the_target->resume by target_continue{,_no_signal}, depending
565 on the case.
566 * target.c (target_stop_and_wait): Call target_continue_no_signal
567 instead of the_target->resume.
568 (target_continue): New function.
569
3aa5cfa0
AT
5702016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
571
572 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
573
754653a7
AZ
5742016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
575
576 PR server/20491
577 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
578 ps_prochandle.
579 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
580 * linux-arm-low.c (ps_get_thread_area): Likewise.
581 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
582 * linux-m68k-low.c (ps_get_thread_area): Likewise.
583 * linux-mips-low.c (ps_get_thread_area): Likewise.
584 * linux-nios2-low.c (ps_get_thread_area): Likewise.
585 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
586 * linux-x86-low.c (ps_get_thread_area): Likewise.
587 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
588
ed036b40
PA
5892016-08-19 Pedro Alves <palves@redhat.com>
590
591 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
592
c8ef42ee
PA
5932016-08-19 Pedro Alves <palves@redhat.com>
594
595 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
596 comment. Use memcpy instead of casting through unsigned long.
597
9c235a72
PA
5982016-08-19 Pedro Alves <palves@redhat.com>
599
600 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
601 allocating around 0x80000000.
602
201506da
PA
6032016-08-19 Pedro Alves <palves@redhat.com>
604
605 PR gdb/20415
606 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
607 (x32-avx512-linux-ipa.o): New rules.
608 * configure.ac (x86_64-*-linux*): New x32 check.
609 * configure.srv (ipa_x32_linux_regobj): New.
610 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
611 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
612 descriptions.
613 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
614 descriptions.
615 * configure: Regenerate.
616
f348d89a
PA
6172016-08-09 Pedro Alves <palves@redhat.com>
618
619 PR gdb/18653
620 * Makefile.in (OBS): Add signals-state-save-restore.o.
621 (signals-state-save-restore.o): New rule.
622 * config.in: Regenerate.
623 * configure: Regenerate.
624 * linux-low.c: Include "signals-state-save-restore.h".
625 (linux_create_inferior): Call
626 restore_original_signals_state.
627 * server.c: Include "dispositions-save-restore.h".
628 (captured_main): Call save_original_signals_state.
629
1baf5149
PA
6302016-08-05 Pedro Alves <palves@redhat.com>
631
632 * configure: Regenerate.
633
fcd4a73d
YQ
6342016-08-04 Yao Qi <yao.qi@linaro.org>
635
636 * linux-low.c (regsets_fetch_inferior_registers): Check
637 errno is ESRCH or not.
638
979659d0
YQ
6392016-08-02 Yao Qi <yao.qi@linaro.org>
640
641 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
642 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
643 (thread_db_load_search): Update.
644 (try_thread_db_load_1): Don't look for td_ta_event_addr,
645 td_ta_set_event and td_ta_event_getmsg.
646
6598661d
PA
6472016-07-26 Pedro Alves <palves@redhat.com>
648
649 PR server/20414
650 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
651 of unsigned long for 64-bit registers and use uint32_t instead of
652 unsigned int for 32-bit registers.
653
9cf12d57
PA
6542016-07-26 Pedro Alves <palves@redhat.com>
655
656 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
657 to 'ptrace'.
658
305450ed
TT
6592016-07-21 Tom Tromey <tom@tromey.com>
660
661 * configure: Rebuild.
662
2583da7c
YQ
6632016-07-21 Yao Qi <yao.qi@linaro.org>
664
665 * mem-break.c (find_gdb_breakpoint): Cast bp to
666 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
667
21536b36
YQ
6682016-07-21 Yao Qi <yao.qi@linaro.org>
669
670 * server.c (handle_v_requests): Support s and S actions
671 if target_supports_software_single_step return true.
672
8901d193
YQ
6732016-07-21 Yao Qi <yao.qi@linaro.org>
674
675 * linux-low.c (resume_stopped_resumed_lwps): If resume request
676 is resume_step, call maybe_hw_step.
677 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
678 and unstop them.
679 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
680 breakpoints or not.
681 (proceed_one_lwp): If resume request is resume_step, install
682 reinsert breakpoints and call maybe_hw_step.
683
0e9a339e
YQ
6842016-07-21 Yao Qi <yao.qi@linaro.org>
685
686 * linux-low.c (proceed_one_lwp): Declare.
687 (linux_resume_one_thread): Remove local variable 'step'.
688 Lift code enqueue signal. Call proceed_one_lwp instead of
689 linux_resume_one_lwp.
690
4281b351
YQ
6912016-07-21 Yao Qi <yao.qi@linaro.org>
692
693 * linux-low.c (linux_resume_one_thread): Call
694 enqueue_pending_signal.
695
984a2c04
YQ
6962016-07-21 Yao Qi <yao.qi@linaro.org>
697
698 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
699 * inferiors.c (do_restore_current_thread_cleanup): New function.
700 (make_cleanup_restore_current_thread): Likewise.
701 * linux-low.c (install_software_single_step_breakpoints): Call
702 make_cleanup_restore_current_thread. Switch current_thread to
703 thread.
704
bec903c9
YQ
7052016-07-21 Yao Qi <yao.qi@linaro.org>
706
707 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
708 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
709 (clone_one_breakpoint): Likewise.
710 (delete_reinsert_breakpoints): Change parameter to thread.
711 Callers updated.
712 (has_reinsert_breakpoints): Likewise.
713 (uninsert_reinsert_breakpoints): Likewise.
714 (reinsert_reinsert_breakpoints): Likewise.
715 * mem-break.h (set_reinsert_breakpoint): Update declaration.
716 (delete_reinsert_breakpoints): Likewise.
717 (reinsert_reinsert_breakpoints): Likewise.
718 (uninsert_reinsert_breakpoints): Likewise.
719 (has_reinsert_breakpoints): Likewise.
720
63c40ec7
YQ
7212016-07-21 Yao Qi <yao.qi@linaro.org>
722
723 * inferiors.c (get_thread_process): Make parameter const.
724 * inferiors.h (get_thread_process): Update declaration.
725 * mem-break.c (clone_all_breakpoints): Remove all parameters.
726 Add new parameters child_thread and parent_thread. Callers
727 updated.
728 * mem-break.h (clone_all_breakpoints): Update declaration.
729
9aa76cd0
YQ
7302016-07-21 Yao Qi <yao.qi@linaro.org>
731
732 * mem-break.c (struct breakpoint) <cond_list>: Remove.
733 <command_list, handler>: Remove.
734 (struct gdb_breakpoint): New.
735 (struct other_breakpoint): New.
736 (struct reinsert_breakpoint): New.
737 (is_gdb_breakpoint): New function.
738 (any_persistent_commands): Update command_list if
739 is_gdb_breakpoint returns true.
740 (set_breakpoint): Create breakpoints according to their types.
741 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
742 (set_gdb_breakpoint_1): Likewise.
743 (set_gdb_breakpoint): Likewise.
744 (clear_breakpoint_conditions): Change parameter type to
745 'struct gdb_breakpoint *'.
746 (clear_breakpoint_commands): Likewise.
747 (clear_breakpoint_conditions_and_commands): Likewise.
748 (add_condition_to_breakpoint): Likewise.
749 (add_breakpoint_condition): Likewise.
750 (add_commands_to_breakpoint): Likewise.
751 (check_breakpoints): Check other_breakpoint.
752 (clone_one_breakpoint): Clone breakpopint according to its type.
753 * mem-break.h (struct gdb_breakpoint): Declare.
754 (set_gdb_breakpoint): Update declaration.
755 (clear_breakpoint_conditions_and_commands): Likewise.
756 (add_breakpoint_condition): Likewise.
757 (add_breakpoint_commands): Likewise.
758 * server.c (process_point_options): Change parameter type to
759 'struct gdb_breakpoint *'.
760
811f8301
YQ
7612016-07-21 Yao Qi <yao.qi@linaro.org>
762
763 * mem-break.c (set_breakpoint_at): Rename it to ...
764 (set_breakpoint_type_at): ... it.
765 (set_breakpoint_at): Call set_breakpoint_type_at.
766 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
767 * mem-break.h (set_breakpoint_at): Update comments.
768
b1c51e36
CLT
7692016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
770
771 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
772 to buf parameter.
773 (nios2_store_gregset): Likewise.
774
ced2dffb
PA
7752016-07-01 Pedro Alves <palves@redhat.com>
776 Antoine Tremblay <antoine.tremblay@ericsson.com>
777
778 * linux-low.c: Change interface to take the target lwp_info
779 pointer directly and return void. Handle detaching from a zombie
780 thread.
781 (linux_detach_lwp_callback): New function.
782 (linux_detach): Detach from the leader thread after detaching from
783 the clone threads.
784
2ac09a5b
YQ
7852016-06-28 Yao Qi <yao.qi@linaro.org>
786
787 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
788 for variable new_offset.
789 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
790 (aarch64_ftrace_insn_reloc_cb): Likewise.
791 (aarch64_ftrace_insn_reloc_tb): Likewise.
792 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
793 PRIx64 instead of PRIx32.
794
79e7fd4f
YQ
7952016-06-28 Yao Qi <yao.qi@linaro.org>
796
797 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
798 (the_low_target): Install arm_get_syscall_trapinfo.
799
061fc021
YQ
8002016-06-28 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
803 function.
804 (the_low_target): Install aarch64_get_syscall_trapinfo.
805
4cc32bec
YQ
8062016-06-28 Yao Qi <yao.qi@linaro.org>
807
808 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
809 Callers updated.
810 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
811 Remove parameter sysno.
812 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
813 sysret.
814
782c1122
AA
8152016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
816
817 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
818 (s390_emit_ne_goto): Likewise.
819 (s390_emit_lt_goto): Likewise.
820 (s390_emit_le_goto): Likewise.
821 (s390_emit_gt_goto): Likewise.
822 (s390_emit_ge_goto): Likewise.
823 (s390x_emit_eq_goto): Likewise.
824 (s390x_emit_ne_goto): Likewise.
825 (s390x_emit_lt_goto): Likewise.
826 (s390x_emit_le_goto): Likewise.
827 (s390x_emit_gt_goto): Likewise.
828 (s390x_emit_ge_goto): Likewise.
829 (s390_emit_ops_impl): Mark variable static.
830 (s390x_emit_ops): Likewise.
831
2e7b624b
YQ
8322016-06-17 Yao Qi <yao.qi@linaro.org>
833
834 * linux-low.c (handle_extended_wait): Call
835 uninsert_reinsert_breakpoints for the parent process. Remove
836 reinsert breakpoints from the child process. Reinsert them to
837 the parent process when vfork is done.
838 * mem-break.c (uninsert_reinsert_breakpoints): New function.
839 (reinsert_reinsert_breakpoints): New function.
840 * mem-break.h (uninsert_reinsert_breakpoints): Declare
841 (reinsert_reinsert_breakpoints): Declare.
842
8a81c5d7
YQ
8432016-06-17 Yao Qi <yao.qi@linaro.org>
844
845 * linux-low.c (handle_extended_wait): If the parent is doing
846 step-over, remove the reinsert breakpoints from the forked child.
847
f50bf8e5
YQ
8482016-06-17 Yao Qi <yao.qi@linaro.org>
849
850 * linux-low.c (unsuspend_all_lwps): Declare.
851 (linux_low_filter_event): If thread exited, call finish_step_over.
852 If step-over is finished, unsuspend other threads.
853
8376a3cb
YQ
8542016-06-17 Yao Qi <yao.qi@linaro.org>
855
856 * linux-low.c (linux_resume_one_lwp_throw): Assert
857 has_reinsert_breakpoints returns false.
858 * mem-break.c (delete_disabled_breakpoints): Assert
859 bp type isn't reinsert_breakpoint.
860
f79b145d
YQ
8612016-06-17 Yao Qi <yao.qi@linaro.org>
862
863 * linux-low.c (maybe_hw_step): New function.
864 (linux_resume_one_lwp_throw): Call maybe_hw_step.
865 (finish_step_over): Switch current_thread to lwp temporarily,
866 and assert has_reinsert_breakpoints returns true.
867 (proceed_one_lwp): Call maybe_hw_step.
868 * mem-break.c (has_reinsert_breakpoints): New function.
869 * mem-break.h (has_reinsert_breakpoints): Declare.
870
0ae534d2
JT
8712016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
872
873 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
874
fcdad592
YQ
8752016-05-17 Yao Qi <yao.qi@linaro.org>
876
877 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
878 instead of find_inferior.
879
9e784964
YQ
8802016-05-05 Yao Qi <yao.qi@linaro.org>
881
882 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
883 Initialize res to zero.
884
cf2ebb6e
YQ
8852016-05-05 Yao Qi <yao.qi@linaro.org>
886
887 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
888 to uint32_t.
889
c1aebf87
UW
8902016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
891
892 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
893 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
894 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
895
35fd2deb 8962016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 897 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
898
899 * tracepoint.c (write_inferior_int8): New function.
900 (cmd_qtenable_disable): Write enable flag using
901 write_inferior_int8.
902
484b3c32
YQ
9032016-04-25 Yao Qi <yao.qi@linaro.org>
904
905 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
906 (need_step_over_p): Return zero if the LWP has pending signals
907 can be delivered on software single step target.
908
85ba7d86
YQ
9092016-04-25 Yao Qi <yao.qi@linaro.org>
910
911 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
912 return instead of error.
913
3539aa13
YQ
9142016-04-22 Yao Qi <yao.qi@linaro.org>
915
916 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
917 to 23.
918
5b061e98
YQ
9192016-04-22 Yao Qi <yao.qi@linaro.org>
920
921 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
922 signal when stepping over breakpoint with software single
923 step.
924
3451269c
PA
9252016-04-21 Pedro Alves <palves@redhat.com>
926
927 * linux-s390-low.c (s390_collect_ptrace_register)
928 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
929 add casts.
930 (s390_check_regset): Use void * instead of gdb_byte *.
931
a2358508
PA
9322016-04-20 Pedro Alves <palves@redhat.com>
933
934 * configure: Renegerate.
935
6885166d
YQ
9362016-04-20 Yao Qi <yao.qi@linaro.org>
937
938 * linux-aarch32-low.c: Include "arch/arm-linux.h".
939 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
940 number 16.
941 (arm_store_gregset): Likewise.
942
2b863f51
WT
9432016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
944
945 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
946 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
947 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
948 (amd64-avx-mpx-linux.c): New rules.
949 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
950 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
951 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
952 (srv_amd64_regobj): Add amd64-avx-mpx.o.
953 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
954 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
955 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
956 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
957 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
958 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
959 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
960 * linux-x86-low.c (x86_linux_read_description): Add case for
961 X86_XSTATE_AVX_MPX_MASK.
962 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
963 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
964 init_registers_i386_avx_mpx_linux.
965 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
966 (initialize_low_tracepoint): Call
967 init_registers_i386_avx_mpx_linux.
968 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
969 (initialize_low_tracepoint): Call
970 init_registers_amd64_avx_mpx_linux.
971 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
972 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
973 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
974 declarations.
975
9b30624b
PA
9762016-04-18 Pedro Alves <palves@redhat.com>
977
978 * configure: Regenerate.
979
45e3745e
AT
9802016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
981
982 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
983 (aarch64_emit_sub): Likewise.
984
2afc13ff
PA
9852016-04-12 Pedro Alves <palves@redhat.com>
986
987 * utils.c (prepare_to_throw_exception): Delete.
988
6e774b13
SM
9892016-04-05 Simon Marchi <simon.marchi@ericsson.com>
990
991 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
992
4dca19f8
MK
9932016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
994
995 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
996
d0a9981f
MK
9972016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
998
999 * linux-aarch64-ipa.c: Add <elf.h> include.
1000 * linux-ppc-ipa.c: Add <elf.h> include.
1001 * linux-s390-ipa.c: Add <elf.h> include.
1002
252db07e
MK
10032016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1004
1005 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1006 (get_raw_reg_ptr): Likewise.
1007 (get_trace_state_variable_value_ptr): Likewise.
1008 (set_trace_state_variable_value_ptr): Likewise.
1009 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1010 char *.
1011
14e2b6d9
MK
10122016-03-31 Wei-cheng Wang <cole945@gmail.com>
1013 Marcin Kościelnicki <koriakin@0x04.net>
1014
1015 PR/17221
1016 * linux-ppc-low.c (emit_insns): New function.
1017 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1018 (ppc_emit_prologue): New function.
1019 (ppc_emit_epilogue): New function.
1020 (ppc_emit_add): New function.
1021 (ppc_emit_sub): New function.
1022 (ppc_emit_mul): New function.
1023 (ppc_emit_lsh): New function.
1024 (ppc_emit_rsh_signed): New function.
1025 (ppc_emit_rsh_unsigned): New function.
1026 (ppc_emit_ext): New function.
1027 (ppc_emit_zero_ext): New function.
1028 (ppc_emit_log_not): New function.
1029 (ppc_emit_bit_and): New function.
1030 (ppc_emit_bit_or): New function.
1031 (ppc_emit_bit_xor): New function.
1032 (ppc_emit_bit_not): New function.
1033 (ppc_emit_equal): New function.
1034 (ppc_emit_less_signed): New function.
1035 (ppc_emit_less_unsigned): New function.
1036 (ppc_emit_ref): New function.
1037 (ppc_emit_const): New function.
1038 (ppc_emit_reg): New function.
1039 (ppc_emit_pop): New function.
1040 (ppc_emit_stack_flush): New function.
1041 (ppc_emit_swap): New function.
1042 (ppc_emit_stack_adjust): New function.
1043 (ppc_emit_call): New function.
1044 (ppc_emit_int_call_1): New function.
1045 (ppc_emit_void_call_2): New function.
1046 (ppc_emit_if_goto): New function.
1047 (ppc_emit_goto): New function.
1048 (ppc_emit_eq_goto): New function.
1049 (ppc_emit_ne_goto): New function.
1050 (ppc_emit_lt_goto): New function.
1051 (ppc_emit_le_goto): New function.
1052 (ppc_emit_gt_goto): New function.
1053 (ppc_emit_ge_goto): New function.
1054 (ppc_write_goto_address): New function.
1055 (ppc_emit_ops_impl): New static variable.
1056 (ppc64v1_emit_prologue): New function.
1057 (ppc64v2_emit_prologue): New function.
1058 (ppc64_emit_epilogue): New function.
1059 (ppc64_emit_add): New function.
1060 (ppc64_emit_sub): New function.
1061 (ppc64_emit_mul): New function.
1062 (ppc64_emit_lsh): New function.
1063 (ppc64_emit_rsh_signed): New function.
1064 (ppc64_emit_rsh_unsigned): New function.
1065 (ppc64_emit_ext): New function.
1066 (ppc64_emit_zero_ext): New function.
1067 (ppc64_emit_log_not): New function.
1068 (ppc64_emit_bit_and): New function.
1069 (ppc64_emit_bit_or): New function.
1070 (ppc64_emit_bit_xor): New function.
1071 (ppc64_emit_bit_not): New function.
1072 (ppc64_emit_equal): New function.
1073 (ppc64_emit_less_signed): New function.
1074 (ppc64_emit_less_unsigned): New function.
1075 (ppc64_emit_ref): New function.
1076 (ppc64_emit_const): New function.
1077 (ppc64v1_emit_reg): New function.
1078 (ppc64v2_emit_reg): New function.
1079 (ppc64_emit_pop): New function.
1080 (ppc64_emit_stack_flush): New function.
1081 (ppc64_emit_swap): New function.
1082 (ppc64v1_emit_call): New function.
1083 (ppc64v2_emit_call): New function.
1084 (ppc64v1_emit_int_call_1): New function.
1085 (ppc64v2_emit_int_call_1): New function.
1086 (ppc64v1_emit_void_call_2): New function.
1087 (ppc64v2_emit_void_call_2): New function.
1088 (ppc64_emit_if_goto): New function.
1089 (ppc64_emit_eq_goto): New function.
1090 (ppc64_emit_ne_goto): New function.
1091 (ppc64_emit_lt_goto): New function.
1092 (ppc64_emit_le_goto): New function.
1093 (ppc64_emit_gt_goto): New function.
1094 (ppc64_emit_ge_goto): New function.
1095 (ppc64v1_emit_ops_impl): New static variable.
1096 (ppc64v2_emit_ops_impl): New static variable.
1097 (ppc_emit_ops): New function.
1098 (linux_low_target): Wire in ppc_emit_ops.
1099
a2174ba4
MK
11002016-03-31 Wei-cheng Wang <cole945@gmail.com>
1101 Marcin Kościelnicki <koriakin@0x04.net>
1102
1103 PR/17221
1104 * Makefile.in: Add powerpc-*-ipa.o
1105 * configure.srv: Add ipa_obj for powerpc*-linux.
1106 * linux-ppc-ipa.c: New file.
1107 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1108 includes.
1109 (PPC_FIELD): New macro.
1110 (PPC_SEXT): New macro.
1111 (PPC_OP6): New macro.
1112 (PPC_BO): New macro.
1113 (PPC_LI): New macro.
1114 (PPC_BD): New macro.
1115 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1116 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1117 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1118 (ppc_get_thread_area): New function.
1119 (is_elfv2_inferior): New function.
1120 (gen_ds_form): New function.
1121 (GEN_STD): New macro.
1122 (GEN_STDU): New macro.
1123 (GEN_LD): New macro.
1124 (GEN_LDU): New macro.
1125 (gen_d_form): New function.
1126 (GEN_ADDI): New macro.
1127 (GEN_ADDIS): New macro.
1128 (GEN_LI): New macro.
1129 (GEN_LIS): New macro.
1130 (GEN_ORI): New macro.
1131 (GEN_ORIS): New macro.
1132 (GEN_LWZ): New macro.
1133 (GEN_STW): New macro.
1134 (GEN_STWU): New macro.
1135 (gen_xfx_form): New function.
1136 (GEN_MFSPR): New macro.
1137 (GEN_MTSPR): New macro.
1138 (GEN_MFCR): New macro.
1139 (GEN_MTCR): New macro.
1140 (GEN_SYNC): New macro.
1141 (GEN_LWSYNC): New macro.
1142 (gen_x_form): New function.
1143 (GEN_OR): New macro.
1144 (GEN_MR): New macro.
1145 (GEN_LWARX): New macro.
1146 (GEN_STWCX): New macro.
1147 (GEN_CMPW): New macro.
1148 (gen_md_form): New function.
1149 (GEN_RLDICL): New macro.
1150 (GEN_RLDICR): New macro.
1151 (gen_i_form): New function.
1152 (GEN_B): New macro.
1153 (GEN_BL): New macro.
1154 (gen_b_form): New function.
1155 (GEN_BNE): New macro.
1156 (GEN_LOAD): New macro.
1157 (GEN_STORE): New macro.
1158 (gen_limm): New function.
1159 (gen_atomic_xchg): New function.
1160 (gen_call): New function.
1161 (ppc_relocate_instruction): New function.
1162 (ppc_install_fast_tracepoint_jump_pad): New function.
1163 (ppc_get_min_fast_tracepoint_insn_len): New function.
1164 (ppc_get_ipa_tdesc_idx): New function.
1165 (the_low_target): Wire in the new functions.
1166 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1167 tdescs.
1168 * linux-ppc-tdesc.h: New file.
1169
a13c4696
MK
11702016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1171
1172 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1173 (alloc_jump_pad_buffer): New function.
1174 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1175 (alloc_jump_pad_buffer): New function.
1176 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1177 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1178 (alloc_jump_pad_buffer): New function.
1179 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1180 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1181 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1182 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1183
1cda1512
MK
11842016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1185
1186 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1187 * linux-amd64-ipa.c: Likewise.
1188 * linux-i386-ipa.c: Likewise.
1189 * linux-s390-ipa.c: Likewise.
1190 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1191 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1192 set_trace_state_variable_value_ptr.
1193 (struct ipa_sym_addresses): Likewise.
1194 (symbol_list): Likewise.
1195 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1196 accessing gdb_collect directly.
1197 (gdb_collect_ptr_type): New typedef.
1198 (get_raw_reg_ptr_type): New typedef.
1199 (get_trace_state_variable_value_ptr_type): New typedef.
1200 (set_trace_state_variable_value_ptr_type): New typedef.
1201 (gdb_collect_ptr): New global.
1202 (get_raw_reg_ptr): New global.
1203 (get_trace_state_variable_value_ptr): New global.
1204 (set_trace_state_variable_value_ptr): New global.
1205 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1206 accessing get_raw_reg directly.
1207 (get_get_tsv_func_addr): Likewise for
1208 get_trace_state_variable_value_ptr.
1209 (get_set_tsv_func_addr): Likewise for
1210 set_trace_state_variable_value_ptr.
1211 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1212
72fb5488
SM
12132016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1214
1215 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1216
28170b88
MK
12172016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1218
1219 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1220 packets.
1221 (relocate_instruction): Remove own_buf.
1222 * server.c (own_buf): Make global.
1223 (handle_v_requests): Make global.
1224 * server.h (own_buf): New declaration.
1225 (handle_v_requests): New prototype.
1226
f39e8743
MK
12272016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1228
1229 PR 18377
1230 * linux-s390-low.c (add_insns): New function.
1231 (s390_emit_prologue): New function.
1232 (s390_emit_epilogue): New function.
1233 (s390_emit_add): New function.
1234 (s390_emit_sub): New function.
1235 (s390_emit_mul): New function.
1236 (s390_emit_lsh): New function.
1237 (s390_emit_rsh_signed): New function.
1238 (s390_emit_rsh_unsigned): New function.
1239 (s390_emit_ext): New function.
1240 (s390_emit_log_not): New function.
1241 (s390_emit_bit_and): New function.
1242 (s390_emit_bit_or): New function.
1243 (s390_emit_bit_xor): New function.
1244 (s390_emit_bit_not): New function.
1245 (s390_emit_equal): New function.
1246 (s390_emit_less_signed): New function.
1247 (s390_emit_less_unsigned): New function.
1248 (s390_emit_ref): New function.
1249 (s390_emit_if_goto): New function.
1250 (s390_emit_goto): New function.
1251 (s390_write_goto_address): New function.
1252 (s390_emit_litpool): New function.
1253 (s390_emit_const): New function.
1254 (s390_emit_call): New function.
1255 (s390_emit_reg): New function.
1256 (s390_emit_pop): New function.
1257 (s390_emit_stack_flush): New function.
1258 (s390_emit_zero_ext): New function.
1259 (s390_emit_swap): New function.
1260 (s390_emit_stack_adjust): New function.
1261 (s390_emit_set_r2): New function.
1262 (s390_emit_int_call_1): New function.
1263 (s390_emit_void_call_2): New function.
1264 (s390_emit_eq_goto): New function.
1265 (s390_emit_ne_goto): New function.
1266 (s390_emit_lt_goto): New function.
1267 (s390_emit_le_goto): New function.
1268 (s390_emit_gt_goto): New function.
1269 (s390_emit_ge_goto): New function.
1270 (s390x_emit_prologue): New function.
1271 (s390x_emit_epilogue): New function.
1272 (s390x_emit_add): New function.
1273 (s390x_emit_sub): New function.
1274 (s390x_emit_mul): New function.
1275 (s390x_emit_lsh): New function.
1276 (s390x_emit_rsh_signed): New function.
1277 (s390x_emit_rsh_unsigned): New function.
1278 (s390x_emit_ext): New function.
1279 (s390x_emit_log_not): New function.
1280 (s390x_emit_bit_and): New function.
1281 (s390x_emit_bit_or): New function.
1282 (s390x_emit_bit_xor): New function.
1283 (s390x_emit_bit_not): New function.
1284 (s390x_emit_equal): New function.
1285 (s390x_emit_less_signed): New function.
1286 (s390x_emit_less_unsigned): New function.
1287 (s390x_emit_ref): New function.
1288 (s390x_emit_if_goto): New function.
1289 (s390x_emit_const): New function.
1290 (s390x_emit_call): New function.
1291 (s390x_emit_reg): New function.
1292 (s390x_emit_pop): New function.
1293 (s390x_emit_stack_flush): New function.
1294 (s390x_emit_zero_ext): New function.
1295 (s390x_emit_swap): New function.
1296 (s390x_emit_stack_adjust): New function.
1297 (s390x_emit_int_call_1): New function.
1298 (s390x_emit_void_call_2): New function.
1299 (s390x_emit_eq_goto): New function.
1300 (s390x_emit_ne_goto): New function.
1301 (s390x_emit_lt_goto): New function.
1302 (s390x_emit_le_goto): New function.
1303 (s390x_emit_gt_goto): New function.
1304 (s390x_emit_ge_goto): New function.
1305 (s390_emit_ops): New function.
1306 (struct linux_target_ops): Fill in emit_ops hook.
1307
abd9baf9
MK
13082016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1309
1310 PR 18377
1311 * Makefile.in: Add s390 IPA files.
1312 * configure.srv: Build IPA for s390.
1313 * linux-s390-ipa.c: New file.
1314 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1315 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1316 (tdesc_s390_linux32): Likewise.
1317 (init_registers_s390_linux32v1): Likewise.
1318 (tdesc_s390_linux32v1): Likewise.
1319 (init_registers_s390_linux32v2): Likewise.
1320 (tdesc_s390_linux32v2): Likewise.
1321 (init_registers_s390_linux64): Likewise.
1322 (tdesc_s390_linux64): Likewise.
1323 (init_registers_s390_linux64v1): Likewise.
1324 (tdesc_s390_linux64v1): Likewise.
1325 (init_registers_s390_linux64v2): Likewise.
1326 (tdesc_s390_linux64v2): Likewise.
1327 (init_registers_s390_te_linux64): Likewise.
1328 (tdesc_s390_te_linux64): Likewise.
1329 (init_registers_s390_vx_linux64): Likewise.
1330 (tdesc_s390_vx_linux64): Likewise.
1331 (init_registers_s390_tevx_linux64): Likewise.
1332 (tdesc_s390_tevx_linux64): Likewise.
1333 (init_registers_s390x_linux64): Likewise.
1334 (tdesc_s390x_linux64): Likewise.
1335 (init_registers_s390x_linux64v1): Likewise.
1336 (tdesc_s390x_linux64v1): Likewise.
1337 (init_registers_s390x_linux64v2): Likewise.
1338 (tdesc_s390x_linux64v2): Likewise.
1339 (init_registers_s390x_te_linux64): Likewise.
1340 (tdesc_s390x_te_linux64): Likewise.
1341 (init_registers_s390x_vx_linux64): Likewise.
1342 (tdesc_s390x_vx_linux64): Likewise.
1343 (init_registers_s390x_tevx_linux64): Likewise.
1344 (tdesc_s390x_tevx_linux64): Likewise.
1345 (have_hwcap_s390_vx): New static variable.
1346 (s390_arch_setup): Fill have_hwcap_s390_vx.
1347 (s390_get_thread_area): New function.
1348 (s390_ft_entry_gpr_esa): New const.
1349 (s390_ft_entry_gpr_zarch): New const.
1350 (s390_ft_entry_misc): New const.
1351 (s390_ft_entry_fr): New const.
1352 (s390_ft_entry_vr): New const.
1353 (s390_ft_main_31): New const.
1354 (s390_ft_main_64): New const.
1355 (s390_ft_exit_fr): New const.
1356 (s390_ft_exit_vr): New const.
1357 (s390_ft_exit_misc): New const.
1358 (s390_ft_exit_gpr_esa): New const.
1359 (s390_ft_exit_gpr_zarch): New const.
1360 (append_insns): New function.
1361 (s390_relocate_instruction): New function.
1362 (s390_install_fast_tracepoint_jump_pad): New function.
1363 (s390_get_min_fast_tracepoint_insn_len): New function.
1364 (s390_get_ipa_tdesc_idx): New function.
1365 (struct linux_target_ops): Wire in the above functions.
1366 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1367 * linux-s390-tdesc.h: New file.
1368
a4105d04
MK
13692016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1370
1371 * linux-s390-low.c (s390_supports_tracepoints): New function.
1372 (struct linux_target_ops): Fill supports_tracepoints hook.
1373
35ac8b3e
YQ
13742016-03-18 Yao Qi <yao.qi@linaro.org>
1375
1376 * linux-low.c (lwp_signal_can_be_delivered): New function.
1377 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1378
94610ec4
YQ
13792016-03-18 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1382 0 if signal is enqueued. Remove 'signal' from one debugging
1383 message. Move one debugging message to some lines below.
1384 Remove code setting 'signal' to 0.
1385
80aea927
YQ
13862016-03-18 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-low.c (linux_low_filter_event): Remove redundant
1389 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1390
b04fd3be
MK
13912016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1392
1393 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1394 (struct linux_target_ops): Wire in the above.
1395
c40c8d4b
YQ
13962016-03-03 Yao Qi <yao.qi@linaro.org>
1397
1398 * linux-low.c: Update comments to start_step_over.
1399
0f8288ae
YQ
14002016-03-03 Yao Qi <yao.qi@linaro.org>
1401
1402 PR server/19736
1403 * linux-low.c (handle_extended_wait): Set child suspended
1404 if event_lwp->bp_reinsert isn't zero.
1405
fdbd04a8
YQ
14062016-03-02 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1409 enqueue_pending_signal.
1410
6896a8fa
MK
14112016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1412
1413 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1414 is actually loaded.
1415
ab503087
MK
14162016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1417
1418 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1419 (s390_regmap_3264) [!__s390x__]: New global.
1420 (s390_collect_ptrace_register): Skip map entries containing -1.
1421 (s390_supply_ptrace_register): Ditto.
1422 (s390_fill_gprs_high): New function.
1423 (s390_store_gprs_high): New function.
1424 (s390_regsets): Add NT_S390_HIGH_GPRS.
1425 (s390_get_hwcap): Enable on 31-bit.
1426 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1427 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1428 Detect NT_S390_HIGH_GPRS.
1429 (s390_usrregs_info_3264): Enable on 31-bit.
1430 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1431 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1432
ae91f625
MK
14332016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1434
1435 PR gdb/13808
1436 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1437 * configure.srv: Ditto.
1438 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1439 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1440 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1441 (init_registers_amd64_linux): Remove prototype.
1442 (tdesc_amd64_linux): Remove declaration.
1443 (get_ipa_tdesc): New function.
1444 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1445 initialize remaining tdescs.
1446 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1447 (init_registers_i386_linux): Remove prototype.
1448 (tdesc_i386_linux): Remove declaration.
1449 (get_ipa_tdesc): New function.
1450 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1451 initialize remaining tdescs.
1452 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1453 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1454 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1455 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1456 (x86_get_ipa_tdesc_idx): New function.
1457 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1458 * linux-x86-tdesc.h: New file.
1459 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1460 (target_get_ipa_tdesc_idx): New macro.
1461 * tracepoint.c (ipa_tdesc_idx): New macro.
1462 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1463 (symbol_list): Add ipa_tdesc_idx.
1464 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1465 (ipa_tdesc): Remove.
1466 (ipa_tdesc_idx): New variable.
1467 (get_context_regcache): Use get_ipa_tdesc.
1468 (gdb_collect): Ditto.
1469 (gdb_probe): Ditto.
1470 * tracepoint.h (get_ipa_tdesc): New prototype.
1471 (ipa_tdesc): Remove.
1472
e7ad2f14
PA
14732016-02-24 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1476 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1477 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1478 Factor out common code between the USE_SIGTRAP_SIGINFO and
1479 !USE_SIGTRAP_SIGINFO blocks.
1480 (linux_low_filter_event): Call save_stop_reason instead of
1481 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1482 Update comments.
1483 (linux_wait_1): Update comments.
1484
657f9cde
WW
14852016-02-24 Wei-cheng Wang <cole945@gmail.com>
1486
1487 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1488 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1489 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1490 ppc_insert_point, ppc_remove_point.
1491
b00b61e1
MK
14922016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1493
1494 * linux-s390-low.c (s390_supports_z_point_type): New function.
1495 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1496
553cb527
YQ
14972016-02-16 Yao Qi <yao.qi@linaro.org>
1498
1499 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1500 PC. Get pc from regcache_read_pc.
1501
a5652c21
YQ
15022016-02-12 Yao Qi <yao.qi@linaro.org>
1503
1504 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1505 or linux_get_pc_32bit.
1506 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1507
ed443b61
YQ
15082016-02-12 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1511 arm_linux_get_next_pcs_fixup.
1512
020ecd38
MK
15132016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1514
1515 * tracepoint.c (x_tracepoint_action_download): Change
1516 write_inferior_data_ptr to write_inferior_data_pointer.
1517 (cmd_qtstart): Likewise.
1518 (write_inferior_data_ptr): Remove.
1519 (download_agent_expr): Change write_inferior_data_ptr to
1520 write_inferior_data_pointer.
1521 (download_tracepoint_1): Likewise.
1522 (download_tracepoint): Likewise.
1523 (download_trace_state_variables): Likewise.
1524
7cae9051
WW
15252016-02-11 Wei-cheng Wang <cole945@gmail.com>
1526 Marcin Kościelnicki <koriakin@0x04.net>
1527
1528 * tracepoint.c (struct tracepoint_action_ops): Remove.
1529 (struct tracepoint_action): Remove ops.
1530 (m_tracepoint_action_download, r_tracepoint_action_download)
1531 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1532 size and offset accordingly.
1533 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1534 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1535 (tracepoint_action_send, tracepoint_action_download): New functions.
1536 Helpers for trace action handlers.
1537 (add_tracepoint_action): Remove setup actions ops.
1538 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1539
9f6a71b4
YQ
15402016-02-10 Yao Qi <yao.qi@linaro.org>
1541
1542 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1543
1e94266c
SM
15442016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1547 to AC_OUTPUT.
1548 * configure: Regenerate.
1549
8adce034
SM
15502016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1553 void * to gdb_byte *.
1554 * linux-low.c (siginfo_fixup): Likewise.
1555 (linux_xfer_siginfo): Likewise.
1556 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1557 Likewise.
1558 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1559
93813b37
WT
15602016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1561
1562 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1563 to srv_tgtobj.
1564 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1565 to srv_tgtobj.
1566 * linux-x86-low.c [__x86_64__]: Include
1567 "nat/amd64-linux-siginfo.h".
1568 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1569 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1570 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1571 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1572 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1573 (cpt_si_fd, si_timerid, si_overrun): Move from
1574 nat/amd64-linux-siginfo.c.
1575 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1576
8424cc97
SM
15772016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1578
1579 * server.c (skip_to_semicolon): Remove.
1580 (process_point_options): Use strchrnul instead of
1581 skip_to_semicolon.
1582
4d18591b
YQ
15832016-01-26 Yao Qi <yao.qi@linaro.org>
1584
1585 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1586 * linux-low.c (install_software_single_step_breakpoints): Don't
1587 call regcache_read_pc.
1588 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1589 argument pc.
1590
d8020970
YQ
15912016-01-26 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-low.c (install_software_single_step_breakpoints): Call
1594 regcache_read_pc instead of get_pc.
1595
8b207339
YQ
15962016-01-26 Yao Qi <yao.qi@linaro.org>
1597
1598 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1599 (unblock_async_io): Rename to ...
1600 (block_unblock_async_io): ... it. New function.
1601 (enable_async_io): Don't install SIGIO handler. Unblock it
1602 instead.
1603 (disable_async_io): Don't ignore SIGIO. Block it instead.
1604 (initialize_async_io): Install SIGIO handler. Don't call
1605 unblock_async_io.
1606
18879fef
YQ
16072016-01-26 Yao Qi <yao.qi@linaro.org>
1608
1609 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1610 first character is '\003', call *the_target->request_interrupt.
1611
a0f8e08a
YQ
16122016-01-25 Yao Qi <yao.qi@linaro.org>
1613
1614 * remote-utils.c (new_thread_notify): Remove.
1615 (dead_thread_notify): Likewise.
1616 * remote-utils.h (new_thread_notify): Remove declaration.
1617 (dead_thread_notify): Likewise.
1618
cc5fd9ab
MK
16192016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1620
1621 * gdb.trace/pending.exp: Fix expected message on continue.
1622
99e8eb11
MK
16232016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1624
1625 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1626 it works properly on big-endian machines where sizeof (CORE_ADDR)
1627 != sizeof (void *).
1628
a994041d
PA
16292016-01-21 Pedro Alves <palves@redhat.com>
1630
1631 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1632 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1633 * configure: Regenerate.
1634
f7a6a40d
YQ
16352016-01-21 Yao Qi <yao.qi@linaro.org>
1636
1637 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1638 is_thumb and set it according to CPSR saved on the stack.
1639 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1640 arm_sigreturn_next_pc.
1641
6f69e520
YQ
16422016-01-18 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-low.c (linux_set_pc_64bit): New function.
1645 (linux_get_pc_64bit): New function.
1646 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1647 Declare.
1648 * linux-sparc-low.c (debug_threads): Remove declaration.
1649 (sparc_get_pc): Remove.
1650 (the_low_target): Use linux_get_pc_64bit instead of
1651 sparc_get_pc.
1652 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1653 (the_low_target): Use linux_get_pc_64bit and
1654 linux_set_pc_64bit.
1655
276d4552
YQ
16562016-01-18 Yao Qi <yao.qi@linaro.org>
1657
1658 * linux-arm-low.c (debug_threads): Remove declaration.
1659 (arm_get_pc, arm_set_pc): Remove.
1660 (the_low_target): Use linux_get_pc_32bit and
1661 linux_set_pc_32bit.
1662 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1663 (the_low_target): Use linux_get_pc_32bit and
1664 linux_set_pc_32bit.
1665 * linux-cris-low.c (debug_threads): Remove declaration.
1666 (cris_get_pc, cris_set_pc,): Remove.
1667 (the_low_target): Use linux_get_pc_32bit and
1668 linux_set_pc_32bit.
1669 * linux-crisv32-low.c (debug_threads): Remove declaration.
1670 (cris_get_pc, cris_set_pc): Remove.
1671 (the_low_target): Use linux_get_pc_32bit and
1672 linux_set_pc_32bit.
1673 * linux-low.c: Include inttypes.h.
1674 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1675 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1676 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1677 (the_low_target): Use linux_get_pc_32bit and
1678 linux_set_pc_32bit.
1679 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1680 (the_low_target): Use linux_get_pc_32bit and
1681 linux_set_pc_32bit.
1682 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1683 (the_low_target): Use linux_get_pc_32bit and
1684 linux_set_pc_32bit.
1685 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1686 (the_low_target): Use linux_get_pc_32bit and
1687 linux_set_pc_32bit.
1688 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1689 (the_low_target): Use linux_get_pc_32bit and
1690 linux_set_pc_32bit.
1691
eb0edac8
GB
16922016-01-18 Gary Benson <gbenson@redhat.com>
1693
1694 * configure.ac (AC_FUNC_FORK): New check.
1695 * config.in: Regenerate.
1696 * configure: Likewise.
1697
1b451dda
YQ
16982016-01-14 Yao Qi <yao.qi@linaro.org>
1699
1700 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1701 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1702 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1703 arm_get_next_pcs_ctor.
1704
82075af2
JS
17052016-01-12 Josh Stone <jistone@redhat.com>
1706 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1707
1708 * inferiors.h: Include "gdb_vecs.h".
1709 (struct process_info): Add syscalls_to_catch.
1710 * inferiors.c (remove_process): Free syscalls_to_catch.
1711 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1712 syscall_return stops.
1713 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1714 * server.c (handle_general_set): Handle QCatchSyscalls.
1715 (handle_query): Report support for QCatchSyscalls.
1716 * target.h (struct target_ops): Add supports_catch_syscall.
1717 (target_supports_catch_syscall): New macro.
1718 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1719 (struct lwp_info): Add syscall_state.
1720 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1721 Maintain syscall_state and syscalls_to_catch across exec.
1722 (get_syscall_trapinfo): New function, proxy to the_low_target.
1723 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1724 (linux_low_filter_event): Toggle syscall_state entry/return for
1725 syscall traps, and set it ignored for all others.
1726 (gdb_catching_syscalls_p): New function.
1727 (gdb_catch_this_syscall_p): New function.
1728 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1729 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1730 (linux_supports_catch_syscall): New function.
1731 (linux_target_ops): Install it.
1732 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1733 (the_low_target): Install it.
1734
8f13a3ce
MF
17352016-01-12 Mike Frysinger <vapier@gentoo.org>
1736
1737 * acinclude.m4: Include new ../warning.m4 file.
1738 * configure: Regenerated.
1739 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1740
5b3da067
MF
17412016-01-12 Mike Frysinger <vapier@gentoo.org>
1742
1743 * ax.c (is_goto_target): Mark static.
1744 * linux-low.c (register_addr): Likewise.
1745 (linux_fetch_registers, linux_store_registers): Likewise.
1746 * mem-break.c (any_persistent_commands): Fix old prototype.
1747 (add_commands_to_breakpoint): Mark static.
1748 * regcache.c (find_register_by_name): Delete unused func.
1749 * remote-utils.c (hex_or_minus_one): Mark static.
1750 * server.c (monitor_show_help): Mark static.
1751 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1752 handle_v_requests): Likewise.
1753
bc504a31
PA
17542016-01-12 Pedro Alves <palves@redhat.com>
1755
1756 Remove use of the registered trademark symbol throughout.
1757
5a0dd67a
YQ
17582016-01-08 Yao Qi <yao.qi@linaro.org>
1759
1760 * remote-utils.c (getpkt): If c is '\003', call target hook
1761 request_interrupt.
1762
b2ca446f
YQ
17632016-01-06 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1766 linux-aarch32-low.c.
1767 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1768 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1769 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1770 (thumb2_breakpoint): Declare.
1771 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1772 linux-aarch32-low.h.
1773 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1774 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1775 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1776
edd88788
JB
17772016-01-01 Joel Brobecker <brobecker@adacore.com>
1778
1779 * gdbreplay.c (gdbreplay_version): Change copyright year in
1780 version message.
1781 * server.c (gdbserver_version): Likewise.
1782
65da7f14
PP
17832015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1784
1785 * server.c (crc32_table): Delete.
1786 (crc32): Use libiberty's xcrc32 function.
1787
4abd5ed2
JB
17882015-12-22 Joel Brobecker <brobecker@adacore.com>
1789
1790 * lynx-low.c (lynx_delete_thread_callback): New function.
1791 (lynx_mourn): Properly delete our process and all of its
1792 threads. Remove call to clear_inferiors.
1793
0e50fe5c
JB
17942015-12-22 Joel Brobecker <brobecker@adacore.com>
1795
1796 * target.c (thread_search_callback): Add check that
1797 the thread_stopped target callback is not NULL before
1798 calling it.
1799
35adc03f
YQ
18002015-12-21 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1803 arm breakpoint.
1804
bd2b2909
AT
18052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1806
1807 * server.c (handle_query): Call target_supports_software_single_step.
1808
7fe5e27e
AT
18092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1810
1811 * linux-low.c (single_step): New function.
1812 (linux_resume_one_lwp_throw): Call single_step.
1813 (start_step_over): Likewise.
1814
d9311bfa
AT
18152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1816
1817 * Makefile.in (SFILES): Append arch/arm-linux.c,
1818 arch/arm-get-next-pcs.c.
1819 (arm-linux.o): New rule.
1820 (arm-get-next-pcs.o): New rule.
1821 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1822 arm-linux.o.
1823 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1824 to linux-aarch32-low.c.
1825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1826 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1827 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1828 (thumb2_breakpoint_len): Likewise.
1829 (arm_is_thumb_mode): Make non-static.
1830 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1831 from linux-aarch32-low.c.
1832 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1833 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1834 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1835 (thumb2_breakpoint_len): Likewise.
1836 (arm_is_thumb_mode): New declaration.
1837 * linux-arm-low.c: Include arch/arm-linux.h
1838 aarch/arm-get-next-pcs.h, sys/syscall.h.
1839 (get_next_pcs_ops): New struct.
1840 (get_next_pcs_addr_bits_remove): New function.
1841 (get_next_pcs_is_thumb): New function.
1842 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1843 (arm_sigreturn_next_pc): Likewise.
1844 (get_next_pcs_syscall_next_pc): Likewise.
1845 (arm_gdbserver_get_next_pcs): Likewise.
1846 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1847 Initialize.
1848 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1849 * server.h: Include gdb_vecs.h.
1850
68ce2059
AT
18512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1852
1853 * Makefile.in (SFILES): Append common/common-regcache.c.
1854 (OBS): Append common-regcache.o.
1855 (common-regcache.o): New rule.
1856 * regcache.c (init_register_cache): Initialize cache to
1857 REG_UNAVAILABLE.
1858 (regcache_raw_read_unsigned): New function.
1859 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1860 register_status enum.
1861
fa5308bd
AT
18622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1863
1864 * linux-aarch64-low.c (the_low_targets): Rename
1865 breakpoint_reinsert_addr to get_next_pcs.
1866 * linux-arm-low.c (the_low_targets): Likewise.
1867 * linux-bfin-low.c (the_low_targets): Likewise.
1868 * linux-cris-low.c (the_low_targets): Likewise.
1869 * linux-crisv32-low.c (the_low_targets): Likewise.
1870 * linux-low.c (can_software_single_step): Likewise.
1871 (install_software_single_step_breakpoints): New function.
1872 (start_step_over): Use install_software_single_step_breakpoints.
1873 * linux-low.h: New CORE_ADDR vector.
1874 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1875 get_next_pcs.
1876 * linux-mips-low.c (the_low_targets): Likewise.
1877 * linux-nios2-low.c (the_low_targets): Likewise.
1878 * linux-sparc-low.c (the_low_targets): Likewise.
1879
4a6ed09b
PA
18802015-12-17 Pedro Alves <palves@redhat.com>
1881
1882 * linux-low.c (linux_kill_one_lwp): Remove references to
1883 LinuxThreads.
1884 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1885 to 'kill'.
1886 (linux_init_signals): Delete.
1887 (initialize_low): Adjust.
1888 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1889
7544db95
PA
18902015-12-16 Pedro Alves <palves@redhat.com>
1891
1892 * configure.ac (compiler warning flags): When testing a
1893 -Wno-foo option, check whether -Wfoo works instead.
1894 * configure: Regenerate.
1895
8020350c
DB
18962015-12-11 Don Breazeal <donb@codesourcery.com>
1897
1898 * server.c (process_serial_event): Don't exit from gdbserver
1899 in remote mode if there are still active inferiors.
1900
db91f502
YQ
19012015-12-11 Yao Qi <yao.qi@linaro.org>
1902
1903 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1904 arm_breakpoint_at if the process is 32-bit.
1905
b37a6290
YQ
19062015-12-11 Yao Qi <yao.qi@linaro.org>
1907
1908 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1909 arm breakpoint.
1910
17b1509a
YQ
19112015-12-07 Yao Qi <yao.qi@linaro.org>
1912
1913 * configure.srv: Append arm.o to srv_tgtobj for
1914 aarch64*-*-linux* target.
1915 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1916 from linux-arm-low.c.
1917 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1918 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1919 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1920 (thumb2_breakpoint_len): Likewise.
1921 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1922 (arm_breakpoint_kinds): Likewise.
1923 (arm_breakpoint_kind_from_pc): Likewise.
1924 (arm_sw_breakpoint_from_kind): Likewise.
1925 (arm_breakpoint_kind_from_current_state): Likewise.
1926 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1927 (arm_sw_breakpoint_from_kind): Declare.
1928 (arm_breakpoint_kind_from_current_state): Declare.
1929 (arm_breakpoint_at): Declare.
1930 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1931 arm_sw_breakpoint_from_kind if process is 32-bit.
1932 (aarch64_breakpoint_kind_from_pc): New function.
1933 (aarch64_breakpoint_kind_from_current_state): New function.
1934 (the_low_target): Initialize fields breakpoint_kind_from_pc
1935 and breakpoint_kind_from_current_state.
1936 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1937 linux-aarch32-low.c.
1938 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1939 (arm_breakpoint, arm_breakpoint_len): Likewise.
1940 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1941 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1942 (arm_is_thumb_mode): Likewise.
1943 (arm_breakpoint_at): Likewise.
1944 (arm_breakpoint_kind_from_pc): Likewise.
1945 (arm_sw_breakpoint_from_kind): Likewise.
1946 (arm_breakpoint_kind_from_current_state): Likewise.
1947
1948 Revert:
1949 2015-08-04 Yao Qi <yao.qi@linaro.org>
1950
1951 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1952 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1953 * server.c (extended_protocol): Remove "static".
1954 * server.h (extended_protocol): Declare it.
1955
ece66d65
JS
19562015-12-04 Josh Stone <jistone@redhat.com>
1957
1958 * target.h (struct target_ops) <arch_setup>: Rename to ...
1959 (struct target_ops) <post_create_inferior>: ... this.
1960 (target_arch_setup): Rename to ...
1961 (target_post_create_inferior): ... this, calling post_create_inferior.
1962 * server.c (start_inferior): Update target_arch_setup calls to
1963 target_post_create_inferior.
1964 * linux-low.c (linux_low_ptrace_options): Forward declare.
1965 (linux_arch_setup): Update its comment for general use.
1966 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1967 (struct linux_target_ops): Use linux_post_create_inferior.
1968 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1969 to post_create_inferior.
1970 * nto-low.c (struct nto_target_ops): Likewise.
1971 * spu-low.c (struct spu_target_ops): Likewise.
1972 * win32-low.c (struct win32_target_ops): Likewise.
1973
e58c48b4
AT
19742015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1975
1976 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1977
fbec8956
AT
19782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1979
1980 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1981 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1982 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1984 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1986 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1988 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1989 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1990 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1991 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1992
9b4c5f87
AT
19932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1994
1995 * linux-low.c (linux_look_up_symbols): Don't call
1996 linux_supports_traceclone.
1997 * linux-low.h (thread_db_init): Remove use_events argument.
1998 * thread-db.c (thread_db_use_event): Remove global variable.
1999 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2000 (struct thread_db) <td_create_bp>: Remove field.
2001 (thread_db_create_event): Remove function.
2002 (thread_db_enable_reporting): Likewise.
2003 (find_one_thread): Don't check for thread_db_use_events.
2004 (attach_thread): Likewise.
2005 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2006 (try_thread_db_load_1): Don't check for thread_db_use_events.
2007 (thread_db_init): Remove use_events argument and thread events
2008 handling.
2009 (remove_thread_event_breakpoints): Remove function.
2010 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2011
7d00775e
AT
20122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2013
2014 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2015 New function.
2016 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2017 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2018 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2019 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2020 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2021 Initialize.
2022 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2023 New function.
2024 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2025 * linux-low.c (can_hardware_single_step): Use
2026 supports_hardware_single_step.
2027 (can_software_single_step): New function.
2028 (start_step_over): Call can_software_single_step.
2029 (linux_supports_hardware_single_step): New function.
2030 (struct target_ops) <supports_software_single_step>: Initialize.
2031 * linux-low.h (struct linux_target_ops)
2032 <supports_hardware_single_step>: Initialize.
2033 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2035 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2036 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2037 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2038 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2039 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2040 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2041 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2042 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2043 Initialize.
2044 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2045 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2046 Initialize.
2047 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2048 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2049 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2050 New function.
2051 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2052 * target.h (struct target_ops): <supports_software_single_step>:
2053 New field.
2054 (target_supports_software_single_step): New macro.
2055
2d97cd35
AT
20562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2057
2058 * linux-low.c (linux_wait_1): Fix pc advance condition.
2059 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2060 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2061
769ef81f
AT
20622015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2063
2064 * linux-arm-low.c (arm_is_thumb_mode): New function.
2065 (arm_breakpoint_at): Use arm_is_thumb_mode.
2066 (arm_breakpoint_kind_from_current_state): New function.
2067 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2068 Initialize.
2069 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2070 (linux_breakpoint_kind_from_current_state): New function.
2071 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2072 * linux-low.h (struct linux_target_ops)
2073 <breakpoint_kind_from_current_state>: New field.
2074 * target.h (struct target_ops): Likewise.
2075 (target_breakpoint_kind_from_current_state): New macro.
2076
1bebeeca
PA
20772015-11-30 Pedro Alves <palves@redhat.com>
2078
2079 * linux-low.c (linux_resume): Wake up the event loop before
2080 returning.
2081
a67a9fae
PA
20822015-11-30 Pedro Alves <palves@redhat.com>
2083
2084 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2085 check.
2086 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2087 to -1.
2088 * target.c (struct thread_search): New structure.
2089 (thread_search_callback): New function.
2090 (prev_general_thread): New global.
2091 (prepare_to_access_memory, done_accessing_memory): New functions.
2092 * target.h (prepare_to_access_memory, done_accessing_memory):
2093 Replace macros with function declarations.
2094
f2faf941
PA
20952015-11-30 Pedro Alves <palves@redhat.com>
2096
2097 PR 14618
2098 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2099 report TARGET_WAITKIND_NO_RESUMED.
2100 * remote-utils.c (prepare_resume_reply): Handle
2101 TARGET_WAITKIND_NO_RESUMED.
2102 * server.c (report_no_resumed): New global.
2103 (handle_query) <qSupported>: Handle "no-resumed+". Report
2104 "no-resumed+" support.
2105 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2106 return error if the client doesn't support no-resumed events.
2107 (push_stop_notification): New function.
2108 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2109 events if the client supports them.
2110
a681f9c9
PA
21112015-11-30 Pedro Alves <palves@redhat.com>
2112
2113 * linux-low.c (thread_still_has_status_pending_p): Don't check
2114 vCont;t here.
2115 (lwp_resumed): New function.
2116 (status_pending_p_callback): Return early if the LWP is not
2117 supposed to be resumed.
2118
65706a29
PA
21192015-11-30 Pedro Alves <palves@redhat.com>
2120
2121 * linux-low.c (handle_extended_wait): Assert that the LWP's
2122 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2123 thread create events, leave the new child's status pending.
2124 (linux_low_filter_event): If GDB wants to hear about thread exit
2125 events, leave the LWP marked dead and don't delete it.
2126 (linux_wait_for_event_filtered): Don't check for thread exit.
2127 (filter_exit_event): New function.
2128 (linux_wait_1): Use it, when returning an exit event.
2129 (linux_resume_one_lwp_throw): Assert that the LWP's
2130 waitstatus is TARGET_WAITKIND_IGNORE.
2131 * remote-utils.c (prepare_resume_reply): Handle
2132 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2133 * server.c (report_thread_events): New global.
2134 (handle_general_set): Handle QThreadEvents.
2135 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2136 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2137 TARGET_WAITKIND_THREAD_EXITED.
2138 * server.h (report_thread_events): Declare.
2139
56cf4bed
PA
21402015-11-30 Pedro Alves <palves@redhat.com>
2141
2142 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2143 the thread's last_resume_kind was resume_stop.
2144
500c1d85
PA
21452015-11-30 Pedro Alves <palves@redhat.com>
2146
2147 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2148 before returning.
2149
de979965
PA
21502015-11-30 Pedro Alves <palves@redhat.com>
2151
2152 * server.c (handle_v_requests): Handle vCtrlC.
2153
34c65914
PA
21542015-11-30 Pedro Alves <palves@redhat.com>
2155
2156 * gdbthread.h (find_any_thread_of_pid): Declare.
2157 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2158 functions.
2159 * server.c (handle_query): If current_thread is NULL, look for
2160 another thread of the selected process.
2161
79efa585 21622015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2163 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2164
2165 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2166 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2167 name in reply.
2168 * target.h (struct target_ops) <thread_name>: New field.
2169 (target_thread_name): New macro.
2170
80d82c19
JB
21712015-11-23 Joel Brobecker <brobecker@adacore.com>
2172
2173 * regcache.h (regcache_invalidate_pid): Add declaration.
2174 * regcache.c (regcache_invalidate_pid): New function, extracted
2175 from regcache_invalidate.
2176 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2177 Add trivial documentation comment.
2178 * lynx-low.c: Use regcache_invalidate_pid instead of
2179 regcache_invalidate.
2180
64da5dd5
JB
21812015-11-23 Joel Brobecker <brobecker@adacore.com>
2182
2183 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2184 and Elf64_auxv_t if the target is Android.
2185
37ce4055
DE
21862015-11-22 Doug Evans <xdje42@gmail.com>
2187
2188 * target.h: #include <sys/types.h>.
2189
06e03fff
PA
21902015-11-19 Pedro Alves <palves@redhat.com>
2191
2192 * linux-low.c (linux_process_qsupported): Change prototype.
2193 Adjust.
2194 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2195 Change prototype.
2196 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2197 and adjust to loop over all features.
2198 * server.c (handle_query) <qSupported>: Adjust to call
2199 target_process_qsupported once, passing it a vector of unprocessed
2200 features.
2201 * target.h (struct target_ops) <process_qsupported>: Change
2202 prototype.
2203 (target_process_qsupported): Adjust.
2204
9a084706
PA
22052015-11-19 Pedro Alves <palves@redhat.com>
2206
2207 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2208 mode.
2209 * configure: Regenerate.
2210
dad44a1f
PA
22112015-11-19 Pedro Alves <palves@redhat.com>
2212
2213 * configure: Regenerate.
2214
231c0592
YQ
22152015-11-19 Yao Qi <yao.qi@linaro.org>
2216
2217 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2218 type to uint32_t.
2219
6c1c9a8b
YQ
22202015-11-19 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2223 (struct aarch64_operand): Move enum out.
2224
9caa3311
YQ
22252015-11-19 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2228 struct user_fpsimd_state *.
2229 (aarch64_store_fpregset): Likewise.
2230
6a69a054
YQ
22312015-11-19 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2234 struct user_pt_regs *.
2235 (aarch64_store_gregset): Likewise.
2236
1798301e
PA
22372015-11-18 Pedro Alves <palves@redhat.com>
2238
2239 * Makefile.in (all_object_files): Add $IPA_OBJS.
2240
ce7715e2
PA
22412015-11-17 Pedro Alves <palves@redhat.com>
2242
2243 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2244 GDB_SIGNAL_0 and gdb_signal_to_string.
2245
c0879059
PA
22462015-11-17 Pedro Alves <palves@redhat.com>
2247
2248 * win32-low.c (handle_output_debug_string): Remove parameter.
2249 (win32_kill): Remove our_status local and adjust call to
2250 handle_output_debug_string.
2251 (get_child_debug_event): Adjust call to
2252 handle_output_debug_string.
2253
1996e237
SM
22542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2255
2256 * linux-mips-low.c (mips_fill_gregset): Add cast.
2257 (mips_store_gregset): Likewise.
2258 (mips_fill_fpregset): Likewise.
2259 (mips_store_fpregset): Likewise.
2260
cbec665b
SM
22612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2262
2263 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2264 priv.
2265
eb3e3c67
SM
22662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2267
2268 * linux-mips-low.c (mips_linux_new_thread): Change type of
2269 watch_type to enum target_hw_bp_type.
2270
171de4b8
SM
22712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2272
2273 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2274 Change return type to arm_hwbp_type.
2275
04248ead
SM
22762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2277
2278 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2279 (arm_store_gregset): Likewise.
2280 * linux-arm-low.c (arm_get_hwcap): Likewise.
2281 (arm_read_description): Likewise.
2282
04b3479c
SM
22832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2284
2285 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2286
2bc84e8a
SM
22872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2288
2289 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2290 (ppc_fill_vsxregset): Likewise.
2291 (ppc_store_vsxregset): Likewise.
2292 (ppc_fill_vrregset): Likewise.
2293 (ppc_store_vrregset): Likewise.
2294 (ppc_fill_evrregset): Likewise.
2295 (ppc_store_evrregset): Likewise.
2296
e6c5bb05
SM
22972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * linux-ppc-low.c (ppc_usrregs_info): Remove
2300 forward-declaration.
2301 (ppc_arch_setup): Move lower in file.
2302
7ea45d72
SM
23032015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2304
2305 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2306 (ps_pdwrite): Likewise.
2307
69291610
HW
23082015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2309
2310 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2311 to after assert checks.
2312
b42945fd
SM
23132015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2314
2315 * proc-service.c (ps_pdread): Add/adjust casts.
2316 (ps_pdwrite): Add/adjust casts.
2317
d6f85c84
SM
23182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2319
2320 * server.c (handle_search_memory_1): Cast return value of
2321 memmem.
2322
f98cd059
SM
23232015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2324
2325 * server.c (write_qxfer_response): Change type of data to
2326 gdb_byte *.
2327
d2412fa5
PA
23282015-10-29 Pedro Alves <palves@redhat.com>
2329
2330 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2331
c17414a2
PA
23322015-10-29 Pedro Alves <palves@redhat.com>
2333
2334 * tracepoint.c (clear_installed_tracepoints): Add casts.
2335
e053fbc4
PA
23362015-10-29 Pedro Alves <palves@redhat.com>
2337
2338 * server.c (handle_v_cont, process_serial_event): Add enum
2339 gdb_signal casts to signal parsing code.
2340
add67df8
PA
23412015-10-29 Pedro Alves <palves@redhat.com>
2342
2343 * linux-low.h (NULL_REGSET): Define.
2344 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2345 * linux-arm-low.c (arm_regsets): Likewise.
2346 * linux-crisv32-low.c (cris_regsets): Likewise.
2347 * linux-m68k-low.c (m68k_regsets): Likewise.
2348 * linux-mips-low.c (mips_regsets): Likewise.
2349 * linux-nios2-low.c (nios2_regsets): Likewise.
2350 * linux-ppc-low.c (ppc_regsets): Likewise.
2351 * linux-s390-low.c (s390_regsets): Likewise.
2352 * linux-sh-low.c (sh_regsets): Likewise.
2353 * linux-sparc-low.c (sparc_regsets): Likewise.
2354 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2355 * linux-tile-low.c (tile_regsets): Likewise.
2356 * linux-x86-low.c (x86_regsets): Likewise.
2357 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2358
50bc912a
PA
23592015-10-29 Pedro Alves <palves@redhat.com>
2360
2361 * linux-low.h (NULL_REGSET): Define.
2362 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2363 * linux-arm-low.c (arm_regsets): Likewise.
2364 * linux-crisv32-low.c (cris_regsets): Likewise.
2365 * linux-m68k-low.c (m68k_regsets): Likewise.
2366 * linux-mips-low.c (mips_regsets): Likewise.
2367 * linux-nios2-low.c (nios2_regsets): Likewise.
2368 * linux-ppc-low.c (ppc_regsets): Likewise.
2369 * linux-s390-low.c (s390_regsets): Likewise.
2370 * linux-sh-low.c (sh_regsets): Likewise.
2371 * linux-sparc-low.c (sparc_regsets): Likewise.
2372 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2373 * linux-tile-low.c (tile_regsets): Likewise.
2374 * linux-x86-low.c (x86_regsets): Likewise.
2375 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2376
682b2546
DE
23772015-10-26 Doug Evans <dje@google.com>
2378
2379 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2380
963843d4
DE
23812015-10-26 Doug Evans <dje@google.com>
2382
2383 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2384
d41401ac
DE
23852015-10-26 Doug Evans <dje@google.com>
2386
2387 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2388 for debug_printf.
2389 (attach_thread, find_new_threads_callback): Ditto.
2390
3db28855
AT
23912015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2392
2393 * mem-break.h (set_breakpoint_data): Remove.
2394
fb78e89c
AT
23952015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2396
2397 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2398 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2399 (initialize_low): Remove set_breakpoint_data call.
2400 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2401 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2402 (initialize_low): Remove set_breakpoint_data call.
2403 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2404 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2405 (initialize_low): Remove set_breakpoint_data call.
2406
2e6ee069
AT
24072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408
2409 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2410 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2411 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2412 * target.h (target_breakpoint_kind_from_pc): New macro.
2413
1652a986
AT
24142015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2415
2416 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2417 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2418 the default breakpoint kind.
2419
abeead09
AT
24202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2421
2422 * linux-arm-low.c (arm_supports_z_point_type): Add software
2423 breakpoint support.
2424
b0b4b501
AT
24252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2426
2427 * linux-arm-low.c: Refactor breakpoint definitions.
2428 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2429 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2430
8689682c
AT
24312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2432
2433 * Makefile.in: Add arm.c/o.
2434 * configure.srv: Likewise.
2435 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2436 (arm_breakpoint_kind_from_pc): New function.
2437 (arm_sw_breakpoint_from_kind): Return proper kind.
2438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2439
27165294
AT
24402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2441
2442 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2443 removal.
2444 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2445 (struct raw_breakpoint) <size>: Remove.
2446 (struct raw_breakpoint) <kind>: Add.
2447 (bp_size): New function.
2448 (bp_opcode): Likewise.
2449 (find_raw_breakpoint_at): Adjust for kind.
2450 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2451 (remove_memory_breakpoint): Adjust for kind call bp_size.
2452 (set_raw_breakpoint_at): Adjust for kind.
2453 (set_breakpoint): Likewise.
2454 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2455 (delete_raw_breakpoint): Adjust for kind.
2456 (delete_breakpoint): Likewise.
2457 (find_gdb_breakpoint): Likewise.
2458 (set_gdb_breakpoint_1): Likewise.
2459 (set_gdb_breakpoint): Likewise.
2460 (delete_gdb_breakpoint_1): Likewise.
2461 (delete_gdb_breakpoint): Likewise.
2462 (uninsert_raw_breakpoint): Likewise.
2463 (reinsert_raw_breakpoint): Likewise.
2464 (set_breakpoint_data): Remove.
2465 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2466 (check_mem_read): Adjust for kind call bp_size.
2467 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2468 (clone_one_breakpoint): Adjust for kind.
2469 * mem-break.h (set_gdb_breakpoint): Likewise.
2470 (delete_gdb_breakpoint): Likewise.
2471 * server.c (process_serial_event): Likewise.
2472
dd373349
AT
24732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2474
2475 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2476 (struct linux_target_ops) <breakpoint>: Remove.
2477 (struct linux_target_ops) <breakpoint_len>: Remove.
2478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2480 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2481 (arm_sw_breakpoint_from_kind): New function.
2482 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2483 (struct linux_target_ops) <breakpoint>: Remove.
2484 (struct linux_target_ops) <breakpoint_len>: Remove.
2485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2487 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2488 (struct linux_target_ops) <breakpoint>: Remove.
2489 (struct linux_target_ops) <breakpoint_len>: Remove.
2490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2492 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2493 (struct linux_target_ops) <breakpoint>: Remove.
2494 (struct linux_target_ops) <breakpoint_len>: Remove.
2495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2497 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2498 and sw_breakpoint_from_kind to increment the pc.
2499 (linux_breakpoint_kind_from_pc): New function.
2500 (linux_sw_breakpoint_from_kind): New function.
2501 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2502 (initialize_low): Call breakpoint_kind_from_pc and
2503 sw_breakpoint_from_kind to replace breakpoint_data/len.
2504 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2505 New field.
2506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2507 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2508 (struct linux_target_ops) <breakpoint>: Remove.
2509 (struct linux_target_ops) <breakpoint_len>: Remove.
2510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2512 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2513 (struct linux_target_ops) <breakpoint>: Remove.
2514 (struct linux_target_ops) <breakpoint_len>: Remove.
2515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2517 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2518 (struct linux_target_ops) <breakpoint>: Remove.
2519 (struct linux_target_ops) <breakpoint_len>: Remove.
2520 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2521 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2522 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2523 (struct linux_target_ops) <breakpoint>: Remove.
2524 (struct linux_target_ops) <breakpoint_len>: Remove.
2525 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2526 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2527 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2528 (struct linux_target_ops) <breakpoint>: Remove.
2529 (struct linux_target_ops) <breakpoint_len>: Remove.
2530 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2532 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2533 (struct linux_target_ops) <breakpoint>: Remove.
2534 (struct linux_target_ops) <breakpoint_len>: Remove.
2535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2537 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2538 (struct linux_target_ops) <breakpoint>: Remove.
2539 (struct linux_target_ops) <breakpoint_len>: Remove.
2540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2542 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2543 (struct linux_target_ops) <breakpoint>: Remove.
2544 (struct linux_target_ops) <breakpoint_len>: Remove.
2545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2547 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2548 (struct linux_target_ops) <breakpoint>: Remove.
2549 (struct linux_target_ops) <breakpoint_len>: Remove.
2550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2552 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2553 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2554 (struct linux_target_ops) <breakpoint>: Remove.
2555 (struct linux_target_ops) <breakpoint_len>: Remove.
2556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2558 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2559 (struct linux_target_ops) <breakpoint>: Remove.
2560 (struct linux_target_ops) <breakpoint_len>: Remove.
2561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2563
4cd98a19
AT
25642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2565
2566 * linux-cris-low.c (cris_get_pc): Remove void arg.
2567
774ee6d2
AR
25682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2569
2570 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2571 variable name.
2572
833dcd29
AR
25732015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2574
2575 * inferiors.c (thread_pid_matches_callback): New function.
2576 (find_thread_process): New function.
2577 (remove_thread): Reset current_thread.
2578 (remove_process): Assert threads have been removed first.
2579
8d689ee5
YQ
25802015-10-15 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2583 if it is 3.
2584 (aarch64_remove_point): Likewise.
2585 * regcache.c (regcache_register_size): New function.
2586
1c2e1515
YQ
25872015-10-12 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-aarch64-low.c: Update all callers as emit_load_store
2590 is renamed to aarch64_emit_load_store.
2591
e1c587c3
YQ
25922015-10-12 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-aarch64-low.c: Update all callers of function renaming
2595 from emit_insn to aarch64_emit_insn.
2596
b6542f81
YQ
25972015-10-12 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2600 arch/aarch64-insn.h.
2601 (struct aarch64_memory_operand): Likewise.
2602 (ENCODE): Likewise.
2603 (emit_insn): Move to arch/aarch64-insn.c.
2604 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2605 (emit_load_store): Move to arch/aarch64-insn.c.
2606 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2607 (can_encode_int32): Remove.
2608
246994ce
YQ
26092015-10-12 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2612 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2613 (aarch64_relocate_instruction): Likewise.
2614 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2615 (struct aarch64_insn_visitor): Likewise.
2616
0badd99f
YQ
26172015-10-12 Yao Qi <yao.qi@linaro.org>
2618
2619 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2620 (struct aarch64_insn_visitor): New.
2621 (struct aarch64_insn_relocation_data): New.
2622 (aarch64_ftrace_insn_reloc_b): New function.
2623 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2624 (aarch64_ftrace_insn_reloc_cb): Likewise.
2625 (aarch64_ftrace_insn_reloc_tb): Likewise.
2626 (aarch64_ftrace_insn_reloc_adr): Likewise.
2627 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2628 (aarch64_ftrace_insn_reloc_others): Likewise.
2629 (visitor): New.
2630 (aarch64_relocate_instruction): Use visitor.
2631
dfaffe9d
YQ
26322015-10-12 Yao Qi <yao.qi@linaro.org>
2633
2634 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2635 int. Add argument buf.
2636 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2637 aarch64_relocate_instruction.
2638
70b439f0
YQ
26392015-10-12 Yao Qi <yao.qi@linaro.org>
2640
2641 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2642 argument insn. Remove local variable insn. Don't call
2643 target_read_uint32.
2644 (aarch64_install_fast_tracepoint_jump_pad): Call
2645 target_read_uint32.
2646
7781c06f
YQ
26472015-09-30 Yao Qi <yao.qi@linaro.org>
2648
2649 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2650 (emit_load_store_pair): Likewise.
2651
9a3c8263
SM
26522015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * dll.c (match_dll): Add cast(s).
2655 (unloaded_dll): Likewise.
2656 * linux-low.c (second_thread_of_pid_p): Likewise.
2657 (delete_lwp_callback): Likewise.
2658 (count_events_callback): Likewise.
2659 (select_event_lwp_callback): Likewise.
2660 (linux_set_resume_request): Likewise.
2661 * server.c (accumulate_file_name_length): Likewise.
2662 (emit_dll_description): Likewise.
2663 (handle_qxfer_threads_worker): Likewise.
2664 (visit_actioned_threads): Likewise.
2665 * thread-db.c (any_thread_of): Likewise.
2666 * tracepoint.c (same_process_p): Likewise.
2667 (match_blocktype): Likewise.
2668 (build_traceframe_info_xml): Likewise.
2669
224c3ddb
SM
26702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2671
2672 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2673 assignment.
2674 (gdb_unparse_agent_expr): Likewise.
2675 * hostio.c (require_data): Likewise.
2676 (handle_pread): Likewise.
2677 * linux-low.c (disable_regset): Likewise.
2678 (fetch_register): Likewise.
2679 (store_register): Likewise.
2680 (get_dynamic): Likewise.
2681 (linux_qxfer_libraries_svr4): Likewise.
2682 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2683 (set_fast_tracepoint_jump): Likewise.
2684 (uninsert_fast_tracepoint_jumps_at): Likewise.
2685 (reinsert_fast_tracepoint_jumps_at): Likewise.
2686 (validate_inserted_breakpoint): Likewise.
2687 (clone_agent_expr): Likewise.
2688 * regcache.c (init_register_cache): Likewise.
2689 * remote-utils.c (putpkt_binary_1): Likewise.
2690 (decode_M_packet): Likewise.
2691 (decode_X_packet): Likewise.
2692 (look_up_one_symbol): Likewise.
2693 (relocate_instruction): Likewise.
2694 (monitor_output): Likewise.
2695 * server.c (handle_search_memory): Likewise.
2696 (handle_qxfer_exec_file): Likewise.
2697 (handle_qxfer_libraries): Likewise.
2698 (handle_qxfer): Likewise.
2699 (handle_query): Likewise.
2700 (handle_v_cont): Likewise.
2701 (handle_v_run): Likewise.
2702 (captured_main): Likewise.
2703 * target.c (write_inferior_memory): Likewise.
2704 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2705 * tracepoint.c (init_trace_buffer): Likewise.
2706 (add_tracepoint_action): Likewise.
2707 (add_traceframe): Likewise.
2708 (add_traceframe_block): Likewise.
2709 (cmd_qtdpsrc): Likewise.
2710 (cmd_qtdv): Likewise.
2711 (cmd_qtstatus): Likewise.
2712 (response_source): Likewise.
2713 (response_tsv): Likewise.
2714 (cmd_qtnotes): Likewise.
2715 (gdb_collect): Likewise.
2716 (initialize_tracepoint): Likewise.
2717
afbe19f8
PL
27182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2719
2720 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2721 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2722 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2723 <NOP>: New.
2724 (enum aarch64_condition_codes): New enum.
2725 (w0): New static global.
2726 (fp): Likewise.
2727 (lr): Likewise.
2728 (struct aarch64_memory_operand) <type>: New
2729 MEMORY_OPERAND_POSTINDEX type.
2730 (postindex_memory_operand): New helper function.
2731 (emit_ret): New function.
2732 (emit_load_store_pair): New function, factored out of emit_stp
2733 with support for MEMORY_OPERAND_POSTINDEX.
2734 (emit_stp): Rewrite using emit_load_store_pair.
2735 (emit_ldp): New function.
2736 (emit_load_store): Likewise.
2737 (emit_ldr): Mention post-index instruction in comment.
2738 (emit_ldrh): New function.
2739 (emit_ldrb): New function.
2740 (emit_ldrsw): Mention post-index instruction in comment.
2741 (emit_str): Likewise.
2742 (emit_subs): New function.
2743 (emit_cmp): Likewise.
2744 (emit_and): Likewise.
2745 (emit_orr): Likewise.
2746 (emit_orn): Likewise.
2747 (emit_eor): Likewise.
2748 (emit_mvn): Likewise.
2749 (emit_lslv): Likewise.
2750 (emit_lsrv): Likewise.
2751 (emit_asrv): Likewise.
2752 (emit_mul): Likewise.
2753 (emit_sbfm): Likewise.
2754 (emit_sbfx): Likewise.
2755 (emit_ubfm): Likewise.
2756 (emit_ubfx): Likewise.
2757 (emit_csinc): Likewise.
2758 (emit_cset): Likewise.
2759 (emit_nop): Likewise.
2760 (emit_ops_insns): New helper function.
2761 (emit_pop): Likewise.
2762 (emit_push): Likewise.
2763 (aarch64_emit_prologue): New function.
2764 (aarch64_emit_epilogue): Likewise.
2765 (aarch64_emit_add): Likewise.
2766 (aarch64_emit_sub): Likewise.
2767 (aarch64_emit_mul): Likewise.
2768 (aarch64_emit_lsh): Likewise.
2769 (aarch64_emit_rsh_signed): Likewise.
2770 (aarch64_emit_rsh_unsigned): Likewise.
2771 (aarch64_emit_ext): Likewise.
2772 (aarch64_emit_log_not): Likewise.
2773 (aarch64_emit_bit_and): Likewise.
2774 (aarch64_emit_bit_or): Likewise.
2775 (aarch64_emit_bit_xor): Likewise.
2776 (aarch64_emit_bit_not): Likewise.
2777 (aarch64_emit_equal): Likewise.
2778 (aarch64_emit_less_signed): Likewise.
2779 (aarch64_emit_less_unsigned): Likewise.
2780 (aarch64_emit_ref): Likewise.
2781 (aarch64_emit_if_goto): Likewise.
2782 (aarch64_emit_goto): Likewise.
2783 (aarch64_write_goto_address): Likewise.
2784 (aarch64_emit_const): Likewise.
2785 (aarch64_emit_call): Likewise.
2786 (aarch64_emit_reg): Likewise.
2787 (aarch64_emit_pop): Likewise.
2788 (aarch64_emit_stack_flush): Likewise.
2789 (aarch64_emit_zero_ext): Likewise.
2790 (aarch64_emit_swap): Likewise.
2791 (aarch64_emit_stack_adjust): Likewise.
2792 (aarch64_emit_int_call_1): Likewise.
2793 (aarch64_emit_void_call_2): Likewise.
2794 (aarch64_emit_eq_goto): Likewise.
2795 (aarch64_emit_ne_goto): Likewise.
2796 (aarch64_emit_lt_goto): Likewise.
2797 (aarch64_emit_le_goto): Likewise.
2798 (aarch64_emit_gt_goto): Likewise.
2799 (aarch64_emit_ge_got): Likewise.
2800 (aarch64_emit_ops_impl): New static global variable.
2801 (aarch64_emit_ops): New target function, return
2802 &aarch64_emit_ops_impl.
2803 (struct linux_target_ops): Install it.
2804
bb903df0
PL
28052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2806
2807 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2808 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2809 aarch64-ipa.o.
2810 * linux-aarch64-ipa.c: New file.
2811 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2812 and endian.h.
2813 (aarch64_get_thread_area): New target method.
2814 (extract_signed_bitfield): New helper function.
2815 (aarch64_decode_ldr_literal): New function.
2816 (enum aarch64_opcodes): New enum.
2817 (struct aarch64_register): New struct.
2818 (struct aarch64_operand): New struct.
2819 (x0): New static global.
2820 (x1): Likewise.
2821 (x2): Likewise.
2822 (x3): Likewise.
2823 (x4): Likewise.
2824 (w2): Likewise.
2825 (ip0): Likewise.
2826 (sp): Likewise.
2827 (xzr): Likewise.
2828 (aarch64_register): New helper function.
2829 (register_operand): Likewise.
2830 (immediate_operand): Likewise.
2831 (struct aarch64_memory_operand): New struct.
2832 (offset_memory_operand): New helper function.
2833 (preindex_memory_operand): Likewise.
2834 (enum aarch64_system_control_registers): New enum.
2835 (ENCODE): New macro.
2836 (emit_insn): New helper function.
2837 (emit_b): New function.
2838 (emit_bcond): Likewise.
2839 (emit_cb): Likewise.
2840 (emit_tb): Likewise.
2841 (emit_blr): Likewise.
2842 (emit_stp): Likewise.
2843 (emit_ldp_q_offset): Likewise.
2844 (emit_stp_q_offset): Likewise.
2845 (emit_load_store): Likewise.
2846 (emit_ldr): Likewise.
2847 (emit_ldrsw): Likewise.
2848 (emit_str): Likewise.
2849 (emit_ldaxr): Likewise.
2850 (emit_stxr): Likewise.
2851 (emit_stlr): Likewise.
2852 (emit_data_processing_reg): Likewise.
2853 (emit_data_processing): Likewise.
2854 (emit_add): Likewise.
2855 (emit_sub): Likewise.
2856 (emit_mov): Likewise.
2857 (emit_movk): Likewise.
2858 (emit_mov_addr): Likewise.
2859 (emit_mrs): Likewise.
2860 (emit_msr): Likewise.
2861 (emit_sevl): Likewise.
2862 (emit_wfe): Likewise.
2863 (append_insns): Likewise.
2864 (can_encode_int32_in): New helper function.
2865 (aarch64_relocate_instruction): New function.
2866 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2867 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2868 (struct linux_target_ops): Install aarch64_get_thread_area,
2869 aarch64_install_fast_tracepoint_jump_pad and
2870 aarch64_get_min_fast_tracepoint_insn_len.
2871
787749ea
PL
28722015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2873
2874 * Makefile.in (aarch64-insn.o): New rule.
2875 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2876
9812b2e6
YQ
28772015-09-21 Yao Qi <yao.qi@linaro.org>
2878
2879 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2880
18fe412b
YQ
28812015-09-21 Yao Qi <yao.qi@linaro.org>
2882
2883 * tracepoint.c (max_jump_pad_size): Remove.
2884
a0cc84cd
YQ
28852015-09-18 Yao Qi <yao.qi@linaro.org>
2886
2887 * linux-aarch64-low.c: Don't include sys/uio.h.
2888 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2889
d78908cf
WW
28902015-09-16 Wei-cheng Wang <cole945@gmail.com>
2891
2892 * tracepoint.c (eval_result_type): Change prototype.
2893 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2894
d57e0d50
PA
28952015-09-15 Pedro Alves <palves@redhat.com>
2896
2897 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2898 Check whether to report exec events instead of checking whether
2899 multiprocess is enabled.
2900
5a676acc
PA
29012015-09-15 Pedro Alves <palves@redhat.com>
2902
2903 PR remote/18965
2904 * remote-utils.c (prepare_resume_reply): Merge
2905 TARGET_WAITKIND_VFORK_DONE switch case with the
2906 TARGET_WAITKIND_FORKED case.
2907
7c5d0fad
YQ
29082015-09-15 Yao Qi <yao.qi@linaro.org>
2909
2910 * server.c (handle_query): Check string comparison using
2911 "else if" instead of "if".
2912
750ce8d1
YQ
29132015-09-15 Yao Qi <yao.qi@linaro.org>
2914
2915 * server.c (vCont_supported): New global variable.
2916 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2917 matches. Append ";vContSupported+" to own_buf.
2918 (handle_v_requests): Append ";s;S" to own_buf if target supports
2919 hardware single step or vCont_supported is false.
2920 (capture_main): Set vCont_supported to zero.
2921
70b90b91
YQ
29222015-09-15 Yao Qi <yao.qi@linaro.org>
2923
2924 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2925 it to ...
2926 (linux_supports_hardware_single_step): ... New function.
2927 (linux_target_ops): Update.
2928 * lynx-low.c (lynx_target_ops): Set field
2929 supports_hardware_single_step to target_can_do_hardware_single_step.
2930 * nto-low.c (nto_target_ops): Likewise.
2931 * spu-low.c (spu_target_ops): Likewise.
2932 * win32-low.c (win32_target_ops): Likewise.
2933 * target.c (target_can_do_hardware_single_step): New function.
2934 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2935 Remove. <supports_hardware_single_step>: New field.
2936 (target_supports_conditional_breakpoints): Remove.
2937 (target_supports_hardware_single_step): New macro.
2938 (target_can_do_hardware_single_step): Declare.
2939 * server.c (handle_query): Use target_supports_hardware_single_step
2940 instead of target_supports_conditional_breakpoints.
2941
ade90bde
YQ
29422015-09-15 Yao Qi <yao.qi@linaro.org>
2943
2944 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2945 function.
2946 (struct linux_target_ops the_low_target): Install
2947 aarch64_linux_siginfo_fixup.
2948
94585166
DB
29492015-09-11 Don Breazeal <donb@codesourcery.com>
2950 Luis Machado <lgustavo@codesourcery.com>
2951
2952 * linux-low.c (linux_mourn): Static declaration.
2953 (linux_arch_setup): Move in front of
2954 handle_extended_wait.
2955 (linux_arch_setup_thread): New function.
2956 (handle_extended_wait): Handle exec events. Call
2957 linux_arch_setup_thread. Make event_lwp argument a
2958 pointer-to-a-pointer.
2959 (check_zombie_leaders): Do not check stopped threads.
2960 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2961 (linux_low_filter_event): Add lwp and thread for exec'ing
2962 non-leader thread if leader thread has been deleted.
2963 Refactor code into linux_arch_setup_thread and call it.
2964 Pass child lwp pointer by reference to handle_extended_wait.
2965 (linux_wait_for_event_filtered): Update comment.
2966 (linux_wait_1): Prevent clobbering exec event status.
2967 (linux_supports_exec_events): New function.
2968 (linux_target_ops) <supports_exec_events>: Initialize new member.
2969 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2970 new member.
2971 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2972 * server.c (report_exec_events): New global variable.
2973 (handle_query): Handle qSupported query for exec-events feature.
2974 (captured_main): Initialize report_exec_events.
2975 * server.h (report_exec_events): Declare new global variable.
2976 * target.h (struct target_ops) <supports_exec_events>: New
2977 member.
2978 (target_supports_exec_events): New macro.
2979 * win32-low.c (win32_target_ops) <supports_exec_events>:
2980 Initialize new member.
2981
0568462b
MM
29822015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2983
2984 * linux-low.c (linux_low_enable_btrace): Remove.
2985 (linux_target_ops): Replace linux_low_enable_btrace with
2986 linux_enable_btrace.
2987
39edd165
YQ
29882015-09-03 Yao Qi <yao.qi@linaro.org>
2989
2990 * linux-aarch64-low.c (aarch64_insert_point): Call
2991 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2992 returns true.
2993
1db33b5a
UW
29942015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2995
2996 * linux-low.c (check_stopped_by_breakpoint): Use
2997 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2998
ab290430
PA
29992015-08-27 Pedro Alves <palves@redhat.com>
3000
3001 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3002
8d749320
SM
30032015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3004
6711b7f8
SM
3005 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3006 the XNEW-family equivalent.
8d749320
SM
3007 (compile_bytecodes): Likewise.
3008 * dll.c (loaded_dll): Likewise.
3009 * event-loop.c (append_callback_event): Likewise.
3010 (create_file_handler): Likewise.
3011 (create_file_event): Likewise.
3012 * hostio.c (handle_open): Likewise.
3013 * inferiors.c (add_thread): Likewise.
3014 (add_process): Likewise.
3015 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3016 * linux-arm-low.c (arm_new_process): Likewise.
3017 (arm_new_thread): Likewise.
3018 * linux-low.c (add_to_pid_list): Likewise.
3019 (linux_add_process): Likewise.
3020 (handle_extended_wait): Likewise.
3021 (add_lwp): Likewise.
3022 (enqueue_one_deferred_signal): Likewise.
3023 (enqueue_pending_signal): Likewise.
3024 (linux_resume_one_lwp_throw): Likewise.
3025 (linux_resume_one_thread): Likewise.
3026 (linux_read_memory): Likewise.
3027 (linux_write_memory): Likewise.
3028 * linux-mips-low.c (mips_linux_new_process): Likewise.
3029 (mips_linux_new_thread): Likewise.
3030 (mips_add_watchpoint): Likewise.
3031 * linux-x86-low.c (initialize_low_arch): Likewise.
3032 * lynx-low.c (lynx_add_process): Likewise.
3033 * mem-break.c (set_raw_breakpoint_at): Likewise.
3034 (set_breakpoint): Likewise.
3035 (add_condition_to_breakpoint): Likewise.
3036 (add_commands_to_breakpoint): Likewise.
3037 (clone_agent_expr): Likewise.
3038 (clone_one_breakpoint): Likewise.
3039 * regcache.c (new_register_cache): Likewise.
3040 * remote-utils.c (look_up_one_symbol): Likewise.
3041 * server.c (queue_stop_reply): Likewise.
3042 (start_inferior): Likewise.
3043 (queue_stop_reply_callback): Likewise.
3044 (handle_target_event): Likewise.
3045 * spu-low.c (fetch_ppc_memory): Likewise.
3046 (store_ppc_memory): Likewise.
3047 * target.c (set_target_ops): Likewise.
3048 * thread-db.c (thread_db_load_search): Likewise.
3049 (try_thread_db_load_1): Likewise.
3050 * tracepoint.c (add_tracepoint): Likewise.
3051 (add_tracepoint_action): Likewise.
3052 (create_trace_state_variable): Likewise.
3053 (cmd_qtdpsrc): Likewise.
3054 (cmd_qtro): Likewise.
3055 (add_while_stepping_state): Likewise.
3056 * win32-low.c (child_add_thread): Likewise.
3057 (get_image_name): Likewise.
3058
ed8b7b42
YQ
30592015-08-25 Yao Qi <yao.qi@linaro.org>
3060
3061 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3062
db3cb7cb
YQ
30632015-08-25 Yao Qi <yao.qi@linaro.org>
3064
3065 * Makefile.in (aarch64-linux.o): New rule.
3066 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3067 srv_tgtobj.
3068 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3069 (aarch64_init_debug_reg_state): Make it extern.
3070 (aarch64_linux_prepare_to_resume): Remove.
3071
f6011a1c
YQ
30722015-08-25 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3075 lwp_arch_private_info and ptid_of_lwp.
3076
88e2cf7e
YQ
30772015-08-25 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3080 Find proc_info by find_process_pid. All callers updated.
3081
5e35436e
YQ
30822015-08-25 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3085 Remove.
3086 (debug_reg_change_callback): Remove.
3087 (aarch64_notify_debug_reg_change): Remove.
3088
4a8a7965
YQ
30892015-08-25 Yao Qi <yao.qi@linaro.org>
3090
3091 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3092 Call current_lwp_ptid.
3093
32a271ee
YQ
30942015-08-25 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-aarch64-low.c (debug_reg_change_callback): Use
3097 debug_printf.
3098
0d51c8d7
YQ
30992015-08-25 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3102
31a43dd5
YQ
31032015-08-25 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3106
8ee52567
YQ
31072015-08-25 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3110 the code.
3111
ff3f0f45
YQ
31122015-08-25 Yao Qi <yao.qi@linaro.org>
3113
3114 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3115 Remove.
3116 (debug_reg_change_callback): Remove argument entry and add argument
3117 lwp. Remove local variable thread. Don't print thread id in the
3118 debugging output. Don't check whether pid of thread equals to pid.
3119 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3120 iterate_over_lwps instead find_inferior.
3121
3d40fbb5
PA
31222015-08-24 Pedro Alves <palves@redhat.com>
3123
3124 * inferiors.c (get_first_process): New function.
3125 * inferiors.h (get_first_process): New declaration.
3126 * remote-utils.c (read_ptid): Default to the first process in the
3127 list, instead of to the current thread's process.
3128
438e1e42
PA
31292015-08-24 Pedro Alves <palves@redhat.com>
3130
3131 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3132 * event-loop.c: Likewise.
3133 * remote-utils.c: Likewise.
3134 * tracepoint.c: Likewise.
3135
a8c6d4fc
PA
31362015-08-24 Pedro Alves <palves@redhat.com>
3137
3138 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3139 ptid_get_lwp.
3140
99b0bb12
PA
31412015-08-21 Pedro Alves <palves@redhat.com>
3142
3143 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3144 instead of literal 1.
3145
f8904751
PA
31462015-08-21 Pedro Alves <palves@redhat.com>
3147
3148 * tdesc.c (default_description): Explicitly zero-initialize.
3149
465a859e
PA
31502015-08-21 Pedro Alves <palves@redhat.com>
3151
3152 PR gdb/18749
3153 * inferiors.c (remove_thread): Discard any pending stop reply for
3154 this thread.
3155 * server.c (remove_all_on_match_pid): Rename to ...
3156 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3157 instead of a pid.
3158 (discard_queued_stop_replies): Change parameter to a ptid. Now
3159 extern.
3160 (handle_v_kill, kill_inferior_callback, captured_main)
3161 (process_serial_event): Adjust.
3162 * server.h (discard_queued_stop_replies): Declare.
3163
f0db101d
PA
31642015-08-21 Pedro Alves <palves@redhat.com>
3165
3166 * linux-low.c (wait_for_sigstop): Always switch to no thread
3167 selected if the previously current thread dies.
3168 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3169 process instead of the current thread's.
3170 * remote-utils.c (input_interrupt): Don't check if there's no
3171 current thread.
3172 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3173 current thread to the general thread fails, error out.
3174 (handle_qxfer_auxv, handle_qxfer_libraries)
3175 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3176 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3177 (handle_query): Check if there's a thread selected instead of
3178 checking whether there's any thread in the thread list.
3179 (handle_qxfer_threads, handle_qxfer_btrace)
3180 (handle_qxfer_btrace_conf): Don't error out early if there's no
3181 thread in the thread list.
3182 (handle_v_cont, myresume): Don't set the current thread to the
3183 continue thread.
3184 (process_serial_event) <Hg handling>: Also set thread_id if the
3185 previous general thread is still alive.
3186 (process_serial_event) <g/G handling>: If setting the current
3187 thread to the general thread fails, error out.
3188 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3189 thread's lwp instead of the current thread's.
3190 * target.c (set_desired_thread): If the desired thread was not
3191 found, leave the current thread pointing to NULL. Return an int
3192 (boolean) indicating success.
3193 * target.h (set_desired_thread): Change return type to int.
3194
40045d91
MF
31952015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3196
3197 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3198 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3199 #includes.
3200 (ps_get_thread_area): New function.
3201
45face3b
GB
32022015-08-19 Gary Benson <gbenson@redhat.com>
3203
3204 * hostio.c (handle_pread): Do not attempt to read more data
3205 than hostio_reply_with_data can fit in a packet.
3206
16d5f642
JB
32072015-08-18 Joel Brobecker <brobecker@adacore.com>
3208
3209 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3210
a738da3a
MF
32112015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3212
3213 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3214
33ebda9d
PA
32152015-08-06 Pedro Alves <palves@redhat.com>
3216
3217 * tracepoint.c (expr_eval_result): Now an int.
3218
a44892be
PA
32192015-08-06 Pedro Alves <palves@redhat.com>
3220
3221 * gdbthread.h (struct regcache): Forward declare.
3222 (struct thread_info) <regcache_data>: Now a struct regcache
3223 pointer.
3224 * inferiors.c (inferior_regcache_data)
3225 (set_inferior_regcache_data): Now work with struct regcache
3226 pointers.
3227 * inferiors.h (struct regcache): Forward declare.
3228 (inferior_regcache_data, set_inferior_regcache_data): Now work
3229 with struct regcache pointers.
3230 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3231 (free_register_cache_thread): Remove struct regcache pointer
3232 casts.
3233
608a1e46
PA
32342015-08-06 Pedro Alves <palves@redhat.com>
3235
3236 * server.c (captured_main): On error, print the exception message
3237 to stderr, and if run_once is set, throw a quit.
3238
f0ce0d3a
PA
32392015-08-06 Pedro Alves <palves@redhat.com>
3240
3241 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3242 the current thread.
3243
bf47e248
PA
32442015-08-06 Pedro Alves <palves@redhat.com>
3245
3246 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3247 reading beyond the passed in buffer length.
3248
b6b9ffcc
PL
32492015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3250
3251 * tracepoint.c (symbol_list) <required>: Remove.
3252
863d01bd
PA
32532015-08-06 Pedro Alves <palves@redhat.com>
3254
3255 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3256 count if stopping and suspending threads.
3257 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3258 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3259 (linux_detach): Complete an ongoing step-over.
3260 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3261 throughout.
3262 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3263 (linux_wait_1): If passing a signal to the inferior after
3264 finishing a step-over, unsuspend and re-resume all lwps. If we
3265 see a single-step event but the thread should be continuing, don't
3266 pass the trap to gdb.
3267 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3268 internal_error instead of gdb_assert.
3269 (enqueue_pending_signal): New function.
3270 (check_ptrace_stopped_lwp_gone): Add debug output.
3271 (start_step_over): Use internal_error instead of gdb_assert.
3272 (complete_ongoing_step_over): New function.
3273 (linux_resume_one_thread): Don't resume a suspended thread.
3274 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3275 it stepping.
3276
00db26fa
PA
32772015-08-06 Pedro Alves <palves@redhat.com>
3278
3279 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3280 (linux_thread_alive): Use lwp_is_marked_dead.
3281 (extended_event_reported): Delete.
3282 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3283 instead of extended_event_reported.
3284 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3285 as well.
3286 (lwp_is_marked_dead): New function.
3287 (lwp_running): Use lwp_is_marked_dead.
3288 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3289 comment.
3290
ad071a30
PA
32912015-08-06 Pedro Alves <palves@redhat.com>
3292
3293 * linux-low.c (linux_wait_1): Move fork event output out of the
3294 !report_to_gdb check. Pass event_child->waitstatus to
3295 target_waitstatus_to_string instead of ourstatus.
3296
524b57e6
YQ
32972015-08-04 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3300 if current_thread is 32 bit.
3301
6085d6f6
YQ
33022015-08-04 Yao Qi <yao.qi@linaro.org>
3303
3304 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3305 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3306 * server.c (extended_protocol): Remove "static".
3307 * server.h (extended_protocol): Declare it.
3308
8a7e4587
YQ
33092015-08-04 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3312 both aarch64 and aarch32.
3313 (aarch64_set_pc): Likewise.
3314
3b53ae99
YQ
33152015-08-04 Yao Qi <yao.qi@linaro.org>
3316
3317 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3318 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3319 arm-with-neon.xml to srv_xmlfiles.
3320 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3321 (is_64bit_tdesc): New function.
3322 (aarch64_linux_read_description): New function.
3323 (aarch64_arch_setup): Call aarch64_linux_read_description.
3324 (regs_info): Rename to regs_info_aarch64.
3325 (aarch64_regs_info): Return right regs_info.
3326 (initialize_low_arch): Call initialize_low_arch_aarch32.
3327
bd9e6534
YQ
33282015-08-04 Yao Qi <yao.qi@linaro.org>
3329
3330 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3331 * linux-aarch32-low.c: New file.
3332 * linux-aarch32-low.h: New file.
3333 * linux-arm-low.c (arm_fill_gregset): Move it to
3334 linux-aarch32-low.c.
3335 (arm_store_gregset): Likewise.
3336 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3337 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3338 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3339 (regs_info): Rename to regs_info_arm.
3340 (arm_regs_info): Return regs_info_aarch32 if
3341 have_ptrace_getregset is 1 and target description is
3342 arm_with_neon or arm_with_vfpv3.
3343 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3344 Call initialize_low_arch_aarch32 instead.
3345
ded48a5e
YQ
33462015-08-04 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3349 * linux-low.c: ... here.
3350 * linux-low.h (have_ptrace_getregset): Declare it.
3351
96e9210f
PA
33522015-08-04 Pedro Alves <palves@redhat.com>
3353
3354 * thread-db.c (struct thread_db): Use new typedefs.
3355 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3356 CHK calls.
3357 (disable_thread_event_reporting): Cast result of dlsym to
3358 destination function pointer type.
3359 (thread_db_mourn): Use td_ta_delete_ftype.
3360
af60a1ef
SL
33612015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3362
3363 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3364 arch variant.
3365 (CDX_BREAKPOINT): Define for R2.
3366 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3367 (the_low_target): Add comments.
3368
e8b41681
YQ
33692015-07-30 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-arm-low.c (arm_hwcap): Remove it.
3372 (arm_read_description): New local variable arm_hwcap. Don't
3373 set arm_hwcap to zero.
3374
89abb039
YQ
33752015-07-30 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3378 Use regcache->tdesc instead.
3379 (arm_store_wmmxregset): Likewise.
3380 (arm_fill_vfpregset): Likewise.
3381 (arm_store_vfpregset): Likewise.
3382
deca266c
YQ
33832015-07-30 Yao Qi <yao.qi@linaro.org>
3384
3385 * linux-arm-low.c: Include arch/arm.h.
3386 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3387 (arm_store_gregset): Likewise.
3388
aa58a496
SM
33892015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3390
3391 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3392 ptrace's 4th parameter.
3393
50904b25
YQ
33942015-07-27 Yao Qi <yao.qi@linaro.org>
3395
3396 * configure.srv (case aarch64*-*-linux*): Don't set
3397 srv_linux_usrregs.
3398
5826e159
PA
33992015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3400
3401 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3402 sys/ptrace.h.
3403 * linux-arm-low.c: Likewise.
3404 * linux-cris-low.c: Likewise.
3405 * linux-crisv32-low.c: Likewise.
3406 * linux-low.c: Likewise.
3407 * linux-m68k-low.c: Likewise.
3408 * linux-mips-low.c: Likewise.
3409 * linux-nios2-low.c: Likewise.
3410 * linux-s390-low.c: Likewise.
3411 * linux-sparc-low.c: Likewise.
3412 * linux-tic6x-low.c: Likewise.
3413 * linux-tile-low.c: Likewise.
3414 * linux-x86-low.c: Likewise.
3415
54019719
PA
34162015-07-24 Pedro Alves <palves@redhat.com>
3417
3418 * config.in: Regenerate.
3419 * configure: Regenerate.
3420
eb7aa561
PA
34212015-07-24 Pedro Alves <palves@redhat.com>
3422
3423 * acinclude.m4: Include ../ptrace.m4.
3424 * configure.ac: Call GDB_AC_PTRACE.
3425 * config.in, configure: Regenerate.
3426
55d7b841
YQ
34272015-07-24 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-low.c (linux_create_inferior): Remove setting to
3430 proc->priv->new_inferior.
3431 (linux_attach): Likewise.
3432 (linux_low_filter_event): Likewise.
3433 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3434
c06cbd92
YQ
34352015-07-24 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-low.c (linux_arch_setup): New function.
3438 (linux_low_filter_event): If proc->tdesc is NULL and
3439 proc->attached is true, call the_low_target.arch_setup.
3440 Otherwise, keep status pending, and return.
3441 (linux_resume_one_lwp_throw): Don't call get_pc if
3442 thread->while_stepping isn't NULL. Don't call
3443 get_thread_regcache if proc->tdesc is NULL.
3444 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3445 (linux_target_ops): Install arch_setup.
3446 * server.c (start_inferior): Call the_target->arch_setup.
3447 * target.h (struct target_ops) <arch_setup>: New field.
3448 (target_arch_setup): New marco.
3449 * lynx-low.c (lynx_target_ops): Update.
3450 * nto-low.c (nto_target_ops): Update.
3451 * spu-low.c (spu_target_ops): Update.
3452 * win32-low.c (win32_target_ops): Update.
3453
5ae3ebba
YQ
34542015-07-24 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-low.c (linux_add_process): Don't set
3457 proc->priv->new_inferior.
3458 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3459 (linux_attach): Likewise.
3460
eb97750b
YQ
34612015-07-24 Yao Qi <yao.qi@linaro.org>
3462
3463 * server.c (start_inferior): Code refactor.
3464
51aee833
YQ
34652015-07-24 Yao Qi <yao.qi@linaro.org>
3466
3467 * server.c (process_serial_event): Set general_thread.
3468
af1b22f3
YQ
34692015-07-21 Yao Qi <yao.qi@linaro.org>
3470
3471 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3472 aarch64_linux_get_debug_reg_capacity.
3473
554717a3
YQ
34742015-07-17 Yao Qi <yao.qi@linaro.org>
3475
3476 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3477 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3478 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3479 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3480 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3481 (AARCH64_HWP_ALIGNMENT): Likewise.
3482 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3483 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3484 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3485 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3486 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3487 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3488 (struct aarch64_debug_reg_state): Likewise.
3489 (struct arch_lwp_info): Likewise.
3490 (aarch64_align_watchpoint): Likewise.
3491 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3492 (aarch64_watchpoint_length): Likewise.
3493 (aarch64_point_encode_ctrl_reg): Likewise
3494 (aarch64_point_is_aligned): Likewise.
3495 (aarch64_align_watchpoint): Likewise.
3496 (aarch64_linux_set_debug_regs):
3497 (aarch64_dr_state_insert_one_point): Likewise.
3498 (aarch64_dr_state_remove_one_point): Likewise.
3499 (aarch64_handle_breakpoint): Likewise.
3500 (aarch64_handle_aligned_watchpoint): Likewise.
3501 (aarch64_handle_unaligned_watchpoint): Likewise.
3502 (aarch64_handle_watchpoint): Likewise.
3503
c67ca4de
YQ
35042015-07-17 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3507 and don't aarch64_get_debug_reg_state. All callers update.
3508 (aarch64_handle_aligned_watchpoint): Likewise.
3509 (aarch64_handle_unaligned_watchpoint): Likewise.
3510 (aarch64_handle_watchpoint): Likewise.
3511 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3512 (aarch64_remove_point): Likewise.
3513
25abf979
YQ
35142015-07-17 Yao Qi <yao.qi@linaro.org>
3515
3516 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3517 debug_printf.
3518 (aarch64_handle_unaligned_watchpoint): Likewise.
3519
db1ff28b
JK
35202015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3521
3522 Revert the previous 3 commits:
3523 Move gdb_regex* to common/
3524 Move linux_find_memory_regions_full & co.
3525 gdbserver build-id attribute generator
3526
700ca40f
JK
35272015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3528 Jan Kratochvil <jan.kratochvil@redhat.com>
3529
3530 gdbserver build-id attribute generator.
3531 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3532 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3533 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3534 (find_phdr): New.
3535 (get_dynamic): Use find_pdhr to traverse program headers.
3536 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3537 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3538 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3539 (get_hex_build_id): New.
3540 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3541 to reply XML document.
3542
9904185c
JK
35432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3544 Jan Kratochvil <jan.kratochvil@redhat.com>
3545
3546 * target.c: Include target/target-utils.h and fcntl.h.
3547 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3548 (target_fileio_read_stralloc): New functions.
3549
6e5b4429
JK
35502015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3551
3552 * Makefile.in (OBS): Add gdb_regex.o.
3553 (gdb_regex.o): New.
3554 * config.in: Rebuilt.
3555 * configure: Rebuilt.
3556
ddc98fbf
JK
35572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3558 Jan Kratochvil <jan.kratochvil@redhat.com>
3559
3560 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3561 * Makefile.in (OBS): Add target-utils.o.
3562 (linux-maps.o, target-utils.o): New.
3563 * configure.srv (srv_linux_obj): Add linux-maps.o.
3564
e57bb7a0
PL
35652015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3566
3567 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3568 function, return 1.
3569 (the_low_target): Install it.
3570
586b02a9
PA
35712015-07-14 Pedro Alves <palves@redhat.com>
3572
3573 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3574 Instead, ignore ECHILD, and throw an error for other errnos.
3575
58c1b36c
PA
35762015-07-10 Pedro Alves <palves@redhat.com>
3577
3578 * event-loop.c (struct callback_event) <data>: Change type to
3579 gdb_client_data instance instead of gdb_client_data pointer.
3580 (append_callback_event): Adjust.
3581
421530db
PL
35822015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3583
3584 * linux-aarch64-low.c: Add comments for each linux_target_ops
3585 method. Remove comments already covered in target_ops and
3586 linux_target_ops definitions.
3587 (the_low_target): Add comments for each unimplemented method.
3588
c2d65f38
YQ
35892015-07-09 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-aarch64-low.c (aarch64_regmap): Remove.
3592 (aarch64_usrregs_info): Remove.
3593 (regs_info): Set field usrregs to NULL.
3594
b20a6524
MM
35952015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3596
3597 * linux-low.c: Include "rsp-low.h"
3598 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3599 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3600 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3601 (handle_btrace_enable_pt): New.
3602 (handle_btrace_general_set): Support "pt".
3603 (handle_btrace_conf_general_set): Support "pt:size".
3604
96c97461
PL
36052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3606
3607 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3608 Z_PACKET_SW_BP.
3609
37d66942
PL
36102015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3611
3612 * linux-aarch64-low.c: Remove comment about endianness.
3613 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3614 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3615 memcmp.
3616
dc06243f
GB
36172015-06-24 Gary Benson <gbenson@redhat.com>
3618
3619 * linux-i386-ipa.c (stdint.h): Do not include.
3620 * lynx-i386-low.c (stdint.h): Likewise.
3621 * lynx-ppc-low.c (stdint.h): Likewise.
3622 * mem-break.c (stdint.h): Likewise.
3623 * thread-db.c (stdint.h): Likewise.
3624 * tracepoint.c (stdint.h): Likewise.
3625 * win32-low.c (stdint.h): Likewise.
3626
124e13d9
SM
36272015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3628
3629 * server.c (write_qxfer_response): Update call to
3630 remote_escape_output.
3631
909c2cda
JK
36322015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3633 Jan Kratochvil <jan.kratochvil@redhat.com>
3634
3635 Merge multiple hex conversions.
3636 * gdbreplay.c (tohex): Rename to 'fromhex'.
3637 (logchar): Use fromhex.
3638
24c05f46
JK
36392015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3640
3641 * server.c (handle_qxfer_libraries): Set `version' attribute for
3642 <library-list>.
3643
14d2069a
GB
36442015-06-10 Gary Benson <gbenson@redhat.com>
3645
3646 * target.h (struct target_ops) <multifs_open>: New field.
3647 <multifs_unlink>: Likewise.
3648 <multifs_readlink>: Likewise.
3649 * linux-low.c (nat/linux-namespaces.h): New include.
3650 (linux_target_ops): Initialize the_target->multifs_open,
3651 the_target->multifs_unlink and the_target->multifs_readlink.
3652 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3653 * hostio.c (hostio_fs_pid): New static variable.
3654 (hostio_handle_new_gdb_connection): New function.
3655 (handle_setfs): Likewise.
3656 (handle_open): Use the_target->multifs_open as appropriate.
3657 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3658 (handle_readlink): Use the_target->multifs_readlink as
3659 appropriate.
3660 (handle_vFile): Handle vFile:setfs packets.
3661 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3662 after target_handle_new_gdb_connection.
3663
4b8b5e72
GB
36642015-06-10 Gary Benson <gbenson@redhat.com>
3665
3666 * configure.ac (AC_CHECK_FUNCS): Add setns.
3667 * config.in: Regenerate.
3668 * configure: Likewise.
3669 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3670 (linux-namespaces.o): New rule.
3671 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3672
3ac2e371
GB
36732015-06-09 Gary Benson <gbenson@redhat.com>
3674
3675 * hostio.c (handle_open): Process mode argument with
3676 fileio_to_host_mode.
3677
ca9b78ce
YQ
36782015-06-01 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3681 * linux-x86-low.c: Likewise.
3682
bfacd19d
DB
36832015-05-28 Don Breazeal <donb@codesourcery.com>
3684
3685 * linux-low.c (handle_extended_wait): Initialize
3686 thread_info.last_resume_kind for new fork children.
3687
452003ef
PA
36882015-05-15 Pedro Alves <palves@redhat.com>
3689
3690 * target.h (target_handle_new_gdb_connection): Rewrite using if
3691 wrapped in do/while.
3692
1041a03c
JB
36932015-05-14 Joel Brobecker <brobecker@adacore.com>
3694
3695 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3696 * configure, config.in: Regenerate.
3697 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3698 Declare typedef.
3699
c269dbdb
DB
37002015-05-12 Don Breazeal <donb@codesourcery.com>
3701
3702 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3703 PTRACE_EVENT_VFORK_DONE.
3704 (linux_low_ptrace_options, extended_event_reported): Add vfork
3705 events.
3706 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3707 and "vforkdone" for RSP 'T' Stop Reply Packet.
3708 * server.h (report_vfork_events): Declare
3709 global variable.
3710
3a8a0396
DB
37112015-05-12 Don Breazeal <donb@codesourcery.com>
3712
3713 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3714 (the_low_target) <new_fork>: Initialize new member.
3715 * linux-arm-low.c (arm_new_fork): New function.
3716 (the_low_target) <new_fork>: Initialize new member.
3717 * linux-low.c (handle_extended_wait): Call new target function
3718 new_fork.
3719 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3720 * linux-mips-low.c (mips_add_watchpoint): New function
3721 extracted from mips_insert_point.
3722 (the_low_target) <new_fork>: Initialize new member.
3723 (mips_linux_new_fork): New function.
3724 (mips_insert_point): Call mips_add_watchpoint.
3725 * linux-x86-low.c (x86_linux_new_fork): New function.
3726 (the_low_target) <new_fork>: Initialize new member.
3727
de0d863e
DB
37282015-05-12 Don Breazeal <donb@codesourcery.com>
3729
3730 * linux-low.c (handle_extended_wait): Implement return value,
3731 rename argument 'event_child' to 'event_lwp', handle
3732 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3733 (linux_low_ptrace_options): New function.
3734 (linux_low_filter_event): Call linux_low_ptrace_options,
3735 use different argument fo linux_enable_event_reporting,
3736 use return value from handle_extended_wait.
3737 (extended_event_reported): New function.
3738 (linux_wait_1): Call extended_event_reported and set
3739 status to report fork events.
3740 (linux_write_memory): Add pid to debug message.
3741 (reset_lwp_ptrace_options_callback): New function.
3742 (linux_handle_new_gdb_connection): New function.
3743 (linux_target_ops): Initialize new structure member.
3744 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3745 * lynx-low.c: Initialize new structure member.
3746 * remote-utils.c (prepare_resume_reply): Implement stop reason
3747 "fork" for "T" stop message.
3748 * server.c (handle_query): Call handle_new_gdb_connection.
3749 * server.h (report_fork_events): Declare global flag.
3750 * target.h (struct target_ops) <handle_new_gdb_connection>:
3751 New member.
3752 (target_handle_new_gdb_connection): New macro.
3753 * win32-low.c: Initialize new structure member.
3754
ddcbc397
DB
37552015-05-12 Don Breazeal <donb@codesourcery.com>
3756
3757 * mem-break.c (APPEND_TO_LIST): Define macro.
3758 (clone_agent_expr): New function.
3759 (clone_one_breakpoint): New function.
3760 (clone_all_breakpoints): New function.
3761 * mem-break.h: Declare new functions.
3762
89245bc0
DB
37632015-05-12 Don Breazeal <donb@codesourcery.com>
3764
3765 * linux-low.c (linux_supports_fork_events): New function.
3766 (linux_supports_vfork_events): New function.
3767 (linux_target_ops): Initialize new structure members.
3768 (initialize_low): Call linux_check_ptrace_features.
3769 * lynx-low.c (lynx_target_ops): Initialize new structure
3770 members.
3771 * server.c (report_fork_events, report_vfork_events):
3772 New global flags.
3773 (handle_query): Add new features to qSupported packet and
3774 response.
3775 (captured_main): Initialize new global variables.
3776 * target.h (struct target_ops) <supports_fork_events>:
3777 New member.
3778 <supports_vfork_events>: New member.
3779 (target_supports_fork_events): New macro.
3780 (target_supports_vfork_events): New macro.
3781 * win32-low.c (win32_target_ops): Initialize new structure
3782 members.
3783
835205d0
GB
37842015-05-12 Gary Benson <gbenson@redhat.com>
3785
3786 * server.c (handle_qxfer_exec_file): Use current process
3787 if annex is empty.
3788
21e94bd9
SL
37892015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3790
3791 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3792 Remove HAVE_PTRACE_GETREGS conditionals.
3793 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3794 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3795
45614f15
YQ
37962015-05-08 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-low.c (linux_supports_conditional_breakpoints): New
3799 function.
3800 (linux_target_ops): Install new target method.
3801 * lynx-low.c (lynx_target_ops): Install NULL hook for
3802 supports_conditional_breakpoints.
3803 * nto-low.c (nto_target_ops): Likewise.
3804 * spu-low.c (spu_target_ops): Likewise.
3805 * win32-low.c (win32_target_ops): Likewise.
3806 * server.c (handle_query): Check
3807 target_supports_conditional_breakpoints.
3808 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3809 New field.
3810 (target_supports_conditional_breakpoints): New macro.
3811
80ad801e
PA
38122015-05-06 Pedro Alves <palves@redhat.com>
3813
3814 PR server/18081
3815 * server.c (start_inferior): If the process exits, mourn it.
3816
819843c7
GB
38172015-04-21 Gary Benson <gbenson@redhat.com>
3818
3819 * hostio.c (fileio_open_flags_to_host): Factored out to
3820 fileio_to_host_openflags in common/fileio.c. Single use
3821 updated.
3822
a2d5a9d7
MF
38232015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3824
3825 * linux-xtensa-low.c (xtensa_fill_gregset)
3826 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3827 XCHAL_HAVE_LOOP.
3828
deb44829
MF
38292015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3830
3831 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3832 (regs_info): Replace usrregs pointer with NULL.
3833
e57f1de3
GB
38342015-04-17 Gary Benson <gbenson@redhat.com>
3835
3836 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3837 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3838 * server.c (handle_qxfer_exec_file): New function.
3839 (qxfer_packets): Add exec-file entry.
3840 (handle_query): Report qXfer:exec-file:read as supported packet.
3841
62828379
RN
38422015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3843
3844 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3845
b88bb450
GB
38462015-04-09 Gary Benson <gbenson@redhat.com>
3847
3848 * hostio-errno.c (errno_to_fileio_error): Remove function.
3849 Update caller to use remote_fileio_to_fio_error.
3850
c8f4bfdd
YQ
38512015-04-09 Yao Qi <yao.qi@linaro.org>
3852
3853 * linux-low.c (linux_insert_point): Call
3854 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3855 (linux_remove_point): Call remove_memory_breakpoint if type is
3856 raw_bkpt_type_sw.
3857 * linux-x86-low.c (x86_insert_point): Don't call
3858 insert_memory_breakpoint.
3859 (x86_remove_point): Don't call remove_memory_breakpoint.
3860
41f98f02
PA
38612015-04-01 Pedro Alves <palves@redhat.com>
3862 Cleber Rosa <crosa@redhat.com>
3863
3864 * server.c (gdbserver_usage): Reorganize and extend the usage
3865 message.
3866
2bf6fb9d
PA
38672015-03-24 Pedro Alves <palves@redhat.com>
3868
3869 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3870 output. Also dump TRAP_TRACE.
3871 (linux_low_filter_event): In debug output, distinguish a
3872 resume_stop SIGSTOP from a delayed SIGSTOP.
3873
369f6daa
GB
38742015-03-24 Gary Benson <gbenson@redhat.com>
3875
3876 * linux-x86-low.c (x86_linux_new_thread): Moved to
3877 nat/x86-linux.c.
3878 (x86_linux_prepare_to_resume): Likewise.
3879
8e5d4070
GB
38802015-03-24 Gary Benson <gbenson@redhat.com>
3881
3882 * Makefile.in (x86-linux-dregs.o): New rule.
3883 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3884 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3885 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3886 (x86_linux_dr_get): Likewise.
3887 (x86_linux_dr_set): Likewise.
3888 (update_debug_registers_callback): Likewise.
3889 (x86_linux_dr_set_addr): Likewise.
3890 (x86_linux_dr_get_addr): Likewise.
3891 (x86_linux_dr_set_control): Likewise.
3892 (x86_linux_dr_get_control): Likewise.
3893 (x86_linux_dr_get_status): Likewise.
3894 (x86_linux_update_debug_registers): Likewise.
3895
2b95d440
GB
38962015-03-24 Gary Benson <gbenson@redhat.com>
3897
3898 * linux-x86-low.c (x86_linux_update_debug_registers):
3899 New function, factored out from...
3900 (x86_linux_prepare_to_resume): ...this.
3901
14b0bc68
GB
39022015-03-24 Gary Benson <gbenson@redhat.com>
3903
3904 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3905 (x86_linux_dr_set): Likewise.
3906 (update_debug_registers_callback): Likewise.
3907 (x86_linux_dr_set_addr): Likewise.
3908 (x86_linux_dr_get_addr): Likewise.
3909 (x86_linux_dr_set_control): Likewise.
3910 (x86_linux_dr_get_control): Likewise.
3911 (x86_linux_dr_get_status): Likewise.
3912 (x86_linux_prepare_to_resume): Likewise.
3913
5dfe6ca8
GB
39142015-03-24 Gary Benson <gbenson@redhat.com>
3915
3916 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3917 Use perror_with_name. Pass string through gettext.
3918 (x86_linux_dr_set): Likewise.
3919
d33472ad
GB
39202015-03-24 Gary Benson <gbenson@redhat.com>
3921
3922 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3923 (x86_linux_dr_set_addr): ...this.
3924 (x86_dr_low_get_addr): Rename to...
3925 (x86_linux_dr_get_addr): ...this.
3926 (x86_dr_low_set_control): Rename to...
3927 (x86_linux_dr_set_control): ...this.
3928 (x86_dr_low_get_control): Rename to...
3929 (x86_linux_dr_get_control): ...this.
3930 (x86_dr_low_get_status): Rename to...
3931 (x86_linux_dr_get_status): ...this.
3932 (x86_dr_low): Update with new function names.
3933
4b134ca1
GB
39342015-03-24 Gary Benson <gbenson@redhat.com>
3935
3936 * Makefile.in (x86-linux.o): New rule.
3937 * configure.srv: Add x86-linux.o to relevant targets.
3938 * linux-low.c (lwp_set_arch_private_info): New function.
3939 (lwp_arch_private_info): Likewise.
3940 * linux-x86-low.c: Include nat/x86-linux.h.
3941 (arch_lwp_info): Removed structure.
3942 (update_debug_registers_callback):
3943 Use lwp_set_debug_registers_changed.
3944 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3945 and lwp_set_debug_registers_changed.
3946 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3947
34c703da
GB
39482015-03-24 Gary Benson <gbenson@redhat.com>
3949
3950 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3951 * linux-arm-low.c (arm_new_thread): Likewise.
3952 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3953 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3954 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3955 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3956
cff068da
GB
39572015-03-24 Gary Benson <gbenson@redhat.com>
3958
3959 * linux-low.c (ptid_of_lwp): New function.
3960 (lwp_is_stopped): Likewise.
3961 (lwp_stop_reason): Likewise.
3962 * linux-x86-low.c (update_debug_registers_callback):
3963 Use lwp_is_stopped.
3964 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3965 lwp_stop_reason.
3966
b2f7c7e8
GB
39672015-03-24 Gary Benson <gbenson@redhat.com>
3968
3969 * linux-low.h (linux_stop_lwp): Remove declaration.
3970
6d4ee8c6
GB
39712015-03-24 Gary Benson <gbenson@redhat.com>
3972
3973 * linux-low.h: Include nat/linux-nat.h.
3974 * linux-low.c (iterate_over_lwps_args): New structure.
3975 (iterate_over_lwps_filter): New function.
3976 (iterate_over_lwps): Likewise.
3977 * linux-x86-low.c (update_debug_registers_callback):
3978 Update signature to what iterate_over_lwps expects.
3979 Remove PID check that iterate_over_lwps now performs.
3980 (x86_dr_low_set_addr): Use iterate_over_lwps.
3981 (x86_dr_low_set_control): Likewise.
3982
70a0bb6b
GB
39832015-03-24 Gary Benson <gbenson@redhat.com>
3984
3985 * linux-x86-low.c (x86_debug_reg_state): New function.
3986 (x86_linux_prepare_to_resume): Use the above.
3987
7b669087
GB
39882015-03-24 Gary Benson <gbenson@redhat.com>
3989
3990 * linux-low.c (current_lwp_ptid): New function.
3991 * linux-x86-low.c: Include nat/linux-nat.h.
3992 (x86_dr_low_get_addr): Use current_lwp_ptid.
3993 (x86_dr_low_get_control): Likewise.
3994 (x86_dr_low_get_status): Likewise.
3995
eef49a3d
PA
39962015-03-20 Pedro Alves <palves@redhat.com>
3997
3998 * tracepoint.c (cmd_qtstatus): Make "str" const.
3999
b2333d22
PA
40002015-03-20 Pedro Alves <palves@redhat.com>
4001
4002 * server.c (handle_general_set): Make "req_str" const.
4003
23f238d3
PA
40042015-03-19 Pedro Alves <palves@redhat.com>
4005
4006 * linux-low.c (linux_resume_one_lwp): Rename to ...
4007 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4008 instead call perror_with_name.
4009 (check_ptrace_stopped_lwp_gone): New function.
4010 (linux_resume_one_lwp): Reimplement as wrapper around
4011 linux_resume_one_lwp_throw that swallows errors if the LWP is
4012 gone.
4013
91baf43f
PA
40142015-03-19 Pedro Alves <palves@redhat.com>
4015
4016 * linux-low.c (count_events_callback, select_event_lwp_callback):
4017 No longer check whether the thread has resume_stop as last resume
4018 kind.
4019
8bf3b159
PA
40202015-03-19 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (count_events_callback, select_event_lwp_callback):
4023 Use the lwp's status_pending_p field, not the thread's.
4024
b90fc188
PA
40252015-03-19 Pedro Alves <palves@redhat.com>
4026
4027 * linux-low.c (select_event_lwp_callback): Update comments to
4028 no longer mention SIGTRAP.
4029
464b0089
GB
40302015-03-18 Gary Benson <gbenson@redhat.com>
4031
4032 * server.c (handle_query): Do not report vFile:fstat as supported.
4033
aa9e327f
GB
40342015-03-11 Gary Benson <gbenson@redhat.com>
4035
4036 * hostio.c (sys/types.h): New include.
4037 (sys/stat.h): Likewise.
4038 (common-remote-fileio.h): Likewise.
4039 (handle_fstat): New function.
4040 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4041
791c0056
GB
40422015-03-11 Gary Benson <gbenson@redhat.com>
4043
4044 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4045 struct stat.st_blocks and struct stat.st_blksize.
4046 * configure: Regenerate.
4047 * config.in: Likewise.
4048 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4049 (OBS): Add common-remote-fileio.o.
4050 (common-remote-fileio.o): New rule.
4051
9a9df970
PA
40522015-03-09 Pedro Alves <palves@redhat.com>
4053
4054 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4055 'struct sockaddr' pointer in 'accept' call.
4056
9eb1356e
PA
40572015-03-09 Pedro Alves <palves@redhat.com>
4058
4059 Revert:
4060 2015-03-07 Pedro Alves <palves@redhat.com>
4061 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4062 or <winsock2.h> here. Instead include "gdb_socket.h".
4063 (remote_open): Use union gdb_sockaddr_u.
4064 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4065 or <winsock2.h> here. Instead include "gdb_socket.h".
4066 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4067 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4068 or <sys/un.h>.
4069 (init_named_socket, gdb_agent_helper_thread): Use union
4070 gdb_sockaddr_u.
4071
aac331e4
PA
40722015-03-07 Pedro Alves <palves@redhat.com>
4073
4074 * configure.ac (build_warnings): Move
4075 -Wdeclaration-after-statement to the C-specific set.
4076 * configure: Regenerate.
4077
366c75fc
PA
40782015-03-07 Pedro Alves <palves@redhat.com>
4079
4080 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4081 or <winsock2.h> here. Instead include "gdb_socket.h".
4082 (remote_open): Use union gdb_sockaddr_u.
4083 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4084 or <winsock2.h> here. Instead include "gdb_socket.h".
4085 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4086 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4087 or <sys/un.h>.
4088 (init_named_socket, gdb_agent_helper_thread): Use union
4089 gdb_sockaddr_u.
4090
492d29ea
PA
40912015-03-07 Pedro Alves <palves@redhat.com>
4092
4093 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4094 instead.
4095
60a191ed
YQ
40962015-03-06 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-aarch64-low.c (aarch64_insert_point): Use
4099 show_debug_regs as a boolean.
4100 (aarch64_remove_point): Likewise.
4101
f5771b1d
PA
41022015-03-05 Pedro Alves <palves@redhat.com>
4103
4104 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4105 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4106 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4107 * nto-low.c (nto_target_ops): Likewise.
4108 * spu-low.c (spu_target_ops): Likewise.
4109 * win32-low.c (win32_target_ops): Likewise.
4110
3e572f71
PA
41112015-03-04 Pedro Alves <palves@redhat.com>
4112
72f4393d 4113 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4114 Decide whether a breakpoint triggered based on the SIGTRAP's
4115 siginfo.si_code.
72f4393d
L
4116 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4117 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4118 (linux_low_filter_event): Check for breakpoints before checking
4119 watchpoints.
4120 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4121 siginfo.si_code.
72f4393d
L
4122 (linux_stopped_by_sw_breakpoint)
4123 (linux_supports_stopped_by_sw_breakpoint)
4124 (linux_stopped_by_hw_breakpoint)
4125 (linux_supports_stopped_by_hw_breakpoint): New functions.
4126 (linux_target_ops): Install new target methods.
3e572f71 4127
1ec68e26
PA
41282015-03-04 Pedro Alves <palves@redhat.com>
4129
4130 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4131 * server.c (swbreak_feature, hwbreak_feature): New globals.
4132 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4133 (captured_main): Clear swbreak_feature and hwbreak_feature.
4134 * server.h (swbreak_feature, hwbreak_feature): Declare.
4135 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4136 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4137 supports_stopped_by_hw_breakpoint>: New fields.
4138 (target_supports_stopped_by_sw_breakpoint)
4139 (target_stopped_by_sw_breakpoint)
4140 (target_supports_stopped_by_hw_breakpoint)
4141 (target_stopped_by_hw_breakpoint): Declare.
4142
15c66dd6
PA
41432015-03-04 Pedro Alves <palves@redhat.com>
4144
4145 enum lwp_stop_reason -> enum target_stop_reason
4146 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4147 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4148 (linux_wait_1, stuck_in_jump_pad_callback)
4149 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4150 (linux_stopped_by_watchpoint):
4151 * linux-low.h (enum lwp_stop_reason): Delete.
4152 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4153 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4154
98fc70d6
YQ
41552015-03-04 Yao Qi <yao.qi@linaro.org>
4156
4157 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4158
dd2ac174
GB
41592015-03-03 Gary Benson <gbenson@redhat.com>
4160
4161 * hostio.c (handle_vFile): Fix prefix lengths.
4162
d68e53f4
MM
41632015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4164
4165 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4166 ptr_bits.
4167
bf2d68ab
AA
41682015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4169
4170 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4171 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4172 (clean): Add "rm -f" for above C files.
4173 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4174 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4175 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4176 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4177 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4178 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4179 (init_registers_s390x_vx_linux64)
4180 (init_registers_s390x_tevx_linux64)
4181 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4182 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4183 declarations.
4184 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4185 (s390_store_vxrs_high): New functions.
4186 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4187 NT_S390_VXRS_HIGH.
4188 (s390_arch_setup): Add logic for selecting one of the new target
4189 descriptions. Activate the new vector regsets if applicable.
4190 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4191 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4192 and init_registers_s390x_tevx_linux64.
4193
c966a859
PA
41942015-03-01 Pedro Alves <palves@redhat.com>
4195
4196 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4197 parameter.
4198
4180215b
PA
41992015-02-27 Pedro Alves <palves@redhat.com>
4200
4201 * linux-x86-low.c (u_debugreg_offset): New function.
4202 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4203
749bab01
PA
42042015-02-27 Pedro Alves <palves@redhat.com>
4205
4206 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4207 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4208 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4209 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4210 (ps_lsetfpregs, ps_getpid)
4211 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4212 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4213 (ps_lsetxregs, ps_plog): Declare.
4214
3c14e5a3
PA
42152015-02-27 Pedro Alves <palves@redhat.com>
4216
4217 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4218 IP_AGENT_EXPORT_FUNC.
4219 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4220 IP_AGENT_EXPORT_FUNC.
4221 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4222 (IP_AGENT_EXPORT): Delete.
4223 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4224 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4225 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4226 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4227 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4228 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4229 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4230 (traceframe_read_count, traceframe_write_count)
4231 (traceframes_created, trace_state_variables, get_raw_reg)
4232 (get_trace_state_variable_value, set_trace_state_variable_value)
4233 (ust_loaded, helper_thread_id, cmd_buf): Use
4234 IPA_SYM_EXPORTED_NAME.
4235 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4236 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4237 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4238 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4239 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4240 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4241 EXTERN_C_PUSH/EXTERN_C_POP.
4242 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4243 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4244 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4245 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4246 (traceframe_write_count, traceframe_read_count)
4247 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4248 (about_to_request_buffer_space, get_trace_state_variable_value)
4249 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4250 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4251 EXTERN_C_PUSH/EXTERN_C_POP.
4252 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4253 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4254 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4255 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4256 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4257 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4258 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4259 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4260 Define.
4261 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4262 (IP_AGENT_EXPORT_VAR_DECL): Define.
4263 (tracing): Declare.
4264 (gdb_agent_get_raw_reg): Declare.
4265
fe978cb0
PA
42662015-02-27 Tom Tromey <tromey@redhat.com>
4267 Pedro Alves <palves@redhat.com>
4268
4269 Rename symbols whose names are reserved C++ keywords throughout.
4270
3bc3d82a
PA
42712015-02-27 Pedro Alves <palves@redhat.com>
4272
4273 * Makefile.in (COMPILER): New, get it from autoconf.
4274 (CXX): Get from autoconf instead.
4275 (COMPILE.pre): Use COMPILER.
4276 (CC-LD): Rename to ...
4277 (CC_LD): ... this. Use COMPILER.
4278 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4279 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4280 * acinclude.m4: Include build-with-cxx.m4.
4281 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4282 Disable -Werror by default if building in C++ mode.
4283 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4284 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4285 the C++ compiler. Save/restore CXXFLAGS too.
4286 * configure: Regenerate.
4287
07697489
PA
42882015-02-27 Pedro Alves <palves@redhat.com>
4289
4290 * acinclude.m4: Include libiberty.m4.
4291 * configure.ac: Call libiberty_INIT.
4292 * config.in, configure: Regenerate.
4293
9beb7c4e
PA
42942015-02-26 Pedro Alves <palves@redhat.com>
4295
4296 * linux-low.c (linux_wait_1): When incrementing the PC past a
4297 program breakpoint always use the_low_target.breakpoint_len as
4298 increment, rather than the maximum between that and
4299 the_low_target.decr_pc_after_break.
4300
8090aef2
PA
43012015-02-23 Pedro Alves <palves@redhat.com>
4302
4303 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4304 thread was doing a step-over; always adjust the PC if
4305 we stepped over a permanent breakpoint.
4306 (linux_wait_1): If we stepped over breakpoint that was on top of a
4307 permanent breakpoint, manually advance the PC past it.
4308
bc9540e8
PA
43092015-02-23 Pedro Alves <palves@redhat.com>
4310
4311 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4312 modes.
4313 (x86_fill_gregset, x86_store_gregset): Use it when handling
4314 $orig_eax.
4315
2db9a427
PA
43162015-02-20 Pedro Alves <palves@redhat.com>
4317
4318 * thread-db.c: Include "nat/linux-procfs.h".
4319 (thread_db_init): Skip listing new threads if the kernel supports
4320 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4321
afa8d396
PA
43222015-02-20 Pedro Alves <palves@redhat.com>
4323
4324 * linux-low.c (status_pending_p_callback): Use ptid_match.
4325
c9587f88
AT
43262015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4327
4328 PR breakpoints/16812
4329 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4330 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4331 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4332
b05ec7a5
AT
43332015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4334
4335 PR breakpoints/15956
4336 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4337
d33501a5
MM
43382015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4339
4340 * linux-low.c (linux_low_btrace_conf): Print size.
4341 * server.c (handle_btrace_conf_general_set): New.
4342 (hanle_general_set): Call handle_btrace_conf_general_set.
4343 (handle_query): Report Qbtrace-conf:bts:size as supported.
4344
f4abbc16
MM
43452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4346
4347 * linux-low.c (linux_low_enable_btrace): Update parameters.
4348 (linux_low_btrace_conf): New.
4349 (linux_target_ops)<to_btrace_conf>: Initialize.
4350 * server.c (current_btrace_conf): New.
4351 (handle_btrace_enable): Rename to ...
4352 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4353 to target_enable_btrace. Update comment. Update users.
4354 (handle_qxfer_btrace_conf): New.
4355 (qxfer_packets): Add btrace-conf entry.
4356 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4357 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4358 (target_ops)<read_btrace_conf>: New.
4359 (target_enable_btrace): Update parameters.
4360 (target_read_btrace_conf): New.
4361
043c3577
MM
43622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4363
4364 * server.c (handle_btrace_general_set): Remove call to
4365 target_supports_btrace.
4366 (supported_btrace_packets): New.
4367 (handle_query): Call supported_btrace_packets.
4368 * target.h: include btrace-common.h.
4369 (btrace_target_info): Removed.
4370 (supports_btrace, target_supports_btrace): Update parameters.
4371
734b0e4b
MM
43722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4373
4374 * Makefile.in (SFILES): Add common/btrace-common.c.
4375 (OBS): Add common/btrace-common.o.
4376 (btrace-common.o): Add build rules.
4377 * linux-low: Include btrace-common.h.
4378 (linux_low_read_btrace): Use struct btrace_data. Call
4379 btrace_data_init and btrace_data_fini.
4380
d6c146e9
PA
43812015-02-06 Pedro Alves <palves@redhat.com>
4382
4383 * thread-db.c (find_new_threads_callback): Add debug output.
4384
20ba1ce6
PA
43852015-02-04 Pedro Alves <palves@redhat.com>
4386
4387 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4388 (resume_stopped_resumed_lwps): New function.
4389 (linux_wait_for_event_filtered): Use it.
4390
8cc73a39
SDJ
43912015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4392
4393 * Makefile.in (SFILES): Add linux-personality.c.
4394 (linux-personality.o): New rule.
4395 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4396 list of objects to be built.
4397 * linux-low.c: Include nat/linux-personality.h.
4398 (linux_create_inferior): Remove code to disable address space
4399 randomization (moved to ../nat/linux-personality.c). Create
4400 cleanup to disable address space randomization.
4401
fb23d554
SDJ
44022015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4403
4404 * Makefile.in (posix-strerror.o): New rule.
4405 (mingw-strerror.o): Likewise.
4406 * configure: Regenerated.
4407 * configure.ac: Source file ../common/common.host. Initialize new
4408 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4409
cdf43629
YQ
44102015-01-14 Yao Qi <yao@codesourcery.com>
4411
4412 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4413 (ppc-linux.o): New rule.
4414 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4415 * configure.ac: AC_CHECK_FUNCS(getauxval).
4416 * config.in: Re-generated.
4417 * configure: Re-generated.
4418 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4419 ppc64_64bit_inferior_p
4420
514c5338
YQ
44212015-01-14 Yao Qi <yao@codesourcery.com>
4422
4423 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4424 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4425 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4426 (PT_ORIG_R3, PT_TRAP): Likewise.
4427 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4428 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4429 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4430
3368c1e5
JB
44312015-01-10 Joel Brobecker <brobecker@adacore.com>
4432
4433 * i387-fp.c (i387_cache_to_xsave): In look over
4434 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4435 zmmh_low_space field by use of zmmh_high_space.
4436
582511be
PA
44372015-01-09 Pedro Alves <palves@redhat.com>
4438
4439 * linux-low.c (step_over_bkpt): Move higher up in the file.
4440 (handle_extended_wait): Don't store the stop_pc here.
4441 (get_stop_pc): Adjust comments and rename to ...
4442 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4443 stopped for a software breakpoint or hardware breakpoint.
4444 (thread_still_has_status_pending_p): New function.
4445 (status_pending_p_callback): Use
4446 thread_still_has_status_pending_p. If the event is no longer
4447 interesting, resume the LWP.
4448 (handle_tracepoints): Add assert.
4449 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4450 (wstatus_maybe_breakpoint): New function.
4451 (cancel_breakpoint): Delete function.
4452 (check_stopped_by_watchpoint): New function, factored out from
4453 linux_low_filter_event.
4454 (lp_status_maybe_breakpoint): Delete function.
4455 (linux_low_filter_event): Remove filter_ptid argument.
4456 Leave thread group exits pending here. Store the LWP's stop PC.
4457 Always leave events pending.
4458 (linux_wait_for_event_filtered): Pull all events out of the
4459 kernel, and leave them all pending.
4460 (count_events_callback, select_event_lwp_callback): Consider all
4461 events.
4462 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4463 (select_event_lwp): Only give preference to the stepping LWP in
4464 all-stop mode. Adjust comments.
4465 (ignore_event): New function.
4466 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4467 references to cancel_breakpoints. Adjust to renames. Also give
4468 equal priority to all LWPs that have had events in non-stop mode.
4469 If reporting a software breakpoint event, unadjust the LWP's PC.
4470 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4471 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4472 Adjust.
4473 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4474 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4475 (linux_stopped_by_watchpoint): Adjust.
4476 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4477 * linux-low.h (enum lwp_stop_reason): New.
4478 (struct lwp_info) <stop_pc>: Adjust comment.
4479 <stopped_by_watchpoint>: Delete field.
4480 <stop_reason>: New field.
4481 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4482 * mem-break.c (software_breakpoint_inserted_here)
4483 (hardware_breakpoint_inserted_here): New function.
4484 * mem-break.h (software_breakpoint_inserted_here)
4485 (hardware_breakpoint_inserted_here): Declare.
4486 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4487 (cancel_breakpoints): Delete.
4488 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4489 (upload_fast_traceframes): Remove references to
4490 cancel_breakpoints.
4491
a33e3959
PA
44922015-01-09 Pedro Alves <palves@redhat.com>
4493
4494 * thread-db.c (find_new_threads_callback): Ignore thread if the
4495 kernel thread ID is -1.
4496
8784d563
PA
44972015-01-09 Pedro Alves <palves@redhat.com>
4498
4499 * linux-low.c (linux_attach_fail_reason_string): Move to
4500 nat/linux-ptrace.c, and rename.
4501 (linux_attach_lwp): Update comment.
4502 (attach_proc_task_lwp_callback): New function.
4503 (linux_attach): Adjust to rename and use
4504 linux_proc_attach_tgid_threads.
4505 (linux_attach_fail_reason_string): Delete declaration.
4506
76f2b779
JB
45072015-01-01 Joel Brobecker <brobecker@adacore.com>
4508
4509 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4510 * server.c (gdbserver_version): Likewise.
4511
fafcc06a
SDJ
45122014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4513
4514 * remote-utils.c: Include ctype.h.
4515 (input_interrupt): Explicitly handle the case when the char
4516 received is the NUL byte. Improve the printing of non-ASCII
4517 characters.
4518
beed38b8
JB
45192014-12-16 Joel Brobecker <brobecker@adacore.com>
4520
4521 * linux-low.c (linux_low_filter_event): Update call to
4522 linux_enable_event_reporting following the addition of
4523 a new parameter to that function.
4524
bf330350
CU
45252014-12-16 Catalin Udma <catalin.udma@freescale.com>
4526
4527 PR server/17457
4528 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4529 (AARCH64_FPCR_REGNO): Likewise.
4530 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4531 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4532 (aarch64_store_fpregset): Likewise.
4533
5227d625
JB
45342014-12-15 Joel Brobecker <brobecker@adacore.com>
4535
4536 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4537 Remove FIXME comment about assumption about N.
4538
f93b65a0
JB
45392014-12-13 Joel Brobecker <brobecker@adacore.com>
4540
4541 * configure.ac: If large-file support is disabled in GDBserver,
4542 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4543 * configure: Regenerate.
4544
e5a9158d
AA
45452014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4546
4547 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4548 warning upon ENODATA from ptrace.
4549 * linux-s390-low.c (s390_store_tdb): New.
4550 (s390_regsets): Add regset for NT_S390_TDB.
4551
feea5f36
AA
45522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4553
4554 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4555 without a fill_function.
4556 * linux-s390-low.c (s390_fill_last_break): Remove.
4557 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4558 (s390_arch_setup): Use regset's size instead of fill_function for
4559 loop end condition.
4560
098dbe61
AA
45612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4562
4563 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4564 the regset's store function when ptrace returned an error.
4565 * regcache.c (get_thread_regcache): Invalidate register cache
4566 before fetching inferior's registers.
4567
28eef672
AA
45682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4569
4570 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4571 while-loop as for-loop.
4572 (regsets_store_inferior_registers): Likewise.
4573
bdca27a2
YQ
45742014-11-28 Yao Qi <yao@codesourcery.com>
4575
4576 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4577 * config.in, configure: Re-generate.
4578 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4579 is defined.
4580
9c232dda
YQ
45812014-11-21 Yao Qi <yao@codesourcery.com>
4582
4583 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4584 (AC_CHECK_HEADERS): Remove malloc.h.
4585 * configure: Re-generated.
4586 * config.in: Re-generated.
4587 * server.h: Don't include alloca.h and malloc.h.
4588 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4589 Don't include malloc.h.
4590
43968415
JB
45912014-11-17 Joel Brobecker <brobecker@adacore.com>
4592
4593 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4594 corresponding ERRNO check in same block.
4595
40e91bc7
PA
45962014-11-12 Pedro Alves <palves@redhat.com>
4597
4598 * server.c (cont_thread): Update comment.
4599 (start_inferior, attach_inferior): No longer clear cont_thread.
4600 (handle_v_cont): No longer set cont_thread.
4601 (captured_main): Clear cont_thread each time a GDB connects.
4602
c2c118cf
PA
46032014-11-12 Pedro Alves <palves@redhat.com>
4604
4605 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4606 thread, and don't resume all threads if the Hc thread has exited.
4607
78708b7c
PA
46082014-11-12 Pedro Alves <palves@redhat.com>
4609
4610 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4611 the process group instead of to a specific LWP.
4612
a2abc7de
PA
46132014-10-15 Pedro Alves <palves@redhat.com>
4614
4615 PR server/17487
4616 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4617 parameter.
4618 (arm_set_thread_context): Delete.
4619 (the_low_target): Adjust.
4620 * win32-i386-low.c (debug_registers_changed)
4621 (debug_registers_used): Delete.
4622 (update_debug_registers_callback): New function.
4623 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4624 needing to update their debug registers.
4625 (win32_get_current_dr): New function.
4626 (x86_dr_low_get_addr, x86_dr_low_get_control)
4627 (x86_dr_low_get_status): Fetch the debug register from the thread
4628 record's context.
4629 (i386_initial_stuff): Adjust.
4630 (i386_get_thread_context): Remove current_event parameter. Don't
4631 clear debug_registers_changed nor copy DR values to
4632 debug_reg_state.
4633 (i386_set_thread_context): Delete.
4634 (i386_prepare_to_resume): New function.
4635 (i386_thread_added): Mark the thread as needing to update irs
4636 debug registers.
4637 (the_low_target): Remove i386_set_thread_context and install
4638 i386_prepare_to_resume.
4639 * win32-low.c (win32_get_thread_context): Adjust.
4640 (win32_set_thread_context): Use SetThreadContext
4641 directly.
4642 (win32_prepare_to_resume): New function.
4643 (win32_require_context): New function, factored out from ...
4644 (thread_rec): ... this.
4645 (continue_one_thread): Call win32_prepare_to_resume on each thread
4646 we're about to continue.
4647 (win32_resume): Call win32_prepare_to_resume on the event thread.
4648 * win32-low.h (struct win32_thread_info)
4649 <debug_registers_changed>: New field.
4650 (struct win32_target_ops): Change prototype of set_thread_context,
4651 delete set_thread_context and add prepare_to_resume.
4652 (win32_require_context): New declaration.
4653
a442d071
GB
46542014-10-08 Gary Benson <gbenson@redhat.com>
4655
4656 * server.h: Do not include common-exceptions.h.
4657
6f1947e8
GB
46582014-10-08 Gary Benson <gbenson@redhat.com>
4659
4660 * server.h: Do not include cleanups.h.
4661
63b434a4
JH
46622014-09-30 James Hogan <james.hogan@imgtec.com>
4663
4664 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4665 mips64-dsp-linux.c.
4666
c4d9ceb6
YQ
46672014-09-23 Yao Qi <yao@codesourcery.com>
4668
4669 * linux-low.c (lp_status_maybe_breakpoint): New function.
4670 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4671 (count_events_callback): Likewise.
4672 (select_event_lwp_callback): Likewise.
4673 (cancel_breakpoints_callback): Likewise.
4674
89a5711c
DB
46752014-09-19 Don Breazeal <donb@codesourcery.com>
4676
4677 * linux-low.c (handle_extended_wait): Call
4678 linux_ptrace_get_extended_event.
4679 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4680 linux_is_extended_waitstatus.
4681
bffc0964
JB
46822014-09-16 Joel Brobecker <brobecker@adacore.com>
4683
4684 * Makefile.in (CPPFLAGS): Define.
4685 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4686 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4687
0bfdf32f
GB
46882014-09-16 Gary Benson <gbenson@redhat.com>
4689
4690 * inferiors.h (current_inferior): Renamed as...
4691 (current_thread): New variable. All uses updated.
4692 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4693 (maybe_move_out_of_jump_pad): Likewise.
4694 (cancel_breakpoint): Likewise.
4695 (linux_low_filter_event): Likewise.
4696 (wait_for_sigstop): Likewise.
4697 (linux_resume_one_lwp): Likewise.
4698 (need_step_over_p): Likewise.
4699 (start_step_over): Likewise.
4700 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4701 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4702 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4703 and save_inferior as saved_thread.
4704 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4705 saved_thread.
4706 (regcache_invalidate_thread): Likewise.
4707 * remote-utils.c (prepare_resume_reply): Likewise.
4708 * thread-db.c (thread_db_get_tls_address): Likewise.
4709 (disable_thread_event_reporting): Likewise.
4710 (remove_thread_event_breakpoints): Likewise.
4711 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4712 as saved_thread.
4713 * target.h (set_desired_inferior): Renamed as...
4714 (set_desired_thread): New declaration. All uses updated.
4715 * server.c (myresume): Updated comment to reference thread instead
4716 of inferior.
4717 (handle_serial_event): Likewise.
4718 (handle_target_event): Likewise.
4719
361c8ade
GB
47202014-09-12 Tom Tromey <tromey@redhat.com>
4721 Gary Benson <gbenson@redhat.com>
4722
4723 * regcache.h: Include common-regcache.h.
4724 (regcache_read_pc): Don't declare.
4725 * regcache.c (get_thread_regcache_for_ptid): New function.
4726
bd9269f7
GB
47272014-09-11 Tom Tromey <tromey@redhat.com>
4728 Gary Benson <gbenson@redhat.com>
4729
4730 * symbol.c: New file.
4731 * Makefile.in (SFILES): Add symbol.c.
4732 (OBS): Add symbol.o.
4733
f8c1d06b
GB
47342014-09-11 Gary Benson <gbenson@redhat.com>
4735
4736 * target.c (target_stop_ptid, target_continue_ptid): New
4737 functions.
4738
721ec300
GB
47392014-09-11 Tom Tromey <tromey@redhat.com>
4740 Gary Benson <gbenson@redhat.com>
4741
4742 * target.h: Include target/target.h.
4743 * target.c (target_read_memory, target_read_uint32)
4744 (target_write_memory): New functions.
4745
c5e92cca
GB
47462014-09-11 Gary Benson <gbenson@redhat.com>
4747
4748 * server.h (debug_hw_points): Don't declare.
4749 * server.c (debug_hw_points): Don't define. Replace all uses
4750 with show_debug_regs.
4751 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4752 all uses with show_debug_regs.
4753
2e4bb98a
EBM
47542014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4755
4756 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4757 endianness into account.
4758 (ppc_supply_ptrace_register): Likewise.
4759
ac740bc7
JH
47602014-09-03 James Hogan <james.hogan@imgtec.com>
4761
4762 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4763 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4764
97ea6506
GB
47652014-09-03 Gary Benson <gbenson@redhat.com>
4766
4767 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4768 ALL_DEBUG_ADDRESS_REGISTERS.
4769
df7e5265
GB
47702014-09-02 Gary Benson <gbenson@redhat.com>
4771
4772 * i386-low.h: Renamed as...
4773 * x86-low.h: New file. All type, function and variable name
4774 prefixes changed from "i386_" to "x86_". All references updated.
4775 * i386-low.c: Renamed as...
4776 * x86-low.c: New file. All type, function and variable name
4777 prefixes changed from "i386_" to "x86_". All references updated.
4778
ed859da7
GB
47792014-09-02 Gary Benson <gbenson@redhat.com>
4780
4781 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4782 (x86_linux_new_thread): Likewise.
4783
860789c7
GB
47842014-08-29 Gary Benson <gbenson@redhat.com>
4785
4786 * server.h (setjmp.h): Do not include.
4787 (toplevel): Do not declare.
4788 (common-exceptions.h): Include.
4789 (cleanups.h): Likewise.
4790 * server.c (toplevel): Do not define.
4791 (exit_code): New static global.
4792 (detach_or_kill_for_exit_cleanup): New function.
4793 (main): New function. Original main renamed to...
4794 (captured_main): New function.
4795 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4796
ff55e1b5
GB
47972014-08-29 Gary Benson <gbenson@redhat.com>
4798
4799 * Makefile.in (SFILES): Add common/common-exceptions.c.
4800 (OBS): Add common-exceptions.o.
4801 (common-exceptions.o): New rule.
4802 * utils.c (prepare_to_throw_exception): New function.
4803
e9bcb658
GB
48042014-08-29 Gary Benson <gbenson@redhat.com>
4805
4806 * config.in: Regenerate.
4807 * configure: Likewise.
4808
e3180625
GB
48092014-08-29 Gary Benson <gbenson@redhat.com>
4810
4811 * Makefile.in (SFILES): Add common/cleanups.c.
4812 (OBS): cleanups.o.
4813 (cleanups.o): New rule.
4814
e3d6ba5d
GB
48152014-08-29 Gary Benson <gbenson@redhat.com>
4816
4817 * utils.c (internal_vwarning): New function.
4818
7096e886
GB
48192014-08-28 Gary Benson <gbenson@redhat.com>
4820
4821 * utils.h (fatal): Remove declaration.
4822 * utils.c (fatal): Remove function.
4823
14ce3192
GB
48242014-08-28 Gary Benson <gbenson@redhat.com>
4825
4826 * tracepoint.c (gdb_agent_init): Replace fatal with
4827 perror_with_name.
4828 (initialize_tracepoint): Likewise.
4829
50278d59
GB
48302014-08-28 Gary Benson <gbenson@redhat.com>
4831
4832 * remote-utils.c (remote_prepare): Replace fatal with error.
4833
aa96c426
GB
48342014-08-28 Gary Benson <gbenson@redhat.com>
4835
4836 * linux-low.c (linux_async): Replace fatal with warning.
4837 Tidy up and return.
4838 (linux_start_non_stop): Return -1 if linux_async failed.
4839
f7160e97
GB
48402014-08-28 Gary Benson <gbenson@redhat.com>
4841
4842 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4843 gdb_assert.
4844 (i386_dr_low_get_addr): Remove vague comment.
4845 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4846 gdb_assert.
4847
38e08fca
GB
48482014-08-28 Gary Benson <gbenson@redhat.com>
4849
4850 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4851 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4852 internal_error.
4853 (linux_resume_one_lwp): Likewise.
4854 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4855 gdb_assert.
4856 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4857 with internal_error.
4858 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4859 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4860 (find_register_by_name): Replace fatal with internal_error.
4861 (find_regno): Likewise.
4862 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4863 * thread-db.c (thread_db_create_event): Likewise.
4864 (thread_db_load_search): Likewise.
4865 (try_thread_db_load_1): Likewise.
4866 * tracepoint.c (get_jump_space_head): Replace fatal with
4867 internal_error.
4868 (claim_trampoline_space): Likewise.
4869 (have_fast_tracepoint_trampoline_buffer): Likewise.
4870 (cmd_qtstart): Likewise.
4871 (stop_tracing): Likewise.
4872 (fast_tracepoint_collecting): Likewise.
4873 (target_malloc): Likewise.
4874 (download_tracepoint): Likewise.
4875 (download_trace_state_variables): Replace check with gdb_assert.
4876 (upload_fast_traceframes): Replace fatal with internal_error.
4877
34abf635
GB
48782014-08-19 Tom Tromey <tromey@redhat.com>
4879 Gary Benson <gbenson@redhat.com>
4880
4881 * Makefile.in (SFILES): Add common/common-debug.c.
4882 (OBS): Add common-debug.o.
4883 (common-debug.o): New rule.
4884 * debug.h (debug_printf): Don't declare.
4885 * debug.c (debug_printf): Renamed and rewritten as...
4886 (debug_vprintf): New function.
4887
f6e94d78
GB
48882014-08-19 Gary Benson <gbenson@redhat.com>
4889
4890 * utils.h: Do not include print-utils.h.
4891
9239eeab
GB
48922014-08-19 Tom Tromey <tromey@redhat.com>
4893 Gary Benson <gbenson@redhat.com>
4894
4895 * server.h: Add static assertion.
4896 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4897
ef87c8bb
GB
48982014-08-19 Tom Tromey <tromey@redhat.com>
4899 Gary Benson <gbenson@redhat.com>
4900
4901 * Makefile.in (SFILES): Add common/errors.c.
4902 (OBS): Add errors.o.
4903 (IPA_OBS): Add errors-ipa.o.
4904 (errors.o): New rule.
4905 (errors-ipa.o): Likewise.
4906 * utils.h (perror_with_name, error, warning): Don't declare.
4907 * utils.c (warning): Renamed and rewritten as...
4908 (vwarning): New function.
4909 (error): Renamed and rewritten as...
4910 (verror): New function.
4911 (internal_error): Renamed and rewritten as...
4912 (internal_verror): New function.
4913
bb974a24
GB
49142014-08-07 Gary Benson <gbenson@redhat.com>
4915
4916 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4917 * configure: Regenerate.
4918 * config.in: Likewise.
4919 * server.h: Do not include errno.h.
4920 * event-loop.c: Likewise.
4921 * hostio-errno.c: Likewise.
4922 * linux-low.c: Likewise.
4923 * remote-utils.c: Likewise.
4924 * spu-low.c: Likewise.
4925 * utils.c: Likewise.
4926 * gdbreplay.c: Unconditionally include errno.h.
4927
6d3d12eb
GB
49282014-08-07 Gary Benson <gbenson@redhat.com>
4929
4930 * server.h: Do not include string.h.
4931 * event-loop.c: Likewise.
4932 * linux-low.c: Likewise.
4933 * regcache.c: Likewise.
4934 * remote-utils.c: Likewise.
4935 * spu-low.c: Likewise.
4936 * utils.c: Likewise.
4937
dccbb609
GB
49382014-08-07 Gary Benson <gbenson@redhat.com>
4939
4940 * server.h: Do not include gdb_assert.h.
4941
e76df0d0
GB
49422014-08-07 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Do not include common-utils.h.
4945
4cb9c816
GB
49462014-08-07 Gary Benson <gbenson@redhat.com>
4947
4948 * server.h: Do not include ptid.h.
4949 * notif.h: Likewise.
4950
3995eeee
GB
49512014-08-07 Gary Benson <gbenson@redhat.com>
4952
4953 * server.h: Do not include gdb_locale.h.
4954
cb9f1a9b
GB
49552014-08-07 Gary Benson <gbenson@redhat.com>
4956
4957 * server.h: Do not include gdb/signals.h.
4958 * win32-low.c: Likewise.
4959
a5fceff8
GB
49602014-08-07 Gary Benson <gbenson@redhat.com>
4961
4962 * server.h: Do not include pathmax.h.
4963
b9391142
GB
49642014-08-07 Gary Benson <gbenson@redhat.com>
4965
4966 * server.h: Do not include libiberty.h.
4967 * linux-bfin-low.c: Likewise.
4968
0e443c87
GB
49692014-08-07 Gary Benson <gbenson@redhat.com>
4970
4971 * server.h: Do not include ansidecl.h.
4972
8ebb3f56
GB
49732014-08-07 Gary Benson <gbenson@redhat.com>
4974
4975 * linux-x86-low.c: Do not include stddef.h.
4976 * lynx-ppc-low.c: Likewise.
4977 * tracepoint.c: Likewise.
4978
8980bdf6
GB
49792014-08-07 Gary Benson <gbenson@redhat.com>
4980
4981 * server.h: Do not include stdarg.h.
4982 * nto-low.c: Likewise.
4983
d7096f71
GB
49842014-08-07 Gary Benson <gbenson@redhat.com>
4985
4986 * server.h: Do not include stdlib.h.
4987 * inferiors.c: Likewise.
4988 * linux-low.c: Likewise.
4989 * regcache.c: Likewise.
4990 * spu-low.c: Likewise.
4991 * tracepoint.c: Likewise.
4992 * utils.c: Likewise.
4993
d02f550d
GB
49942014-08-07 Gary Benson <gbenson@redhat.com>
4995
4996 * server.h: Do not include stdio.h.
4997 * linux-low.c: Likewise.
4998 * remote-utils.c: Likewise.
4999 * spu-low.c: Likewise.
5000 * utils.c: Likewise.
5001 * wincecompat.c: Likewise.
5002
87f6c4e3
GB
50032014-08-06 Gary Benson <gbenson@redhat.com>
5004
5005 * regcache.c (init_register_cache): Move conditionals inside if.
5006
7089dca4
GB
50072014-08-06 Gary Benson <gbenson@redhat.com>
5008
5009 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5010
462f517e
GB
50112014-07-31 Gary Benson <gbenson@redhat.com>
5012
5013 * ax.h: Do not include server.h.
5014 * gdbthread.h: Likewise.
5015 * lynx-low.h: Likewise.
5016 * notif.h: Likewise.
5017
976411d6
GB
50182014-07-30 Gary Benson <gbenson@redhat.com>
5019
5020 * server.h: Include common-defs.h.
5021 Do not include config.h or build-gnulib-gdbserver/config.h.
5022
d41f6d8e
GB
50232014-07-30 Gary Benson <gbenson@redhat.com>
5024
5025 * hostio-errno.c: Move server.h to top of includes list.
5026 * inferiors.c: Likewise.
5027 * linux-x86-low.c: Likewise.
5028 * notif.c: Include server.h.
5029
314c6a35
TT
50302014-07-24 Tom Tromey <tromey@redhat.com>
5031 Gary Benson <gbenson@redhat.com>
5032
5033 * server.h (CORE_ADDR): Now unsigned.
5034
69ff6be5
PA
50352014-07-16 Pedro Alves <palves@redhat.com>
5036
5037 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5038
ce9e3fe7
PA
50392014-07-15 Pedro Alves <palves@redhat.com>
5040
5041 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5042 copy.
5043
e76126e8
PA
50442014-07-11 Pedro Alves <palves@redhat.com>
5045
5046 * linux-low.c (kill_wait_lwp): New function, based on
5047 kill_one_lwp_callback, but use my_waitpid directly.
5048 (kill_one_lwp_callback, linux_kill): Use it.
5049
8e9db26e
PA
50502014-06-23 Pedro Alves <palves@redhat.com>
5051
5052 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5053 before setting DR0..DR3.
5054
698b3e08
GB
50552014-06-20 Gary Benson <gbenson@redhat.com>
5056
5057 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5058 * configure: Regenerated.
5059 * config.in: Likewise.
5060
125f8a3d
GB
50612014-06-20 Gary Benson <gbenson@redhat.com>
5062
5063 * Makefile.in (SFILES): Update locations for files moved
5064 from common to nat.
5065 (object file files): Reordered.
5066
42995dbd
GB
50672014-06-20 Gary Benson <gbenson@redhat.com>
5068
5069 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5070 (i386_dr_low_set_addr): Likewise.
5071 (i386_dr_low_get_addr): Likewise.
5072 (i386_dr_low_can_set_control): Likewise.
5073 (i386_dr_low_set_control): Likewise.
5074 (i386_dr_low_get_control): Likewise.
5075 (i386_dr_low_get_status): Likewise.
5076 (i386_get_debug_register_length): Likewise.
5077 * linux-x86-low.c (i386_dr_low_set_addr):
5078 Changed signature. Made static.
5079 (i386_dr_low_get_addr): Likewise.
5080 (i386_dr_low_set_control): Likewise.
5081 (i386_dr_low_get_control): Likewise.
5082 (i386_dr_low_get_status): Likewise.
5083 (i386_dr_low): New global variable.
5084 * win32-i386-low.c (i386_dr_low_set_addr):
5085 Changed signature. Made static.
5086 (i386_dr_low_get_addr): Likewise.
5087 (i386_dr_low_set_control): Likewise.
5088 (i386_dr_low_get_control): Likewise.
5089 (i386_dr_low_get_status): Likewise.
5090 (i386_dr_low): New global variable.
5091
e1d2394b
MS
50922014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5093
5094 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5095 * Makefile.in (AR, AR_FLAGS): Define.
5096 * configure: Regenerate.
5097
3a8ee006
GB
50982014-06-19 Gary Benson <gbenson@redhat.com>
5099
5100 * Makefile.in (i386-dregs.o): New rule.
5101 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5102 * i386-low.c (target.h): Remove include.
5103 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5104 (DR_CONTROL_SHIFT): Likewise.
5105 (DR_CONTROL_SIZE): Likewise.
5106 (DR_RW_EXECUTE): Likewise.
5107 (DR_RW_WRITE): Likewise.
5108 (DR_RW_READ): Likewise.
5109 (DR_RW_IORW): Likewise.
5110 (DR_LEN_1): Likewise.
5111 (DR_LEN_2): Likewise.
5112 (DR_LEN_4): Likewise.
5113 (DR_LEN_8): Likewise.
5114 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5115 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5116 (DR_ENABLE_SIZE): Likewise.
5117 (DR_LOCAL_SLOWDOWN): Likewise.
5118 (DR_GLOBAL_SLOWDOWN): Likewise.
5119 (DR_CONTROL_RESERVED): Likewise.
5120 (I386_DR_CONTROL_MASK): Likewise.
5121 (I386_DR_VACANT): Likewise.
5122 (I386_DR_LOCAL_ENABLE): Likewise.
5123 (I386_DR_GLOBAL_ENABLE): Likewise.
5124 (I386_DR_DISABLE): Likewise.
5125 (I386_DR_SET_RW_LEN): Likewise.
5126 (I386_DR_GET_RW_LEN): Likewise.
5127 (I386_DR_WATCH_HIT): Likewise.
5128 (i386_wp_op_t): Likewise.
5129 (i386_show_dr): Likewise.
5130 (i386_length_and_rw_bits): Likewise.
5131 (i386_insert_aligned_watchpoint): Likewise.
5132 (i386_remove_aligned_watchpoint): Likewise.
5133 (i386_handle_nonaligned_watchpoint): Likewise.
5134 i386_update_inferior_debug_regs(): Likewise.
5135 (i386_dr_insert_watchpoint): Likewise.
5136 (i386_dr_remove_watchpoint): Likewise.
5137 (i386_dr_region_ok_for_watchpoint): Likewise.
5138 (i386_dr_stopped_data_address): Likewise.
5139 (i386_dr_stopped_by_watchpoint): Likewise.
5140
8f26655c
GB
51412014-06-19 Gary Benson <gbenson@redhat.com>
5142
5143 * i386-low.c (i386_dr_show): Renamed to
5144 i386_show_dr and made static. All uses updated.
5145 (i386_dr_length_and_rw_bits): Renamed to
5146 i386_length_and_rw_bits and made static.
5147 All uses updated.
5148 (i386_dr_insert_aligned_watchpoint): Renamed to
5149 i386_insert_aligned_watchpoint and made static.
5150 All uses updated.
5151 (i386_dr_remove_aligned_watchpoint): Renamed to
5152 i386_remove_aligned_watchpoint and made static.
5153 All uses updated.
5154 (i386_dr_update_inferior_debug_regs): Renamed to
5155 i386_update_inferior_debug_regs and made static.
5156 All uses updated.
5157
b9228891
GB
51582014-06-18 Gary Benson <gbenson@redhat.com>
5159
5171def3
GB
5160 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5161 (i386_dr_low_can_set_control): Likewise.
5162 (i386_get_debug_register_length): Likewise.
5163 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5164 (i386_dr_low_can_set_control): Likewise.
5165 (i386_get_debug_register_length): Likewise.
5166
51672014-06-17 Gary Benson <gbenson@redhat.com>
5168
b9228891
GB
5169 * i386-low.h (i386-dregs.h): New include.
5170 (DR_FIRSTADDR): Now in i386-dregs.h.
5171 (DR_LASTADDR): Likewise.
5172 (DR_NADDR): Likewise.
5173 (DR_STATUS): Likewise.
5174 (DR_CONTROL): Likewise.
5175 (i386_debug_reg_state): Likewise.
5176 (i386_dr_insert_watchpoint): Likewise.
5177 (i386_dr_remove_watchpoint): Likewise.
5178 (i386_dr_region_ok_for_watchpoint): Likewise.
5179 (i386_dr_stopped_data_address): Likewise.
5180 (i386_dr_stopped_by_watchpoint): Likewise.
5181 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5182
4be83cc2
GB
51832014-06-18 Gary Benson <gbenson@redhat.com>
5184
5185 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5186 i386_dr_insert_watchpoint.
5187 (i386_low_remove_watchpoint): Renamed to
5188 i386_dr_remove_watchpoint.
5189 (i386_low_region_ok_for_watchpoint): Renamed to
5190 i386_dr_region_ok_for_watchpoint.
5191 (i386_low_stopped_data_address): Renamed to
5192 i386_dr_stopped_data_address.
5193 (i386_low_stopped_by_watchpoint): Renamed to
5194 i386_dr_stopped_by_watchpoint.
5195 * i386-low.c (i386_show_dr): Renamed to
5196 i386_dr_show and made nonstatic. All uses updated.
5197 (i386_length_and_rw_bits): Renamed to
5198 i386_dr_length_and_rw_bits and made nonstatic.
5199 All uses updated.
5200 (i386_insert_aligned_watchpoint): Renamed to
5201 i386_dr_insert_aligned_watchpoint and made nonstatic.
5202 All uses updated.
5203 (i386_remove_aligned_watchpoint): Renamed to
5204 i386_dr_remove_aligned_watchpoint and made nonstatic.
5205 All uses updated.
5206 (i386_update_inferior_debug_regs): Renamed to
5207 i386_dr_update_inferior_debug_regs and made nonstatic.
5208 All uses updated.
5209 (i386_low_insert_watchpoint): Renamed to
5210 i386_dr_insert_watchpoint. All uses updated.
5211 (i386_low_remove_watchpoint): Renamed to
5212 i386_dr_remove_watchpoint. All uses updated.
5213 (i386_low_region_ok_for_watchpoint): Renamed to
5214 i386_dr_region_ok_for_watchpoint. All uses updated.
5215 (i386_low_stopped_data_address): Renamed to
5216 i386_dr_stopped_data_address. All uses updated.
5217 (i386_low_stopped_by_watchpoint): Renamed to
5218 i386_dr_stopped_by_watchpoint. All uses updated.
5219
131aa0d4
GB
52202014-06-18 Gary Benson <gbenson@redhat.com>
5221
5222 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5223 (i386_dr_low_can_set_control): Likewise.
5224 (i386_insert_aligned_watchpoint): New check.
5225
d9305f7f
GB
52262014-06-18 Gary Benson <gbenson@redhat.com>
5227
5228 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5229 Renamed to state.
5230
e927c9fc
GB
52312014-06-18 Gary Benson <gbenson@redhat.com>
5232
5233 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5234 instead of fatal and error.
5235 (i386_handle_nonaligned_watchpoint): Likewise.
5236
1b6d4134
GB
52372014-06-18 Gary Benson <gbenson@redhat.com>
5238
5239 * i386-low.c (i386_get_debug_register_length): New macro.
5240 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5241 (i386_show_dr): Use debug_printf instead of fprintf. Use
5242 phex to format values.
5243
6e62758f
GB
52442014-06-18 Gary Benson <gbenson@redhat.com>
5245
5246 * i386-low.h: Comment changes.
5247 * i386-low.c: Likewise.
5248
fc6e2f03
GB
52492014-06-18 Gary Benson <gbenson@redhat.com>
5250
5251 * i386-low.c: Whitespace changes.
5252
f9d1eeed
TT
52532014-06-12 Tom Tromey <tromey@redhat.com>
5254
5255 * utils.c (freeargv): Remove.
5256
0b04e523
TT
52572014-06-12 Tom Tromey <tromey@redhat.com>
5258
5259 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5260 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5261 (parse_debug_format_options): Likewise.
5262 (gdbserver_usage): Likewise.
5263 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5264 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5265 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5266 against libiberty.
5267 ($(LIBGNU)): Depend on libiberty.
5268 (all-lib): Recurse into all subdirs.
5269 (install-only): Invoke "install" target in subdirs.
5270 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5271 targets.
5272 * configure: Rebuild.
5273 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5274 for vasprintf, vsnprintf, or gettimeofday.
5275 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5276 srv_tgtobj.
5277
270c9937
JB
52782014-06-05 Joel Brobecker <brobecker@adacore.com>
5279
5280 * development.sh: Delete.
5281 * Makefile.in (config.status): Adjust dependency on development.sh.
5282 * configure.ac: Adjust development.sh source call.
5283 * configure: Regenerate.
5284
0a261ed8
PA
52852014-06-02 Pedro Alves <palves@redhat.com>
5286
5287 * ax.c (gdb_free_agent_expr): New function.
5288 * ax.h (gdb_free_agent_expr): New declaration.
5289 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5290 list.
5291 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5292 static.
5293 (clear_breakpoint_conditions_and_commands): New function.
5294 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5295 (clear_breakpoint_conditions_and_commands): New declaration.
5296
e9dae05e
RR
52972014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5298
5299 * linux-aarch64-low.c (asm/ptrace.h): Include.
5300
5876f503
JK
53012014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5302
5303 Fix TLS access for -static -pthread.
5304 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5305 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5306 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5307
802e8e6d
PA
53082014-05-20 Pedro Alves <palves@redhat.com>
5309
5310 * linux-aarch64-low.c (aarch64_insert_point)
5311 (aarch64_remove_point): No longer check whether the type is
5312 supported here. Adjust to new interface.
5313 (the_low_target): Install aarch64_supports_z_point_type as
5314 supports_z_point_type method.
5315 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5316 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5317 instead of a Z packet char. Adjust.
5318 (arm_supports_z_point_type): New function.
5319 (arm_insert_point, arm_remove_point): Adjust to new interface.
5320 (the_low_target): Install arm_supports_z_point_type.
5321 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5322 (cris_insert_point, cris_remove_point): Adjust to new interface.
5323 Don't check whether the type is supported here.
5324 (the_low_target): Install cris_supports_z_point_type.
5325 * linux-low.c (linux_supports_z_point_type): New function.
5326 (linux_insert_point, linux_remove_point): Adjust to new interface.
5327 * linux-low.h (struct linux_target_ops) <insert_point,
5328 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5329 raw_breakpoint pointer parameter.
5330 <supports_z_point_type>: New method.
5331 * linux-mips-low.c (mips_supports_z_point_type): New function.
5332 (mips_insert_point, mips_remove_point): Adjust to new interface.
5333 Use mips_supports_z_point_type.
5334 (the_low_target): Install mips_supports_z_point_type.
5335 * linux-ppc-low.c (the_low_target): Install NULL as
5336 supports_z_point_type method.
5337 * linux-s390-low.c (the_low_target): Install NULL as
5338 supports_z_point_type method.
5339 * linux-sparc-low.c (the_low_target): Install NULL as
5340 supports_z_point_type method.
5341 * linux-x86-low.c (x86_supports_z_point_type): New function.
5342 (x86_insert_point): Adjust to new insert_point interface. Use
5343 insert_memory_breakpoint. Adjust to new
5344 i386_low_insert_watchpoint interface.
5345 (x86_remove_point): Adjust to remove_point interface. Use
5346 remove_memory_breakpoint. Adjust to new
5347 i386_low_remove_watchpoint interface.
5348 (the_low_target): Install x86_supports_z_point_type.
5349 * lynx-low.c (lynx_target_ops): Install NULL as
5350 supports_z_point_type callback.
5351 * nto-low.c (nto_supports_z_point_type): New.
5352 (nto_insert_point, nto_remove_point): Adjust to new interface.
5353 (nto_target_ops): Install nto_supports_z_point_type.
5354 * mem-break.c: Adjust intro comment.
5355 (struct raw_breakpoint) <raw_type, size>: New fields.
5356 <inserted>: Update comment.
5357 <shlib_disabled>: Delete field.
5358 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5359 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5360 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5361 (raw_bkpt_type_to_target_hw_bp_type): New function.
5362 (find_enabled_raw_code_breakpoint_at): New function.
5363 (find_raw_breakpoint_at): New type and size parameters. Use them.
5364 (insert_memory_breakpoint): New function, based off
5365 set_raw_breakpoint_at.
5366 (remove_memory_breakpoint): New function.
5367 (set_raw_breakpoint_at): Reimplement.
5368 (set_breakpoint): New, based on set_breakpoint_at.
5369 (set_breakpoint_at): Reimplement.
5370 (delete_raw_breakpoint): Go through the_target->remove_point
5371 instead of assuming memory breakpoints.
5372 (find_gdb_breakpoint_at): Delete.
5373 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5374 (find_gdb_breakpoint): New function.
5375 (set_gdb_breakpoint_at): Delete.
5376 (z_type_supported): New function.
5377 (set_gdb_breakpoint_1): New function, loosely based off
5378 set_gdb_breakpoint_at.
5379 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5380 (delete_gdb_breakpoint_at): Delete.
5381 (delete_gdb_breakpoint_1): New function, loosely based off
5382 delete_gdb_breakpoint_at.
5383 (delete_gdb_breakpoint): New function.
5384 (clear_gdb_breakpoint_conditions): Rename to ...
5385 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5386 breakpoint.
5387 (add_condition_to_breakpoint): Make static.
5388 (add_breakpoint_condition): Take a struct breakpoint pointer
5389 instead of an address. Adjust.
5390 (gdb_condition_true_at_breakpoint): Rename to ...
5391 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5392 z_type parameter.
5393 (gdb_condition_true_at_breakpoint): Reimplement.
5394 (add_breakpoint_commands): Take a struct breakpoint pointer
5395 instead of an address. Adjust.
5396 (gdb_no_commands_at_breakpoint): Rename to ...
5397 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5398 parameter. Return true if no breakpoint was found. Change debug
5399 output.
5400 (gdb_no_commands_at_breakpoint): Reimplement.
5401 (run_breakpoint_commands): Rename to ...
5402 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5403 and change return type to boolean.
5404 (run_breakpoint_commands): New function.
5405 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5406 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5407 breakpoint. Go through the_target->remove_point instead of
5408 assuming memory breakpoint.
5409 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5410 software and hardware breakpoints.
5411 (reinsert_raw_breakpoint): Go through the_target->insert_point
5412 instead of assuming memory breakpoint.
5413 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5414 software and hardware breakpoints.
5415 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5416 Check both software and hardware breakpoints.
5417 (validate_inserted_breakpoint): Assert the breakpoint is a
5418 software breakpoint. Set the inserted flag to -1 instead of
5419 setting shlib_disabled.
5420 (delete_disabled_breakpoints): Adjust.
5421 (validate_breakpoints): Only validate software breakpoints.
5422 Adjust to inserted flag change.
5423 (check_mem_read, check_mem_write): Skip breakpoint types other
5424 than software breakpoints. Adjust to inserted flag change.
5425 * mem-break.h (enum raw_bkpt_type): New enum.
5426 (raw_breakpoint, struct process_info): Forward declare.
5427 (Z_packet_to_target_hw_bp_type): Delete declaration.
5428 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5429 (set_gdb_breakpoint, delete_gdb_breakpoint)
5430 (clear_breakpoint_conditions): New declarations.
5431 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5432 (breakpoint_inserted_here): Update comment.
5433 (add_breakpoint_condition, add_breakpoint_commands): Replace
5434 address parameter with a breakpoint pointer parameter.
5435 (gdb_breakpoint_here): Update comment.
5436 (delete_gdb_breakpoint_at): Delete.
5437 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5438 * server.c (process_point_options): Take a struct breakpoint
5439 pointer instead of an address. Adjust.
5440 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5441 delete_gdb_breakpoint.
5442 * spu-low.c (spu_target_ops): Install NULL as
5443 supports_z_point_type method.
5444 * target.h: Include mem-break.h.
5445 (struct target_ops) <prepare_to_access_memory>: Update comment.
5446 <supports_z_point_type>: New field.
5447 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5448 instead of a char. Also take a raw breakpoint pointer.
5449 * win32-arm-low.c (the_low_target): Install NULL as
5450 supports_z_point_type.
5451 * win32-i386-low.c (i386_supports_z_point_type): New function.
5452 (i386_insert_point, i386_remove_point): Adjust to new interface.
5453 (the_low_target): Install i386_supports_z_point_type.
5454 * win32-low.c (win32_supports_z_point_type): New function.
5455 (win32_insert_point, win32_remove_point): Adjust to new interface.
5456 (win32_target_ops): Install win32_supports_z_point_type.
5457 * win32-low.h (struct win32_target_ops):
5458 <supports_z_point_type>: New method.
5459 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5460 instead of a char. Also take a raw breakpoint pointer.
5461
932539e3
PA
54622014-05-20 Pedro Alves <palves@redhat.com>
5463
5464 * mem-break.h: Include break-common.h.
5465 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5466 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5467 (Z_packet_to_target_hw_bp_type): New declaration.
5468 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5469 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5470 (Z_PACKET_ACCESS_WP): Delete macros.
5471 (Z_packet_to_hw_type): Delete function.
5472 * i386-low.h: Don't include break-common.h here.
5473 (Z_packet_to_hw_type): Delete declaration.
5474 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5475 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5476 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5477 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5478 * linux-aarch64-low.c: Don't include break-common.h here.
5479 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5480 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5481 (Z_packet_to_target_hw_bp_type): Delete function.
5482 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5483 function.
5484 (mips_insert_point, mips_remove_point): Use
5485 Z_packet_to_target_hw_bp_type.
5486
4ff0d3d8
PA
54872014-05-20 Pedro Alves <palves@redhat.com>
5488
5489 * linux-aarch64-low.c: Include break-common.h.
5490 (enum target_point_type): Delete.
5491 (Z_packet_to_point_type): Rename to ...
5492 (Z_packet_to_target_hw_bp_type): ... this, and return a
5493 target_hw_bp_type instead.
5494 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5495 instead of an enum target_point_type.
5496 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5497 breakpoint type.
5498 (aarch64_dr_state_insert_one_point)
5499 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5500 (aarch64_handle_aligned_watchpoint)
5501 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5502 Take an enum target_hw_bp_type instead of an enum
5503 target_point_type.
5504 (aarch64_supports_z_point_type): New function.
5505 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5506 use Z_packet_to_target_hw_bp_type.
5507
786dc519
JB
55082014-05-20 Joel Brobecker <brobecker@adacore.com>
5509
5510 * configure.ac: Only use -Werror by default when DEVELOPMENT
5511 is true.
5512 * configure: Regenerate.
5513
9e0aa64f
JK
55142014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5515
5516 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5517 * linux-x86-low.c (X86_64_USER_REGS): New.
5518 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5519
2b577b92
YQ
55202014-04-28 Yao Qi <yao@codesourcery.com>
5521
5522 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5523 name.
5524
94611da2
PA
55252014-04-25 Pedro Alves <palves@redhat.com>
5526
5527 PR server/16255
5528 * linux-low.c (linux_attach_fail_reason_string): New function.
5529 (linux_attach_lwp): Delete.
5530 (linux_attach_lwp_1): Rename to ...
5531 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5532 argument. Remove "initial" parameter. Return int instead of
5533 void. Don't error or warn here.
5534 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5535 failure to attach to the tgid. Call warning when failing to
5536 attach to an lwp.
5537 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5538 argument. Remove "initial" parameter. Return int instead of
5539 void. Don't error or warn here.
5540 (linux_attach_fail_reason_string): New declaration.
5541 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5542 interface change. Use linux_attach_fail_reason_string.
5543
01f9f808
MS
55442014-04-24 Michael Sturm <michael.sturm@mintel.com>
5545 Walfred Tedeschi <walfred.tedeschi@intel.com>
5546
5547 * Makefile.in: Added rules to handle new files
5548 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5549 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5550 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5551 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5552 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5553 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5554 x32-avx512-linux.o.
5555 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5556 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5557 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5558 i386/x32-avx512.xml.
5559 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5560 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5561 i386/x32-avx512-linux.xml.
5562 * i387-fp.c (num_avx512_k_registers): New constant for number
5563 of K registers.
5564 (num_avx512_zmmh_low_registers): New constant for number of
5565 lower ZMM registers (0-15).
5566 (num_avx512_zmmh_high_registers): New constant for number of
5567 higher ZMM registers (16-31).
5568 (num_avx512_ymmh_registers): New contant for number of higher
5569 YMM registers (ymm16-31 added by avx521 on x86_64).
5570 (num_avx512_xmm_registers): New constant for number of higher
5571 XMM registers (xmm16-31 added by AVX512 on x86_64).
5572 (struct i387_xsave): Add space for AVX512 registers.
5573 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5574 Add code to handle AVX512 registers.
5575 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5576 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5577 prototypei from generated file.
5578 (tdesc_amd64_avx512_linux): Likewise.
5579 (init_registers_x32_avx512_linux): Likewise.
5580 (tdesc_x32_avx512_linux): Likewise.
5581 (init_registers_i386_avx512_linux): Likewise.
5582 (tdesc_i386_avx512_linux): Likewise.
5583 (x86_64_regmap): Add AVX512 registers.
5584 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5585 mask.
5586 (initialize_low_arch): Add code to initialize AVX512 registers.
5587
51aa91f9
PA
55882014-04-23 Pedro Alves <palves@redhat.com>
5589
5590 * mem-break.c (find_gdb_breakpoint_at): Make static.
5591 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5592
a4165e94
PA
55932014-04-23 Pedro Alves <palves@redhat.com>
5594
5595 * i386-low.c: Don't include break-common.h here.
5596 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5597 prototype to take target_hw_bp_type as argument instead of a Z
5598 packet char.
5599 * i386-low.h: Include break-common.h here.
5600 (Z_packet_to_hw_type): Declare.
5601 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5602 prototypes.
5603 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5604 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5605 (x86_remove_point): Convert the packet number to a
5606 target_hw_bp_type before calling i386_low_remove_watchpoint.
5607 * win32-i386-low.c (i386_insert_point): Convert the packet number
5608 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5609 (i386_remove_point): Convert the packet number to a
5610 target_hw_bp_type before calling i386_low_remove_watchpoint.
5611
b8acf843
PA
56122014-04-23 Pedro Alves <palves@redhat.com>
5613
5614 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5615
d708bcd1
PA
56162014-04-10 Pedro Alves <palves@redhat.com>
5617
5618 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5619 Check if the condition or command is NULL before checking if the
5620 breakpoint is known. On success, return true.
5621 * mem-break.h (add_breakpoint_condition): Document return.
5622 (add_breakpoint_commands): Add describing comment.
5623 * server.c (skip_to_semicolon): New function.
5624 (process_point_options): Use it.
5625
2eec7d5b
PA
56262014-04-09 Pedro Alves <palves@redhat.com>
5627
5628 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5629 to lwpid_of.
5630
fa96cb38
PA
56312014-02-27 Pedro Alves <palves@redhat.com>
5632
5633 PR 12702
5634 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5635 macros.
5636 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5637 output.
5638 (last_thread_of_process_p): Take a PID argument instead of a
5639 thread pointer.
5640 (linux_wait_for_lwp): Delete.
5641 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5642 functions.
5643 (linux_low_filter_event): New function, party factored out from
5644 linux_wait_for_event.
5645 (linux_wait_for_event): Rename to ...
5646 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5647 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5648 sigsuspend. Check for zombie leaders.
5649 (linux_wait_for_event): Reimplement as wrapper around
5650 linux_wait_for_event_filtered.
5651 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5652 a normal or signal exit is seen, it's the whole process exiting.
5653 (wait_for_sigstop): No longer a for_each_inferior callback.
5654 Rewrite on top of linux_wait_for_event_filtered.
5655 (stop_all_lwps): Call wait_for_sigstop directly.
5656 * server.c (resume, handle_target_event): Handle
5657 TARGET_WAITKIND_NO_RESUMED.
5658
d763de10
JB
56592014-02-26 Joel Brobecker <brobecker@adacore.com>
5660
5661 * win32-low.c (psapi_get_dll_name,
5662 * win32_CreateToolhelp32Snapshot): Delete.
5663 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5664 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5665 Delete.
5666 (handle_load_dll): Add function description.
5667 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5668
850a0f76
JB
56692014-02-26 Joel Brobecker <brobecker@adacore.com>
5670
5671 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5672 Add comment.
5673 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5674 base address when calling win32_add_one_solib.
5675 (handle_load_dll): Delete local variable load_addr.
5676 Remove 0x1000 offset applied to DLL base address when calling
5677 win32_add_one_solib.
5678 (handle_unload_dll): Add comment.
5679
f25b3fc3
JB
56802014-02-26 Joel Brobecker <brobecker@adacore.com>
5681
5682 * win32-low.c (win32_add_all_dlls): Renames
5683 win32_ensure_ntdll_loaded. Rewrite function documentation.
5684 Adjust implementation to always load all DLLs.
5685 Add 0x1000 offset to DLL base address when calling
5686 win32_add_one_solib.
5687 (child_initialization_done): New static global.
5688 (do_initial_child_stuff): Set child_initialization_done to
5689 zero during child initialization, and 1 after. Replace call
5690 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5691 Add comment.
5692 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5693 (handle_unload_dll): Add function documentation.
5694 (get_child_debug_event): Ignore load and unload DLL events
5695 during child initialization.
5696
d86d4aaf
DE
56972014-02-20 Doug Evans <dje@google.com>
5698
3bc32da3 5699 Remove global all_lwps.
d86d4aaf
DE
5700 * inferiors.h (ptid_of): Move here from linux-low.h.
5701 (pid_of, lwpid_of): Ditto.
5702 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5703 parameter is a struct thread_info * now.
5704 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5705 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5706 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5707 directly.
5708 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5709 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5710 * linux-arm-low.c (update_registers_callback): Update, "entry"
5711 parameter is a struct thread_info * now.
5712 Fetch lwpid from current_inferior directly.
5713 (arm_insert_point): Pass &all_threads to find_inferior instead of
5714 &all_lwps.
5715 (arm_remove_point): Ditto.
5716 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5717 (arm_prepare_to_resume): Fetch pid from thread.
5718 (arm_read_description): Fetch lwpid from current_inferior directly.
5719 * linux-low.c (all_lwps): Delete.
5720 (delete_lwp): Delete call to remove_inferior.
5721 (handle_extended_wait): Fetch lwpid from thread.
5722 (add_lwp): Don't set lwp->entry.id. Remove call to
5723 add_inferior_to_list.
5724 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5725 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5726 (kill_one_lwp_callback): Ditto.
5727 (linux_kill): Don't dereference NULL pointer.
5728 Fetch ptid,lwpid from thread.
5729 (get_detach_signal): Fetch ptid from thread.
5730 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5731 Simplify call to regcache_invalidate_thread.
5732 (delete_lwp_callback): Update, "entry" parameter is a
5733 struct thread_info * now. Fetch pid from thread.
5734 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5735 (status_pending_p_callback): Update, "entry" parameter is a
5736 struct thread_info * now. Fetch ptid from thread.
5737 (find_lwp_pid): Update, "entry" parameter is a
5738 struct thread_info * now.
5739 (linux_wait_for_lwp): Fetch pid from thread.
5740 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5741 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5742 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5743 (dequeue_one_deferred_signal): Ditto.
5744 (cancel_breakpoint): Fetch ptid from current_inferior.
5745 (linux_wait_for_event): Pass &all_threads to find_inferior,
5746 not &all_lwps. Fetch ptid, lwpid from thread.
5747 (count_events_callback): Update, "entry" parameter is a
5748 struct thread_info * now.
5749 (select_singlestep_lwp_callback): Ditto.
5750 (select_event_lwp_callback): Ditto.
5751 (cancel_breakpoints_callback): Ditto.
5752 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5753 not &all_lwps.
5754 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5755 (unsuspend_one_lwp): Update, "entry" parameter is a
5756 struct thread_info * now.
5757 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5758 not &all_lwps.
5759 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5760 Fetch lwpid from thread, not lwp.
5761 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5762 Pass &all_threads to find_inferior, not &all_lwps.
5763 (send_sigstop): Fetch lwpid from thread, not lwp.
5764 (send_sigstop_callback): Update, "entry" parameter is a
5765 struct thread_info * now.
5766 (suspend_and_send_sigstop_callback): Ditto.
5767 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5768 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5769 struct thread_info * now.
5770 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5771 from thread, lwp.
5772 (lwp_running): Update, "entry" parameter is a
5773 struct thread_info * now.
5774 (stop_all_lwps): Fetch ptid from thread.
5775 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5776 (linux_resume_one_lwp): Fetch lwpid from thread.
5777 (linux_set_resume_request): Update, "entry" parameter is a
5778 struct thread_info * now. Fetch pid, lwpid from thread.
5779 (resume_status_pending_p): Update, "entry" parameter is a
5780 struct thread_info * now.
5781 (need_step_over_p): Ditto. Fetch lwpid from thread.
5782 (start_step_over): Fetch lwpid from thread.
5783 (linux_resume_one_thread): Update, "entry" parameter is a
5784 struct thread_info * now. Fetch lwpid from thread.
5785 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5786 (proceed_one_lwp): Update, "entry" parameter is a
5787 struct thread_info * now. Fetch lwpid from thread.
5788 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5789 struct thread_info * now.
5790 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5791 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5792 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5793 directly.
5794 (regsets_store_inferior_registers): Ditto.
5795 (fetch_register, store_register): Ditto.
5796 (linux_read_memory, linux_write_memory): Ditto.
5797 (linux_request_interrupt): Ditto.
5798 (linux_read_auxv): Ditto.
5799 (linux_xfer_siginfo): Ditto.
5800 (linux_qxfer_spu): Ditto.
5801 (linux_qxfer_libraries_svr4): Ditto.
5802 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5803 moved to inferiors.h.
5804 (get_lwp): Delete.
5805 (get_thread_lwp): Update.
5806 (struct lwp_info): Delete member "entry". Simplify comment for
5807 member "thread".
5808 (all_lwps): Delete.
5809 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5810 current_inferior directly.
5811 (update_watch_registers_callback): Update, "entry" parameter is a
5812 struct thread_info * now. Fetch pid from thread.
5813 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5814 (mips_insert_point): Fetch lwpid from current_inferior.
5815 Pass &all_threads to find_inferior, not &all_lwps.
5816 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5817 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5818 directly.
5819 (mips_stopped_data_address): Ditto.
5820 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5821 directly.
5822 * linux-tile-low.c (tile_arch_setup): Ditto.
5823 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5824 (update_debug_registers_callback): Update, "entry" parameter is a
5825 struct thread_info * now. Fetch pid from thread.
5826 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5827 Pass &all_threads to find_inferior, not &all_lwps.
5828 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5829 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5830 Pass &all_threads to find_inferior, not &all_lwps.
5831 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5832 (i386_dr_low_get_status): Ditto.
5833 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5834 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5835 (x86_linux_read_description): Ditto.
5836 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5837
3b8361aa
DE
58382014-02-20 Doug Evans <dje@google.com>
5839
5840 * inferiors.c (get_first_inferior): Fix buglet.
5841
f7667f0d
DE
58422014-02-19 Doug Evans <dje@google.com>
5843
5844 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5845 * inferiors.c (add_thread): Change result type to struct thread_info *.
5846 All callers updated.
5847 (add_lwp): Call add_thread here instead of in callers.
5848 All callers updated.
5849 * linux-low.h (get_lwp_thread): Rewrite.
5850 (struct lwp_info): New member "thread".
5851
b3312d80
DE
58522014-02-19 Doug Evans <dje@google.com>
5853
5854 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5855 All callers updated.
5856
ecc6f45c
DE
58572014-02-19 Doug Evans <dje@google.com>
5858
5859 * inferiors.c (add_thread): Fix whitespace.
5860
649ebbca
DE
58612014-02-19 Doug Evans <dje@google.com>
5862
5863 * dll.c (clear_dlls): Replace accessing list implemention details
5864 with API function.
5865 * gdbthread.h (get_first_thread): Declare.
5866 * inferiors.c (for_each_inferior_with_data): New function.
5867 (get_first_thread): New function.
5868 (find_thread_ptid): Simplify.
5869 (get_first_inferior): New function.
5870 (clear_list): Delete.
5871 (one_inferior_p): New function.
5872 (clear_inferior_list): New function.
5873 (clear_inferiors): Update.
5874 * inferiors.h (for_each_inferior_with_data): Declare.
5875 (clear_inferior_list): Declare.
5876 (one_inferior_p): Declare.
5877 (get_first_inferior): Declare.
5878 * linux-low.c (linux_wait_for_event): Replace accessing list
5879 implemention details with API function.
5880 * server.c (target_running): Ditto.
5881 (accumulate_file_name_length): New function.
5882 (emit_dll_description): New function.
5883 (handle_qxfer_libraries): Replace accessing list implemention
5884 details with API function.
5885 (handle_qxfer_threads_worker): New function.
5886 (handle_qxfer_threads_proper): Replace accessing list implemention
5887 details with API function.
5888 (handle_query): Ditto.
5889 (visit_actioned_threads_callback_ftype): New typedef.
5890 (visit_actioned_threads_data): New struct.
5891 (visit_actioned_threads): Rewrite to be find_inferior callback.
5892 (resume): Call find_inferior.
5893 (handle_status): Replace accessing list implemention
5894 details with API function.
5895 (process_serial_event): Replace accessing list implemention details
5896 with API function.
5897 * target.c (set_desired_inferior): Replace accessing list implemention
5898 details with API function.
5899 * tracepoint.c (same_process_p): New function.
5900 (gdb_agent_about_to_close): Replace accessing list implemention
5901 details with API function.
5902 * win32-low.c (child_delete_thread): Replace accessing list
5903 implemention details with API function.
5904 (match_dll_by_basename): New function.
5905 (dll_is_loaded_by_basename): New function.
5906 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5907 details call to dll_is_loaded_by_basename.
5908
80894984
DE
59092014-02-19 Doug Evans <dje@google.com>
5910
5911 * dll.h (struct dll_info): Add comment.
5912 * gdbthread.h (struct thread_info): Add comment.
5913 (current_ptid): Simplify.
5914 * inferiors.c (add_process): Update.
5915 (remove_process): Update.
5916 * inferiors.h (struct process_info): Rename member "head" to "entry".
5917 * linux-low.c (delete_lwp): Update.
5918 (add_lwp): Update.
5919 (last_thread_of_process_p): Update.
5920 (kill_one_lwp_callback, linux_kill): Update.
5921 (status_pending_p_callback): Update.
5922 (wait_for_sigstop): Update. Simplify read of ptid.
5923 (start_step_over): Update.
5924 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5925 (get_lwp_thread): Update.
5926 (struct lwp_info): Rename member "head" to "entry".
5927 * regcache.h (inferior_list_entry): Delete.
5928 * server.c (kill_inferior_callback): Update.
5929 (detach_or_kill_inferior_callback): Update.
5930 (print_started_pid): Update.
5931 (print_attached_pid): Update.
5932 (process_serial_event): Simplify read of ptid.
5933 * thread-db.c (thread_db_create_event): Update.
5934 (thread_db_get_tls_address): Update.
5935 * win32-low.c (current_inferior_ptid): Simplify.
5936
46917d26
TT
59372014-02-19 Tom Tromey <tromey@redhat.com>
5938
5939 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5940 argument.
5941 (target_supports_btrace): Update.
5942
0759a81e
YQ
59432014-02-14 Yao Qi <yao@codesourcery.com>
5944
5945 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5946 (rsp-low-ipa.o): New target.
5947
a7191e8b
TT
59482014-02-12 Tom Tromey <tromey@redhat.com>
5949
5950 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5951 convert_ascii_to_int.
5952 * regcache.c (registers_to_string): Likewise.
5953 * remote-utils.c (decode_M_packet): Likewise.
5954 * server.c (process_serial_event): Likewise.
5955
ff0e980e
TT
59562014-02-12 Tom Tromey <tromey@redhat.com>
5957
5958 * server.c (handle_query, handle_v_run): Use hex2bin, not
5959 unhexify.
5960 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5961
e9371aff
TT
59622014-02-12 Tom Tromey <tromey@redhat.com>
5963
5964 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5965 convert_int_to_ascii.
5966 * regcache.c (registers_to_string, collect_register_as_string):
5967 Likewise.
5968 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5969 Likewise.
5970 * server.c (process_serial_event): Likewise.
5971 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5972 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5973
971dc0b8
TT
59742014-02-12 Tom Tromey <tromey@redhat.com>
5975
5976 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5977 bin2hex, not hexify.
5978 * tracepoint.c (cmd_qtstatus): Likewise.
5979
0a822afb
TT
59802014-02-12 Tom Tromey <tromey@redhat.com>
5981
5982 * remote-utils.c (monitor_output): Pass explicit length to
5983 hexify.
5984
9c3d6531
TT
59852014-02-12 Tom Tromey <tromey@redhat.com>
5986
5987 * tracepoint.c: Include rsp-low.h.
5988 * server.c: Include rsp-low.h.
5989 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5990 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5991 declare.
5992 * remote-utils.c: Include rsp-low.h.
5993 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5994 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5995 (convert_int_to_ascii, convert_ascii_to_int): Move to
5996 common/rsp-low.c.
5997 * regcache.c: Include rsp-low.h.
5998 * ax.c: Include rsp-low.h.
5999 * Makefile.in (SFILES): Add common/rsp-low.c.
6000 (OBS): Add rsp-low.o.
6001 (rsp-low.o): New target.
6002
01fd3ea5
TT
60032014-02-12 Tom Tromey <tromey@redhat.com>
6004
6005 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6006 Include print-utils.h.
6007 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6008 (plongest, thirty_two, phex_nz): Remove.
6009 * Makefile.in (SFILES): Add common/print-utils.c.
6010 (OBS): Add print-utils.o.
6011 (print-utils-ipa.o): New target.
6012 (print-utils.o): New target.
6013 (IPA_OBJS): Add print-utils-ipa.o.
6014
e99dc820
TT
60152014-02-06 Tom Tromey <tromey@redhat.com>
6016
6017 * Makefile.in (SFILES): Fix indentation.
6018
ee1e2d4f
DE
60192014-02-05 Doug Evans <dje@google.com>
6020
6021 * linux-low.c (linux_wait_for_event): Improve comment.
6022 (linux_wait_1): Keep current_inferior in sync with event_child.
6023
f5a02773
DE
60242014-01-22 Doug Evans <dje@google.com>
6025
6026 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6027
87ce2a04
DE
60282014-01-22 Doug Evans <dje@google.com>
6029
6030 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6031 * configure: Regenerate.
6032 * config.in: Regenerate.
6033 * Makefile.in (SFILES): Add debug.c.
6034 (OBS): Add debug.o.
6035 * debug.c: New file.
6036 * debug.h: New file.
6037 * linux-aarch64-low.c (*): Update all debugging printfs to use
6038 debug_printf instead of fprintf.
6039 * linux-arm-low.c (*): Ditto.
6040 * linux-cris-low.c (*): Ditto.
6041 * linux-crisv32-low.c (*): Ditto.
6042 * linux-m32r-low.c (*): Ditto.
6043 * linux-sparc-low.c (*): Ditto.
6044 * linux-x86.c (*): Ditto.
6045 * linux-low.c (*): Ditto.
6046 (linux_wait_1): Add calls to debug_enter, debug_exit.
6047 (linux_wait): Remove redundant debugging printf.
6048 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6049 (linux_resume, unstop_all_lwps): Ditto.
6050 * mem-break.c (*): Update all debugging printfs to use
6051 debug_printf instead of fprintf.
6052 * remote-utils.c (*): Ditto.
6053 * thread-db.c (*): Ditto.
6054 * server.c #include <ctype.h>, "gdb_vecs.h".
6055 (debug_threads): Moved to debug.c.
6056 (*): Update all debugging printfs to use debug_printf instead of
6057 fprintf.
6058 (start_inferior): Replace call to fflush with call to debug_flush.
6059 (monitor_show_help): Mention set debug-format.
6060 (parse_debug_format_options): New function.
6061 (handle_monitor_command): Handle "monitor set debug-format".
6062 (gdbserver_usage): Mention --debug-format.
6063 (main): Parse --debug-format.
6064 * server.h (debug_threads): Declaration moved to debug.h.
6065 #include "debug.h".
6066 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6067 trace_debug_1 that uses debug_printf.
6068 (tracepoint_look_up_symbols): Update all debugging printfs to use
6069 debug_printf instead of fprintf.
6070
e671835b
BS
60712014-01-20 Baruch Siach <baruch@tkos.co.il>
6072
6073 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6074 sys/ptrace.h.
6075
b5737fa9
PA
60762014-01-17 Pedro Alves <palves@redhat.com>
6077
ea38d2a9 6078 PR build/16445
c7faa97a
PA
6079 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6080 defined after including gdb_proc_service.h.
b5737fa9 6081
40ed484e
DE
60822014-01-16 Doug Evans <dje@google.com>
6083
6084 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6085 (match_dll): Use it.
6086
969c39fb
MM
60872014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6088
6089 * target.h (target_ops) <read_btrace>: Change parameters and
6090 return type to allow error reporting.
6091 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6092 trace reading errors on.
6093 * linux-low.c (linux_low_read_btrace): Pass trace reading
6094 errors on.
6095 (linux_low_disable_btrace): New.
6096
ab7f45ba
DE
60972014-01-15 Doug Evans <dje@google.com>
6098
6099 * inferiors.c (thread_id_to_gdb_id): Delete.
6100 * inferiors.h (thread_id_to_gdb_id): Delete.
6101
66af0f44
EZ
61022014-01-13 Eli Zaretskii <eliz@gnu.org>
6103
6104 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6105 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6106 versions.
6107
9939e131
PA
61082014-01-08 Pedro Alves <palves@redhat.com>
6109
6110 * server.c (handle_status): Don't discard previous queued stop
6111 replies or thread's pending status here.
6112 (main) <disconnection>: Do it here instead.
6113
b7ea362b
PA
61142014-01-08 Pedro Alves <palves@redhat.com>
6115
6116 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6117 * server.c (visit_actioned_threads, handle_pending_status): New
6118 function.
6119 (handle_v_cont): Factor out parts to ...
6120 (resume): ... this new function. If in all-stop, and a thread
6121 being resumed has a pending status, report it without actually
6122 resuming.
6123 (myresume): Adjust to use the new 'resume' function.
6124 (clear_pending_status_callback, set_pending_status_callback)
6125 (find_status_pending_thread_callback): New functions.
6126 (handle_status): Handle the case of multiple threads having
6127 interesting statuses to report. Report threads' real last signal
6128 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6129 with an interesting thread to report the status for, instead of
6130 always reporting the status of the first thread.
6131
28498c42
JB
61322014-01-01 Joel Brobecker <brobecker@adacore.com>
6133
6134 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6135 * gdbreplay.c (gdbreplay_version): Likewise.
6136
f45c82da
YZ
61372013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6138
6139 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6140 iov.iov_len with the real length in use.
6141
379a5e2d
JB
61422013-12-13 Joel Brobecker <brobecker@adacore.com>
6143
6144 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6145 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6146 for all targets that use win32-low.c.
6147 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6148 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6149
4210d83e
PA
61502013-12-13 Pedro Alves <palves@redhat.com>
6151
6152 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6153 if equal to TARGET_WAITKIND_LOADED.
6154 * win32-low.c (cached_status): New static global.
6155 (win32_wait): Add declaration.
6156 (do_initial_child_stuff): Flush all initial pending debug events
6157 up to the initial breakpoint.
6158 (win32_wait): If CACHED_STATUS was set, return that instead
6159 of doing a real wait. Remove the code resuming the execution
6160 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6161 during the initial phase. Also remove the code changing
6162 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6163 TARGET_WAITKIND_STOPPED.
6164
e7f0d979
YQ
61652013-12-11 Yao Qi <yao@codesourcery.com>
6166
6167 * notif.c (handle_notif_ack): Return 0 if no notification
6168 matches.
6169
ebcf782c
DE
61702013-11-20 Doug Evans <dje@google.com>
6171
6172 * linux-low.c (linux_set_resume_request): Fix comment.
6173
20ad9378
DE
61742013-11-20 Doug Evans <dje@google.com>
6175
6176 * linux-low.c (resume_status_pending_p): Tweak comment.
6177
a196ebeb
WT
61782013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6179
6180 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6181 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6182 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6183 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6184 (srv_amd64_regobj): Add amd64-mpx.o.
6185 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6186 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6187 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6188 * i387-fp.c (num_pl_bnd_register) Added constant.
6189 (num_pl_bnd_cfg_registers) Added constant.
6190 (struct i387_xsave) Added reserved area and MPX fields.
6191 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6192 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6193 function.
6194 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6195 (init_registers_amd64_mpx_linux): Declare new function.
6196 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6197 (x86_64_regmap): Add MPX registers.
6198 (x86_linux_read_description): Add MPX case.
6199 (initialize_low_arch): Initialize MPX targets.
6200
0080a2f6
TT
62012013-11-18 Tom Tromey <tromey@redhat.com>
6202
6203 * configure: Rebuild.
6204 * configure.ac: Don't check for stdlib.h.
6205 * gdbreplay.c: Unconditionally include stdlib.h.
6206
2978b111
TT
62072013-11-18 Tom Tromey <tromey@redhat.com>
6208
6209 * config.in: Rebuild.
6210 * configure: Rebuild.
6211 * configure.ac: Don't use AC_HEADER_DIRENT.
6212
a3d08894
TT
62132013-11-18 Tom Tromey <tromey@redhat.com>
6214
6215 * server.h: Don't check HAVE_STRING_H.
6216 * gdbreplay.c: Don't check HAVE_STRING_H.
6217 * configure: Rebuild.
6218
0a5dd17d
TT
62192013-11-18 Tom Tromey <tromey@redhat.com>
6220
6221 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6222 LIBGNU.
6223
1bd2f0ba
TT
62242013-11-08 Tom Tromey <tromey@redhat.com>
6225
6226 * configure, config.in: Rebuild.
6227 * configure.ac: Remove unused configury.
6228
3266f10b
TT
62292013-11-08 Tom Tromey <tromey@redhat.com>
6230
6231 * acinclude.m4: Include common.m4, codeset.m4.
6232 * configure, config.in: Rebuild.
6233 * configure.ac: Use GDB_AC_COMMON.
6234
6682d959
AA
62352013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6236
6237 * linux-s390-low.c (HWCAP_S390_TE): New define.
6238 (s390_arch_setup): Consider the TE field in the HWCAP for
6239 determining 'have_regset_tdb'.
6240
fd0a4d76
SDJ
62412013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6242
6243 PR gdb/16014
6244 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6245 call to sizeof.
6246
1a3d890b
PA
62472013-10-02 Pedro Alves <palves@redhat.com>
6248
6249 * server.c (process_serial_event): Don't output "GDBserver
6250 exiting" if GDB is connected through stdio.
6251 * target.c (mywait): Likewise, be silent if GDB is connected
6252 through stdio.
6253
97ad4581
JB
62542013-10-01 Joel Brobecker <brobecker@adacore.com>
6255
6256 * lynx-low.c (lynx_add_threads_after_attach): New function.
6257 (lynx_attach): Remove call to add_thread. Add call to
6258 lynx_add_threads_after_attach instead.
6259
5b4e221c
MF
62602013-09-28 Mike Frysinger <vapier@gentoo.org>
6261
6262 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6263 * config.in, configure: Regenerated.
6264
ee47b2f8
YQ
62652013-09-18 Yao Qi <yao@codesourcery.com>
6266
6267 PR server/15959
6268 * server.c (start_inferior): Clear 'resume_info'.
6269
d6707650 62702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6271
d6707650
JW
6272 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6273 for each register.
6274
9243dd0e 62752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6276
9243dd0e
JW
6277 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6278 linux-tile-low.o to srv_tgtobj.
6279
c623a6ef
WN
62802013-09-16 Will Newton <will.newton@linaro.org>
6281
6282 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6283 out regs.
6284
fb71d39e
PA
62852013-09-06 Pedro Alves <palves@redhat.com>
6286
6287 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6288 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6289 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6290 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6291 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6292 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6293
8e7e9910
PA
62942013-09-06 Pedro Alves <palves@redhat.com>
6295
6296 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6297 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6298
7c3a12ca
PA
62992013-09-06 Pedro Alves <palves@redhat.com>
6300
6301 * linux-amd64-ipa.c: Include tracepoint.h.
6302 * linux-i386-ipa.c: Include tracepoint.h.
6303
8eb3d7b6
RW
63042013-09-06 Ricard Wanderlof <ricardw@axis.com>
6305
6306 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6307 (ps_get_thread_area): New function.
6308
eddddb9d
RW
63092013-09-06 Ricard Wanderlof <ricardw@axis.com>
6310
6311 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6312 (initialize_low_arch): Call init_registers_crisv32 rather than
6313 init_register_crisv32.
6314
533b0600
PA
63152013-09-05 Pedro Alves <palves@redhat.com>
6316
6317 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6318 to ...
6319 * hostio.h: ... this new file.
6320 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6321 win32-low.c: Include hostio.h.
6322
0ce3d3b5
PA
63232013-09-05 Pedro Alves <palves@redhat.com>
6324
6325 * server.h (gdb_client_data, handler_func, callback_handler_func)
6326 (delete_file_handler, add_file_handler, append_callback_event)
6327 (delete_callback_event, start_event_loop, initialize_event_loop):
6328 Move to event-loop.h and include it.
6329 * event-loop.h: New file.
6330
799cdc37
PA
63312013-09-05 Pedro Alves <palves@redhat.com>
6332
6333 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6334 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6335 (loaded_dll, unloaded_dll): Move to ...
6336 * dll.h: ... this new file.
6337 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6338
6a6bbd9d
PA
63392013-09-05 Pedro Alves <palves@redhat.com>
6340
6341 * server.h (current_process, get_thread_process, all_processes)
6342 (add_inferior_to_list, for_each_inferior, current_inferior)
6343 (remove_inferior, add_process, remove_process, find_process_pid)
6344 (have_started_inferiors_p, have_attached_inferiors_p)
6345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6346 (clear_inferiors, find_inferior, find_inferior_id)
6347 (inferior_target_data, set_inferior_target_data)
6348 (inferior_regcache_data, set_inferior_regcache_data): Move to
6349 inferiors.h, and include it.
6350 * inferiors.h: New file.
6351
f699aaba
PA
63522013-09-05 Pedro Alves <palves@redhat.com>
6353
6354 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6355 Move ...
72f4393d 6356 * ax.h: ... here.
f699aaba 6357
c144c7a0
PA
63582013-09-05 Pedro Alves <palves@redhat.com>
6359
6360 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6361 tracepoint.h.
6362 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6363 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6364 (handle_tracepoint_general_set, handle_tracepoint_query)
6365 (tracepoint_finished_step, tracepoint_was_hit)
6366 (release_while_stepping_state_list, current_traceframe)
6367 (in_readonly_region, traceframe_read_mem)
6368 (fetch_traceframe_registers, traceframe_read_sdata)
6369 (traceframe_read_info, struct fast_tpoint_collect_status)
6370 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6371 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6372 (supply_fast_tracepoint_registers)
6373 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6374 (ipa_tdesc, claim_trampoline_space)
6375 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6376 (agent_mem_read, agent_get_trace_state_variable_value)
6377 (agent_set_trace_state_variable_value, agent_tsv_read)
6378 (agent_mem_read_string, get_raw_reg_func_addr)
6379 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6380 * tracepoint.h: ... this new file.
6381
ff42e6ab
PA
63822013-09-05 Pedro Alves <palves@redhat.com>
6383
6384 * server.h (perror_with_name, error, fatal, warning, paddress)
6385 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6386 include it.
6387 * utils.h: New file.
6388
541af0f4
PA
63892013-09-05 Pedro Alves <palves@redhat.com>
6390
6391 * server.h (remote_debug, noack_mode, transport_is_reliable)
6392 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6393 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6394 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6395 (write_enn, initialize_async_io, enable_async_io)
6396 (disable_async_io, check_remote_input_interrupt_request)
6397 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6398 (dead_thread_notify, prepare_resume_reply)
6399 (decode_address_to_semicolon, decode_address, decode_m_packet)
6400 (decode_M_packet, decode_X_packet, decode_xfer_write)
6401 (decode_search_memory_packet, unhexify, hexify)
6402 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6403 (look_up_one_symbol, relocate_instruction)
6404 (monitor_output): Move to remote-utils.h, and include it.
6405 * remote-utils.h: New file.
6406
eebdf26b
PA
64072013-09-05 Pedro Alves <palves@redhat.com>
6408
6409 * server.h (_): Delete.
6410
3aafd2ff
PA
64112013-09-02 Pedro Alves <palves@redhat.com>
6412
6413 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6414 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6415 allocated.
6416 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6417
cee83bcb
PM
64182013-09-02 Pierre Muller <muller@sourceware.org>
6419
6420 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6421 or WriteProcessMemory complete successfully and handle
6422 ERROR_PARTIAL_COPY error.
6423
9a13b2fa
PA
64242013-09-02 Pedro Alves <palves@redhat.com>
6425
6426 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6427 error instead of EIO.
6428
602e3198
JK
64292013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6430
6431 PR server/15604
6432 * linux-low.c: Include filestuff.h.
6433 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6434 * lynx-low.c: Include filestuff.h.
6435 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6436 * server.c: Include filestuff.h.
6437 (main): Call notice_open_fds.
6438 * spu-low.c: Include filestuff.h.
6439 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6440
96d7229d
LM
64412013-08-22 Luis Machado <lgustavo@codesourcery.com>
6442
6443 * Makefile.in: Explain why ../target and ../nat are not
6444 listed as include file search paths.
6445 (linux-waitpid.o): New object file rule.
6446 * configure.srv (srv_native_linux_obj): New variable.
6447 Replace all occurrences of linux native object files with
6448 $srv_native_linux_obj.
6449 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6450 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6451 (linux_enable_event_reporting): Remove declaration.
6452 (my_waitpid): Moved to common/linux-waitpid.c.
6453 (linux_wait_for_event): Pass ptid when calling
6454 linux_enable_event_reporting.
6455 (linux_supports_tracefork_flag): Remove.
6456 (linux_enable_event_reporting): Likewise.
6457 (linux_tracefork_grandchild): Remove.
6458 (STACK_SIZE): Moved to common/linux-ptrace.c.
6459 (linux_tracefork_child): Remove.
6460 (linux_test_for_tracefork): Remove.
6461 (linux_look_up_symbols): Call linux_supports_traceclone.
6462 (initialize_low): Remove call to linux_test_for_tracefork.
6463 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6464 common/linux-ptrace.h.
6465 (PTRACE_TYPE_ARG4): Likewise.
6466 Include linux-ptrace.h.
6467
32940073
PA
64682013-08-21 Pedro Alves <palves@redhat.com>
6469
6470 * config.in: Renegerate.
6471
33b60d58 64722013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6473
33b60d58
LM
6474 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6475 (SFILES): Remove $(srcdir)/common/target-common.c and
6476 add $(srcdir)/target/waitstatus.c.
6477 (OBS): Remove target-common.o and add waitstatus.o.
6478 (server_h): Remove $(srcdir)/../common/target-common.h and
6479 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6480 and $(srcdir)/../target/waitstatus.h.
6481 (target-common.o): Remove.
6482 (waitstatus.o): New target object file.
6483 * target.h: Do not include target-common.h and
6484 include target/resume.h, target/wait.h and
6485 target/waitstatus.h.
6486
b8e1b30e
LM
64872013-08-13 Luis Machado <lgustavo@codesourcery.com>
6488
6489 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6490 to PTRACE_TYPE_ARG3.
6491 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6492 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6493 PTRACE_TYPE_ARG4.
6494 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6495 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6496
7a60ad40
YQ
64972013-07-27 Jie Zhang <jie@codesourcery.com>
6498 Daniel Jacobowitz <dan@codesourcery.com>
6499 Yao Qi <yao@codesourcery.com>
6500
6501 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6502 (mips-linux-watch.o): New rule.
6503 (mips_linux_watch_h): New variable.
6504 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6505 srv_tgtobj.
6506 * linux-mips-low.c: Include mips-linux-watch.h.
6507 (struct arch_process_info, struct arch_lwp_info): New.
6508 (update_watch_registers_callback): New function.
6509 (mips_linux_new_process, mips_linux_new_thread) New functions.
6510 (mips_linux_prepare_to_resume, mips_insert_point): New
6511 functions.
6512 (mips_remove_point, mips_stopped_by_watchpoint): New
6513 functions.
6514 (rsp_bp_type_to_target_hw_bp_type): New function.
6515 (mips_stopped_data_address): New function.
6516 (the_low_target): Add watchpoint support functions.
6517
de6f69ad
YQ
65182013-07-27 Yao Qi <yao@codesourcery.com>
6519
6520 * i386-low.c: Include break-common.h.
6521 (enum target_hw_bp_type): Remove.
6522
3360c0bf
LM
65232013-07-24 Luis Machado <lgustavo@codesourcery.com>
6524
6525 * Makefile.in (SFILES): /common/target-common.c.
6526 (OBS): Add target-common.o.
6527 (server_h): Add $(srcdir)/../common/target-common.h.
6528 (target-common.o): New target.
6529 * server.c (queue_stop_reply_callback): Free
6530 status string after use.
6531 * target.c (target_waitstatus_to_string): Remove.
6532 * target.h: Include target-common.h.
6533 (resume_kind): Likewise.
6534 (target_waitkind): Likewise.
6535 (target_waitstatus): Likewise.
6536 (TARGET_WNOHANG): Likewise.
6537
bd885420
YQ
65382013-07-04 Yao Qi <yao@codesourcery.com>
6539
6540 * Makefile.in (host_alias): Use @host_noncanonical@.
6541 (target_alias): Use @target_noncanonical@.
6542 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6543 ACX_NONCANONICAL_HOST.
6544 * configure: Regenerated.
6545
6546 Revert:
6547 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6548
6549 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6550 * configure: Rebuild.
6551 * Makefile.in (version_host, version_target): Get from configure.
6552 (version.c): Use $(version_host) and $(version_target).
6553
17ef446e
PA
65542013-07-03 Pedro Alves <palves@redhat.com>
6555
6556 * Makefile.in (config.status): Depend on development.sh.
6557 * acinclude.m4: Include libmcheck.m4.
6558 * configure: Regenerate.
6559
7a9a7487
MG
65602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6561
6562 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6563 attribute inside the parentheses.
6564 (winapi_DebugSetProcessKillOnExit): Ditto.
6565 (winapi_DebugBreakProcess): Ditto.
6566 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6567
49b64de6
MG
65682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6569
6570 * notif.h (notif_event): Add a dummy member to avoid compiler
6571 errors.
6572
d5749ee7
PA
65732013-07-01 Pedro Alves <palves@redhat.com>
6574
6575 * hostio.c (HOSTIO_PATH_MAX): Define.
6576 (require_filename, handle_open, handle_unlink, handle_readlink):
6577 Use it.
6578
d8d2a3ee
PA
65792013-07-01 Pedro Alves <palves@redhat.com>
6580
6581 * server.h: Include "pathmax.h".
6582 * linux-low.c: Don't include sys/param.h.
6583 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6584 MAXPATHLEN.
6585 * win32-low.c: Don't include sys/param.h.
6586 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6587
bc7dea8d
PA
65882013-07-01 Pedro Alves <palves@redhat.com>
6589
6590 * event-loop.c: Don't check HAVE_UNISTD_H before including
6591 <unistd.h>.
6592 * gdbreplay.c: Likewise.
6593 * remote-utils.c: Likewise.
6594 * server.c: Likewise.
6595 * configure.ac: Don't check for unistd.h.
6596 * configure: Regenerate.
6597
d6c2da54
TT
65982013-06-28 Tom Tromey <tromey@redhat.com>
6599
6600 * Makefile.in (version.c): Use version.in, not
6601 common/version.in.
6602
257b6bec
MG
66032013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6604
6605 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6606 * configure: Rebuild.
6607 * Makefile.in (version_host, version_target): Get from configure.
6608 (version.c): Use $(version_host) and $(version_target).
6609
86ebe149
DK
66102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6611
6612 Fix trace-status to output user name without trailing colon.
6613 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6614
f30aa5af
DK
66152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6616
6617 Fix trace-status to output proper start-time and stop-time.
6618 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6619 output start time and stop time in hex as gdb expects.
6620
28a93511
YQ
66212013-06-26 Pedro Alves <pedro@codesourcery.com>
6622
6623 * tracepoint.c (build_traceframe_info_xml): Output trace state
6624 variables present in the trace buffer.
6625
01208463
TT
66262013-06-24 Tom Tromey <tromey@redhat.com>
6627
6628 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6629 create-version.sh.
6630 (version.o): Remove.
6631 * gdbreplay.c: Include version.h.
6632 (version, host_name): Don't declare.
6633 * server.h: Include version.h.
6634 (version, host_name): Don't declare.
6635
760256f9
PA
66362013-06-12 Pedro Alves <palves@redhat.com>
6637
6638 * linux-x86-low.c (linux_is_elf64): Delete global.
6639 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6640 with local linux_pid_exe_is_elf_64_file use.
6641
030031ee
PA
66422013-06-11 Pedro Alves <palves@redhat.com>
6643
6644 * linux-low.c (regset_disabled, disable_regset): New functions.
6645 (regsets_fetch_inferior_registers)
6646 (regsets_store_inferior_registers): Use them.
6647 (initialize_regsets_info); Don't allocate the disabled_regsets
6648 array here.
6649 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6650 comment.
6651
5da6eb0a
PA
66522013-06-11 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6655 xmalloc.
6656
7e5aaa09
PA
66572013-06-11 Pedro Alves <palves@redhat.com>
6658
6659 * linux-x86-low.c (initialize_low_arch): Call
6660 init_registers_x32_avx_linux.
6661
d878444c
JK
66622013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6663
6664 Fix compatibility with Android Bionic.
6665 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6666 it is not empty.
6667
3aee8918
PA
66682013-06-07 Pedro Alves <palves@redhat.com>
6669
5f2b57b5 6670 PR server/14823
3aee8918
PA
6671 * Makefile.in (OBS): Add tdesc.o.
6672 (IPA_OBJS): Add tdesc-ipa.o.
6673 (tdesc-ipa.o): New rule.
6674 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6675 interface.
6676 * linux-low.c (new_inferior): Delete.
6677 (disabled_regsets, num_regsets): Delete.
6678 (linux_add_process): Adjust to set the new per-process
6679 new_inferior flag.
6680 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6681 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6682 was a stop. When calling arch_setup, switch the current inferior
6683 to the thread that got an event.
6684 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6685 (regsets_fetch_inferior_registers)
6686 (regsets_store_inferior_registers): New regsets_info parameter.
6687 Adjust to use it.
6688 (linux_register_in_regsets): New regs_info parameter. Adjust to
6689 use it.
6690 (register_addr, fetch_register, store_register): New usrregs_info
6691 parameter. Adjust to use it.
6692 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6693 parameter regs_info. Adjust to use it.
6694 (linux_fetch_registers): Get the current inferior's regs_info, and
6695 adjust to use it.
6696 (linux_store_registers): Ditto.
6697 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6698 (initialize_low): Don't initialize the target_regsets here. Call
6699 initialize_low_arch.
6700 * linux-low.h (target_regsets): Delete declaration.
6701 (struct regsets_info): New.
6702 (struct usrregs_info): New.
6703 (struct regs_info): New.
6704 (struct process_info_private) <new_inferior>: New field.
6705 (struct linux_target_ops): Delete the num_regs, regmap, and
6706 regset_bitmap fields. New field regs_info.
6707 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6708 * i387-fp.c (num_xmm_registers): Delete.
6709 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6710 calls to new interface.
6711 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6712 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6713 Infer the number of xmm registers from the regcache's target
6714 description.
6715 * i387-fp.h (num_xmm_registers): Delete.
6716 * inferiors.c (add_thread): Don't install the thread's regcache
6717 here.
6718 * proc-service.c (gregset_info): Fetch the current inferior's
6719 regs_info. Adjust to use it.
6720 * regcache.c: Include tdesc.h.
6721 (register_bytes, reg_defs, num_registers)
6722 (gdbserver_expedite_regs): Delete.
6723 (get_thread_regcache): If the thread doesn't have a regcache yet,
6724 create one, instead of aborting gdbserver.
6725 (regcache_invalidate_one): Rename to ...
6726 (regcache_invalidate_thread): ... this.
6727 (regcache_invalidate_one): New.
6728 (regcache_invalidate): Only invalidate registers of the current
6729 process.
6730 (init_register_cache): Add target_desc parameter, and use it.
6731 (new_register_cache): Ditto. Assert the target description has a
6732 non zero registers_size.
6733 (regcache_cpy): Add assertions. Adjust.
6734 (realloc_register_cache, set_register_cache): Delete.
6735 (registers_to_string, registers_from_string): Adjust.
6736 (find_register_by_name, find_regno, find_register_by_number)
6737 (register_cache_size): Add target_desc parameter, and use it.
6738 (free_register_cache_thread, free_register_cache_thread_one)
6739 (regcache_release, register_cache_size): New.
6740 (register_size): Add target_desc parameter, and use it.
6741 (register_data, supply_register, supply_register_zeroed)
6742 (supply_regblock, supply_register_by_name, collect_register)
6743 (collect_register_as_string, collect_register_by_name): Adjust.
6744 * regcache.h (struct target_desc): Forward declare.
6745 (struct regcache) <tdesc>: New field.
6746 (init_register_cache, new_register_cache): Add target_desc
6747 parameter.
6748 (regcache_invalidate_thread): Declare.
6749 (regcache_invalidate_one): Delete declaration.
6750 (regcache_release): Declare.
6751 (find_register_by_number, register_cache_size, register_size)
6752 (find_regno): Add target_desc parameter.
6753 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6754 declarations.
6755 * remote-utils.c: Include tdesc.h.
6756 (outreg, prepare_resume_reply): Adjust.
6757 * server.c: Include tdesc.h.
6758 (gdbserver_xmltarget): Delete declaration.
6759 (get_features_xml, process_serial_event): Adjust.
6760 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6761 declare.
6762 (struct process_info) <tdesc>: New field.
6763 (ipa_tdesc): Declare.
6764 * tdesc.c: New file.
6765 * tdesc.h: New file.
6766 * tracepoint.c: Include tdesc.h.
6767 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6768 (get_context_regcache): Adjust to pass ipa_tdesc down.
6769 (do_action_at_tracepoint): Adjust to get the register cache size
6770 from the context regcache's description.
6771 (traceframe_walk_blocks): Adjust to get the register cache size
6772 from the current trace frame's description.
6773 (traceframe_get_pc): Adjust to get current trace frame's
6774 description and pass it down.
6775 (gdb_collect): Adjust to get the register cache size from the
6776 IPA's description.
6777 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6778 (gdbserver_xmltarget): Delete.
6779 (initialize_low_tracepoint): Set the ipa's target description.
6780 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6781 (initialize_low_tracepoint): Set the ipa's target description.
6782 * linux-x86-low.c: Include tdesc.h.
6783 [__x86_64__] (is_64bit_tdesc): New.
6784 (ps_get_thread_area, x86_get_thread_area): Use it.
6785 (i386_cannot_store_register): Rename to ...
6786 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6787 (i386_cannot_fetch_register): Rename to ...
6788 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6789 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6790 to new interface.
6791 (target_regsets): Rename to ...
6792 (x86_regsets): ... this.
6793 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6794 interface.
6795 (x86_siginfo_fixup): Use is_64bit_tdesc.
6796 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6797 (tdesc_x32_avx_linux, tdesc_x32_linux)
6798 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6799 Declare.
6800 (x86_linux_update_xmltarget): Delete.
6801 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6802 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6803 (AMD64_LINUX_USER64_CS): New.
6804 (x86_linux_read_description): New, based on
6805 x86_linux_update_xmltarget.
6806 (same_process_callback): New.
6807 (x86_arch_setup_process_callback): New.
6808 (x86_linux_update_xmltarget): New.
6809 (x86_regsets_info): New.
6810 (amd64_linux_regs_info): New.
6811 (i386_linux_usrregs_info): New.
6812 (i386_linux_regs_info): New.
6813 (x86_linux_regs_info): New.
6814 (x86_arch_setup): Reimplement.
6815 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6816 (x86_emit_ops): Ditto.
6817 (the_low_target): Adjust. Install x86_linux_regs_info,
6818 x86_cannot_fetch_register, and x86_cannot_store_register.
6819 (initialize_low_arch): New.
6820 * linux-ia64-low.c (tdesc_ia64): Declare.
6821 (ia64_fetch_register): Adjust.
6822 (ia64_usrregs_info, regs_info): New globals.
6823 (ia64_regs_info): New function.
6824 (the_low_target): Adjust.
6825 (initialize_low_arch): New function.
6826 * linux-sparc-low.c (tdesc_sparc64): Declare.
6827 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6828 Adjust.
6829 (sparc_arch_setup): New function.
6830 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6831 (the_low_target): Adjust.
6832 (initialize_low_arch): New function.
6833 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6834 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6835 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6836 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6837 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6838 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6839 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6840 (tdesc_powerpc_isa205_vsx64l): Declare.
6841 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6842 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6843 (ppc_set_pc, ppc_get_hwcap): Adjust.
6844 (ppc_usrregs_info): Forward declare.
6845 (!__powerpc64__) ppc_regmap_adjusted: New global.
6846 (ppc_arch_setup): Adjust to the current process'es target
6847 description.
6848 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6849 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6850 (ppc_store_evrregset): Adjust.
6851 (target_regsets): Rename to ...
6852 (ppc_regsets): ... this, and make static.
6853 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6854 (ppc_regs_info): New function.
6855 (the_low_target): Adjust.
6856 (initialize_low_arch): New function.
6857 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6858 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6859 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6860 (tdesc_s390x_linux64v2): Declare.
6861 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6862 (s390_fill_gregset, s390_store_last_break): Adjust.
6863 (target_regsets): Rename to ...
6864 (s390_regsets): ... this, and make static.
6865 (s390_get_pc, s390_set_pc): Adjust.
6866 (s390_get_hwcap): New target_desc parameter, and use it.
6867 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6868 (s390_arch_setup): Adjust to set the current process'es target
6869 description. Don't adjust the regmap.
6870 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6871 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6872 (regs_info_3264): New globals.
6873 (s390_regs_info): New function.
6874 (the_low_target): Adjust.
6875 (initialize_low_arch): New function.
6876 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6877 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6878 [__mips64] (init_registers_mips_linux)
6879 (init_registers_mips_dsp_linux): Delete defines.
6880 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6881 (have_dsp): New global.
6882 (mips_read_description): New, based on mips_arch_setup.
6883 (mips_arch_setup): Reimplement.
6884 (get_usrregs_info): New function.
6885 (mips_cannot_fetch_register, mips_cannot_store_register)
6886 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6887 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6888 (target_regsets): Rename to ...
6889 (mips_regsets): ... this, and make static.
6890 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6891 (dsp_regs_info, regs_info): New globals.
6892 (mips_regs_info): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6896 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6897 Declare.
6898 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6899 (arm_read_description): New, with bits factored from
6900 arm_arch_setup.
6901 (arm_arch_setup): Reimplement.
6902 (target_regsets): Rename to ...
6903 (arm_regsets): ... this, and make static.
6904 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6905 (arm_regs_info): New function.
6906 (the_low_target): Adjust.
6907 (initialize_low_arch): New function.
6908 * linux-m68k-low.c (tdesc_m68k): Declare.
6909 (target_regsets): Rename to ...
6910 (m68k_regsets): ... this, and make static.
6911 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6912 (m68k_regs_info): New function.
6913 (m68k_arch_setup): New function.
6914 (the_low_target): Adjust.
6915 (initialize_low_arch): New function.
6916 * linux-sh-low.c (tdesc_sharch): Declare.
6917 (target_regsets): Rename to ...
6918 (sh_regsets): ... this, and make static.
6919 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6920 (sh_regs_info, sh_arch_setup): New functions.
6921 (the_low_target): Adjust.
6922 (initialize_low_arch): New function.
6923 * linux-bfin-low.c (tdesc_bfin): Declare.
6924 (bfin_arch_setup): New function.
6925 (bfin_usrregs_info, regs_info): New globals.
6926 (bfin_regs_info): New function.
6927 (the_low_target): Adjust.
6928 (initialize_low_arch): New function.
6929 * linux-cris-low.c (tdesc_cris): Declare.
6930 (cris_arch_setup): New function.
6931 (cris_usrregs_info, regs_info): New globals.
6932 (cris_regs_info): New function.
6933 (the_low_target): Adjust.
6934 (initialize_low_arch): New function.
6935 * linux-cris-low.c (tdesc_crisv32): Declare.
6936 (cris_arch_setup): New function.
6937 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6938 (cris_regs_info): New function.
6939 (the_low_target): Adjust.
6940 (initialize_low_arch): New function.
6941 * linux-m32r-low.c (tdesc_m32r): Declare.
6942 (m32r_arch_setup): New function.
6943 (m32r_usrregs_info, regs_info): New globals.
6944 (m32r_regs_info): Adjust.
6945 (initialize_low_arch): New function.
6946 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6947 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6948 (tic6x_usrregs_info): Forward declare.
6949 (tic6x_read_description): New function, based on ...
6950 (tic6x_arch_setup): ... this. Reimplement.
6951 (target_regsets): Rename to ...
6952 (tic6x_regsets): ... this, and make static.
6953 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6954 (tic6x_regs_info): New function.
6955 (the_low_target): Adjust.
6956 (initialize_low_arch): New function.
6957 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6958 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6959 (target_regsets): Rename to ...
6960 (xtensa_regsets): ... this, and make static.
6961 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6962 globals.
6963 (xtensa_arch_setup, xtensa_regs_info): New functions.
6964 (the_low_target): Adjust.
6965 (initialize_low_arch): New function.
6966 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6967 (nios2_arch_setup): Set the current process'es tdesc.
6968 (target_regsets): Rename to ...
6969 (nios2_regsets): ... this.
6970 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6971 (nios2_regs_info): New function.
6972 (the_low_target): Adjust.
6973 (initialize_low_arch): New function.
a261b8f5
PA
6974 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6975 (aarch64_arch_setup): Set the current process'es tdesc.
6976 (target_regsets): Rename to ...
6977 (aarch64_regsets): ... this.
6978 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6979 (aarch64_regs_info): New function.
6980 (the_low_target): Adjust.
6981 (initialize_low_arch): New function.
3aee8918
PA
6982 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6983 globals.
6984 (target_regsets): Rename to ...
6985 (tile_regsets): ... this.
6986 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6987 (tile_regs_info): New function.
6988 (tile_arch_setup): Set the current process'es tdesc.
6989 (the_low_target): Adjust.
6990 (initialize_low_arch): New function.
6991 * spu-low.c (tdesc_spu): Declare.
6992 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6993 * win32-arm-low.c (tdesc_arm): Declare.
6994 (arm_arch_setup): New function.
6995 (the_low_target): Install arm_arch_setup instead of
6996 init_registers_arm.
6997 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6998 (init_windows_x86): Rename to ...
6999 (i386_arch_setup): ... this. Set `win32_tdesc'.
7000 (the_low_target): Adjust.
7001 * win32-low.c (win32_tdesc): New global.
7002 (child_add_thread): Don't create the thread cache here.
7003 (do_initial_child_stuff): Set the new process'es tdesc.
7004 * win32-low.h (struct target_desc): Forward declare.
7005 (win32_tdesc): Declare.
7006 * lynx-i386-low.c (tdesc_i386): Declare global.
7007 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7008 * lynx-low.c (lynx_tdesc): New global.
7009 (lynx_add_process): Set the new process'es tdesc.
7010 * lynx-low.h (struct target_desc): Forward declare.
7011 (lynx_tdesc): Declare global.
7012 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7013 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7014 * nto-low.c (nto_tdesc): New global.
7015 (do_attach): Set the new process'es tdesc.
7016 * nto-low.h (struct target_desc): Forward declare.
7017 (nto_tdesc): Declare.
7018 * nto-x86-low.c (tdesc_i386): Declare.
7019 (nto_x86_arch_setup): Set `nto_tdesc'.
7020
b1fbec62
GB
70212013-06-04 Gary Benson <gbenson@redhat.com>
7022
7023 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7024 to qSupported response when appropriate.
7025 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7026 with nonzero-length annex.
7027 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7028 arguments supplied in annex.
7029
d1ec4ce7
DE
70302013-05-31 Doug Evans <dje@google.com>
7031
ac44adcb 7032 PR server/15594
d1ec4ce7
DE
7033 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7034 64 bits in 64-cross-32 environment.
7035
9b25f2d3
PA
70362013-05-28 Pedro Alves <palves@redhat.com>
7037
7038 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7039 (aarch64-without-fpu.c): Delete rule.
7040 * configure.srv (aarch64*-*-linux*): Remove references to
7041 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7042 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7043 declaration.
7044
6740dc9c
PA
70452013-05-24 Pedro Alves <palves@redhat.com>
7046
7047 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7048 instead of strchr/decode_address. Error if the range isn't split
7049 with a ','. Don't assume there's be a ':' in the action.
7050
c2d6af84
PA
70512013-05-23 Yao Qi <yao@codesourcery.com>
7052 Pedro Alves <palves@redhat.com>
7053
7054 * linux-low.c (lwp_in_step_range): New function.
7055 (linux_wait_1): If the thread was range stepping and stopped
7056 outside the stepping range, report the stop to GDB. Otherwise,
7057 continue stepping. Add range stepping debug output.
7058 (linux_set_resume_request): Copy the step range from the resume
7059 request to the lwp.
7060 (linux_supports_range_stepping): New.
7061 (linux_target_ops) <supports_range_stepping>: Set to
7062 linux_supports_range_stepping.
7063 * linux-low.h (struct linux_target_ops)
7064 <supports_range_stepping>: New field.
7065 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7066 * linux-x86-low.c (x86_supports_range_stepping): New.
7067 (the_low_target) <supports_range_stepping>: Set to
7068 x86_supports_range_stepping.
7069 * server.c (handle_v_cont): Handle 'r' action.
7070 (handle_v_requests): Append ";r" if the target supports range
7071 stepping.
7072 * target.h (struct thread_resume) <step_range_start,
7073 step_range_end>: New fields.
7074 (struct target_ops) <supports_range_stepping>:
7075 New field.
7076 (target_supports_range_stepping): New macro.
7077
58794e1a
JB
70782013-05-17 Joel Brobecker <brobecker@adacore.com>
7079
7080 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7081 confusion in comment.
7082
d631c5a7
JB
70832013-05-17 Joel Brobecker <brobecker@adacore.com>
7084
7085 * lynx-low.c (struct process_info_private): New type.
7086 (lynx_add_process): New function.
7087 (lynx_create_inferior, lynx_attach): Replace calls to
7088 add_process by calls to lynx_add_process.
7089 (lynx_resume): If PTID is null, then try using
7090 current_process()->private->last_wait_event_ptid.
7091 Add comments.
7092 (lynx_clear_inferiors): Delete. The contents of that function
7093 has been inlined in lynx_mourn;
7094 (lynx_wait_1): Save the ptid in the process's private data.
7095 (lynx_mourn): Free the process' private data. Replace call
7096 to lynx_clear_inferiors by call to clear_inferiors.
7097
96f7a20f
YQ
70982013-05-17 Yao Qi <yao@codesourcery.com>
7099
7100 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7101 the right place.
7102
db0dfaa0
LM
71032013-05-16 Luis Machado <lgustavo@codesourcery.com>
7104
7105 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7106 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7107 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7108 PT_TEXT_END_ADDR guards. Update comments.
7109 (linux_target_op) <read_offsets>: Conditionally define to
7110 linux_read_offsets if the target is UCLIBC and if it defines
7111 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7112
68f5f838
SL
71132013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7114 Andrew Jenner <andrew@codesourcery.com>
7115
7116 * Makefile.in (SFILES): Add linux-nios2-low.c.
7117 (clean): Add action to delete nios2-linux.c.
7118 (nios2-linux.c): New rule.
7119 * configure.srv: Add nios2*-*-linux*.
7120 * linux-nios2-low.c: New.
7121
1ebff1fd
HAQ
71222013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7123
7124 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7125
f6150862
HZ
71262013-04-25 Hui Zhu <hui@codesourcery.com>
7127
7128 PR gdb/15186
f6150862
HZ
7129 * ax.c (ax_printf): Add fflush.
7130
614c279d
TT
71312013-04-22 Tom Tromey <tromey@redhat.com>
7132
7133 * Makefile.in (SFILES): Add filestuff.c.
7134 (OBS): Add filestuff.o.
7135 (filestuff.o): New target.
7136 * config.in, configure: Rebuild.
7137 * configure.ac: Check for fdwalk, pipe2.
7138
7d4e5717
PA
71392013-04-17 Pedro Alves <palves@redhat.com>
7140
7141 * configure.ac (USE_THREAD_DB): Delete variable.
7142 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7143 Don't AC_SUBST USE_THREAD_DB.
7144 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7145 * config.in, configure: Regenerate.
7146
d5c93e41
PA
71472013-04-16 Pedro Alves <palves@redhat.com>
7148
7149 * linux-low.h (struct lwp_info) <thread_known>: Move under
7150 the USE_THREAD_DB #ifdef.
7151
04f5fe89
PA
71522013-04-16 Pedro Alves <palves@redhat.com>
7153
7154 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7155 (linux-low.o): Delete rule.
7156 * linux-low.h: Always include "gdb_thread_db.h" instead of
7157 conditionally including thread_db.h.
7158 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7159 HAVE_THREAD_DB_H.
7160
480b27bf
JK
71612013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7162
7163 * Makefile.in (install-only): Fix make install regression.
7164
43662968
JK
71652013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7166
7167 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7168 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7169 installation.
7170 * gdbserver.1: Remove.
7171
3e74e146
PA
71722013-03-22 Pedro Alves <palves@redhat.com>
7173
7174 * linux-low.c (handle_extended_wait): Don't call
7175 linux_enable_event_reporting.
7176
a8347a2a
TT
71772013-03-15 Tony Theodore <tonyt@logyst.com>
7178
7179 PR build/9098:
7180 * Makefile.in (SHELL): Use @SHELL@.
7181
eeb56fa7
SDJ
71822013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7183
7184 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7185 compiler warning.
7186
4fa7e2ff
JB
71872013-03-13 Joel Brobecker <brobecker@adacore.com>
7188
7189 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7190 Remove extraneous NULL element.
7191
8ddb1965
YQ
71922013-03-13 Yao Qi <yao@codesourcery.com>
7193
7194 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7195 'V' block in trace frame.
7196
9accd112
MM
71972013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7198
7199 * target.h (struct target_ops): Add btrace ops.
7200 (target_supports_btrace): New macro.
7201 (target_enable_btrace): New macro.
7202 (target_disable_btrace): New macro.
7203 (target_read_btrace): New macro.
7204 * gdbthread.h (struct thread_info): Add btrace field.
7205 * server.c: Include btrace-common.h.
7206 (handle_btrace_general_set): New function.
7207 (handle_btrace_enable): New function.
7208 (handle_btrace_disable): New function.
7209 (handle_general_set): Call handle_btrace_general_set.
7210 (handle_qxfer_btrace): New function.
7211 (struct qxfer qxfer_packets[]): Add btrace entry.
7212 * inferiors.c (remove_thread): Disable btrace.
7213 * linux-low: Include linux-btrace.h.
7214 (linux_low_enable_btrace): New function.
7215 (linux_low_read_btrace): New function.
7216 (linux_target_ops): Add btrace ops.
7217 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7218 Add srv_linux_btrace=yes.
7219 (x86_64-*-linux*): Add linux-btrace.o.
7220 Add srv_linux_btrace=yes.
7221 * configure.ac: Define HAVE_LINUX_BTRACE.
7222 * config.in: Regenerated.
7223 * configure: Regenerated.
7224
5cc22e4c
MM
72252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7226
7227 * server.c (handle_qxfer): Preserve error message if -3 is
7228 returned.
7229 (qxfer): Document the -3 return value.
7230
7c97f91e
MM
72312013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7232
7233 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7234 (linux_btrace_h): New variable.
7235 (linux-btrace.o): New rule.
7236
be9a119c 72372013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7238 Hafiz Abid Qadeer <abidh@codesourcery.com>
7239
7240 * tracepoint.c (trace_buffer_size): New global.
7241 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7242 (init_trace_buffer): Change to one-argument function. Allocate
7243 trace buffer memory.
7244 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7245 handle QTBuffer:size packet.
7246 (cmd_bigqtbuffer_size): New function.
7247 (initialize_tracepoint): Call init_trace_buffer with
7248 DEFAULT_TRACE_BUFFER_SIZE.
7249 * server.c (handle_query): Add QTBuffer:size in the
7250 supported packets.
7251
e64f7499
YQ
72522013-03-07 Yao Qi <yao@codesourcery.com>
7253
7254 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7255 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7256 of -1.
7257 (cmd_qtsp): Adjust condition. Do post increment.
7258 Set cur_action and cur_step_action back to 0.
7259
f0ae6fc3
PA
72602013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7261
7262 PR server/15236
7263 * linux-low.c (linux_write_memory): Return early success if LEN is
7264 zero.
7265
b5b0b0af
CV
72662013-03-05 Corinna Vinschen <vinschen@redhat.de>
7267
334ad4a8 7268 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7269
589bc927
TT
72702013-02-28 Tom Tromey <tromey@redhat.com>
7271
7272 * configure.ac: Invoke AC_SYS_LARGEFILE.
7273 * configure, config.in: Rebuild.
7274
dfe07582
CV
72752013-02-28 Corinna Vinschen <vinschen@redhat.com>
7276
7277 * win32-low.c: Throughout, fix format strings and casts of
7278 printf-like functions to avoid type related warnings on all
7279 platforms.
7280 (get_child_debug_event): Print dwDebugEventCode as hex since
7281 that's how it's usually documented.
7282
736cd585
YQ
72832013-02-28 Yao Qi <yao@codesourcery.com>
7284
7285 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7286 pulongest.
7287
e1f58301
JW
72882013-02-27 Jiong Wang <jiwang@tilera.com>
7289
7290 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7291 (reg-tilegx32.c): New rule.
7292 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7293 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7294 different register info initializer according to elf class.
7295 (init_registers_tilgx32): New function. The tilegx32 register info
7296 initializer.
7297 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7298 (tile_store_gregset): Likewise.
7299
d171ca78
YQ
73002013-02-27 Yao Qi <yao@codesourcery.com>
7301
7302 * server.c (process_point_options): Print debug message when
7303 debug_threads is true.
7304
282bbdf3
YQ
73052013-02-26 Yao Qi <yao@codesourcery.com>
7306
7307 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7308
aca22551
PA
73092013-02-19 Pedro Alves <palves@redhat.com>
7310 Kai Tietz <ktietz@redhat.com>
7311
7312 PR gdb/15161
7313
7314 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7315 instead of strtoul to extract address from packet.
7316 (process_serial_event) <'z'>: Likewise.
7317
4f3cee1c
YQ
73182013-02-18 Yao Qi <yao@codesourcery.com>
7319
7320 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7321
8e1d55a3
PA
73222013-02-14 Pedro Alves <palves@redhat.com>
7323
7324 Plug memory leak.
7325
7326 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7327 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7328
458820da
PA
73292013-02-14 Pedro Alves <palves@redhat.com>
7330
7331 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7332
baea0dae
PA
73332013-02-14 Pedro Alves <palves@redhat.com>
7334
7335 * tracepoint.c (save_string): Delete.
7336 (add_tracepoint_action): Use savestring instead of save_string.
7337
0b1afbb3
PA
73382013-02-12 Pedro Alves <palves@redhat.com>
7339
7340 * linux-xtensa-low.c: Ditto.
7341 * xtensa-xtregs.c: Ditto.
7342
8a4ac37e
PA
73432013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7344
7345 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7346 thread_db.
7347
148de6bb
MS
73482013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7349
7350 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7351 aarch64_num_wp_regs and aarch64_num_bp_regs to
7352 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7353
55fac6e0
MS
73542013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7355
7356 * linux-aarch64-low.c (ps_get_thread_area): Replace
7357 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7358
176eb98c
MS
73592013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7360 Marcus Shawcroft <marcus.shawcroft@arm.com>
7361 Nigel Stephens <nigel.stephens@arm.com>
7362 Yufeng Zhang <yufeng.zhang@arm.com>
7363
7364 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7365 (aarch64.c, aarch64-without-fpu.c): New targets.
7366 * configure.srv (aarch64*-*-linux*): New.
7367 * linux-aarch64-low.c: New file.
7368
56f7af9c
MS
73692013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7370
43aaf8b6 7371 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7372 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7373 (dequeue_one_deferred_signal, linux_resume_one_thread)
7374 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7375 (linux_tracefork_grandchild, linux_test_for_tracefork)
7376 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7377 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7378 where the argument is 0.
7379
60f662b0
YQ
73802013-01-25 Yao Qi <yao@codesourcery.com>
7381
7382 * event-loop.c: Include "queue.h".
7383 (gdb_event_p): New typedef.
7384 (struct gdb_event) <next_event>: Remove.
7385 (event_queue): Change to QUEUE(gdb_event_p).
7386 (async_queue_event): Remove.
7387 (gdb_event_xfree): New.
7388 (initialize_event_loop): New.
7389 (process_event): Use API from QUEUE.
7390 (wait_for_event): Likewise.
7391 * server.c (main): Call initialize_event_loop.
7392 * server.h (initialize_event_loop): Declare.
7393
5ae4861a
YQ
73942013-01-18 Yao Qi <yao@codesourcery.com>
7395
7396 * ax.h (struct eval_agent_expr_context): New.
7397 (gdb_eval_agent_expr): Update declaration.
7398 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7399 TFRAME. Add new argument CTX.
7400 * server.h (struct eval_agent_expr_context): Declare.
7401 (agent_mem_read, agent_tsv_read): Update declaration.
7402 (agent_mem_read_string): Likewise.
7403 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7404 (add_traceframe_block): Add new argument TPOINT.
7405 Increase TPOINT->traceframe_usage.
7406 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7407 eval_tracepoint_agent_expr.
7408 (condition_true_at_tracepoint): Likewise.
7409 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7410 (agent_mem_read_string, agent_tsv_read): Likewise.
7411
85e00e85
YQ
74122013-01-16 Yao Qi <yao@codesourcery.com>
7413
7414 * linux-low.c (linux_resume_one_lwp): Don't check
7415 'lwp->bp_reinsert != 0'.
7416
4039cf45
JB
74172013-01-07 Joel Brobecker <brobecker@adacore.com>
7418 Pedro Alves <palves@redhat.com>
7419
7420 * lynx-low.c (ptrace_request_to_str): Define a temporary
7421 macro and use it to simplify this function's implementation.
7422
9044dee2
JB
74232013-01-07 Joel Brobecker <brobecker@adacore.com>
7424
7425 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7426 sets errno.
7427
e6352c8f
JB
74282013-01-07 Joel Brobecker <brobecker@adacore.com>
7429
7430 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7431
50681a27
JB
74322013-01-07 Joel Brobecker <brobecker@adacore.com>
7433
7434 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7435
3f6e77ef
JB
74362013-01-07 Joel Brobecker <brobecker@adacore.com>
7437
7438 * lynx-low.c (lynx_resume): Use the resume_info parameter
7439 to determine the ptid for the lynx_ptrace call, unless
7440 it is equal to minus_one_ptid, in which case we use the
7441 ptid of the current_inferior.
7442 (lynx_wait_1): After having received a thread create/exit
7443 event, resume the inferior's execution using the signaling
7444 thread's ptid, rather than the old ptid.
7445
7fda33ae
JB
74462013-01-07 Joel Brobecker <brobecker@adacore.com>
7447
7448 * lynx-low.c (lynx_resume): Delete variable ret.
7449
b9786c74
JB
74502013-01-01 Joel Brobecker <brobecker@adacore.com>
7451
7452 * gdbreplay.c (gdbreplay_version): Update copyright year.
7453 * server.c (gdbserver_version): Likewise.
7454
8b93d60f
JB
74552012-12-17 Joel Brobecker <brobecker@adacore.com>
7456
7457 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7458 new thread.
7459
037335a7
JB
74602012-12-17 Joel Brobecker <brobecker@adacore.com>
7461
7462 * lynx-low.c (ptrace_request_to_str): Add handling for
7463 PTRACE_GETTRACESIG.
7464
52d4cbd8
JB
74652012-12-17 Joel Brobecker <brobecker@adacore.com>
7466
7467 * lynx-low.c (lynx_attach): Delete variable new_process.
7468
ab8f6ca9
JB
74692012-12-17 Joel Brobecker <brobecker@adacore.com>
7470
7471 * lynx-low.c (lynx_create_inferior): Delete variable
7472 new_process.
7473
78cbc024
JB
74742012-12-17 Joel Brobecker <brobecker@adacore.com>
7475
7476 * lynx-low.c (ptrace_request_to_str): Do not handle
7477 PTRACE_GETTHREADLIST if this macro does not exist.
7478
14a00470
YQ
74792012-12-15 Yao Qi <yao@codesourcery.com>
7480
7481 * Makefile.in (OBS): Add notif.o.
7482 * notif.c, notif.h: New.
7483 * server.c: Include "notif.h".
7484 (struct vstop_notif) <next>: Remove.
7485 <base>: New field.
7486 (queue_stop_reply): Update.
7487 (push_event, send_next_stop_reply): Remove.
7488 (discard_queued_stop_replies): Update.
7489 (notif_stop): New variable.
7490 (handle_v_stopped): Remove.
7491 (handle_v_requests): Don't call handle_v_stopped. Call
7492 handle_ack_notif instead.
7493 (queue_stop_reply_callback): Call notif_event_enque instead
7494 of queue_stop_reply.
7495 (handle_status): Don't call send_next_stop_reply, call
7496 notif_write_event instead.
7497 (kill_inferior_callback): Likewise.
7498 (detach_or_kill_inferior_callback): Likewise.
7499 (main): Call initialize_notif.
7500 (process_serial_event): Call QUEUE_is_empty.
7501 (handle_target_event): Call notif_push instead of push event.
7502 * server.h (push_event): Remove declaration.
7503
61c125b9
TT
75042012-12-10 Tom Tromey <tromey@redhat.com>
7505
7506 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7507 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7508 macros.
7509 (.c.o): Rewrite.
7510 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7511 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7512 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7513 (amd64-linux-ipa.o, ax.o): Rewrite.
7514 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7515 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7516 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7517 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7518 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7519 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7520 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7521 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7522 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7523 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7524 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7525 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7526 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7527 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7528 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7529 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7530 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7531 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7532 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7533 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7534 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7535 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7536 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7537 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7538 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7539 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7540 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7541 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7542 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7543 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7544 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7545 (reg-tilegx.o): Remove.
7546 (all_object_files): New macro.
7547 Include .deps files.
7548 * aclocal.m4, configure: Rebuild.
7549 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7550 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7551 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7552
e90e9ad9
TT
75532012-12-05 Tom Tromey <tromey@redhat.com>
7554
7555 PR gdb/14917:
7556 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7557
02d403bf 75582012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7559
7560 * configure.ac: Check for linux/perf_event.h.
7561 * config.in: Regenerated.
7562 * configure: Regenerated.
7563
0270a750
PA
75642012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7565
7566 * hostio.c (handle_readlink): Decrease buffer size
7567 parameter passed to readlink by one byte.
7568
8c29b58e
YQ
75692012-11-26 Yao Qi <yao@codesourcery.com>
7570
7571 * configure.ac (build_warnings): Append '-Wempty-body'.
7572 * configure: Regenerated.
7573 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7574 body.
7575
8bdce1ff
PM
75762012-11-15 Pierre Muller <muller@sourceware.org>
7577
7578 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7579 * config.in: Regenerate.
7580 * configure: Regenerate.
7581 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7582 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7583 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7584 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7585 header.
7586 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7587 instead of <sys/wait.h> header.
7588 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7589
02d403bf 75902012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7591
7592 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7593 (various make rules): Remove -DGDBSERVER
7594
fbd5db48
YQ
75952012-11-09 Yao Qi <yao@codesourcery.com>
7596
7597 * spu-low.c (current_ptid): Move it to ..
7598 * gdbthread.h: ... here. New.
7599 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7600 * server.c (myresume, process_serial_event): Likewise.
7601 * thread-db.c (thread_db_find_new_threads): Likewise.
7602 * tracepoint.c (run_inferior_command): Likewise.
7603
b3dc46ff
AB
76042012-10-01 Andrew Burgess <aburgess@broadcom.com>
7605
7606 * server.c (handle_search_memory_1): Include access length in
7607 warning message.
7608
07c04788
HPN
76092012-09-05 Michael Brandt <michael.brandt@axis.com>
7610
7611 * linux-crisv32-low.c: Fix compile errors.
7612
918d227b
YQ
76132012-09-04 Yao Qi <yao@codesourcery.com>
7614
7615 * tracepoint.c (cmd_qtsv): Adjust debug message.
7616 Don't check CUR_TPOINT.
7617
18c1b81a
YQ
76182012-08-28 Yao Qi <yao@codesourcery.com>
7619
7620 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7621 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7622 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7623 Remove declarations of xmalloc, xreallloc, xstrdup and
7624 freeargv.
7625 * Makefile.in (libiberty_h): New.
7626 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7627 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7628
dc82f37b
YQ
76292012-08-23 Yao Qi <yao@codesourcery.com>
7630
7631 * server.h: Remove declaration of 'xsnprintf'.
7632
406b1477
KS
76332012-08-22 Keith Seitz <keiths@redhat.com>
7634
7635 * server.h: Include build-gnulib-gbserver/config.h.
7636 * gdbreplay.c: Likewise.
7637
e6712ff1
DE
76382012-08-08 Doug Evans <dje@google.com>
7639
7640 * Makefile.in (SFILES): Add gdb_vecs.c.
7641 (OBS): Add gdb_vecs.o.
7642 (gdb_vecs_h, host_defs_h): New variables.
7643 (thread-db.o): Add $(gdb_vecs_h) dependency.
7644 (gdb_vecs.o): New rule.
7645 * thread-db.c: #include "gdb_vecs.h".
7646 (thread_db_load_search): Use a vector to iterate over path elements.
7647 Handle text appearing after "$pdir".
7648
7649 * configure.ac: Add check for strstr.
7650 * config.in: Regenerate.
7651 * configure: Regenerate.
7652
7c3270ae
UW
76532012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7654
7655 * hostio.c (handle_pread): If pread fails, fall back to attempting
7656 lseek/read.
7657 (handle_pwrite): Likewise for pwrite.
7658
b62e2b27
UW
76592012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7660
7661 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7662 between unsupported TYPE and unimplementable ADDR/LEN combination.
7663 (arm_insert_point): Act on new return value.
7664
78a99e91
PA
76652012-07-31 Pedro Alves <palves@redhat.com>
7666
7667 * server.c (process_point_options): Only skip tokens if we find
7668 one that is unrecognized. Don't treat 'X' specially while
7669 skipping unrecognized tokens.
7670
fcf303ab
UW
76712012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7672
7673 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7674 to 4-byte-align HW breakpoint addresses for Thumb.
7675
7255706c
YQ
76762012-07-27 Yao Qi <yao@codesourcery.com>
7677
7678 PR remote/14161.
7679
7680 * server.h: Declare gdb_agent_about_to_close.
7681 * target.c (kill_inferior): Include "agent.h".
7682 New. Send command 'kill'.
7683 * target.h (kill_inferior): Removed macro.
7684 * tracepoint.c (gdb_agent_about_to_close): New.
7685 (gdb_agent_helper_thread): Handle command 'close'.
7686 Wait endlessly until the inferior stops.
7687 Install gdb_agent_remove_socket to atexit hook.
7688 (agent_socket_name): New static variable.
7689 (gdb_agent_socket_init): Replace local variable 'name' with
7690 'agent_socket_name'.
7691 (gdb_agent_remove_socket): New.
7692
5a3f286f
YQ
76932012-07-27 Yao Qi <yao@codesourcery.com>
7694
7695 * server.c (process_point_options): Stop at 'X' when parsing.
7696
961bd387
ME
76972012-07-19 Michael Eager <eager@eagercon.com>
7698
a261b8f5 7699 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7700 to hw_execute.
7701 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7702 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7703 hardware breakpoint.
7704
aa7c7447
JK
77052012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7706
7707 * gdbserver/linux-low.c (initialize_low): Call
7708 linux_ptrace_init_warnings.
7709
7f216e7c
DE
77102012-07-02 Doug Evans <dje@google.com>
7711
7712 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7713 pointer to int.
7714
d3ce09f5
SS
77152012-07-02 Stan Shebs <stan@codesourcery.com>
7716
7717 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7718 (ax.o): Add it to build rule.
7719 (ax-ipa.o): Ditto.
7720 (OBS): Add format.o.
7721 (IPA_OBS): Add format.o.
7722 * server.c (handle_query): Claim support for breakpoint commands.
7723 (process_point_options): Add command case.
7724 (process_serial_event): Leave running if there are printfs in
7725 effect.
7726 * mem-break.h (any_persistent_commands): Declare.
7727 (add_breakpoint_commands): Declare.
7728 (gdb_no_commands_at_breakpoint): Declare.
7729 (run_breakpoint_commands): Declare.
7730 * mem-break.c (struct point_command_list): New struct.
7731 (struct breakpoint): New field command_list.
7732 (any_persistent_commands): New function.
7733 (add_commands_to_breakpoint): New function.
7734 (add_breakpoint_commands): New function.
7735 (gdb_no_commands_at_breakpoint): New function.
7736 (run_breakpoint_commands): New function.
7737 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7738 locally.
7739 * ax.c: Include format.h.
7740 (ax_printf): New function.
7741 (gdb_eval_agent_expr): Add printf opcode.
7742
2f8f6aed
YQ
77432012-06-13 Yao Qi <yao@codesourcery.com>
7744
7745 * server.c (start_inferior): Remove duplicated writes to fields
7746 'last_resume_kind' and 'last_status' of 'current_inferior'.
7747
0c9070b3
YQ
77482012-06-12 Yao Qi <yao@codesourcery.com>
7749 Pedro Alves <palves@redhat.com>
7750
7751 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7752 comment.
7753 * server.c (handle_v_cont): Extend comment.
7754
c52daf70
YQ
77552012-06-11 Yao Qi <yao@codesourcery.com>
7756
7757 * linux-low.c (linux_attach): Add 'static'.
7758
d38bbb0a
YQ
77592012-06-06 Yao Qi <yao@codesourcery.com>
7760
7761 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7762
89dc0afd
JK
77632012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7764
7765 Fix gcc -flto compilation warning.
7766 * server.c (main): Make variable multi_mode and attach volatile.
7767
75f62ce7
TJB
77682012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7769
7770 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7771 if the platform doesn't know about it.
7772
65f479b6
PA
77732012-05-30 Jeff Kenton <jkenton@tilera.com>
7774
7775 * Makefile.in (SFILES): Add linux-tile-low.c.
7776 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7777 * configure.srv: Handle tilegx-*-linux*.
7778 * linux-tile-low.c: New file.
7779
0c5bf5a9
JK
77802012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7781
7782 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7783
a493e3e2
PA
77842012-05-24 Pedro Alves <palves@redhat.com>
7785
7786 PR gdb/7205
7787
43aaf8b6 7788 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7789
2ea28649
PA
77902012-05-24 Pedro Alves <palves@redhat.com>
7791
7792 PR gdb/7205
7793
7794 Replace target_signal with gdb_signal throughout.
7795
8d409d16
MR
77962012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7797
7798 * linux-low.c (linux_store_registers): Avoid the copying sequence
7799 when no data has been retrieved by ptrace.
7800
23512c01
MGD
78012012-05-22 Will Deacon <will.deacon@arm.com>
7802
7803 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7804 Include asm/ptrace.h.
7805 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7806 already defined.
7807
4934b29e
MR
78082012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7809
7810 * linux-low.c (linux_store_registers): Don't re-retrieve data
7811 with ptrace that has already been obtained from /proc. Always
7812 copy any data retrieved with ptrace to the buffer supplied.
7813
bde24c0a
PA
78142012-05-11 Yao Qi <yao@codesourcery.com>
7815 Pedro Alves <palves@redhat.com>
7816
7817 * linux-low.c (enum stopping_threads_kind): New.
7818 (stopping_threads): Change type to `enum stopping_threads_kind'.
7819 (handle_extended_wait): If stopping and suspending threads, leave
7820 the new_lwp suspended too.
7821 (linux_wait_for_event): Adjust.
7822 (stop_all_lwps): Set `stopping_threads' to
7823 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7824 whether we're suspending threads or just stopping them. Assert no
7825 recursion happens.
7826
623b6bdf
YQ
78272012-04-29 Yao Qi <yao@codesourcery.com>
7828
7829 * server.h: Move some code to ...
7830 * gdbthread.h: ... here. New.
7831 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7832 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7833 (nto-low.o, win32-low.o): Likewise.
7834 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7835 * regcache.c, remote-utils.c, server.c: Likewise.
7836 * target.c, tracepoint.c, win32-low.c: Likewise.
7837
f15f9948
TJB
78382012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7839
7840 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7841 (PTRACE_ARG4_TYPE): Likewise.
7842 (PTRACE_XFER_TYPE): Likewise.
7843 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7844 ptrace to PTRACE_ARG3_TYPE.
7845 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7846 (PTRACE_ARG4_TYPE): Likewise.
7847 (PTRACE_XFER_TYPE): Likewise.
7848 (linux_detach_one_lwp): Cast fourth argument of
7849 ptrace to long then PTRACE_ARG4_TYPE.
7850 (regsets_fetch_inferior_registers): Cast third argument of
7851 ptrace to long then PTRACE_ARG3_TYPE.
7852 (regsets_store_inferior_registers): Likewise.
7853
38ea300a
PA
78542012-04-20 Pedro Alves <palves@redhat.com>
7855
7856 * configure: Regenerate.
7857
c971b7fa
PA
78582012-04-19 Pedro Alves <palves@redhat.com>
7859
43aaf8b6 7860 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7861 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7862 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7863 (all, install-only, uninstall, clean-info, all-lib, clean): No
7864 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7865 (maintainer-clean realclean distclean): Use subdir_do.
7866 (subdir_do): New.
7867 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7868 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7869 * acinclude.m4: Include acx_configure_dir.m4.
7870 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7871 calls. Call AC_PROG_RANLIB. Configure gnulib using
7872 ACX_CONFIGURE_DIR.
7873 (GNULIB): New.
7874 (GNULIB_STDINT_H): Adjust.
7875 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7876 * gdbreplay.c: Include build-gnulib/config.h.
7877 * server.h: Likewise.
7878 * aclocal.m4: Regenerate.
7879 * config.in: Regenerate.
7880 * configure: Regenerate.
c971b7fa 7881
809277f8
PA
78822012-04-19 Pedro Alves <palves@redhat.com>
7883
7884 * Makefile.in (LIBGNU, INCGNU): Adjust.
7885 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7886 (all, install-only, uninstall, clean-info, all-lib, clean)
7887 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7888 * configure.ac: Adjust AC_OUTPUT output.
7889 * aclocal.m4: Regenerate.
7890 * configure: Regenerate.
7891
fd9bb8b8
PA
78922012-04-19 Pedro Alves <palves@redhat.com>
7893
7894 * Makefile.in (generated_files): New.
7895 (server_h): Remove the explicit dependency on config.h, and depend
7896 on $generated_files.
7897
1c298c66
PA
78982012-04-19 Pedro Alves <palves@redhat.com>
7899
7900 * Makefile.in (INCGNU): Add -Ignulib.
7901
57c4b50b
PA
79022012-04-19 Pedro Alves <palves@redhat.com>
7903
7904 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7905 (INCGNU): ... this, and spell out -I here.
7906 (GNULIB_LIB): Rename to ...
7907 (LIBGNU): ... this.
7908 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7909
1030e047
PA
79102012-04-19 Pedro Alves <palves@redhat.com>
7911
7912 * config.in: Regenerate.
7913
447d4319
PA
79142012-04-19 Pedro Alves <palves@redhat.com>
7915
7916 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7917 * server.h (memmem): Remove declaration.
7918 * config.in: Regenerate.
7919 * configure: Regenerate.
7920
aad9eab9
YQ
79212012-04-19 Yao Qi <yao@codesourcery.com>
7922
7923 * Makefile.in (SFILES): Add common/vec.c.
7924 (OBS): Add vec.o.
7925 (vec.o): New rule.
7926
3e10640f
YQ
79272012-04-19 Yao Qi <yao@codesourcery.com>
7928
7929 * remote-utils.c (prepare_resume_reply): Replace with macro
7930 target_core_of_thread.
7931 * server.c (handle_qxfer_threads_proper): Likewise.
7932 * target.h (traget_core_of_thread): New macro.
7933
71622373
PA
79342012-04-18 Pedro Alves <palves@redhat.com>
7935
7936 * aclocal.m4: Regenerate.
7937 * configure: Regenerate.
7938
80d26939
YQ
79392012-04-16 Yao Qi <yao@codesourcery.com>
7940
7941 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7942 duplicated on address.
7943
42476b70
YQ
79442012-04-16 Yao Qi <yao@codesourcery.com>
7945
7946 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7947 (struct tracepoint_action_ops) <send>: New field.
7948 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7949 (agent_expr_send, x_tracepoint_action_send): New.
7950 (l_tracepoint_action_send): New.
7951 (cmd_qtdp): Download and install tracepoint
7952 according to `use_agent'.
7953 (run_inferior_command): Add one more parameter `len'.
7954 Update callers.
7955 (tracepoint_send_agent): New.
7956 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7957
7bc83639
YQ
79582012-04-16 Yao Qi <yao@codesourcery.com>
7959
7960 * tracepoint.c (download_tracepoints): Moved to ...
7961 (cmd_qtstart): ... here.
7962
5f18041e
YQ
79632012-04-14 Yao Qi <yao@codesourcery.com>
7964
7965 * tracepoint.c: Include inttypes.h.
7966 (struct collect_memory_action): Use sized types.
7967 (struct tracepoint): Likewise.
7968 (cmd_qtdp, stop_tracing): Update print specifiers.
7969 (cmd_qtp, response_tracepoint): Likewise.
7970 (collect_data_at_tracepoint): Likewise.
7971 (collect_data_at_step): Likewise.
7972
55a8c076
YQ
79732012-04-14 Yao Qi <yao@codesourcery.com>
7974
7975 Import gnulib module inttypes.
7976 * aclocal.m4, config.in, configure: Regenerated.
7977
dc750257
YQ
79782012-04-14 Yao Qi <yao@codesourcery.com>
7979
7980 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7981 Makefile and config.status at last.
7982
0ab5faf9
YQ
79832012-04-13 Yao Qi <yao@codesourcery.com>
7984
7985 * tracepoint.c: Include stdint.h unconditionally.
7986
18f5fd81
TJB
79872012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7988
7989 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7990 on BFD_HAVE_SYS_PROCFS_TYPE.
7991 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7992 * configure: Regenerate.
7993 * config.in: Likewise.
7994
4d47af5c
L
79952012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7996
7997 * Makefile.in (clean): Also remove x32.c x32-linux.c
7998 x32-avx.c x32-avx-linux.c.
7999 (x32.o): New target.
8000 (x32.c): Likewise.
8001 (x32-linux.o): Likewise.
8002 (x32-linux.c): Likewise.
8003 (x32-avx.o): Likewise.
8004 (x32-avx.c): Likewise.
8005 (x32-avx-linux.o): Likewise.
8006 (x32-avx-linux.c): Likewise.
8007
8008 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8009 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8010 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8011 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8012 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8013 i386/x32-avx-linux.xml.
8014
8015 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8016 (init_registers_x32_avx_linux): Likwise.
8017 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8018 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8019
ecedbe58
PA
80202012-04-13 Pedro Alves <palves@redhat.com>
8021
8022 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8023 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8024 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8025 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8026 the sub-make.
8027
c92b5177
L
80282012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8029
8030 * linux-x86-low.c (compat_x32_clock_t): New.
8031 (compat_x32_siginfo_t): Likewise.
8032 (compat_x32_siginfo_from_siginfo): Likewise.
8033 (siginfo_from_compat_x32_siginfo): Likewise.
8034 (linux_is_elf64): Likewise.
8035 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8036 and siginfo_from_compat_x32_siginfo for x32.
8037 (x86_arch_setup): Set linux_is_elf64.
8038
214d508e
L
80392012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8040
8041 PR gdb/13969
8042 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8043 e_machine field.
8044 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8045 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8046 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8047 compatible with process.
8048
c9a1864a
YQ
80492012-04-12 Yao Qi <yao@codesourcery.com>
8050
8051 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8052 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8053 (install-only, install-info, clean): Handle sub dir gnulib.
8054 (all-lib, am--refresh): New targets.
8055 (memmem.o): Remove target.
8056 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8057 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8058 (AC_REPLACE_FUNCS): Remove memmem.
8059 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8060 (AC_OUTPUT): Generate Makefile in gnulib/.
8061 * aclocal.m4, config.in, configure: Regenerated.
8062
367ba2c2
MR
80632012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8064
8065 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8066
9d236627
PA
80672012-04-05 Pedro Alves <palves@redhat.com>
8068
8069 -Werror=strict-aliasing
8070
8071 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8072 pointer.
8073
111217b3
PA
80742012-04-04 Pedro Alves <palves@redhat.com>
8075
8076 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8077 (sparc_store_gregset_from_stack, sparc_store_gregset)
8078 (sparc_breakpoint_at): Fix formatting.
8079
8365dcf5
TJB
80802012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8081
8082 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8083 are available.
8084 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8085 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8086 * config.in: Regenerate.
8087 * configure: Likewise.
8088
689cc2ae
PA
80892012-03-29 Pedro Alves <palves@redhat.com>
8090
8091 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8092 Correct ptrace arguments.
8093
c14dfd32
PA
80942012-03-28 Pedro Alves <palves@redhat.com>
8095
8096 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8097 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8098 (IA64_FR1_REGNUM): New defines.
8099 (ia64_fetch_register): New.
8100 (the_low_target): Install it.
8101 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8102 field.
8103 * linux-low.c (linux_fetch_registers): Try the
8104 the_low_target.fetch_register hook first.
8105
8106 * linux-arm-low.c (the_low_target): Adjust.
8107 * linux-bfin-low.c (the_low_target): Adjust.
8108 * linux-cris-low.c (the_low_target): Adjust.
8109 * linux-crisv32-low.c (the_low_target): Adjust.
8110 * linux-m32r-low.c (the_low_target): Adjust.
8111 * linux-m68k-low.c (the_low_target): Adjust.
8112 * linux-mips-low.c (the_low_target): Adjust.
8113 * linux-ppc-low.c (the_low_target): Adjust.
8114 * linux-s390-low.c (the_low_target): Adjust.
8115 * linux-sh-low.c (the_low_target): Adjust.
8116 * linux-sparc-low.c (the_low_target): Adjust.
8117 * linux-tic6x-low.c (the_low_target): Adjust.
8118 * linux-x86-low.c (the_low_target): Adjust.
8119 * linux-xtensa-low.c (the_low_target): Adjust.
8120
63c88e13
PA
81212012-03-26 Pedro Alves <palves@redhat.com>
8122
8123 * server.c (handle_qxfer_libraries): Don't bail early if
8124 the_target->qxfer_libraries_svr4 is not NULL.
8125
fb723180
PA
81262012-03-26 Pedro Alves <palves@redhat.com>
8127
8128 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8129
0afae3cf
PA
81302012-03-23 Pedro Alves <palves@redhat.com>
8131
8132 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8133 "library-list-svr4" element's start tag when the the DSO list is
8134 empty.
8135
485f1ee4
PA
81362012-03-23 Pedro Alves <palves@redhat.com>
8137
8138 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8139 a variable whose type size is the same as the inferior's pointer
8140 size.
8141
a5362b9a
TS
81422012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8143
8144 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8145 struct siginfo.
8146 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8147 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8148 * linux-low.h: Include <signal.h>.
8149 (struct siginfo): Remove forward declaration.
8150 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8151 struct siginfo.
8152
d226c142
MF
81532012-03-21 Mike Frysinger <vapier@gentoo.org>
8154
8155 * .gitignore: Ignore more files.
8156
122f36ef
PA
81572012-03-19 Pedro Alves <palves@redhat.com>
8158 Jan Kratochvil <jan.kratochvil@redhat.com>
8159
8160 * server.c (cont_thread, general_thread): Add describing comments.
8161 (start_inferior): Clear `cont_thread'.
8162 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8163 of a process.
8164
fc3e5175
YQ
81652012-03-15 Yao Qi <yao@codesourcery.com>
8166
8167 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8168 handling to ...
8169 (cmd_qtdp): ... here.
8170
8d0d92cd
YQ
81712012-03-15 Yao Qi <yao@codesourcery.com>
8172
8173 * tracepoint.c (struct tracepoint_action_ops): New.
8174 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8175 (m_tracepoint_action_download): New.
8176 (r_tracepoint_action_download): New.
8177 (x_tracepoint_action_download): New.
8178 (l_tracepoint_action_download): New.
8179 (add_tracepoint_action): Install `action->ops' according type.
8180 (download_tracepoint_1): Move code `download' function pointer
8181 of various tracepoint_action_ops.
8182
87b0bb13
JK
81832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8184
8185 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8186 linux_ptrace_attach_warnings.
8187
5f572dec
JK
81882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8189
8190 * Makefile.in (linux-ptrace.o): New.
8191 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8192 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8193 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8194 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8195 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8196 of these targets.
8197 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8198
f4647387
YQ
81992012-03-08 Yao Qi <yao@codesourcery.com>
8200 Pedro Alves <palves@redhat.com>
8201
8202 Fix PR server/13392.
8203 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8204 offset of JMP insn.
8205 * tracepoint.c (remove_tracepoint): New.
8206 (cmd_qtdp): Call remove_tracepoint when failed to install.
8207
9b224c5e
PA
82082012-03-07 Pedro Alves <palves@redhat.com>
8209
8210 * linux-low.c (get_detach_signal): New.
8211 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8212 Pass on pending signals to PTRACE_DETACH. Check the result of the
8213 ptrace call.
8214 * server.c (program_signals, program_signals_p): New.
8215 (handle_general_set): Handle QProgramSignals.
8216 * server.h (program_signals, program_signals_p): Declare.
8217
e237a7e2
JK
82182012-03-05 Pedro Alves <palves@redhat.com>
8219 Jan Kratochvil <jan.kratochvil@redhat.com>
8220
8221 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8222 New comment why.
8223
5808517f
YQ
82242012-03-03 Yao Qi <yao@codesourcery.com>
8225
8226 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8227 agent_look_up_symbols.
8228
58b4daa5
YQ
82292012-03-03 Yao Qi <yao@codesourcery.com>
8230
8231 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8232 (linux-x86-low.o): Likewise.
8233 * server.h: Remove in_process_agent_loaded.
8234 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8235 common/agent.c.
8236 Update callers.
8237
8ffcbaaf
YQ
82382012-03-03 Yao Qi <yao@codesourcery.com>
8239
8240 * tracepoint.c (gdb_agent_capability): New global.
8241 (in_process_agent_loaded_ust): Renamed to
8242 `in_process_agent_supports_ust'.
8243 Update callers.
8244 (in_process_agent_supports_ust): Call agent_capability_check.
8245 (clear_installed_tracepoints): Assert that agent supports
8246 agent.
8247
d1feda86
YQ
82482012-03-03 Yao Qi <yao@codesourcery.com>
8249
8250 * linux-low.c (linux_supports_agent): New.
8251 (linux_target_ops): Initialize field `supports_agent' with
8252 linux_supports_agent.
8253 * target.h (struct target_ops) <supports_agent>: New.
8254 (target_supports_agent): New macro.
8255 * server.c (handle_general_set): Handle packet 'QAgent'.
8256 (handle_query): Send `QAgent+'.
8257 * Makefile.in (server.o): Depends on agent.h.
8258
2fa291ac
YQ
82592012-03-03 Yao Qi <yao@codesourcery.com>
8260
8261 * Makefile.in (OBS): Add agent.o.
8262 Add new rule for agent.o.
8263 Track dependence of tracepoint.c on agent.h.
8264 * tracepoint.c (run_inferior_command_1):
8265 (run_inferior_command): Call agent_run_command.
8266 (gdb_ust_connect_sync_socket): Deleted. Move it to
8267 common/agent.c.
8268 (resume_thread, stop_thread): Likewise.
8269 (gdb_ust_socket_init): Renamed to ...
8270 (gdb_agent_socket_init): ... New.
8271 (gdb_ust_thread): Renamed to ...
8272 (gdb_agent_helper_thread): ... New.
8273 (gdb_ust_init): Move some code to ...
8274 (gdb_agent_init): ... here. New.
8275 [HAVE_UST]: Call gdb_ust_init.
8276 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8277 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8278 * config.in, configure: Regenerated.
8279
05044653
PA
82802012-03-02 Pedro Alves <palves@redhat.com>
8281
8282 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8283 * linux-low.c (struct simple_pid_list): New.
8284 (stopped_pids): New a struct simple_pid_list pointer.
8285 (add_to_pid_list, pull_pid_from_list): New.
8286 (handle_extended_wait): Don't assume the first signal new children
8287 report is SIGSTOP. Adjust call to pull_pid_from_list.
8288 (linux_wait_for_lwp): Adjust.
8289
8d00225b
YQ
82902012-03-02 Yao Qi <yao@codesourcery.com>
8291
8292 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8293 debug log.
8294
19560ba5
YQ
82952012-03-02 Yao Qi <yao@codesourcery.com>
8296
8297 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8298 `stop_pc' and `tpoint'. Update caller.
8299
1faeff08
MR
83002012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8301
8302 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8303 * linux-low.c (use_linux_regsets): New macro.
8304 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8305 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8306 (linux_register_in_regsets): New function.
8307 (usr_fetch_inferior_registers): Skip registers covered by
8308 regsets.
8309 (usr_store_inferior_registers): Likewise.
8310 (usr_fetch_inferior_registers): New macro.
8311 (usr_store_inferior_registers): Likewise.
8312 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8313 (linux_store_registers): Likewise.
8314 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8315 prototype.
8316 (init_registers_mips64_dsp_linux): Likewise.
8317 (init_registers_mips_linux): New macro.
8318 (init_registers_mips_dsp_linux): Likewise.
8319 (mips_dsp_num_regs): Likewise.
8320 (DSP_BASE, DSP_CONTROL): New fallback macros.
8321 (mips_base_regs): New macro.
8322 (mips_regmap): Use it. Fix the size.
8323 (mips_dsp_regmap): New variable.
8324 (mips_dsp_regset_bitmap): Likewise.
8325 (mips_arch_setup): New function.
8326 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8327 than mips_regmap.
8328 (mips_cannot_store_register): Likewise.
8329 (the_low_target): Update .arch_setup, .num_regs and .regmap
8330 initializers. Add .regset_bitmap initializer.
8331 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8332 initializer.
8333 * linux-bfin-low.c (the_low_target): Likewise.
8334 * linux-cris-low.c (the_low_target): Likewise.
8335 * linux-crisv32-low.c (the_low_target): Likewise.
8336 * linux-ia64-low.c (the_low_target): Likewise.
8337 * linux-m32r-low.c (the_low_target): Likewise.
8338 * linux-m68k-low.c (the_low_target): Likewise.
8339 * linux-ppc-low.c (the_low_target): Likewise.
8340 * linux-s390-low.c (the_low_target): Likewise.
8341 * linux-sh-low.c (the_low_target): Likewise.
8342 * linux-sparc-low.c (the_low_target): Likewise.
8343 * linux-tic6x-low.c (the_low_target): Likewise.
8344 * linux-x86-low.c (the_low_target): Likewise.
8345 * linux-xtensa-low.c (the_low_target): Likewise.
8346 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8347 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8348 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8349 srv_xmlfiles.
8350 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8351 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8352
c03e6ccc
YQ
83532012-02-29 Yao Qi <yao@codesourcery.com>
8354 Pedro Alves <palves@redhat.com>
8355
8356 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8357 `step_over_finished' is true.
8358
644cebc9
PA
83592012-02-27 Pedro Alves <palves@redhat.com>
8360
8361 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8362 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8363
c14d7ab2
PA
83642012-02-27 Pedro Alves <palves@redhat.com>
8365
8366 PR server/9684
8367 * linux-low.c (pid_is_stopped): New.
8368 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8369
412c89dd
LM
83702012-02-25 Luis Machado <lgustavo@codesourcery.com>
8371
8372 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8373 of conditions.
8374
b745defe
MR
83752012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8376
8377 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8378
9f3a5c85
LM
83792012-02-24 Luis Machado <lgustavo@codesourcery>
8380
8381 * server.c (handle_query): Advertise support for target-side
8382 breakpoint condition evaluation.
8383 (process_point_options): New function.
8384 (process_serial_event): When inserting a breakpoint, check for
8385 a target-side condition that should be evaluated.
8386
8387 * mem-break.c: Include regcache.h and ax.h.
8388 (point_cond_list_t): New data structure.
8389 (breakpoint) <cond_list>: New field.
8390 (find_gdb_breakpoint_at): Make non-static.
8391 (delete_gdb_breakpoint_at): Clear any target-side
8392 conditions.
8393 (clear_gdb_breakpoint_conditions): New function.
8394 (add_condition_to_breakpoint): Likewise.
8395 (add_breakpoint_condition): Likewise.
8396 (gdb_condition_true_at_breakpoint): Likewise.
8397 (gdb_breakpoint_here): Return result directly instead
8398 of going through a local variable.
8399
8400 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8401 (clear_gdb_breakpoint_conditions): Likewise.
8402 (add_breakpoint_condition): Likewise.
8403 (gdb_condition_true_at_breakpoint): Likewise.
8404
8405 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8406 (need_step_over_p): Take target-side breakpoint condition into
8407 consideration.
8408
5e1dc496
LM
84092012-02-24 Luis Machado <lgustavo@codesourcery>
8410
8411 * server.h: Include tracepoint.h.
8412 (agent_mem_read, agent_get_trace_state_variable_value,
8413 agent_set_trace_state_variable_value,
8414 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8415 get_set_tsv_func_addr): New prototypes.
8416
8417 * ax.h: New include file.
8418 * ax.c: New source file.
8419
8420 * tracepoint.c: Include ax.h.
8421 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8422 agent_expr, eval_result_type): Move to ax.h.
8423 (parse_agent_expr): Rename to ...
8424 (gdb_parse_agent_expr): ... this, make it non-static and move
8425 to ax.h.
8426 (unparse_agent_expr) Rename to ...
8427 (gdb_unparse_agent_expr): ... this, make it non-static and move
8428 to ax.h.
8429 (eval_agent_expr): Rename to ...
8430 (eval_tracepoint_agent_expr): ... this.
8431 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8432 forward declarations.
8433 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8434 (agent_get_trace_state_variable_value): New function.
8435 (agent_set_trace_state_variable_value): New function.
8436 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8437 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8438 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8439 (condition_true_at_tracepoint): Likewise.
8440 (parse_agent_expr): Rename to ...
8441 (gdb_parse_agent_expr): ... this and move to ax.c.
8442 (unparse_agent_expr): Rename to ...
8443 (gdb_unparse_agent_expr): ... this and move to ax.c.
8444 (gdb_agent_op_name): Move to ax.c.
8445 (eval_agent_expr): Rename to ...
8446 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8447 and move to ax.c.
8448 (eval_tracepoint_agent_expr): New function.
8449 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8450 non-static.
5e1dc496
LM
8451 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8452 ax.c.
8453 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8454 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8455 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8456 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8457 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8458 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8459 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8460 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8461 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8462 (compile_bytecodes): Remove forward declaration.
8463 (is_goto_target): Move to ax.c.
8464 (compile_bytecodes): Move to ax.c and call
8465 agent_get_trace_state_variable_value (...) and
8466 agent_set_trace_state_variable_value (...).
8467
8468 * Makefile.in: Update ax.c and IPA dependencies.
8469
277e4e52
PA
84702012-02-24 Pedro Alves <palves@redhat.com>
8471
8472 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8473 (cmd_bigqtbuffer_circular): ... this. Only handle
8474 'QTBuffer:circular:'.
8475 (handle_tracepoint_general_set): Adjust.
8476
bf4c19f7
YQ
84772012-02-16 Yao Qi <yao@codesourcery.com>
8478
8479 * inferiors.c: Move code to ...
8480 * dll.c: .... here. New.
8481 * server.h: Declare clear_dlls.
8482 * Makefile.in (SFILES): Add dll.c.
8483 (OBS): Add dll.o
8484 (dll.o): New rule.
8485
d73f2619
YQ
84862012-02-11 Yao Qi <yao@codesourcery.com>
8487
8488 * server.c: (handle_monitor_command): Add a new parameter
8489 `own_buf'.
8490 (handle_query): Update caller.
8491
f8255c2a
JB
84922012-02-09 Joel Brobecker <brobecker@adacore.com>
8493
8494 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8495 * configure, config.in: Regenerate.
8496 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8497 is not defined.
8498
da84f473
PA
84992012-02-02 Pedro Alves <palves@redhat.com>
8500
8501 Try SIGKILL first, then PTRACE_KILL.
8502 * linux-low.c (linux_kill_one_lwp): New.
8503 (linux_kill_one_lwp): Rename to ...
8504 (kill_one_lwp_callback): ... this. Use the new
8505 linux_kill_one_lwp.
8506
e886a173
PA
85072012-02-02 Pedro Alves <palves@redhat.com>
8508
8509 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8510 inferior.
8511
be07f1a2
PA
85122012-01-27 Pedro Alves <palves@redhat.com>
8513
8514 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8515 (elf_64_file_p): Make static.
8516 (linux_pid_exe_is_elf_64_file): New.
8517 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8518 Delete declarations.
8519 (linux_pid_exe_is_elf_64_file): Declare.
8520 * linux-x86-low.c (x86_arch_setup): Use
8521 linux_pid_exe_is_elf_64_file.
8522
d8301ad1
JK
85232012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8524
8525 * linux-low.c (linux_wait_for_event_1): Rename to ...
8526 (linux_wait_for_event): ... here and merge it with former
8527 linux_wait_for_event - new variable wait_ptid, use it.
8528 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8529
01b17894
PA
85302012-01-23 Pedro Alves <palves@redhat.com>
8531
8532 * server.c (main): Avoid yet another case of infinite loop while
8533 detaching/killing after a longjmp.
8534
e825046f
JK
85352012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8536
8537 Code cleanup.
8538 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8539
b9e7b9c3
UW
85402012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8541
8542 * hostio.c (handle_readlink): New function.
8543 (handle_vFile): Call it to handle "vFile:readlink" packets.
8544
901f9912
UW
85452012-01-20 Pedro Alves <palves@redhat.com>
8546 Ulrich Weigand <ulrich.weigand@linaro.org>
8547
8548 * server.c (handle_v_requests): Only support vAttach and vRun to
8549 start multiple processes when in extended protocol mode.
8550
fc1ab1a0
PA
85512012-01-17 Pedro Alves <palves@redhat.com>
8552
8553 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8554 memalign plus mprotect to allocate the scratch buffer.
8555
7d5d4e98
PA
85562012-01-13 Pedro Alves <palves@redhat.com>
8557
8558 * server.c (attach_inferior): Clear `cont_thread'.
8559
f128d5e9
PA
85602012-01-13 Pedro Alves <palves@redhat.com>
8561
8562 * server.c (main): Avoid infinite loop while detaching/killing
8563 after a longjmp.
8564
06db92f0
DE
85652012-01-09 Doug Evans <dje@google.com>
8566
8567 * server.c (start_inferior): Set last_ptid in --wrapper case.
8568
32d92999
YQ
85692012-01-06 Yao Qi <yao@codesourcery.com>
8570
8571 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8572 defined.
8573 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8574
5e0a92a9
YQ
85752012-01-04 Yao Qi <yao@codesourcery.com>
8576
8577 * tracepoint.c (cmd_qtdp): Print debug message
8578 for static tracepoint.
8579
ae639e8c
YQ
85802012-01-04 Yao Qi <yao@codesourcery.com>
8581
8582 * tracepoint.c (trace_vdebug): Differentiate debug message
8583 between gdbserver and IPA.
8584
f72429c5
YQ
85852012-01-03 Yao Qi <yao@codesourcery.com>
8586
8587 * tracepoint.c (tracepoint_was_hit): Don't collect for
8588 static tracepoint.
8589
12c3e59c
JB
85902012-01-02 Joel Brobecker <brobecker@adacore.com>
8591
8592 * terminal.h: Reformat copyright header.
8593
67827812
JB
85942012-01-02 Joel Brobecker <brobecker@adacore.com>
8595
8596 * server.c (gdbserver_version): Update copyright year.
8597 * gdbreplay.c (gdbreplay_version): Likewise.
8598
3e52c33d
JK
85992011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8600
8601 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8602
8603 Revert:
8604 2011-12-18 Hui Zhu <teawater@gmail.com>
8605 * linux-low.c (linux_create_inferior): Save return value to ret.
8606
66f1260e
HZ
86072011-12-18 Hui Zhu <teawater@gmail.com>
8608
8609 * linux-low.c (linux_create_inferior): Save return value to ret.
8610
e77616d7
DE
86112011-12-16 Doug Evans <dje@google.com>
8612
e7b06c57
DE
8613 * linux-low.c (linux_create_inferior): If stdio connection,
8614 redirect stdin from /dev/null, stdout to stderr.
8615 * remote-utils.c (remote_is_stdio): New static global.
8616 (remote_connection_is_stdio): New function.
8617 (remote_prepare): Handle stdio connection.
8618 (remote_open): Ditto.
8619 (remote_close): Don't close stdin for stdio connections.
8620 (read_prim,write_prim): New functions. Replace all calls to
8621 read/write to these.
8622 * server.c (main): Watch for "-" argument. Move call to
8623 remote_prepare before start_inferior.
8624 * server.h (STDIO_CONNECTION_NAME): New macro.
8625 (remote_connection_is_stdio): Declare.
8626
e77616d7
DE
8627 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8628 in debugging output.
8629
82067193
YQ
86302011-12-15 Yao Qi <yao@codesourcery.com>
8631
8632 * tracepoint.c: Include sys/syscall.h.
8633 (gdb_ust_thread): Remove preprocessor conditional.
8634
82bfbe7e
PA
86352011-12-14 Pedro Alves <pedro@codesourcery.com>
8636
8637 * linux-low.c (linux_detach_one_lwp): Call
8638 the_low_target.prepare_to_resume before detaching.
8639
712c6575
YQ
86402011-12-14 Yao Qi <yao@codesourcery.com>
8641
8642 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8643 of write.
8644
d54d1edf
YQ
86452011-12-14 Yao Qi <yao@codesourcery.com>
8646
8647 * i386-low.c (i386_low_stopped_data_address): Initialize local
8648 variable `control'.
8649
6210a125
PA
86502011-12-13 Pedro Alves <pedro@codesourcery.com>
8651
8652 PR remote/13492
8653
8654 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8655 DR_CONTROL unless necessary. Extend comments.
8656 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8657 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8658
2ece8244
YQ
86592011-12-13 Yao Qi <yao@codesourcery.com>
8660
8661 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8662 macros.
8663 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8664
784867a5
JK
86652011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8666
8667 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8668 Print new debug message for such case.
8669
6bf36717
JK
86702011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8671
8672 Fix overlapping memcpy.
8673 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8674 the read_inferior_memory transfer.
8675 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8676 write_inferior_memory transfer.
8677 (set_fast_tracepoint_jump): New variable buf. Use it for the
8678 read_inferior_memory and write_inferior_memory transfers.
8679 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8680 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8681 Use it for the write_inferior_memory transfer.
8682 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8683 buffers.
8684
50275556
MR
86852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8686
8687 * linux-low.c (fetch_register, store_register): Make code
8688 consistent, fix formatting.
8689
7325beb4
MR
86902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8691
8692 * linux-low.c (usr_store_inferior_registers): Factor out code
8693 to handle individual registers into...
8694 (store_register): ... this new function.
8695
c642a434
UW
86962011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8697
8698 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8699 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8700 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8701 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8702 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8703 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8704 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8705 (srv_xmlfiles): Add new XML files.
8706
8707 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8708 and <sys/uio.h>.
8709 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8710 (init_registers_s390_linux32v1): Add prototype.
8711 (init_registers_s390_linux32v2): Likewise.
8712 (init_registers_s390_linux64v1): Likewise.
8713 (init_registers_s390_linux64v2): Likewise.
8714 (init_registers_s390x_linux64v1): Likewise.
8715 (init_registers_s390x_linux64v2): Likewise.
8716 (s390_num_regs): Increment to 52.
8717 (s390_regmap): Add orig_r2 register.
8718 (s390_num_regs_3264): Increment to 68.
8719 (s390_regmap_3264): Add orig_r2 register.
8720 (s390_collect_ptrace_register): Handle orig_r2 register.
8721 (s390_supply_ptrace_register): Likewise.
8722 (s390_fill_last_break): New function.
8723 (s390_store_last_break): Likewise.
8724 (s390_fill_system_call): New function.
8725 (s390_store_system_call): Likewise.
8726 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8727 register sets.
8728 (s390_check_regset): New function.
8729 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8730 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8731 Update target_regsets for available register sets.
8732
2268b414
JK
87332011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8734 Jan Kratochvil <jan.kratochvil@redhat.com>
8735
8736 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8737 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8738 New.
8739 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8740 * linux-low.h (struct process_info_private): New member r_debug.
8741 * server.c (handle_qxfer_libraries): Call
8742 the_target->qxfer_libraries_svr4.
8743 (handle_qxfer_libraries_svr4): New function.
8744 (qxfer_packets): New entry "libraries-svr4".
8745 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8746 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8747 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8748 PACKET_qXfer_libraries_svr4.
8749
d6db1fab
UW
87502011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8751
8752 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8753 PSW address/mask between 8-byte and 16-byte formats.
8754 (s390_supply_ptrace_register): Likewise.
8755 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8756 basic addressing mode bit.
8757
242f5f1c
SS
87582011-11-24 Stan Shebs <stan@codesourcery.com>
8759
8760 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8761
f196051f
SS
87622011-11-17 Stan Shebs <stan@codesourcery.com>
8763
8764 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8765 (tracing_start_time): New global.
8766 (tracing_stop_time): New global.
8767 (tracing_user_name): New global.
8768 (tracing_notes): New global.
8769 (tracing_stop_note): New global.
8770 (cmd_qtstart): Set traceframe_usage, start_time.
8771 (stop_tracing): Set stop_time.
8772 (cmd_qtstatus): Report additional status.
8773 (cmd_qtp): New function.
8774 (handle_tracepoint_query): Call it.
8775 (cmd_qtnotes): New function.
8776 (handle_tracepoint_general_set): Call it.
8777 (get_timestamp): Rename from tsv_get_timestamp.
8778
405f8e94
SS
87792011-11-14 Stan Shebs <stan@codesourcery.com>
8780 Kwok Cheung Yeung <kcy@codesourcery.com>
8781
8782 * linux-x86-low.c (small_jump_insn): New.
8783 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8784 trampoline and error message, build a trampoline and issue a small
8785 jump instruction to it.
8786 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8787 trampoline and error message.
8788 (x86_get_min_fast_tracepoint_insn_len): New.
8789 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8790 * linux-low.h (struct linux_target_ops): Add arguments to
8791 install_fast_tracepoint_jump_pad operation, add new operation.
8792 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8793 arguments.
8794 (linux_get_min_fast_tracepoint_insn_len): New function.
8795 (linux_target_op): Add new operation.
8796 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8797 (gdb_trampoline_buffer_end): Ditto.
8798 (gdb_trampoline_buffer_error): Ditto.
8799 (struct ipa_sym_addresses): Add fields for new IPA variables.
8800 (symbol_list): Add entries for new IPA variables.
8801 (struct tracepoint): Add fields to hold the address range of the
8802 trampoline used by the tracepoint.
8803 (trampoline_buffer_head): New static variable.
8804 (trampoline_buffer_tail): Ditto.
8805 (claim_trampoline_space): New function.
8806 (have_fast_tracepoint_trampoline_buffer): New function.
8807 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8808 structure.
8809 (install_fast_tracepoint): Ditto, also add error buffer argument.
8810 (cmd_qtminftpilen): New function.
8811 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8812 (fast_tracepoint_from_trampoline_address): New function.
8813 (fast_tracepoint_collecting): Handle trampoline as part of jump
8814 pad space.
8815 (set_trampoline_buffer_space): New function.
8816 (initialize_tracepoint): Initialize new IPA variables.
8817 * target.h (struct target_ops): Add arguments to
8818 install_fast_tracepoint_jump_pad operation, add new
8819 get_min_fast_tracepoint_insn_len operation.
8820 (target_get_min_fast_tracepoint_insn_len): New.
8821 (install_fast_tracepoint_jump_pad): Add arguments.
8822 * server.h (IPA_BUFSIZ): Define.
8823 * linux-i386-ipa.c: Include extra header files.
8824 (initialize_fast_tracepoint_trampoline_buffer): New function.
8825 (initialize_low_tracepoint): Call it.
8826 * server.h (set_trampoline_buffer_space): Declare.
8827 (claim_trampoline_space): Ditto.
8828 (have_fast_tracepoint_trampoline_buffer): Ditto.
8829
1e4d1764
YQ
88302011-11-14 Yao Qi <yao@codesourcery.com>
8831
8832 * server.c (handle_query): Handle InstallInTrace for qSupported.
8833 * tracepoint.c (add_tracepoint): Sort list.
8834 (install_tracepoint, download_tracepoint): New.
8835 (cmd_qtdp): Call them to install and download tracepoints.
8836 (sort_tracepoints): Removed.
8837 (cmd_qtstart): Update.
8838
5c73ff4e
YQ
88392011-11-14 Yao Qi <yao@codesourcery.com>
8840
8841 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8842 * mem-break.h: Declare.
8843 * tracepoint.c (cmd_qtstart): Move some code to ...
8844 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8845 New.
8846 (download_tracepoints): Move some code to ...
8847 (download_tracepoint_1): ... here. New.
8848
86a30030
YQ
88492011-11-08 Yao Qi <yao@codesourcery.com>
8850
8851 * remote-utils.c (relocate_instruction): A comment fix.
8852
8d26e50c
JB
88532011-11-07 Joel Brobecker <brobecker@adacore.com>
8854
8855 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8856 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8857 dr_status_mirror and dr_control_mirror from debug_reg_state.
8858 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8859 (i386_initial_stuff): Remove use of deleted globals.
8860 (i386_get_thread_context, i386_set_thread_context,
8861 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8862 from debug_reg_state.
8863
a59306a3
YQ
88642011-11-05 Yao Qi <yao@codesourcery.com>
8865
8866 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8867 address as TPOINT's.
8868
3065dfb6
SS
88692011-11-02 Stan Shebs <stan@codesourcery.com>
8870
8871 * tracepoint.c (agent_mem_read_string): New function.
8872 (eval_agent_expr): Call it for tracenz.
8873 * server.c (handle_query): Report support for tracenz.
8874
fd0d8c7c
YQ
88752011-11-02 Yao Qi <yao@codesourcery.com>
8876
8877 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8878
609086b1
YQ
88792011-11-02 Yao Qi <yao@codesourcery.com>
8880
8881 * target.h: Fix a typo in comment.
8882
b9fd1791
PA
88832011-10-31 Pedro Alves <pedro@codesourcery.com>
8884
8885 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8886 clobber the breakpoints' shadows with fast tracepoint jumps.
8887 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8888 * target.c (write_inferior_memory): Also pass MYADDR down to
8889 check_mem_write.
8890
03583c20
UW
88912011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8892
8893 * configure.ac: Check support for personality routine.
8894 * configure: Regenerate.
8895 * config.in: Likewise.
8896 * linux-low.c: Include <sys/personality.h>.
8897 Define ADDR_NO_RANDOMIZE if necessary.
8898 (linux_create_inferior): Disable address space randomization when
8899 forking inferior, if requested.
8900 (linux_supports_disable_randomization): New function.
8901 (linux_target_ops): Install it.
8902 * server.h (disable_randomization): Declare.
8903 * server.c (disable_randomization): New global variable.
8904 (handle_general_set): Handle QDisableRandomization.
8905 (handle_query): Likewise for qSupported.
8906 (main): Support --disable-randomization and --no-disable-randomization
8907 command line arguments.
8908 * target.h (struct target_ops): Add supports_disable_randomization.
8909 (target_supports_disable_randomization): New macro.
8910
723b724b
MF
89112011-09-29 Mike Frysinger <vapier@gentoo.org>
8912
8913 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8914 ifdef check.
8915 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8916 [!PT_GETDSBT] (target_loadmap): New definition.
8917 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8918 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8919 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8920 and PT_GETDSBT to LINUX_LOADMAP.
8921 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8922 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8923
55329a5c 89242011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8925
8926 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8927 (arm_linux_hwbp_cap): New static variable.
8928 (arm_linux_get_hwbp_cap): Replace by ...
8929 (arm_linux_init_hwbp_cap): ... this new function.
8930 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8931 (arm_linux_get_hw_watchpoint_count): Likewise.
8932 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8933 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8934 (arm_prepare_to_resume): Use perror_with_name instead of error.
8935
55329a5c 89362011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8937
8938 * linux-arm-low.c: Include <signal.h>.
8939 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8940 (struct arm_linux_hwbp_cap): New data type.
8941 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8942 (struct arm_linux_hw_breakpoint): New data type.
8943 (MAX_BPTS, MAX_WPTS): Define.
8944 (struct arch_process_info, struct arch_lwp_info): New data types.
8945 (arm_linux_get_hwbp_cap): New function.
8946 (arm_linux_get_hw_breakpoint_count): Likewise.
8947 (arm_linux_get_hw_watchpoint_count): Likewise.
8948 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8949 (arm_hwbp_control_initialize): Likewise.
8950 (arm_hwbp_control_is_enabled): Likewise.
8951 (arm_hwbp_control_is_initialized): Likewise.
8952 (arm_hwbp_control_disable): Likewise.
8953 (arm_linux_hw_breakpoint_equal): Likewise.
8954 (arm_linux_hw_point_initialize): Likewise.
8955 (struct update_registers_data): New data structure.
8956 (update_registers_callback: New function.
8957 (arm_insert_point): Likewise.
8958 (arm_remove_point): Likewise.
8959 (arm_stopped_by_watchpoint): Likewise.
8960 (arm_stopped_data_address): Likewise.
8961 (arm_new_process): Likewise.
8962 (arm_new_thread): Likewise.
8963 (arm_prepare_to_resume): Likewise.
8964 (the_low_target): Register arm_insert_point, arm_remove_point,
8965 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8966 arm_new_thread, and arm_prepare_to_resume.
8967
6b9801d4
SS
89682011-09-15 Stan Shebs <stan@codesourcery.com>
8969
8970 * server.h (struct emit_ops): Add compare-goto fields.
8971 * tracepoint.c (gdb_agent_op_sizes): New table.
8972 (emit_eq_goto): New function.
8973 (emit_ne_goto): New function.
8974 (emit_lt_goto): New function.
8975 (emit_le_goto): New function.
8976 (emit_gt_goto): New function.
8977 (emit_ge_goto): New function.
8978 (is_goto_target): New function.
8979 (compile_bytecodes): Recognize special cases of compare-goto
8980 combinations and call specialized emitters for them.
8981 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8982 (amd64_emit_ne_goto): New function.
8983 (amd64_emit_lt_goto): New function.
8984 (amd64_emit_le_goto): New function.
8985 (amd64_emit_gt_goto): New function.
8986 (amd64_emit_ge_goto): New function.
8987 (amd64_emit_ops): Add the new functions.
8988 (i386_emit_eq_goto): New function.
8989 (i386_emit_ne_goto): New function.
8990 (i386_emit_lt_goto): New function.
8991 (i386_emit_le_goto): New function.
8992 (i386_emit_gt_goto): New function.
8993 (i386_emit_ge_goto): New function.
8994 (i386_emit_ops): Add the new functions.
8995
bf15cbda
SS
89962011-09-08 Stan Shebs <stan@codesourcery.com>
8997
8998 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8999 (i386_emit_epilogue): Restore %ebx.
9000
943ca1dd
JZ
90012011-08-31 Jie Zhang <jzhang918@gmail.com>
9002
9003 * server.c (step_thread): Remove definition.
9004 (process_serial_event): Don't handle Hs.
9005 * server.h (step_thread): Remove declaration.
9006 * target.c (set_desired_inferior): Remove use of step_thread.
9007
e3deef73
LM
90082011-08-24 Luis Machado <lgustavo@codesourcery.com>
9009
9010 * linux-low.c: Include linux-procfs.h.
9011 (linux_attach_lwp_1): Update comments.
9012 (linux_attach): Scan for existing threads when attaching to a
9013 process that is the tgid.
9014 * Makefile.in: Update dependencies.
9015
13da1c97
LM
90162011-08-24 Luis Machado <lgustavo@codesourcery.com>
9017
9018 * configure.srv: Add linux-procfs.o dependencies.
9019
881127c9
YQ
90202011-08-14 Yao Qi <yao@codesourcery.com>
9021
9022 * target.h (struct target_ops): Fix indent.
9023 * win32-low.c (win32_target_ops): Fix comment.
9024
58dbd541
YQ
90252011-08-14 Andrew Jenner <andrew@codesourcery.com>
9026 Yao Qi <yao@codesourcery.com>
9027
9028 * Makefile.in (clean): Remove tic6x-*.c files.
9029 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9030 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9031 (tic6x-c64xp-linux.c): Likewise.
9032 * configure.srv: Add support for tic6x-*-uclinux.
9033 * linux-tic6x-low.c: New.
9034 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9035
78d85199
YQ
90362011-08-14 Andrew Stubbs <ams@codesourcery.com>
9037 Yao Qi <yao@codesourcery.com>
9038
9039 * target.h (struct target_ops): Add read_loadmap.
9040 * linux-low.c (struct target_loadseg): New type.
9041 (struct target_loadmap): New type.
9042 (linux_read_loadmap): New function.
9043 (linux_target_ops): Add linux_read_loadmap.
9044 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9045 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9046 to NULL.
78d85199 9047
a959a88d
EZ
90482011-08-05 Eli Zaretskii <eliz@gnu.org>
9049
9050 * win32-low.c: Include <stdint.h>.
9051
1ced966e
PA
90522011-07-22 Pedro Alves <pedro@codesourcery.com>
9053
9054 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9055 to the inferior here.
9056 (i386_remove_aligned_watchpoint): Ditto.
9057 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9058 fit part of the watchpoint in the debug registers.
9059 (i386_update_inferior_debug_regs): New.
9060 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9061 registers, and only update the inferior on success.
9062 (i386_low_remove_watchpoint): Ditto.
9063
d26e3629
KY
90642011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9065
9066 * linux-low.c (compare_ints, unique, list_threads, show_process,
9067 linux_core_of_thread): Delete.
9068 (linux_target_ops): Change linux_core_of_thread to
9069 linux_common_core_of_thread.
9070 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9071 * utils.c (malloc_failure): Change type of argument.
9072 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9073 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9074 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9075 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9076 (IPA_OBJS): Add common-utils-ipa.o.
9077 (ptid_h, linux_osdata_h): New macros.
9078 (server_h): Add common/common-utils.h, common/xml-utils.h,
9079 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9080 common/ptid.h.
9081 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9082 ptid.o, buffer.o): New rules.
9083 (linux-low.o): Add common/linux-osdata.h as a dependency.
9084 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9085 * configure.ac: Add AC_HEADER_DIRENT check.
9086 * config.in: Regenerate.
9087 * configure: Regenerate.
9088 * remote-utils.c (xml_escape_text): Delete.
9089 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9090 buffer_xml_printf): Move to common/buffer.c.
9091 * server.c (main): Remove call to initialize_inferiors.
9092 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9093 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9094 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9095 internal_error, gdb_assert, gdb_assert_fail): Delete.
9096 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9097 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9098 common/buffer.h.
9099 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9100 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9101 initialize_inferiors): Delete.
9102
2275a1a7
PA
91032011-07-20 Pedro Alves <pedro@codesourcery.com>
9104
9105 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9106 symbol error.
9107
0a5b1e09
PA
91082011-05-31 Pedro Alves <pedro@codesourcery.com>
9109
9110 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9111 assertion.
9112 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9113
6938fd34
YQ
91142011-05-26 Yao Qi <yao@codesourcery.com>
9115
9116 * Makefile.in (thread-db.o): Track dependence to
9117 common/gdb_thread_db.h.
9118 * thread-db.c: include gdb_thread_db.h from right place.
9119
b481f9e0
TT
91202011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9121
9122 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9123 __FILE__ and __LINE__ to internal_error.
9124
98a5dd13
DE
91252011-05-13 Doug Evans <dje@google.com>
9126
9127 * thread-db.c (try_thread_db_load_from_sdir): New function.
9128 (try_thread_db_load_from_dir): New function.
9129 (thread_db_load_search): Handle $sdir, ignore $pdir.
9130 Remove trying of system directories if search of
9131 libthread-db-search-path fails, that is now done via $sdir.
9132
d248b706
KY
91332011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9134
9135 * server.c (handle_query): Add EnableDisableTracepoints to the list
9136 of supported features.
43aaf8b6 9137 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9138 tracepoints.
43aaf8b6
PA
9139 (cmd_qtenable_disable): New.
9140 (cmd_qtstart): Install tracepoints even if disabled.
9141 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9142 receiving a QTEnable or QTDisable packet.
9143 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9144 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9145 tracepoints.
9146 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9147
84e578fb
DE
91482011-05-10 Doug Evans <dje@google.com>
9149
9150 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9151
71f55dd8
DE
91522011-05-04 Doug Evans <dje@google.com>
9153
9154 * linux-low.c (linux_join): Skip process lookup.
9155 * spu-low.c (spu_join): Ditto.
9156 * server.c (join_inferiors_callback): Delete.
9157 (process_serial_event): For 'D' packet (detach) call join_inferior
9158 directly.
9159
4d393d60
JM
91602011-05-04 Joseph Myers <joseph@codesourcery.com>
9161
9162 * README: Don't mention xscale*-*-linux*.
9163 * configure.srv (xscale*-*-linux*): Don't handle target.
9164
b00ad6ff
NF
91652011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9166
9167 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9168 casting pointers.
9169 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9170 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9171 (i386_emit_void_call_2): Likewise.
9172
af96c192
YQ
91732011-04-26 Yao Qi <yao@codesourcery.com>
9174
43aaf8b6
PA
9175 * linux-low.c: Move common macros to linux-ptrace.h.
9176 Include linux-ptrace.h.
af96c192
YQ
9177 * Makefile.in (linux_ptrace_h): New.
9178 (linux-low.o): Depends on linux-ptrace.h.
9179
03f2bd59
JK
91802011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9181
9182 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9183 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9184 (remote_prepare): New function with most of the TCP code from ...
9185 (remote_open): ... here. Detect PORT here unconditionally. Move also
9186 setting transport_is_reliable.
9187 * server.c (run_once): New variable.
9188 (gdbserver_usage): Document it.
9189 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9190 the first run if RUN_ONCE.
9191 * server.h (run_once, remote_prepare): New declarations.
9192
7a9dd1b2
TT
91932011-04-19 Tom Tromey <tromey@redhat.com>
9194
9195 * win32-low.c (handle_load_dll): Remove duplicate "the".
9196
81239425
PM
91972011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9198
9199 Remove support for old Cygwin 1.5 versions.
9200 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9201 function to avoid warning.
9202 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9203 warning.
9204
9e0627f1
PM
92052011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9206
9207 * gdbserver/server.h (Macro _): Define it if not available.
9208
588eebee
MS
92092011-03-14 Michael Snyder <msnyder@vmware.com>
9210
348af9f7 9211 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9212
43f70d4c
JB
92132011-03-10 Joel Brobecker <brobecker@adacore.com>
9214
9215 * Makefile.in (maintainer-clean realclean distclean): Remove
9216 "make ... subdir_do" command.
9217
348af9f7
MS
92182011-03-10 Michael Snyder <msnyder@vmware.com>
9219
9220 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9221
9222 * server.c (handle_v_run): Free alloced buffer on early return.
9223
e637a4f5
YQ
92242011-03-09 Yao Qi <yao@codesourcery.com>
9225
9226 Revert:
9227 2011-03-04 Yao Qi <yao@codesourcery.com>
9228
9229 * Makefile.in: Remove GNU make feature --directory.
9230
9231 2011-03-05 Yao Qi <yao@codesourcery.com>
9232
9233 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9234 (subdir_do): New make target. Copied from gdb/Makefile.
9235 (maintainer-clean, realclean, distclean, clean): Call corresponding
9236 make targets in common/Makefile.
9237
9238 2011-02-11 Yao Qi <yao@codesourcery.com>
9239
9240 * configure.ac: Call AC_PROG_RANLIB.
9241 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9242 * configure: Regenerate.
9243
e6edda56
JK
92442011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9245
9246 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9247
e5141119
JB
92482011-03-06 Yao Qi <yao@codesourcery.com>
9249
9250 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9251
64794aa4
JB
92522011-03-05 Yao Qi <yao@codesourcery.com>
9253
9254 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9255 (subdir_do): New make target. Copied from gdb/Makefile.
9256 (maintainer-clean, realclean, distclean, clean): Call corresponding
9257 make targets in common/Makefile.
9258
7a762829
YQ
92592011-03-04 Yao Qi <yao@codesourcery.com>
9260
9261 * Makefile.in: Remove GNU make feature --directory.
9262
348af9f7
MS
92632011-03-04 Michael Snyder <msnyder@vmware.com>
9264
9265 * server.c (queue_stop_reply): Call xmalloc not malloc.
9266
92672011-03-02 Michael Snyder <msnyder@vmware.com>
9268
9269 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9270
9f72fee2
MS
92712011-02-28 Michael Snyder <msnyder@vmware.com>
9272
588eebee
MS
9273 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9274 (cmd_qtframe): Ditto.
9275 (cmd_qtbuffer): Ditto.
9276 (cmd_bigqtbuffer): Ditto.
9277
9f72fee2
MS
9278 * utils.c (decimal2str): Initialize 'width' to nine, then
9279 don't mess with it.
9280
8040bd49
UW
92812011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9282
9283 * hostio.c (require_data): Free *data, not data.
9284
7e52cbd0
JK
92852011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9286
9287 * hostio.c (require_data): Use free, not xfree.
9288
9130f83e
MS
92892011-02-27 Michael Snyder <msnyder@vmware.com>
9290
4b812f4e
MS
9291 * server.c (handle_query): Discard unused value.
9292
9130f83e
MS
9293 * hostio.c (require_data): Free malloc memory before returning
9294 error.
9295
69d37113
MS
92962011-02-26 Michael Snyder <msnyder@vmware.com>
9297
9298 * linux-low.c (list_threads): Call closedir for dirent.
9299
35f5825a
MS
93002011-02-27 Michael Snyder <msnyder@vmware.com>
9301
2a589cef
MS
9302 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9303 a case statement falls through.
9304
0adea5f7
MS
9305 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9306
35f5825a
MS
9307 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9308 in comparison.
9309
238f1c74
MS
93102011-02-26 Michael Snyder <msnyder@vmware.com>
9311
9312 * utils.c (decimal2str): Eliminate dead code and dead param.
9313 (pulongest): Drop dead param from call to decimal2str.
9314 (plongest): Ditto.
9315
633ff500
JB
93162011-02-24 Joel Brobecker <brobecker@adacore.com>
9317
9318 Revert the following patch (not approved yet):
9319 2011-02-21 Hui Zhu <teawater@gmail.com>
9320 * tracepoint.c (tp_printf): New function.
9321 (eval_agent_expr): Handle gdb_agent_op_printf.
9322
f9c6ff72
HZ
93232011-02-21 Hui Zhu <teawater@gmail.com>
9324
9325 * tracepoint.c (tp_printf): New function.
9326 (eval_agent_expr): Handle gdb_agent_op_printf.
9327
94d5e490
TT
93282011-02-18 Tom Tromey <tromey@redhat.com>
9329
9330 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9331 (tracepoint.o): Likewise.
9332 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9333 (gdb_agent_op_names): Likewise.
9334
c7f96d2b
TT
93352011-02-18 Tom Tromey <tromey@redhat.com>
9336
9337 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9338 gdb_agent_op_rot>: New constants.
9339 (gdb_agent_op_names): Add pick and roll.
9340 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9341 cases.
9342
0feedb2c
JK
93432011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9344
9345 * aclocal.m4: Regenerated with aclocal-1.11.1.
9346
b3b9301e
PA
93472011-02-14 Pedro Alves <pedro@codesourcery.com>
9348
9349 * server.c (handle_qxfer_traceframe_info): New.
9350 (qxfer_packets): Register "traceframe-info".
9351 (handle_query): Report support for qXfer:traceframe-info:read+.
9352 * tracepoint.c (match_blocktype): New.
9353 (traceframe_find_block_type): Rename to ...
9354 (traceframe_walk_blocks): ... this. Add callback filter argument,
9355 and use it.
9356 (traceframe_find_block_type): New, reimplemented on top of
9357 traceframe_walk_blocks.
9358 (build_traceframe_info_xml): New.
9359 (traceframe_read_info): New.
9360 * server.h (traceframe_read_info): Declare.
9361
4f3e6fb7
YQ
93622011-02-11 Yao Qi <yao@codesourcery.com>
9363
9364 * configure.ac: Call AC_PROG_RANLIB.
9365 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9366 * configure: Regenerate.
9367
764880b7
PA
93682011-02-07 Pedro Alves <pedro@codesourcery.com>
9369
9370 * server.c (gdb_read_memory): Change return semantics to allow
9371 partial transfers.
9372 (handle_search_memory_1): Adjust.
9373 (process_serial_event) <'m' packet>: Handle partial transfers.
9374 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9375
1c79eb8a
PA
93762011-01-28 Pedro Alves <pedro@codesourcery.com>
9377
9378 * regcache.c (init_register_cache): Initialize
9379 regcache->register_status.
9380 (free_register_cache): Release regcache->register_status.
9381 (regcache_cpy): Copy register_status.
9382 (registers_to_string): Print 'x's for unavailable registers.
9383 (supply_register): Mark the register's status valid or
9384 unavailable, depending on whether a buffer was passed in or not.
9385 (supply_register_zeroed): New.
9386 (supply_regblock): Mark the registers' status valid or
9387 unavailable, depending on whether a buffer was passed in or not.
9388 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9389 (struct regcache): New `register_status' field.
9390 (supply_register_zeroed): Declare.
9391 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9392 supply_register_zeroed, rather than passing a NULL buffer to
9393 supply_register.
9394 * tracepoint.c (fetch_traceframe_registers): Update comment.
9395
85724a0e
PA
93962011-01-28 Pedro Alves <pedro@codesourcery.com>
9397
9398 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9399 buffer explicit.
9400
d08aafef
PA
94012011-01-25 Pedro Alves <pedro@codesourcery.com>
9402
9403 * server.h (decode_xfer_write): Change prototype.
9404 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9405 and don't extract the annex here.
9406 * server.c (decode_xfer_read): Remove `annex' parameter,
9407 and don't extract the annex here.
9408 (decode_xfer): New.
9409 (struct qxfer): New.
9410 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9411 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9412 (handle_qxfer_statictrace): New functions, abstracted out from
9413 handle_query, and made to use the struct qxfer interface.
9414 (handle_threads_qxfer_proper): Rename to ...
9415 (handle_qxfer_threads_proper): ... this.
9416 (handle_threads_qxfer): Rename to ...
9417 (handle_qxfer_threads): ... this. Adjust.
9418 (qxfer_packets): New array.
9419 (handle_qxfer): New function.
9420 (handle_query): Use handle_qxfer.
9421
493e2a69
MS
94222011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9423
9424 * gdbreplay.c: Shorten lines of >= 80 columns.
9425 * linux-low.c: Ditto.
9426 * linux-ppc-low.c: Ditto.
9427 * linux-s390-low.c: Ditto.
9428 * linux-sparc-low.c: Ditto.
9429 * linux-x86-low.c: Ditto.
9430 * linux-xtensa-low.c: Ditto.
9431 * mem-break.c: Ditto.
9432 * nto-low.c: Ditto.
9433 * regcache.h: Ditto.
9434 * remote-utils.c: Ditto.
9435 * server.c: Ditto.
9436 * server.h: Ditto.
9437 * thread-db.c: Ditto.
9438 * tracepoint.c: Ditto.
9439 * utils.c: Ditto.
9440 * win32-low.h: Ditto.
9441
44944448
JB
94422011-01-05 Joel Brobecker <brobecker@adacore.com>
9443
9444 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9445 update.
9446
71ce852c
JB
94472011-01-01 Joel Brobecker <brobecker@adacore.com>
9448
9449 * server.c (gdbserver_version): Update copyright year in version
9450 output.
9451 * gdbreplay.c (gdbreplay_version): Ditto.
9452
eb826dc6
MF
94532010-12-29 Jie Zhang <jie.zhang@analog.com>
9454
9455 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9456 * linux-bfin-low.c: New file.
9457 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9458 PT_DATA_ADDR for BFIN targets.
9459 * Makefile.in (SFILES): Add linux-bfin-low.c.
9460 (clean): Remove reg-bfin.c.
9461 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9462 * README: Mention supported Blackfin targets.
9463
39ab222a
MF
94642010-12-23 Mike Frysinger <vapier@gentoo.org>
9465
9466 * .gitignore: New file.
9467
a1f2ce7d
MF
94682010-11-16 Mike Frysinger <vapier@gentoo.org>
9469
9470 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9471
f474844c
JZ
94722010-10-22 Jie Zhang <jie@codesourcery.com>
9473
9474 * Makefile.in: Add FLAGS_TO_PASS variable.
9475 (install): Remove dependency of install-only and recursively
9476 invoke make for install-only.
9477
f1048712
DE
94782010-10-04 Doug Evans <dje@google.com>
9479
9480 * Makefile.in (uninstall): Use $(DESTDIR).
9481
b53a1623
PA
94822010-09-24 Pedro Alves <pedro@codesourcery.com>
9483
e6ee044d
PA
9484 PR gdb/11842
9485
b53a1623
PA
9486 * linux-x86-low.c (compat_siginfo_from_siginfo)
9487 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9488 si_code is < 0. Check for si_code == SI_TIMER before checking for
9489 si_code < 0.
9490
fa1bd1e4
JB
94912010-09-13 Joel Brobecker <brobecker@adacore.com>
9492
9493 * lynx-i386-low.c: New file.
9494 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9495
47fac8f8
JB
94962010-09-13 Joel Brobecker <brobecker@adacore.com>
9497
9498 * lynx-low.c (ptrace_request_to_str): Remove handling for
9499 request values that have been removed in LynxOS 5.x.
9500
1adfc54d
JB
95012010-09-13 Joel Brobecker <brobecker@adacore.com>
9502
9503 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9504 <ptrace.h>
9505
c2a66c29
NS
95062010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9507
9508 * configure.ac: Add --enable-inprocess-agent option.
9509 * configure: Rebuilt.
9510
32fcada3
YQ
95112010-09-06 Yao Qi <yao@codesourcery.com>
9512
9513 * linux-low.c (linux_kill): Remove unused variable.
9514 (linux_stabilize_threads): Likewise.
9515 * server.c (start_inferior): Likewise.
9516 (queue_stop_reply_callback): Likewise.
9517 * tracepoint.c (do_action_at_tracepoint): Likewise.
9518
0cccb683
YQ
95192010-09-06 Yao Qi <yao@codesourcery.com>
9520
9521 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9522 on return.
9523
423ec54c
JK
95242010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9525
9526 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9527
12ac6819
PA
95282010-09-06 Pedro Alves <pedro@codesourcery.com>
9529
9530 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9531 "$(IPA_DEPFILES)".
9532
8ed54b31
JB
95332010-09-01 Joel Brobecker <brobecker@adacore.com>
9534
9535 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9536 gdbserver/lynx-ppc-low.c: New files.
9537 * Makefile.in (lynx_low_h): New variable.
9538 (lynx-low.o, lynx-ppc-low.o): New rules.
9539 * configure.ac: On LynxOS, link with -lnetinet.
9540 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9541 * configure: regenerate.
9542
bb0116a4
JB
95432010-09-01 Joel Brobecker <brobecker@adacore.com>
9544
9545 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9546 * configure.ac: Add check for vasprintf and vsnprintf.
9547 * configure, config.in: Regenerate.
9548 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9549
a778ab81 95502010-09-01 Joel Brobecker <brobecker@adacore.com>
9551
9552 * gdbreplay.c: Move include of alloca.h up, next to include of
9553 malloc.h.
9554 * server.h: Add include of malloc.h.
9555 * mem-break.c: Remove include of malloc.h.
9556 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9557
8b034a19 95582010-09-01 Joel Brobecker <brobecker@adacore.com>
9559
9560 * Makefile.in (memmem.o): Build with -Wno-error.
9561
95622010-09-01 Joel Brobecker <brobecker@adacore.com>
9563
9564 * utils.c (xsnprintf): Make non-static.
9565 * server.h: Add xsnprintf declaration.
9566 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9567 replace calls to snprintf by calls to xsnprintf throughout.
9568
95692010-09-01 Joel Brobecker <brobecker@adacore.com>
9570
9571 * configure.ac: Add configure check for alloca.
9572 * configure, config.in: Regenerate.
9573 * server.h: Include alloca.h if it exists.
9574 * gdbreplay.c: Include alloca.h if it exists.
9575
1a981360
PA
95762010-08-28 Pedro Alves <pedro@codesourcery.com>
9577
9578 * linux-low.c (__SIGRTMIN): Define if not already defined.
9579 (linux_create_inferior): Check for __ANDROID__ rather than
9580 __SIGRTMIN.
9581 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9582 are already deferred.
9583 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9584 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9585 stopped and already has a pending signal to report.
9586 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9587 a pending signal to report or is moving out of a jump pad.
9588 (linux_init_signals): Check for __ANDROID__ rather than
9589 __SIGRTMIN.
9590
b4d51a55
PA
95912010-08-28 Pedro Alves <pedro@codesourcery.com>
9592
9593 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9594 debug_threads check. Avoid a linear search when not doing debug
9595 output.
9596
ec48365d
PA
95972010-08-27 Pedro Alves <pedro@codesourcery.com>
9598
9599 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9600 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9601 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9602 (process_event): Change local fd's type to gdb_fildes_t.
9603 (create_file_handler): Adjust prototype.
9604 (delete_file_handler): Adjust prototype.
9605 (handle_file_event): Adjust prototype. Use pfildes.
9606 (create_file_event): Adjsut prototype.
9607 * remote-utils.c (remote_desc, listen_desc): Change type to
9608 gdb_fildes_t.
9609 * server.h: New gdb_fildes_t typedef.
9610 [USE_WIN32API]: Include winsock2.h.
9611 (delete_file_handler, add_file_handler): Adjust prototypes.
9612 (pfildes): Declare.
9613 * utils.c (pfildes): New.
9614
854d88f0
PA
96152010-08-27 Pedro Alves <pedro@codesourcery.com>
9616
9617 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9618 * configure: Regenerate.
9619
0146f85b
PA
96202010-08-27 Pedro Alves <pedro@codesourcery.com>
9621
9622 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9623 (linux_done_accessing_memory): ... this.
9624 (linux_target_ops): Adjust.
9625 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9626 * nto-low.c (nto_target_ops): Adjust comment.
9627 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9628 * spu-low.c (spu_target_ops): Adjust comment.
9629 * target.h (target_ops): Rename unprepare_to_access_memory field
9630 to done_accessing_memory.
9631 (unprepare_to_access_memory): Rename to ...
9632 (done_accessing_memory): ... this.
9633
90d74c30
PA
96342010-08-26 Pedro Alves <pedro@codesourcery.com>
9635
9636 * linux-low.c (linux_prepare_to_access_memory): New.
9637 (linux_unprepare_to_access_memory): New.
9638 (linux_target_ops): Install them.
9639 * server.c (read_memory): Rename to ...
9640 (gdb_read_memory): ... this. Use
9641 prepare_to_access_memory/prepare_to_access_memory.
9642 (write_memory): Rename to ...
9643 (gdb_write_memory): ... this. Use
9644 prepare_to_access_memory/prepare_to_access_memory.
9645 (handle_search_memory_1): Adjust.
9646 (process_serial_event): Adjust.
9647 * target.h (struct target_ops): New fields
9648 prepare_to_access_memory and unprepare_to_access_memory.
9649 (prepare_to_access_memory, unprepare_to_access_memory): New.
9650 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9651 prepare_to_access_memory/prepare_to_access_memory.
9652 * nto-low.c (nto_target_ops): Adjust.
9653 * spu-low.c (spu_target_ops): Adjust.
9654 * win32-low.c (win32_target_ops): Adjust.
9655
fd467969
PA
96562010-08-26 Pedro Alves <pedro@codesourcery.com>
9657
9658 * Makefile.in (WARN_CFLAGS): Get it from configure.
9659 (WERROR_CFLAGS): New.
9660 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9661 * configure.ac: Introduce --enable-werror, which adds -Werror to
9662 the compiler command line. Enabled by default. Disable with
9663 --disable-werror. Add -Wdeclaration-after-statement
9664 Wpointer-arith and -Wformat-nonliteral to warning flags.
9665 * configure: Regenerate.
9666
331e2f5f
PA
96672010-08-26 Pedro Alves <pedro@codesourcery.com>
9668
9669 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9670
e581f2b4
PA
96712010-08-26 Pedro Alves <pedro@codesourcery.com>
9672
9673 * gdbreplay.c (remote_error): New.
9674 (gdbchar): New.
9675 (expect): Use gdbchar. Check for error reading from GDB.
9676 Clarify sync error output.
9677 (play): Check for errors writing to GDB.
9678 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9679 * remote-utils.c (getpkt): Check for errors writing to the remote
9680 descriptor.
9681
3c11dd79
PA
96822010-08-25 Pedro Alves <pedro@codesourcery.com>
9683
9684 * linux-low.c (linux_wait_1): Move non-debugging code out of
9685 `debug_threads' control.
9686
d20a8ad9
PA
96872010-08-25 Pedro Alves <pedro@codesourcery.com>
9688
9689 * linux-low.c (linux_wait_1): Don't set last_status here.
9690 * server.c (push_event, queue_stop_reply_callback): Assert we're
9691 not pushing a TARGET_WAITKIND_IGNORE event.
9692 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9693 (myresume, handle_target_event): Set the thread's last_resume_kind
9694 and last_status from the target returned status.
9695
964e4306
PA
96962010-08-25 Pedro Alves <pedro@codesourcery.com>
9697
9698 PR threads/10729
9699
9700 * linux-x86-low.c (update_debug_registers_callback): New.
9701 (i386_dr_low_set_addr): Use it.
9702 (i386_dr_low_get_addr): New.
9703 (i386_dr_low_set_control): Use update_debug_registers_callback.
9704 (i386_dr_low_get_control): New.
9705 (i386_dr_low_get_status): Adjust.
9706 * linux-low.c (linux_stop_lwp): New.
9707 * linux-low.h (linux_stop_lwp): Declare.
9708
9709 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9710 argument instead of a i386_debug_reg_state.
9711 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9712 a i386_debug_reg_state.
9713 (i386_insert_aligned_watchpoint): Adjust.
9714 (i386_remove_aligned_watchpoint): Adjust.
9715 (i386_low_stopped_data_address): Read the debug registers from the
9716 inferior instead of from the mirrors.
9717 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9718 (i386_dr_low_get_addr): Declare.
9719 (i386_dr_low_get_control): Declare.
9720 (i386_dr_low_get_status): Change prototype.
9721
9722 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9723 (i386_dr_low_get_addr): New.
9724 (i386_dr_low_get_control): New.
9725 (i386_dr_low_get_status): Adjust prototype. Return
9726 dr_status_mirror.
9727 (i386_initial_stuff): Clear dr_status_mirror and
9728 dr_control_mirror.
9729 (i386_get_thread_context): Adjust.
9730 (i386_set_thread_context): Adjust.
9731 (i386_thread_added): Adjust.
9732
5f21a75b
PA
97332010-08-24 Pedro Alves <pedro@codesourcery.com>
9734
9735 * linux-low.h (linux_thread_area): Delete declaration.
9736
3e4c1235
TS
97372010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9738
9739 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9740 after its termination.
9741
1971b033
PA
97422010-08-09 Pedro Alves <pedro@codesourcery.com>
9743
9744 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9745 (gdb_wants_all_stopped): Delete.
9746 (linux_wait_1): Don't call them.
9747 * server.c (handle_v_cont): Tag all threads as want-stopped.
9748 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9749 stopped as "client-wants-stopped".
9750
310444ac
PA
97512010-07-31 Pedro Alves <pedro@codesourcery.com>
9752
9753 * Makefile.in (signals_h): New.
9754 (server_h): Depend on it.
9755 (server.o): Don't depend on $(signals_def).
9756 (signals.o): Depend on $(signals_def).
9757
a19cae16
JK
97582010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9759
9760 * Makefile.in (signals_def): New.
9761 (server_h): Append include/gdb/signals.h and signals_def.
9762 (server.o): Append signals_def.
9763
30d50328
JK
97642010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9765
9766 * server.c (handle_target_event): Use target_signal_to_host for
9767 resume_info.sig initialization.
9768 * target.h (struct thread_resume) <sig>: New comment.
9769
5c3216e2
OS
97702010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9771
c6f46ca0
OS
9772 * server.c (handle_query): strcpy() the returned string from paddress()
9773 instead of sprintf().
5c3216e2
OS
9774 * utils.c (paddress): Return phex_nz().
9775
6bd31874
JB
97762010-07-07 Joel Brobecker <brobecker@adacore.com>
9777
9778 * server.c (handle_v_cont): Call mourn_inferior if process
9779 just exited.
9780 (myresume): Likewise.
9781
0fb4aa4b
PA
97822010-07-01 Pedro Alves <pedro@codesourcery.com>
9783
9784 Static tracepoints, and integration with UST.
9785
9786 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9787 * mem-break.c (uninsert_all_breakpoints)
9788 (reinsert_all_breakpoints): New.
9789 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9790 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9791 (gdb_agent_ust_loaded, helper_thread_id)
9792 (gdb_agent_helper_thread_id): New macros.
9793 (struct ipa_sym_addresses): Add addr_ust_loaded,
9794 addr_helper_thread_id, addr_cmd_buf.
9795 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9796 (in_process_agent_loaded_ust): New.
9797 (write_e_ust_not_loaded): New.
9798 (maybe_write_ipa_ust_not_loaded): New.
9799 (struct collect_static_trace_data_action): New.
9800 (enum tracepoint_type) <static_tracepoint>: New.
9801 (struct tracepoint) <handle>: Mention static tracepoints.
9802 (struct static_tracepoint_ctx): New.
9803 (CMD_BUF_SIZE): New.
9804 (add_tracepoint_action): Handle static tracepoint actions.
9805 (unprobe_marker_at): New.
9806 (clear_installed_tracepoints): Handle static tracepoints.
9807 (cmd_qtdp): Handle static tracepoints.
9808 (probe_marker_at): New.
9809 (cmd_qtstart): Handle static tracepoints.
9810 (response_tracepoint): Handle static tracepoints.
9811 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9812 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9813 (get_context_regcache): Handle static tracepoints.
9814 (do_action_at_tracepoint): Handle static tracepoint actions.
9815 (traceframe_find_block_type): Handle static trace data blocks.
9816 (traceframe_read_sdata): New.
9817 (download_tracepoints): Download static tracepoint actions.
9818 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9819 (GDB_PROBE_NAME): New.
9820 (ust_ops): New.
9821 (GET_UST_SYM): New.
9822 (USTF): New.
9823 (dlsym_ust): New.
9824 (ust_marker_to_static_tracepoint): New.
9825 (gdb_probe): New.
9826 (collect_ust_data_at_tracepoint): New.
9827 (gdb_ust_probe): New.
9828 (UNIX_PATH_MAX, SOCK_DIR): New.
9829 (gdb_ust_connect_sync_socket): New.
9830 (resume_thread, stop_thread): New.
9831 (run_inferior_command): New.
9832 (init_named_socket): New.
9833 (gdb_ust_socket_init): New.
9834 (cstr_to_hexstr): New.
9835 (next_st): New.
9836 (first_marker, next_marker): New.
9837 (response_ust_marker): New.
9838 (cmd_qtfstm, cmd_qtsstm): New.
9839 (unprobe_marker_at, probe_marker_at): New.
9840 (cmd_qtstmat, gdb_ust_thread): New.
9841 (gdb_ust_init): New.
9842 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9843 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9844 (ST_REGENTRY): New.
9845 (x86_64_st_collect_regmap): New.
9846 (X86_64_NUM_ST_COLLECT_GREGS): New.
9847 (AMD64_RIP_REGNUM): New.
9848 (supply_static_tracepoint_registers): New.
9849 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9850 (ST_REGENTRY): New.
9851 (i386_st_collect_regmap): New.
9852 (i386_NUM_ST_COLLECT_GREGS): New.
9853 (supply_static_tracepoint_registers): New.
9854 * server.c (handle_query): Handle qXfer:statictrace:read.
9855 <qSupported>: Report support for StaticTracepoints, and
9856 qXfer:statictrace:read features.
9857 * server.h (traceframe_read_sdata)
9858 (supply_static_tracepoint_registers): Declare.
9859 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9860 (unpack_varlen_hex): Include in IPA build.
9861 * Makefile.in (ustlibs, ustinc): New.
9862 (IPA_OBJS): Add remote-utils-ipa.o.
9863 ($(IPA_LIB)): Link -ldl and -lpthread.
9864 (UST_CFLAGS): New.
9865 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9866 * config.in, configure: Regenerate.
9867
9e4344e5
PA
98682010-06-20 Ian Lance Taylor <iant@google.com>
9869 Pedro Alves <pedro@codesourcery.com>
9870
9871 * linux-x86-low.c (always_true): Delete.
9872 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9873 trying to fool the compiler with always_true.
9874
c6beb2cb
PA
98752010-06-20 Pedro Alves <pedro@codesourcery.com>
9876
9877 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9878 conditions in gdbserver.
9879
d2ed6730
UW
98802010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9881
9882 * spu-low.c (spu_read_memory): Wrap around local store limit.
9883 (spu_write_memory): Likewise.
9884
4e29fb54
PA
98852010-06-15 Pedro Alves <pedro@codesourcery.com>
9886
9887 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9888 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9889 LONGEST uses.
9890 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9891 uses.
9892 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9893 uses with LONGEST uses.
9894
6a271cae
PA
98952010-06-14 Stan Shebs <stan@codesourcery.com>
9896 Pedro Alves <pedro@codesourcery.com>
9897
9898 Bytecode compiler.
9899
9900 * linux-x86-low.c: Include limits.h.
9901 (add_insns): New.
9902 (always_true): New.
9903 (EMIT_ASM): New.
9904 (EMIT_ASM32): New.
9905 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9906 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9907 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9908 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9909 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9910 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9911 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9912 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9913 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9914 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9915 (amd64_emit_void_call_2): New.
9916 (amd64_emit_ops): New.
9917 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9918 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9919 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9920 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9921 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9922 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9923 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9924 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9925 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9926 (i386_emit_stack_adjust, i386_emit_int_call_1)
9927 (i386_emit_void_call_2): New.
9928 (i386_emit_ops): New.
9929 (x86_emit_ops): New.
9930 (the_low_target): Install x86_emit_ops.
9931 * server.h (struct emit_ops): New.
9932 (get_raw_reg_func_addr): Declare.
9933 (current_insn_ptr, emit_error): Declare.
9934 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9935 (set_trace_state_variable_value): New defines.
9936 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9937 addr_get_trace_state_variable_value and
9938 addr_set_trace_state_variable_value.
9939 (symbol_list): New fields for get_raw_reg,
9940 get_trace_state_variable_value and set_trace_state_variable_value.
9941 (condfn): New typedef.
9942 (struct tracepoint): New field `compiled_cond'.
9943 (do_action_at_tracepoint): Clear compiled_cond.
9944 (get_trace_state_variable_value, set_trace_state_variable_value):
9945 Export in the IPA.
9946 (condition_true_at_tracepoint): If there's a compiled condition,
9947 run that.
9948 (current_insn_ptr, emit_error): New globals.
9949 (struct bytecode_address): New.
9950 (get_raw_reg_func_addr): New.
9951 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9952 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9953 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9954 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9955 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9956 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9957 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9958 (compile_tracepoint_condition, compile_bytecodes): New.
9959 * target.h (emit_ops): Forward declare.
9960 (struct target_ops): New field emit_ops.
9961 (target_emit_ops): New.
9962 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9963 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9964 * linux-low.c (linux_emit_ops): New.
9965 (linux_target_ops): Install it.
9966 * linux-low.h (struct linux_target_ops): New field emit_ops.
9967
92b72907
UW
99682010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9969
9970 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9971 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9972
fa593d66
PA
99732010-06-01 Pedro Alves <pedro@codesourcery.com>
9974 Stan Shebs <stan@codesourcery.com>
9975
9976 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9977 (all): Depend on $(extra_libraries).
9978 (install-only): Install the IPA.
9979 (IPA_OBJS, IPA_LIB): New.
9980 (clean): Remove the IPA lib.
9981 (IPAGENT_CFLAGS): New.
9982 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9983 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9984 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9985 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9986 * configure.ac: Check for atomic builtins support in the compiler.
9987 (IPA_DEPFILES, extra_libraries): Define.
9988 * configure.srv (ipa_obj): Add description.
9989 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9990 (i[34567]86-*-linux*): Set ipa_obj.
9991 (x86_64-*-linux*): Set ipa_obj.
9992 * linux-low.c (stabilizing_threads): New.
9993 (supports_fast_tracepoints): New.
9994 (linux_detach): Stabilize threads before detaching.
9995 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9996 the lwp is either not stabilizing, or is moving out of a jump pad.
9997 (linux_fast_tracepoint_collecting): New.
9998 (maybe_move_out_of_jump_pad): New.
9999 (enqueue_one_deferred_signal): New.
10000 (dequeue_one_deferred_signal): New.
10001 (linux_wait_for_event_1): If moving out of a jump pad, defer
10002 pending signals to later.
10003 (linux_stabilize_threads): New.
10004 (linux_wait_1): Check if threads need moving out of jump pads, and
10005 do it if so.
10006 (stuck_in_jump_pad_callback): New.
10007 (move_out_of_jump_pad_callback): New.
10008 (lwp_running): New.
10009 (linux_resume_one_lwp): Handle moving out of jump pads.
10010 (linux_set_resume_request): Dequeue deferred signals.
10011 (need_step_over_p): Also step over fast tracepoint jumps.
10012 (start_step_over): Also uninsert fast tracepoint jumps.
10013 (finish_step_over): Also reinsert fast tracepoint jumps.
10014 (linux_install_fast_tracepoint_jump): New.
10015 (linux_target_ops): Install linux_stabilize_threads and
10016 linux_install_fast_tracepoint_jump_pad.
10017 * linux-low.h (linux_target_ops) <get_thread_area,
10018 install_fast_tracepoint_jump_pad>: New fields.
10019 (struct lwp_info) <collecting_fast_tracepoint,
10020 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10021 (linux_get_thread_area): Declare.
10022 * linux-x86-low.c (jump_insn): New.
10023 (x86_get_thread_area): New.
10024 (append_insns): New.
10025 (push_opcode): New.
10026 (amd64_install_fast_tracepoint_jump_pad): New.
10027 (i386_install_fast_tracepoint_jump_pad): New.
10028 (x86_install_fast_tracepoint_jump_pad): New.
10029 (the_low_target): Install x86_get_thread_area and
10030 x86_install_fast_tracepoint_jump_pad.
10031 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10032 (struct fast_tracepoint_jump): New.
10033 (fast_tracepoint_jump_insn): New.
10034 (fast_tracepoint_jump_shadow): New.
10035 (find_fast_tracepoint_jump_at): New.
10036 (fast_tracepoint_jump_here): New.
10037 (delete_fast_tracepoint_jump): New.
10038 (set_fast_tracepoint_jump): New.
10039 (uninsert_fast_tracepoint_jumps_at): New.
10040 (reinsert_fast_tracepoint_jumps_at): New.
10041 (set_breakpoint_at): Use write_inferior_memory.
10042 (uninsert_raw_breakpoint): Use write_inferior_memory.
10043 (check_mem_read): Mask out fast tracepoint jumps.
10044 (check_mem_write): Mask out fast tracepoint jumps.
10045 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10046 (set_fast_tracepoint_jump): Declare.
10047 (delete_fast_tracepoint_jump)
10048 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10049 (reinsert_fast_tracepoint_jumps_at): Declare.
10050 * regcache.c: Don't compile many functions when building the
10051 in-process agent library.
10052 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10053 the register buffer in the heap.
10054 (free_register_cache): If the register buffer isn't owned by the
10055 regcache, don't free it.
10056 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10057 pre-existing register caches.
10058 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10059 type.
10060 (convert_ascii_to_int): : Constify `from' parameter type.
10061 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10062 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10063 the needed buffer in-place.
10064 (relocate_instruction): New.
10065 * server.c (handle_query) <qSymbols>: If the target supports
10066 tracepoints, give it a chance of looking up symbols. Report
10067 support for fast tracepoints.
10068 (handle_status): Stabilize threads.
10069 (process_serial_event): Adjust.
10070 * server.h (struct fast_tracepoint_jump): Forward declare.
10071 (struct process_info) <fast_tracepoint_jumps>: New field.
10072 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10073 (decode_X_packet, decode_M_packet): Adjust.
10074 (relocate_instruction): Declare.
10075 (in_process_agent_loaded): Declare.
10076 (tracepoint_look_up_symbols): Declare.
10077 (struct fast_tpoint_collect_status): Declare.
10078 (fast_tracepoint_collecting): Declare.
10079 (force_unlock_trace_buffer): Declare.
10080 (handle_tracepoint_bkpts): Declare.
10081 (initialize_low_tracepoint)
10082 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10083 * target.h (struct target_ops) <stabilize_threads,
10084 install_fast_tracepoint_jump_pad>: New fields.
10085 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10086 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10087 [HAVE_STDINT_H]: Include stdint.h.
10088 (trace_debug_1): Rename to ...
10089 (trace_vdebug): ... this.
10090 (trace_debug): Rename to ...
10091 (trace_debug_1): ... this. Add `level' parameter.
10092 (trace_debug): New.
10093 (ATTR_USED, ATTR_NOINLINE): New.
10094 (IP_AGENT_EXPORT): New.
10095 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10096 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10097 (about_to_request_buffer_space, trace_buffer_is_full)
10098 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10099 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10100 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10101 (traceframe_write_count, traceframes_created)
10102 (trace_state_variables)
10103 New renaming defines.
10104 (struct ipa_sym_addresses): New.
10105 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10106 (symbol_list): New.
10107 (ipa_sym_addrs): New.
10108 (all_tracepoint_symbols_looked_up): New.
10109 (in_process_agent_loaded): New.
10110 (write_e_ipa_not_loaded): New.
10111 (maybe_write_ipa_not_loaded): New.
10112 (tracepoint_look_up_symbols): New.
10113 (debug_threads) [IN_PROCESS_AGENT]: New.
10114 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10115 (UNKNOWN_SIDE_EFFECTS): New.
10116 (stop_tracing): New.
10117 (flush_trace_buffer): New.
10118 (stop_tracing_bkpt): New.
10119 (flush_trace_buffer_bkpt): New.
10120 (read_inferior_integer): New.
10121 (read_inferior_uinteger): New.
10122 (read_inferior_data_pointer): New.
10123 (write_inferior_data_pointer): New.
10124 (write_inferior_integer): New.
10125 (write_inferior_uinteger): New.
10126 (struct collect_static_trace_data_action): Delete.
10127 (enum tracepoint_type): New.
10128 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10129 <actions_str, step_actions, step_actions_str>: Only include in
10130 GDBserver.
fa593d66
PA
10131 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10132 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10133 (tracepoints): Use IP_AGENT_EXPORT.
10134 (last_tracepoint): Don't include in the IPA.
10135 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10136 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10137 (alloced_trace_state_variables): New.
10138 (trace_state_variables): Use IP_AGENT_EXPORT.
10139 (traceframe_t): Delete unused variable.
10140 (circular_trace_buffer): Don't include in the IPA.
10141 (trace_buffer_start): Delete.
10142 (struct trace_buffer_control): New.
10143 (trace_buffer_free): Delete.
10144 (struct ipa_trace_buffer_control): New.
10145 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10146 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10147 New.
10148 (trace_buffer_ctrl): New.
10149 (TRACE_BUFFER_CTRL_CURR): New.
10150 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10151 Reimplement as macros.
10152 (trace_buffer_wrap): Delete.
10153 (traceframe_write_count, traceframe_read_count)
10154 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10155 (struct tracepoint_hit_ctx) <type>: New field.
10156 (struct fast_tracepoint_ctx): New.
10157 (memory_barrier): New.
10158 (cmpxchg): New.
10159 (record_tracepoint_error): Update atomically in the IPA.
10160 (clear_inferior_trace_buffer): New.
10161 (about_to_request_buffer_space): New.
10162 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10163 updating the same buffer.
10164 (add_tracepoint): Default the tracepoint's type to trap
10165 tracepoint, and orig_size to -1.
10166 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10167 internal variables.
10168 (create_trace_state_variable): New parameter `gdb'. Handle it.
10169 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10170 (cmd_qtdp): Handle fast tracepoints.
10171 (cmd_qtdv): Adjust.
10172 (max_jump_pad_size): New.
10173 (gdb_jump_pad_head): New.
10174 (get_jump_space_head): New.
10175 (claim_jump_space): New.
10176 (sort_tracepoints): New.
10177 (MAX_JUMP_SIZE): New.
10178 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10179 IPA.
10180 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10181 support. Upload fast traceframes, and delete internal IPA
10182 breakpoints.
10183 (stop_tracing_handler): New.
10184 (flush_trace_buffer_handler): New.
10185 (cmd_qtstop): Upload fast tracepoints.
10186 (response_tracepoint): Handle fast tracepoints.
10187 (tracepoint_finished_step): Upload fast traceframes. Set the
10188 tracepoint hit context's tracepoint type.
10189 (handle_tracepoint_bkpts): New.
10190 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10191 type. Add comment about fast tracepoints.
10192 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10193 non-existing action_str field.
10194 (get_context_regcache): Handle fast tracepoints.
10195 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10196 to the regcache.
10197 (fast_tracepoint_from_jump_pad_address): New.
10198 (fast_tracepoint_from_ipa_tpoint_address): New.
10199 (collecting_t): New.
10200 (force_unlock_trace_buffer): New.
10201 (fast_tracepoint_collecting): New.
10202 (collecting): New.
10203 (gdb_collect): New.
10204 (write_inferior_data_ptr): New.
10205 (target_tp_heap): New.
10206 (target_malloc): New.
10207 (download_agent_expr): New.
10208 (UALIGN): New.
10209 (download_tracepoints): New.
10210 (download_trace_state_variables): New.
10211 (upload_fast_traceframes): New.
10212 (IPA_FIRST_TRACEFRAME): New.
10213 (IPA_NEXT_TRACEFRAME_1): New.
10214 (IPA_NEXT_TRACEFRAME): New.
10215 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10216 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10217 (gdb_jump_pad_buffer_end): New.
10218 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10219 (initialize_tracepoint): Adjust.
10220 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10221 buffer. Initialize the low module.
10222 * utils.c (PREFIX, TOOLNAME): New.
10223 (malloc_failure): Use PREFIX.
10224 (error): In the IPA, an error causes an exit.
10225 (fatal, warning): Use PREFIX.
10226 (internal_error): Use TOOLNAME.
10227 (NUMCELLS): Increase to 10.
10228 * configure, config.in: Regenerate.
10229
d149dd1d
PA
102302010-06-01 Pedro Alves <pedro@codesourcery.com>
10231
10232 * server.c (handle_query) <qSupported>: Do two passes over the
10233 qSupported string to avoid nesting strtok.
10234
f6528abd
JK
102352010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10236
10237 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10238 (CDEPS): New.
10239 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10240 -Wl,--dynamic-list.
10241 * configure: Regenerate.
10242 * proc-service.list: New.
10243
ca2a87a0
JK
102442010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10245
10246 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10247 New comment.
10248
363a6e9f
OS
102492010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10250
10251 * gdbreplay.c (remote_open): Check error return from socket() call by
10252 its equality to -1 not by it being negative.
10253 * remote-utils.c (remote_open): Likewise.
10254
d23b6cb1
PA
102552010-05-23 Pedro Alves <pedro@codesourcery.com>
10256
10257 * config.h: Regenerate.
10258
28d3cf85
MK
102592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10260
10261 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10262 doesn't provide PTRACE_GET_THREAD_AREA.
10263
fea36a59
MK
102642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10265
10266 * linux-m68k-low.c: Include <asm/ptrace.h>
10267 (ps_get_thread_area): Implement.
10268
24b066ba
DE
102692010-05-03 Doug Evans <dje@google.com>
10270
10271 * event-loop.c (struct callback_event): New struct.
10272 (callback_list): New global.
10273 (append_callback_event, delete_callback_event): New functions.
10274 (process_callback): New function.
10275 (start_event_loop): Call it.
10276 * remote-utils.c (NOT_SCHEDULED): Define.
10277 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10278 moved out of readchar.
10279 (readchar): Rewrite. Call reschedule before returning.
10280 (reset_readchar): New function.
10281 (remote_close): Call it.
10282 (process_remaining, reschedule): New functions.
10283 * server.h (callback_handler_func): New typedef.
10284 (append_callback_event, delete_callback_event): Declare.
10285
9836d6ea
PA
102862010-05-03 Pedro Alves <pedro@codesourcery.com>
10287
10288 * proc-service.c (ps_pglobal_lookup): Use
10289 thread_db_look_up_one_symbol.
10290 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10291 parameter. Use it instead of all_symbols_looked_up.
10292 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10293 field.
10294 (all_symbols_looked_up): Don't declare.
10295 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10296 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10297 field.
10298 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10299 Set all_symbols_looked_up here.
10300 (thread_db_look_up_one_symbol): New.
10301 (thread_db_get_tls_address): Adjust.
10302 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10303 thread_db object on the heap, and tentatively set it in the
10304 process structure.
10305 (thread_db_init): Don't set all_symbols_looked_up here.
10306 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10307
7984d532
PA
103082010-05-03 Pedro Alves <pedro@codesourcery.com>
10309
10310 * linux-low.c (linux_kill, linux_detach): Adjust.
10311 (status_pending_p_callback): Remove redundant statement. Check
10312 for !TARGET_WAITIKIND_IGNORE, instead of
10313 TARGET_WAITKIND_STOPPED.
10314 (handle_tracepoints): Make sure LWP is locked. Adjust.
10315 (linux_wait_for_event_1): Adjust.
10316 (linux_cancel_breakpoints): New.
10317 (unsuspend_one_lwp): New.
10318 (unsuspend_all_lwps): New.
10319 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10320 (send_sigstop_callback): Change return type to int, add new
10321 `except' parameter and handle it.
10322 (suspend_and_send_sigstop_callback): New.
10323 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10324 pass them down. If SUSPEND, also increment the lwp's suspend
10325 count.
10326 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10327 (need_step_over_p): Don't consider suspended LWPs.
10328 (start_step_over): Adjust.
10329 (proceed_one_lwp): Change return type to int, add new `except'
10330 parameter and handle it.
10331 (unsuspend_and_proceed_one_lwp): New.
10332 (proceed_all_lwps): Use find_inferior instead of
10333 for_each_inferior.
10334 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10335 also decrement the suspend count of LWPs. Pass `except' down,
10336 instead of hacking its suspend count.
10337 (linux_pause_all): Add `freeze' parameter. Adjust.
10338 (linux_unpause_all): New.
10339 (linux_target_ops): Install linux_unpause_all.
10340 * server.c (handle_status): Adjust.
10341 * target.h (struct target_ops): New fields `unpause_all' and
10342 `cancel_breakpoints'. Add new parameter to `pause_all'.
10343 (pause_all): Add new `freeze' parameter.
10344 (unpause_all): New.
10345 (cancel_breakpoints): New.
10346 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10347 cancel breakpoints.
10348 (cmd_qtstart): Pause threads.
10349 (stop_tracing): Pause threads, and cancel breakpoints.
10350 * win32-low.c (win32_target_ops): Adjust.
10351
e471f25b
PA
103522010-05-03 Pedro Alves <pedro@codesourcery.com>
10353
10354 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10355 the inferior right away from here...
10356 (linux_wait_1): ... to here, and adjust to check the thread's
10357 last_resume_kind instead of the lwp's step or stop_expected flags.
10358
1915ef4f
PA
103592010-05-02 Pedro Alves <pedro@codesourcery.com>
10360
10361 * README: Use consistent `GDB' and `GDBserver' spellings.
10362
f9e39928
PA
103632010-05-02 Pedro Alves <pedro@codesourcery.com>
10364
10365 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10366 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10367 (linux_detach_one_lwp): Assume the lwp is stopped.
10368 (any_thread_of): Delete.
10369 (linux_detach): Stop all lwps here. Don't blindly delete all
10370 breakpoints.
10371 (delete_lwp_callback): New.
10372 (linux_mourn): Delete all lwps of the process that is gone.
10373 (linux_wait_1): Don't delete the last lwp of the process here.
10374 * mem-break.h (mark_breakpoints_out): Declare.
10375 * mem-break.c (mark_breakpoints_out): New.
10376 (free_all_breakpoints): Use it.
10377 * server.c (handle_target_event): If the process is gone, mark
10378 breakpoints out.
10379 * thread-db.c (struct thread_db) <create_bp>: New field.
10380 (thread_db_enable_reporting): Fix prototype. Store a thread event
10381 breakpoint reference in the thread_db struct.
10382 (thread_db_load_search): Clear the thread_db object.
10383 (try_thread_db_load_1): Ditto.
10384 (switch_to_process): New.
10385 (disable_thread_event_reporting): Use it.
10386 (remove_thread_event_breakpoints): New.
10387 (thread_db_detach, thread_db_mourn): Use it.
10388
1e7fc18c
PA
103892010-05-01 Pedro Alves <pedro@codesourcery.com>
10390
10391 * linux-low.c (linux_enable_event_reporting): New.
10392 (linux_wait_for_event_1, handle_extended_wait): Use it.
10393
02fc4de7
PA
103942010-04-30 Pedro Alves <pedro@codesourcery.com>
10395
10396 * linux-low.c (linux_kill_one_lwp, linux_kill)
10397 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10398 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10399 SIGSTOP even if the LWP is stopped.
10400 (send_sigstop_callback): New.
10401 (stop_all_lwps): Use send_sigstop_callback instead.
10402 (linux_resume_one_thread): Adjust.
10403 (proceed_one_lwp): Still proceed an LWP that the client has
10404 requested to stop, if we haven't reported it as stopped yet. Make
10405 sure that LWPs the client want stopped, have a pending SIGSTOP.
10406
bc3b5632
DE
104072010-04-26 Doug Evans <dje@google.com>
10408
ae1ada35
DE
10409 * server.c (handle_general_set): Make static.
10410
bc3b5632
DE
10411 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10412 Print received char after testing for error/eof instead of before.
10413 (input_interrupt): Tweak comment.
10414
65730243
DE
104152010-04-23 Doug Evans <dje@google.com>
10416
10417 * server.c (start_inferior): Print inferior argv if --debug.
10418
a8ae7dc0
AR
104192010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10420
10421 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10422 * nto-x86-low.c: Include server.h
10423
1c07cc19
PM
104242010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10425
10426 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10427 be consistent with other sources of this directory.
10428 (init_registers_amd64): Correct name of source file of this function
10429 in the comment.
10430
e0a61e09
PM
104312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10432
10433 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10434 64-bit executables.
10435
54709339
PM
104362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10437
10438 * win32-i386-low.c: Add 64-bit support.
10439 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10440 (init_registers_amd64): Declare.
10441 (mappings): Add 64-bit version of array.
10442 (init_windows_x86): New function.
10443 (the_low_target): Change init_arch field to init_windows_x86.
10444
e8f0053d
PM
104452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10446
10447 * win32-low.c: Adapt to support also 64-bit architecture.
10448 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10449 (get_image_name): Use SIZE_T type for local variable `done'.
10450 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10451 (toolhelp_get_dll_name): Idem.
10452 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10453 Use uintptr_t typecast to avoid warning.
10454 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10455 (handle_exception): Use phex_nz to avoid warning.
10456 (win32_wait): Remove unused local variable `process'.
10457
c481e77e
PM
104582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10459
10460 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10461 `amd64-avx.o'.
10462
12ea4b69
PM
104632010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10464
10465 * configure.ac: Use `ws2_32' library for srv_mingw.
10466 * configure: Regenerate.
10467 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10468 * remote-utils.c: Likewise.
10469
f6d1620c
L
104702010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10471
10472 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10473 if __x86_64__ is defined.
10474
8e642873
PM
104752010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10476
10477 * configure: Regenerate.
10478
711e434b
PM
104792010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10480
10481 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10482 * target.h (target_ops): New get_tib_address field.
10483 * win32-low.h (win32_thread_info): Add thread_local_base field.
10484 * win32-low.c (child_add_thread): Add tlb argument.
10485 Set thread_local_base field to TLB.
10486 (get_child_debug_event): Adapt to child_add_thread change.
10487 (win32_get_tib_address): New function.
10488 (win32_target_ops): Set get_tib_address field to
10489 win32_get_tib_address.
10490 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10491
505106cd
PA
104922010-04-12 Pedro Alves <pedro@codesourcery.com>
10493
505106cd
PA
10494 * linux-low.c (linux_mourn): Also remove the process.
10495 * server.c (handle_target_event): Don't remove the process here.
10496 * nto-low.c (nto_mourn): New.
10497 (nto_target_ops): Install it.
10498 * spu-low.c (spu_mourn): New.
10499 (spu_target_ops): Install it.
10500 * win32-low.c (win32_mourn): New.
10501 (win32_target_ops): Install it.
10502
e8470a06
PA
105032010-04-12 Pedro Alves <pedro@codesourcery.com>
10504
10505 * server.h (buffer_xml_printf): Remove redundant `;'.
10506
45ba0d02
PA
105072010-04-12 Pedro Alves <pedro@codesourcery.com>
10508
10509 * regcache.c (set_register_cache): Invalidate regcaches before
10510 changing the register cache layout.
10511 (regcache_invalidate_one): Allow a NULL regcache.
10512 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10513 regcaches before changing the register cache layout or the target
10514 regsets.
10515
59e04013
L
105162010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10517
10518 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10519 variable warning on Linux/x86-64.
10520
8336d594
PA
105212010-04-11 Pedro Alves <pedro@codesourcery.com>
10522
10523 GDBserver disconnected tracing support.
10524
10525 * linux-low.c (linux_remove_process): Delete.
10526 (add_lwp): Don't set last_resume_kind here.
10527 (linux_kill): Use `mourn'.
10528 (linux_detach): Use `thread_db_detach', and `mourn'.
10529 (linux_mourn): New.
10530 (linux_attach_lwp_1): Adjust comment.
10531 (linux_attach): last_resume_kind moved the thread_info; adjust.
10532 (status_pending_p_callback): Adjust.
10533 (linux_wait_for_event_1): Adjust.
10534 (count_events_callback, select_singlestep_lwp_callback)
10535 (select_event_lwp_callback, cancel_breakpoints_callback)
10536 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10537 (proceed_one_lwp): Adjust.
10538 (linux_async): Add debug output.
10539 (linux_thread_stopped): New.
10540 (linux_pause_all): New.
10541 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10542 linux_pause_all.
10543 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10544 (thread_db_free): Delete declaration.
10545 (thread_db_detach, thread_db_mourn): Declare.
10546 * thread-db.c (thread_db_init): Use thread_db_mourn.
10547 (thread_db_free): Delete, split in two.
10548 (disable_thread_event_reporting): New.
10549 (thread_db_detach): New.
10550 (thread_db_mourn): New.
10551
10552 * server.h (struct thread_info) <last_resume_kind>: New field.
10553 <attached>: Add comment.
10554 <gdb_detached>: New field.
10555 (handler_func): Change return type to int.
10556 (handle_serial_event, handle_target_event): Ditto.
10557 (gdb_connected): Declare.
10558 (tracing): Delete.
10559 (disconnected_tracing): Declare.
10560 (stop_tracing): Declare.
10561
10562 * server.c (handle_query) <qSupported>: Report support for
10563 disconnected tracing.
10564 (queue_stop_reply_callback): Account for running threads.
10565 (gdb_wants_thread_stopped): New.
10566 (gdb_wants_all_threads_stopped): New.
10567 (gdb_reattached_process): New.
10568 (handle_status): Clear the `gdb_detached' flag of all processes.
10569 In all-stop, stop all threads.
10570 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10571 (process_serial_event): If the remote connection breaks, or if an
10572 exit was forced with "monitor exit", force an event loop exit.
10573 Handle disconnected tracing on detach.
10574 (handle_serial_event): Adjust.
10575 (handle_target_event): If GDB isn't connected, forward events back
10576 to the inferior, unless the last process exited, in which case,
10577 exit gdbserver. Adjust interface.
10578
10579 * remote-utils.c (remote_open): Don't block in accept. Instead
10580 register an event loop source on the listen socket file
10581 descriptor. Refactor bits into ...
10582 (listen_desc): ... this new global.
10583 (gdb_connected): ... this new function.
10584 (enable_async_notification): ... this new function.
10585 (handle_accept_event): ... this new function.
10586 (remote_close): Clear remote_desc.
10587
10588 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10589
10590 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10591 New fields.
10592 (mourn_inferior): Define.
10593 (target_process_qsupported): Avoid the dangling else problem.
10594 (thread_stopped): Define.
10595 (pause_all): Define.
10596 (target_waitstatus_to_string): Declare.
10597 * target.c (target_waitstatus_to_string): New.
10598
10599 * tracepoint.c (tracing): Make extern.
10600 (disconnected_tracing): New.
10601 (stop_tracing): Make extern. Handle tracing stops due to GDB
10602 disconnecting.
10603 (cmd_qtdisconnected): New.
10604 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10605 (handle_tracepoint_general_set): Handle QTDisconnected.
10606
10607 * event-loop.c (event_handler_func): Change return type to int.
10608 (process_event): Bail out if the event handler wants the event
10609 loop to stop.
10610 (handle_file_event): Ditto.
10611 (start_event_loop): Bail out if the event handler wants the event
10612 loop to stop.
10613
10614 * nto-low.c (nto_target_ops): Adjust.
10615 * spu-low.c (spu_wait): Don't remove the process here.
10616 (spu_target_ops): Adjust.
10617 * win32-low.c (win32_wait): Don't remove the process here.
10618 (win32_target_ops): Adjust.
10619
5d267c4c
PA
106202010-04-11 Pedro Alves <pedro@codesourcery.com>
10621
10622 * regcache.c (realloc_register_cache): Invalidate inferior's
10623 regcache before recreating it.
10624
623ccd72
PA
106252010-04-09 Pedro Alves <pedro@codesourcery.com>
10626
10627 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10628
219f2f23
PA
106292010-04-09 Stan Shebs <stan@codesourcery.com>
10630 Pedro Alves <pedro@codesourcery.com>
10631
10632 * server.h (LONGEST): New.
10633 (struct thread_info) <while_stepping>: New field.
10634 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10635 Declare.
10636 (initialize_tracepoint, handle_tracepoint_general_set)
10637 (handle_tracepoint_query, tracepoint_finished_step)
10638 (tracepoint_was_hit, release_while_stepping_state_list):
10639 (current_traceframe): Declare.
10640 * server.c (handle_general_set): Handle tracepoint packets.
10641 (read_memory): New.
10642 (write_memory): New.
10643 (handle_search_memory_1): Use read_memory.
10644 (handle_query): Report support for conditional tracepoints, trace
10645 state variables, and tracepoint sources. Handle tracepoint
10646 queries.
10647 (main): Initialize the tracepoints module.
10648 (process_serial_event): Handle traceframe reads/writes.
10649
10650 * linux-low.c (handle_tracepoints): New.
10651 (linux_wait_1): Call it.
10652 (linux_resume_one_lwp): Handle while-stepping.
10653 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10654 (linux_target_ops): Install them.
10655 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10656 New field.
10657 * linux-x86-low.c (x86_supports_tracepoints): New.
10658 (the_low_target). Install it.
10659
10660 * mem-break.h (delete_breakpoint): Declare.
10661 * mem-break.c (delete_breakpoint): Make external.
10662
10663 * target.h (struct target_ops): Add `supports_tracepoints',
10664 `read_pc', and `write_pc' fields.
10665 (target_supports_tracepoints): Define.
10666 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10667 (phex_nz): New.
10668
10669 * regcache.h (struct regcache) <registers_owned>: New field.
10670 (init_register_cache, regcache_cpy): Declare.
10671 (regcache_read_pc, regcache_write_pc): Declare.
10672 (register_cache_size): Declare.
10673 (supply_regblock): Declare.
10674 * regcache.c (init_register_cache): New.
10675 (new_register_cache): Use it.
10676 (regcache_cpy): New.
10677 (register_cache_size): New.
10678 (supply_regblock): New.
10679 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10680
219f2f23
PA
10681 * tracepoint.c: New.
10682
10683 * Makefile.in (OBS): Add tracepoint.o.
10684 (tracepoint.o): New rule.
10685
3a13a53b
L
106862010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10687
10688 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10689 (i386-mmx.o): New.
10690 (i386-mmx.c): Likewise.
10691 (i386-mmx-linux.o): Likewise.
10692 (i386-mmx-linux.c): Likewise.
10693
10694 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10695 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10696 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10697 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10698
10699 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10700 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10701 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10702
1570b33e
L
107032010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10704
10705 * Makefile.in (clean): Updated.
10706 (i386-avx.o): New.
10707 (i386-avx.c): Likewise.
10708 (i386-avx-linux.o): Likewise.
10709 (i386-avx-linux.c): Likewise.
10710 (amd64-avx.o): Likewise.
10711 (amd64-avx.c): Likewise.
10712 (amd64-avx-linux.o): Likewise.
10713 (amd64-avx-linux.c): Likewise.
10714
10715 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10716 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10717 (srv_amd64_regobj): Add amd64-avx.o.
10718 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10719 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10720 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10721 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10722 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10723 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10724 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10725
10726 * i387-fp.c: Include "i386-xstate.h".
10727 (i387_xsave): New.
10728 (i387_cache_to_xsave): Likewise.
10729 (i387_xsave_to_cache): Likewise.
10730 (x86_xcr0): Likewise.
10731
10732 * i387-fp.h (i387_cache_to_xsave): Likewise.
10733 (i387_xsave_to_cache): Likewise.
10734 (x86_xcr0): Likewise.
10735
10736 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10737 * linux-crisv32-low.c (target_regsets): Likewise.
10738 * linux-m68k-low.c (target_regsets): Likewise.
10739 * linux-mips-low.c (target_regsets): Likewise.
10740 * linux-ppc-low.c (target_regsets): Likewise.
10741 * linux-s390-low.c (target_regsets): Likewise.
10742 * linux-sh-low.c (target_regsets): Likewise.
10743 * linux-sparc-low.c (target_regsets): Likewise.
10744 * linux-xtensa-low.c (target_regsets): Likewise.
10745
10746 * linux-low.c: Include <sys/uio.h>.
10747 (regsets_fetch_inferior_registers): Support nt_type.
10748 (regsets_store_inferior_registers): Likewise.
10749 (linux_process_qsupported): New.
10750 (linux_target_ops): Add linux_process_qsupported.
10751
10752 * linux-low.h (regset_info): Add nt_type.
10753 (linux_target_ops): Add process_qsupported.
10754
10755 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10756 and <sys/uio.h>.
10757 (init_registers_i386_avx_linux): New.
10758 (init_registers_amd64_avx_linux): Likewise.
10759 (xmltarget_i386_linux_no_xml): Likewise.
10760 (xmltarget_amd64_linux_no_xml): Likewise.
10761 (PTRACE_GETREGSET): Likewise.
10762 (PTRACE_SETREGSET): Likewise.
10763 (x86_fill_xstateregset): Likewise.
10764 (x86_store_xstateregset): Likewise.
10765 (use_xml): Likewise.
10766 (x86_linux_update_xmltarget): Likewise.
10767 (x86_linux_process_qsupported): Likewise.
10768 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10769 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10770 init_registers_i386_linux here. Call
10771 x86_linux_update_xmltarget.
10772 (the_low_target): Add x86_linux_process_qsupported.
10773
10774 * server.c (handle_query): Call target_process_qsupported.
10775
10776 * target.h (target_ops): Add process_qsupported.
10777 (target_process_qsupported): New.
10778
fc7238bb
PA
107792010-04-03 Pedro Alves <pedro@codesourcery.com>
10780
10781 * inferiors.c (add_thread): Set last_status kind to
10782 TARGET_WAITKIND_IGNORE.
10783 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10784 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10785 (linux_wait_1): Move `thread' local definition to block that uses
10786 it. Don't NULL initialize `event_child'.
10787 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10788 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10789 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10790
bdabb078
PA
107912010-04-01 Pedro Alves <pedro@codesourcery.com>
10792
10793 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10794 an extended waitstatus, or by a watchpoint.
10795 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10796 thread was stepping or has been stopped by a watchpoint.
10797
d3bbe7a0
PA
107982010-04-01 Pedro Alves <pedro@codesourcery.com>
10799
10800 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10801 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10802 of another, then delete the previous, and validate all
10803 breakpoints.
10804 (validate_inserted_breakpoint): New.
10805 (delete_disabled_breakpoints): New.
10806 (validate_breakpoints): New.
10807 (check_mem_read): Validate breakpoints before trusting their
10808 shadow. Delete disabled breakpoints.
10809 (check_mem_write): Validate breakpoints before trusting they
10810 should be inserted. Delete disabled breakpoints.
10811 * mem-break.h (validate_breakpoints):
10812 * server.c (handle_query): Validate breakpoints when we see a
10813 qSymbol query.
10814
8b07ae33
PA
108152010-04-01 Pedro Alves <pedro@codesourcery.com>
10816
10817 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10818 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10819 if we could tell there's a GDB breakpoint at stop_pc.
10820 (need_step_over_p): Don't do a step over if we find a GDB
10821 breakpoint at the resume PC.
10822
10823 * mem-break.c (struct raw_breakpoint): New.
10824 (enum bkpt_type): New type `gdb_breakpoint'.
10825 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10826 fields. New field `raw'.
10827 (find_raw_breakpoint_at): New.
10828 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10829 breakpoint instead.
10830 (set_breakpoint_at): Adjust.
10831 (delete_raw_breakpoint): New.
10832 (release_breakpoint): New.
10833 (delete_breakpoint): Rename to...
10834 (delete_breakpoint_1): ... this. Add proc parameter. Use
10835 release_breakpoint. Return ENOENT.
10836 (delete_breakpoint): Reimplement.
10837 (find_breakpoint_at): Delete.
10838 (find_gdb_breakpoint_at): New.
10839 (delete_breakpoint_at): Delete.
10840 (set_gdb_breakpoint_at): New.
10841 (delete_gdb_breakpoint_at): New.
10842 (gdb_breakpoint_here): New.
10843 (set_reinsert_breakpoint): Use release_breakpoint.
10844 (uninsert_breakpoint): Rename to ...
10845 (uninsert_raw_breakpoint): ... this.
10846 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10847 (reinsert_raw_breakpoint): Change parameter type to
10848 raw_breakpoint.
10849 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10850 instead.
10851 (check_breakpoints): Adjust. Use release_breakpoint.
10852 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10853 (breakpoint_inserted_here): Ditto.
10854 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10855 Don't trust the breakpoint's shadow if it is not inserted.
10856 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10857 (delete_all_breakpoints): Adjust.
10858 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10859 use delete_breakpoint_1.
10860
10861 * mem-break.h (breakpoints_supported): Delete declaration.
10862 (set_gdb_breakpoint_at): Declare.
10863 (gdb_breakpoint_here): Declare.
10864 (delete_breakpoint_at): Delete.
10865 (delete_gdb_breakpoint_at): Declare.
10866
10867 * server.h (struct raw_breakpoint): Forward declare.
10868 (struct process_info): New field `raw_breakpoints'.
10869
10870 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10871 breakpoints.
10872
6bf5e0ba
PA
108732010-03-24 Pedro Alves <pedro@codesourcery.com>
10874
10875 * linux-low.c (status_pending_p_callback): Fix comment.
10876 (linux_wait_for_event_1): Move most of the internal breakpoint
10877 handling from here...
10878 (linux_wait_1): ... to here.
10879 (count_events_callback): New.
10880 (select_singlestep_lwp_callback): New.
10881 (select_event_lwp_callback): New.
10882 (cancel_breakpoints_callback): New.
10883 (select_event_lwp): New.
10884 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10885 priority to all LWPs that have had events that should be reported
10886 to the client. Cancel breakpoints when about to reporting the
10887 event to the client, not while stopping lwps. No longer cancel
10888 finished single-steps here.
10889 (cancel_finished_single_step): Delete.
10890 (cancel_finished_single_steps): Delete.
10891
414a389f
PA
108922010-03-24 Pedro Alves <pedro@codesourcery.com>
10893
10894 * mem-break.c (enum bkpt_type): New.
10895 (struct breakpoint): New field `type'.
10896 (set_breakpoint_at): Change return type to struct breakpoint
10897 pointer. Set type to `other_breakpoint' by default.
10898 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10899 in the breakpoint list.
10900 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10901 (reinsert_breakpoint): Rename to ...
10902 (reinsert_raw_breakpoint): ... this.
10903 (reinsert_breakpoints_at): Adjust.
10904 * mem-break.h (struct breakpoint): Declare.
10905 (set_breakpoint_at): Change return type to struct breakpoint
10906 pointer.
10907
2280c721
PA
109082010-03-24 Pedro Alves <pedro@codesourcery.com>
10909
10910 * server.c (handle_query): Assign, not compare.
10911
d50171e4
PA
109122010-03-24 Pedro Alves <pedro@codesourcery.com>
10913
10914 Teach linux gdbserver to step-over-breakpoints.
10915
10916 * linux-low.c (can_hardware_single_step): New.
10917 (supports_breakpoints): New.
10918 (handle_extended_wait): If stopping threads, read the stop pc of
10919 the new cloned LWP.
10920 (get_pc): New.
10921 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10922 low target doesn't support retrieving the PC.
10923 (add_lwp): Set last_resume_kind to resume_continue.
10924 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10925 (linux_attach): Don't clear stop_expected. Set the lwp's
10926 last_resume_kind to resume_stop.
10927 (linux_detach_one_lwp): Don't check for removed breakpoints.
10928 (check_removed_breakpoint): Delete.
10929 (status_pending_p): Rename to ...
10930 (status_pending_p_callback): ... this. Don't check for removed
10931 breakpoints. Don't consider threads that are stopped from GDB's
10932 perspective.
10933 (linux_wait_for_lwp): Always read the stop_pc here.
10934 (cancel_breakpoint): New.
10935 (step_over_bkpt): New global.
10936 (linux_wait_for_event_1): Implement stepping over breakpoints.
10937 (gdb_wants_lwp_stopped): New.
10938 (gdb_wants_all_stopped): New.
10939 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10940 single-step traps here. Store the thread's last reported target
10941 wait status.
10942 (send_sigstop): Don't clear stop_expected. Always set it,
10943 instead.
10944 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10945 (cancel_finished_single_step): New.
10946 (cancel_finished_single_steps): New.
10947 (wait_for_sigstop): Don't cancel finished single-step traps here.
10948 (linux_resume_one_lwp): Don't check for removed breakpoints.
10949 Don't set `step' on non-hardware step archs.
10950 (linux_set_resume_request): Ignore resume_stop requests if already
10951 stopping or stopped. Set the lwp's last_resume_kind.
10952 (resume_status_pending_p): Don't check for removed breakpoints.
10953 (need_step_over_p): New.
10954 (start_step_over): New.
10955 (finish_step_over): New.
10956 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10957 requests. Clear the thread's last reported target waitstatus.
10958 Don't use the `suspended' flag. Don't consider pending breakpoints.
10959 (linux_resume): Start a step-over if necessary.
10960 (proceed_one_lwp): New.
10961 (proceed_all_lwps): New.
10962 (unstop_all_lwps): New.
10963 * linux-low.h (struct lwp_info): Rewrite comment for the
10964 `suspended' flag. Add the `stop_pc' field. Delete the
10965 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10966 Add `'last_resume_kind' and `need_step_over' fields.
10967 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10968 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10969 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10970 (set_raw_breakpoint_at): New.
10971 (set_breakpoint_at): Rewrite to use it.
10972 (reinsert_breakpoint_handler): Delete.
10973 (set_reinsert_breakpoint): New.
10974 (reinsert_breakpoint_by_bp): Delete.
10975 (delete_reinsert_breakpoints): New.
10976 (uninsert_breakpoint): Rewrite.
10977 (uninsert_breakpoints_at): New.
10978 (reinsert_breakpoint): Rewrite.
10979 (reinsert_breakpoints_at): New.
10980 (check_breakpoints): Rewrite.
10981 (breakpoint_here): New.
10982 (breakpoint_inserted_here): New.
10983 (check_mem_read): Adjust.
10984 * mem-break.h (breakpoints_supported, breakpoint_here)
10985 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10986 (reinsert_breakpoint_by_bp): Delete declaration.
10987 (delete_reinsert_breakpoints): Declare.
10988 (reinsert_breakpoint): Delete declaration.
10989 (reinsert_breakpoints_at): Declare.
10990 (uninsert_breakpoint): Delete declaration.
10991 (uninsert_breakpoints_at): Declare.
10992 (check_breakpoints): Adjust prototype.
10993 * server.h: Adjust include order.
10994 (struct thread_info): Declare here. Add a `last_status' field.
10995
30ba68cb
MS
109962010-03-23 Michael Snyder <msnyder@vmware.com>
10997
10998 * server.c (crc32): New function.
10999 (handle_query): Add handling for 'qCRC:' request.
11000
b9a881c2
PA
110012010-03-23 Pedro Alves <pedro@codesourcery.com>
11002
11003 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11004 lwp had been stopped by a watchpoint.
11005
e92d13d5
PA
110062010-03-16 Pedro Alves <pedro@codesourcery.com>
11007
11008 * server.h (internal_error): Declare.
11009 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11010 * utils.c (internal_error): New function.
11011
64daa791
AS
110122010-03-15 Andreas Schwab <schwab@redhat.com>
11013
11014 * configure.srv: Fix typo setting srv_regobj.
11015
f52cd8cd
PA
110162010-03-15 Pedro Alves <pedro@codesourcery.com>
11017
11018 * linux-low.c (fetch_register): Avoid passing a non string literal
11019 format to `error'.
11020 (usr_store_inferior_registers): Ditto.
11021
93ae6fdc
PA
110222010-03-14 Pedro Alves <pedro@codesourcery.com>
11023
11024 * linux-low.c (linux_write_memory): Bail out early if peeking
11025 memory failed.
11026
c3adc08c
PA
110272010-03-14 Pedro Alves <pedro@codesourcery.com>
11028
11029 * linux-low.h (struct lwp_info): New fields
11030 `stopped_by_watchpoint' and `stopped_data_address'.
11031 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11032 here, and cache them in the lwp object.
11033 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11034 directly.
11035 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11036 field.
11037 (linux_stopped_by_watchpoint): Rewrite.
11038 (linux_stopped_data_address): Rewrite.
11039
bce522a2
PA
110402010-03-06 Simo Melenius <simo.melenius@iki.fi>
11041
11042 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11043 switching the current inferior, not before.
11044
90884b2b
L
110452010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11046
11047 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11048 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11049 i386-linux.c and amd64-linux.c.
11050 (reg-i386.o): Removed.
11051 (reg-i386.c): Likewise.
11052 (reg-i386-linux.o): Likewise.
11053 (reg-i386-linux.c): Likewise.
11054 (reg-x86-64.o): Likewise.
11055 (reg-x86-64.c): Likewise.
11056 (reg-x86-64-linux.o): Likewise.
11057 (reg-x86-64-linux.c): Likewise.
11058 (i386.o): New.
11059 (i386.c): Likewise.
11060 (i386-linux.o): Likewise.
11061 (i386-linux.c): Likewise.
11062 (amd64.o): Likewise.
11063 (amd64.c): Likewise.
11064 (amd64-linux.o): Likewise.
11065 (amd64-linux.c): Likewise.
11066
11067 * configure.srv (srv_i386_regobj): New.
11068 (srv_i386_linux_regobj): Likewise.
11069 (srv_amd64_regobj): Likewise.
11070 (srv_amd64_linux_regobj): Likewise.
11071 (srv_i386_32bit_xmlfiles): Likewise.
11072 (srv_i386_64bit_xmlfiles): Likewise.
11073 (srv_i386_xmlfiles): Likewise.
11074 (srv_amd64_xmlfiles): Likewise.
11075 (srv_i386_linux_xmlfiles): Likewise.
11076 (srv_amd64_linux_xmlfiles): Likewise.
11077 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11078 srv_xmlfiles to $srv_i386_xmlfiles.
11079 (i[34567]86-*-mingw32ce*): Likewise.
11080 (i[34567]86-*-mingw*): Likewise.
11081 (i[34567]86-*-nto*): Likewise.
11082 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11083 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11084 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11085 (x86_64-*-linux*): Likewise.
11086
11087 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11088 (init_registers_amd64_linux): New.
11089 (x86_arch_setup): Replace init_registers_x86_64_linux with
11090 init_registers_amd64_linux.
11091
193f13e6
MK
110922010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11093
11094 * configure.ac: Check for libdl. If it is not available link against
11095 static libthread_db.
11096 * configure: Regenerate.
11097
85d721b8
PA
110982010-02-22 Pedro Alves <pedro@codesourcery.com>
11099
11100 PR9605
11101
11102 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11103 handing a read watchpoint.
11104 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11105
6076632b
DE
111062010-02-12 Doug Evans <dje@google.com>
11107
11108 * linux-low.c (linux_supports_tracefork_flag): Document.
11109 (linux_look_up_symbols): Add comment.
11110
3327ccf7
L
111112010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11112
11113 * regcache.c (supply_register): Clear regcache if buf is NULL.
11114
0718675c 111152010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11116 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11117
11118 * inferiors.c (find_inferior): Add function documentation.
11119 (unloaded_dll): Handle the case where the unloaded dll has not
11120 been previously registered in the dll list.
11121
177321bd
DJ
111222010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11123
11124 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11125 (thumb2_breakpoint): New.
11126 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11127
2b009048
DJ
111282010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11129
11130 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11131 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11132 breakpoints.
11133
3be029c7
PA
111342010-01-21 Pedro Alves <pedro@codesourcery.com>
11135
11136 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11137
18f5de3b
JK
111382010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11139
11140 * linux-s390-low.c (s390_collect_ptrace_register)
11141 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11142
3743bb4f
DE
111432010-01-21 Doug Evans <dje@google.com>
11144
14ce3065
DE
11145 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11146 (PTRACE_ARG4_TYPE): New macro.
11147 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11148 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11149 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11150 (usr_store_inferior_registers): Ditto.
11151 (linux_read_memory, linux_write_memory): Ditto.
11152 (linux_test_for_tracefork): Ditto.
11153
3743bb4f
DE
11154 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11155 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11156
8b315be5
PA
111572010-01-21 Pedro Alves <pedro@codesourcery.com>
11158
11159 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11160 target.
11161
85492558
PA
111622010-01-21 Pedro Alves <pedro@codesourcery.com>
11163
11164 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11165 prototype to take a regcache. Adjust.
11166
442ea881
PA
111672010-01-20 Pedro Alves <pedro@codesourcery.com>
11168
11169 * regcache.h (struct thread_info): Forward declare.
11170 (struct regcache): New.
11171 (new_register_cache): Adjust prototype.
11172 (get_thread_regcache): Declare.
11173 (free_register_cache): Adjust prototype.
11174 (registers_to_string, registers_from_string): Ditto.
11175 (supply_register, supply_register_by_name, collect_register)
11176 (collect_register_as_string, collect_register_by_name): Ditto.
11177 * regcache.c (struct inferior_regcache_data): Delete.
11178 (get_regcache): Rename to ...
11179 (get_thread_regcache): ... this. Adjust. Switch inferior before
11180 fetching registers.
11181 (regcache_invalidate_one): Adjust.
11182 (regcache_invalidate): Fix prototype.
11183 (new_register_cache): Return the new register cache.
11184 (free_register_cache): Change prototype.
11185 (realloc_register_cache): Adjust.
11186 (registers_to_string): Change prototype to take a regcache. Adjust.
11187 (registers_from_string): Ditto.
11188 (register_data): Ditto.
11189 (supply_register): Ditto.
11190 (supply_register_by_name): Ditto.
11191 (collect_register): Ditto.
11192 (collect_register_as_string): Ditto.
11193 (collect_register_by_name): Ditto.
11194 * server.c (process_serial_event): Adjust.
11195 * linux-low.h (regset_fill_func, regset_store_func): Change
11196 prototype.
11197 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11198 Change prototype.
11199 * linux-low.c (get_stop_pc): Adjust.
11200 (check_removed_breakpoint): Adjust.
11201 (linux_wait_for_event): Adjust.
11202 (linux_resume_one_lwp): Adjust.
11203 (fetch_register): Add regcache parameter. Adjust.
11204 (usr_store_inferior_registers): Ditto.
11205 (regsets_fetch_inferior_registers): Ditto.
11206 (regsets_store_inferior_registers): Ditto.
11207 (linux_fetch_registers, linux_store_registers): Ditto.
11208 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11209 regcache. Adjust.
43aaf8b6
PA
11210 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11211 Ditto.
442ea881
PA
11212 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11213 prototype to take a regcache.
11214 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11215 * remote-utils.c (convert_ascii_to_int, outreg)
11216 (prepare_resume_reply): Change prototype to take a regcache.
11217 Adjust.
11218 * target.h (struct target_ops) <fetch_registers, store_registers>:
11219 Change prototype to take a regcache.
11220 (fetch_inferior_registers, store_inferior_registers): Change
11221 prototype to take a regcache. Adjust.
11222 * proc-service.c (ps_lgetregs): Adjust.
11223 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11224 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11225 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11226 take a regcache. Adjust.
11227 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11228 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11229 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11230 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11231 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11232 (cris_cannot_fetch_register):
11233 (cris_breakpoint_at): Change prototype to take a regcache.
11234 Adjust.
11235 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11236 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11237 to take a regcache. Adjust.
11238 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11239 Adjust.
11240 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11241 take a regcache. Adjust.
11242 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11243 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11244 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11245 * linux-mips-low.c (mips_get_pc):
11246 (mips_set_pc): Change prototype to take a regcache. Adjust.
11247 (mips_reinsert_addr): Adjust.
11248 (mips_collect_register): Change prototype to take a regcache.
11249 Adjust.
11250 (mips_supply_register):
11251 (mips_collect_register_32bit, mips_supply_register_32bit)
11252 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11253 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11254 * linux-ppc-low.c (ppc_supply_ptrace_register)
11255 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11256 (parse_spufs_run): Adjust.
11257 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11258 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11259 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11260 take a regcache. Adjust.
11261 * linux-s390-low.c (s390_collect_ptrace_register)
11262 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11263 (s390_set_pc): Change prototype to take a regcache. Adjust.
11264 (s390_arch_setup): Adjust.
11265 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11266 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11267 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11268 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11269 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11270 regcache. Adjust.
11271 (sparc_breakpoint_at): Adjust.
11272 * linux-xtensa-low.c (xtensa_fill_gregset):
11273 (xtensa_store_gregset):
11274 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11275 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11276 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11277 prototype to take a regcache. Adjust.
11278 * win32-arm-low.c (arm_fetch_inferior_register)
11279 (arm_store_inferior_register): Change prototype to take a
11280 regcache. Adjust.
11281 * win32-i386-low.c (i386_fetch_inferior_register)
11282 (i386_store_inferior_register): Change prototype to take a
11283 regcache. Adjust.
11284 * win32-low.c (child_fetch_inferior_registers)
11285 (child_store_inferior_registers): Change prototype to take a
11286 regcache. Adjust.
11287 (win32_wait): Adjust.
11288 (win32_fetch_inferior_registers): Change prototype to take a
11289 regcache. Adjust.
11290 (win32_store_inferior_registers): Adjust.
11291 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11292 store_inferior_register>: Change prototype to take a regcache.
11293
60c3d7b0
DE
112942010-01-20 Doug Evans <dje@google.com>
11295
11296 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11297 #ifdef.
11298 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11299 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11300
dc146f7c
VP
113012010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11302
11303 * linux-low.c (linux_core_of_thread): New.
11304 (compare_ints, show_process, list_threads): New.
11305 (linux_qxfer_osdata): Report threads and cores.
11306 (linux_target_op): Register linux_core_of_thread.
11307 * remote-utils.c (prepare_resume_reply): Report the core.
11308 (buffer_xml_printf): Support %d specifier.
11309 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11310 New.
11311 (handle_query): Handle qXfer:threads. Announce availability
11312 thereof.
11313 * target.h (struct target_ops): New field core_of_thread.
11314
7803799a
UW
113152010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11316
11317 * Makefile.in (clean): Remove new generated files.
11318 (reg-s390.o, reg-s390.c): Remove rules.
11319 (reg-s390x.o, reg-s390x.c): Likewise.
11320 (s390-linux32.o, s390-linux32.c): Add rules.
11321 (s390-linux64.o, s390-linux64.c): Likewise.
11322 (s390x-linux64.o, s390x-linux64.c): Likewise.
11323 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11324 * linux-s390-low.c: Include <elf.h>.
11325 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11326 (init_registers_s390): Remove prototype.
11327 (init_registers_s390x): Likewise.
11328 (init_registers_s390_linux32): Add prototype.
11329 (init_registers_s390_linux64): Likewise.
11330 (init_registers_s390x_linux64): Likewise.
11331 (s390_num_regs_3264): New define.
11332 (s390_regmap_3264): New global variable.
11333 (s390_cannot_fetch_register): Remove obsolete check.
11334 (s390_cannot_store_register): Likewise.
11335 (s390_collect_ptrace_register): Handle upper/lower register halves.
11336 (s390_supply_ptrace_register): Likewise.
11337 (s390_fill_gregset): Update to register number changes.
11338 (s390_get_hwcap): New routine.
11339 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11340 Install appropriate regmap and register set.
11341
6e7ffa39
JB
113422010-01-01 Joel Brobecker <brobecker@adacore.com>
11343
11344 * server.c (gdbserver_version): Update copyright year to 2010.
11345 * gdbreplay.c (gdbreplay_version): Likewise.
11346
957f3f49
DE
113472009-12-28 Doug Evans <dje@google.com>
11348
11349 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11350 elf/external.h. Include <elf.h> instead but only if necessary.
11351
ca5c370d
PA
113522009-12-28 Pedro Alves <pedro@codesourcery.com>
11353
11354 * linux-low.c (linux_remove_process): Remove `detaching'
11355 parameter. Don't release/detach from thread_db here.
11356 (linux_kill): Release/detach from thread_db here, ...
11357 (linux_detach): ... and here, before actually detaching.
11358 (linux_wait_1): ... and here, when a process exits.
11359 * thread-db.c (any_thread_of): New.
11360 (thread_db_free): Switch the current inferior to a thread of the
11361 passed in process.
11362
4ee62156
DE
113632009-12-21 Doug Evans <dje@google.com>
11364
d90e6a88
DE
11365 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11366
c5f62d5f
DE
11367 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11368 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11369 warning ifndef __NR_tkill. Move setting of errno there too.
11370 Delete unnecessary resetting of errno after syscall.
11371 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11372
10e86dd7
DE
11373 * configure.ac: Check for dladdr.
11374 * config.in: Regenerate.
11375 * configure: Regenerate.
11376 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11377 (try_thread_db_load): Update.
11378
4ee62156
DE
11379 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11380
00f515da
DE
113812009-12-18 Doug Evans <dje@google.com>
11382
e9464885
DE
11383 * event-loop.c: Include unistd.h if it exists.
11384
07d4f67e
DE
11385 * linux-low.c (my_waitpid): Move definition away from being in
11386 between linux_tracefork_child/linux_test_for_tracefork.
11387
00f515da
DE
11388 * gdb_proc_service.h (psaddr_t): Fix type.
11389 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11390 signature to match glibc.
11391
1de1badb
DE
113922009-12-16 Doug Evans <dje@google.com>
11393
11394 * linux-low.c (linux_read_memory): Fix argument to read.
11395
aeeb81d1
PA
113962009-11-26 Pedro Alves <pedro@codesourcery.com>
11397
11398 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11399 events, don't leave current_inferior pointing at null.
11400
10357975
PA
114012009-11-26 Pedro Alves <pedro@codesourcery.com>
11402
11403 * win32-low.c (LOG): Delete.
11404 (OUTMSG): Output to stderr.
11405 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11406 on compile time LOG macro.
11407 (win32_wait): Fix debug output.
11408
cf6e3471
PA
114092009-11-26 Pedro Alves <pedro@codesourcery.com>
11410
11411 * win32-low.c (win32_add_one_solib): If the dll name is
11412 "ntdll.dll", prepend the system directory to the dll path.
11413
0c85e18e
MK
114142009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11415
11416 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11417
9ac544ce 114182009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11419 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11420
11421 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11422 * configure.ac: Check for __mcoldfire__ and set
11423 gdb_cv_m68k_is_coldfire.
11424 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11425 reg-cf.o and reg-m68k.o.
11426 * configure: Regenerated.
11427
fd7dd3e6
PA
114282009-11-16 Pedro Alves <pedro@codesourcery.com>
11429
11430 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11431 Pass it to thread_db_free.
11432 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11433 proper `detaching' argument to linux_remove_process.
11434 * linux-low.h (thread_db_free): Add `detaching' parameter.
11435 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11436 to thread_db_free.
11437 (thread_db_free): Add `detaching' parameter. Only
11438 call td_ta_clear_event if detaching from process.
11439
75aa492e
MK
114402009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11441
11442 * thread-db.c (thread_db_free): Fix typo.
11443
21e1bee4
PP
114442009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11445
11446 PR gdb/10838
11447 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11448
8838b45e
NS
114492009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11450
11451 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11452 with an i686 compiler.
11453 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11454 needed.
11455 * configure: Rebuilt.
11456
8a35fb51
SL
114572009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11458
11459 PR gdb/10783
11460
11461 * server.c (handle_search_memory_1): Correct read_addr initialization
11462 in loop for searching subsequent chunks.
11463
96f15937
PP
114642009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11465
11466 * configure.ac: New --with-libthread-db option.
11467 * thread-db.c: Allow direct dependence on libthread_db.
11468 (thread_db_free): Adjust.
11469 * config.in: Regenerate.
11470 * configure: Likewise.
889bf7c5 11471
5f7d1694
PP
114722009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11473
11474 PR gdb/10757
11475 * thread-db.c (attach_thread): New function.
11476 (maybe_attach_thread): Return success/failure.
11477 (find_new_threads_callback): Adjust.
889bf7c5
PA
11478 (thread_db_find_new_threads): Loop until no new threads.
11479
88e3b899
PA
114802009-10-13 Pedro Alves <pedro@codesourcery.com>
11481
11482 * proc-service.c (ps_lgetregs): Formatting.
11483
cdbfd419
PP
114842009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11485
11486 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11487 * configure.ac: Adjust.
11488 * linux-low.h (struct process_info_private): Move members to struct
11489 thread_db.
11490 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11491 * linux-low.c (linux_remove_process): Adjust.
11492 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11493 * server.c (handle_query): Move code ...
11494 (handle_monitor_command): ... here. New function.
11495 * target.h (struct target_ops): New member.
11496 * thread-db.c (struct thread_db): New.
11497 (libthread_db_search_path): New variable.
11498 (thread_db_create_event, thread_db_enable_reporting)
11499 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11500 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11501 (try_thread_db_load_1, dladdr_to_soname): New functions.
11502 (try_thread_db_load, thread_db_load_search): New functions.
11503 (thread_db_init): Search for libthread_db.
11504 (thread_db_free): New function.
11505 (thread_db_handle_monitor_command): Likewise.
11506 * config.in: Regenerate.
11507 * configure: Regenerate.
889bf7c5 11508
4168d2d6
UW
115092009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11510
11511 * spu-low.c (spu_kill): Wait for inferior to terminate.
11512 Call clear_inferiors.
11513 (spu_detach): Call clear_inferiors.
11514
81ecdfbb
RW
115152009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11516
11517 * aclocal.m4: Regenerate.
11518 * config.in: Likewise.
11519 * configure: Likewise.
11520
0b9ff2c0
UW
115212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11522
11523 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11524 (parse_spufs_run): New function.
11525 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11526 (ppc_breakpoint_at): Handle SPU breakpoints.
11527
efcbbd14
UW
115282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11529
11530 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11531 (SPUFS_MAGIC): Define.
11532 (spu_enumerate_spu_ids): New function.
11533 (linux_qxfer_spu): New function.
11534 (linux_target_ops): Install linux_qxfer_spu.
11535
f4d9bade
UW
115362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11537
11538 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11539 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11540 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11541 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11542 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11543 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11544 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11545 (init_registers_powerpc_cell32l): Add prototype.
11546 (init_registers_powerpc_cell64l): Likewise.
11547 (ppc_arch_setup): Detect Cell/B.E. architecture.
11548
96e946ca
RW
115492009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11550
11551 * Makefile.in (datarootdir): New variable.
11552
58d6951d
DJ
115532009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11554
11555 * linux-low.c (linux_write_memory): Update debugging output.
11556 * Makefile.in (clean): Add new descriptions.
11557 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11558 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11559 * configure.srv: Add new files for arm*-*-linux*.
11560 * linux-arm-low.c: Add new declarations.
11561 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11562 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11563 (HWCAP_VFPv3D16): New.
11564 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11565 instead of __IWMMXT__.
11566 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11567 (arm_arch_setup): New.
11568 (target_regsets): Remove #ifdef. Add VFP regset.
11569 (the_low_target): Use arm_arch_setup.
11570
12b42a12
DJ
115712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11572
11573 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11574 the main thread again.
11575
ac8c974e
AR
115762009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11577
11578 Adding Neutrino gdbserver.
11579 * configure: Regenerated.
11580 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11581 * configure.srv (i[34567]86-*-nto*): New target.
11582 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11583 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11584 (nto_comctrl) [__QNX__]: New function.
11585 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11586
4424e0c3 115872009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11588
11589 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11590 srv_tgtobj.
11591
912cf4ba
PA
115922009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11593 Pedro Alves <pedro@codesourcery.com>
11594
11595 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11596 don't support CONTEXT_EXTENDED_REGISTERS.
11597 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11598 (the_low_target): Install them.
11599 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11600 failing with ERROR_PIPE_NOT_CONNECTED.
11601
aa5ca48f
DE
116022009-06-30 Doug Evans <dje@google.com>
11603 Pierre Muller <muller@ics.u-strasbg.fr>
11604
11605 Add h/w watchpoint support to x86-linux, win32-i386.
11606 * Makefile.in (SFILES): Add i386-low.c
11607 (i386_low_h): Define.
11608 (i386-low.o): Add dependencies.
11609 (linux-x86-low.o): Add i386-low.h dependency.
11610 (win32-i386-low.o): Ditto.
11611 * i386-low.c: New file.
11612 * i386-low.h: New file.
11613 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11614 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11615 * linux-low.c (linux_add_process): Initialize arch_private.
11616 (linux_remove_process): Free arch_private.
11617 (add_lwp): Initialize arch_private.
11618 (delete_lwp): Free arch_private.
11619 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11620 provided.
11621 * linux-low.h (process_info_private): New member arch_private.
11622 (lwp_info): New member arch_private.
11623 (linux_target_ops): New members new_process, new_thread,
11624 prepare_to_resume.
11625 (ptid_of): New macro.
11626 * linux-x86-low.c: Include stddef.h, i386-low.h.
11627 (arch_process_info): New struct.
11628 (arch_lwp_info): New struct.
11629 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11630 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11631 (i386_dr_low_get_status): New function.
11632 (x86_insert_point, x86_remove_point): New functions.
11633 (x86_stopped_by_watchpoint): New function.
11634 (x86_stopped_data_address): New function.
11635 (x86_linux_new_process, x86_linux_new_thread): New functions.
11636 (x86_linux_prepare_to_resume): New function.
11637 (the_low_target): Add entries for insert_point, remove_point,
11638 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11639 prepare_to_resume.
11640 * server.c (debug_hw_points): New global.
11641 (monitor_show_help): Document set debug-hw-points.
11642 (handle_query): Process "set debug-hw-points".
11643 * server.h (debug_hw_points): Declare.
11644 (paddress): Declare.
11645 * utils.c (NUMCELLS, CELLSIZE): New macros.
11646 (get_sell, xsnprintf, paddress): New functions.
11647 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11648 remove_point, stopped_by_watchpoint, stopped_data_address.
11649 * win32-i386-low.c: Include i386-low.h.
11650 (debug_reg_state): Replaces dr.
11651 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11652 (i386_dr_low_get_status): New function.
11653 (i386_insert_point, i386_remove_point): New functions.
11654 (i386_stopped_by_watchpoint): New function.
11655 (i386_stopped_data_address): New function.
11656 (i386_initial_stuff): Update.
11657 (get_thread_context,set_thread_context,i386_thread_added): Update.
11658 (the_low_target): Add entries for insert_point,
11659 remove_point, stopped_by_watchpoint, stopped_data_address.
11660 * win32-low.c (win32_insert_watchpoint): New function.
11661 (win32_remove_watchpoint): New function.
11662 (win32_stopped_by_watchpoint): New function.
11663 (win32_stopped_data_address): New function.
11664 (win32_target_ops): Add entries for insert_watchpoint,
11665 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11666 * win32-low.h (win32_target_ops): New members insert_point,
11667 remove_point, stopped_by_watchpoint, stopped_data_address.
11668
d993e290
PA
116692009-06-25 Pedro Alves <pedro@codesourcery.com>
11670
11671 * server.c (process_serial_event): Re-return unsupported, not
11672 error, if the type isn't recognized. Re-allow supporting only
11673 insert or remove packets. Also call require_running for
11674 breakpoints. Add missing break statement to default case. Tidy.
11675 * target.h (struct target_ops): Rename insert_watchpoint to
11676 insert_point, and remove_watchpoint to remove_point.
11677
11678 * linux-low.h (struct linux_target_ops): Likewise.
11679 * linux-low.c (linux_insert_watchpoint): Rename to ...
11680 (linux_insert_point): ... this. Adjust.
11681 (linux_remove_watchpoint): Rename to ...
11682 (linux_remove_point): ... this. Adjust.
11683 (linux_target_ops): Adjust.
11684 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11685 (cris_insert_point): ... this.
11686 (cris_remove_watchpoint): Rename to ...
11687 (cris_remove_point): ... this.
11688 (the_low_target): Adjust.
11689
0f54c268
PM
116902009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11691
11692 * server.c (handle_v_kill): Pass signal_pid to
11693 kill_inferior if multi_process is zero.
11694
c6314022
AR
116952009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11696
11697 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11698 * target.h (target_ops): Comment for *_watchpoint to make it clear
11699 the functions can get types '0' and '1'.
11700
4463ce24
AR
117012009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11702
11703 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11704 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11705 * regcache.c (get_regcache): Likewise.
11706 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11707 * win32-low.c (child_fetch_inferior_registers): Remove check for
11708 regno 0.
11709
cf8fd78b
PA
117102009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11711 Pedro Alves <pedro@codesourcery.com>
11712
11713 * target.h (struct target_ops) <supports_multi_process>: New
11714 callback.
11715 (target_supports_multi_process): New.
11716 * server.c (handle_query): Even if GDB reports support, only
11717 enable multi-process if the target also supports it. Report
11718 multi-process support only if the target backend supports it.
11719 * linux-low.c (linux_supports_multi_process): New function.
11720 (linux_target_ops): Install it as target_supports_multi_process
11721 callback.
11722
47c0c975
DE
117232009-05-24 Doug Evans <dje@google.com>
11724
e09875d4
DE
11725 Global renaming of find_thread_pid to find_thread_ptid.
11726 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11727 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11728 All callers updated.
11729
e27d73f6
DE
11730 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11731 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11732 directly.
11733
47c0c975
DE
11734 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11735 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11736 (linux_resume_one_lwp): Ditto.
11737
2acc282a
DE
117382009-05-23 Doug Evans <dje@google.com>
11739
11740 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11741 from struct inferior_list_entry * to struct lwp_info *.
11742 All callers updated.
11743
9f1036c1
DE
117442009-05-13 Doug Evans <dje@google.com>
11745
11746 * linux-x86-low.c: Don't include assert.h.
11747 (x86_siginfo_fixup): Use fatal, not assert.
11748 (x86_arch_setup): Fix comment.
11749
d0722149
DE
117502009-05-12 Doug Evans <dje@google.com>
11751
11752 Biarch support for i386/amd64 gdbserver.
11753 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11754 Add linux-x86-low.c.
11755 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11756 (linux-x86-low.o): Add.
11757 * linux-x86-64-low.c: Delete.
11758 * linux-i386-low.c: Delete.
11759 * linux-x86-low.c: New file.
11760 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11761 linux-x86-low.o.
11762 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11763 linux-x86-low.o.
11764 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11765 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11766 (linux_child_pid_to_exec_file): New function.
11767 (elf_64_header_p, elf_64_file_p): New functions.
11768 (siginfo_fixup): New function.
11769 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11770 give target a chance to convert layout.
11771 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11772 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11773
fdeb2a12
DE
117742009-05-07 Doug Evans <dje@google.com>
11775
11776 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11777 (regsets_store_inferior_registers): Ditto.
11778
a6dbe5df
PA
117792009-05-06 Pedro Alves <pedro@codesourcery.com>
11780
11781 PR server/10048
11782
11783 * linux-low.c (must_set_ptrace_flags): Delete.
11784 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11785 of the global.
11786 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11787 `lwp->must_set_ptrace_flags' instead.
ba42693b 11788 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11789 (linux_wait_1): ... not here.
11790
5091eb23
DE
117912009-04-30 Doug Evans <dje@google.com>
11792
9f767825
DE
11793 * inferiors.c (started_inferior_callback): New function.
11794 (attached_inferior_callback): New function.
11795 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11796 * server.c (print_started_pid, print_attached_pid): New functions.
11797 (detach_or_kill_for_exit): New function.
11798 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11799 * server.h (have_started_inferiors_p): Declare.
11800 (have_attached_inferiors_p): Declare.
11801
5091eb23
DE
11802 * inferiors.c (remove_process): Fix memory leak, free process.
11803 * linux-low.c (linux_remove_process): New function.
11804 (linux_kill): Call it instead of remove_process.
11805 (linux_detach, linux_wait_1): Ditto.
11806
155c8968
PA
118072009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11808
11809 * configure.srv: Add x86 Windows CE target.
11810
7fe519cb
UW
118112009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11812
11813 * inferiors.c (get_thread_process): Make global.
11814 * server.h (get_thread_process): Add prototype.
11815 * thread-db.c (find_one_thread): Use get_thread_process
11816 instead of current_process.
11817 (thread_db_get_tls_address): Do not crash if called when
11818 thread layer is not yet initialized.
11819
5472f405
UW
118202009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11821
11822 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11823 * spu-low.c (current_tid): Rename to ...
11824 (current_ptid): ... this.
11825 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11826 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11827 ptid_get_lwp (current_ptid) instead of current_tid.
11828 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11829 instead of current_tid. Use find_process_pid to verify pid
11830 argument is valid. Pass proper argument to remove_process.
11831 (spu_thread_alive): Compare current_ptid instead of current_tid.
11832 (spu_resume): Likewise.
11833
55ac2b99
PA
118342009-04-02 Pedro Alves <pedro@codesourcery.com>
11835
11836 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11837 variable.
11838
95954743
PA
118392009-04-01 Pedro Alves <pedro@codesourcery.com>
11840
11841 Implement the multiprocess extensions, and add linux multiprocess
11842 support.
11843
11844 * server.h (ULONGEST): Declare.
11845 (struct ptid, ptid_t): New.
11846 (minus_one_ptid, null_ptid): Declare.
11847 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11848 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11849 (struct inferior_list_entry): Change `id' type from unsigned from
11850 to ptid_t.
11851 (struct sym_cache, struct breakpoint, struct
11852 process_info_private): Forward declare.
11853 (struct process_info): Declare.
11854 (current_process): Declare.
11855 (all_processes): Declare.
11856 (initialize_inferiors): Declare.
11857 (add_thread): Adjust to use ptid_t.
11858 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11859 (add_process, remove_process, find_thread_pid): Declare.
11860 (find_inferior_id): Adjust to use ptid_t.
11861 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11862 (multi_process): Declare.
11863 (push_event): Adjust to use ptid_t.
11864 (read_ptid, write_ptid): Declare.
11865 (prepare_resume_reply): Adjust to use ptid_t.
11866 (clear_symbol_cache): Declare.
11867 * inferiors.c (all_processes): New.
11868 (null_ptid, minus_one_ptid): New.
11869 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11870 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11871 (add_thread): Change unsigned long to ptid. Remove gdb_id
11872 parameter. Adjust.
11873 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11874 (gdb_id_to_thread): Rename to ...
11875 (find_thread_pid): ... this. Change unsigned long to ptid.
11876 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11877 (loaded_dll, pull_pid_from_list): Adjust.
11878 (add_process, remove_process, find_process_pid)
11879 (get_thread_process, current_process, initialize_inferiors): New.
11880 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11881 (struct target_waitstatus) <related_pid>: Ditto.
11882 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11883 return type to int.
11884 (struct target_ops) <join>: Add `pid' argument.
11885 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11886 (struct target_ops) <wait>: Add `ptid' field. Change return type
11887 to ptid.
11888 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11889 (mywait): Add `ptid' argument. Change return type to ptid_t.
11890 (target_pid_to_str): Declare.
11891 * target.c (set_desired_inferior): Adjust to use ptids.
11892 (mywait): Add new `ptid' argument. Adjust.
11893 (target_pid_to_str): New.
11894 * mem-break.h (free_all_breakpoints): Declare.
11895 * mem-break.c (breakpoints): Delelete.
11896 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11897 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11898 to use per-process breakpoint list.
11899 (free_all_breakpoints): New.
11900 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11901 (symbol_cache, all_symbols_looked_up): Delete.
11902 (hexchars): New.
11903 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11904 read_ptid): New.
11905 (prepare_resume_reply): Change ptid argument's type from unsigned
11906 long to ptid_t. Adjust. Implement W;process and X;process.
11907 (free_sym_cache, clear_symbol_cache): New.
11908 (look_up_one_symbol): Adjust to per-process symbol cache. *
11909 * server.c (cont_thread, general_thread, step_thread): Change type
11910 to ptid_t.
11911 (attached): Delete.
11912 (multi_process): New.
11913 (last_ptid): Change type to ptid_t.
11914 (struct vstop_notif) <ptid>: Change type to ptid_t.
11915 (queue_stop_reply, push_event): Change `ptid' argument's type to
11916 ptid_t.
11917 (discard_queued_stop_replies): Add `pid' argument.
11918 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11919 changes. Don't reference the `attached' global.
11920 (attach_inferior): Adjust to mywait interface changes.
11921 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11922 features. Handle and report "multiprocess+". Handle
11923 "qAttached:PID".
11924 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11925 changes.
11926 (handle_v_kill): New.
11927 (handle_v_stopped): Adjust to use target_pid_to_str.
11928 (handle_v_requests): Allow multiple attaches and runs when
11929 multiprocess extensions are in effect. Handle "vKill".
11930 (myresume): Adjust to use ptids.
11931 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11932 (handle_status): Adjust to discard_queued_stop_replies interface
11933 change.
11934 (first_thread_of, kill_inferior_callback)
11935 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11936 (main): Call initialize_inferiors. Adjust to use ptids, killing
11937 and detaching from all inferiors. Handle multiprocess packet
11938 variants.
11939 * linux-low.h: Include gdb_proc_service.h.
11940 (struct process_info_private): New.
11941 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11942 <lwpid_of>: Use ptid_get_lwp.
11943 (get_lwp_thread): Adjust.
11944 (struct lwp_info): Add `dead' member.
11945 (find_lwp_pid): Declare.
11946 * linux-low.c (thread_db_active): Delete.
11947 (new_inferior): Adjust comment.
11948 (inferior_pid): Delete.
11949 (linux_add_process): New.
11950 (handle_extended_wait): Adjust.
11951 (add_lwp): Change unsigned long to ptid.
11952 (linux_create_inferior): Add process to processes table. Adjust
11953 to use ptids. Don't set new_inferior here.
11954 (linux_attach_lwp): Rename to ...
11955 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11956 it. Adjust to use ptids.
11957 (linux_attach_lwp): New.
11958 (linux_attach): Add process to processes table. Don't set
11959 new_inferior here.
11960 (struct counter): New.
11961 (second_thread_of_pid_p, last_thread_of_process_p): New.
11962 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11963 multiple processes.
11964 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11965 processes. Remove process from process table.
11966 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11967 to multiple processes.
11968 (any_thread_of): New.
11969 (linux_detach): Add `pid' argument, and handle it. Remove process
11970 from processes table.
11971 (linux_join): Add `pid' argument. Handle it.
11972 (linux_thread_alive): Change unsighed long argument to ptid_t.
11973 Consider dead lwps as not being alive.
11974 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11975 threads we're not interested in.
11976 (same_lwp, find_lwp_pid): New.
11977 (linux_wait_for_lwp): Change `pid' argument's type from int to
11978 ptid_t. Adjust.
11979 (linux_wait_for_event): Rename to ...
11980 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11981 from int to ptid_t. Adjust.
11982 (linux_wait_for_event): New.
11983 (linux_wait_1): Add `ptid' argument. Change return type to
11984 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11985 that exit from the process table.
11986 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11987 Adjust.
11988 (mark_lwp_dead): New.
11989 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11990 stopping all threads, mark its main lwp as dead.
11991 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11992 ptids.
11993 (fetch_register, usr_store_inferior_registers)
11994 (regsets_fetch_inferior_registers)
11995 (regsets_store_inferior_registers, linux_read_memory)
11996 (linux_write_memory): Inline `inferior_pid'.
11997 (linux_look_up_symbols): Adjust to use per-process
11998 `thread_db_active'.
11999 (linux_request_interrupt): Adjust to use ptids.
12000 (linux_read_auxv): Inline `inferior_pid'.
12001 (initialize_low): Don't reference thread_db_active.
12002 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12003 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12004 (ps_getpid): Return the pid of the current inferior.
12005 * thread-db.c (proc_handle, thread_agent): Delete.
12006 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12007 per-process data.
12008 (find_one_thread): Change argument type to ptid_t. Adjust to
12009 per-process data.
12010 (maybe_attach_thread): Adjust to per-process data and ptids.
12011 (thread_db_find_new_threads): Ditto.
12012 (thread_db_init): Ditto.
12013 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12014 processes table. Adjust to use ptids.
12015 (spu_kill, spu_detach): Adjust interface. Remove process from
12016 processes table.
12017 (spu_join, spu_thread_alive): Adjust interface.
12018 (spu_wait): Adjust interface. Remove process from processes
12019 table. Adjust to use ptids.
12020 * win32-low.c (current_inferior_tid): Delete.
12021 (current_inferior_ptid): New.
12022 (debug_event_ptid): New.
12023 (thread_rec): Take a ptid. Adjust.
12024 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12025 (child_delete_thread): Ditto.
12026 (do_initial_child_stuff): Add `attached' argument. Add process to
12027 processes table.
12028 (child_fetch_inferior_registers, child_store_inferior_registers):
12029 Adjust.
12030 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12031 (win32_attach): Pass 1 to do_initial_child_stuff.
12032 (win32_kill): Adjust interface. Remove process from processes
12033 table.
12034 (win32_detach): Ditto.
12035 (win32_join): Adjust interface.
12036 (win32_thread_alive): Take a ptid.
12037 (win32_resume): Adjust to use ptids.
12038 (get_child_debug_event): Ditto.
12039 (win32_wait): Adjust interface. Remove exiting process from
12040 processes table.
12041
bd99dc85
PA
120422009-04-01 Pedro Alves <pedro@codesourcery.com>
12043
12044 Non-stop mode support.
12045
12046 * server.h (non_stop): Declare.
12047 (gdb_client_data, handler_func): Declare.
12048 (delete_file_handler, add_file_handler, start_event_loop):
12049 Declare.
12050 (handle_serial_event, handle_target_event, push_event)
12051 (putpkt_notif): Declare.
12052 * target.h (enum resume_kind): New.
12053 (struct thread_resume): Replace `step' field by `kind' field.
12054 (TARGET_WNOHANG): Define.
12055 (struct target_ops) <wait>: Add `options' argument.
12056 <supports_non_stop, async, start_non_stop>: New fields.
12057 (target_supports_non_stop, target_async): New.
12058 (start_non_stop): Declare.
12059 (mywait): Add `options' argument.
12060 * target.c (mywait): Add `options' argument. Print child exit
12061 notifications here.
12062 (start_non_stop): New.
12063 * server.c (non_stop, own_buf, mem_buf): New globals.
12064 (struct vstop_notif): New.
12065 (notif_queue): New global.
12066 (queue_stop_reply, push_event, discard_queued_stop_replies)
12067 (send_next_stop_reply): New.
12068 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12069 interface changes.
12070 (attach_inferior): In non-stop mode, don't wait for the target
12071 here.
12072 (handle_general_set): Handle QNonStop.
12073 (handle_query): When handling qC, return the current general
12074 thread, instead of the first thread of the list.
12075 (handle_query): If the backend supports non-stop mode, include
12076 QNonStop+ in the qSupported query response.
12077 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12078 and non-stop mode.
12079 (handle_v_attach, handle_v_run): Handle non-stop mode.
12080 (handle_v_stopped): New.
12081 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12082 (myresume): Adjust to use resume_kind. Handle non-stop.
12083 (queue_stop_reply_callback): New.
12084 (handle_status): Handle non-stop mode.
12085 (main): Clear non_stop flag on reconnection. Use the event-loop.
12086 Refactor serial protocol handling from here ...
12087 (process_serial_event): ... to this new function. When GDB
12088 selects any thread, select one here. In non-stop mode, wait until
12089 GDB acks all pending events before exiting.
12090 (handle_serial_event, handle_target_event): New.
12091 * remote-utils.c (remote_open): Install remote_desc in the event
12092 loop.
12093 (remote_close): Remove remote_desc from the event loop.
12094 (putpkt_binary): Rename to...
12095 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12096 (putpkt_binary): New as wrapper around putpkt_binary_1.
12097 (putpkt_notif): New.
12098 (prepare_resume_reply): In non-stop mode, don't change the
12099 general_thread.
12100 * event-loop.c: New.
12101 * Makefile.in (OBJ): Add event-loop.o.
12102 (event-loop.o): New rule.
12103
12104 * linux-low.h (pid_of): Moved here.
12105 (lwpid_of): New.
12106 (get_lwp_thread): Use lwpid_of.
12107 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12108 * linux-low.c (pid_of): Delete.
12109 (inferior_pid): Use lwpid_of.
12110 (linux_event_pipe): New.
12111 (target_is_async_p): New.
12112 (delete_lwp): New.
12113 (handle_extended_wait): Use lwpid_of.
12114 (add_lwp): Don't set lwpid field.
12115 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12116 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12117 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12118 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12119 first. Adjust to linux_wait_for_event interface changes. Use
12120 lwpid_of.
12121 (linux_detach): Don't delete the main lwp here.
12122 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12123 (status_pending_p): Don't consider explicitly suspended lwps.
12124 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12125 pointer. Add OPTIONS argument. Change return type to int. Use
12126 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12127 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12128 pointer. Add status pointer argument. Return a pid instead of a
12129 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12130 changes. In non-stop mode, don't switch to a random thread.
12131 (linux_wait): Rename to...
12132 (linux_wait_1): ... this. Add target_options argument, and handle
12133 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12134 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12135 clean exit and signal exit code. Don't stop all threads in
12136 non-stop mode. In all-stop mode, only stop all threads when
12137 reporting a stop to GDB. Handle explicit thread stop requests.
12138 (async_file_flush, async_file_mark): New.
12139 (linux_wait): New.
12140 (send_sigstop): Use lwpid_of.
12141 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12142 interface changes. In non-stop mode, don't switch to a random
12143 thread.
12144 (linux_resume_one_lwp): Use lwpid_of.
12145 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12146 (linux_resume_one_thread): ... this. Handle resume_stop. In
12147 non-stop mode, don't look for pending flag in all threads.
12148 (resume_status_pending_p): Don't consider explicitly suspended
12149 threads.
12150 (my_waitpid): Reimplement. Emulate __WALL.
12151 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12152 Use lwpid_of.
12153 (sigchld_handler, linux_supports_non_stop, linux_async)
12154 (linux_start_non_stop): New.
12155 (linux_target_ops): Register linux_supports_non_stop, linux_async
12156 and linux_start_non_stop.
12157 (initialize_low): Install SIGCHLD handler.
12158 * thread-db.c (thread_db_create_event, find_one_thread)
12159 (thread_db_get_tls_address): Use lwpid_of.
12160 * win32-low.c (win32_detach): Adjust to use resume_kind.
12161 (win32_wait): Add `options' argument.
12162 * spu-low.c (spu_resume): Adjust to use resume_kind.
12163 (spu_wait): Add `options' argument.
12164
5b1c542e
PA
121652009-04-01 Pedro Alves <pedro@codesourcery.com>
12166
12167 Decouple target code from remote protocol.
12168
12169 * target.h (enum target_waitkind): New.
12170 (struct target_waitstatus): New.
12171 (struct target_ops) <wait>: Return an unsigned long. Take a
12172 target_waitstatus pointer instead of a char pointer.
12173 (mywait): Likewise.
12174 * target.c (mywait): Change prototype to return an unsigned long.
12175 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12176 * server.h (thread_from_wait, old_thread_from_wait): Delete
12177 declarations.
12178 (prepare_resume_reply): Change prototype to take a
12179 target_waitstatus.
12180 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12181 (last_status, last_ptid): New.
12182 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12183 pid instead of a signal.
12184 (attach_inferior): Remove "status" and "signal" parameters.
12185 Adjust.
12186 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12187 not as an address.
12188 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12189 (handle_v_requests, myresume): Remove "status" and "signal"
12190 parameters. Adjust.
12191 (handle_status): New.
12192 (main): Delete local `status'. Adjust.
12193 * remote-utils.c: Include target.h.
12194 (prepare_resume_reply): Change prototype to take a
12195 target_waitstatus. Adjust.
12196
12197 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12198 interface.
12199 * spu-low.c (spu_wait): Adjust.
12200 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12201 Delete.
12202 (win32_wait): Adjust.
12203
2bd7c093
PA
122042009-04-01 Pedro Alves <pedro@codesourcery.com>
12205
12206 * target.h (struct thread_resume): Delete leave_stopped member.
12207 (struct target_ops): Add a `n' argument to the `resume' callback.
12208 * server.c (start_inferior): Adjust.
12209 (handle_v_cont, myresume): Adjust.
12210 * linux-low.c (check_removed_breakpoint): Adjust to resume
12211 interface change, and to removed leave_stopped field.
12212 (resume_ptr): Delete.
12213 (struct thread_resume_array): New.
12214 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12215 resume interface change.
12216 (linux_continue_one_thread, linux_queue_one_thread)
12217 (resume_status_pending_p): Check if the resume field is NULL
12218 instead of checking the leave_stopped member.
12219 (linux_resume): Adjust to the target resume interface change.
12220 * spu-low.c (spu_resume): Adjust to the target resume interface
12221 change.
12222 * win32-low.c (win32_detach, win32_resume): Ditto.
12223
c35fafde
PA
122242009-04-01 Pedro Alves <pedro@codesourcery.com>
12225
12226 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12227 flag.
12228 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12229 pending.
12230 (linux_continue_one_thread): Only preserve the stepping flag if
12231 there's a pending breakpoint.
12232
0a59d50b
PA
122332009-03-31 Pedro Alves <pedro@codesourcery.com>
12234
12235 * server.c (main): After the inferior having exited, call
12236 remote_close before exiting gdbserver.
12237
f04c6d38
TJB
122382009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12239
12240 Fix size of FPSCR in Power 7 processors.
12241 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12242 (PPC_FEATURE_HAS_DFP): New #define.
12243 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12244 size of the FPSCR.
12245
78e5cee6
PA
122462009-03-23 Pedro Alves <pedro@codesourcery.com>
12247
12248 * server.c (handle_query) Whitespace and formatting.
12249
1b3f6016
PA
122502009-03-22 Pedro Alves <pedro@codesourcery.com>
12251
12252 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12253 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12254 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12255 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12256 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12257 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12258 Makefile.in, configure.ac: Fix whitespace throughout.
12259 * configure: Regenerate.
12260
a07b2135
PA
122612009-03-22 Pedro Alves <pedro@codesourcery.com>
12262
12263 * inferiors.c (find_inferior): Make it safe for the callback
12264 function to delete the currently iterated inferior.
12265
67cc2626
PA
122662009-03-22 Pedro Alves <pedro@codesourcery.com>
12267
12268 * Makefile.in (linuw_low_h): Move higher.
12269 (thread-db.o): Depend on $(linux_low_h).
12270
54a0b537
PA
122712009-03-17 Pedro Alves <pedro@codesourcery.com>
12272
12273 Rename "process" to "lwp" throughout.
12274
12275 * linux-low.c (all_processes): Rename to...
12276 (all_lwps): ... this.
12277 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12278 (add_process): Rename to ...
12279 (add_lwp): ... this. Adjust.
12280 (linux_create_inferior): Adjust.
12281 (linux_attach_lwp): Adjust.
12282 (linux_attach): Adjust.
12283 (linux_kill_one_process): Rename to ...
12284 (linux_kill_one_lwp): ... this. Adjust.
12285 (linux_kill): Adjust.
12286 (linux_detach_one_process): Rename to ...
12287 (linux_detach_one_lwp): ... this. Adjust.
12288 (linux_detach): Adjust.
12289 (check_removed_breakpoint): Adjust.
12290 (status_pending_p): Adjust.
12291 (linux_wait_for_process): Rename to ...
12292 (linux_wait_for_lwp): ... this. Adjust.
12293 (linux_wait_for_event): Adjust.
12294 (send_sigstop): Adjust.
12295 (wait_for_sigstop): Adjust.
12296 (stop_all_processes): Rename to ...
12297 (stop_all_lwps): ... this.
12298 (linux_resume_one_process): Rename to ...
12299 (linux_resume_one_lwp): ... this. Adjust.
12300 (linux_set_resume_request, linux_continue_one_thread)
12301 (linux_queue_one_thread, resume_status_pending_p)
12302 (usr_store_inferior_registers, regsets_store_inferior_registers)
12303 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12304 Adjust.
12305 * linux-low.h (get_process): Rename to ...
12306 (get_lwp): ... this. Adjust.
12307 (get_thread_process): Rename to ...
12308 (get_thread_lwp): ... this. Adjust.
12309 (get_process_thread): Rename to ...
12310 (get_lwp_thread): ... this. Adjust.
12311 (struct process_info): Rename to ...
12312 (struct lwp_info): ... this.
12313 (all_processes): Rename to ...
12314 (all_lwps): ... this.
12315 * proc-service.c (ps_lgetregs): Adjust.
12316 * thread-db.c (thread_db_create_event, find_one_thread)
12317 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12318
0b16c5cf
PA
123192009-03-14 Pedro Alves <pedro@codesourcery.com>
12320
12321 * server.c (handle_query): Handle "qAttached".
12322
32de4b9d
NS
123232009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12324
12325 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12326 GPLv3, update license URL.
12327
2aecd87f
DE
123282009-03-01 Doug Evans <dje@google.com>
12329
93efd302 12330 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12331 (server_h): Add gdb_signals.h.
12332 (signals.o): Update.
12333 * server.h (target_signal_from_host,target_signal_to_host_p)
12334 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12335
86b1f9c5
PM
123362009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12337
12338 * remote-utils.c (getpkt): Also generate remote-debug
12339 information if noack_mode is set.
12340
4aa995e1
PA
123412009-02-06 Pedro Alves <pedro@codesourcery.com>
12342
12343 * server.c (handle_query): Report qXfer:siginfo:read and
12344 qXfer:siginfo:write as supported and handle them.
12345 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12346 * linux-low.c (linux_xfer_siginfo): New.
12347 (linux_target_ops): Set it.
12348
62709adf
PA
123492009-01-26 Pedro Alves <pedro@codesourcery.com>
12350
12351 * server.c (gdbserver_usage): Mention --remote-debug.
12352 (main): Accept '--remote-debug' switch.
12353
aef93bd7
DE
123542009-01-18 Doug Evans <dje@google.com>
12355
12356 * regcache.c (new_register_cache): No need to check result of xcalloc.
12357 * server.c (handle_search_memory): Back out calls to xmalloc,
12358 result is checked and error is returned to user upon failure.
12359 (handle_query): Ditto. Add more checks for result of malloc.
12360 (handle_v_cont): Check result of malloc, report error back to
12361 user upon failure.
12362 (handle_v_run): Ditto. Call freeargv.
12363 * server.h (freeargv): Declare.
12364 * utils.c (freeargv): New fn.
12365
54363045
DE
123662009-01-15 Doug Evans <dje@google.com>
12367
f626972c
DE
12368 * gdbreplay.c (perror_with_name): Make arg const char *.
12369 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12370 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12371 * utils.c (perror_with_name): Make arg const char *.
54363045 12372
18aae699
PA
123732009-01-14 Pedro Alves <pedro@codesourcery.com>
12374
12375 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12376 when handling a EXIT_PROCESS_DEBUG_EVENT.
12377
ff703abe
JB
123782009-01-06 Joel Brobecker <brobecker@adacore.com>
12379
12380 * gdbreplay.c (gdbreplay_version): Update copyright year.
12381 * server.c (gdbserver_version): Likewise.
12382
f21cc1a2 123832009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12384
12385 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12386 (handle_extended_wait): Improve comment.
0e21c1ec 12387
bca929d3
DE
123882008-12-13 Doug Evans <dje@google.com>
12389
12390 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12391 * server.h (ATTR_MALLOC): New macro.
12392 (xmalloc,xcalloc,xstrdup): Declare.
12393 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12394 * inferiors.c: Ditto.
12395 * linux-low.c: Ditto.
12396 * mem-break.c: Ditto.
12397 * regcache.c: Ditto.
12398 * remote-utils.c: Ditto.
12399 * server.c: Ditto.
12400 * target.c: Ditto.
12401 * win32-low.c: Ditto.
12402
97438e3f
DE
124032008-12-12 Doug Evans <dje@google.com>
12404
896c7fbb
DE
12405 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12406 in debugging printf.
12407
97438e3f
DE
12408 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12409
e3b886f8
DE
124102008-12-09 Doug Evans <dje@google.com>
12411
12412 * linux-low.h (struct process_info): Delete member tid, unused.
12413 * thread-db.c (find_one_thread): Update.
12414 (maybe_attach_thread): Update.
12415
07e059b5
VP
124162008-12-02 Pedro Alves <pedro@codesourcery.com>
12417
889bf7c5
PA
12418 * target.h (struct target_ops): Add qxfer_osdata member.
12419 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12420 and dirent.h.
12421 (linux_qxfer_osdata): New functions.
12422 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12423 callback.
12424 * server.c (handle_query): Handle "qXfer:osdata:read:".
12425 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12426 (buffer_xml_printf): New functions.
12427 * server.h (struct buffer): New.
12428 (buffer_grow_str, buffer_grow_str0): New macros.
12429 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12430 (buffer_xml_printf): Declare.
07e059b5 12431
4cab47ab
DE
124322008-11-24 Doug Evans <dje@google.com>
12433
12434 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12435
f142445f
DJ
124362008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12437
12438 * server.c (handle_v_run): Always use the supplied argument list.
12439
d0107bb6 124402008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12441
d0107bb6
BW
12442 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12443 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12444
2c4ad781
TJB
124452008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12446
12447 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12448 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12449 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12450 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12451 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12452 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12453 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12454 XML target descriptions.
12455 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12456 when inferior is running on an ISA 2.05 or later processor. Add
12457 special case to return offset for full 64-bit slot of FPSCR when
12458 in 32-bits.
12459
dfb64f85
DJ
124602008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12461
12462 * Makefile.in (SFILES, clean): Added sparc64 files.
12463 (reg-sparc64.o, reg-sparc64.c): New.
12464 * configure.srv (sparc*-*-linux*): New configuration.
12465 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12466 syscall arguments for SPARC.
12467 (regsets_store_inferior_registers): Likewise.
12468 * linux-sparc-low.c: New file.
12469
66b6e1dd
DE
124702008-10-21 Doug Evans <dje@google.com>
12471
12472 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12473 (READLINE_DIR,READLINE_DEP): Delete.
12474 (INTERNAL_CFLAGS): Update.
12475 (LINTFLAGS): Update.
12476
9b710a42
PA
124772008-10-10 Pedro Alves <pedro@codesourcery.com>
12478
12479 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12480 whole argv from the last run, not just argv[0].
12481
5822d809
PA
124822008-09-08 Pedro Alves <pedro@codesourcery.com>
12483
12484 * regcache.c (new_register_cache): Return NULL if the register
12485 cache size isn't known yet.
12486 (free_register_cache): Avoid dereferencing a NULL regcache.
12487
74aac56f
DJ
124882008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12489
12490 * configure.srv: Merge MIPS and MIPS64.
12491
400b20f5
MR
124922008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12493
12494 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12495
677c5bb1
LM
124962008-08-18 Luis Machado <luisgpm@br.ibm.com>
12497
12498 * Makefile.in: Add required vsx dependencies.
12499
12500 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12501 Declare init_registers_powerpc_vsx32l.
12502 Declare init_registers_powerpc_vsx64l.
12503 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12504 (ppc_arch_setup): Check for VSX in hwcap.
12505 (ppc_fill_vsxregset): New function.
12506 (ppc_store_vsxregset): New function.
12507 Add new VSX entry in regset_info target_regsets.
12508
12509 * configure.srv: Add new VSX dependencies.
12510
a6f3e723
SL
125112008-08-12 Pedro Alves <pedro@codesourcery.com>
12512
12513 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12514 (remote_open): Set or clear transport_is_reliable.
12515 (putpkt_binary): Don't expect acks in noack mode.
12516 (getpkt): Don't send ack/nac in noack mode.
12517 * server.c (handle_general_set): Handle QStartNoAckMode.
12518 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12519 qSupported.
12520 (main): Reset noack_mode on every connection.
12521 * server.h (noack_mode): Declare.
12522
a417dc56
RW
125232008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12524
12525 * Makefile.in (GDBREPLAY_OBS): New variable.
12526 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12527
3221518c
UW
125282008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12529 Daniel Jacobowitz <dan@codesourcery.com>
12530
12531 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12532 (usr_store_inferior_registers): Likewise.
12533 (regsets_store_inferior_registers): Likewise.
12534
ec56be1b
PA
125352008-07-31 Rolf Jansen <rj@surtec.com>
12536 Pedro Alves <pedro@codesourcery.com>
12537
12538 * configure.ac: Check for memmem declaration.
12539 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12540 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12541 (disable_packet_qfThreadInfo): Unconditionally compile.
12542 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12543 * configure, config.in: Regenerate.
12544
2fe5e3ff
DE
125452008-07-28 Doug Kwan <dougkwan@google.com>
12546
12547 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12548 (linux_write_memory): Remove declaration of errno.
12549
836acd6d
UW
125502008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12551
12552 * linux-low.c (handle_extended_wait): Do not use "status"
12553 variable uninitialized.
12554
aeba519e
PA
125552008-07-07 Pedro Alves <pedro@codesourcery.com>
12556
12557 * server.c (handle_v_attach): Inhibit reporting dll changes.
12558
db42f210
PA
125592008-06-27 Pedro Alves <pedro@codesourcery.com>
12560
12561 * remote-utils.c (prepare_resume_reply): If requested, don't
12562 output "thread:TID" in the T stop reply.
12563
12564 * server.c (disable_packet_vCont, disable_packet_Tthread)
12565 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12566 (handle_query): If requested, disable support for qC, qfThreadInfo
12567 and qsThreadInfo.
12568 (handle_v_requests): If requested, disable support for vCont.
12569 (gdbserver_show_disableable): New.
12570 (main): Handle --disable-packet and --disable-packet=LIST.
12571
12572 * server.h (disable_packet_vCont, disable_packet_Tthread)
12573 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12574
8e4c5421
CD
125752008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12576
12577 * server.c (gdbserver_usage): Mention --version.
12578
6e23a804
DJ
125792008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12580
12581 * Makefile.in (gdbreplay.o): New rule.
12582
90aa6a40
JM
125832008-06-06 Joseph Myers <joseph@codesourcery.com>
12584
12585 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12586 message, not gdbserver.
12587
c16158bc 125882008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12589 Nathan Sidwell <nathan@codesourcery.com>
12590 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12591
12592 * acinclude.m4: Include ../../config/acx.m4.
12593 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12594 * configure, config.in: Regenerate.
12595 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12596 * server.c (gdbserver_version): Print PKGVERSION.
12597 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12598 (main): Adjust gdbserver_usage calls.
12599 * gdbreplay.c (version, host_name): Add declarations.
12600 (gdbreplay_version, gdbreplay_usage): New.
12601 (main): Accept --version and --help options.
12602
aeb75bf5
DJ
126032008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12604
12605 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12606 (arm_breakpoint_at): Handle Thumb.
12607 (the_low_target): Add comment.
12608
76b233dd
UW
126092008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12610
12611 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12612
08388c79
DE
126132008-05-09 Doug Evans <dje@google.com>
12614
a3c83fae
DE
12615 * server.h (decode_search_memory_packet): Declare.
12616 * remote-utils.c (decode_search_memory_packet): New fn.
12617 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12618 (handle_search_memory): New fn.
12619 (handle_query): Process qSearch:memory packets.
12620
bb9c3d36
UW
126212008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12622
12623 * regcache.c (registers_length): Remove.
12624 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12625 full register packet.
12626 * regcache.h (registers_length): Remove prototype.
12627 * server.h (PBUFSIZ): Define to 16384.
12628
7284e1be
UW
126292008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12630
12631 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12632 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12633 powerpc-64l.o, and powerpc-altivec64l.o.
12634 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12635 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12636 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12637 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12638 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12639 to srv_xmlfiles.
12640
12641 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12642 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12643 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12644 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12645 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12646 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12647 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12648 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12649 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12650 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12651 (clean): Update.
12652
12653 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12654 (init_registers_powerpc_32l): ... this new prototype.
12655 (init_registers_powerpc_32): Remove, replace by ...
12656 (init_registers_powerpc_altivec32l): ... this new prototype.
12657 (init_registers_powerpc_e500): Remove, replace by ...
12658 (init_registers_powerpc_e500l): ... this new prototype.
12659 (init_registers_ppc64): Remove, replace by ...
12660 (init_registers_powerpc_64l): ... this new prototype.
12661 (init_registers_powerpc_64): Remove, replace by ...
12662 (init_registers_powerpc_altivec64l): ... this new prototype.
12663 (ppc_num_regs): Set to 73.
12664 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12665 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12666 (ppc_cannot_store_register): Handle orig_r3 and trap.
12667 (ppc_arch_setup): Update init_registers_... calls.
12668 (ppc_fill_gregset): Handle orig_r3 and trap.
12669
12670 * inferiors.c (clear_inferiors): Reset current_inferior.
12671
fdc59709
PB
126722008-04-23 Paolo Bonzini <bonzini@gnu.org>
12673
889bf7c5
PA
12674 * acinclude.m4: Add override.m4.
12675 * configure: Regenerate.
fdc59709 12676
c9b2f845
UW
126772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12678
12679 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12680 initial call to init_register_ppc64.
12681
550512b8
UW
126822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12683
43aaf8b6
PA
12684 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12685 single powerpc*-*-linux* case.
550512b8
UW
12686 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12687
b6430ec3
UW
126882008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12689
12690 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12691 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12692 from reg_xmlfiles.
12693 * linux-ppc-low.c: Include <elf.h>.
12694 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12695 (ppc_hwcap): New global variable.
12696 (ppc_regmap): Remove __SPE__ #ifdef sections.
12697 (ppc_regmap_e500): New global variable.
12698 (ppc_cannot_store_register): Update __SPE__ special case.
12699 (ppc_get_hwcap): New function.
12700 (ppc_arch_setup): Use it to determine whether inferior supports
12701 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12702 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12703 Do not access registers if target does not support AltiVec.
12704 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12705 Do not access registers if target does not support SPE.
12706 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12707
52fa2412
UW
127082008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12709
12710 * linux-low.c (disabled_regsets, num_regsets): New.
12711 (use_regsets_p): Delete.
12712 (linux_wait_for_process): Clear disabled_regsets.
12713 (regsets_fetch_inferior_registers): Check and set it.
12714 (regsets_store_inferior_registers): Likewise.
12715 (linux_fetch_registers, linux_store_registers): Do not use
12716 use_regsets_p.
12717 (initialize_low): Allocate disabled_regsets.
12718
e28b3332
DJ
127192008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12720
12721 * Makefile.in (LIBOBJS): New.
12722 (OBS): Use LIBOBJS.
12723 (memmem.o): New rule.
12724 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12725 * configure: Regenerated.
12726
4536995d
UW
127272008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12728
12729 * server.c (handle_query): Never return "unsupported" for
12730 qXfer:features:read queries.
12731
221c031f
UW
127322008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12733
12734 * server.c (get_features_xml): Fix inverted condition.
12735 (handle_query): Always support qXfer:feature:read.
12736
ccd213ac
DJ
127372008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12738
12739 * server.c (wrapper_argv): New.
12740 (start_inferior): Handle wrapper_argv. If set, expect an extra
12741 trap.
12742 (gdbserver_usage): Document --wrapper.
12743 (main): Parse --wrapper.
12744
6fe305f7
UW
127452008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12746
12747 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12748 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12749 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12750 (ppc_set_pc): Likewise.
12751 (ppc_arch_setup): New function.
12752 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12753 of collect_register.
889bf7c5 12754 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12755
5b0a002e
UW
127562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12757
12758 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12759 instead of linux-ppc64-low.o.
12760 * linux-ppc64-low.c: Remove file.
12761 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12762 (linux-ppc64-low.o): Remove rule.
12763
12764 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12765 (init_registers_powerpc_64): Likewise.
12766 (ppc_regmap): Conditionally define depending on __powerpc64__.
12767 (ppc_cannot_store_register): Do not special-case "fpscr" when
12768 compiled on __powerpc64__.
12769 (ppc_collect_ptrace_register): New function.
12770 (ppc_supply_ptrace_register): New function.
12771 (ppc_breakpoint): Change type to "unsigned int".
12772 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12773 (the_low_target): Conditionally provide initializers for the
889bf7c5 12774 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12775 collect_ptrace_register and supply_ptrace_register members.
12776
9b4b61c8
UW
127772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12778
12779 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12780 * server.c (gdbserver_xmltarget): Define.
12781 (get_features_xml): Use it to replace "target.xml" and arch_string.
12782
12783 * configure.srv: Remove srv_xmltarget. Add XML files that were
12784 mentioned there to srv_xmlfiles instead. Remove conditional tests
12785 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12786 srv_xmlfiles and srv_regobj to include all possible choices.
12787 * configure.ac (srv_xmltarget): Remove.
12788 (srv_xmlfiles): Do not add "target.xml".
12789 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12790 checks for supplementary target information.
12791 * configure: Regenerate.
12792 * Makefile.in (XML_TARGET): Remove.
12793 (target.xml): Remove rule.
12794 (clean): Do not clean up target.xml.
12795 (.PRECIOUS): Do not mention target.xml.
12796
12797 * target.h (struct target_ops): Remove arch_string member.
12798 * linux-low.c (linux_arch_string): Remove.
12799 (linux_target_ops): Remove arch_string initializer.
12800 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12801 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12802 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12803 * spu-low.c (spu_arch_string): Remove.
12804 (spu_target_ops): Remove arch_string initializer.
12805 * win32-low.c (win32_arch_string): Remove.
12806 (win32_target_ops): Remove arch_string initializer.
12807 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12808 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12809 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12810
ee1a7ae4
UW
128112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12812
12813 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12814 by collect_ptrace_register and supply_ptrace_register hooks.
12815 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12816 instead of checking for the_low_target.left_pad_xfer.
12817 (usr_store_inferior_registers): Use collect_ptrace_register callback
12818 instead of checking for the_low_target.left_pad_xfer.
12819
12820 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12821 (s390_supply_ptrace_register): Likewise.
12822 (s390_fill_gregset): Call s390_collect_ptrace_register.
12823 (the_low_target): Update.
12824
12825 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12826 (ppc_supply_ptrace_register): Likewise.
12827 (the_low_target): Update.
12828
12829 * linux-i386-low.c (the_low_target): Update.
12830 * linux-x86-64-low.c (the_low_target): Update.
12831
d61ddec4
UW
128322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12833
12834 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12835 reg-s390.o and reg-s390x.o.
12836
12837 * linux-low.c (new_inferior): New global variable.
12838 (linux_create_inferior, linux_attach): Set it.
12839 (linux_wait_for_process): Call the_low_target.arch_setup after the
12840 target has stopped for the first time.
12841 (initialize_low): Do not call the_low_target.arch_setup.
12842
12843 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12844 (s390_set_pc): Likewise.
12845 (s390_arch_setup): New function.
12846 (the_low_target): Use s390_arch_setup as arch_setup routine.
12847
12848 * regcache.c (realloc_register_cache): New function.
12849 (set_register_cache): Call it for each existing regcache.
12850
d05b4ac3
UW
128512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12852
12853 * server.h (init_registers): Remove prototype.
12854
12855 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12856 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12857 instead of init_registers ().
12858 * linux-arm-low.c (init_registers_arm): Add prototype.
12859 (init_registers_arm_with_iwmmxt): Likewise.
12860 (the_low_target): Add initializer for arch_setup field.
12861 * linux-cris-low.c (init_registers_cris): Add prototype.
12862 (the_low_target): Add initializer for arch_setup field.
12863 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12864 (the_low_target): Add initializer for arch_setup field.
12865 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12866 (the_low_target): Add initializer for arch_setup field.
12867 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12868 (the_low_target): Add initializer for arch_setup field.
12869 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12870 (the_low_target): Add initializer for arch_setup field.
12871 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12872 (the_low_target): Add initializer for arch_setup field.
12873 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12874 (init_registers_mips64_linux): Likewise.
12875 (the_low_target): Add initializer for arch_setup field.
12876 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12877 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12878 (the_low_target): Add initializer for arch_setup field.
12879 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12880 (init_registers_powerpc_64): Likewise.
12881 (the_low_target): Add initializer for arch_setup field.
12882 * linux-s390-low.c (init_registers_s390): Add prototype.
12883 (init_registers_s390x): Likewise.
12884 (the_low_target): Add initializer for arch_setup field.
12885 * linux-sh-low.c (init_registers_sh): Add prototype.
12886 (the_low_target): Add initializer for arch_setup field.
12887 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12888 (the_low_target): Add initializer for arch_setup field.
12889 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12890 (the_low_target): Add initializer for arch_setup field.
12891
12892 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12893 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12894 instead of init_registers ().
12895 * win32-arm-low.c (init_registers_arm): Add prototype.
12896 (the_low_target): Add initializer for arch_setup field.
12897 * win32-i386-low.c (init_registers_i386): Add prototype.
12898 (the_low_target): Add initializer for arch_setup field.
12899
12900 * spu-low.c (init_registers_spu): Add prototype.
12901 (initialize_low): Call initialie_registers_spu () instead of
12902 initialize_registers ().
12903
fd96d250
PA
129042008-02-19 Pedro Alves <pedro@codesourcery.com>
12905
12906 * server.c (handle_v_requests): When handling the vRun and vAttach
12907 packets, if already debugging a process, don't kill it. Return an
12908 error instead.
12909
d41b6bb4
DJ
129102008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12911
12912 * server.c (handle_query): Correct length check.
12913
5ac588cf
PA
129142008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12915
12916 * win32-low.c (do_initial_child_stuff): Add process handle
12917 parameter. Set current_process_handle and current_process_id from the
12918 parameters. Clear globals.
12919 (win32_create_inferior): Don't set current_process_handle and
12920 current_process_id here. Instead pass them on the call to
12921 do_initial_child_stuff.
12922 (win32_attach): Likewise.
12923 (win32_clear_inferiors): New.
12924 (win32_kill): Don't close the current process handle or the
12925 current thread handle here. Instead call win32_clear_inferiors.
12926 (win32_detach): Don't open a new handle to the process. Call
12927 win32_clear_inferiors.
12928 (win32_join): Don't rely on current_process_handle; open a new
12929 handle using the process id.
12930 (win32_wait): Call win32_clear_inferiors when the inferior process
12931 has exited.
12932
ecd7ecbc
DJ
129332008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * server.c (monitor_show_help): Add "exit".
12936
1525d545
MG
129372008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12938
ecd7ecbc 12939 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12940 (clean): Add reg-xtensa.c.
12941 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12942 * configure.srv (xtensa*-*-linux*) New target.
12943 * linux-xtensa-low.c: New.
12944 * xtensa-xtregs.c: New.
1525d545 12945
59a016f0
PA
129462008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12947
12948 * hostio.c: Don't include errno.h.
12949 (errno_to_fileio_errno): Move to hostio-errno.
12950 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12951 error number outputting to the target->hostio_last_error callback.
12952 (hostio_packet_error): Use FILEIO_EINVAL directly.
12953 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12954 calls to hostio_error.
12955 * hostio-errno.c: New.
12956 * server.h (hostio_last_error_from_errno): Declare.
12957 * target.h (target_ops): Add hostio_last_error member.
12958 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12959 as hostio_last_error handler.
889bf7c5 12960 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12961 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12962 (wince_hostio_last_error): New functions.
12963 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12964 as hostio_last_error handler.
12965 (win32_target_ops) [!_WIN32_WCE]: Register
12966 hostio_last_error_from_errno as hostio_last_error handler.
12967 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12968 (hostio-errno.o): New rule.
12969 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12970 * configure.srv (srv_hostio_err_objs): New variable. Default to
12971 hostio-errno.o.
12972 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12973 * configure: Regenerate.
12974
2d717e4f
DJ
129752008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12976
12977 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12978 (linux_kill, linux_detach): Clean up the process list.
12979 * remote-utils.c (remote_open): Improve port number parsing.
12980 (putpkt_binary, input_interrupt): Only send interrupts if the target
12981 is running.
12982 * server.c (extended_protocol): Make static.
12983 (attached): Define earlier.
12984 (exit_requested, response_needed, program_argv): New variables.
12985 (target_running): New.
12986 (start_inferior): Clear attached here.
12987 (attach_inferior): Set attached here.
12988 (require_running): Define.
12989 (handle_query): Use require_running and target_running. Implement
12990 "monitor exit".
12991 (handle_v_attach, handle_v_run): New.
12992 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12993 (gdbserver_usage): Update.
12994 (main): Redo argument parsing. Handle --debug and --multi. Handle
12995 --attach along with other options or after the port. Save
12996 program_argv. Support no initial program. Resynchronize
12997 communication with GDB after an error. Handle "monitor exit".
12998 Use require_running and target_running. Always allow the extended
12999 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13000 restart in extended mode.
13001 * README: Refer to the GDB manual. Update --attach usage.
13002
7407e2de
AS
130032007-12-20 Andreas Schwab <schwab@suse.de>
13004
13005 * linux-low.c (STACK_SIZE): Define.
13006 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13007 (linux_test_for_tracefork): Likewise.
13008
b65d95c5
DJ
130092007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13010
13011 * linux-low.c (linux_wait_for_event): Update messages. Do not
13012 reinsert auto-delete breakpoints.
13013 * mem-break.c (struct breakpoint): Change return type of handler to
13014 int.
13015 (set_breakpoint_at): Update handler type.
13016 (reinsert_breakpoint_handler): Return 1 instead of calling
13017 delete_breakpoint.
13018 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13019 setting a new one.
13020 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13021 * mem-break.h (set_breakpoint_at): Update handler type.
13022 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13023 * win32-low.c (auto_delete_breakpoint): New.
13024 (get_child_debug_event): Use it.
13025
4e799345
DJ
130262007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13027
13028 * configure.ac: Check for pread and pwrite.
13029 * hostio.c (handle_pread): Fall back to lseek and read.
13030 (handle_pwrite): Fall back to lseek and write.
13031 * config.in, configure: Regenerated.
13032
27524b67
DJ
130332007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13034
13035 * server.c (myresume): Add own_buf argument.
13036 (main): Update calls.
13037
a20d5e98
DJ
130382007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13039
13040 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13041 * remote-utils.c (remote_open): Do not call disable_async_io.
13042 (block_async_io): Delete.
13043 (unblock_async_io): Make static.
13044 (initialize_async_io): New.
13045 * server.c (handle_v_cont): Handle async I/O here.
13046 (myresume): Likewise. Move other common resume tasks here...
13047 (main): ... from here. Call initialize_async_io. Disable async
13048 I/O before the main loop.
13049 * server.h (initialize_async_io): Declare.
13050 (block_async_io, unblock_async_io): Delete prototypes.
13051 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13052
b79d787e
DJ
130532007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13054
13055 * remote-utils.c (readchar): Allow binary data in received messages.
13056
d97903b2
PA
130572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13058
13059 * win32-low.c (attaching): New global.
13060 (win32_create_inferior): Clear the `attaching' global.
13061 (win32_attach): Set the `attaching' global.
13062 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13063 attaching. Only set a breakpoint at the entry point if not
13064 attaching.
13065
311de423
PA
130662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13067
13068 * server.c (main): Don't report dll events on the initial
13069 connection on attaches.
13070
6c2d16d2
PA
130712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13072
13073 * server.c (main): Relax numerical bases supported for the pid of
13074 the --attach command line argument.
13075
5ca906e6
PA
130762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13077
13078 * win32-low.c (win32_attach): Call OpenProcess before
13079 DebugActiveProcess, not after. Add last error output to error
13080 call.
13081
9c6c8194
PA
130822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13083
13084 * win32-low.c (win32_get_thread_context)
13085 (win32_set_thread_context): New functions.
13086 (thread_rec): Use win32_get_thread_context.
13087 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13088 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13089 field.
13090
4d5d1aaa
PA
130912007-12-03 Leo Zayas
13092 Pedro Alves <pedro_alves@portugalmail.pt>
13093
13094 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13095 global variables.
13096 (child_add_thread): Minor cleanup.
13097 (child_continue): Resume artificially suspended threads before
13098 calling ContinueDebugEvent.
13099 (suspend_one_thread): New.
13100 (fake_breakpoint_event): New.
13101 (get_child_debug_event): Change return type to int. Check here if
13102 gdb sent an interrupt request. If a soft interrupt was requested,
13103 fake a breakpoint event. Return 0 if there is no event to handle,
13104 and 1 otherwise.
13105 (win32_wait): Don't check here if gdb sent an interrupt request.
13106 Ensure there is a valid event to handle.
13107 (win32_request_interrupt): Add soft interruption method as last
13108 resort.
13109
c436e841
PA
131102007-12-03 Leo Zayas
13111 Pedro Alves <pedro_alves@portugalmail.pt>
13112
13113 * win32-low.h (win32_thread_info): Add descriptions to the
13114 structure members. Replace `suspend_count' counter by a
13115 `suspended' flag.
13116 * win32-low.c (thread_rec): Update condition of when to get the
13117 context from the inferior. Rely on ContextFlags being set if it
13118 has already been retrieved. Only suspend the inferior thread if
13119 we haven't already. Warn if that fails.
13120 (continue_one_thread): s/suspend_count/suspended/. Only call
13121 ResumeThread once. Warn if that fails.
13122
e7b5fa67
PA
131232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13124
13125 * win32-low.c (win32_wait): Don't read from the inferior when it
13126 has already exited.
13127
a385171d
PA
131282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13129
13130 * Makefile.in (win32_low_h): New variable.
13131 (win32-low.o): Add dependency on $(win32_low_h).
13132 (win32-arm-low.o, win32-i386-low.o): New rules.
13133
f80c84b3
DJ
131342007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13135
13136 * hostio.c: Correct copyright year.
13137
a6b151f1
DJ
131382007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13139
13140 * Makefile.in (OBS): Add hostio.o.
13141 (hostio.o): New rule.
13142 * server.h (handle_vFile): Declare.
13143 * hostio.c: New file.
13144 * server.c (handle_v_requests): Take packet_len and new_packet_len
13145 for binary packets. Call handle_vFile.
13146 (main): Update call to handle_v_requests.
13147
f9387fc3
DJ
131482007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13149
13150 * linux-low.c: Include <sched.h>.
13151
51c2684e
DJ
131522007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * linux-low.c (linux_tracefork_grandchild): New.
13155 (linux_tracefork_child): Use clone.
13156 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13157
75f83163
JB
131582007-10-31 Joel Brobecker <brobecker@adacore.com>
13159
13160 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13161
da5898ce
DJ
131622007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13163
13164 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13165
24a09b5f
DJ
131662007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13167
13168 * inferiors.c (change_inferior_id): Delete.
13169 (add_pid_to_list, pull_pid_from_list): New.
13170 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13171 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13172 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13173 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13174 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13175 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13176 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13177 (using_threads): Always set to 1.
13178 (handle_extended_wait): New.
13179 (add_process): Do not set TID.
13180 (linux_create_inferior): Set must_set_ptrace_flags.
13181 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13182 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13183 (linux_thread_alive): Rename TID argument to LWPID.
13184 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13185 (linux_wait_for_event): Do not use TID or check using_threads. Update
13186 call to dead_thread_notify. Call handle_extended_wait.
13187 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13188 (send_sigstop): Delete sigstop_sent.
13189 (wait_for_sigstop): Avoid TID.
13190 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13191 (linux_test_for_tracefork): New.
13192 (linux_lookup_signals): Use thread_db_active and
13193 linux_supports_tracefork_flag.
13194 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13195 * linux-low.h (get_process_thread): Avoid TID.
13196 (struct process_ifo): Move thread_known and tid to the end. Remove
13197 sigstop_sent.
13198 (linux_attach_lwp, thread_db_init): Update prototypes.
13199 * server.h (change_inferior_id): Delete prototype.
13200 (add_pid_to_list, pull_pid_from_list): New prototypes.
13201 * thread-db.c (thread_db_use_events): New.
13202 (find_first_thread): Rename to...
13203 (find_one_thread): ...this. Update callers and messages. Do not
13204 call fatal. Check thread_db_use_events. Do not call
13205 change_inferior_id or new_thread_notify.
13206 (maybe_attach_thread): Update. Do not call new_thread_notify.
13207 (thread_db_init): Set thread_db_use_events. Check use_events.
13208 * utils.c (fatal, warning): Correct message prefix.
13209
30ed0a8f
DJ
132102007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13211
13212 * Makefile.in (clean): Remove new files.
13213 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13214 (powerpc-64.o, powerpc-64.c): New rules.
13215 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13216 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13217 with SPE.
13218 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13219 SPE targets.
13220 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13221 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13222 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13223 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13224 (target_regsets): Add AltiVec and SPE register sets.
13225 * configure.ac: Check for AltiVec and SPE.
13226 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13227 (ppc_fill_vrregset, ppc_store_vrregset): New.
13228 (target_regsets): Add AltiVec register set.
13229 * configure: Regenerated.
13230
fd462a61
DJ
132312007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * linux-low.c (O_LARGEFILE): Define.
13234 (linux_read_memory): Use /proc/PID/mem.
13235 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13236 * configure, config.in: Regenerated.
13237
69f223ed
DJ
132382007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * linux-low.c (linux_wait_for_event): Do not pass signals while
13241 single-stepping.
13242
aec18585
PA
132432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13244
13245 * win32-low.c (create_process): New.
13246 (win32_create_inferior): Use create_process instead of
13247 CreateProcess. If create_process failed retry appending an ".exe"
13248 suffix. Store the GetLastError result immediatelly after
13249 create_process calls and use it on the call to error.
13250
34d86ddd
PA
132512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13252
13253 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13254
5a0e3bd0
JB
132552007-08-23 Joel Brobecker <brobecker@adacore.com>
13256
13257 * configure.ac: Switch license to GPLv3.
13258
f88c79e6
MS
132592007-08-01 Michael Snyder <msnyder@access-company.com>
13260
13261 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13262
6b3d9b83
PA
132632007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13264
13265 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13266 typedef.
13267 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13268 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13269 CloseToolhelp32Snapshot.
13270 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13271 CloseToolhelp32Snapshot.
13272
c588c53c
MS
132732007-07-27 Michael Snyder <michael.snyder@access-company.com>
13274
13275 * server.c (main): Check for inferior exit before main loop.
13276
aa0403d9
PA
132772007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13278
13279 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13280 instead of on tmp_desc.
13281
255e7678
DJ
132822007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13283 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13286 (add_thread): Minor cleanups.
13287 (clear_inferiors): Move lower in the file. Clear the DLL
13288 list.
13289 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13290 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13291 (xml_escape_text): New.
13292 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13293 for qSupported.
13294 (handle_v_cont): Report errors.
13295 (gdbserver_version): Update.
13296 (main): Correct size of own_buf. Do not report initial DLL events.
13297 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13298 (unloaded_dll, xml_escape_text): New.
13299 * win32-low.c (enum target_waitkind): Update comments.
13300 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13301 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13302 (win32_EnumProcessModules, win32_GetModuleInformation)
13303 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13304 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13305 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13306 (win32_Module32First, win32_Module32Next, load_toolhelp)
13307 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13308 (get_child_debug_event): Handle DLL events.
13309 (win32_wait): Likewise.
13310
0d37add9
DJ
133112007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13314 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13315
45e2715e
PA
133162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13317
13318 * win32-low.c (handle_output_debug_string): Ignore event if not
13319 waiting.
13320
c5674cf1
PA
133212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13322
13323 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13324
2bbe3cc1
DJ
133252007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13328
ae13219e
DJ
133292007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13330
13331 * inferiors.c (change_inferior_id): Add comment.
13332 * linux-low.c (check_removed_breakpoint): Add an early
13333 prototype. Improve debug output.
13334 (linux_attach): Doc update.
13335 (linux_detach_one_process, linux_detach): Clean up before releasing
13336 each process.
13337 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13338 * linux-low.h (struct process_info): Doc improvement.
13339 * mem-break.c (delete_all_breakpoints): New.
13340 * mem-break.h (delete_all_breakpoints): New prototype.
13341 * thread-db.c (find_first_thread): New.
13342 (thread_db_create_event): Call it instead of
13343 thread_db_find_new_threads. Clean up unused variables.
13344 (maybe_attach_thread): Remove first thread handling.
13345 (thread_db_find_new_threads): Use find_first_thread.
13346 (thread_db_get_tls_address): Likewise.
13347
4105de34
DJ
133482007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13349
13350 * thread-db.c (thread_db_find_new_threads): Add prototype.
13351 (thread_db_create_event): Check for the main thread before adding
13352 a new thread.
13353 (maybe_attach_thread): Only enable event reporting if TID == 0.
13354 (thread_db_get_tls_address): Check for new threads.
13355
2b876972
DJ
133562007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * linux-low.c (linux_create_inferior): Try execv before execvp.
13359 * spu-low.c (spu_create_inferior): Likewise.
13360
7a245884
DJ
133612007-06-13 Mike Frysinger <vapier@gentoo.org>
13362
13363 * linux-low.c (linux_create_inferior): Change execv to execvp.
13364 * spu-low.c (spu_create_inferior): Likewies.
13365
117ce543
DJ
133662007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13367
13368 * Makefile.in (clean): Clean new files instead of deleted ones.
13369 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13370 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13371 rules.
13372 * configure.srv: Specify XML files and new regformats for MIPS and
13373 MIPS64 GNU/Linux.
13374 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13375 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13376 an entry for the restart register.
13377 (mips_cannot_fetch_register, mips_cannot_store_register)
13378 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13379 register names to match the XML descriptions.
13380 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13381 restart register instead of $0.
13382
0e7f50da
UW
133832007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13384 Markus Deuling <deuling@de.ibm.com>
13385
13386 * remote-utils.c (decode_xfer_write): New function.
13387 * server.h (decode_xfer_write): Add prototype.
13388 * server.c (handle_query): Add PACKET_LEN argument. Support
13389 qXfer:spu:read and qXfer:spu:write packets.
13390 (main): Pass packet_len to handle_query.
13391 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13392 * target.h (target_ops): Add qxfer_spu.
13393
374c1d38
UW
133942007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13395
13396 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13397 accessing non-seekable spufs files.
13398
bb63802a
UW
133992007-05-16 Markus Deuling <deuling@de.ibm.com>
13400
889bf7c5 13401 * server.c (handle_query): Add reply for qC packet.
bb63802a 13402
7390519e
PA
134032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13404 Leo Zayas <lerele@champenstudios@com>
13405
13406 * server.h (check_remote_input_interrupt_request): New function.
13407 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13408 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13409 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13410 (check_remote_input_interrupt_request): New function.
13411 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13412 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13413 winapi_GenerateConsoleCtrlEvent): New typedefs.
13414 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13415 to 250 ms.
13416 (win32_wait): Check for remote interrupt request
13417 with check_remote_input_interrupt_request.
13418 (win32_request_interrupt): New function.
13419 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13420
34b34921
PA
134212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13422
13423 * win32-low.c (debug_registers_changed,
13424 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13425 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13426 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13427 (thread_rec): Get context using the low target.
13428 (child_add_thread): Call thread_added on the low target,
13429 which does the same thing.
13430 (regptr): Delete.
13431 (do_initial_child_stuff): Remove debug registers references.
13432 Set context using the low target. Resume threads after
13433 setting the contexts.
13434 (child_continue): Remove dead variable. Remove debug
13435 registers references.
13436 (child_fetch_inferior_registers): Go through the low target.
13437 (do_child_store_inferior_registers): Remove.
13438 (child_store_inferior_registers): Go through the low target.
13439 (win32_resume): Remove debug registers references.
13440 Set context using the low target.
13441 (handle_exception): Change return type to void. Don't record
13442 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13443 first chance exception.
889bf7c5 13444 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13445 goto loop. Always return after waiting for debug event.
13446 (win32_wait): Convert to switch statement. Handle spurious
13447 events.
13448
13449 * win32-i386-low.c (debug_registers_changed,
13450 debug_registers_used): New.
13451 (initial_stuff): Rename to ...
13452 (i386_initial_stuff): ... this. Clear debug registers
13453 state variables.
13454 (store_debug_registers): Delete.
13455 (i386_get_thread_context): New.
13456 (load_debug_registers): Delete.
13457 (i386_set_thread_context): New.
13458 (i386_thread_added): New.
13459 (single_step): Rename to ...
13460 (i386_single_step): ... this.
13461 (do_fetch_inferior_registers): Rename to ...
13462 (i386_fetch_inferior_register): ... this.
13463 (i386_store_inferior_register): New.
13464 (the_low_target): Adapt to new interface.
13465
13466 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13467 (arm_get_thread_context): New.
13468 (arm_set_thread_context): New.
13469 (regptr): New.
13470 (do_fetch_inferior_registers): Rename to ...
13471 (arm_fetch_inferior_register): ... this.
13472 (arm_store_inferior_register): New.
13473 (arm_wince_breakpoint): Reimplement as unsigned long.
13474 (arm_wince_breakpoint_len): Define.
13475 (the_low_target): Adapt to new interface.
13476
13477 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13478 load_debug_registers. Add get_thread_context, set_thread_context,
13479 thread_added and store_inferior_register. Rename
13480 fetch_inferior_registers to fetch_inferior_register.
13481 (regptr): Remove declaration.
13482
dd6953e1
PA
134832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13484
13485 * linux-low.c (linux_detach): Change return type to int. Return 0.
13486 * spu-low.c (spu_detach): Likewise.
13487
444d6139
PA
134882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13489
13490 * target.h (target_ops): Change return type of detach to int.
13491 Add join.
13492 (join_inferior): New.
13493 * server.c (main): Don't skip detach support on mingw32.
13494 If the inferior doesn't support detaching return error.
13495 Call join_inferior instead of using waitpid.
13496 * linux-low.c (linux_join): New.
13497 (linux_target_op): Add linux_join.
13498 * spu-low.c (spu_join): New.
13499 (spu_target_ops): Add spu_join.
13500 * win32-low.c (win32_detach): Adapt to new interface.
13501 Reopen current_process_handle before detaching. Issue a child
13502 resume before detaching.
13503 (win32_join): New.
13504 (win32_target_op): Add win32_join.
13505
1d5315fe
PA
135062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13507
13508 * win32-low.c (win32-attach): Fix return value.
13509 * target.h (target_ops): Describe ATTACH return values.
13510
bf914831
PA
135112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13512
13513 * win32-low.c (GETPROCADDRESS): Define.
13514 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13515 (winapi_DebugSetProcessKillOnExit): Likewise.
13516 (win32_create_inferior): Force usage of ansi CreateProcessA.
13517 (win32_attach): Use GETPROCADDRESS.
13518 (win32_detach): Likewise.
13519
f72f3e60
PA
135202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13521
13522 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13523
ed50f18f
PA
135242007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13525
13526 * win32-low.c: Commit leftover changes from 2007-03-29.
13527
0c2ead7e
DJ
135282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13529
13530 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13531 fields short instead of int. Add explicit padding.
13532 (i387_cache_to_fsave): Remove unnecessary casts.
13533 (i387_fsave_to_cache): Doc fix.
13534 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13535
73725ff3
DJ
135362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13539 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13540
d99f33d8
PA
135412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13542
13543 * configure.srv (arm*-*-mingw32ce*): Move near the other
13544 arm targets.
13545
68070c10
PA
135462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13547
2482afc6 13548 * configure.ac: Add errno checking.
68070c10
PA
13549 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13550 sys/file.h and malloc.h.
13551 (AC_CHECK_DECLS): Add perror.
13552 (srv_mingwce): Handle.
2482afc6 13553 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13554 win32-i386-low.o to srv_tgtobj.
13555 (i[34567]86-*-mingw*): Likewise.
13556 (arm*-*-mingw32ce*): Add case.
13557 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13558 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13559 [__MINGW32CE__] (strerror): New function.
13560 [__MINGW32CE__] (errno): Define to GetLastError.
13561 [__MINGW32CE__] (COUNTOF): New macro.
13562 (remote_open): Remove extra close call.
13563 * mem-break.c (delete_breakpoint_at): New function.
13564 * mem-break.h (delete_breakpoint_at): Declare.
13565 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13566 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13567 [USE_WIN32API] (read, write): Add char* casts.
13568 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13569 * server.h: Include wincecompat.h on Windows CE.
13570 [HAVE_ERRNO_H]: Check.
13571 (perror): Declare if not declared.
13572 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13573 (perror_with_name): Remove errno declaration.
13574 * wincecompat.h: New.
13575 * wincecompat.c: New.
13576 * win32-low.h: New.
13577 * win32-arm-low.c: New.
13578 * win32-i386-low.c: New.
13579 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13580 (OUTMSG2): Make it safe.
13581 (_T): New macro.
13582 (COUNTOF): New macro.
13583 (NUM_REGS): Get it from the low target.
13584 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13585 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13586 (thread_rec): Let low target handle debug registers.
13587 (child_add_thread): Likewise.
13588 (child_init_thread_list): Likewise.
13589 (continue_one_thread): Likewise.
13590 (regptr): New.
13591 (do_child_fetch_inferior_registers): Move to ...
13592 * win32-i386-low.c: ... here, and rename to ...
13593 (do_fetch_inferior_registers): ... this.
889bf7c5 13594 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13595 Go through the low target.
13596 (do_child_store_inferior_registers): Use regptr.
13597 (strwinerror): New function.
13598 (win32_create_inferior): Handle Windows CE.
13599 Use strwinerror instead of strerror on Windows error
13600 codes. Add program to the error output.
13601 Don't close the main thread handle on Windows CE.
13602 (win32_attach): Use coredll.dll on Windows CE.
13603 (win32_kill): Close current process and current
13604 thread handles.
13605 (win32_detach): Use coredll.dll on Windows CE.
13606 (win32_resume): Let low target handle debug registers, and
13607 step request.
13608 (handle_exception): Add/Remove initial breakpoint. Avoid
13609 non-existant WSTOPSIG on Windows CE.
13610 (win32_read_inferior_memory): Cast to remove warning.
13611 (win32_arch_string): Go through the low target.
13612 (initialize_low): Call set_breakpoint_data with the low
13613 target's breakpoint.
13614 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13615 FOP_REGNUM, mappings): Move to ...
13616 * win32-i386-low.c: ... here.
13617 * win32-low.c (win32_thread_info): Move to ...
13618 * win32-low.h: ... here.
13619 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13620 win32-arm-low.c and wincecompat.c.
13621 (all:): Add $EXEEXT.
13622 (install-only:): Likewise.
13623 (gdbserver:): Likewise.
13624 (gdbreplay:): Likewise.
13625 * config.in: Regenerate.
13626 * configure: Regenerate.
13627
41093d81
PA
136282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13629
13630 * win32-low.c: Rename typedef thread_info to
13631 win32_thread_info throughout.
13632
544afa54
PA
136332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13634
13635 * win32-i386-low.c: Rename to ...
13636 * win32-low.c: ... this.
13637 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13638 * Makefile.in: Likewise.
13639
bce7165d
PA
136402007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13641
13642 * remote-utils.c (monitor_output): Constify msg parameter.
13643 * server.h (monitor_output): Likewise.
13644 * win32-i386-low.c (handle_output_debug_string): New.
13645 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13646 handle_output_debug_string.
13647 (get_child_debug_event): Likewise.
13648
506c7aa0
DJ
136492007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13650
13651 * server.c (main): Correct strtoul check.
13652
42c81e2a
DJ
136532007-03-27 Jon Ringle <jon@ringle.org>
13654
13655 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13656
9453113a
DJ
136572007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13658
13659 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13660
64a69107
DJ
136612007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13662
13663 * terminal.h: Check HAVE_SGTTY_H.
13664
136652007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13666
13667 * remote-utils.c (remote_open): Print out the assigned port number.
13668
c74d0ad8
DJ
136692007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * remote-utils.c (monitor_output): New function.
13672 * server.c (debug_threads): Define here.
13673 (monitor_show_help): New function.
13674 (handle_query): Handle qRcmd.
13675 (main): Do not handle 'd' packet.
13676 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13677 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13678 of debug_threads.
13679
de7c3b4a
PA
136802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13681
13682 * Makefile.in (EXEEXT): New.
13683 (clean): Use $(EXEEXT).
13684
ef57601b
PA
136852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13686
13687 * target.h (target_ops): Rename send_signal to request_interrupt,
13688 and remove enum target_signal parameter.
13689 * linux-low.c (linux_request_interrupt): Rename from
13690 linux_send_signal, and always send SIGINT.
13691 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13692 and always send SIGINT.
13693 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13694 of send_signal.
13695 (input_interrupt): Likewise.
13696
820f2bda
PA
136972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13698
13699 * server.c (get_features_xml): Check if target implemented
13700 arch_string.
13701 * win32-i386-low.c (win32_arch_string): New.
13702 (win32_target_ops): Add win32_arch_string as arch_string member.
13703
ab39bf24
UW
137042007-02-22 Markus Deuling <deuling@de.ibm.com>
13705
13706 * spu-low.c (spu_arch_string): New.
13707 (spu_target_ops): Add spu_arch_string.
13708
61ff6e04
DJ
137092007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13712 * configure.ac: Do not check for terminal.h.
13713 * configure, config.in: Regenerated.
13714
fb1e4ffc
DJ
137152007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13716
13717 * Makefile.in (OBS): Add $(XML_BUILTIN).
13718 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13719 (clean): Update.
13720 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13721 (arm-with-iwmmxt.c): New.
13722 * config.in, configure: Regenerate.
13723 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13724 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13725 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13726 (arm*-*-linux*): Add iWMMXt and regset support.
13727 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13728 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13729 (arm_store_wmmxregset, target_regsets): New.
13730 * server.c (get_features_xml): Take annex argument. Check builtin
13731 XML documents.
13732 (handle_query): Handle multiple annexes.
13733
0f48aa01
DJ
137342007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13735
13736 * remote-utils.c [USE_WIN32API] (read, write): Define.
13737 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13738 write.
13739
23181151
DJ
137402007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13741
13742 * linux-i386-low.c (the_low_target): Set arch_string.
13743 * linux-x86-64-low.c (the_low_target): Likewise.
13744 * linux-low.c (linux_arch_string): New.
13745 (linux_target_ops): Add it.
13746 * linux-low.h (struct linux_target_ops): Add arch_string.
13747 * server.c (write_qxfer_response): Use const void * for DATA.
13748 (get_features_xml): New.
13749 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13750 * target.h (struct target_ops): Add arch_string method.
13751
9d606399
DJ
137522007-01-03 Denis Pilat <denis.pilat@st.com>
13753 Daniel Jacobowitz <dan@codesourcery.com>
13754
13755 * linux-low.c (linux_kill): Handle being called with no threads.
13756 * win32-i386-low.c (win32_kill): Likewise.
13757 (get_child_debug_event): Clear current_process_handle.
13758
137592006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13760 Daniel Jacobowitz <dan@codesourcery.com>
13761
13762 * remote-utils.c (remote_open): Check the type of specified
13763 serial port devices before opening them.
13764 * server.c (main): Kill the inferior if an error occurs during
13765 the first remote_open.
13766
a5e13d24
DJ
137672006-12-05 Markus Deuling <deuling@de.ibm.com>
13768
13769 * README: Update supported targets.
13770
186947f7
DJ
137712006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13772
13773 * Makefile.in (clean): Remove reg-mips64.c.
13774 (reg-mips64.c, reg-mips64.o): New rules.
13775 * configure.srv: Handle mips64. Include regset support for mips.
13776 * linux-mips-low.c (union mips_register): New.
13777 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13778 (mips_breakpoint, mips_breakpoint_at): Use int.
13779 (mips_collect_register, mips_supply_register)
13780 (mips_collect_register_32bit, mips_supply_register_32bit)
13781 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13782 (mips_store_fpregset, target_regsets): New.
13783 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13784
a13e2c95
UW
137852006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13786
13787 * configure.srv: Add target "spu*-*-*".
13788 * Makefile.in (clean): Remove reg-spu.c.
13789 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13790 * spu-low.c: New file.
13791
cb7283db
DJ
137922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * configure.ac: Correct td_thr_tls_get_addr test.
13795 * configure: Regenerated.
13796
89be2091
DJ
137972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * linux-low.c (linux_wait_for_event): Reformat. Use the
13800 pass_signals array.
13801 * remote-utils.c (decode_address_to_semicolon): New.
13802 * server.c (pass_signals, handle_general_set): New.
13803 (handle_query): Mention QPassSignals for qSupported.
13804 (main): Call handle_general_set.
13805 * server.h (pass_signals, decode_address_to_semicolon): New.
13806
000ef4f0
DJ
138072006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13808
13809 * server.c (handle_query): Correct error handling for read_auxv.
13810
b7149293
UW
138112005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13812
13813 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13814 and srv_linux_thread_db to yes.
13815 * linux-s390-low.c (s390_fill_gregset): New function.
13816 (target_regsets): Define data structure.
13817
dae5f5cf
DJ
138182006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13821 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13822 * config.in, configure: Regenerated.
13823 * inferiors.c (gdb_id_to_thread): New function.
13824 (gdb_id_to_thread_id): Use it.
13825 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13826 * linux-low.h (struct process_info): Add th member.
13827 (thread_db_get_tls_address): New prototype.
13828 * remote-utils.c (decode_address): Make non-static.
13829 * server.c (handle_query): Handle qGetTLSAddr.
13830 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13831 * target.h (struct target_ops): Add get_tls_address.
13832 * thread-db.c (maybe_attach_thread): Save the thread handle.
13833 (thread_db_get_tls_address): New.
13834
32ca6d61
DJ
138352006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13836
13837 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13838 (linux_resume_one_process): Take a siginfo_t *. Update all
13839 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13840 (struct pending_signals): Add a siginfo_t.
13841 (linux_wait_for_process): Always set last_status.
13842 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13843 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13844 * linux-low.h (struct process_info): Add last_status.
13845
5ffff7c1
DJ
138462006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13847
13848 * remote-utils.c (try_rle): New function.
13849 (putpkt_binary): Use it.
13850
8695c747
DJ
138512006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13852
13853 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13854 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13855 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13856 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13857 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13858 point registers.
13859
290fadea
RS
138602006-08-08 Richard Sandiford <richard@codesourcery.com>
13861
13862 * server.c (terminal_fd): New variable.
13863 (old_foreground_pgrp): Likewise.
13864 (restore_old_foreground_pgrp): New function.
13865 (start_inferior): Record the terminal file descriptor in terminal_fd
13866 and its original foreground group in old_foreground_pgrp. Register
13867 restore_old_foreground_pgrp with atexit().
13868
9f2e1e63
DJ
138692006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13870
13871 * server.c (handle_query): Correct qPart to qXfer.
13872
b80864fb
DJ
138732006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13874
13875 * configure.ac: Check for more headers which are missing on
13876 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13877 * configure.srv: Add Cygwin and mingw32.
13878 * remote-utils.c: Don't include headers unconditionally which
13879 are missing on mingw32. Include <winsock.h> for mingw32.
13880 (remote_open): Adjust for mingw32 support. Flush
13881 standard error after writing to it.
13882 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13883 (unblock_async_io, enable_async_io, disable_async_io)
13884 (readchar, getpkt): Update for Winsock support.
13885 (prepare_resume_reply): Expect a protocol signal number.
13886 * server.c: Disable <sys/wait.h> on mingw32.
13887 (start_inferior): Adjust for mingw32 support. Flush
13888 standard error after writing to it.
13889 (attach_inferior): Likewise. Use protocol signal
13890 numbers.
13891 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13892 and names.
13893 * win32-i386-low.c: New file.
13894 * Makefile.in (XM_CLIBS): Set.
13895 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13896 (win32-i386-low.o): New dependency rule.
13897 * linux-low.c (linux_wait): Use target signal numbers.
13898 * target.h (struct target_ops): Doc fix.
13899 * server.h (target_signal_to_name): New prototype.
13900 * gdbreplay.c: Don't include headers unconditionally which
13901 are missing on mingw32. Include <winsock.h> for mingw32.
13902 (remote_close, remote_open): Adjust for Winsock support.
13903 * configure, config.in: Regenerated.
13904
0876f84a
DJ
139052006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13906
13907 * server.c (decode_xfer_read, write_qxfer_response): New.
13908 (handle_query): Take a packet length argument. Handle
13909 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13910 the qSupported response.
13911 (main): Update call to handle_query.
13912
01f9e8fa
DJ
139132006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13914
13915 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13916 (putpkt_binary): Renamed from putpkt and adjusted for binary
13917 data.
13918 (putpkt): New wrapper for putpkt_binary.
13919 (readchar): Don't mask off the high bit.
13920 (decode_X_packet): New function.
13921 * server.c (main): Call putpkt_binary if a handler sets the packet
13922 length. Save the length of the incoming packet. Handle 'X'.
13923 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13924
be2a5f71
DJ
139252006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * server.c (handle_query): Handle qSupported.
13928
ea025f5f
DJ
139292006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13930
13931 * remote-utils.c (all_symbols_looked_up): New variable.
13932 (look_up_one_symbol): Check it.
13933 * server.h (look_up_one_symbol): New declaration.
13934 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13935
9308fc88
DJ
139362006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13939 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13940 (PTRACE_GET_THREAD_AREA): Define.
13941 (ps_get_thread_area): New function.
13942
52fb6437
NS
139432006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13944
13945 * configure.srv (m68k*-*-uclinux*): New target.
13946 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13947 (linux_resume_one_process): Remove extraneous cast.
13948 (linux_read_offsets): New.
13949 (linux_target_op): Add linux_read_offsets on mmuless systems.
13950 * server.c (handle_query): Add qOffsets logic.
13951 * target.h (struct target_ops): Add read_offsets.
13952
21b0f40c
DJ
139532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13956 (PTRACE_GET_THREAD_AREA): Define.
13957 (ps_get_thread_area): New function.
13958 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13959 (linux-x86-64-low.o): Update.
13960
0050a760
DJ
139612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * configure.ac: Remove checks for prfpregset_t.
13964 * gdb_proc_service.h: New file.
13965 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13966 new "gdb_proc_service.h".
13967 * proc-service.c: Likewise.
13968 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13969 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13970 * Makefile.in (gdb_proc_service_h): Updated.
13971 * configure, config.in: Regenerated.
13972
b92a518e
DJ
139732006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * remote-utils.c (prepare_resume_reply): Move declaration
13976 of gdb_id_from_wait to the top of the block.
13977
545587ee
DJ
139782006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13979
13980 * linux-low.c (regsets_store_inferior_registers): Read the regset
13981 from the target before filling it.
13982
9db87ebd
DJ
139832006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * server.c (attach_inferior): Return SIGTRAP for a successful
13986 attach.
13987
dd24457d
DJ
139882006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13989
13990 * Makefile.in (OBS): Add version.o.
13991 (STAGESTUFF): Delete.
13992 (version.o): Add dependencies.
13993 (version.c): Replace rule.
13994 (clean): Remove version.c.
13995 * server.c (gdbserver_version): New.
13996 (gdbserver_usage): Use printf.
13997 (main): Handle --version and --help.
13998 * server.h (version, host_name): Add declarations.
13999
6f0f660e
EZ
140002005-12-23 Eli Zaretskii <eliz@gnu.org>
14001
889bf7c5
PA
14002 * linux-arm-low.c:
14003 * linux-arm-low.c:
14004 * inferiors.c:
14005 * i387-fp.h:
14006 * i387-fp.c:
14007 * gdbreplay.c:
14008 * regcache.c:
14009 * proc-service.c:
14010 * mem-break.h:
14011 * mem-break.c:
14012 * linux-x86-64-low.c:
14013 * linux-sh-low.c:
14014 * linux-s390-low.c:
14015 * linux-ppc64-low.c:
14016 * linux-ppc-low.c:
14017 * linux-mips-low.c:
14018 * linux-m68k-low.c:
14019 * linux-m32r-low.c:
14020 * linux-low.h:
14021 * linux-low.c:
14022 * linux-ia64-low.c:
14023 * linux-i386-low.c:
14024 * linux-crisv32-low.c:
14025 * thread-db.c:
14026 * terminal.h:
14027 * target.h:
14028 * target.c:
14029 * server.h:
14030 * server.c:
14031 * remote-utils.c:
14032 * regcache.h:
14033 * utils.c:
14034 * Makefile.in:
14035 * configure.ac:
6f0f660e
EZ
14036 * gdbserver.1: Add (C) after Copyright. Update the FSF
14037 address.
14038
9d1fb177
DJ
140392005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14040
14041 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14042 (arm_breakpoint_at): Recognize both breakpoints.
14043 (the_low_target): Use the correct breakpoint instruction.
14044
011a70c2
DJ
140452005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14046
14047 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14048 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14049 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14050 (the_low_target): Update.
14051
7fb85e41
AS
140522005-10-25 Andreas Schwab <schwab@suse.de>
14053
14054 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14055
14056 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14057 (ia64_num_regs): Reduce to 462.
14058
3db0444b
DJ
140592005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14060
14061 * acinclude.m4: Correct quoting.
14062 * aclocal.m4: Regenerated.
14063
14064 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14065 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14066 (thread_db_init): Call thread_db_err_str.
14067 * configure.ac: Check for TD_VERSION.
14068 * config.in, configure: Regenerated.
14069
bee0189a
DJ
140702005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14071
14072 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14073
e9d25b98
DJ
140742005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14077 is not available. Define HAVE_PTRACE_GETREGS if it is.
14078 * config.in, configure: Regenerated.
14079 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14080 * linux-i386-low.c, linux-m68k-low.c: Update to use
14081 HAVE_PTRACE_GETREGS.
14082 * linux-low.c (regsets_fetch_inferior_registers)
14083 (regsets_store_inferior_registers): Only return 0 if we processed
14084 GENERAL_REGS.
14085 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14086 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14087
a06660f7
DJ
140882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * inferiors.c (struct thread_info): Add gdb_id.
14091 (add_thread): Add gdb_id argument.
14092 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14093 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14094 calls to add_thread.
14095 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14096 * server.c (handle_query): Use thread_to_gdb_id.
14097 (handle_v_cont, main): Use gdb_id_to_thread_id.
14098 * server.h (add_thread): Update prototype.
14099 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14100 prototypes.
14101
5a1f5858
DJ
141022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14105 left-padded registers.
14106 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14107 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14108
e122f1f5
SE
141092005-07-01 Steve Ellcey <sje@cup.hp.com>
14110
14111 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14112 * configure: Regenerate.
14113 * config.in: Regenerate.
14114 * server.h (NEED_DECLARATION_STRERROR):
14115 Replace with !HAVE_DECL_STRERROR.
14116
d592fa2f
DJ
141172005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14118
14119 * linux-low.c (linux_wait, linux_send_signal): Don't test
14120 an unsigned long variable for > 0 if it could be MAX_ULONG.
14121 * server.c (myresume): Likewise.
14122 * target.c (set_desired_inferior): Likewise.
14123
ccbd4912
MK
141242005-06-13 Mark Kettenis <kettenis@gnu.org>
14125
14126 * configure.ac: Simplify and improve check for socklen_t.
14127 * configure, config.in: Regenerate.
14128
f450004a
DJ
141292005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * acconfig.h: Remove.
14132 * configure.ac: Add a test for socklen_t. Use three-argument
14133 AC_DEFINE throughout.
14134 * config.in: Regenerated using autoheader 2.59.
14135 * configure: Regenerated.
14136
14137 * gdbreplay.c (socklen_t): Provide a default.
14138 (remote_open): Use socklen_t.
14139 * remote-utils.c (socklen_t): Provide a default.
14140 (remote_open): Use socklen_t.
14141 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14142 unsigned char.
14143
14144 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14145 char for buffers.
14146 * linux-low.c (linux_read_memory, linux_write_memory)
14147 (linux_read_auxv): Likewise.
14148 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14149 (check_mem_write): Likewise.
14150 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14151 Likewise.
14152 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14153 (registers_from_string, register_data): Likewise.
14154 * server.c (handle_query, main): Likewise.
14155 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14156 (decode_M_packet): Likewise.
14157 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14158 * target.h (struct target_ops): Update read_memory, write_memory,
14159 and read_auxv.
14160 (read_inferior_memory, write_inferior_memory): Update.
14161 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14162 to unsigned char *.
14163 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14164 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14165 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14166 linux-s390-low.c, linux-sh-low.c: Update for changes in
14167 read_inferior_memory and the_low_target->breakpoint.
14168
eee84df1
DJ
141692005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14170
14171 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14172 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14173 * configure.srv: Add powerpc64-*-linux*.
14174 * linux-ppc64-low.c: New file.
14175
45b134e5
OF
141762005-05-23 Orjan Friberg <orjanf@axis.com>
14177
14178 * linux-cris-low.c: New file with support for CRIS.
14179 * linux-crisv32-low.c: Ditto for CRISv32.
14180 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14181 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14182 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14183 reg-crisv32.o, and reg-crisv32.c to make rules.
14184 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14185 recognized targets.
14186
48d93c75
UW
141872005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14188
14189 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14190 of sizeof (PTRACE_XFER_TYPE).
14191 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14192
e013ee27
OF
141932005-05-12 Orjan Friberg <orjanf@axis.com>
14194
889bf7c5 14195 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14196 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14197 pointers for hardware watchpoint support.
14198 * linux-low.h (struct linux_target_ops): Ditto.
14199 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14200 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14201 to linux_target_ops.
14202 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14203 reply packet.
14204 * server.c (main): Recognize 'Z' and 'z' packets.
14205
b0ded00b
UW
142062005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14207
14208 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14209 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14210 (the_low_target): Add new members.
14211
8643e2ad
DJ
142122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * proc-service.c (ps_lgetregs): Search all_processes instead of
14215 all_threads.
14216
fc620387
DJ
142172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * server.c (start_inferior): Change return type to int.
14220 (attach_inferior): Change sigptr to int *.
14221 (handle_v_cont, handle_v_requests): Change signal to int *.
14222 (main): Change signal to int.
14223
142242005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14225
14226 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14227 * configure.srv: Add m32r*-*-linux*.
14228 * linux-m32r-low.c: New file.
14229
e0e76420
DJ
142302005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14233
a1928bad
DJ
142342005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14235
14236 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14237 Take unsigned long arguments for PIDs.
14238 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14239 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14240 (wait_for_sigstop, linux_resume_one_process)
14241 (regsets_fetch_inferior_registers, linux_send_signal)
14242 (linux_read_auxv): Likewise. Update the types of variables holding
14243 PIDs. Update format string specifiers.
14244 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14245 * remote-utils.c (prepare_resume_reply): Likewise.
14246 * server.c (cont_thread, general_thread, step_thread)
14247 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14248 unsigned long.
14249 (handle_query): Update format specifiers.
14250 (handle_v_cont, main): Use strtoul for thread IDs.
14251 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14252 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14253 (general_thread, step_thread, thread_from_wait)
14254 (old_thread_from_wait): Update.
14255 * target.h (struct thread_resume): Use unsigned long for THREAD.
14256 (struct target_ops): Use unsigned long for arguments to attach and
14257 thread_alive.
14258
dcdb98d2
DJ
142592005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * acinclude.m4: Include bfd/bfd.m4 directly.
14262 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14263 <agriffis@toolchain.org>.
14264 * aclocal.m4, configure: Regenerated.
14265
bec39cab
AC
142662005-01-07 Andrew Cagney <cagney@gnu.org>
14267
14268 * configure.ac: Rename configure.in, require autoconf 2.59.
14269 * configure: Re-generate.
14270
434c4c77
DJ
142712004-12-08 Daniel Jacobowitz <dan@debian.org>
14272
14273 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14274 LIBS when finished.
14275 * aclocal.m4: Regenerated.
14276 * configure: Regenerated.
14277
db1d3e1b
AS
142782004-11-21 Andreas Schwab <schwab@suse.de>
14279
14280 * linux-m68k-low.c (m68k_num_gregs): Define.
14281 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14282 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14283 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14284 (m68k_breakpoint_at): New. Add to the_low_target.
14285
14286 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14287 srv_linux_thread_db to yes.
14288
43360365
JB
142892004-10-20 Joel Brobecker <brobecker@gnat.com>
14290
14291 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14292 (ARCH_SET_FS): Likewise.
14293 (ARCH_GET_FS): Likewise.
14294 (ARCH_GET_GS): Likewise.
14295
fd500816
DJ
142962004-10-16 Daniel Jacobowitz <dan@debian.org>
14297
14298 * linux-i386-low.c (ps_get_thread_area): New.
14299 * linux-x86-64-low.c (ps_get_thread_area): New.
14300 * linux-low.c: Include <sys/syscall.h>.
14301 (linux_kill_one_process): Don't kill the first thread here.
14302 (linux_kill): Kill the first thread here.
14303 (kill_lwp): New function.
14304 (send_sigstop, linux_send_signal): Use it.
14305 * proc-service.c: Clean up #ifdefs.
14306 (fpregset_info): Delete.
14307 (ps_lgetregs): Update and enable implementation.
14308 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14309 implementations.
14310 * remote-utils.c (struct sym_cache, symbol_cache): New.
14311 (input_interrupt): Print a clearer message.
14312 (async_io_enabled): New variable.
14313 (enable_async_io, disable_async_io): Use it. Update comments.
14314 (look_up_one_symbol): Use the symbol cache.
14315 * thread-db.c (thread_db_look_up_symbols): New function.
14316 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14317
f6de3c42
DJ
143182004-10-16 Daniel Jacobowitz <dan@debian.org>
14319
14320 * configure.in: Test for -rdynamic.
14321 * configure: Regenerated.
14322 * Makefile (INTERNAL_LDFLAGS): New.
14323 (gdbserver, gdbreplay): Use it.
14324
2c0fc042
AC
143252004-09-02 Andrew Cagney <cagney@gnu.org>
14326
14327 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14328
075b3282
DJ
143292004-03-23 Daniel Jacobowitz <drow@mvista.com>
14330
14331 * linux-low.c (linux_wait): Clear all_processes list also.
14332
fa6a77dc
DJ
143332004-03-12 Daniel Jacobowitz <drow@mvista.com>
14334
14335 * linux-low.c: Include <errno.h>. Remove extern declaration of
14336 errno.
14337
6d782a97
DJ
143382004-03-12 Daniel Jacobowitz <drow@mvista.com>
14339
14340 * gdbreplay.c, server.h, utils.c: Update copyright years.
14341
3a7fb99b
DJ
143422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14343
14344 * server.c (main): Print child status or termination signal from
14345 variable 'signal', not 'sig'.
14346
c3e735a6
DJ
143472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14348
14349 * linux-low.c (linux_read_memory): Change return type to
14350 int. Check for and return error from ptrace().
14351 * target.c (read_inferior_memory): Change return type to int. Pass
14352 back return status from the_target->read_memory().
14353 * target.h (struct target_ops): Adapt *read_memory() prototype.
14354 Update comment.
14355 (read_inferior_memory): Adapt prototype.
14356 * server.c (main): Return an error packet if
14357 read_inferior_memory() returns an error.
14358
a59d1c82
DJ
143592004-03-04 Daniel Jacobowitz <drow@mvista.com>
14360
14361 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14362 Unify with other clean targets.
14363
dc3f8883
DJ
143642004-02-29 Daniel Jacobowitz <drow@mvista.com>
14365
14366 * server.c (handle_v_cont): Call set_desired_inferior.
14367
89a208da
DJ
143682004-02-29 Daniel Jacobowitz <drow@mvista.com>
14369
14370 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14371
62ea82f5
DJ
143722004-02-29 Daniel Jacobowitz <drow@mvista.com>
14373
14374 * linux-low.c (linux_wait): Unblock async I/O.
14375 (linux_resume): Block and enable async I/O.
14376 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14377 * server.h (block_async_io, unblock_async_io): Add prototypes.
14378
6910d122
DJ
143792004-02-29 Daniel Jacobowitz <drow@mvista.com>
14380
14381 * remote-utils.c (remote_open): Print a status notice after
14382 opening a TCP port.
14383 * server.c (attach_inferior): Print a status notice after
14384 attaching.
14385
143862004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14387
14388 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14389
c89dc5d4
DJ
143902004-02-26 Daniel Jacobowitz <drow@mvista.com>
14391
14392 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14393 error packet.
14394 * server.c, target.h: Update copyright years.
14395
4b8dad4a
RM
143962004-02-25 Roland McGrath <roland@redhat.com>
14397
14398 * target.h (struct target_ops): New member `read_auxv'.
14399 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14400 * linux-low.c (linux_read_auxv): New function.
14401 (linux_target_ops): Initialize `read_auxv' member to that.
14402
d7446758
JB
144032004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14404
14405 Committed by Jim Blandy <jimb@redhat.com>.
14406
14407 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14408 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14409 instead of GPR_SIZE to distiguish s390 and s390x targets.
14410
5544ad89
DJ
144112004-01-31 Daniel Jacobowitz <drow@mvista.com>
14412
14413 * linux-low.c: Update copyright year.
14414 (check_removed_breakpoint): Clear pending_is_breakpoint.
14415 (linux_set_resume_request, linux_queue_one_thread)
14416 (resume_status_pending_p): New functions.
14417 (linux_continue_one_thread): Use process->resume.
14418 (linux_resume): Only resume threads if there are no pending events.
14419 * linux-low.h (struct process_info): Add resume request
14420 pointer.
14421
2a68b70e
DJ
144222004-01-30 Daniel Jacobowitz <drow@mvista.com>
14423
14424 * regcache.c (new_register_cache): Clear the allocated register
14425 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14426
64386c31
DJ
144272003-10-13 Daniel Jacobowitz <drow@mvista.com>
14428
14429 * linux-low.c (linux_resume): Take a struct thread_resume *
14430 argument.
14431 (linux_wait): Update call.
14432 (resume_ptr): New static variable.
14433 (linux_continue_one_thread): Renamed from
14434 linux_continue_one_process. Use resume_ptr.
14435 (linux_resume): Use linux_continue_one_thread.
14436 * server.c (handle_v_cont, handle_v_requests): New functions.
14437 (myresume): New function.
14438 (main): Handle 'v' case.
14439 * target.h (struct thread_resume): New type.
14440 (struct target_ops): Change argument of "resume" to struct
14441 thread_resume *.
14442 (myresume): Delete macro.
14443
c938e9b0
L
144442003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14445
14446 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14447 (uninstall): Support DESTDIR.
14448
7f313d07
BC
14449Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14450
14451 * configure.srv: Add xscale*linux copy of arm*linux entry.
14452
3b2fc2ea
DJ
144532003-07-24 Daniel Jacobowitz <drow@mvista.com>
14454
14455 * linux-arm-low.c (arm_reinsert_addr): New function.
14456 (the_low_target): Add arm_reinsert_addr.
14457
1c0a559e
MK
144582003-07-08 Mark Kettenis <kettenis@gnu.org>
14459
14460 * mem-break.c: Remove whitespace at end of file.
14461
43d5792c
DJ
144622003-06-28 Daniel Jacobowitz <drow@mvista.com>
14463
14464 * configure.in: Check whether we need to prototype strerror.
14465 * server.h: Optionally prototype strerror.
14466 * gdbreplay.c (perror_with_name): Use strerror.
14467 * linux-low.c (linux_attach_lwp): Use strerror.
14468 * utils.c (perror_with_name): Use strerror.
14469 * config.in, configure: Regenerated.
14470
c8a86edf
DJ
144712003-06-28 Daniel Jacobowitz <drow@mvista.com>
14472
14473 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14474 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14475
73d37363
DJ
144762003-06-20 Daniel Jacobowitz <drow@mvista.com>
14477
14478 * Makefile.in (SFILES): Update.
14479 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14480 low-sun3.c: Remove files.
14481
6ad8ae5c
DJ
144822003-06-17 Daniel Jacobowitz <drow@mvista.com>
14483
14484 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14485 (linux_detach_one_process, linux_detach): New functions.
14486 (linux_target_ops): Add linux_detach.
14487 * server.c (main): Handle 'D' packet.
14488 * target.h (struct target_ops): Add "detach" member.
14489 (detach_inferior): Define.
14490
1581182a
MK
144912003-06-13 Mark Kettenis <kettenis@gnu.org>
14492
14493 From Kelley Cook <kelleycook@wideopenwest.com>:
14494 * configure.srv: Accept i[34567]86 variants.
14495
e5379b03
DJ
144962003-06-05 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c (linux_wait_for_event): Correct comment typos.
14499 (linux_resume_one_process): Call check_removed_breakpoint.
14500 (linux_send_signal): New function.
14501 (linux_target_ops): Add linux_send_signal.
14502 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14503 of kill.
14504 * target.h (struct target_ops): Add send_signal.
14505
2ff29de4
JB
145062003-05-29 Jim Blandy <jimb@redhat.com>
14507
14508 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14509 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14510 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14511 away part of the register's value.
14512
254787d4
DJ
145132003-03-26 Daniel Jacobowitz <drow@mvista.com>
14514
14515 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14516 (linux_wait_for_event, linux_init_signals): Likewise.
14517
94e10508
DJ
145182003-03-17 Daniel Jacobowitz <drow@mvista.com>
14519
14520 * configure.in: Check for stdlib.h.
14521 * configure: Regenerated.
14522 * config.in: Regenerated.
14523
4c0711e0
DJ
145242003-01-04 Andreas Schwab <schwab@suse.de>
14525
14526 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14527
ef66e766
AC
145282003-01-02 Andrew Cagney <ac131313@redhat.com>
14529
14530 * Makefile.in: Remove obsolete code.
14531
a1358604
DJ
145322002-11-20 Daniel Jacobowitz <drow@mvista.com>
14533
14534 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14535 defined(PT_FPR0_HI).
14536
23ce3b1c
DJ
145372002-11-17 Stuart Hughes <seh@zee2.com>
14538
14539 * linux-arm-low.c (arm_num_regs): Increase.
14540 (arm_regmap): Include status register.
14541
145422002-11-17 Daniel Jacobowitz <drow@mvista.com>
14543
14544 * linux-low.c (register_addr): Remove incorrect -1 check.
14545
a9fa9f7d
DJ
145462002-08-29 Daniel Jacobowitz <drow@mvista.com>
14547
14548 * linux-low.c (linux_create_inferior): Call setpgid. Return
14549 the new PID.
14550 (unstopped_p, linux_signal_pid): Remove.
14551 (linux_target_ops): Remove linux_signal_pid.
14552 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14553 global instead of target method.
14554 * target.h (struct target_ops): Remove signal_pid. Update comment
14555 for create_inferior.
14556 * server.c (signal_pid): New variable.
14557 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14558 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14559 (attach_inferior): Set signal_pid.
14560
17574093
DJ
145612002-08-23 Daniel Jacobowitz <drow@mvista.com>
14562
14563 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14564
145652002-08-20 Jim Blandy <jimb@redhat.com>
14566
14567 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14568 default for this.
14569
145702002-08-01 Andrew Cagney <cagney@redhat.com>
14571
14572 * Makefile.in: Make chill references obsolete.
14573
145742002-07-24 Kevin Buettner <kevinb@redhat.com>
14575
14576 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14577 * configure: Regenerate.
14578 * config.in: Regenerate.
14579
145802002-07-09 David O'Brien <obrien@FreeBSD.org>
14581
14582 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14583 (perror_with_name, remote_close, remote_open, expect, play): Static.
14584
145852002-07-04 Michal Ludvig <mludvig@suse.cz>
14586
4b8dad4a 14587 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14588 byte offsets instead of an array of indexes.
14589 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14590
145912002-06-13 Daniel Jacobowitz <drow@mvista.com>
14592
14593 * regcache.c: Add comment.
14594
145952002-06-11 Daniel Jacobowitz <drow@mvista.com>
14596
14597 * thread-db.c: New file.
14598 * proc-service.c: New file.
14599 * acinclude.m4: New file.
14600 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14601 proc-service.o, and thread-db.o.
14602 (linux-low.o): Add USE_THREAD_DB.
14603 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14604 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14605 * aclocal.m4: Regenerated.
14606 * config.in: Regenerated.
14607 * configure: Regenerated.
14608 * configure.in: Check for proc_service.h, sys/procfs.h,
14609 thread_db.h, and linux/elf.h headrs.
14610 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14611 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14612 Check for -lthread_db and thread support.
14613 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14614 PowerPC, and SuperH.
14615 * i387-fp.c: Constify arguments.
14616 * i387-fp.h: Likewise.
14617 * inferiors.c: (struct thread_info): Renamed from
14618 `struct inferior_info'. Remove PID member. Use generic inferior
14619 list header. All uses updated.
14620 (inferiors, signal_pid): Removed.
14621 (all_threads): New variable.
14622 (get_thread): Define.
14623 (add_inferior_to_list): New function.
14624 (for_each_inferior): New function.
14625 (change_inferior_id): New function.
14626 (add_inferior): Removed.
14627 (remove_inferior): New function.
14628 (add_thread): New function.
14629 (free_one_thread): New function.
14630 (remove_thread): New function.
14631 (clear_inferiors): Use for_each_inferior and free_one_thread.
14632 (find_inferior): New function.
14633 (find_inferior_id): New function.
14634 (inferior_target_data): Update argument type.
14635 (set_inferior_target_data): Likewise.
14636 (inferior_regcache_data): Likewise.
14637 (set_inferior_regcache_data): Likewise.
14638 * linux-low.c (linux_bp_reinsert): Remove.
14639 (all_processes, stopping_threads, using_thrads)
14640 (struct pending_signals, debug_threads, pid_of): New.
14641 (inferior_pid): Replace with macro.
14642 (struct inferior_linux_data): Remove.
14643 (get_stop_pc, add_process): New functions.
14644 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14645 Use add_process and add_thread.
14646 (linux_attach_lwp): New function, based on old linux_attach. Use
14647 add_process and add_thread. Set stop_expected for new threads.
14648 (linux_attach): New function.
14649 (linux_kill_one_process): New function.
14650 (linux_kill): Kill all LWPs.
14651 (linux_thread_alive): Use find_inferior_id.
14652 (check_removed_breakpoints, status_pending_p): New functions.
14653 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14654 Update. Use WNOHANG. Wait for cloned processes also. Update process
14655 struct for the found process.
14656 (linux_wait_for_event): New function.
14657 (linux_wait): Use it. Support LWPs.
14658 (send_sigstop, wait_for_sigstop, stop_all_processes)
14659 (linux_resume_one_process, linux_continue_one_process): New functions.
14660 (linux_resume): Support LWPs.
14661 (REGISTER_RAW_SIZE): Remove.
14662 (fetch_register): Use register_size instead. Call supply_register.
14663 (usr_store_inferior_registers): Likewise. Call collect_register.
14664 Fix recursive case.
14665 (regsets_fetch_inferior_registers): Improve error message.
14666 (regsets_store_inferior_registers): Add debugging.
14667 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14668 (unstopped_p, linux_signal_pid): New functions.
14669 (linux_target_ops): Add linux_signal_pid.
14670 (linux_init_signals): New function.
14671 (initialize_low): Call it. Initialize using_threads.
14672 * regcache.c (inferior_regcache_data): Add valid
14673 flag.
14674 (get_regcache): Fetch registers lazily. Add fetch argument
14675 and update all callers.
14676 (regcache_invalidate_one, regcache_invalidate): New
14677 functions.
14678 (new_register_cache): Renamed from create_register_cache.
14679 Return the new regcache.
14680 (free_register_cache): Change argument to a void *.
14681 (registers_to_string, registers_from_string): Call get_regcache
14682 with fetch flag set.
14683 (register_data): Make static. Pass fetch flag to get_regcache.
14684 (supply_register): Call get_regcache with fetch flag clear.
14685 (collect_register): Call get_regcache with fetch flag set.
14686 (collect_register_as_string): New function.
14687 * regcache.h: Update.
14688 * remote-utils.c (putpkt): Flush after debug output and use
14689 stderr.
14690 Handle input interrupts while waiting for an ACK.
14691 (input_interrupt): Use signal_pid method.
14692 (getpkt): Flush after debug output and use stderr.
14693 (outreg): Use collect_register_as_string.
14694 (new_thread_notify, dead_thread_notify): New functions.
14695 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14696 and general_thread.
14697 (look_up_one_symbol): Flush after debug output.
14698 * server.c (step_thread, server_waiting): New variables.
14699 (start_inferior): Don't use signal_pid. Update call to mywait.
14700 (attach_inferior): Update call to mywait.
14701 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14702 (main): Don't fetch/store registers explicitly. Use
14703 set_desired_inferior. Support proposed ``Hs'' packet. Update
14704 calls to mywait.
14705 * server.h: Update.
14706 (struct inferior_list, struct_inferior_list_entry): New.
14707 * target.c (set_desired_inferior): New.
14708 (write_inferior_memory): Constify.
14709 (mywait): New function.
14710 * target.h: Update.
14711 (struct target_ops): New signal_pid method.
14712 (mywait): Removed macro, added prototype.
14713
14714 * linux-low.h (regset_func): Removed.
14715 (regset_fill_func, regset_store_func): New.
14716 (enum regset_type): New.
14717 (struct regset_info): Add type field. Use new operation types.
14718 (struct linux_target_ops): stop_pc renamed to get_pc.
14719 Add decr_pc_after_break and breakpoint_at.
14720 (get_process, get_thread_proess, get_process_thread)
14721 (strut process_info, all_processes, linux_attach_lwp)
14722 (thread_db_init): New.
14723
14724 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14725 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14726 (the_low_target): Add new members.
14727 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14728 (i386_store_fpxregset): Constify.
14729 (target_regsets): Add new kind identifier.
14730 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14731 (i386_set_pc): Add debugging.
14732 (i386_breakpoint_at): New function.
14733 (the_low_target): Add new members.
14734 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14735 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14736 (mips_breakpoint_at): New.
14737 (the_low_target): Add new members.
14738 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14739 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14740 (the_low_target): Add new members.
14741 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14742 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14743 (the_low_target): Add new members.
14744 * linux-x86-64-low.c (target_regsets): Add new kind
14745 identifier.
14746
147472002-05-15 Daniel Jacobowitz <drow@mvista.com>
14748
14749 From Martin Pool <mbp@samba.org>:
14750 * server.c (gdbserver_usage): New function.
14751 (main): Call it.
14752
147532002-05-14 Daniel Jacobowitz <drow@mvista.com>
14754
14755 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14756 stop_at -> stop_pc.
14757
147582002-05-04 Andrew Cagney <ac131313@redhat.com>
14759
14760 * Makefile.in: Remove obsolete code.
14761
147622002-04-24 Michal Ludvig <mludvig@suse.cz>
14763
14764 * linux-low.c (regsets_fetch_inferior_registers),
14765 (regsets_store_inferior_registers): Removed cast to int from
14766 ptrace() calls.
14767 * regcache.h: Added declaration of struct inferior_info.
14768
147692002-04-20 Daniel Jacobowitz <drow@mvista.com>
14770
14771 * inferiors.c (struct inferior_info): Add regcache_data.
14772 (add_inferior): Call create_register_cache.
14773 (clear_inferiors): Call free_register_cache.
14774 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14775 * regcache.c (struct inferior_regcache_data): New.
14776 (registers): Remove.
14777 (get_regcache): New function.
14778 (create_register_cache, free_register_cache): New functions.
14779 (set_register_cache): Don't initialize the register cache here.
14780 (registers_to_string, registers_from_string, register_data): Call
14781 get_regcache.
14782 * regcache.h: Add prototypes.
14783 * server.h: Likewise.
14784
147852002-04-20 Daniel Jacobowitz <drow@mvista.com>
14786
14787 * mem-break.c: New file.
14788 * mem-break.h: New file.
14789 * Makefile.in: Add mem-break.o rule; update server.h
14790 dependencies.
14791 * inferiors.c (struct inferior_info): Add target_data
14792 member.
14793 (clear_inferiors): Free target_data member if set.
14794 (inferior_target_data, set_inferior_target_data): New functions.
14795 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14796 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14797 * linux-low.c (linux_bp_reinsert): New variable.
14798 (struct inferior_linux_data): New.
14799 (linux_create_inferior): Use set_inferior_target_data.
14800 (linux_attach): Likewise. Call add_inferior.
14801 (linux_wait_for_one_inferior): New function.
14802 (linux_wait): Call it.
14803 (linux_write_memory): Add const.
14804 (initialize_low): Call set_breakpoint_data.
14805 * linux-low.h (struct linux_target_ops): Add breakpoint
14806 handling members.
14807 * server.c (attach_inferior): Remove extra add_inferior
14808 call.
14809 * server.h: Include mem-break.h. Update inferior.c
14810 prototypes.
14811 * target.c (read_inferior_memory)
14812 (write_inferior_memory): New functions.
14813 * target.h (read_inferior_memory)
14814 (write_inferior_memory): Change macros to prototypes.
14815 (struct target_ops): Update comments. Add const to write_memory
14816 definition.
14817
148182002-04-11 Daniel Jacobowitz <drow@mvista.com>
14819
14820 * linux-low.c (usr_store_inferior_registers): Support
14821 registers which are allowed to fail to store.
14822 * linux-low.h (linux_target_ops): Likewise.
14823 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14824 (ppc_cannot_store_register): FPSCR may not be storable.
14825
148262002-04-09 Daniel Jacobowitz <drow@mvista.com>
14827
14828 * server.h: Include <string.h> if HAVE_STRING_H.
14829 * ChangeLog: Correct paths in last ChangeLog entry.
14830
148312002-04-09 Daniel Jacobowitz <drow@mvista.com>
14832
14833 * linux-low.h: Remove obsolete prototypes.
14834 (struct linux_target_ops): New.
14835 (extern the_low_target): New.
14836 * linux-low.c (num_regs, regmap): Remove declarations.
14837 (register_addr): Use the_low_target explicitly.
14838 (fetch_register): Likewise.
14839 (usr_fetch_inferior_registers): Likewise.
14840 (usr_store_inferior_registers): Likewise.
14841 * linux-arm-low.c (num_regs): Remove.
14842 (arm_num_regs): Define.
14843 (arm_regmap): Renamed from regmap, made static.
14844 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14845 made static.
14846 (arm_cannot_store_register): Renamed from cannot_store_register,
14847 made static.
14848 (the_low_target): New.
14849 * linux-i386-low.c (num_regs): Remove.
14850 (i386_num_regs): Define.
14851 (i386_regmap): Renamed from regmap, made static.
14852 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14853 made static.
14854 (i386_cannot_store_register): Renamed from cannot_store_register,
14855 made static.
14856 (the_low_target): New.
14857 * linux-ia64-low.c (num_regs): Remove.
14858 (ia64_num_regs): Define.
14859 (ia64_regmap): Renamed from regmap, made static.
14860 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14861 made static.
14862 (ia64_cannot_store_register): Renamed from cannot_store_register,
14863 made static.
14864 (the_low_target): New.
14865 * linux-m68k-low.c (num_regs): Remove.
14866 (m68k_num_regs): Define.
14867 (m68k_regmap): Renamed from regmap, made static.
14868 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14869 made static.
14870 (m68k_cannot_store_register): Renamed from cannot_store_register,
14871 made static.
14872 (the_low_target): New.
14873 * linux-mips-low.c (num_regs): Remove.
14874 (mips_num_regs): Define.
14875 (mips_regmap): Renamed from regmap, made static.
14876 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14877 made static.
14878 (mips_cannot_store_register): Renamed from cannot_store_register,
14879 made static.
14880 (the_low_target): New.
14881 * linux-ppc-low.c (num_regs): Remove.
14882 (ppc_num_regs): Define.
14883 (ppc_regmap): Renamed from regmap, made static.
14884 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14885 made static.
14886 (ppc_cannot_store_register): Renamed from cannot_store_register,
14887 made static.
14888 (the_low_target): New.
14889 * linux-s390-low.c (num_regs): Remove.
14890 (s390_num_regs): Define.
14891 (s390_regmap): Renamed from regmap, made static.
14892 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14893 made static.
14894 (s390_cannot_store_register): Renamed from cannot_store_register,
14895 made static.
14896 (the_low_target): New.
14897 * linux-sh-low.c (num_regs): Remove.
14898 (sh_num_regs): Define.
14899 (sh_regmap): Renamed from regmap, made static.
14900 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14901 made static.
14902 (sh_cannot_store_register): Renamed from cannot_store_register,
14903 made static.
14904 (the_low_target): New.
14905 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14906 (the_low_target): New.
14907
149082002-04-09 Daniel Jacobowitz <drow@mvista.com>
14909
14910 * Makefile.in: Add stamp-h target.
14911 * configure.in: Create stamp-h.
14912 * configure: Regenerated.
14913
149142002-04-09 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * inferiors.c: New file.
14917 * target.c: New file.
14918 * target.h: New file.
14919 * Makefile.in: Add target.o and inferiors.o. Update
14920 dependencies.
14921 * linux-low.c (inferior_pid): New static variable,
14922 moved from server.c.
14923 (linux_create_inferior): Renamed from create_inferior.
14924 Call add_inferior. Return 0 on success instead of a PID.
14925 (linux_attach): Renamed from myattach.
14926 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14927 (linux_thread_alive): Renamed from mythread_alive.
14928 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14929 child dies.
14930 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14931 (regsets_store_inferior_registers): Correct error message.
14932 Add missing ``return 0''.
14933 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14934 (linux_store_registers): Renamed from store_inferior_registers.
14935 (linux_read_memory): Renamed from read_inferior_memory.
14936 (linux_write_memory): Renamed from write_inferior_memory.
14937 (linux_target_ops): New structure.
14938 (initialize_low): Call set_target_ops ().
14939 * remote-utils.c (unhexify): New function.
14940 (hexify): New function.
14941 (input_interrupt): Send signals to ``signal_pid''.
14942 * server.c (inferior_pid): Remove.
14943 (start_inferior): Update create_inferior call.
14944 (attach_inferior): Call add_inferior.
14945 (handle_query): New function.
14946 (main): Call handle_query for `q' packets.
14947 * server.h: Include "target.h". Remove obsolete prototypes.
14948 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14949
149502002-04-09 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * Makefile.in: Add WARN_CFLAGS. Update configury
14953 dependencies.
14954 * configure.in: Check for <string.h>
14955 * configure: Regenerate.
14956 * config.in: Regenerate.
14957 * gdbreplay.c: Include needed system headers.
14958 (remote_open): Remove strchr prototype.
14959 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14960 * regcache.c (supply_register): Change buf argument to const void *.
14961 (supply_register_by_name): Likewise.
14962 (collect_register): Change buf argument to void *.
14963 (collect_register_by_name): Likewise.
14964 * regcache.h: Add missing prototypes.
14965 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14966 * server.c (handle_query): New function.
14967 (attached): New static variable, moved out of main.
14968 (main): Quiet longjmp clobber warnings.
14969 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14970 * utils.c (error): Remove NORETURN.
14971 (fatal): Likewise.
This page took 3.807267 seconds and 4 git commands to generate.