1 |
diff --git gdb/Makefile.in gdb/Makefile.in |
2 |
index 13627e07e0..a72fd8fe0f 100644 |
3 |
--- gdb/Makefile.in |
4 |
+++ gdb/Makefile.in |
5 |
@@ -236,7 +236,8 @@ INCGNU = -I$(srcdir)/gnulib/import -I$(GNULIB_BUILDDIR)/import |
6 |
|
7 |
# Generated headers in the gnulib directory. These must be listed |
8 |
# so that they are generated before other files are compiled. |
9 |
-GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@ |
10 |
+GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h \ |
11 |
+ $(GNULIB_BUILDDIR)/import/alloca.h @GNULIB_STDINT_H@ |
12 |
|
13 |
# |
14 |
# CLI sub directory definitons |
15 |
@@ -643,6 +644,7 @@ TARGET_OBS = @TARGET_OBS@ |
16 |
# All target-dependent objects files that require 64-bit CORE_ADDR |
17 |
# (used with --enable-targets=all --enable-64-bit-bfd). |
18 |
ALL_64_TARGET_OBS = \ |
19 |
+ aarch64-fbsd-kern.o \ |
20 |
aarch64-fbsd-tdep.o \ |
21 |
aarch64-linux-tdep.o \ |
22 |
aarch64-newlib-tdep.o \ |
23 |
@@ -656,6 +658,7 @@ ALL_64_TARGET_OBS = \ |
24 |
amd64-darwin-tdep.o \ |
25 |
amd64-dicos-tdep.o \ |
26 |
amd64-fbsd-tdep.o \ |
27 |
+ amd64fbsd-kern.o \ |
28 |
amd64-linux-tdep.o \ |
29 |
amd64-nbsd-tdep.o \ |
30 |
amd64-obsd-tdep.o \ |
31 |
@@ -670,6 +673,7 @@ ALL_64_TARGET_OBS = \ |
32 |
ia64-vms-tdep.o \ |
33 |
mips64-obsd-tdep.o \ |
34 |
sparc64-fbsd-tdep.o \ |
35 |
+ sparc64fbsd-kern.o \ |
36 |
sparc64-linux-tdep.o \ |
37 |
sparc64-nbsd-tdep.o \ |
38 |
sparc64-obsd-tdep.o \ |
39 |
@@ -685,6 +689,7 @@ ALL_TARGET_OBS = \ |
40 |
arch/i386.o \ |
41 |
arch/ppc-linux-common.o \ |
42 |
arm-bsd-tdep.o \ |
43 |
+ arm-fbsd-kern.o \ |
44 |
arm-fbsd-tdep.o \ |
45 |
arm-linux-tdep.o \ |
46 |
arm-nbsd-tdep.o \ |
47 |
@@ -699,6 +704,8 @@ ALL_TARGET_OBS = \ |
48 |
cris-linux-tdep.o \ |
49 |
cris-tdep.o \ |
50 |
dicos-tdep.o \ |
51 |
+ fbsd-kld.o \ |
52 |
+ fbsd-kthr.o \ |
53 |
fbsd-tdep.o \ |
54 |
frv-linux-tdep.o \ |
55 |
frv-tdep.o \ |
56 |
@@ -715,6 +722,7 @@ ALL_TARGET_OBS = \ |
57 |
i386-darwin-tdep.o \ |
58 |
i386-dicos-tdep.o \ |
59 |
i386-fbsd-tdep.o \ |
60 |
+ i386fbsd-kern.o \ |
61 |
i386-gnu-tdep.o \ |
62 |
i386-go32-tdep.o \ |
63 |
i386-linux-tdep.o \ |
64 |
@@ -738,6 +746,7 @@ ALL_TARGET_OBS = \ |
65 |
mep-tdep.o \ |
66 |
microblaze-linux-tdep.o \ |
67 |
microblaze-tdep.o \ |
68 |
+ mipsfbsd-kern.o \ |
69 |
mips-fbsd-tdep.o \ |
70 |
mips-linux-tdep.o \ |
71 |
mips-nbsd-tdep.o \ |
72 |
@@ -755,6 +764,7 @@ ALL_TARGET_OBS = \ |
73 |
obsd-tdep.o \ |
74 |
or1k-tdep.o \ |
75 |
ppc-fbsd-tdep.o \ |
76 |
+ ppcfbsd-kern.o \ |
77 |
ppc-linux-tdep.o \ |
78 |
ppc-nbsd-tdep.o \ |
79 |
ppc-obsd-tdep.o \ |
80 |
@@ -1611,7 +1621,7 @@ generated_files = \ |
81 |
# Flags needed to compile Python code |
82 |
PYTHON_CFLAGS = @PYTHON_CFLAGS@ |
83 |
|
84 |
-all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb |
85 |
+all: gdb$(EXEEXT) kgdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb |
86 |
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do |
87 |
|
88 |
# Rule for compiling .c files in the top-level gdb directory. |
89 |
@@ -1924,6 +1934,12 @@ ifneq ($(CODESIGN_CERT),) |
90 |
$(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT) |
91 |
endif |
92 |
|
93 |
+kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) |
94 |
+ rm -f kgdb$(EXEEXT) |
95 |
+ $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ |
96 |
+ -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \ |
97 |
+ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) |
98 |
+ |
99 |
# Convenience rule to handle recursion. |
100 |
$(LIBGNU) $(GNULIB_H): all-lib |
101 |
all-lib: $(GNULIB_BUILDDIR)/Makefile |
102 |
@@ -1968,7 +1984,7 @@ clean mostlyclean: $(CONFIG_CLEAN) |
103 |
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do |
104 |
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp |
105 |
rm -f init.c version.c |
106 |
- rm -f gdb$(EXEEXT) core make.log |
107 |
+ rm -f gdb$(EXEEXT) core make.log kgdb$(EXEEXT) |
108 |
rm -f gdb[0-9]$(EXEEXT) |
109 |
rm -f test-cp-name-parser$(EXEEXT) |
110 |
rm -f xml-builtin.c stamp-xml |
111 |
@@ -2183,6 +2199,7 @@ MAKEOVERRIDES = |
112 |
|
113 |
ALLDEPFILES = \ |
114 |
aarch64-fbsd-nat.c \ |
115 |
+ aarch64-fbsd-kern.c \ |
116 |
aarch64-fbsd-tdep.c \ |
117 |
aarch64-linux-nat.c \ |
118 |
aarch64-linux-tdep.c \ |
119 |
@@ -2200,6 +2217,7 @@ ALLDEPFILES = \ |
120 |
amd64-bsd-nat.c \ |
121 |
amd64-darwin-tdep.c \ |
122 |
amd64-dicos-tdep.c \ |
123 |
+ amd64fbsd-kern.c \ |
124 |
amd64-fbsd-nat.c \ |
125 |
amd64-fbsd-tdep.c \ |
126 |
amd64-linux-nat.c \ |
127 |
@@ -2214,6 +2232,7 @@ ALLDEPFILES = \ |
128 |
arc-tdep.c \ |
129 |
arm.c \ |
130 |
arm-bsd-tdep.c \ |
131 |
+ arm-fbsd-kern.c \ |
132 |
arm-fbsd-nat.c \ |
133 |
arm-fbsd-tdep.c \ |
134 |
arm-get-next-pcs.c \ |
135 |
@@ -2233,6 +2252,9 @@ ALLDEPFILES = \ |
136 |
darwin-nat.c \ |
137 |
dicos-tdep.c \ |
138 |
exec.c \ |
139 |
+ fbsd-kld.c \ |
140 |
+ fbsd-kthr.c \ |
141 |
+ fbsd-kvm.c \ |
142 |
fbsd-nat.c \ |
143 |
fbsd-tdep.c \ |
144 |
fork-child.c \ |
145 |
@@ -2254,6 +2276,7 @@ ALLDEPFILES = \ |
146 |
i386-darwin-nat.c \ |
147 |
i386-darwin-tdep.c \ |
148 |
i386-dicos-tdep.c \ |
149 |
+ i386fbsd-kern.c \ |
150 |
i386-fbsd-nat.c \ |
151 |
i386-fbsd-tdep.c \ |
152 |
i386-gnu-nat.c \ |
153 |
@@ -2293,6 +2316,7 @@ ALLDEPFILES = \ |
154 |
mingw-hdep.c \ |
155 |
mips-fbsd-nat.c \ |
156 |
mips-fbsd-tdep.c \ |
157 |
+ mipsfbsd-kern.c \ |
158 |
mips-linux-nat.c \ |
159 |
mips-linux-tdep.c \ |
160 |
mips-nbsd-nat.c \ |
161 |
@@ -2310,6 +2334,7 @@ ALLDEPFILES = \ |
162 |
obsd-nat.c \ |
163 |
obsd-tdep.c \ |
164 |
posix-hdep.c \ |
165 |
+ ppcfbsd-kern.c \ |
166 |
ppc-fbsd-nat.c \ |
167 |
ppc-fbsd-tdep.c \ |
168 |
ppc-linux-nat.c \ |
169 |
@@ -2355,6 +2380,7 @@ ALLDEPFILES = \ |
170 |
sparc-sol2-nat.c \ |
171 |
sparc-sol2-tdep.c \ |
172 |
sparc-tdep.c \ |
173 |
+ sparc64fbsd-kern.c \ |
174 |
sparc64-fbsd-nat.c \ |
175 |
sparc64-fbsd-tdep.c \ |
176 |
sparc64-linux-nat.c \ |
177 |
@@ -2643,7 +2669,7 @@ endif |
178 |
|
179 |
# A list of all the objects we might care about in this build, for |
180 |
# dependency tracking. |
181 |
-all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \ |
182 |
+all_object_files = kgdb-main.o gdb.o $(LIBGDB_OBS) gdbtk-main.o \ |
183 |
test-cp-name-parser.o |
184 |
|
185 |
# All the .deps files to include. |
186 |
diff --git gdb/config.in gdb/config.in |
187 |
index 527290296e..8e0e90fd67 100644 |
188 |
--- gdb/config.in |
189 |
+++ gdb/config.in |
190 |
@@ -228,6 +228,9 @@ |
191 |
/* Define to 1 if your system has the kinfo_getvmmap function. */ |
192 |
#undef HAVE_KINFO_GETVMMAP |
193 |
|
194 |
+/* Define to 1 if your system has the kvm_open2 function. */ |
195 |
+#undef HAVE_KVM_OPEN2 |
196 |
+ |
197 |
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ |
198 |
#undef HAVE_LANGINFO_CODESET |
199 |
|
200 |
diff --git gdb/configure gdb/configure |
201 |
index 3849b9494f..18d2e363dc 100755 |
202 |
--- gdb/configure |
203 |
+++ gdb/configure |
204 |
@@ -8082,6 +8082,66 @@ $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h |
205 |
fi |
206 |
|
207 |
|
208 |
+# kgdb needs kvm_open2 for cross-debugging |
209 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open2" >&5 |
210 |
+$as_echo_n "checking for library containing kvm_open2... " >&6; } |
211 |
+if test "${ac_cv_search_kvm_open2+set}" = set; then : |
212 |
+ $as_echo_n "(cached) " >&6 |
213 |
+else |
214 |
+ ac_func_search_save_LIBS=$LIBS |
215 |
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
216 |
+/* end confdefs.h. */ |
217 |
+ |
218 |
+/* Override any GCC internal prototype to avoid an error. |
219 |
+ Use char because int might match the return type of a GCC |
220 |
+ builtin and then its argument prototype would still apply. */ |
221 |
+#ifdef __cplusplus |
222 |
+extern "C" |
223 |
+#endif |
224 |
+char kvm_open2 (); |
225 |
+int |
226 |
+main () |
227 |
+{ |
228 |
+return kvm_open2 (); |
229 |
+ ; |
230 |
+ return 0; |
231 |
+} |
232 |
+_ACEOF |
233 |
+for ac_lib in '' kvm; do |
234 |
+ if test -z "$ac_lib"; then |
235 |
+ ac_res="none required" |
236 |
+ else |
237 |
+ ac_res=-l$ac_lib |
238 |
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
239 |
+ fi |
240 |
+ if ac_fn_c_try_link "$LINENO"; then : |
241 |
+ ac_cv_search_kvm_open2=$ac_res |
242 |
+fi |
243 |
+rm -f core conftest.err conftest.$ac_objext \ |
244 |
+ conftest$ac_exeext |
245 |
+ if test "${ac_cv_search_kvm_open2+set}" = set; then : |
246 |
+ break |
247 |
+fi |
248 |
+done |
249 |
+if test "${ac_cv_search_kvm_open2+set}" = set; then : |
250 |
+ |
251 |
+else |
252 |
+ ac_cv_search_kvm_open2=no |
253 |
+fi |
254 |
+rm conftest.$ac_ext |
255 |
+LIBS=$ac_func_search_save_LIBS |
256 |
+fi |
257 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open2" >&5 |
258 |
+$as_echo "$ac_cv_search_kvm_open2" >&6; } |
259 |
+ac_res=$ac_cv_search_kvm_open2 |
260 |
+if test "$ac_res" != no; then : |
261 |
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
262 |
+ |
263 |
+$as_echo "#define HAVE_KVM_OPEN2 1" >>confdefs.h |
264 |
+ |
265 |
+fi |
266 |
+ |
267 |
+ |
268 |
|
269 |
if test "X$prefix" = "XNONE"; then |
270 |
acl_final_prefix="$ac_default_prefix" |
271 |
diff --git gdb/configure.ac gdb/configure.ac |
272 |
index 4c20ea5178..df156b484f 100644 |
273 |
--- gdb/configure.ac |
274 |
+++ gdb/configure.ac |
275 |
@@ -534,6 +534,11 @@ AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd, |
276 |
[AC_DEFINE(HAVE_KINFO_GETFILE, 1, |
277 |
[Define to 1 if your system has the kinfo_getfile function. ])]) |
278 |
|
279 |
+# kgdb needs kvm_open2 for cross-debugging |
280 |
+AC_SEARCH_LIBS(kvm_open2, kvm, |
281 |
+ [AC_DEFINE(HAVE_KVM_OPEN2, 1, |
282 |
+ [Define to 1 if your system has the kvm_open2 function. ])]) |
283 |
+ |
284 |
AM_ICONV |
285 |
|
286 |
# GDB may fork/exec the iconv program to get the list of supported character |
287 |
diff --git gdb/configure.nat gdb/configure.nat |
288 |
index 7611266d86..8656015365 100644 |
289 |
--- gdb/configure.nat |
290 |
+++ gdb/configure.nat |
291 |
@@ -62,7 +62,8 @@ case ${gdb_host} in |
292 |
LOADLIBES='-ldl $(RDYNAMIC)' |
293 |
;; |
294 |
fbsd*) |
295 |
- NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o' |
296 |
+ NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o \ |
297 |
+ fbsd-kvm.o' |
298 |
HAVE_NATIVE_GCORE_HOST=1 |
299 |
LOADLIBES='-lkvm' |
300 |
;; |
301 |
diff --git gdb/configure.tgt gdb/configure.tgt |
302 |
index f197160896..ced1140328 100644 |
303 |
--- gdb/configure.tgt |
304 |
+++ gdb/configure.tgt |
305 |
@@ -94,7 +94,7 @@ esac |
306 |
|
307 |
case "${targ}" in |
308 |
*-*-freebsd* | *-*-kfreebsd*-gnu) |
309 |
- os_obs="fbsd-tdep.o solib-svr4.o";; |
310 |
+ os_obs="fbsd-tdep.o solib-svr4.o fbsd-kld.o fbsd-kthr.o";; |
311 |
*-*-netbsd* | *-*-knetbsd*-gnu) |
312 |
os_obs="nbsd-tdep.o solib-svr4.o";; |
313 |
*-*-openbsd*) |
314 |
@@ -111,7 +111,7 @@ aarch64*-*-elf | aarch64*-*-rtems*) |
315 |
|
316 |
aarch64*-*-freebsd*) |
317 |
# Target: FreeBSD/aarch64 |
318 |
- gdb_target_obs="aarch64-fbsd-tdep.o" |
319 |
+ gdb_target_obs="aarch64-fbsd-tdep.o aarch64-fbsd-kern.o" |
320 |
;; |
321 |
|
322 |
aarch64*-*-linux*) |
323 |
@@ -164,7 +164,7 @@ arm*-*-linux*) |
324 |
;; |
325 |
arm*-*-freebsd*) |
326 |
# Target: FreeBSD/arm |
327 |
- gdb_target_obs="arm-fbsd-tdep.o" |
328 |
+ gdb_target_obs="arm-fbsd-tdep.o arm-fbsd-kern.o" |
329 |
;; |
330 |
arm*-*-netbsd* | arm*-*-knetbsd*-gnu) |
331 |
# Target: NetBSD/arm |
332 |
@@ -251,7 +251,11 @@ i[34567]86-*-dicos*) |
333 |
;; |
334 |
i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu) |
335 |
# Target: FreeBSD/i386 |
336 |
- gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o " |
337 |
+ gdb_target_obs="i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" |
338 |
+ if test "x$enable_64_bit_bfd" = "xyes"; then |
339 |
+ # Target: FreeBSD amd64 |
340 |
+ gdb_target_obs="amd64fbsd-tdep.o amd64fbsd-kern.o ${gdb_target_obs}" |
341 |
+ fi |
342 |
;; |
343 |
i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu) |
344 |
# Target: NetBSD/i386 |
345 |
@@ -405,7 +409,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu) |
346 |
;; |
347 |
mips*-*-freebsd*) |
348 |
# Target: MIPS running FreeBSD |
349 |
- gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o" |
350 |
+ gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o mipsfbsd-kern.o" |
351 |
gdb_sim=../sim/mips/libsim.a |
352 |
;; |
353 |
mips64*-*-openbsd*) |
354 |
@@ -464,7 +468,7 @@ or1k-*-* | or1knd-*-*) |
355 |
powerpc*-*-freebsd*) |
356 |
# Target: FreeBSD/powerpc |
357 |
gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ |
358 |
- ppc-fbsd-tdep.o \ |
359 |
+ ppc-fbsd-tdep.o ppcfbsd-kern.o \ |
360 |
ravenscar-thread.o ppc-ravenscar-thread.o" |
361 |
;; |
362 |
|
363 |
@@ -587,6 +591,7 @@ sparc64-*-linux*) |
364 |
sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu) |
365 |
# Target: FreeBSD/sparc64 |
366 |
gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \ |
367 |
+ sparc64fbsd-kern.o \ |
368 |
ravenscar-thread.o sparc-ravenscar-thread.o" |
369 |
;; |
370 |
sparc-*-netbsd* | sparc-*-knetbsd*-gnu) |
371 |
@@ -709,8 +714,8 @@ x86_64-*-linux*) |
372 |
;; |
373 |
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) |
374 |
# Target: FreeBSD/amd64 |
375 |
- gdb_target_obs="amd64-fbsd-tdep.o ${i386_tobjs} \ |
376 |
- i386-bsd-tdep.o i386-fbsd-tdep.o" |
377 |
+ gdb_target_obs="amd64-fbsd-tdep.o amd64fbsd-kern.o ${i386_tobjs} \ |
378 |
+ i386-bsd-tdep.o i386-fbsd-tdep.o i386fbsd-kern.o" |
379 |
;; |
380 |
x86_64-*-mingw* | x86_64-*-cygwin*) |
381 |
# Target: MingW/amd64 |
382 |
diff --git gdb/defs.h gdb/defs.h |
383 |
index fc4217005a..3d2eb6b1e9 100644 |
384 |
--- gdb/defs.h |
385 |
+++ gdb/defs.h |
386 |
@@ -481,6 +481,7 @@ enum gdb_osabi |
387 |
GDB_OSABI_SOLARIS, |
388 |
GDB_OSABI_LINUX, |
389 |
GDB_OSABI_FREEBSD, |
390 |
+ GDB_OSABI_FREEBSD_KERNEL, |
391 |
GDB_OSABI_NETBSD, |
392 |
GDB_OSABI_OPENBSD, |
393 |
GDB_OSABI_WINCE, |
394 |
diff --git gdb/gnulib/configure gdb/gnulib/configure |
395 |
index a152abcb76..140c4ad6a8 100644 |
396 |
--- gdb/gnulib/configure |
397 |
+++ gdb/gnulib/configure |
398 |
@@ -17214,6 +17214,7 @@ else |
399 |
case "$host_os" in |
400 |
# Guess all is fine on glibc systems. |
401 |
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; |
402 |
+ freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; |
403 |
# If we don't know, assume the worst. |
404 |
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;; |
405 |
esac |
406 |
diff --git gdb/osabi.c gdb/osabi.c |
407 |
index 7d0540b181..c61c518652 100644 |
408 |
--- gdb/osabi.c |
409 |
+++ gdb/osabi.c |
410 |
@@ -66,6 +66,7 @@ static const struct osabi_names gdb_osabi_names[] = |
411 |
{ "Solaris", NULL }, |
412 |
{ "GNU/Linux", "linux(-gnu[^-]*)?" }, |
413 |
{ "FreeBSD", NULL }, |
414 |
+ { "FreeBSD/kernel", NULL }, |
415 |
{ "NetBSD", NULL }, |
416 |
{ "OpenBSD", NULL }, |
417 |
{ "WindowsCE", NULL }, |
418 |
diff --git gdb/regcache.c gdb/regcache.c |
419 |
index f3f845aad6..7ca007a422 100644 |
420 |
--- gdb/regcache.c |
421 |
+++ gdb/regcache.c |
422 |
@@ -1035,6 +1035,22 @@ reg_buffer::raw_supply_zeroed (int regnum) |
423 |
m_register_status[regnum] = REG_VALID; |
424 |
} |
425 |
|
426 |
+void |
427 |
+reg_buffer::raw_supply_unsigned (int regnum, ULONGEST val) |
428 |
+{ |
429 |
+ enum bfd_endian byte_order = gdbarch_byte_order (m_descr->gdbarch); |
430 |
+ gdb_byte *regbuf; |
431 |
+ size_t regsize; |
432 |
+ |
433 |
+ assert_regnum (regnum); |
434 |
+ |
435 |
+ regbuf = register_buffer (regnum); |
436 |
+ regsize = m_descr->sizeof_register[regnum]; |
437 |
+ |
438 |
+ store_unsigned_integer (regbuf, regsize, byte_order, val); |
439 |
+ m_register_status[regnum] = REG_VALID; |
440 |
+} |
441 |
+ |
442 |
/* See common/common-regcache.h. */ |
443 |
|
444 |
void |
445 |
diff --git gdb/regcache.h gdb/regcache.h |
446 |
index 4a45f33871..94f542c087 100644 |
447 |
--- gdb/regcache.h |
448 |
+++ gdb/regcache.h |
449 |
@@ -207,6 +207,8 @@ public: |
450 |
only LEN, without editing the rest of the register. */ |
451 |
void raw_supply_part (int regnum, int offset, int len, const gdb_byte *in); |
452 |
|
453 |
+ void raw_supply_unsigned (int regnum, ULONGEST val); |
454 |
+ |
455 |
void invalidate (int regnum); |
456 |
|
457 |
virtual ~reg_buffer () = default; |