*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> disassembler (3)              
Title
Content
Arch
Section
 

disassembler(3)

Contents


NAME    [Toc]    [Back]

       disassembler - disassemble a machine instruction and print
       the results

SYNOPSIS    [Toc]    [Back]

       int disassembler(
               unsigned long iadr,
               int regstyle,
               char *(*get_symname)(unsigned long address),
               unsigned long (*get_regvalue)(unsigned regnum),
               unsigned (*get_bytes)(void),
               void (*print_header)(unsigned long iadr,  unsigned
       instruction) );

PARAMETERS    [Toc]    [Back]

       Specifies  the  instruction  address  to  be disassembled.
       Specifies how registers are named in the  disassembly;  if
       the  value is 0, compiler names are used; otherwise, hardware
 names are used.

       The next four arguments are  function  pointers,  most  of
       which  give  the caller some flexibility in the appearance
       of the disassembly. The only function that  must  be  provided
  is  get_bytes.   All  other functions are optional;
       pass a NULL for each that is not needed.  Is  called  with
       no  arguments and returns the next byte or bytes to disassemble.
  Is passed an address, which is the  target  of  a
       jmp,  jsr,  or  bsr instruction. If NULL is returned or if
       get_symname is NULL, the disassembler() routine prints the
       address; otherwise, the string name is printed as returned
       from get_symname.  If not NULL, is passed a register  number
 and returns the current contents of the specified register.
 The disassembler() routine prints this  information
       along  with  the instruction disassembly.  If not NULL, is
       passed  the  instruction  address  iadr  and  the  current
       instruction  to be disassembled, which is the return value
       from get_bytes.  Print_header can use these parameters  to
       print  any  desired information before the actual instruction
 disassembly is printed.

DESCRIPTION    [Toc]    [Back]

       The  disassembler()  routine  disassembles  and  prints  a
       machine instruction on stdout.

       The  program  must  be  linked with the object file access
       routine library libmld.a.

RETURN VALUES    [Toc]    [Back]

       If get_bytes is NULL, the disassembler()  routine  returns
       -1  and  errno  is set to EINVAL; otherwise, the number of
       bytes that were disassembled is returned.

SEE ALSO    [Toc]    [Back]

      
      
       ldfcn(4).



                                                  disassembler(3)
[ Back ]
 Similar pages
Name OS Title
disassembler IRIX disassemble a MIPS instruction and print the results
arch Linux print machine architecture
machinfo HP-UX print machine information
dis Tru64 Disassemble an object file
dis IRIX disassemble an object file
DtSearchSetMaxResults HP-UX Set the DtSearch maximum results value
iec Tru64 Instruction Emulator Control
m68k_sync_icache NetBSD instruction cache synchronization
CL_CertAbortQuery Tru64 Terminate a results handle (CDSA)
DtSearchGetMaxResults HP-UX Obtain the DtSearch maximum results value
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service