I work in a computer science faculty (top ten here). I first worked with my advisor as a exchange student: got very good grades in his classes and did some projects (both academic and paid). This projects didn't go very far. I didn't have much help either. Some time after this, I did another exchange year in other computer science faculty (top fifty in same page). The work included some of the things I did with my advisor. Yet the focus was new, I got a lot of help and I published my results.
Don't ask me why I ended up in the top ten school enrolled in a PhD program with my former advisor. He didn't propose a PhD topic and only suggested that it should be related to a project for which he got money on. At the end, he assigned me some tasks which are not "research level" but merely consist in fixing his system.
The whole process was "educational". I got from the experience of "using" a system to the process of "building" a system. I also have a training in mathematics and have been willing to do something theoretical not directly related with a system. I studied a lot of topics on my own: categories, logic, complexity, computability, but without guidance is hard to find a feasible topic that can contribute to advance my career.
Also, not having a fixed topic for my PhD makes me fear I will finish my PhD days fixing bugs in my advisor system, unless I switch advisor (which seems to be hard given that I am already a PhD student in my professor lab) or (more feasible) change faculties (again without a clue of whether the grass will be greener elsewhere.
How could I turn my work into a more theoretical one? Without anyone advising me on interesting problems in theory? Do I need to look for a new advisor? Maybe enroll in a master degree? Should I be worried of not having a fixed topic?
Thanks for the advice.