Hello Kittenkat:To respond your question, my daughter came to the country with a visitor Visa B/2 and she overstayed, by that time she was 12yrs. I filed a petition (Form I-130, Petition for Alien Relative,as a Second Preference of an lawful permanent residents children (under twenty-one), I wait for almost 5 yrs, and by that time in a way she was Illegal( overstay Visa), until his Visa Number was approved,then I filed a I-485. but she stayed in the country and she ajusted her status inside, without leaving the country. You can ajust status in the US if you prove to them that you enter legally to the country, the only thing and the main key in this is just Patience and wait because is a long process to go through a multi-step process to become an immigrant.
Sometimes when I see in here advise like " you have to leave the country, to ajusted status, that sound in a way very generic, because in cases that you can prove that you enter the country through an entry port and you have been inspected and you have a 1-94, and you overstayed, you can ajusted his/her status without any problem, if they have sponsor (relative), like mom/dad, wife/husband(US),as well as permanent resident like me. that I have to wait for ever, but every case is different and unique. I hope this clear your question.