Skip to contentSkip to conversation

fix default size handling in monitor.

PATCH RESEND Applied Gleb Natapov 2 participants 2 messages Jun 23, 2008 – Oct 1, 2008

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 fix default size handling in monitor.

Hi,

If /i format is used once (with x/xp/p command) default_fmt_size is set
to -1 and subsequent commands of the form /x outputs nothing. Included patched fixes this by setting default_fmt_size only if the command is not of format /i.

---

monitor.c +1 -1
index 1eb8be1..4df4d87 100644
@@ -2270,8 +2270,8 @@ static void monitor_handle_command(const char *cmdline)
                         /* for 'i', not specifying a size gives -1 as size */
                         if (size < 0)
                             size = default_fmt_size;
+                        default_fmt_size = size;
                     }
-                    default_fmt_size = size;
                     default_fmt_format = format;
                 } else {
                     count = 1;

--
Gleb.

#1 lore raw
Quoted 6 lines · Gleb Natapov

Hi,

If /i format is used once (with x/xp/p command) default_fmt_size is set
to -1 and subsequent commands of the form /x outputs nothing. Included patched fixes this by setting default_fmt_size only if the command is not of format /i.

Applied, thanks.

Quoted 22 lines

---

monitor.c +1 -2
index 1eb8be1..4df4d87 100644
@@ -2270,8 +2270,8 @@ static void monitor_handle_command(const char *cmdline)
                         /* for 'i', not specifying a size gives -1 as size */
                         if (size < 0)
                             size = default_fmt_size;
+                        default_fmt_size = size;
                     }
-                    default_fmt_size = size;
                     default_fmt_format = format;
                 } else {
                     count = 1;
 
--

Gleb.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net