mdb_target.c (892ad162) mdb_target.c (9c3024a3)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 384 unchanged lines hidden (view full) ---

393mdb_tgt_aread(mdb_tgt_t *t, mdb_tgt_as_t as,
394 void *buf, size_t n, mdb_tgt_addr_t addr)
395{
396 if (t->t_flags & MDB_TGT_F_ASIO)
397 return (t->t_ops->t_aread(t, as, buf, n, addr));
398
399 switch ((uintptr_t)as) {
400 case (uintptr_t)MDB_TGT_AS_VIRT:
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 384 unchanged lines hidden (view full) ---

393mdb_tgt_aread(mdb_tgt_t *t, mdb_tgt_as_t as,
394 void *buf, size_t n, mdb_tgt_addr_t addr)
395{
396 if (t->t_flags & MDB_TGT_F_ASIO)
397 return (t->t_ops->t_aread(t, as, buf, n, addr));
398
399 switch ((uintptr_t)as) {
400 case (uintptr_t)MDB_TGT_AS_VIRT:
401 case (uintptr_t)MDB_TGT_AS_VIRT_I:
402 case (uintptr_t)MDB_TGT_AS_VIRT_S:
401 return (t->t_ops->t_vread(t, buf, n, addr));
402 case (uintptr_t)MDB_TGT_AS_PHYS:
403 return (t->t_ops->t_pread(t, buf, n, addr));
404 case (uintptr_t)MDB_TGT_AS_FILE:
405 return (t->t_ops->t_fread(t, buf, n, addr));
406 case (uintptr_t)MDB_TGT_AS_IO:
407 return (t->t_ops->t_ioread(t, buf, n, addr));
408 }

--- 7 unchanged lines hidden (view full) ---

416 if (!(t->t_flags & MDB_TGT_F_RDWR))
417 return (set_errno(EMDB_TGTRDONLY));
418
419 if (t->t_flags & MDB_TGT_F_ASIO)
420 return (t->t_ops->t_awrite(t, as, buf, n, addr));
421
422 switch ((uintptr_t)as) {
423 case (uintptr_t)MDB_TGT_AS_VIRT:
403 return (t->t_ops->t_vread(t, buf, n, addr));
404 case (uintptr_t)MDB_TGT_AS_PHYS:
405 return (t->t_ops->t_pread(t, buf, n, addr));
406 case (uintptr_t)MDB_TGT_AS_FILE:
407 return (t->t_ops->t_fread(t, buf, n, addr));
408 case (uintptr_t)MDB_TGT_AS_IO:
409 return (t->t_ops->t_ioread(t, buf, n, addr));
410 }

--- 7 unchanged lines hidden (view full) ---

418 if (!(t->t_flags & MDB_TGT_F_RDWR))
419 return (set_errno(EMDB_TGTRDONLY));
420
421 if (t->t_flags & MDB_TGT_F_ASIO)
422 return (t->t_ops->t_awrite(t, as, buf, n, addr));
423
424 switch ((uintptr_t)as) {
425 case (uintptr_t)MDB_TGT_AS_VIRT:
426 case (uintptr_t)MDB_TGT_AS_VIRT_I:
427 case (uintptr_t)MDB_TGT_AS_VIRT_S:
424 return (t->t_ops->t_vwrite(t, buf, n, addr));
425 case (uintptr_t)MDB_TGT_AS_PHYS:
426 return (t->t_ops->t_pwrite(t, buf, n, addr));
427 case (uintptr_t)MDB_TGT_AS_FILE:
428 return (t->t_ops->t_fwrite(t, buf, n, addr));
429 case (uintptr_t)MDB_TGT_AS_IO:
430 return (t->t_ops->t_iowrite(t, buf, n, addr));
431 }

--- 1877 unchanged lines hidden ---
428 return (t->t_ops->t_vwrite(t, buf, n, addr));
429 case (uintptr_t)MDB_TGT_AS_PHYS:
430 return (t->t_ops->t_pwrite(t, buf, n, addr));
431 case (uintptr_t)MDB_TGT_AS_FILE:
432 return (t->t_ops->t_fwrite(t, buf, n, addr));
433 case (uintptr_t)MDB_TGT_AS_IO:
434 return (t->t_ops->t_iowrite(t, buf, n, addr));
435 }

--- 1877 unchanged lines hidden ---