Re: TM character blows array out of water
Re: TM character blows array out of water
- Subject: Re: TM character blows array out of water
- From: Ondra Cada <email@hidden>
- Date: Tue, 3 Sep 2002 21:56:05 +0200
On Tuesday, September 3, 2002, at 03:43 , Matt Neuburg wrote:
Don't see any problem here:
[snip, same as my code]
arr2 = [NSArray arrayWithArray: arr];
NSLog(@"%@",arr2);
You're right, Ondra - that works for me too. Perhaps this is a bug in GDB.
Put a breakpoint at the NSLog and try
po arr
po arr2
I did. No problem again:
217 /tmp> cc -framework Foundation q.m -g
218 /tmp> gdb a.out
GNU gdb 5.0-20001113 (Apple version gdb-200) (Mon Sep 3 02:43:52 GMT 2001)
(UI_OUT)
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-macos10".
Reading symbols for shared libraries ... done
(gdb) b q.m:13
Breakpoint 1 at 0x1e04: file q.m, line 13.
(gdb) r
Starting program: /tmp/a.out
[Switching to thread 1 (process 17866 thread 0x1903)]
Reading symbols for shared libraries ... done
Breakpoint 1, main () at q.m:13
13 NSLog(@"%@",arr2);
(gdb) po arr
("AppleShare PDS", "Desktop DB", "NAV\U2122 6.0 QuickScan")
(gdb) po arr2
("AppleShare PDS", "Desktop DB", "NAV\U2122 6.0 QuickScan")
(gdb) po NAV
NAV* 6.0 QuickScan
(gdb) p TM
$1 = 8482
(gdb) c
Continuing.
2002-09-03 21:51:51.655 a.out[17866] <CFArray 0x5e160 [0x8016024c]>{type =
immutable, count = 3, values = (
0 : AppleShare PDS
1 : Desktop DB
2 : <CFString 0x55c50 [0x8016024c]>{contents = "NAV\\u2122 6.0
QuickScan"}
)}
Program exited normally.
(gdb) q
219 /tmp>
I get nothing at all; this is what was leading me to believe the arrays
had
vanished. - Yes, I see; these work:
po [arr description]
po [add2 description]
So it does seem to be a GDB bug. What a pain, I'm going to have to attach
"description" to everything...
This does not look like a gdb error; rather some problem at the framework
level. Gdb's po uses a special method printForDebugger (or something
similar, am writing from memory) -- it is possible it is messed up somehow
in some of newer releases.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.