If no count is not entered, and the target address is the starting address
of a function, disassemble the entire function.
However this is only true, if the given target is symbolic.

This patch simply removes that restriction when the target is a hexadecimal
address:

For example, each of the following commands will return the same result.

 - Where 0xffffffff80137e9d is assumed to be the address of the
   first instruction in do_fork()

  crash> dis 0xffffffff80137e9d
  crash> dis do_fork

Signed-off-by: Aaron Tomlin <[email protected]>
---
 kernel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel.c b/kernel.c
index 4932282..628779c 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1436,6 +1436,8 @@ cmd_dis(void)
                                        req->addr);
                                unfiltered = TRUE;
                        }
+                       if (!offset)
+                               req->flags |= GNU_FUNCTION_ONLY;
                 } else if ((sp = symbol_search(args[optind]))) {
                         req->addr = sp->value;
                        req->flags |= GNU_FUNCTION_ONLY;
-- 
2.4.3

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to