• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0


  • Subject: XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0
  • From: email@hidden
  • Date: Wed, 23 Jan 2008 11:21:34 -0800 (PST)

Greetings:

I can't get gdb>po <object> to return a value from a simple NS object, other than NSXML objects.
I suspect it has something to do with the Intel chip; since I had no problem on my G4/G3 machines.

I made sure that all optimization was off; and I tried using Xcode 2.3+ version.

For example, I've created a simple NSString object, but I can't reveal it's value
using gdb>po.  What I get is "Cannot Access Memory Address" as shown below.


My environment:
MacBook Pro on Intel running Leopard (10.5.1)

------------------------------------------------------

XCode & Debugger:
Using Xcode 3
Component versions
Xcode IDE: 921.0
Xcode Core: 921.0
ToolSupport: 893.0

Debug Information Format: DWARF
Optimization Level: none[-o0]

===========================================


-(void)awakeFromNib {
    NSLog(@"{awakeFromNib}");
    NSXMLElement *root = (NSXMLElement *)[NSXMLNode elementWithName:@"addresses"];
    xmlDoc = [[NSXMLDocument alloc] initWithRootElement:root];
    [xmlDoc setVersion:@"1.0"];
    [xmlDoc setCharacterEncoding:@"UTF-8"];

    // The following NSXMLElement generates a parent.  Hence you can't add it to root.
    NSXMLElement *xmlNoodle;
    [xmlNoodle setName: @"RicNode"];
    [xmlNoodle setStringValue:@"Pumpkin"];  // Note: this node has a parent; hence can't use "addChild".
    [xmlNoodle attributeForName:@"Spanky"];

    NSString *myString = [NSString stringWithString:@"Hello World!"];   <--- I can't see this.  ********
    ...
==================
*** Console Window ***
run
[Switching to process 2832 local thread 0x2f1b]
RunningÂ…
2008-01-23 11:06:25.773 MyXML[2832:817] {awakeFromNib}

(gdb) po myString
Cannot access memory at address 0x0  <--- my problem

(gdb) po xmlNoodle
<RicNode>Pumpkin</RicNode>
Current language:  auto; currently objective-c
(gdb)

======================================

Any remedy?

Regards,

Ric.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0
      • From: "Jonathan del Strother" <email@hidden>
  • Prev by Date: Re: spontaneous font change?
  • Next by Date: Re: XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0
  • Previous by thread: Re: Debugging Quick Look plugins
  • Next by thread: Re: XCode 3.0 gdb>po <obj> --> Cannot access memory at address 0x0
  • Index(es):
    • Date
    • Thread