I am trying to access strings in user land which are pointed to
by a structure. It may be something simple that I'm missing.
The following are the applicable portions of my dtrace script.
#! /usr/sbin/dtrace -s
#pragma D option flowindent
typedef struct disk {
char *device_id; /* string encoded device id */
void *devid; /* decoded device id */
char *kernel_name; /* handles drives w/ no devlinks */
char *volm_path;
char *product_id;
char *vendor_id;
/*controller_t **controllers;
path_t **paths;
alias_t *aliases;
struct disk *next;
int drv_type;
int removable;
int sync_speed;
int rpm;
int wide;
int cd_rom;
int volm_path_set;*/
} disk_t;
disk_t *tmp_disk;
pid$target::match_fixed_name:entry
/self->trace/
{
trace("enter match_fixed_name");
self->disk = (disk_t *)arg0;
self->match_dname = (char *)arg1;
}
pid$target::match_fixed_name:return
/self->trace/
{
trace("return match_fixed_name");
printf("\ndevice name:%s",
copyinstr((uintptr_t)self->match_dname));
tmp_disk = (disk_t *)copyin((uintptr_t)self->disk,
sizeof(disk_t));
printf("\ndevice_id %s, kernel name: %s",
copyinstr((uintptr_t)tmp_disk->device_id),
copyinstr((uintptr_t)tmp_disk->kernel_name));
printf("\nreturn value: %u", (uint64_t)arg0);
}
The error I am receiving is:
dtrace: error on enabled probe ID 8 (ID 98061:
pid23834:libdiskmgt.so.1:match_fixed_name:return): invalid address
(0xff) in action #4 at DIF offset 20
Probe 8 is the match_fixed_name:return probe above.
Any pointers/RTFMs would be helpful.
Diane
--
Diane Fallier RPE
Phone: 781/442-1214 (x21214)
[EMAIL PROTECTED]
_______________________________________________
dtrace-discuss mailing list
[email protected]