Watching all fields that are in scope using JPDA

Hi,
I'm helping develop a debugger using JDI and have a question about watching certain types of variables that are in scope.
I can watch local variables by getting the current thread's StackFrame and can watch static fields of outer classes by getting their corresponding ReferenceTypes. However, I can't find a good way to watch non-static fields of outer classes that aren't shadowed.
Example. Debugging the following code:
class A {
int x = 5;
class B {
public void foo() {
System.out.println("x = " + x);
public void callFoo() {
B myB = new B();
myB.foo();
The result of calling callFoo on an instance of A is "x = 5" as it should be.
Clearly the method foo() can see what x is. However, it seems to me that to watch the value of x (a non-static field) at any point while I'm debugging, I have to have use the thisObject() method of the appropriate StackFrame and then call getValue() with x. However, if my current thread is suspended within the foo() method, it may not always be possible to retrieve the correct StackFrame (e.g. if foo() is called from some other class such as my debugger event handling thread).
Basically, it'd be nice if you could point out that I'm just not seeing some nice call like getValue(Field f) that will get the value of an instance field that is anywhere in scope, especially those in outer classes. Or if you see anything I'm missing or another way to watch instance fields in outer classes, your help would be greatly appreciated!
James

I'm helping develop a debugger using JDI and have a
question about watching certain types of variables
that are in scope.You would do this by creating a com.sun.jdi.request.WatchpointRequest
and restricting the scope of the request to the object specified. This
is done by adding filter(s) to the request before it is enabled. For
more information, take a look at:
http://java.sun.com/j2se/1.4.1/docs/guide/jpda/jdi/com/sun/jdi/request/WatchpointRequest.html#addInstanceFilter(com.sun.jdi.ObjectReference)

Similar Messages

  • Is there a way to LIST OUT all of the active images that are currently being used on a page in Dreamweaver?

    Is there a way to LIST OUT all of the active images that are currently being used on a page in Dreamweaver?  Or do I have to click each one and write down the image name by hand?
    Thanks!
    LJ

    Alternatively use a browser:
    Use the Firefox Web Developer Toolbar
    https://addons.mozilla.org/en-US/firefox/addon/60
    Images > View Image Information
    or the List All Images Add On for Firefox
    https://addons.mozilla.org/en-US/firefox/addon/3688
    or the Web Developer tools in IE8 (or earlier), F12 > Image > View Image Report

  • Is there a app that will tell all apps that are running and possibly how much battery power they use?

    Is there a app that will tell all apps that are running and possibly how much battery power they use?

    You don't need an app to do this.  Here's how you get the battery info.  Go to Settings>More>Battery. This will show you all the active apps and their individual battery usage.

  • Error "all tv tuners are currently in use"

    Hi, I'm running 8.1 pro with media centre, using a known brand card, i cannot type it here as it comes up as a link, which microsoft wont allow, its a dual satellite tuner from tbs the model is 6981, with latest windows 8 drivers for that card. 
    However, if I'm recording a HD channel, I cannot seem to watch another hd channel at the same time, I can watch non hd channels, when a HD channel is recording. I get this message, all available tuners are currently in use (to which i can stop the recording)
    I see there is a hotfix for this for W7 ultimate, which i tried for 8.1 but received an error message. Its a dual tuner!
    So far,
    1. I cannot record HD AND watch HD at same time.
    2. If I want to record a non HD channel, and watch a HD channel at the same time, If have to be on a HD channel first, then press record on the non-HD channel. If press record on the non-HD channel first,
    then go to a HD channel (second), i get the conflict issue, but not the other way around.
    I have just noticed in edit sources for the HD channels, only one source is available, there should be two, I am not able to split the source, so perhaps my issue is this?
    The tuner is working properly.
    I also use EPG collector to load the data into MCE8, ive been on that forum, and im assured by the maker of that program, that its nothing to do with EPG collector.
    Any ideas?
    My specs:8.1 pro with MCE 8

     its a dual satellite tuner from tbs the model is 6981, with latest windows 8 drivers for that card. 
    Hi,
    Did you mean that, this TV tuner support two tuner at the same time when you using WMC watching TV?
    According to the contents about WMC below:
    With a single TV tuner connected to your computer, you can watch or record live TV in Media Center on only one channel at a time. With two TV tuners or a dual-tuner device connected to your computer, you can do the following:
    Watch live TV on one channel while recording a show on a different channel.
    Record two different TV shows that are on two different channels at the same time.
    Watch a previously recorded show and record live shows on two different channels at the same time.
    Note: you can access to the link below for more details about:
    What should I know before adding TV tuners to use with Windows Media Center?
    In my opinion, it should be the TV tunner card problem, it would be better to contact its support for further assistance about this problem.
    Roger Lu
    TechNet Community Support

  • How to list all calendars that are shared to a specific user?

    Hi,
    Using Exchange Management Shell/Powershell, I want to list all calendars that are shared to a specific user 'myuser'. 
    I have tried different approaches; list all calendars for all users and then figure out which ones are shared to 'myuser', list all mailboxfolders for 'myuser' with path 'calendar' and sort out the shared ones, ... No luck so far.
    Anybody?
    babu

    Hi
    If you try this command:
    Get-MailboxPermission MyUser

  • Since I updated my iPhone 4s to iOS 6 all messages that are sent to my phone from another iPhone user get sent to my daughters iPhone as well. And I can text her but she cannot text me.

    What is going on??? Since I updated my iPhone 4s to iOS 6 all messages that are sent to my phone from another iPhone user also get sent to my daughters iPhone 4. And she can receive my text but cannot reply to me.

    chrisfromgastonia wrote:
    You are on the same apple id. You will need to each have your own apple id. Sign out of imessages and create your own or her own apple id and sign in again using your own apple id's
    100% NOT TRUE....    You can change the settings to fit your requirements...

  • How do you change the fields that are displayed on the email preview list after a search?

    How do you modify the fields that are displayed in the mail preview list in the center column of Mac mail after you conduct a search of your email?   All of a sudden the displayed fields changed on me whenever I do a search in mail.   When I have not filtered my email with a search, the default field shown in bold at the top of each message's preview is the "From" field.   However, when I do a search this changes to the "To" field.   Can anyone help?   Thanks, ccarey

    ipicus
    But why would you want this?
    iTunes is responsible for the File Management, let it get on with it, you do your organisation in the iTunes window. And everything you need to do, you can do via the iTunes Window. Want to find the file of a track quickly? Right click on it in the iTunes Window and select Show File: A finder window pops open with the file already selected.
    Regards
    TD

  • Fields that are not displayed are still submitted

    Is there any way to prevent fields from being submitted? I have fields that are only conditionally displayed on the screen, but the values are submitted every time.
    ie, user enters some field values, submits the page. we branch to the same page and do not clear the values so the user can see what he/she put in last time.
    the user now selects from a select list which causes some of the fields that previously had values to no longer be displayed.
    the user fills out some of the other fields, then submits the page, and all the old values and the new values are submitted. i would like only the new values to be submitted, and the old values not to be submitted.
    is this possible? (and reasonable to implement)

    Original Question:
    Is there any way to prevent fields from being submitted? I have fields that are only conditionally displayed on the screen, but the values are submitted every time.
    Hi Becky,
    Yes Modify your submit procedure to only submit the records that are displayed on the screen.
    I'm not too clear on why or what your trying to do.
    When you submit the page and then branch to the same page.
    Why don't you just make the user edit the record they just entered or create a new record?
    Maybe I've misunderstood something but something your doing in the steps you've described, doesn't seem to be too clear to me...

  • How to see all devices that are connected to Apple ID

    How to see all devices that are connected to Apple ID

    Are you using a software to see all devices that are supposed to be connected to your router? You can reset and start over with your router.  Make sure you have a security enabled on it like WPA Personal. You can try DHCP Reservation as well to ensure that the devices that will have access to your router are only the ones you included on the list.

  • After clearing cash on mac applications won't lunch any more..I tried to delete apps like VLC player with app cleaner and again download and instal new but it's the same..goes for all apps that are not originally part of Yosemite. Please advise me?!

    After clearing cash on my mac ( Go to folder: ~/Library/Caches and clear all, than to Library/Cashes and clear all again) applications won't lunch any more..I tried to delete apps like VLC player, firefox.. with app cleaner and again download and install the new one but it's the same..goes for all apps that are not originally part of Yosemite. I have done this cash clean up very often on Maverick without any problems. This time I done it again because I could not open my web site, the server has blocked me and I was trying everything including deleting cash from mac. Please advise me what to do..?!? Thanks in advance.

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • Query all applications that are connected to database in the current time

    Dears,
    I need to query all applications that are connected to database in the current time. I tried using v$session but i could not reach through it to the application that are logged now to database.
    As example, i connect to DB through Web Application and tried to search in v$session to can see Web Application session but i did not see it :(
    From searching in google, found that there is a package named "DBMS_APPLICATION_INFO". I expected that it can help me in my request but i could not use it.
    Please, advise me. Is this package help cover my requirements or there is another method ?
    Thanks & Best regards,

    sybrand_b,
    I think that i appreciated you once you replied me and what i wanted exactly from you "Provide me Link help me more for investigation" and you did not provide something.
    Where is the documentation that i could not read it !!!!!!
    FYI, you are not the only one that have information_
    Anyway ,as usual i will reply you in polite way.
    Thanks and i will not have more input here with you !!!
    Dear All,
    Sorry for wasting your time to read this but i had to reply.
    Please, if any one have more information regarding my issue, it will be highly appreciated.
    Really , thanks all for support.
    Thanks & Regards,

  • I Wanna See All Devices That Are Connected To My Router

    I have a E1200 router and it's pretty good however I've noticed that there are 12 devices connected to my router when infact there should only be 4 devices connected. I would like to see all the devices that are connected and disconnect the ones that don't belong HELP! 
    Solved!
    Go to Solution.

    Are you using a software to see all devices that are supposed to be connected to your router? You can reset and start over with your router.  Make sure you have a security enabled on it like WPA Personal. You can try DHCP Reservation as well to ensure that the devices that will have access to your router are only the ones you included on the list.

  • "ADF Navigation List" does not shows all items that are in table

    Hi
    Thank you for reading my post
    I am tring to use "ADF Navigation List" , (it can be draged from data control platte into a form)
    but when i drag and drop it on my form it does not shows all items that are available in my table ?
    it just shows 10 item when i have 60 record in my Table.
    Thanks

    Hi,
    in the pageDef ile, select the iterator for this list and set the fetch size to -1 (its 10 by default)
    Frank

  • My screen continually freezes up.  I've tried closing all apps that are openfreezby double clicking on the home button and closing them. I have held down on the home button and start button simultaneously and it still freezes. Can someone out the help me?

    MY screen continually freezes up. I've tried closing all apps that are open and have held down the home button and start button simultaneously but neither helped. Can someone out there help me?

    Well the next couple of things to try would be to reset all settings, and if that doesn't help, it's probably time to restore the iOS software.
    Settings>General>Reset>Reset all settings. That will take all settings on the iPad back to factory defaults. It will not delete anything and you will not lose any data, but you will have to enter all settings again ...WiFi passwords, enable Siri, select your wallpaper, adjust brightness, turn on location services and set privacy settings, etc, etc.
    You can read about restoring the software here.
    iTunes: Restoring iOS software - Support - Apple
    Should you decide to restore the iOS, it is extremely important that you back up first so that you can restore from the backup and then sync with iTunes afterward in order to restore all content back to the iPad. It is all covered in the kb article.
    If you do not sync with iTunes, then I assume that you backup with iCloud. In that case you can erase the device in Settings>General>Reset>Erase all content and settings. Once again, backing up with I loud is I,operative before you do this so that you can restore from the iCloud backup after you erase the iPad and start over again with activation.
    You should read this first before you restore from either backup.
    How to backup and restore from a backup
    http://support.apple.com/kb/HT1766
    This is a must read before you erase the iPad should you decide to go that route.
    iOS: Understanding 'Erase All Content and Settings' - Support - Apple

  • In iTunes on my windows 7 PC, the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's.

    In iTunes on my windows 7 PC, in the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's on several of the preferences pages.  The Apple people at the store did not help.  I have lownloaded the latest version of iTunes and this is still an issue.  HELP.

    Is there really nobody else with this problem? Really?

Maybe you are looking for