Print this page
3440 librtld_db demos need warnings gagged


  62  *              the 'hex' value of address.
  63  *      FLG_PAP_PLTDECOM
  64  *              decompose the PLT symbol if possible
  65  */
  66 char *
  67 print_address_ps(struct ps_prochandle *ph, ulong_t address, unsigned flags)
  68 {
  69         static char     buf[256];
  70         GElf_Sym        sym;
  71         char            *str;
  72         ulong_t         val;
  73 
  74         if (addr_to_sym(ph, address, &sym, &str) == RET_OK) {
  75                 map_info_t      *mip;
  76                 ulong_t         pltbase;
  77 
  78                 if (flags & FLG_PAP_SONAME) {
  79                         /*
  80                          * Embed SOName in symbol name
  81                          */
  82                         if (mip = addr_to_map(ph, address)) {
  83                                 (void) strcpy(buf, mip->mi_name);
  84                                 (void) strcat(buf, ":");
  85                         } else
  86                                 (void) sprintf(buf, "0x%08lx:", address);
  87                 } else
  88                         buf[0] = '\0';
  89 
  90                 if ((flags & FLG_PAP_PLTDECOM) &&
  91                     (pltbase = is_plt(ph, address)) != 0) {
  92                         rd_plt_info_t   rp;
  93                         pstatus_t       pstatus;
  94 
  95                         if (pread(ph->pp_statusfd, &pstatus,
  96                             sizeof (pstatus), 0) == -1)
  97                                 perr("pap: reading pstatus");
  98 
  99                         if (rd_plt_resolution(ph->pp_rap, address,
 100                             pstatus.pr_lwp.pr_lwpid, pltbase,
 101                             &rp) == RD_OK) {
 102                                 if (rp.pi_flags & RD_FLG_PI_PLTBOUND) {




  62  *              the 'hex' value of address.
  63  *      FLG_PAP_PLTDECOM
  64  *              decompose the PLT symbol if possible
  65  */
  66 char *
  67 print_address_ps(struct ps_prochandle *ph, ulong_t address, unsigned flags)
  68 {
  69         static char     buf[256];
  70         GElf_Sym        sym;
  71         char            *str;
  72         ulong_t         val;
  73 
  74         if (addr_to_sym(ph, address, &sym, &str) == RET_OK) {
  75                 map_info_t      *mip;
  76                 ulong_t         pltbase;
  77 
  78                 if (flags & FLG_PAP_SONAME) {
  79                         /*
  80                          * Embed SOName in symbol name
  81                          */
  82                         if ((mip = addr_to_map(ph, address)) != 0) {
  83                                 (void) strcpy(buf, mip->mi_name);
  84                                 (void) strcat(buf, ":");
  85                         } else
  86                                 (void) sprintf(buf, "0x%08lx:", address);
  87                 } else
  88                         buf[0] = '\0';
  89 
  90                 if ((flags & FLG_PAP_PLTDECOM) &&
  91                     (pltbase = is_plt(ph, address)) != 0) {
  92                         rd_plt_info_t   rp;
  93                         pstatus_t       pstatus;
  94 
  95                         if (pread(ph->pp_statusfd, &pstatus,
  96                             sizeof (pstatus), 0) == -1)
  97                                 perr("pap: reading pstatus");
  98 
  99                         if (rd_plt_resolution(ph->pp_rap, address,
 100                             pstatus.pr_lwp.pr_lwpid, pltbase,
 101                             &rp) == RD_OK) {
 102                                 if (rp.pi_flags & RD_FLG_PI_PLTBOUND) {