On Mon, 30 May 2011 12:28:17 -0400 Mike Frysinger <[email protected]> wrote:
>
> i prefer to have as much outside of ifdefs as possible.  gcc optimizes
> the result away, so it isnt a code size problem.

Can we just get a patch sent to Linus, please?   His tree has now been
broken for powerpc and sparc32 for 5 days :-(

It would have been nice if the original patch had been in linux-next at
some point (especially given that I have a "kgdb" tree in linux-next).

/me just slightly annoyed.

Linus, the fix patch is below (I have applied it to linux-next today):

From:   Mike Frysinger <[email protected]>
To:     [email protected],
        Jason Wessel <[email protected]>,
        Andrew Morton <[email protected]>
Cc:     [email protected], [email protected]
Subject: [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
Date:   Sat, 28 May 2011 10:04:25 -0400

The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger <[email protected]>
---
 drivers/misc/kgdbts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index b0c5631..8cebec5 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
                return 1;
        }
        /* Readjust the instruction pointer if needed */
-       instruction_pointer_set(&kgdbts_regs, ip + offset);
+       ip += offset;
+#ifdef GDB_ADJUSTS_BREAK_OFFSET
+       instruction_pointer_set(&kgdbts_regs, ip);
+#endif
        return 0;
 }
 
-- 
1.7.5.rc3

-- 
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to