8135292: Remove duplicate code in <OS>Address.java in SA
Reviewed-by: cjplummer, amenkov
This commit is contained in:
parent
7905788e96
commit
ddb55ede2c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -292,11 +292,6 @@ class BsdAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -525,7 +525,7 @@ public class BsdDebuggerLocal extends DebuggerBase implements BsdDebugger {
|
||||
/** From the BsdDebugger interface */
|
||||
public long getAddressValue(Address addr) {
|
||||
if (addr == null) return 0;
|
||||
return ((BsdAddress) addr).getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
|
||||
/** From the BsdDebugger interface */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -279,10 +279,6 @@ class DummyAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -73,7 +73,7 @@ public class DummyDebugger extends DebuggerBase {
|
||||
|
||||
public long getAddressValue(Address addr) {
|
||||
if (addr == null) return 0;
|
||||
return ((DummyAddress) addr).getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
|
||||
public String getOS() {
|
||||
@ -142,7 +142,7 @@ public class DummyDebugger extends DebuggerBase {
|
||||
if (addr == null) {
|
||||
val = "0";
|
||||
} else {
|
||||
val = Long.toHexString(addr.getValue());
|
||||
val = Long.toHexString(addr.asLongValue());
|
||||
}
|
||||
for (int i = 0; i < ((2 * machDesc.getAddressSize()) - val.length()); i++) {
|
||||
buf.append('0');
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -293,11 +293,6 @@ public class LinuxAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -582,7 +582,7 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
|
||||
/** From the LinuxDebugger interface */
|
||||
public long getAddressValue(Address addr) {
|
||||
if (addr == null) return 0;
|
||||
return ((LinuxAddress) addr).getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
|
||||
/** From the LinuxDebugger interface */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -287,11 +287,6 @@ class ProcAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -285,11 +285,6 @@ class RemoteAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -303,7 +303,7 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
|
||||
|
||||
public long getAddressValue(Address addr) throws DebuggerException {
|
||||
if (addr == null) return 0;
|
||||
return ((RemoteAddress) addr).getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
|
||||
public Address newAddress(long value) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -297,11 +297,6 @@ class WindbgAddress implements Address {
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
long getValue() {
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
private static void check(boolean arg, String failMessage) {
|
||||
if (!arg) {
|
||||
System.err.println(failMessage + ": FAILED");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -412,7 +412,7 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
|
||||
/** From the Debugger interface */
|
||||
public long getAddressValue(Address addr) {
|
||||
if (addr == null) return 0;
|
||||
return ((WindbgAddress) addr).getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
|
||||
/** From the WindbgDebugger interface */
|
||||
@ -473,7 +473,7 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
|
||||
if (dll != null) {
|
||||
WindbgAddress addr = (WindbgAddress) dll.lookupSymbol(symbol);
|
||||
if (addr != null) {
|
||||
return addr.getValue();
|
||||
return addr.asLongValue();
|
||||
}
|
||||
}
|
||||
return 0L;
|
||||
|
Loading…
x
Reference in New Issue
Block a user