mirror of
https://github.com/SDL-Hercules-390/hyperion.git
synced 2026-04-20 18:57:06 +02:00
Same trick on replace_opcode within dyninst.c
git-svn-id: file:///home/jj/hercules.svn/trunk@7009 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
17
dyninst.c
17
dyninst.c
@@ -78,9 +78,13 @@ static void init_dyninst()
|
||||
static void destroy_dyninst()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
/* Wait if opcode_replace pointer not present */
|
||||
while(!sysblk.replace_opcode)
|
||||
usleep(100);
|
||||
|
||||
for(i = 0; i < dyninst_index; i++)
|
||||
replace_opcode(dyninst[i].arch, dyninst[i].oldinst, dyninst[i].opcode1, dyninst[i].opcode2);
|
||||
sysblk.replace_opcode(dyninst[i].arch, dyninst[i].oldinst, dyninst[i].opcode1, dyninst[i].opcode2);
|
||||
}
|
||||
|
||||
/* Libtool static name colision resolution */
|
||||
@@ -120,6 +124,11 @@ HDL_RESOLVER_SECTION;
|
||||
int opcode1;
|
||||
int opcode2;
|
||||
|
||||
|
||||
/* Wait if opcode_replace pointer not present */
|
||||
while(!sysblk.replace_opcode)
|
||||
usleep(100);
|
||||
|
||||
for(arch = 0; arch < GEN_ARCHCOUNT; arch++)
|
||||
{
|
||||
for(opcode1 = 0; opcode1 < 0x100 && dyninst_index < MAXDYNINST; opcode1++)
|
||||
@@ -128,7 +137,7 @@ HDL_RESOLVER_SECTION;
|
||||
newinst = HDL_FINDSYM(name);
|
||||
if(newinst)
|
||||
{
|
||||
oldinst = replace_opcode(arch, newinst, opcode1, -1);
|
||||
oldinst = sysblk.replace_opcode(arch, newinst, opcode1, -1);
|
||||
if(oldinst)
|
||||
{
|
||||
dyninst[dyninst_index].opcode1 = opcode1;
|
||||
@@ -145,7 +154,7 @@ HDL_RESOLVER_SECTION;
|
||||
newinst = HDL_FINDSYM(name);
|
||||
if(newinst)
|
||||
{
|
||||
oldinst = replace_opcode(arch, newinst, opcode1, opcode2);
|
||||
oldinst = sysblk.replace_opcode(arch, newinst, opcode1, opcode2);
|
||||
if(oldinst)
|
||||
{
|
||||
dyninst[dyninst_index].opcode1 = opcode1;
|
||||
|
||||
Reference in New Issue
Block a user