{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2/issues/3185","labels_url":"https://api.github.com/repos/radare/radare2/issues/3185/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2/issues/3185/comments","events_url":"https://api.github.com/repos/radare/radare2/issues/3185/events","html_url":"https://github.com/radare/radare2/issues/3185","id":103571135,"number":3185,"title":"Loading project via `r2 -p <proj>` flips local variable names/types","user":{"login":"mossberg","id":2467355,"avatar_url":"https://avatars.githubusercontent.com/u/2467355?v=3","gravatar_id":"","url":"https://api.github.com/users/mossberg","html_url":"https://github.com/mossberg","followers_url":"https://api.github.com/users/mossberg/followers","following_url":"https://api.github.com/users/mossberg/following{/other_user}","gists_url":"https://api.github.com/users/mossberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mossberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossberg/subscriptions","organizations_url":"https://api.github.com/users/mossberg/orgs","repos_url":"https://api.github.com/users/mossberg/repos","events_url":"https://api.github.com/users/mossberg/events{/privacy}","received_events_url":"https://api.github.com/users/mossberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-27T18:49:53Z","updated_at":"2015-08-27T19:18:31Z","closed_at":"2015-08-27T19:18:30Z","body":"If I start create an r2 project, then reload the project, the local variable names/types get flipped. Notice how in the below demo, on reload, the disassembly says `[ebp+int]` rather than `[ebp+arg_2]`.\r\n\r\n```\r\nmark macbook ~/c/s/r/cmu ❯ r2 bomb                                                                                                                                         \r\n -- Setup dbg.fpregs to true to visualize the fpu registers in the debugger view.\r\n[0x080488e0]> aaa\r\n[0x080488e0]> pd 10 @sym.main\r\n/ (fcn) sym.main 365\r\n|          ; arg int arg_2        @ ebp+0x8\r\n|          ; arg int arg_3        @ ebp+0xc\r\n|          ; var int local_6      @ ebp-0x18\r\n|          ; DATA XREF from 0x080488f7 (entry0)\r\n|          ;-- main:\r\n|          ;-- sym.gcc2_compiled._4:\r\n|          0x080489b0    55             push ebp\r\n|          0x080489b1    89e5           mov ebp, esp\r\n|          0x080489b3    83ec14         sub esp, 0x14\r\n|          0x080489b6    53             push ebx\r\n|          0x080489b7    8b4508         mov eax, dword [ebp+arg_2]     ; [0x8:4]=0 ; bomb.c:36\r\n|          0x080489ba    8b5d0c         mov ebx, dword [ebp+arg_3]     ; [0xc:4]=0\r\n|          0x080489bd    83f801         cmp eax, 1                     ; bomb.c:44\r\n|      ,=< 0x080489c0    750e           jne 0x80489d0\r\n|      |   0x080489c2    a148b60408     mov eax, dword [sym.stdin__GLIBC_2.0] ; [0x804b648:4]=0x134f section_end..stabstr LEA sym.stdin__GLIBC_2.0 ; \"O.\" @ 0x804b648 ; bomb.c:45\r\n|      |   0x080489c7    a364b60408     mov dword [sym.infile], eax\r\n[0x080488e0]> Ps testing\r\ntesting\r\n^D\r\nDo you want to save the 'testing' project? (Y/n)\r\nmark macbook ~/c/s/r/cmu ❯ r2 -p testing                                                                                                                                    ❮ 08/27 02:46\r\nReloading project\r\nReloading project\r\n -- nothing personal, just bitness\r\n[0x080488e0]> pd 10 @sym.main\r\n/ (fcn) sym.main 365\r\n|          ; arg arg_2 int          @ ebp+0x8\r\n|          ; arg arg_3 int          @ ebp+0xc\r\n|          ; var local_6 int          @ ebp-0x18\r\n|          ; DATA XREF from 0x080488f7 (entry0)\r\n|          ;-- main:\r\n|          ;-- sym.gcc2_compiled._4:\r\n|          0x080489b0    55             push ebp\r\n|          0x080489b1    89e5           mov ebp, esp\r\n|          0x080489b3    83ec14         sub esp, 0x14\r\n|          0x080489b6    53             push ebx\r\n|          0x080489b7    8b4508         mov eax, dword [ebp+int]       ; [0x8:4]=0 ; bomb.c:36\r\n|          0x080489ba    8b5d0c         mov ebx, dword [ebp+int]       ; [0xc:4]=0\r\n|          0x080489bd    83f801         cmp eax, 1                     ; bomb.c:44\r\n|      ,=< 0x080489c0    750e           jne 0x80489d0\r\n|      |   0x080489c2    a148b60408     mov eax, dword [sym.stdin__GLIBC_2.0] ; [0x804b648:4]=0x134f section_end..stabstr LEA sym.stdin__GLIBC_2.0 ; \"O.\" @ 0x804b648 ; bomb.c:45\r\n|      |   0x080489c7    a364b60408     mov dword [sym.infile], eax\r\n[0x080488e0]>\r\n```\r\n\r\nversion:\r\n\r\n```\r\nmark macbook ~/c/s/r/cmu ❯ r2 -v                                                                                                                                            ❮ 08/27 02:47\r\nradare2 0.10.0-git 8674 @ darwin-little-x86-64 git.0.9.9-572-g2ff37b8\r\ncommit: 2ff37b8de09b4e5995b8a7c424aa6fe04658dd59 build: 2015-08-13\r\n```"},"comment":{"url":"https://api.github.com/repos/radare/radare2/issues/comments/135528240","html_url":"https://github.com/radare/radare2/issues/3185#issuecomment-135528240","issue_url":"https://api.github.com/repos/radare/radare2/issues/3185","id":135528240,"user":{"login":"mossberg","id":2467355,"avatar_url":"https://avatars.githubusercontent.com/u/2467355?v=3","gravatar_id":"","url":"https://api.github.com/users/mossberg","html_url":"https://github.com/mossberg","followers_url":"https://api.github.com/users/mossberg/followers","following_url":"https://api.github.com/users/mossberg/following{/other_user}","gists_url":"https://api.github.com/users/mossberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mossberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossberg/subscriptions","organizations_url":"https://api.github.com/users/mossberg/orgs","repos_url":"https://api.github.com/users/mossberg/repos","events_url":"https://api.github.com/users/mossberg/events{/privacy}","received_events_url":"https://api.github.com/users/mossberg/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T19:18:30Z","updated_at":"2015-08-27T19:18:30Z","body":"Should've updated before filing issue, updated to latest git and works now, my bad."}}