[PATCH] Fix bochs build failure with g++ 4.1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fix bochs build failure with g++ 4.1

Thiemo Seufer
Hello All,

the appended patch fixes a build failure with g++ 4.1.


Thiemo


2006-07-11  Thiemo Seufer  <[hidden email]>

        * cpu/sid-x86-cpu-wrapper.h, cpu/sid-x86-cpu-wrapper.h (get_pc):
        Implement function.

Index: sid/component/bochs/cpu/sid-x86-cpu-wrapper.cc
===================================================================
RCS file: /cvs/src/src/sid/component/bochs/cpu/sid-x86-cpu-wrapper.cc,v
retrieving revision 1.2
diff -u -p -r1.2 sid-x86-cpu-wrapper.cc
--- sid/component/bochs/cpu/sid-x86-cpu-wrapper.cc 4 Mar 2002 23:33:01 -0000 1.2
+++ sid/component/bochs/cpu/sid-x86-cpu-wrapper.cc 11 Jul 2006 12:51:58 -0000
@@ -167,6 +167,12 @@ x86_cpu::set_pc (sid::host_int_4 value)
   bx_cpu.eip = value - bx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.base;
 }
 
+sid::host_int_4
+x86_cpu::get_pc (void)
+{
+  return bx_cpu.eip;
+}
+
 string
 x86_cpu::dbg_get_reg(unsigned int reg)
 {
Index: sid/component/bochs/cpu/sid-x86-cpu-wrapper.h
===================================================================
RCS file: /cvs/src/src/sid/component/bochs/cpu/sid-x86-cpu-wrapper.h,v
retrieving revision 1.2
diff -u -p -r1.2 sid-x86-cpu-wrapper.h
--- sid/component/bochs/cpu/sid-x86-cpu-wrapper.h 4 Mar 2002 23:33:01 -0000 1.2
+++ sid/component/bochs/cpu/sid-x86-cpu-wrapper.h 11 Jul 2006 12:51:59 -0000
@@ -66,6 +66,7 @@ public:
   void reset ();
   void flush_icache ();
   void set_pc (sid::host_int_4 value);
+  sid::host_int_4 get_pc (void);
   string dbg_get_reg(unsigned int);
   component::status dbg_set_reg(unsigned int, const string &);