Skip to content

Commit

Permalink
Set the disasm default symbolically
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Feb 8, 2022
1 parent ae197a8 commit e3ee3a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion libdtrace/dt_dis.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ extern "C" {
* The values can be combined to select multiple listings. The '-S' option
* must also be supplied in order for disassembler output to be generated.
*/
#define DT_DISASM_OPT_CLAUSE 1 /* default */
#define DT_DISASM_OPT_CLAUSE 1
#define DT_DISASM_OPT_PROG 2
#define DT_DISASM_OPT_PROG_LINKED 4
#define DT_DISASM_OPT_PROG_FINAL 8

#define DT_DISASM_OPT_DEFAULT DT_DISASM_OPT_CLAUSE

/*
* Macros to make a call to the disassembler for specific disassembler listings.
*/
Expand Down
5 changes: 3 additions & 2 deletions libdtrace/dt_open.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
Expand Down Expand Up @@ -36,6 +36,7 @@
#include <dt_string.h>
#include <dt_provider.h>
#include <dt_probe.h>
#include <dt_dis.h>
#include <dt_peb.h>

const dt_version_t _dtrace_versions[] = {
Expand Down Expand Up @@ -728,7 +729,7 @@ dt_vopen(int version, int flags, int *errp,
dtp->dt_linktype = DT_LTYP_ELF;
dtp->dt_xlatemode = DT_XL_STATIC;
dtp->dt_stdcmode = DT_STDC_XA;
dtp->dt_disasm = 1;
dtp->dt_disasm = DT_DISASM_OPT_DEFAULT;
dtp->dt_version = version;
dtp->dt_cdefs_fd = -1;
dtp->dt_ddefs_fd = -1;
Expand Down

0 comments on commit e3ee3a6

Please sign in to comment.