Print this page
3946 ::gcore
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libproc/common/Pservice.c
          +++ new/usr/src/lib/libproc/common/Pservice.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright (c) 2013 by Delphix. All rights reserved.
       27 + */
  25   28  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   29  #include <stdarg.h>
  29   30  #include <string.h>
  30   31  #include "Pcontrol.h"
  31   32  
  32   33  /*
  33   34   * This file implements the process services declared in <proc_service.h>.
  34   35   * This enables libproc to be used in conjunction with libc_db and
  35   36   * librtld_db.  As most of these facilities are already provided by
  36   37   * (more elegant) interfaces in <libproc.h>, we can just call those.
  37   38   *
↓ open down ↓ 11 lines elided ↑ open up ↑
  49   50  ps_err_e
  50   51  ps_pdmodel(struct ps_prochandle *P, int *modelp)
  51   52  {
  52   53          *modelp = P->status.pr_dmodel;
  53   54          return (PS_OK);
  54   55  }
  55   56  
  56   57  ps_err_e
  57   58  ps_pread(struct ps_prochandle *P, psaddr_t addr, void *buf, size_t size)
  58   59  {
  59      -        if (P->ops->p_pread(P, buf, size, addr) != size)
       60 +        if (P->ops.pop_pread(P, buf, size, addr, P->data) != size)
  60   61                  return (PS_BADADDR);
  61   62          return (PS_OK);
  62   63  }
  63   64  
  64   65  ps_err_e
  65   66  ps_pwrite(struct ps_prochandle *P, psaddr_t addr, const void *buf, size_t size)
  66   67  {
  67      -        if (P->ops->p_pwrite(P, buf, size, addr) != size)
       68 +        if (P->ops.pop_pwrite(P, buf, size, addr, P->data) != size)
  68   69                  return (PS_BADADDR);
  69   70          return (PS_OK);
  70   71  }
  71   72  
  72   73  /*
  73   74   * libc_db calls matched pairs of ps_pstop()/ps_pcontinue()
  74   75   * in the belief that the client may have left the process
  75   76   * running while calling in to the libc_db interfaces.
  76   77   *
  77   78   * We interpret the meaning of these functions to be an inquiry
↓ open down ↓ 300 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX