projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faf833c
)
Correctly handle phex(*,0) and phex_nz(*,0).
author
Andrew Cagney
<cagney@redhat.com>
Thu, 15 Nov 2001 18:35:05 +0000
(18:35 +0000)
committer
Andrew Cagney
<cagney@redhat.com>
Thu, 15 Nov 2001 18:35:05 +0000
(18:35 +0000)
gdb/ChangeLog
patch
|
blob
|
history
gdb/utils.c
patch
|
blob
|
history
diff --git
a/gdb/ChangeLog
b/gdb/ChangeLog
index 423084169e0efa3cf088809aeafca9101fc8aa2e..0475bfe0aee0e95bd19e792e36825dbe471b6c14 100644
(file)
--- a/
gdb/ChangeLog
+++ b/
gdb/ChangeLog
@@
-2,6
+2,7
@@
* utils.c (phex_nz): For default case, set str to phex_nz return
value.
+ (phex): Ditto.
2001-11-15 Andrew Cagney <ac131313@redhat.com>
diff --git
a/gdb/utils.c
b/gdb/utils.c
index 377547280b63381d2bf3ba6f8cd8d157f85e4967..ed1b2b7ba67c5e1bc5fa735e3d6e4acc1573cdd5 100644
(file)
--- a/
gdb/utils.c
+++ b/
gdb/utils.c
@@
-2418,22
+2418,25
@@
static int thirty_two = 32;
char *
phex (ULONGEST l, int sizeof_l)
{
- char *str
= get_cell ()
;
+ char *str;
switch (sizeof_l)
{
case 8:
+ str = get_cell ();
sprintf (str, "%08lx%08lx",
(unsigned long) (l >> thirty_two),
(unsigned long) (l & 0xffffffff));
break;
case 4:
+ str = get_cell ();
sprintf (str, "%08lx", (unsigned long) l);
break;
case 2:
+ str = get_cell ();
sprintf (str, "%04x", (unsigned short) (l & 0xffff));
break;
default:
- phex (l, sizeof (l));
+
str =
phex (l, sizeof (l));
break;
}
return str;