1/* 2 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23/* 24 * 25 * The following is a java-source of this file: 26 * 27 * package nsk.jvmti.GetLocalVariableTable; 28 * 29 * import java.io.PrintStream; 30 * 31 * public class localtab001 { 32 * 33 * static int fld; 34 * 35 * public static void main(String[] args) { 36 * System.exit(run(args, System.out) + 95); 37 * } 38 * 39 * public static int run(String argv[], PrintStream ref) { 40 * check(); 41 * return getRes(); 42 * } 43 * 44 * public static void meth00() { 45 * } 46 * 47 * public double meth01() { 48 * long l = 22; 49 * float f = 6.0f; 50 * double d = 7.0; 51 * return d + f + l; 52 * } 53 * 54 * public void meth02(int step) { 55 * short i2 = 0; 56 * { 57 * char i3 = 0; 58 * byte i4 = 0; 59 * boolean i5 = false; 60 * for (int i1 = 0; i1 < step; i1++) { 61 * i2 += i1; 62 * } 63 * } 64 * } 65 * 66 * public static void meth03(localtab001 ob) { 67 * localtab001 ob1 = ob; 68 * int[] ob2 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; 69 * try { 70 * int i = ob2[9]; 71 * } catch (IndexOutOfBoundsException e) { 72 * fld = 0; 73 * } 74 * } 75 * 76 * public static double meth04(int i1, long l, short i2, double d, 77 * char i3, float f, byte i4, boolean b) { 78 * return (b ? i1 * l * i2 * d * i3 * f * i4 : 0); 79 * } 80 * 81 * public int meth05(int i) { 82 * // 1 2 3 4 5 6 7 8 9 10 11 12 83 * int i12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 84 * = 1; 85 * return i - i12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678; 86 * } 87 * 88 * native static void check(); 89 * native static int getRes(); 90 * 91 * static { 92 * try { 93 * System.loadLibrary("localtab001"); 94 * } catch (UnsatisfiedLinkError ule) { 95 * System.err.println("Could not load localtab001 library"); 96 * System.err.println("java.library.path:" + System.getProperty("java.library.path")); 97 * throw ule; 98 * } 99 * } 100 * } 101 */ 102 103class nsk/jvmti/GetLocalVariableTable/localtab001 { 104 105 0xCAFEBABE; 106 3; // minor version 107 45; // version 108 [] { // Constant Pool 109 ; // first element is empty 110 Method #28 #91; // #1 111 Field #92 #93; // #2 112 Method #27 #94; // #3 113 Method #92 #95; // #4 114 Method #27 #96; // #5 115 Method #27 #97; // #6 116 long 0x0000000000000016;; // #7 117 float 0x40C00000; // #9 118 double 0x401C000000000000;; // #10 119 class #98; // #12 120 Field #27 #99; // #13 121 String #100; // #14 122 Method #92 #101; // #15 123 class #102; // #16 124 Field #92 #103; // #17 125 String #104; // #18 126 Method #105 #106; // #19 127 class #107; // #20 128 Method #20 #91; // #21 129 String #108; // #22 130 Method #20 #109; // #23 131 String #110; // #24 132 Method #92 #111; // #25 133 Method #20 #112; // #26 134 class #128; // #27 135 class #113; // #28 136 Utf8 "fld"; // #29 137 Utf8 "I"; // #30 138 Utf8 "<init>"; // #31 139 Utf8 "()V"; // #32 140 Utf8 "Code"; // #33 141 Utf8 "LineNumberTable"; // #34 142 Utf8 "LocalVariableTable"; // #35 143 Utf8 "this"; // #36 144 Utf8 "Lnsk/jvmti/GetLocalVariableTable/localtab001;"; // #37 145 Utf8 "main"; // #38 146 Utf8 "([Ljava/lang/String;)V"; // #39 147 Utf8 "args"; // #40 148 Utf8 "[Ljava/lang/String;"; // #41 149 Utf8 "run"; // #42 150 Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #43 151 Utf8 "argv"; // #44 152 Utf8 "ref"; // #45 153 Utf8 "Ljava/io/PrintStream;"; // #46 154 Utf8 "meth00"; // #47 155 Utf8 "meth01"; // #48 156 Utf8 "()D"; // #49 157 Utf8 "l"; // #50 158 Utf8 "J"; // #51 159 Utf8 "f"; // #52 160 Utf8 "F"; // #53 161 Utf8 "d"; // #54 162 Utf8 "D"; // #55 163 Utf8 "meth02"; // #56 164 Utf8 "(I)V"; // #57 165 Utf8 "step"; // #58 166 Utf8 "i2"; // #59 167 Utf8 "S"; // #60 168 Utf8 "i3"; // #61 169 Utf8 "C"; // #62 170 Utf8 "i4"; // #63 171 Utf8 "B"; // #64 172 Utf8 "i5"; // #65 173 Utf8 "Z"; // #66 174 Utf8 "i1"; // #67 175 Utf8 "meth03"; // #68 176 Utf8 "(Lnsk/jvmti/GetLocalVariableTable/localtab001;)V"; // #69 177 Utf8 "ob"; // #70 178 Utf8 "ob1"; // #71 179 Utf8 "ob2"; // #72 180 Utf8 "[I"; // #73 181 Utf8 "i"; // #74 182 Utf8 "e"; // #75 183 Utf8 "Ljava/lang/IndexOutOfBoundsException;"; // #76 184 Utf8 "meth04"; // #77 185 Utf8 "(IJSDCFBZ)D"; // #78 186 Utf8 "b"; // #79 187 Utf8 "meth05"; // #80 188 Utf8 "(I)I"; // #81 189 Utf8 "i12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"; // #82 190 Utf8 "check"; // #83 191 Utf8 "getRes"; // #84 192 Utf8 "()I"; // #85 193 Utf8 "<clinit>"; // #86 194 Utf8 "ule"; // #87 195 Utf8 "Ljava/lang/UnsatisfiedLinkError;"; // #88 196 Utf8 "SourceFile"; // #89 197 Utf8 "localtab001.java"; // #90 198 NameAndType #31 #32; // #91 199 class #114; // #92 200 NameAndType #115 #46; // #93 201 NameAndType #42 #43; // #94 202 NameAndType #116 #57; // #95 203 NameAndType #83 #32; // #96 204 NameAndType #84 #85; // #97 205 Utf8 "java/lang/IndexOutOfBoundsException"; // #98 206 NameAndType #29 #30; // #99 207 Utf8 "localtab001"; // #100 208 NameAndType #117 #118; // #101 209 Utf8 "java/lang/UnsatisfiedLinkError"; // #102 210 NameAndType #119 #46; // #103 211 Utf8 "Could not load localtab001 library"; // #104 212 class #120; // #105 213 NameAndType #121 #118; // #106 214 Utf8 "java/lang/StringBuffer"; // #107 215 Utf8 "java.library.path:"; // #108 216 NameAndType #122 #123; // #109 217 Utf8 "java.library.path"; // #110 218 NameAndType #124 #125; // #111 219 NameAndType #126 #127; // #112 220 Utf8 "java/lang/Object"; // #113 221 Utf8 "java/lang/System"; // #114 222 Utf8 "out"; // #115 223 Utf8 "exit"; // #116 224 Utf8 "loadLibrary"; // #117 225 Utf8 "(Ljava/lang/String;)V"; // #118 226 Utf8 "err"; // #119 227 Utf8 "java/io/PrintStream"; // #120 228 Utf8 "println"; // #121 229 Utf8 "append"; // #122 230 Utf8 "(Ljava/lang/String;)Ljava/lang/StringBuffer;"; // #123 231 Utf8 "getProperty"; // #124 232 Utf8 "(Ljava/lang/String;)Ljava/lang/String;"; // #125 233 Utf8 "toString"; // #126 234 Utf8 "()Ljava/lang/String;"; // #127 235 Utf8 "nsk/jvmti/GetLocalVariableTable/localtab001"; // #128 236 } // Constant Pool 237 238 0x0021; // access 239 #27;// this_cpx 240 #28;// super_cpx 241 242 [] { // Interfaces 243 } // Interfaces 244 245 [] { // fields 246 { // Member 247 0x0008; // access 248 #29; // name_cpx 249 #30; // sig_cpx 250 [] { // Attributes 251 } // Attributes 252 } // Member 253 } // fields 254 255 [] { // methods 256 { // Member 257 0x0001; // access 258 #31; // name_cpx 259 #32; // sig_cpx 260 [] { // Attributes 261 Attr(#33) { // Code 262 1; // max_stack 263 1; // max_locals 264 Bytes[] { 265 0x2AB70001B1; 266 }; 267 [] { // Traps 268 } // end Traps 269 [] { // Attributes 270 Attr(#34) { // LineNumberTable 271 [] { // LineNumberTable 272 0 6; 273 } 274 } // end LineNumberTable 275 ; 276 Attr(#35) { // LocalVariableTable 277 [] { // LocalVariableTable 278 0 5 36 37 0; 279 } 280 } // end LocalVariableTable 281 } // Attributes 282 } // end Code 283 } // Attributes 284 } // Member 285 ; 286 { // Member 287 0x0009; // access 288 #38; // name_cpx 289 #39; // sig_cpx 290 [] { // Attributes 291 Attr(#33) { // Code 292 2; // max_stack 293 1; // max_locals 294 Bytes[] { 295 0x2AB20002B8000310; 296 0x5F60B80004B1; 297 }; 298 [] { // Traps 299 } // end Traps 300 [] { // Attributes 301 Attr(#34) { // LineNumberTable 302 [] { // LineNumberTable 303 0 11; 304 13 12; 305 } 306 } // end LineNumberTable 307 ; 308 Attr(#35) { // LocalVariableTable 309 [] { // LocalVariableTable 310 0 14 40 41 0; 311 } 312 } // end LocalVariableTable 313 } // Attributes 314 } // end Code 315 } // Attributes 316 } // Member 317 ; 318 { // Member 319 0x0009; // access 320 #42; // name_cpx 321 #43; // sig_cpx 322 [] { // Attributes 323 Attr(#33) { // Code 324 1; // max_stack 325 2; // max_locals 326 Bytes[] { 327 0xB80005B80006AC; 328 }; 329 [] { // Traps 330 } // end Traps 331 [] { // Attributes 332 Attr(#34) { // LineNumberTable 333 [] { // LineNumberTable 334 0 15; 335 3 16; 336 } 337 } // end LineNumberTable 338 ; 339 Attr(#35) { // LocalVariableTable 340 [] { // LocalVariableTable 341 0 7 44 41 0; 342 0 7 45 46 1; 343 } 344 } // end LocalVariableTable 345 } // Attributes 346 } // end Code 347 } // Attributes 348 } // Member 349 ; 350 { // Member 351 0x0009; // access 352 #47; // name_cpx 353 #32; // sig_cpx 354 [] { // Attributes 355 Attr(#33) { // Code 356 0; // max_stack 357 0; // max_locals 358 Bytes[] { 359 0xB1; 360 }; 361 [] { // Traps 362 } // end Traps 363 [] { // Attributes 364 Attr(#34) { // LineNumberTable 365 [] { // LineNumberTable 366 0 20; 367 } 368 } // end LineNumberTable 369 } // Attributes 370 } // end Code 371 } // Attributes 372 } // Member 373 ; 374 { // Member 375 0x0001; // access 376 #48; // name_cpx 377 #49; // sig_cpx 378 [] { // Attributes 379 Attr(#33) { // Code 380 4; // max_stack 381 6; // max_locals 382 Bytes[] { 383 0x1400074012094614; 384 0x000A39041804258D; 385 0x631F8A63AF; 386 }; 387 [] { // Traps 388 } // end Traps 389 [] { // Attributes 390 Attr(#34) { // LineNumberTable 391 [] { // LineNumberTable 392 0 23; 393 4 24; 394 7 25; 395 12 26; 396 } 397 } // end LineNumberTable 398 ; 399 Attr(#35) { // LocalVariableTable 400 [] { // LocalVariableTable 401 0 21 36 37 0; 402 4 17 50 51 1; 403 7 14 52 53 3; 404 12 9 54 55 4; 405 } 406 } // end LocalVariableTable 407 } // Attributes 408 } // end Code 409 } // Attributes 410 } // Member 411 ; 412 { // Member 413 0x0001; // access 414 #56; // name_cpx 415 #57; // sig_cpx 416 [] { // Attributes 417 Attr(#33) { // Code 418 2; // max_stack 419 7; // max_locals 420 Bytes[] { 421 0x033D033E03360403; 422 0x3605033606A7000C; 423 0x1C150660933D8406; 424 0x0115061BA1FFF4B1; 425 }; 426 [] { // Traps 427 } // end Traps 428 [] { // Attributes 429 Attr(#34) { // LineNumberTable 430 [] { // LineNumberTable 431 0 30; 432 2 32; 433 4 33; 434 7 34; 435 10 35; 436 16 36; 437 22 35; 438 31 39; 439 } 440 } // end LineNumberTable 441 ; 442 Attr(#35) { // LocalVariableTable 443 [] { // LocalVariableTable 444 0 32 36 37 0; 445 0 32 58 30 1; 446 2 29 59 60 2; 447 4 27 61 62 3; 448 7 24 63 64 4; 449 10 21 65 66 5; 450 13 18 67 30 6; 451 } 452 } // end LocalVariableTable 453 } // Attributes 454 } // end Code 455 } // Attributes 456 } // Member 457 ; 458 { // Member 459 0x0009; // access 460 #68; // name_cpx 461 #69; // sig_cpx 462 [] { // Attributes 463 Attr(#33) { // Code 464 4; // max_stack 465 4; // max_locals 466 Bytes[] { 467 0x2A4C100ABC0A5903; 468 0x100A4F590410094F; 469 0x590510084F590610; 470 0x074F590710064F59; 471 0x08084F591006074F; 472 0x591007064F591008; 473 0x054F591009044F4D; 474 0x2C10092E3EA70008; 475 0x4E03B3000DB1; 476 }; 477 [] { // Traps 478 56 61 64 12; 479 } // end Traps 480 [] { // Attributes 481 Attr(#34) { // LineNumberTable 482 [] { // LineNumberTable 483 0 42; 484 2 43; 485 56 45; 486 64 47; 487 69 49; 488 } 489 } // end LineNumberTable 490 ; 491 Attr(#35) { // LocalVariableTable 492 [] { // LocalVariableTable 493 0 70 70 37 0; 494 2 67 71 37 1; 495 56 13 72 73 2; 496 61 0 74 30 3; 497 64 5 75 76 3; 498 } 499 } // end LocalVariableTable 500 } // Attributes 501 } // end Code 502 } // Attributes 503 } // Member 504 ; 505 { // Member 506 0x0009; // access 507 #77; // name_cpx 508 #78; // sig_cpx 509 [] { // Attributes 510 Attr(#33) { // Code 511 4; // max_stack 512 10; // max_locals 513 Bytes[] { 514 0x150999001D1A851F; 515 0x691D85698A18046B; 516 0x1506876B17078D6B; 517 0x1508876BA700040E; 518 0xAF; 519 }; 520 [] { // Traps 521 } // end Traps 522 [] { // Attributes 523 Attr(#34) { // LineNumberTable 524 [] { // LineNumberTable 525 0 53; 526 } 527 } // end LineNumberTable 528 ; 529 Attr(#35) { // LocalVariableTable 530 [] { // LocalVariableTable 531 0 33 67 30 0; 532 0 33 50 51 1; 533 0 33 59 60 3; 534 0 33 54 55 4; 535 0 33 61 62 6; 536 0 33 52 53 7; 537 0 33 63 64 8; 538 0 33 79 66 9; 539 } 540 } // end LocalVariableTable 541 } // Attributes 542 } // end Code 543 } // Attributes 544 } // Member 545 ; 546 { // Member 547 0x0001; // access 548 #80; // name_cpx 549 #81; // sig_cpx 550 [] { // Attributes 551 Attr(#33) { // Code 552 2; // max_stack 553 3; // max_locals 554 Bytes[] { 555 0x043D1B1C64AC; 556 }; 557 [] { // Traps 558 } // end Traps 559 [] { // Attributes 560 Attr(#34) { // LineNumberTable 561 [] { // LineNumberTable 562 0 58; 563 2 60; 564 } 565 } // end LineNumberTable 566 ; 567 Attr(#35) { // LocalVariableTable 568 [] { // LocalVariableTable 569 0 6 36 37 0; 570 0 6 74 30 1; 571 2 4 82 30 2; 572 } 573 } // end LocalVariableTable 574 } // Attributes 575 } // end Code 576 } // Attributes 577 } // Member 578 ; 579 { // Member 580 0x0108; // access 581 #83; // name_cpx 582 #32; // sig_cpx 583 [] { // Attributes 584 } // Attributes 585 } // Member 586 ; 587 { // Member 588 0x0108; // access 589 #84; // name_cpx 590 #85; // sig_cpx 591 [] { // Attributes 592 } // Attributes 593 } // Member 594 ; 595 { // Member 596 0x0008; // access 597 #86; // name_cpx 598 #32; // sig_cpx 599 [] { // Attributes 600 Attr(#33) { // Code 601 3; // max_stack 602 1; // max_locals 603 Bytes[] { 604 0x120EB8000FA7002B; 605 0x4BB200111212B600; 606 0x13B20011BB001459; 607 0xB700151216B60017; 608 0x1218B80019B60017; 609 0xB6001AB600132ABF; 610 0xB1; 611 }; 612 [] { // Traps 613 0 5 8 16; 614 } // end Traps 615 [] { // Attributes 616 Attr(#34) { // LineNumberTable 617 [] { // LineNumberTable 618 0 68; 619 8 70; 620 17 71; 621 46 72; 622 48 66; 623 } 624 } // end LineNumberTable 625 ; 626 Attr(#35) { // LocalVariableTable 627 [] { // LocalVariableTable 628 8 40 87 88 0; 629 } 630 } // end LocalVariableTable 631 } // Attributes 632 } // end Code 633 } // Attributes 634 } // Member 635 } // methods 636 637 [] { // Attributes 638 Attr(#89) { // SourceFile 639 #90; 640 } // end SourceFile 641 } // Attributes 642} // end class nsk/jvmti/GetLocalVariableTable/localtab001 643