Adjust types in gdb module to have intended unsigned shifts rather than

signed divisions.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-10 18:36:39 +01:00
parent 3dac5878ec
commit 3f2b4d1a81
4 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
Adjust types in gdb module to have intended unsigned shifts rather than
signed divisions.
2013-03-10 Vladimir Serbinenko <phcoder@gmail.com> 2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/hfs.c (grub_hfs_read_file): Avoid divmod64 since the * grub-core/fs/hfs.c (grub_hfs_read_file): Avoid divmod64 since the

View file

@ -204,7 +204,7 @@ grub_gdb_hex2int (char **ptr, grub_uint64_t *int_value)
void void
grub_gdb_trap (int trap_no) grub_gdb_trap (int trap_no)
{ {
int sig_no; unsigned int sig_no;
int stepping; int stepping;
grub_uint64_t addr; grub_uint64_t addr;
grub_uint64_t length; grub_uint64_t length;
@ -264,7 +264,7 @@ grub_gdb_trap (int trap_no)
case '?': case '?':
grub_gdb_outbuf[0] = 'S'; grub_gdb_outbuf[0] = 'S';
grub_gdb_outbuf[1] = hexchars[sig_no >> 4]; grub_gdb_outbuf[1] = hexchars[sig_no >> 4];
grub_gdb_outbuf[2] = hexchars[sig_no % 16]; grub_gdb_outbuf[2] = hexchars[sig_no & 0xf];
grub_gdb_outbuf[3] = 0; grub_gdb_outbuf[3] = 0;
break; break;

View file

@ -24,7 +24,7 @@
/* Converting CPU trap number to UNIX signal number as /* Converting CPU trap number to UNIX signal number as
described in System V ABI i386 Processor Supplement, 3-25. */ described in System V ABI i386 Processor Supplement, 3-25. */
int unsigned int
grub_gdb_trap2sig (int trap_no) grub_gdb_trap2sig (int trap_no)
{ {
const int signals[] = { const int signals[] = {

View file

@ -33,7 +33,7 @@ struct grub_serial_port;
extern struct grub_serial_port *grub_gdb_port; extern struct grub_serial_port *grub_gdb_port;
void grub_gdb_breakpoint (void); void grub_gdb_breakpoint (void);
int grub_gdb_trap2sig (int); unsigned int grub_gdb_trap2sig (int);
#endif /* ! GRUB_GDB_HEADER */ #endif /* ! GRUB_GDB_HEADER */