|
|
f96e0b |
From 03976ab690ee925d6bd752c6996856dbf0a40a74 Mon Sep 17 00:00:00 2001
|
|
|
f96e0b |
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
Date: Sun, 10 Mar 2013 18:36:39 +0100
|
|
|
f96e0b |
Subject: [PATCH 203/482] Adjust types in gdb module to have intended
|
|
|
f96e0b |
unsigned shifts rather than signed divisions.
|
|
|
f96e0b |
|
|
|
f96e0b |
---
|
|
|
f96e0b |
ChangeLog | 5 +++++
|
|
|
f96e0b |
grub-core/gdb/cstub.c | 4 ++--
|
|
|
f96e0b |
grub-core/gdb/i386/signal.c | 2 +-
|
|
|
f96e0b |
include/grub/gdb.h | 2 +-
|
|
|
f96e0b |
4 files changed, 9 insertions(+), 4 deletions(-)
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/ChangeLog b/ChangeLog
|
|
|
f96e0b |
index 931ae8e..51bc363 100644
|
|
|
f96e0b |
--- a/ChangeLog
|
|
|
f96e0b |
+++ b/ChangeLog
|
|
|
f96e0b |
@@ -1,5 +1,10 @@
|
|
|
f96e0b |
2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
|
|
|
f96e0b |
+ Adjust types in gdb module to have intended unsigned shifts rather than
|
|
|
f96e0b |
+ signed divisions.
|
|
|
f96e0b |
+
|
|
|
f96e0b |
+2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
f96e0b |
+
|
|
|
f96e0b |
* grub-core/fs/hfs.c (grub_hfs_read_file): Avoid divmod64 since the
|
|
|
f96e0b |
maximum size is 4G - 1 on hfs
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/grub-core/gdb/cstub.c b/grub-core/gdb/cstub.c
|
|
|
f96e0b |
index a5c0c43..3c89c19 100644
|
|
|
f96e0b |
--- a/grub-core/gdb/cstub.c
|
|
|
f96e0b |
+++ b/grub-core/gdb/cstub.c
|
|
|
f96e0b |
@@ -204,7 +204,7 @@ grub_gdb_hex2int (char **ptr, grub_uint64_t *int_value)
|
|
|
f96e0b |
void
|
|
|
f96e0b |
grub_gdb_trap (int trap_no)
|
|
|
f96e0b |
{
|
|
|
f96e0b |
- int sig_no;
|
|
|
f96e0b |
+ unsigned int sig_no;
|
|
|
f96e0b |
int stepping;
|
|
|
f96e0b |
grub_uint64_t addr;
|
|
|
f96e0b |
grub_uint64_t length;
|
|
|
f96e0b |
@@ -264,7 +264,7 @@ grub_gdb_trap (int trap_no)
|
|
|
f96e0b |
case '?':
|
|
|
f96e0b |
grub_gdb_outbuf[0] = 'S';
|
|
|
f96e0b |
grub_gdb_outbuf[1] = hexchars[sig_no >> 4];
|
|
|
f96e0b |
- grub_gdb_outbuf[2] = hexchars[sig_no % 16];
|
|
|
f96e0b |
+ grub_gdb_outbuf[2] = hexchars[sig_no & 0xf];
|
|
|
f96e0b |
grub_gdb_outbuf[3] = 0;
|
|
|
f96e0b |
break;
|
|
|
f96e0b |
|
|
|
f96e0b |
diff --git a/grub-core/gdb/i386/signal.c b/grub-core/gdb/i386/signal.c
|
|
|
f96e0b |
index 23b7c35..1ac3bbd 100644
|
|
|
f96e0b |
--- a/grub-core/gdb/i386/signal.c
|
|
|
f96e0b |
+++ b/grub-core/gdb/i386/signal.c
|
|
|
f96e0b |
@@ -24,7 +24,7 @@
|
|
|
f96e0b |
|
|
|
f96e0b |
/* Converting CPU trap number to UNIX signal number as
|
|
|
f96e0b |
described in System V ABI i386 Processor Supplement, 3-25. */
|
|
|
f96e0b |
-int
|
|
|
f96e0b |
+unsigned int
|
|
|
f96e0b |
grub_gdb_trap2sig (int trap_no)
|
|
|
f96e0b |
{
|
|
|
f96e0b |
const int signals[] = {
|
|
|
f96e0b |
diff --git a/include/grub/gdb.h b/include/grub/gdb.h
|
|
|
f96e0b |
index 59fd456..e73d135 100644
|
|
|
f96e0b |
--- a/include/grub/gdb.h
|
|
|
f96e0b |
+++ b/include/grub/gdb.h
|
|
|
f96e0b |
@@ -33,7 +33,7 @@ struct grub_serial_port;
|
|
|
f96e0b |
extern struct grub_serial_port *grub_gdb_port;
|
|
|
f96e0b |
|
|
|
f96e0b |
void grub_gdb_breakpoint (void);
|
|
|
f96e0b |
-int grub_gdb_trap2sig (int);
|
|
|
f96e0b |
+unsigned int grub_gdb_trap2sig (int);
|
|
|
f96e0b |
|
|
|
f96e0b |
#endif /* ! GRUB_GDB_HEADER */
|
|
|
f96e0b |
|
|
|
f96e0b |
--
|
|
|
f96e0b |
1.8.2.1
|
|
|
f96e0b |
|