diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2019-06-14 20:53:13 +0000 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2019-06-16 20:23:48 +0000 |
| commit | 67b1ef3c628f800f623abfae28297aa6cf841eca (patch) | |
| tree | 6480eb807da5c2a04959ec37109cefbc69ff37e5 | |
| parent | 9f3a5a7e3854293a217635be8aa372f0685e5b6e (diff) | |
| download | illumos-joyent-67b1ef3c628f800f623abfae28297aa6cf841eca.tar.gz | |
11238 librtld_db demos should work with gcc 7
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <damcd@joyent.com>
| -rw-r--r-- | usr/src/cmd/sgs/librtld_db/demo/Makefile.targ | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/librtld_db/demo/common/bpt.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/librtld_db/demo/common/main.c | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/librtld_db/demo/common/ps.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ index 4d2a3b0303..70a87bb949 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ @@ -60,7 +60,7 @@ simp: ../tests/simp.c libsub.so.1 $(LINK.c) $(LDFLAG) -o $@ ../tests/simp.c -R. ./libsub.so.1 libsub.so.1: ../tests/sub.c - $(LINK.c) $(LDFLAG) -o $@ -G -Kpic -hlibsub.so.1 ../tests/sub.c + $(LINK.c) $(LDFLAG) -o $@ -G -fpic -hlibsub.so.1 ../tests/sub.c # # RDB sample runs & tests diff --git a/usr/src/cmd/sgs/librtld_db/demo/common/bpt.c b/usr/src/cmd/sgs/librtld_db/demo/common/bpt.c index 2906467576..dfaf3caa42 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/common/bpt.c +++ b/usr/src/cmd/sgs/librtld_db/demo/common/bpt.c @@ -376,7 +376,7 @@ continue_to_break(struct ps_prochandle *ph) handle_sp_break(ph); if (ph->pp_flags & FLG_PP_LMAPS) { - if (get_linkmaps(ph) != PS_OK) + if (get_linkmaps(ph) != RET_OK) (void) fprintf(stderr, "problem loading linkmaps\n"); } @@ -499,7 +499,7 @@ step_n(struct ps_prochandle *ph, size_t count, sn_flags_e flgs) perr("stn: PRCFAULT"); if ((flgs & FLG_SN_VERBOSE) && (ph->pp_flags & FLG_PP_LMAPS)) { - if (get_linkmaps(ph) != PS_OK) + if (get_linkmaps(ph) != RET_OK) (void) fprintf(stderr, "problem loading linkmaps\n"); } diff --git a/usr/src/cmd/sgs/librtld_db/demo/common/main.c b/usr/src/cmd/sgs/librtld_db/demo/common/main.c index 60d06954c7..67e5d90023 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/common/main.c +++ b/usr/src/cmd/sgs/librtld_db/demo/common/main.c @@ -169,7 +169,7 @@ main(int argc, char *argv[]) */ if ((cpid = fork()) == 0) { (void) execv(argv[optind], &argv[optind]); - perr(argv[1]); + perr(argv[optind]); } if (cpid == -1) /* fork() failure */ diff --git a/usr/src/cmd/sgs/librtld_db/demo/common/ps.c b/usr/src/cmd/sgs/librtld_db/demo/common/ps.c index 27226a6336..fa602d63a6 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/common/ps.c +++ b/usr/src/cmd/sgs/librtld_db/demo/common/ps.c @@ -330,7 +330,7 @@ ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) if (read(lwpfd, &lwpstatus, sizeof (lwpstatus)) == -1) return (PS_ERR); - gregset = lwpstatus.pr_reg; + (void) memcpy(gregset, lwpstatus.pr_reg, sizeof (*gregset)); (void) close(lwpfd); return (PS_OK); |
