{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2/issues/3880","labels_url":"https://api.github.com/repos/radare/radare2/issues/3880/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2/issues/3880/comments","events_url":"https://api.github.com/repos/radare/radare2/issues/3880/events","html_url":"https://github.com/radare/radare2/issues/3880","id":123898566,"number":3880,"title":"Graph mode can't handle overlapping opcodes in two different functions (6502 arch)","user":{"login":"d33tah","id":295322,"avatar_url":"https://avatars.githubusercontent.com/u/295322?v=3","gravatar_id":"","url":"https://api.github.com/users/d33tah","html_url":"https://github.com/d33tah","followers_url":"https://api.github.com/users/d33tah/followers","following_url":"https://api.github.com/users/d33tah/following{/other_user}","gists_url":"https://api.github.com/users/d33tah/gists{/gist_id}","starred_url":"https://api.github.com/users/d33tah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d33tah/subscriptions","organizations_url":"https://api.github.com/users/d33tah/orgs","repos_url":"https://api.github.com/users/d33tah/repos","events_url":"https://api.github.com/users/d33tah/events{/privacy}","received_events_url":"https://api.github.com/users/d33tah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/radare/radare2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/radare/radare2/labels/graph","name":"graph","color":"f7c6c7"},{"url":"https://api.github.com/repos/radare/radare2/labels/test-required","name":"test-required","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-25T21:42:20Z","updated_at":"2015-12-26T19:23:50Z","closed_at":null,"body":"Steps to reproduce:\r\n\r\n1. Find a SMB ROM with MD5 811b027eaf99c2def7b933c5208636de,\r\n2. Run `radare -A Super\\ Mario\\ Bros.\\ \\(Japan,\\ USA\\).nes`,\r\n3. Run `V` command, press right arrow twice, press `V`,\r\n4. Observe the call graph\r\n\r\n@Maijin  said on IRC that it may be because of missing functionality in `libr/bin/p/bin_nes.c`:\r\n\r\n```\r\n22:30:36  d33tah $ how do i figure out what should be implemented next to move on?\r\n22:30:55  Maijin $ I would go for adding more flags\r\n22:31:03  Maijin $ and check if sections are correct\r\n22:31:06  d33tah $ okay, i see                            \r\n22:31:07  Maijin $ + adding trainers                                               \r\n22:31:25  Maijin $ + adding more info stuff in \"iI\" like title, and so on             \r\n```\r\n\r\nBelow is the invalid call graph:\r\n\r\n```\r\n\r\n      =--------------------------------------=\r\n      | [0x8002]                             |\r\n      | (fcn) fcn.00008002 62                |\r\n      | ; var int local_0      @ (null)-0x0  |\r\n      | lda #0x10                            |\r\n      | sta 0x2000                           |\r\n      | ldx #0xff                            |\r\n      | txs                                  |\r\n      =--------------------------------------=\r\n          v\r\n        .-'\r\n        |\r\n        | |\r\n    =-------------------------------------------=\r\n    |  0x800a                                   |\r\n    | ; JMP XREF from 0x0000800d (fcn.00008002) |\r\n    | lda 0x2002                                |\r\n    | bpl 0xfb ;[a]                             |\r\n    =-------------------------------------------=\r\n          t f\r\n           .'\r\n           |\r\n .-------. |\r\n | =-------------------------------------------=\r\n | |  0x800f                                   |\r\n | | ; JMP XREF from 0x00008012 (fcn.00008002) |\r\n | | lda 0x2002                                |\r\n | | bpl 0xfb ;[b]                             |\r\n | =-------------------------------------------=\r\n `-------' f\r\n           '-----------.\r\n                       |\r\n                       |\r\n               =----------------=\r\n               |  0x8014        |\r\n               | ldy #0xfe      |\r\n               | ldx #0x05      |\r\n               =----------------=\r\n                   v\r\n      .------------'\r\n      |\r\n      |     .-----------------.\r\n  =-------------------------------------------=\r\n  |  0x8018                   |               |\r\n  | ; JMP XREF from 0x00008020 (fcn.00008002) |\r\n  | lda 0x07d7,x              |               |\r\n  | cmp #0x0a                 |               |\r\n  | bcs 0x0c ;[e]             |               |\r\n  =-------------------------------------------=\r\n          f t                 |\r\n          '-------.---------------.\r\n                  |           |   |\r\n                  |           |   |\r\n          =----------------=  |   |\r\n          |  0x801f        |  |   |\r\n          | dex            |  |   |\r\n          | bpl 0xf6 ;[d]  |  |   |\r\n          =----------------=  |   |\r\n                  f `---------'   |\r\n                  |               |\r\n                  |               |\r\n                  |               |\r\n          =----------------=      |\r\n          |  0x8022        |      |\r\n          | lda 0x07ff     |      |\r\n          | cmp #0xa5      |      |\r\n          | bne 0x02 ;[e]  |      |\r\n          =----------------=      |\r\n                  f t             |\r\n            .-----' '-------.     |\r\n            |               |     |\r\n            |               |     |\r\n    =----------------=      |     |\r\n    |  0x8029        |      |     |\r\n    | ldy #0xd6      |      |     |\r\n    =----------------=      |     |\r\n        v                   |     |\r\n      .-'   .---------------'-----'\r\n      |     |\r\n      |     |\r\n  =--------------------------------------------=\r\n  |  0x802b                                    |\r\n  | ; JMP XREF from 0x0000801d (fcn.00008002)  |\r\n  | ; JMP XREF from 0x00008027 (fcn.00008002)  |\r\n  | jsr fcn.000090cc ;[c]                      |\r\n  | sta 0x4011                                 |\r\n  | sta 0x0770                                 |\r\n  | lda #0xa5                                  |\r\n  | sta 0x07ff                                 |\r\n  | sta 0x07a7                                 |\r\n  | lda #0x0f                                  |\r\n  | invalid                                    |\r\n  | invalid                                    |\r\n  =--------------------------------------------=\r\n```"},"comment":{"url":"https://api.github.com/repos/radare/radare2/issues/comments/167355585","html_url":"https://github.com/radare/radare2/issues/3880#issuecomment-167355585","issue_url":"https://api.github.com/repos/radare/radare2/issues/3880","id":167355585,"user":{"login":"XVilka","id":203261,"avatar_url":"https://avatars.githubusercontent.com/u/203261?v=3","gravatar_id":"","url":"https://api.github.com/users/XVilka","html_url":"https://github.com/XVilka","followers_url":"https://api.github.com/users/XVilka/followers","following_url":"https://api.github.com/users/XVilka/following{/other_user}","gists_url":"https://api.github.com/users/XVilka/gists{/gist_id}","starred_url":"https://api.github.com/users/XVilka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XVilka/subscriptions","organizations_url":"https://api.github.com/users/XVilka/orgs","repos_url":"https://api.github.com/users/XVilka/repos","events_url":"https://api.github.com/users/XVilka/events{/privacy}","received_events_url":"https://api.github.com/users/XVilka/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T19:23:50Z","updated_at":"2015-12-26T19:23:50Z","body":"It doesn't related to analysis at all, it is a missing feature of the graph\nmode - see my last comment.\nOn Dec 26, 2015 10:09 PM, \"radare\" <notifications@github.com> wrote:\n\n> The analysis have nothing to do with esil. Esil is just used for emulation\n> and some advanced anlalysis things. Use ao to inspect the low level\n> analysis info of a specific instruction\n>\n> > On 26 Dec 2015, at 17:08, Jacek Wielemborek <notifications@github.com>\n> wrote:\n> >\n> > The opcode has a \"TODO\" message:\n> >\n> >\n> =-------------------------------------------------------------------------------------------=\n> > | 0x802b |\n> > | ; JMP XREF from 0x0000801d (fcn.00008002) |\n> > | ; JMP XREF from 0x00008027 (fcn.00008002) |\n> > | 0x0000802b 20cc90 1,pc,-,0xff,sp,+,=[2],0x90cc,pc,=,2,sp,-= ;\n> fcn.000090cc ;[c] |\n> > | 0x0000802e 8d1140 a,0x4011,=[1] |\n> > | 0x00008031 8d7007 a,0x0770,=[1] |\n> > | 0x00008034 a9a5 0xa5,a,=,$z,Z,=,$s,N,= |\n> > | 0x00008036 8dff07 a,0x07ff,=[1] |\n> > | 0x00008039 8da707 a,0x07a7,=[1] |\n> > | 0x0000803c a90f 0x0f,a,=,$z,Z,=,$s,N,= |\n> > | 0x0000803e 8d TODO,invalid |\n> > | 0x0000803f 15 TODO,invalid |\n> >\n> =-------------------------------------------------------------------------------------------=\n> > —\n> > Reply to this email directly or view it on GitHub.\n> >\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/radare/radare2/issues/3880#issuecomment-167355071>.\n>\n"}}