|
Hi all,
How do I debug a child process inside VC 6.0 or VS in general. The scenario: The main program loads a dll which loads another exe(the process that I wanted to debug), I can debug the dll code fine but can't even set the breakpoint inside created process code. All the related source code was opened inside main program's IDE and all the .pdb files were copied to main program's "debug" dir.
Thanks,
|
|
|
|
|
Go to HKEY_LOCAL_MACHINE>Software>Microsoft>WindowsNT>CurrentVersion>ImageFileExecution Options. Here you can create a key with the name of your exe.[Assuming you are running windowsXP] eg MyProcess.exe.Create a new string value with the following properties. [Name = debugger, data = vsjitdebugger.exe]. Close the registry editor and start your application. When your child process with the name as "MyProcess.exe" gets launched you would be prompted to attach it with vsjitdebugger.
This would only be one way to attach a debugger to your process no sooner than it is launched.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks. I just tried out the IFEO method, the debugger did get triggered but it only left me with a new instance of VS 2008 debugger option(I have both VC6.0 and 9.0 installed) for which I have no way to specify the symbol for the debugger. Is it possible to using the existing VC6.0 debugger(I'm using the VC6.0).
In addition, will DebugBreak for the debugee do the same thing?
Thanks,
|
|
|
|
|
LiYS wrote: ith a new instance of VS 2008 debugger option
You can keep VS 6.0 open and then it would show in the list to select from
LiYS wrote: n addition, will DebugBreak for the debugee do the same thing?
MSDN:The DebugBreak function causes a breakpoint exception to occur in the current process. This allows the calling thread to signal the debugger to handle the exception. The essence is clear now
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If you have all the source code, you could simply add the following line very early in the exe:
__asm { int 3 }
This will fire a breakpoint for you to debug. Don't forgot to remove it!
Iain.
|
|
|
|
|
I want to store the following lines
4 lines make by 6 points
http://i218.photobucket.com/albums/cc275/hkgoldenon9/pic1.jpg
I make two class to define lines and points
class Cliness
{
public:
Cliness(void);
~Cliness(void);
int pt1;
int pt2;
};
class Cpointss
{
public:
Cpointss(void);
~Cpointss(void);
int line1;
int line2;
};
I make two array to store them
std::vector<cliness> m_arrayline;
std::vector<cpointss> m_arraypoint;</cpointss></cliness>
From the above example, i store as the following
m_arrayline[1].pt1 = 1;
m_arrayline[1].pt2 = 2;
m_arrayline[2].pt1 = 3;
m_arrayline[2].pt2 = 4;
m_arrayline[3].pt1 = 4;
m_arrayline[3].pt2 = 5;
m_arrayline[4].pt1 = 5;
m_arrayline[4].pt2 = 6;
m_arraypoint[1].line1 = 1;
m_arraypoint[1].line2 = NULL;
m_arraypoint[2].line1 = 1;
m_arraypoint[2].line2 = NULL;
m_arraypoint[3].line1 = 2;
m_arraypoint[3].line2 = NULL;
m_arraypoint[4].line1 = 2;
m_arraypoint[4].line2 = 3;
m_arraypoint[5].line1 = 3;
m_arraypoint[5].line2 = 4;
m_arraypoint[6].line1 = 4;
m_arraypoint[6].line2 = NULL;
i use this two arrays , because i want to find out which points is used to create a line (from m_arrayline)
&
find out which line is connected to this point(from m_arraypoint) directly and quickly.
By it makes me need to change both arrays if i add a new line on it.
How can i simplify it?
Thank you
|
|
|
|
|
Ever heard of the Microsoft Visual C++ sample project called Scribble? If not you might want to check it out.
led mike
|
|
|
|
|
I need to figure out the formula/pattern/algorithm needed to convert the number on the left into a checksum on the right. Here are a few examples
6789542137 ; 53426
7274707623 ; 13890
7608909976 ; 21097
7866018419 ; 46204
8185833863 ; 59982
8052724826 ; 68535
Please help
Thanks
|
|
|
|
|
Welcome to CodeProject. Take a moment to read these posting guidelines[^]
Cross posting is discouraged and we don't do homework for students.
led mike
|
|
|
|
|
Well do you have any ideas how I can do it. Any Techiques/website would be great. I dont even mind paying for it.
|
|
|
|
|
hdsouza1 wrote: I dont even mind paying for it.
This site does not implement any sort of pay for help model. There are some though. I imagine you can find them using Google.
led mike
|
|
|
|
|
Disclaimer: I know this is the C++ forum but I didn't see a general programming questions forum. I looked, and if I overlooked it, I do apologize. Also, I imagine this would be a subtle bug-type thing, but that forum said not to post questions. My reasoning for placing this question here: there was nowhere else for it to go and if I had a choice, I'd be doing it in C++ anyway...
Enough begging for my life, I suppose. My issue is that I'm trying to create a file and it just won't happen. I keep getting an error saying "No such file or directory exists". (Another excuse: this has happened to me (and classmates) before using C; it got to the point where anytime we had an assignment where we wrote to a file, we were to create it in advance.) The bad thing is everywhere I search, the tutorials say that the file will be created if it doesn't exist. It's not happening. I do admit that it did work a couple of times in IDLE but it seems as though the command works when it wants: if I copy the open(filename) or file(filename) command that worked earlier and try to run it again, I will get that same error.
Even more frustrating, if it works in IDLE and then I try to run the same command as part of the routine I'm running, I get the error message again!
I'm at my wit's end-- I've done it the way everyone says to, and I've tried feeding both commands filenames and entire paths. It just seems like it'll only work when it's in the mood to.
Can anyone think of some stupid condition that may be affecting Python's ability to create files? (I need permanent files, not temporary ones).
Again, I'm sorry to put this in such a strange place, but I'm all alone in this at the moment and I've been working on this one problem for days. It's halting my progress...
Thanks for not biting my head off (hopefully!)
G-Lynx
|
|
|
|
|
GeekLynx wrote: Can anyone think of some stupid condition that may be affecting Python's ability to create files?
yes, you are experiencing the very well known ID Ten T error.
led mike
|
|
|
|
|
That's really charming. Really. But seriously- if I'm missing something obvious smack me over the head with it, please. I hesitated to say this before because I thought it would be clear: I'm not a comp sci 101 student begging for code. While I am a student, I'm a serious one and I only posted for help here as a last resort. I'm in the middle of a research project and my professor is in the hospital. Thus, it'd be rude of me to bother her with this... There's only one other cs instructor in the entire school and he's literally asking me for help.
I suppose I can find another site to admire and aspire to be a contributing member of if I'm going to be brushed off like this, but it'd be nice if I got a non smart-alecky answer to this one little question before I left for good.
-
The Geek
|
|
|
|
|
GeekLynx wrote: but it'd be nice if I got a non smart-alecky answer to this one little question before I left for good.
Well isn't that sweet, you are complaining about the potential free help you get here when you can't even take the time to find an appropriate forum on the site to post your question into. Ever heard of Personal Responsibility? Or is the concept lost on you that your experience could be directly related to what you put into it? But go ahead and blame everyone else for your problems, seems to be very normal these days.
led mike
|
|
|
|
|
That was one of my problems- I didn't see a forum where this would fit into. Could you at least let me know where this should have gone(I really did look)? Sorry if I seemed like I was trying to get something for nothing because I wasn't.
Also, show me where I'm complaining since I'm missing so many obvious things lately. I just wanted a civil answer to what I thought was a semi-lucid question.
Oh, and thanks for your "help", mike.
|
|
|
|
|
GeekLynx wrote: Oh, and thanks for your "help", mike.
Well when I read the first part of your post I was planning on continuing to help you. But since you decide on continuing to make me the villain in this story I guess I will continue to play my part. F*** off a**hole.
led mike
|
|
|
|
|
Wow, continuing to help me? You've done nothing but antagonize me- there wasn't a helpful word in any of your posts. I'd been trying to be respectful but there's a difference between deferring to those with more experience and butt kissing; I refuse to do the latter.
Not once have I made you out to be a "villain", as you put it. How would you react if someone just out of the blue jumped on you? Go ahead with your little "you posted in the wrong forum" spiel-- I suppose I deserve it even though I've specifically said I could not find an appropriate forum and I've asked where I should have posted and gotten no response.
I just couldn't let this go. You act as though you have a chip on your shoulder- no cs pun intended. Whatever your beef is, I do wish you peace and I hope you resolve it. You can continue to beat your chest here in this thread if it makes you feel big. I am officially washing my hands with you and this website which, btw, I had fallen in love with- if people are going to be like this it's not worth it...
Yes, I hope you feel big chasing away well-intentioned yet confused newcomers. I'm off to find somebody who actually knows enough to help me!
ja ne, oh Villain,
Geek
|
|
|
|
|
This whole thread belongs in the lounge, it's the best joke I've seen all day.
I wonder if GeekLynx is actually serious here, or just trying to be funny.
Nice work Mike, even if the language was a little rough round the edges.
|
|
|
|
|
Hi!
I'm new to mfc programming.
I used the wizard to create a basic application with doc/view and odbc database support. The wizard also created a menu for the frame. There are commands for record actions (for example Next Record). They are working fine, but I'd like to change the functions. I was looking for event handler codes, but I didn't find them for record actions. Where can I find the message handling for them?
Thx for your help!
|
|
|
|
|
I am moving a ComboBox with:
m_cCombo.MoveWindow(x,y,w,h,TRUE);
After that the Combo does not show a Drop List.
What could be the matter
Bram van Kampen
|
|
|
|
|
I guess you broke something
I can't reproduce that on Vista - here's my test code:
CRect rct;
m_ComboBox1.GetWindowRect(&rct);
m_ComboBox1.MoveWindow(0,0,rct.Width(),rct.Height());
What are the styles of your combobox?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I Used the wizzard to design the Combo, VISIBLE is initially turned off, but left on for debugging. The only other Attribute set is VSCROLL. At this stage, the text is static. I move the Combo over a Listbox Item. For debugging, I immediately hide the Listbox. Combo arrives at the right location, but no Dropdown.
Since this posting, MSVC Compiler Crashed in a 'Rebuild All' (Fails to complete Browser DB)
I Killed it tru Windows Task Manager. Restarted...
Rebuild All...
This time the combo drops two lines, Has no Frame, and No Dropdown Buton.
Going to Restart the Computer and see what happens.
Thanks
Bram van Kampen
|
|
|
|
|
Sounds strange! You DID break something!
Try adding the CBS_NOINTEGRALHEIGHT style to the combobox.
If there's no items in the list, without this style
it may not drop down.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Sounds strange! You DID break something
I know I did. Very few lines at this stage to do it in though.
Restarted the MC, No Difference. I'm going to add a TestDlg to the project, and do the same thing, and I'll let you know how I get on.
By the way:
Mark Salsbery wrote: Try adding the CBS_NOINTEGRALHEIGHT style to the combobox.
If there's no items in the list, without this style
it may not drop down.
Well the list was populated (statically) with 5 dummy items. Tried this, Made no Difference.
Regards
Bram van Kampen
|
|
|
|